문제

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?

올바른 솔루션이 없습니다

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top