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


Win a copy of Barcodes with iOS this week in the iOS forum
or Core Java for the Impatient in the Java 8 forum!

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: 1681
    
    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]
 
rocket mass heater kickstarter
 
subject: CheckStyle Error - '@ResponseBody' annotation modifier does not preceed non-annotation modifiers