代码改变世界

Struts2 注解约定

2013-11-16 19:47 by lenzl, 332 阅读, 0 推荐, 收藏,
摘要:1.1 struts2 查找acton类规则(1)搜索包名★ Convention插件会自动搜索位于struts,struts2, actionoractions的包及其子包下的所有java类,以搜索Action类★ 可以通过在struts.xml中配置,改变默认的搜索的文件夹,如下实例:如上配置后,插件将搜索web,s2的文件夹及其子文件夹。(2)搜索action类在搜索的包下,按如下规则找action类★ 实现了com.opensymphony.xwork2.Action的类★ 类名以Action结尾例如:com.example.actions.MainActioncom.example. 阅读全文

struts2 注解

2013-11-16 18:29 by lenzl, 154 阅读, 0 推荐, 收藏,
摘要:一、官方文档http://struts.apache.org/development/2.x/docs/convention-plugin.html二、转一篇中文翻译文档http://www.cnblogs.com/spring4/archive/2012/05/04/2483688.html 阅读全文