springboot 中,启动报错:如标题。 因为没有容器的缘故。springboot有两种tomcat发布的方式; 内置tomcat,在pom.xml中配置spring-data-stater-tomcat的依赖就可以了外置tomcat,这个需要按照tomcat的外置方式来配置。选择相应的启动方式就可以了