问题描述
- 关于RequestAware的一个问题
- @Controller
@Scope(""prototype"")
public class TestAction implements RequestAware{
private static final long serialVersionUID = -1642353237166273131L; //注入userService @Resource private UserService userService ; private Integer currentPage; //接受session的user对象 private User user; //接受request对象 private Map<String Object> request; //接受application对象
public void setRequest(Map request) {
this.request = request;
}
1.为什么不用再setRequest()方法上面写@Resource 来表示注入
解决方案
private Map request
时间: 2024-12-10 22:20:30