Problema ao inicializar a aplicação | Fórum | School of Net

Deseja poder participar de nosso fórum e tirar todas as suas dúvidas?
Clique aqui e assine nosso plano de acesso ilimitado. Saiba mais.

por André Felipe

2 semanas atrás André Felipe

Problema ao inicializar a aplicação

Ao inicializar a aplicação com um banco de dados já criado, o start do projeto termina nesse ponto, sem avisar sobre algum erro: ``` 2021-06-10 15:27:54.987 INFO 14392 --- [ restartedMain] c.h.HelpDesk.HelpDeskApplication : Starting HelpDeskApplication on LAPTOP-2NUO8JFK with PID 14392 (C:\eclipse-workspaceFelipe\HelpDesk\bin\main started by andre in C:\eclipse-workspaceFelipe\HelpDesk) 2021-06-10 15:27:54.992 INFO 14392 --- [ restartedMain] c.h.HelpDesk.HelpDeskApplication : No active profile set, falling back to default profiles: default 2021-06-10 15:27:55.099 INFO 14392 --- [ restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : Devtools property defaults active! Set 'spring.devtools.add-properties' to 'false' to disable 2021-06-10 15:27:56.146 INFO 14392 --- [ restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode. 2021-06-10 15:27:56.196 INFO 14392 --- [ restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 30ms. Found 0 JPA repository interfaces. 2021-06-10 15:27:57.253 INFO 14392 --- [ restartedMain] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [name: default] 2021-06-10 15:27:57.360 INFO 14392 --- [ restartedMain] org.hibernate.Version : HHH000412: Hibernate ORM core version 5.4.31.Final 2021-06-10 15:27:57.668 INFO 14392 --- [ restartedMain] o.hibernate.annotations.common.Version : HCANN000001: Hibernate Commons Annotations {5.1.2.Final} 2021-06-10 15:27:58.229 INFO 14392 --- [ restartedMain] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting... 2021-06-10 15:27:58.586 INFO 14392 --- [ restartedMain] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed. 2021-06-10 15:27:58.619 INFO 14392 --- [ restartedMain] org.hibernate.dialect.Dialect : HHH000400: Using dialect: org.hibernate.dialect.MySQL5Dialect 2021-06-10 15:27:59.163 INFO 14392 --- [ restartedMain] o.h.e.t.j.p.i.JtaPlatformInitiator : HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform] 2021-06-10 15:27:59.190 INFO 14392 --- [ restartedMain] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default' 2021-06-10 15:27:59.225 INFO 14392 --- [ restartedMain] o.s.b.d.a.OptionalLiveReloadServer : LiveReload server is running on port 35729 2021-06-10 15:27:59.688 INFO 14392 --- [ restartedMain] c.h.HelpDesk.HelpDeskApplication : Started HelpDeskApplication in 5.487 seconds (JVM running for 6.54) 2021-06-10 15:27:59.713 INFO 14392 --- [extShutdownHook] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default' 2021-06-10 15:27:59.727 INFO 14392 --- [extShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated... 2021-06-10 15:27:59.764 INFO 14392 --- [extShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown completed. ``` Meu build.gradle: ``` plugins { id 'org.springframework.boot' version '2.3.11.RELEASE' id 'io.spring.dependency-management' version '1.0.11.RELEASE' id 'java' } group = 'com.helpdeskteste' version = '0.0.1-SNAPSHOT' sourceCompatibility = '1.8' repositories { mavenCentral() } dependencies { implementation 'org.springframework.boot:spring-boot-starter-data-jpa' implementation 'org.springframework.boot:spring-boot-starter-security' implementation 'org.springframework.boot:spring-boot-starter-thymeleaf' //implementation 'mysql:mysql-connector-java:8.0.14' developmentOnly 'org.springframework.boot:spring-boot-devtools' runtimeOnly 'mysql:mysql-connector-java' testImplementation('org.springframework.boot:spring-boot-starter-test') { exclude group: 'org.junit.vintage', module: 'junit-vintage-engine' } testImplementation 'org.springframework.security:spring-security-test' } test { useJUnitPlatform() } ``` application.properties: ``` ## Data source ## spring.datasource.url = jdbc:mysql://localhost:3306/helpdesk?allowPublicKeyRetrieval=true&useSSL=false&useTimezone=true&serverTimezone=UTC spring.datasource.username = root spring.datasource.password = 12345 spring.datasource.testWhileIdle = true spring.datasource.validationQuery = SELECT 1 ## JPA ## spring.jpa.show-sql = true spring.jpa.hibernate.ddl-auto = update spring.jpa.hibernate.naming-strategy = org.hibernate.cfg.ImprovedNamingStrategy spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL5Dialect ```

3 Respostas