当前位置: 代码迷 >> J2EE >> 整合后的annotation有关问题
  详细解决方案

整合后的annotation有关问题

热度:48   发布时间:2016-04-22 01:57:41.0
整合后的annotation问题
我用struts2和spring3搞整合,现在都弄好了。但我发现我要把struts.xml文件去掉改用annotation时就出问题了,因为struts2的action都给spring3管理了,要设一个action会出现找不到这个action的问题。难道struts2和spring3整合了就不好用annotation了吗,求解。另要是有大神随便说明下rest风格的东东要怎么设就更好了。

------解决方案--------------------
struts2的action不要交给spring管理的。spring只需要管理Service和Dao。使用Struts2 convention虽然是零配置了,但是struts.xml还是要保留的吧。
  相关解决方案