aspose file tools*
The moose likes Spring and the fly likes CheckStyle Error - '@ResponseBody' annotation modifier does not preceed non-annotation modifiers Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "CheckStyle Error - Watch "CheckStyle Error - New topic
Author

CheckStyle Error - '@ResponseBody' annotation modifier does not preceed non-annotation modifiers

Tiya Khambadkone
Ranch Hand

Joined: Sep 15, 2011
Posts: 52
I get the warning ''@ResponseBody' annotation modifier does not preceed non-annotation modifiers'
at the following line of code :

public @ResponseBody List<String> getModel(@RequestParam(value = "year", required = true) String year, @RequestParam(value = "make", required = true) String make, ModelAndView mv) {
//do something
}

Does anybody know how to fix it ?
Bill Gorder
Bartender

Joined: Mar 07, 2010
Posts: 1649
    
    7

That checkstyle rule complains when the @ResponseBody is after the public to fix it make it look like this:



[How To Ask Questions][Read before you PM me]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: CheckStyle Error - '@ResponseBody' annotation modifier does not preceed non-annotation modifiers