跳到主要内容

获取Attribute

最原始的办法是通过 httpRequest.getAttribute 获取,但 Hasor 提供了 @AttributeParameter 注解

@MappingTo("/helloAction.do")
public class HelloAction {
@Any
public void execute(@AttributeParameter("value") boolean value) {
...
}
}