通过url动态调用action中的方法
一般: /struts/product 调用execute方法
动态: /struts/product!save 调用save方法
默认状态是禁用动态调用
需打开后才能用
打开default.properties 搜索dynamic 找到那行, 复制
在Struts.xml中添加
<constant name="struts.enable.DynamicMethodInvocation" value="true"></constant>
本文介绍如何在 Struts 框架中启用动态方法调用功能。通过修改配置文件,可以实现通过 URL 直接调用 Action 中的具体方法,如 save 方法等。文章提供了详细的步骤指导。
576

被折叠的 条评论
为什么被折叠?



