|
From: <jue...@we...> - 2004-08-05 07:38:20
|
Have a look at Spring's org.springframework.web.struts package: Besides = Action base classes that allow easy access to Spring's root web = application context (ActionSupport and DispatchActionSupport), you'll = also find a ContextLoaderPlugIn plus DelegationActionProxy / = DelegatingRequestProcessor there. =20 The latter delegation mechanisms allows you to have a special Spring XML = bean definition file where your Struts Actions get defined as Spring = beans themselves; the Struts ActionServlet will simply delegate to them. = You can in principle apply all of Spring's bean configuration facilities = to those Actions beans, including AOP ProxyFactoryBeans that specify = advices/interceptors for specific target Actions. =20 Note that an AOP ProxyFactoryBean for a Struts Action target needs to = have "proxyTargetClass" as "true", to proxy the full target class rather = than just specific interfaces (requiring CGLIB on the classpath). = Unfortunately, Struts does not define an Action interface, so there's no = way around that. =20 Juergen =20 ________________________________ Von: spr...@li... im Auftrag = von jack hi Gesendet: Do 05.08.2004 08:25 An: spr...@li... Betreff: [Springframework-developer] Spring aop and struts Hi,Spring guys. After I integrated Spring and Struts, the first idea from my brain was: Could I apply Spring aop on struts actions? Yes, SAIF project had supplied struts some interceptor function, but = it's weak in DispatchAction and MethodInceptor. And my experience was finally failed:(. I could not create struts Action proxy. Because in spring "Either an interface or a target is required = for proxy creation". Should my struts actions implement TargetSource = interface? Thank you for your glance at this message, and appreciate your = suggestion. Regards Jack _________________________________________________________________ ??????????,??? MSN Messenger: http://messenger.msn.com/cn=20 ------------------------------------------------------- This SF.Net email is sponsored by OSTG. Have you noticed the changes on Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now, one more big change to announce. We are now OSTG- Open Source Technology Group. Come see the changes on the new OSTG site. www.ostg.com _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer |