项目一启动就报错
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat].StandardHost[localhost].StandardContext[]]
Caused by: java.lang.LinkageError: loader constraint violation: loader (instance of org/apache/catalina/loader/WebappClassLoader) previously initiated loading for a different type with name "javax/servlet/ServletContext"
1.解决方法:
根本问题就是和toncat的依赖相冲突了,加上一个provided 就可以了
修改完之后运行就成功啦
原文:https://www.cnblogs.com/KcBlog/p/14584025.html