注解版struts2与spring整合(maven管理)
来源:互联网 发布:百度数据分析工具 编辑:程序博客网 时间:2024/03/28 17:56
本项目原本是普通的Java项目,我负责将其修改为maven管理,由于项目复杂,修改为多模块maven项目,因此其他模块的代码都是以jar的形式供web模块调用,项目中用spring管理struts2,而且struts2完全是采用注解,本来普通的Java项目能够正常的运行,可是改成了maven多模块,访问时就会出现there is no action mapped for namespace.后来我不断的Google,终于让我知道了答案,原来是项目不能读取到jar内的action。我修改了下struts.xml的配置就ok了。写个博客记录下我的成绩,哈哈。
<constant name="struts.objectFactory" value="spring" /><constant name="struts.action.extension" value="do" /><constant name="struts.multipart.saveDir" value="c:/temp" /><constant name="struts.multipart.maxSize" value="20480000" /><constant name="struts.action.excludePattern" value=".*validcode.*"/><constant name="struts.enable.DynamicMethodInvocation" value="true"/><constant name="struts.convention.action.packages" value="com.eauto100.aptp.shop.component" /> <constant name="struts.convention.action.includeJars" value=".*/component-.*?jar(!/)?,.*/aptp-.*?jar(!/)?" />
./aptp-.?jar(!/)? 这是我添加的,目的是读取jar中的action
1 0
- 注解版struts2与spring整合(maven管理)
- idea中Maven环境Spring+Hibernate+Struts2整合(注解版)
- Spring整合Struts2中拦截链与注解的使用
- Struts2与Spring整合.让Spring来管理action
- Spring-Struts2-Hibernate Maven整合
- maven+Spring+Struts2+Hibernate 整合
- Struts2 与 Spring 整合
- Struts2与Spring整合
- Struts2与Spring整合
- spring与struts2整合
- spring与struts2整合
- struts2与spring整合
- Struts2与Spring整合
- Spring与Struts2整合
- struts2与spring整合
- struts2 与spring整合
- Struts2与Spring整合
- Struts2与Spring整合
- php递归函数的理解
- class.get...
- 购买百度开放云不得不看的实惠好贴!
- JAVA运算符
- 实践pom.xml
- 注解版struts2与spring整合(maven管理)
- osg学习笔记(一)
- 解决子元素用css float浮动后父级元素高度自适应高度
- TestBird创新发布自助功能测试平台,强势进军APP测试领域
- impala查询不到hive里创建的表
- Xcode创建通用动态库 (详解)
- 大话C语言变量和数据类型
- OpenGL编程(二)绘制矩形
- Java环境变量配置