Consider a project with lots of annotated actions.
public class TransferMoney(){
@Action("transfer-money-show-form")
public String showForm();
@Action("transfer-money-confirm")
public String confirmForm();
@Action("transfer-money-result")
public String result();
}
I want to add exception-mapping to confirmForm
so I can do it as:
@Action(value = "transfer-money-confirm",
exceptionMappings =
{@ExceptionMapping(
exception = "java.lang.Exception",
result = "exception")
}
)
However is it a better way ?! As I said I have lots of actions and I don't want to add exceptionMapping
for each of them one by one. The action name which I want to add mapping to them all ends with confirm
but it seems not useful because the Exception Mapping does not accept regex.