zoukankan      html  css  js  c++  java
  • Java异常处理003:Springboot启动报Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletContainerFactory bean异常

        Java异常处理003:Springboot启动报Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletContainerFactory bean异常

    异常日志

    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.

    分析原因

    • 原因不详

    异常解决

    • 在启动类加上@EnableAutoConfiguration注解
    package com.hs.springcloud;
    
    import org.springframework.boot.SpringApplication;
    import org.springframework.boot.SpringBootConfiguration;
    import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
    
    
    @SpringBootConfiguration
    @EnableAutoConfiguration
    public class DeptProvider8001_App {
        public static void main(String[] args){
            SpringApplication.run(DeptProvider8001_App.class,args);
        }
    }

    启动成功

      .   ____          _            __ _ _
     /\ / ___'_ __ _ _(_)_ __  __ _    
    ( ( )\___ | '_ | '_| | '_ / _` |    
     \/  ___)| |_)| | | | | || (_| |  ) ) ) )
      '  |____| .__|_| |_|_| |_\__, | / / / /
     =========|_|==============|___/=/_/_/_/
     :: Spring Boot ::        (v1.5.9.RELEASE)
  • 相关阅读:
    docker安装
    [golang grpc] 框架介绍
    docker介绍
    Visual Studio Code常用设置
    eclipse常用设置
    [golang note] 网络编程
    [golang note] 工程组织
    [golang note] 协程通信
    [golang note] 协程基础
    [golang note] 接口使用
  • 原文地址:https://www.cnblogs.com/wobuchifanqie/p/11065766.html
Copyright © 2011-2022 走看看