Solucionado (ver solução)
Solucionado
(ver solução)
4
respostas

[Dúvida] Aplicação dá um Shutdown initiated. (Não inicia)

2023-01-30T15:30:44.601-03:00 INFO 10444 --- [ionShutdownHook] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default' 2023-01-30T15:30:44.605-03:00 INFO 10444 --- [ionShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated... 2023-01-30T15:30:44.628-03:00 INFO 10444 --- [ionShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown completed.

Process finished with exit code 0

pom.xml .

4.0.0 org.springframework.boot spring-boot-starter-parent 3.0.0-M5 med.voll api 0.0.1-SNAPSHOT api API Rest da aplicação Voll.med <java.version>17</java.version> org.springframework.boot spring-boot-starter-web

    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-devtools</artifactId>
        <scope>runtime</scope>
        <optional>true</optional>
    </dependency>
    <dependency>
        <groupId>org.projectlombok</groupId>
        <artifactId>lombok</artifactId>
        <optional>true</optional>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-test</artifactId>
        <scope>test</scope>
    </dependency>

    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-data-jpa</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-validation</artifactId>
    </dependency>
    <dependency>
        <groupId>org.flywaydb</groupId>
        <artifactId>flyway-core</artifactId>
    </dependency>
    <dependency>
        <groupId>org.flywaydb</groupId>
        <artifactId>flyway-mysql</artifactId>
    </dependency>

    <dependency>
        <groupId>mysql</groupId>
        <artifactId>mysql-connector-java</artifactId>
        <scope>runtime</scope>
    </dependency>
</dependencies>

<build>
    <plugins>
        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
            <configuration>
                <excludes>
                    <exclude>
                        <groupId>org.projectlombok</groupId>
                        <artifactId>lombok</artifactId>
                    </exclude>
                </excludes>
            </configuration>
        </plugin>
    </plugins>
</build>
<repositories>
    <repository>
        <id>spring-milestones</id>
        <name>Spring Milestones</name>
        <url>https://repo.spring.io/milestone</url>
        <snapshots>
            <enabled>false</enabled>
        </snapshots>
    </repository>
</repositories>
<pluginRepositories>
    <pluginRepository>
        <id>spring-milestones</id>
        <name>Spring Milestones</name>
        <url>https://repo.spring.io/milestone</url>
        <snapshots>
            <enabled>false</enabled>
        </snapshots>
    </pluginRepository>
</pluginRepositories>

4 respostas
solução!

Oi Jader!

Posta aqui o log completo.

. __ _ __ _ _ /\ / _'_ _ _ _()_ _ __ _ \ \ \ ( ( )___ | ' | '| | ' / ` | \ \ \ \/ ___)| |)| | | | | || (| | ) ) ) ) ' |__| .|| ||_| |_, | / / / / =========||==============|__/=//// :: Spring Boot :: (v3.0.0-M5)

2023-01-30T16:43:58.039-03:00 INFO 10332 --- [ main] med.voll.api.ApiApplicationTests : Starting ApiApplicationTests using Java 17.0.5 on DESKTOP-AH1US3G with PID 10332 (started by jader in D:\api) 2023-01-30T16:43:58.041-03:00 INFO 10332 --- [ main] med.voll.api.ApiApplicationTests : No active profile set, falling back to 1 default profile: "default" 2023-01-30T16:43:58.984-03:00 INFO 10332 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode. 2023-01-30T16:43:59.054-03:00 INFO 10332 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 57 ms. Found 1 JPA repository interfaces. 2023-01-30T16:43:59.721-03:00 INFO 10332 --- [ main] o.f.c.internal.license.VersionPrinter : Flyway Community Edition 9.3.1 by Redgate 2023-01-30T16:43:59.721-03:00 INFO 10332 --- [ main] o.f.c.internal.license.VersionPrinter : See what's new here: https://flywaydb.org/documentation/learnmore/releaseNotes#9.3.1 2023-01-30T16:43:59.721-03:00 INFO 10332 --- [ main] o.f.c.internal.license.VersionPrinter : 2023-01-30T16:43:59.732-03:00 INFO 10332 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting... 2023-01-30T16:44:00.170-03:00 INFO 10332 --- [ main] com.zaxxer.hikari.pool.HikariPool : HikariPool-1 - Added connection com.mysql.cj.jdbc.ConnectionImpl@611e5819 2023-01-30T16:44:00.172-03:00 INFO 10332 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed. 2023-01-30T16:44:00.205-03:00 INFO 10332 --- [ main] o.f.c.i.database.base.BaseDatabaseType : Database: jdbc:mysql://localhost/vollmed_api (MySQL 8.0) 2023-01-30T16:44:00.251-03:00 INFO 10332 --- [ main] o.f.core.internal.command.DbValidate : Successfully validated 3 migrations (execution time 00:00.023s) 2023-01-30T16:44:00.265-03:00 INFO 10332 --- [ main] o.f.core.internal.command.DbMigrate : Current version of schema vollmed_api: 3 2023-01-30T16:44:00.265-03:00 WARN 10332 --- [ main] o.f.core.internal.command.DbMigrate : Schema vollmed_api has a version (3) that is newer than the latest available migration (1) ! 2023-01-30T16:44:00.266-03:00 INFO 10332 --- [ main] o.f.core.internal.command.DbMigrate : Schema vollmed_api is up to date. No migration necessary. 2023-01-30T16:44:00.481-03:00 INFO 10332 --- [ main] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [name: default] 2023-01-30T16:44:00.571-03:00 INFO 10332 --- [ main] org.hibernate.Version : HHH000412: Hibernate ORM core version 6.1.3.Final 2023-01-30T16:44:00.779-03:00 WARN 10332 --- [ main] org.hibernate.orm.deprecation : HHH90000021: Encountered deprecated setting [javax.persistence.sharedCache.mode], use [jakarta.persistence.sharedCache.mode] instead 2023-01-30T16:44:00.974-03:00 INFO 10332 --- [ main] SQL dialect : HHH000400: Using dialect: org.hibernate.dialect.MySQLDialect 2023-01-30T16:44:01.755-03:00 INFO 10332 --- [ main] o.h.e.t.j.p.i.JtaPlatformInitiator : HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform] 2023-01-30T16:44:01.766-03:00 INFO 10332 --- [ main] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default' 2023-01-30T16:44:02.254-03:00 WARN 10332 --- [ main] JpaBaseConfiguration$JpaWebConfiguration : spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning 2023-01-30T16:44:02.668-03:00 INFO 10332 --- [ main] med.voll.api.ApiApplicationTests : Started ApiApplicationTests in 4.945 seconds (process running for 6.247) 2023-01-30T16:44:02.889-03:00 INFO 10332 --- [ionShutdownHook] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default' 2023-01-30T16:44:02.891-03:00 INFO 10332 --- [ionShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated... 2023-01-30T16:44:02.900-03:00 INFO 10332 --- [ionShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown completed.

Process finished with exit code 0

Pelo log você está rodando a classe de testes automatizados ApiApplicationTests ao invés da classe main do projeto: ApiApplication

Muito obrigado. Deu certo aqui.