第一种:

需要在主类头加上  @EnableAutoConfiguration

第二种:

pom文件是否加了

<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-</artifactId>
</exclusion>
</exclusions>
</dependency>

如果在上述依赖加入了tomcat来启动,需要注释掉,否则无法通过mian方法启动起来。

解决spring-boot启动异常Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletContainerFactory bean的更多相关文章

  1. Spring boot 报错 Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletContainerFactory bean.

    在实际开发中修改别人的代码,发现了这个报错,后来发现是因为pom.xml里面 只要将注释掉的部分注释掉就好了.

  2. SpringCloud报错:Caused by: org.springframework.context.ApplicationContextException: Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletContainerFactory bean.

    今天启动用eureka的服务消费者时,一直出现问题. SpringCloud报错: Caused by: org.springframework.context.ApplicationContextE ...

  3. SpringBoot Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletContainerFactory bean.

    SpringBoot Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletContainerFact ...

  4. Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletContainerFactory bean.

    2016-07-18 16:08:20 [main:53] - [WARN] Exception encountered during context initialization - cancell ...

  5. springboot报错Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletContainerFactory bean

    springboot项目在启动时需要把servlet容器编译进去,这时候如果你的maven依赖里面没有配置jetty或者tomcat相关依赖就会报错. 解决方法: jetty添加 <depend ...

  6. Unable to start embedded container; nested exception is org.springframework.context.ApplicationContextException: Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletContainerFa

    Springboot通过application启动报错 2019-01-25 14:02:33.810 ERROR [restartedMain] org.springframework.boot.S ...

  7. 【spring boot】整合LCN,启动spring boot2.0.3 启动报错:Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean.

    spring boot 2.0.3启动报错: Error starting ApplicationContext. To display the conditions report re-run yo ...

  8. 解决spring boot启动报错java.lang.NoClassDefFoundError: ch/qos/logback/classic/Level

    解决spring boot启动报错java.lang.NoClassDefFoundError: ch/qos/logback/classic/Level 学习了:https://blog.csdn. ...

  9. spring Boot 出现:org.springframework.context.ApplicationContextException: Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean.

    org.springframework.context.ApplicationContextException: Unable to start ServletWebServerApplication ...

随机推荐

  1. hotmail 发送邮件 的服务器地址如下

    hotmail的服务器地址如下: pop服务器地址:pop-mail.outlook.com smtp服务器地址:smtp-mail.outlook.com imap服务器地址:imap-mail.o ...

  2. 剥开比原看代码03:比原是如何监听p2p端口的

    作者:freewind 比原项目仓库: Github地址:https://github.com/Bytom/bytom Gitee地址:https://gitee.com/BytomBlockchai ...

  3. .NET 介绍

    In order to continue our effort of being modular and well factored we don’t just provide the entire ...

  4. Kylin知识点介绍

    Kylin is an open source Distributed Analytics Engine from eBay Inc.that provides SQL interface and m ...

  5. 牛客练习赛7 E 珂朵莉的数列(树状数组+爆long long解决方法)

    https://www.nowcoder.com/acm/contest/38/E 题意: 思路: 树状数组维护.从大佬那里学习了如何处理爆long long的方法. #include<iost ...

  6. 转 Failed to run the WC DB work queue associated with 错误的解决

    svn 异常终止导致的缓存工作队列问题 解决方法:清空svn的队列 1.下载sqlite3.exe 2.找到你项目的.svn文件,查看是否存在wc.db 3.将sqlite3.exe放到.svn的同级 ...

  7. python 删除文件夹

    只能删除空文件夹,删除非空文件夹会报错 >>> import os >>> os.rmdir("/tmp/ssh-GyoPWOFZ47") Tr ...

  8. Ubuntu 下 Python自由切换

    sudo update-alternatives --install /usr/bin/python python /usr/bin/python2 100 sudo update-alternati ...

  9. react面试问题总结

    1. 在生命周期中的哪一步你应该发起 AJAX 请求? 我们应当将AJAX 请求放到 componentDidMount 函数中执行,主要原因有下: 放到componentWillMount不好.  ...

  10. 30秒了解Excel的前世今生

    JS 大家日常工作离不开的Excel,实际上脱胎于1979年问世的Apple II电脑上的一款杀手级应用VisiCalc. VisiCalc在问世后的6年间,以100美金一份的价格卖出了超过70万份, ...