解决spring-boot启动异常Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletContainerFactory bean
            时间:2018-05-10 15:17:42  
            收藏:0  
            阅读:2048
        
        
        第一种:
需要在主类头加上 @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方法启动起来。
原文:https://www.cnblogs.com/zyf-yxm/p/9019533.html
            评论(0)
        
        
        