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)
  • 相关阅读:
    Windows下MySQL数据库备份脚本(二)
    pt-query-digest用法
    pt-online-schema-change 实例
    pt-kill使用
    pt-find 使用实例
    利用pt-deadlock-logger监控死锁
    pt-fifo-split使用
    bash{} 方法总结
    python psutil 模块
    Zabbix的安装与部署---问题处理(php65.6.28 mysqli 报错误 处理)
  • 原文地址:https://www.cnblogs.com/wobuchifanqie/p/11065766.html
Copyright © 2011-2022 走看看