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

springboot项目在启动时需要把servlet容器编译进去,这时候如果你的maven依赖里面没有配置jetty或者tomcat相关依赖就会报错。

解决方法:

jetty添加

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-jetty</artifactId>
    <scope>provided</scope>
</dependency>

tomcat添加:

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-tomcat</artifactId>
    <scope>provided</scope>
</dependency>

原文地址:https://www.cnblogs.com/passedbylove/p/9103245.html

时间: 2024-08-24 01:48:56

springboot报错Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletContainerFactory bean的相关文章

解决spring-boot启动异常Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletContainerFactory bean

第一种: 需要在主类头加上  @EnableAutoConfiguration 第二种: pom文件是否加了 <dependency> <groupId>org.mybatis.spring.boot</groupId> <artifactId>mybatis-spring-boot-starter</artifactId> <exclusions> <exclusion> <groupId>org.sprin

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

今天启动用eureka的服务消费者时,一直出现问题. SpringCloud报错: Caused by: org.springframework.context.ApplicationContextException: Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletContainerFactory bean. 解决方案: 网上的解决方案大多如下: 1.在main()方法的启动类的上方添加注解

SpringBoot Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletContainerFactory bean.

SpringBoot Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletContainerFactory bean. 解决: 添加springboot-web的注解 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</

nested exception is org.springframework.context.ApplicationContextException: Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean.报错解决

近期在学springboot,学的时候遇到这个错,网上查了好多,改了不行,后来发现自己的配置类没有加@SpringBootApplication注解 Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Unable to start web server; nested e

记一次springboot项目,maven引发的悲剧(Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletCont)

maven下载大的项目的时候,jar包下载出错是常见的, 但是这种情况经常能看到,如java.lang.ClassNotFoundException这样的提示, 所以一直以来也觉得maven下载jar错误也没什么,直到使用了springboot 因为springboot是内嵌tomcat的,所以当这些关于Tomcat的jar包出错时,他提示的是:Unable to start EmbeddedWebApplicationContextdue to missing EmbeddedServletC

Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean

在Spring Boot项目中,出现这个错误有两种情况: 一,在main方法所在的类忘记添加@SpringBootApplication 二,缺少依赖,添加即可 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> 原文地址:https://www.c

SQL Developer 4.0 启动报错“unable to create an instance of the java virtual machine located at path”

安装了Oracle之后,第一件事情就是想想怎么去连接,进而操作.SQL Developer是官方提供的强大工具,个人看来也是第一选择. 目前官网提供的最新版是4.0.1.14.48,下载下来之后,就跃跃欲试了.将下载下来的包解压,直接运行sqldeveloper.exe这个文件,选择了本地安装的JDK路径,之后却不幸的报错了,提示"unable to create an instance of the java virtual machine located at path",具体界面

CentOS7图形界面启动报错unable to connect to X server

以前还可以正常启动图形界面,这次启动失败,报错unable to connect to X server 使用的是oracle用户,因为我是在oracle用户下创建的oracle数据库等 解决办法: 在/var/run/console/下touch oracle生成oracle文件,重新startx启动就可以了

【原创】JSTL报错Unable to read TLD &quot;META-INF/c.tld&quot; from JAR file &quot;file.............................

**********菜鸟的福利^_^************ 我用的是jstl-1.2.jar,网上很多说法是删掉工程lib下面的两个jar包,那是之前的老版本,现在整合成一个了. 我出现这个问题的原因:我把jstl-1.2.jar下载到了我的工程目录下:E:\myeclipse10\JSPDemo,然后又将jstl-1.2.jar复制到了工程的lib文件夹下,这样就相当于工程中有了两个jstl-1.2.jar包(可以在myeclipse目录结构中清楚的看到),当我把下载的jstl-1.2.ja