zoukankan      html  css  js  c++  java
  • Springboot启动报错:Caused by: org.springframework.context.ApplicationContextException: Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean

    今天碰到这个错,真的头痛,让人哭笑不得

    springboot启动报错:

    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:206) ~[spring-boot-2.1.4.RELEASE.jar:2.1.4.RELEASE]
        at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.createWebServer(ServletWebServerApplicationContext.java:180) ~[spring-boot-2.1.4.RELEASE.jar:2.1.4.RELEASE]
        at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:154) ~[spring-boot-2.1.4.RELEASE.jar:2.1.4.RELEASE]

    最后解决:

    SpringApplication.run方法第一个参数传错了:错:SpringApplication.class ,换成:StartBootTestApplication.class。引以为戒 

    @SpringBootApplication
    @EnableAsync
    public class StartBootTestApplication {
        public static void main(String[] args) {
            SpringApplication.run(SpringApplication.class,args);
        }
    }
  • 相关阅读:
    Ubuntu18.04 一条命令安装caffe问题
    ubuntu18 + caffe+cpu+anaconda3
    ubuntu18+caffe+cuda
    opencv-python常用接口
    tensorflow-gpu安装
    【LabVIEW】如何给输入控件赋值
    【LabVIEW】控件初始化
    【LabVIEW】程序结构
    【LabVIEW】程序框图中错误输出后status如何调出
    【总线】ARINC 429总线协议
  • 原文地址:https://www.cnblogs.com/mufeng07/p/12668179.html
Copyright © 2011-2022 走看看