SSM框架整合问题————More than one fragment with the name [spring_web] was found.

在进行SSM(Spring、Struts、MyBatis)框架整合并添加AOP事务管理后,遇到Tomcat无法正常启动的问题。错误信息提示存在多个名为'spring_web'的片段,这违反了Servlet规范。解决办法是在web.xml中添加<absolute-ordering/>标签,以绝对顺序来解决冲突,从而成功启动Tomcat。
摘要由CSDN通过智能技术生成

问题描述:

在SSM框架整合过程中添加aop事务支持后Tomcat无法正常启动
部分报错:

	Caused by: java.lang.IllegalArgumentException: More than one fragment with the name [spring_web] was found. This is not legal with relative ordering. See section 8.2.2 2c of the Servlet specification for details. Consider using absolute ordering.
		at org.apache.tomcat.util.descriptor.web.WebXml.orderWebFragments(WebXml.java:2257)
		at org.apache.tomcat.util.descriptor.web.WebXml.orderWebFragments(WebXml.java:2215)
		at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1133)
		at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:774)
		at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:301)
		at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
		at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5051)
		at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
		... 44 more

解决方案:

在web.xml中添加 标签:< absolute-ordering / >

在这里插入图片描述

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值