wood burning stoves 2.0*
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 Android Security Essentials Live Lessons this week in the Android 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: 1648
    
    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
 
Similar Threads
Calling a new JSP form a Spring Controller using Ajax
using JQuery with Spring 3
Need clarity on Spring Controller
org.hibernate.LazyInitializationException
Pass JSON object from server to jQuery and loop on the object