struts2 使用动态调用时出现的问题

This method: add for action user1 is not allowed!

这是因为 struts2.5 为了提升安全性,添加了 allomethod 。

在struts.xml 的package下添加一行

<global-allowed-methods>regex:.*</global-allowed-methods>
即可。

猜你喜欢

转载自blog.csdn.net/pack__pack/article/details/78057324