怎么通过自动扫描的方式,把action交给spring来管理,并且当请求到来时,所调用的那个action是spring管理并创建的action。xml文件中需要怎样配置,才能实现,高手帮忙说说。没分给大家了。

解决方案 »

  1.   

    在struts-config.xml加上
    <controller>
       <set-property property="processorClass" value="org.springframework.web.struts.DelegatingRequestProcessor"/>
      </controller>
      

  2.   

    知道了,注解要写成这样@Controller("/students"),/tudents对应struts-config中的path属性,之前也配置成功了,只是请求到来时所调用的那个action不是spring管理的,而是struts创建的。谢谢楼上的哥们。