Skip to content

Instantly share code, notes, and snippets.

@igm
Created September 23, 2011 09:12
Show Gist options
  • Save igm/1236998 to your computer and use it in GitHub Desktop.
Save igm/1236998 to your computer and use it in GitHub Desktop.
Spring mvc Controller with many paramaters
package foo.bar;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
@Controller
public class MyContoller{
...
@RequestMapping(value = "/someurl", method = RequestMethod.GET)
public void myVeryVerboseMethod(@CookieValue("JSESSIONID") String cookie,
@RequestHeader("Accept-Encoding") String encoding,
@RequestHeader("header1") String header1,
@RequestHeader("header2") String header2,
@RequestHeader("header3") String header3 ){
...
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment