boot连接

aelbi1ox  于 2021-07-08  发布在  Java
关注(0)|答案(0)|浏览(114)

我有一个postgres服务器在127.0.0.1:51282上运行。当我构建这个项目时,我得到org.postgresql.util.psqlexception并告知连接尝试失败。以下是我的配置:

application.properties:
spring.output.ansi.enabled=ALWAYS
spring.datasource.url=jdbc:postgresql://172.0.0.1:51282/postgres
spring.datasource.username=postgres
spring.datasource.password=kurwa123
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
spring.jpa.hibernate.ddl-auto=create

postgres控制台:图片
渐变配置:

dependencies { 
    implementation 'org.springframework.boot:spring-boot-starter-data-jpa' 
    implementation 'org.springframework.boot:spring-boot-starter-thymeleaf' 
    implementation 'org.springframework.boot:spring-boot-starter-web' 
    developmentOnly 'org.springframework.boot:spring-boot-devtools' 
    compile group: 'org.postgresql', name: 'postgresql', version: '42.2.18' 
    testImplementation('org.springframework.boot:spring-boot-starter-test') { 
        exclude group: 'org.junit.vintage', module: 'junit-vintage-engine' 
    }
}

谢谢你的回答

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题