테스트 코드는 잘 작동이 되었는데 애플리케이션을 작동시키면 바로 종료가 되었습니다.
2023-03-07 19:31:25.547 INFO 4904 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...
2023-03-07 19:31:25.606 INFO 4904 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed.
2023-03-07 19:31:25.665 INFO 4904 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8080 (http) with context path ''
2023-03-07 19:31:25.671 INFO 4904 --- [ main] c.example.jdbc.DatabaseHelloApplication : Started DatabaseHelloApplication in 1.018 seconds (JVM running for 1.321)
2023-03-07 19:31:33.624 INFO 4904 --- [ionShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated...
2023-03-07 19:31:33.626 INFO 4904 --- [ionShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown completed.
무엇을 잘못했는지 살펴보니...
starter-web을 추가하지 않았습니다.
그래서 build.gradle에 starter-web을 추가하였습니다.
implementation 'org.springframework.boot:spring-boot-starter-web'
Tomcat이 실행되는과정에서 오류가 났던것 같습니다.