Access all @RequestHeader key value as Map in our Spring controller
You can achieve it as follow-
@RequestMapping(value = "/hello.htm")
public String hello(@RequestHeader HttpHeaders httpHeaders){
Map<String,String> headerMap=httpHeaders.toSingleValueMap();
//TODO httpHeaders will have many methods
}
I hope it will help you. Thanks.