SpringBoot启动时的异常信息

"C:\Program Files\Java\jdk1.8.0_161\bin\java" ......... com.fangxing.javalearning.annotationlearning.ComponentScanApp
hello world.   ____          _            __ _ _/\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \\\/  ___)| |_)| | | | | || (_| |  ) ) ) )'  |____| .__|_| |_|_| |_\__, | / / / /=========|_|==============|___/=/_/_/_/:: Spring Boot ::        (v2.0.0.RELEASE)2018-04-03 22:25:07.232  INFO 4976 --- [           main] c.f.j.a.ComponentScanApp                 : Starting ComponentScanApp on DESKTOP-BHGM3HS with PID 4976 (started by hasee in D:\test\projects\java-learning)
2018-04-03 22:25:07.237  INFO 4976 --- [           main] c.f.j.a.ComponentScanApp                 : No active profile set, falling back to default profiles: default
2018-04-03 22:25:07.321  INFO 4976 --- [           main] ConfigServletWebServerApplicationContext : Refreshing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@45f45fa1: startup date [Tue Apr 03 22:25:07 CST 2018]; root of context hierarchy
2018-04-03 22:25:07.664  WARN 4976 --- [           main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.context.ApplicationContextException: Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean.2018-04-03 22:25:08.238 ERROR 4976 --- [           main] o.s.boot.SpringApplication               : Application run failedorg.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.context.ApplicationContextException: Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean.at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:155) ~[spring-boot-2.0.0.RELEASE.jar:2.0.0.RELEASE]at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:543) ~[spring-context-5.0.4.RELEASE.jar:5.0.4.RELEASE]at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:140) ~[spring-boot-2.0.0.RELEASE.jar:2.0.0.RELEASE]at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:752) [spring-boot-2.0.0.RELEASE.jar:2.0.0.RELEASE]at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:388) [spring-boot-2.0.0.RELEASE.jar:2.0.0.RELEASE]at org.springframework.boot.SpringApplication.run(SpringApplication.java:327) [spring-boot-2.0.0.RELEASE.jar:2.0.0.RELEASE]at org.springframework.boot.SpringApplication.run(SpringApplication.java:1246) [spring-boot-2.0.0.RELEASE.jar:2.0.0.RELEASE]at org.springframework.boot.SpringApplication.run(SpringApplication.java:1234) [spring-boot-2.0.0.RELEASE.jar:2.0.0.RELEASE]at com.fangxing.javalearning.annotationlearning.ComponentScanApp.main(ComponentScanApp.java:15) [classes/:na]
Caused by: org.springframework.context.ApplicationContextException: Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean.at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.getWebServerFactory(ServletWebServerApplicationContext.java:204) ~[spring-boot-2.0.0.RELEASE.jar:2.0.0.RELEASE]at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.createWebServer(ServletWebServerApplicationContext.java:178) ~[spring-boot-2.0.0.RELEASE.jar:2.0.0.RELEASE]at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:152) ~[spring-boot-2.0.0.RELEASE.jar:2.0.0.RELEASE]... 8 common frames omittedProcess finished with exit code 1

错误的产生是:未能加载嵌入的供web应用加载的空间,是因为缺少ServletWebServerFactory bean

解决方案: 添加@EnableAutoConfiguration注解

Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean 解决方案相关推荐

  1. 【Spring】Unable to start ServletWebServerApplicationContext due to miss ServletWebServerFactory bean

    1.概述 我一个sparing boot项目,本地运行的时候报错. Unable to start ServletWebServerApplicationContext due to miss Ser ...

  2. 本地启动出错Unable to start ServletWebServerApplicationContext due to miss ServletWebServerFactory bean

    Springboot项目打包成war上传到云服务器后,本地启动出错. 首先,我们去除为了上传云服务器所添加的步骤,详细见我的另一篇文章Springboot项目部署到阿里云服务器(war和jar) 然后 ...

  3. 【Spring] Spring boot 报错 Unable to start ServletWebServerApplicationContext due to missing ServletWe

    1.概述 spring 报错如下 Error starting ApplicationContext. To display the conditions report re-run your app ...

  4. missing ServletWebServerFactory bean

    点击了报错行,在报错行打了个断点,发现是没取到这个bean. 启动了另一个web项目,同样一个地方打了断点,发现取到的是tomcatServletWebServerFactory. 判断到没有引入to ...

  5. Spring Boot: Unable to start EmbeddedWebApplicationContext due to missing Embedd

    spring boot启动时报错: Spring Boot: Unable to start EmbeddedWebApplicationContext due to missing Embedded ...

  6. 如何处理错误消息Unable to install breakpoint due to missing line number attributes

    Created by Wang, Jerry, last modified on Mar 11, 2017 Unable to install breakpoint due to missing li ...

  7. “Unable to install breakpoint due to missing line number attributes,Modify compiler options togenera

    Unable to install breakpoint in处理方法 (2012-12-27 10:16:44) 转载▼ 标签: 杂谈 分类: 有java的哈皮时光 今天调试程序的时候,eclips ...

  8. Unable to install breakpoint in XXX due to missing line number attributes的解决

    Eclipse下Debug时弹出错误"Unable to install breakpoint due to missing line number attributes,Modify co ...

  9. 创建vue项目的时候报错:Skipped git commit due to missing username and email in git config.

    创建vue项目的时候报错: WARN Skipped git commit due to missing username and email in git config, or failed to ...

最新文章

  1. 谷歌浏览器扩展程序XDM_请立即更新您的谷歌Chrome浏览器 获取重要的安全补丁程序...
  2. 从零开始学JavaScript一(简介)
  3. 外文翻译 《How we decide》赛场上的四分卫
  4. 极具潜力的新兴职业!
  5. 使用msui的回到顶部的一个小问题
  6. [BZOJ3093][Fdu校赛2012] A Famous Game(不等概率)
  7. [css] 异步加载CSS的方式有哪些?
  8. 许昌学院计算机学院张伶俐,2019年教育科学学院毕业论文答辩工作安排
  9. 构建生态安全格局的方法
  10. VUE系列-Vue核心应用(二)
  11. 卷积法求解系统的零状态响应_动态系统的建模与分析
  12. 什么是pdi检测_汽车pdi检测是什么?如何知道新车做没做pdi
  13. [转载] python中append函数的用法
  14. qq音乐 android,QQ音乐安卓版
  15. 油猴插件-Tampermonkey插件下载
  16. 如何给Word中的图片添加题注
  17. MATLAB到底有多厉害?
  18. java限制ip登陆次数_手把手教你自定义IP访问次数限制器
  19. mac系统升级血泪史之根目录创建文件夹问题
  20. 70句计算机英语,医务人员常用英语70句

热门文章

  1. php用wordanalysis抓取姓名_利用vba查询/抓取 外部数据
  2. python avg_python闭包
  3. java传递实例_Java方法的参数传递机制实例详解
  4. 一分钟在Linux 环境 搭建 SFTP服务器
  5. JAVA 雪花算法 唯一ID生成工具类
  6. Node.js 入门详解(一)
  7. Java-静态方法、非静态方法
  8. python遗传算法计算实例_遗传算法python简单例子(详解)
  9. php msgid排重,如何应用php数组对百万数据停止排重
  10. Qt关于Tcp通信步骤的总结