您的位置:首页 > 移动开发 > WebAPP

Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletContainerFactory bean.

2017-07-20 09:49 716 查看
搭建springBoot项目的时候遇到这个问题,大概意思好像是缺少EmbeddedServletContainerFactory bean?貌似是少了什么声明?于是搜索资料在这里找到了解决方法:

https://stackoverflow.com/questions/21783391/spring-boot-unable-to-start-embeddedwebapplicationcontext-due-to-missing-embedd

So you could do this too:

@Configuration
@ComponentScan
@EnableAutoConfiguration
public class Application {
public static void main(String[] args) {
SpringApplication.run(ScheduledTasks.class, args);

}
}


然后我在main方法里面加了这些注释就解决了,于是搜了一下这些注释的意思,好像都是从spring配置文件中加载bean的,具体的意思也不是很了解,下次学到注解再深究
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  springboot
相关文章推荐