亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定

Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletContainerFactory bean

?protected EmbeddedServletContainerFactory getEmbeddedServletContainerFactory() {
??String[] beanNames = getBeanFactory().getBeanNamesForType(EmbeddedServletContainerFactory.class);
??System.out.println(getBeanFactory().getClass().getName());
??System.out.println(beanNames.length);
??if (beanNames.length == 0) {
???return null;
??}
??if (beanNames.length == 0) {
???throw new ApplicationContextException("Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletContainerFactory bean.");
??}

??if (beanNames.length > 1) {
???throw new ApplicationContextException("Unable to start EmbeddedWebApplicationContext due to multiple EmbeddedServletContainerFactory beans : " + StringUtils.arrayToCommaDelimitedString(beanNames));
??}

??return (EmbeddedServletContainerFactory) getBeanFactory().getBean(beanNames[0], EmbeddedServletContainerFactory.class);
?}

我調式源碼發現

[2017-02-25 20:42:23.864] - 7444 信息 [main] --- com.imooc.GirlApplication: Starting GirlApplication on DESKTOP-JDE5DT4 with PID 7444 (E:\workspace\girl\web\WEB-INF\classes started by javacar in E:\workspace\girl)
[2017-02-25 20:42:23.883] - 7444 信息 [main] --- com.imooc.GirlApplication: No active profile set, falling back to default profiles: default
[2017-02-25 20:42:24.013] - 7444 信息 [main] --- org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext: Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@7fac631b: startup date [Sat Feb 25 20:42:24 CST 2017]; root of context hierarchy
[2017-02-25 20:42:24.813] - 7444 信息 [main] --- org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor: JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
org.springframework.beans.factory.support.DefaultListableBeanFactory
0
[2017-02-25 20:42:25.437] - 7444 信息 [main] --- org.springframework.jmx.export.annotation.AnnotationMBeanExporter: Registering beans for JMX exposure on startup
[2017-02-25 20:42:25.458] - 7444 信息 [main] --- com.imooc.GirlApplication: Started GirlApplication in 2.085 seconds (JVM running for 2.503)

這如何解決,缺什么jar。缺什么配置文件

正在回答

1 回答

放完整代碼吧

0 回復 有任何疑惑可以回復我~
#1

car 提問者

這已經是完整源代碼了。
2017-03-11 回復 有任何疑惑可以回復我~

舉報

0/150
提交
取消
2小時學會Spring Boot
  • 參與學習       151526    人
  • 解答問題       1132    個

Spring Boot入門視頻教程,你將學會使用Spring Boot快速構建應用程序

進入課程

Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletContainerFactory bean

我要回答 關注問題
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號