Spring AOP請教

along發表於2009-04-10
大家好,有個問題想請教,在用Spring AOP攔截Struts的action時發生一個問題:被代理過的action不能被struts識別,錯誤資訊如下:
2009-04-09 23:36:18,187:org.apache.struts.action.RequestProcessor--Unhandled Exception thrown: class org.springframework.beans.factory.BeanNotOfRequiredTypeException
2009-04-09 23:36:18,203:org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/bbs].[action]--Servlet.service() for servlet action threw exception
org.springframework.beans.factory.BeanNotOfRequiredTypeException: Bean named '/login' must be of type [org.apache.struts.action.Action], but was actually of type [$Proxy1]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:258)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:149)
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:541)
請大蝦們指教~~~~~該怎麼辦呢?
還有一個問題就是為了攔截action中的execute方法,我的action需要實現一個包含execute方法的介面嗎?

[該貼被admin於2009-04-16 09:21修改過]