今天在学SpringCloud时出现一个jar包冲突,记录一下

报错信息如下:Correct the classpath of your application so that it contain a single ,compatible version of javax.servlet.ServletContext
servlet-api2.0与javax servlet-api版本冲突——Action: Correct the classpath of your application so that it
那么问题来了,servlet-api 2.0 和 javax servlet-api 3.x 本质上是同一个包,但是却是不同的版本,所以当项目中调用servlet-api 2.0版本时就会自动生成,而我的版本比较高对应的是javax servlet-api 3.x版本的。

所以当两个同时存在时,就发生jar包冲突了,结果就是删掉低版本的servlet-api如下:
servlet-api2.0与javax servlet-api版本冲突——Action: Correct the classpath of your application so that it
删掉以后再运行就可以了
servlet-api2.0与javax servlet-api版本冲突——Action: Correct the classpath of your application so that it

相关文章:

  • 2021-07-04
  • 2022-12-23
  • 2021-12-01
  • 2021-04-02
  • 2022-02-16
  • 2022-12-23
  • 2021-05-01
  • 2021-10-05
猜你喜欢
  • 2021-07-13
  • 2022-12-23
  • 2021-08-07
  • 2022-02-16
  • 2021-08-05
  • 2022-12-23
  • 2021-09-28
相关资源
相似解决方案