与db-stuck-spring-boot-jpa的连接

zu0ti5jz  于 2021-07-08  发布在  Java
关注(0)|答案(1)|浏览(489)

当我建立一个项目时,它在hikaripool-1上卡住了-开始。。。
以下是完整的堆栈跟踪:

.   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v2.3.5.RELEASE)

2020-11-16 19:25:53.132  INFO 5328 --- [  restartedMain] pl.umcs.lessonwiz.LessonwizApplication   : Starting LessonwizApplication on DESKTOP-4VPS8T4 with PID 5328 (C:\Users\admin\IdeaProjects\lessonwiz\build\classes\java\main starte
d by admin in C:\Users\admin\IdeaProjects\lessonwiz)
2020-11-16 19:25:53.135  INFO 5328 --- [  restartedMain] pl.umcs.lessonwiz.LessonwizApplication   : No active profile set, falling back to default profiles: default
2020-11-16 19:25:53.180  INFO 5328 --- [  restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : Devtools property defaults active! Set 'spring.devtools.add-properties' to 'false' to disable
2020-11-16 19:25:53.180  INFO 5328 --- [  restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : For additional web related logging consider setting the 'logging.level.web' property to 'DEBUG'
2020-11-16 19:25:53.688  INFO 5328 --- [  restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFERRED mode.
2020-11-16 19:25:53.706  INFO 5328 --- [  restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 11ms. Found 0 JPA repository interfaces.
2020-11-16 19:25:54.242  INFO 5328 --- [  restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 8080 (http)
2020-11-16 19:25:54.256  INFO 5328 --- [  restartedMain] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2020-11-16 19:25:54.257  INFO 5328 --- [  restartedMain] org.apache.catalina.core.StandardEngine  : Starting Servlet engine: [Apache Tomcat/9.0.39]
2020-11-16 19:25:54.351  INFO 5328 --- [  restartedMain] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2020-11-16 19:25:54.352  INFO 5328 --- [  restartedMain] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 1172 ms
2020-11-16 19:25:54.434  INFO 5328 --- [  restartedMain] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Starting...

调试时,我在一个循环中收到3条消息:

2020-11-16T19:36:12.936+0100 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Waiting to acquire shared lock on daemon addresses registry.
2020-11-16T19:36:12.936+0100 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Lock acquired on daemon addresses registry.
2020-11-16T19:36:12.936+0100 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on daemon addresses registry.

构建.gradle

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'
    }
    compileOnly 'org.projectlombok:lombok:1.18.16'
    annotationProcessor 'org.projectlombok:lombok:1.18.16'

    testCompileOnly 'org.projectlombok:lombok:1.18.16'
    testAnnotationProcessor 'org.projectlombok:lombok:1.18.16'
}

应用程序属性:

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

pgpanel:屏幕截图
谢谢你的回答

nhn9ugyo

nhn9ugyo1#

试着把这几行改过来 application.properties .

spring.datasource.url=jdbc:postgresql://127.0.0.1:5432/postgres

相关问题