• Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean


    Maven 项目 启动报错如下:

    WARN [main] AnnotationConfigServletWebServerApplicationContext: 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.
    ERROR [main] SpringApplication: Application run failed
    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.
    ...
    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:203)
    at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.createWebServer(ServletWebServerApplicationContext.java:179)
    at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:153)
    ... 6 common frames omitted

    解决:
    1.重新引入项目
    2.IDEA 右侧菜单 Maven Projects -> Projects 中选中dev
    3.IDEA 右侧菜单 Maven Projects -> 点击 Toggle Offline Mode


  • 相关阅读:
    ThinkPHP模版验证要注意的地方
    js关闭子页面刷新父页面
    js替换字符指定字符方法
    Ubuntu安装后的一些配置
    Docker入门
    RabbitMQ 基本概念和使用
    JAX-WS注解
    Linux 常用命令
    ubuntu16.04 搭建 Mysql服务器
    ubuntu 安装 Tomcat
  • 原文地址:https://www.cnblogs.com/uoky/p/14763278.html
Copyright © 2020-2023  润新知