我正在为我的portlet RequestMapping
RenderRequest
@RequestMapping("view.jsp", params="test")
public void doSome(RenderRequest request, RenderResponse response){
}
但是我得到了多个错误,比如
Multiple markers at this line
- Syntax error on token ""view.jsp"", invalid MemberValuePairs
- The attribute value is undefined for the annotation type
RequestMapping
- RequestMapping cannot be resolved to a type
为什么?
答案 0 :(得分:5)
您需要使用value属性。您还需要添加导入org.springframework.web.bind.annotation.RequestMapping
@RequestMapping(value="view.jsp", params="test")
public void doSome(RenderRequest request, RenderResponse response){
}