关于struts2的注解

来源:互联网 发布:linux 播放器剪辑 编辑:程序博客网 时间:2024/05/01 17:56

最近在做一个基于ssh开发的项目,博主本想用struts2注入来进行加快开发,但是一直都注入不了。后来在网上看了一些资料以及一些struts2的doc才知道:

所建的action要建立在strutsstruts2action, actions包或者其子包中,以下是struts2的doc:

 First the Convention plugin finds packages named strutsstruts2action or actions. Any packages that match those names are considered the root packages for the Convention plugin. Next, the plugin looks at all of the classes in those packages as well as sub-packages and determines if the classes implementcom.opensymphony.xwork2.Action or if their name ends with Action (i.e. FooAction).

这样就可以了:



0 0
原创粉丝点击