启动springboot应用报错ConfigServletWebServerApplicationContext : Exception encountered during context init

时间:2024-03-24 15:23:59

启动springboot应用报错ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt:

首行报错:
WARN 800 — [ main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: 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应用报错ConfigServletWebServerApplicationContext : Exception encountered during context init之前运行没问题,上次由于调整了pom文件以及主应用类上的注解导致了这个错误,具体如下:
启动springboot应用报错ConfigServletWebServerApplicationContext : Exception encountered during context init将此处注释掉的部分还原,然后重启服务
启动springboot应用报错ConfigServletWebServerApplicationContext : Exception encountered during context init此时解决了,可能每个人问题不大一样,仅供参考