Strust2.1+spring+hibernate注释不生效的问题

来源:互联网 发布:做农村淘宝合伙人优势 编辑:程序博客网 时间:2024/05/22 09:42

   1、今天学习了一下SSH配置,发现用Struts注解是怎么也不能生效,查了很长时间,终于发现Struts2.1需要配置常量

<!-- 相当于普通xml配置中的extends,指定默认的继承包 --><constant name="struts.convention.default.parent.package" value="struts-default" /><!-- 结果资源所在路径,这个地方要注意,详见下面解释 --><constant name="struts.convention.result.path" value="/jspPage" /><!-- 指定以那些后缀结尾的java类package包被搜索,以发现注解 --><constant name="struts.convention.package.locators" value="web,action" />
复制代码
指定注释相关包才能生效,入坑!

参见下列前辈

http://www.cnblogs.com/iuranus/archive/2013/05/14/3077328.html

http://blog.sina.com.cn/s/blog_57769b7b0100tq6k.html

0 0
原创粉丝点击