ApplicationContextException: Unable to start ServletWebServerApplication (springboot)

springboot 中,启动报错:如标题。

因为没有容器的缘故。springboot有两种tomcat发布的方式;

  1. 内置tomcat,在pom.xml中配置spring-data-stater-tomcat的依赖就可以了
  2. 外置tomcat,这个需要按照tomcat的外置方式来配置。选择相应的启动方式就可以了

猜你喜欢

转载自blog.csdn.net/m0_37626203/article/details/88229376
今日推荐