首页 > 移动平台 > 详细

解决spring-boot启动异常Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletContainerFactory bean

时间:2018-05-10 15:17:42      阅读:2047      评论:0      收藏:0      [点我收藏+]

第一种:

需要在主类头加上  @EnableAutoConfiguration

 

第二种:

pom文件是否加了

<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-</artifactId>
</exclusion>
</exclusions>
</dependency>

如果在上述依赖加入了tomcat来启动,需要注释掉,否则无法通过mian方法启动起来。

解决spring-boot启动异常Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletContainerFactory bean

原文:https://www.cnblogs.com/zyf-yxm/p/9019533.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!