struts2动态方法的配置

如果想通过aciton!method.action的形式访问,需要做两个设置

1、配置文件中设置动态方法调用为true

<constant name="struts.enable.DynamicMethodInvocation" value="true" />

2、action中配置值允许的方法:
<allowed-methods>login,logout</allowed-methods>



猜你喜欢

转载自www.cnblogs.com/deecold/p/9119999.html