spring RequestHeader annotation on model object?
-
11-11-2019 - |
Pergunta
Can I put @RequestHeader on a model object property? I.e.
class MyModel {
String ua;
public void setUa(@RequestHeader("User-Agent") String ua) {
this.ua = ua;
}
}
This works with @RequestParam, but seems to have no effect when I use @RequestHeader. Am I missing something? And, if this isn't supported, is there some reason why?
Nenhuma solução correta
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow