Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletContainerFactory bean.

2016-07-18 16:08:20 [main:53] - [WARN] Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is org.springframework.context.ApplicationContextException: Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletContainerFactory bean.
2016-07-18 16:08:20 [main:54] - [ERROR] Application startup failed
org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is org.springframework.context.ApplicationContextException: Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletContainerFactory bean.
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:133)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:532)
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:118)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:766)
at org.springframework.boot.SpringApplication.createAndRefreshContext(SpringApplication.java:361)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:307)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1191)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1180)
at com.xiaoyi.sns.service.Application.main(Application.java:18)
Caused by: org.springframework.context.ApplicationContextException: Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletContainerFactory bean.
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.getEmbeddedServletContainerFactory(EmbeddedWebApplicationContext.java:185)
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.createEmbeddedServletContainer(EmbeddedWebApplicationContext.java:158)
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:130)
... 8 more

 

The scheduling guide isn't a web app so you probably have some mouldy stuff in your pom.xml from the REST guide? If you follow the instructions closely it should work. Another potential issue with the code you posted above is that your @EnableAutoConfiguration class is not used in the context, only as a main method (which may not be a problem for the scheduling guide but it probably is for a bunch of others).

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

 

时间: 2025-01-19 15:25:18

Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletContainerFactory bean.的相关文章

Spring boot ---- java.lang.NoClassDefFoundError: javax/servlet/ServletContext

  场景描述 项目中用到spring boot进行带页面的开发,从github上的simples中下载了对应的spring-boot-sample-web-jsp项目,经简单修改之后死活启动不起来,各种异常.spring-boot以简单容易上手为核心宗旨,可为什么在引入jar时就会出现这么多问题呢? 异常信息 异常一: 2016-06-17 11:04:14.216 ERROR 4684 --- [ main] o.s.boot.SpringApplication : Application s

SpringBoot集成jsp(附源码)+遇到的坑

1.大体步骤 (1) 创建Maven web project: (2) 在pom.xml文件添加依赖: (3) 配置application.properties支持jsp (4) 编写测试Controller (5) 编写JSP页面 (6) 编写启动类App.java 2.新建SpringInitialzr 3.pom文件 <dependencies> <dependency> <groupId>org.springframework.boot</groupId&

Eclipse裸奔调试WebLogic

项目开发的时候能做断点就最好啦~而eclipse在这点上是比不上myeclipse的那么是不是说我们就不能断点了呢?现在的项目里同事用到了断点我就理所当然也要用啦`在设置的过程中发现一些问题记录下来! 步骤:1. 用编译器打开weblogic项目目录下的startWebLogic.cmd ,在里面加上这句:set JAVA_OPTIONS=%JAVA_OPTIONS% -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_so

ORA-00824: cannot set sga_target due to existing internal settings, see alert log for more information

    这篇文章是上篇文章"Expdp 导数错误 ORA-00832"的延续,前几天工作比较忙.累,直到今天才整理发出来.这个数据库实例的参数设置比较诡异其实是有原因的,由于这台数据库服务器系统是32位,数据库也是32位的.对于绝大部分32位系统上的32位数据库,SGA 最大的设置都不能超过2G,有的系统最大值甚至不能超过1.7G左右.DBA为了让内存充分利用,不至于浪费内存资源,于是想让SGA_MAX_SIZE 最大化,对数据库相关参数做了调整,设置参数USE_INDIRECT_DA

在Linux 6上使用UDEV解决RAC ASM存储设备名问题

连接:http://www.askmaclean.com/archives/%E5%9C%A8linux-6%E4%B8%8A%E4%BD%BF%E7%94%A8udev%E8%A7%A3%E5%86%B3rac-asm%E5%AD%98%E5%82%A8%E8%AE%BE%E5%A4%87%E5%90%8D%E9%97%AE%E9%A2%98.html Maclean一直是使用UDEV替代ASMLIB做RAC存储设备名绑定的拥护者,相关的专题文章可以作为读者的预读知识是:Why ASMLIB

请问如何对依赖项目进行测试?

问题描述 我用eclipse galileo开发java的web项目(名为myproject),该项目依赖很多jar包,其中一个名为A的jar包(A.jar)我想查看源码,并进行测试.于是我找到了A.jar包的源程序A项目,这是一个java项目,把他导入到了eclipse中,然后在myproject项目的property属性中把A项目加进来做为依赖项目(即required projects on the build path那一项).之后我在myproject项目中通过ctrl+左键点击A项目中

如何正确的删除表空间数据文件

如何正确的删除表空间数据文件 应该使用如下的命令删除: ALTER TABLESPACE TEST DROP DATAFILE 3;   参考mos文章: Unable to Drop a Datafile From the Tablespace Using Alter Tablespace Command (文档 ID 1050261.1) 违反下列任何一个条件,该datafile均不能被drop: 1)必须为空,否则会报:ORA-03262: the file is non-empty.值得

Http Status Codes

原文:http://httpstatus.es/ 1xx informational 100 client should continue with request 101 server is switching protocols 102 server has received and is processing the request 103 resume aborted PUT or POST requests 122 URI is longer than a maximum of 208

Spring Boot特性

1. SpringApplication SpringApplication 类是启动 Spring Boot 应用的入口类,你可以创建一个包含 main() 方法的类,来运行 SpringApplication.run 这个静态方法: public static void main(String[] args) { SpringApplication.run(MySpringConfiguration.class, args); } 运行该类会有如下输出: . ____ _ __ _ _ /\