记录生活的点点滴滴~~~

maven整合SSH框架时遇到的一个坑

最近在学习JAVA WEB 开发,用Maven整合SSH框架时候遇到一个坑,折腾了一下午,记录下。

最初的POM中,struts2-spring-plugin 排在了 org.springframework 前边,然后Maven会下载3.05版本的 spring 。

这样,在使用下边的配置的时候,

<context-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>calsspath:applicationContext.xml</param-value>
</context-param>

会出现下边的异常

java.lang.NoClassDefFoundError:org/springframework/core/env/ConfigurableEnvironment

在POM中把struts2-spring-plugin 排在org.springframework后边,这样才能获得正确的spring版本。

maven整合SSH框架时遇到的一个坑

https://geekyotter.com/posts/a-pitfall-encountered-by-maven-when-integrating-the-ssh-framework.html

作者

超级水獭

发布时间

2013-06-26

许可协议

无,保留所有权利

本页的评论功能已关闭