我开发了自定义 ActionListener:
public class SecureActionListener extends ActionListenerImpl implements ActionListener {
private ActionListener _delegate;
public SecureActionListener(ActionListener delegate) {
_delegate = delegate;
}
@Override
public void processAction(ActionEvent actionEvent) {
super.processAction(actionEvent);
}
}
并像这样配置它:
<application>
<action-listener>
com.example.SecureActionListener
</action-listener>
</application>
这个 SecureActionListener 类是否可以扩展为允许读取支持 bean 方法签名及其注释?
我希望这个 SecureActionListener 在调用带有 @Secured(roleName) 注释的后备 bean 方法并且用户不需要角色时抛出异常。