I have a spring boot project and I am trying to use Tomcat 10 embedded instead of Tomcat 7. I add the following to my POM...
<properties>
<tomcat.version>10.0.5</tomcat.version>
...
</properties>
Then I run the same command I was running before...
mvn clean package -U && java -cp target\my.jar;props -Dloader.main=com.my.Main org.springframework.boot.loader.PropertiesLauncher
But now it just starts and then shuts itself down. The final messages are...
2021-05-13 15:35:42.105 INFO 10084 --- [ main] com.my.Main : Started Main in 42.918 seconds (JVM running for 44.009)
2021-05-13 15:35:42.190 INFO 10084 --- [extShutdownHook] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default'
Why would this happen and how can I upgrade without this side effect?