Reputation: 51
How to get request header value from http request in spring mvc based on custom annotation condition on Field level Element type without using any handlerMapping object?
Upvotes: 0
Views: 1343
Reputation: 24442
I don't really get what you're asking, Spring MVC already offers an annotation to map request headers, see the doc
@RequestMapping("/displayHeaderInfo.do")
public void displayHeaderInfo(@RequestHeader("Accept-Encoding") String encoding,
@RequestHeader("Keep-Alive") long keepAlive) {
//...
}
Upvotes: 1