启动报错
org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is java.lang.NoSuchMethodError: javax.servlet.ServletContext.addFilter(Ljava/lang/String;Ljavax/servlet/Filter;)Ljavax/servlet/FilterRegistration$Dynamic;
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:133) [spring-boot-1.2.3.RELEASE.jar:1.2.3.RELEASE]
解决:包冲突,servlet 的jar 包版本太低。pom.xml 文件注释低版本 servlet依赖
本文详细解析了Spring Boot启动过程中遇到的嵌入式容器启动失败问题,并提供了具体的解决方案,包括定位到servlet jar包版本过低的问题及如何调整pom.xml文件来避免此类错误。
1907

被折叠的 条评论
为什么被折叠?



