struts2拦截action多种方法

按照教程写的,运行的时候显示There is no Action mapped for namespace [/] and action name [login!method1] associated with context path [/MethodInterceptorDemo],后来发现是教程里struts2的版本是默认开启的,但是我用的版本默认是关闭的,所以在struts.xml中添加<constant name="struts.enable.DynamicMethodInvocation" value="true" />即可

原文地址:https://www.cnblogs.com/zhaoxu123/p/6069674.html