Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

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

 
Tiya Khambadkone
Ranch Hand
Posts: 114
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1682
7
Android IntelliJ IDE Linux Mac OS X Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That checkstyle rule complains when the @ResponseBody is after the public to fix it make it look like this:

 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!