这里的{1}表示接收前面action里经过通配符传来的值,例如你配置的是<action name="*Crud" class="example.Crud" method="{1}"> ,而后调用***/editCrud.action,则method里得到的值是edit,将会调用这个action里面的 edit方法 附: Action中的方法通配符 有些时候对Action中方法的调用知足必定的规律,例如edit Action对应edit方法,delete Action对应 delete方法,这个时候咱们能够使用方法通配符,例如: <action name="*Crud" class="example.Crud" method="{1}"> 这时,editCrud Action的引用将调用edit方法,同理,deleteCrud Action的引用将调用delete 方法。 另一种比较经常使用的方式是使用下划线分割,例如: <action name="Crud_*" class="example.Crud" method="{1}"> 这样当遇到以下调用的时候能够找到对应的方法。 "action=Crud_input" => input方法 "action=Crud_delete" => delete方法 通配符和普通的配置具备相同的地位,能够结合使用框架的全部其余功能。
参考资料:http://yjph83.blog.163.com/blog/static/551475792008520101617770/#框架