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
Register / Login
JavaRanch » Java Forums » Frameworks » Spring
Reply 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: 40
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: 1282

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://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: CheckStyle Error - '@ResponseBody' annotation modifier does not preceed non-annotation modifiers
 
Similar Threads
using JQuery with Spring 3
Calling a new JSP form a Spring Controller using Ajax
org.hibernate.LazyInitializationException
Pass JSON object from server to jQuery and loop on the object
Need clarity on Spring Controller