2011-12-22 29 views
2

のために私は私のポートレットRenderRequest@RequestMappingエラーがRenderRequest

@RequestMapping("view.jsp", params="test") 
public void doSome(RenderRequest request, RenderResponse response){ 
    } 

ためRequestMappingをやろうとしています。しかし、私は

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 

なぜ

のような複数のエラーを取得します?

答えて

5

value属性を使用する必要があります。また、インポートorg.springframework.web.bind.annotation.RequestMappingを追加する必要があります。

@RequestMapping(value="view.jsp", params="test") 
public void doSome(RenderRequest request, RenderResponse response){ 
} 
関連する問題