复习 SSM 框架在整合 mybatis 时遇到了下面的问题,最后发现是 web.xml 配置的错误,故记录一下。

web.xml 出错的地方 <listener> :
<listener>
<listener-class>org.springframework.web.context.ContextLoader</listener-class>
</listener>
//ContextLoader 应该改为 ContextLoaderListener:以下为正确写法
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
使用提示要细心啊,出了问题太难找了!
本文记录了在复习SSM框架整合MyBatis过程中遇到的web.xml配置错误,具体表现为<listener>标签内的ContextLoader配置错误,正确的配置应该是使用ContextLoaderListener。
876

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



