org.springframework.context.ApplicationContextException: Unable to start web server; nested exceptio
org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.context.ApplicationContextException: Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean.
SpringBoot启动时异常信息如下:
Spring Boot启动出现错误,错误内容大概的意思是:未能加载嵌入的供web应用加载的空间,是因为缺少ServletWebServerFactory bean,在stackflow上面看到了这个错误的解决办法。
这里,添加了一个@EnableAutoConfiguration注解来解决问题。
参考文档:
https://blog.****.net/u010429286/article/details/52636753
http://stackoverflow.com/questions/21783391/spring-boot-unable-to-start-embeddedwebapplicationcontext-due-to-missing-embedd