Closing JPA EntityManagerFactory for persistence unit ‘default‘错误导致springboot启动后终止

Closing JPA EntityManagerFactory for persistence unit 'default'错误导致springboot启动后终止

2021-07-07 09:54:38.659 [SpringApplicationShutdownHook] DEBUG o.s.b.c.p.s.ConfigurationPropertySourcesPropertyResolver$DefaultResolver - Found key 'spring.liveBeansView.mbeanDomain' in PropertySource 'systemProperties' with value of type String
2021-07-07 09:54:38.660 [SpringApplicationShutdownHook] INFO  o.s.o.j.LocalContainerEntityManagerFactoryBean - Closing JPA EntityManagerFactory for persistence unit 'default'
2021-07-07 09:54:38.662 [SpringApplicationShutdownHook] INFO  com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Shutdown initiated...
2021-07-07 09:54:38.664 [SpringApplicationShutdownHook] INFO  com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Shutdown completed.

解决办法:
在pom.xml中添加spring-boot-starter-web依赖

<dependency>
     <groupId>org.springframework.boot</groupId>
     <artifactId>spring-boot-starter-web</artifactId>
     <version>2.0.1.RELEASE</version>
</dependency>

问题解决!

你可能感兴趣的:(java,bug,java,spring,boot,bug)