java.lang.IllegalArgumentException: More than one fragment with the name [spring_web] was found.
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>5.2.8.RELEASE</version>
</dependency>
原因:
\target\projectName\WEB-INF\lib 里面有多个版本的spring-web
解决方法:
全部删除,然后重新build
![java.lang.IllegalArgumentException: More than one fragment with the name [spring_web] was found._spring](https://file.cfanz.cn/uploads/png/2023/10/09/11/37II2Z9OfD.png)
删掉一个,重新运行tomcat即可,如果在项目的 web-inf 目录的 lib 目录中也存在 不同的两个jar 包,也得删掉一个哦,要不再编译运行的时候还是会加上的。
![java.lang.IllegalArgumentException: More than one fragment with the name [spring_web] was found._spring_02](https://file.cfanz.cn/uploads/png/2023/10/09/11/4e16J33GfH.png)
![java.lang.IllegalArgumentException: More than one fragment with the name [spring_web] was found._解决方法_03](https://file.cfanz.cn/uploads/png/2023/10/09/11/IcFXZ72e4C.png)
解决办法(不可行):
在web.xml加一个标签:<absolute-ordering />
<web-app>
<display-name>Archetype Created Web Application</display-name>
<absolute-ordering></absolute-ordering>
</web-app>










