Web application could not be started as there was no org.springframework.boot.web.servlet.server.Ser

今天idea启动项目,突然报报错,错误日志如下:

Web application could not be started as there was no org.springframework.boot.web.servlet.server.ServletWebServerFactory bean defined in the context.

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.

Description:

Web application could not be started as there was no org.springframework.boot.web.servlet.server.ServletWebServerFactory bean defined in the context.

Action:

Check your application's dependencies for a supported servlet web server.
Check the configured web application type.

解决方案,我这的原因是pom中没有配置


    org.springframework.boot
    spring-boot-starter-undertow

在pom中加上以上配置,maven重新install一下,启动成功!!


	org.springframework.boot
	spring-boot-starter-undertow


	org.springframework.boot
	spring-boot-starter-web
	
		
			org.springframework.boot
			spring-boot-starter-tomcat
		
	

你可能感兴趣的:(Java,springboot,idea,servlet,java,maven,spring,boot)