Unable to instantiate Action, OrderAction, defined for 'OrderActionfindByMethod

Unable to instantiate Action, OrderAction,  defined for 'OrderActionfindByMethod' in namespace ''Error creating bean with name 'OrderAction' defined in class path resource [beans.xml]: Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError - action - file:/D:/aaa/shop/WebRoot/WEB-INF/classes/struts.xml:173:62

       com.opensymphony.xwork2.DefaultActionInvocation.createAction(DefaultActionInvocation.java:294)

applicationContext.xml

<bean id="MyInterceptor" class="Unit.Test.MyInterceptor"/>

<bean name="Myaction" class="Unit.Test.Myaction" scope="prototype">    

</bean>

struts.xml

<action name="Myaction*" class="Myaction"  method="{1}">

    <result name="updateSuc">/test.jsp</result>  

</action>

拦截器代码

@Pointcut("execution (* Unit.Test.Myaction.*del*(..))")定要指定是某个del方法,否则它会那个方法都会拦截的

 

 

你可能感兴趣的:(java,bean,xml,struts,prototype)