I have a project written using the inheritance & XML config method for controllers:
then in my app-servlet.xml I configure the controller with some security interceptors:
public class MyController extends SimpleFormController...
This all works perfectly. I am still building this app for the client, however, and I've started to use Spring's new annotation driven controller system plus @Resource/Autowiring + @RequestMapping, @ModelAttribute, etc so I don't need any XML config.
<ref local="myControllerTarget" />
<bean id="myControllerTarget" class="com.app.ui.controllers.MyController" />
I got the two methods to work well together except for those security interceptors. I've been pulling my hair out on this one for a while.. At first I was looking for a way to apply the LoginAdvisor, AdminAdvisor, etc. via some nice annotation on the Controller, but at this point I'd settle for anything.
When I try to take my new-style controllers (using @Controller, @RequestMapping) and make a <bean> entry for them + urlMapping entry + wrap them like before, it simply won't resolve. I even tried taking out the @Controller but it won't work because I think the @RequestMapping and the manual urlMapping entry are conflicting.