Is there an option to specify a request header once in spring web RestController instead of doing it on every request?
e.q.
@RestController("workflowController")
public class MyClass{
public Value list(@RequestHeader(USER_ID_HEADER_PARAM) String user) {
...some code
}
public Workflow create(@RequestBody Workflow workflow, @RequestHeader(USER_ID_HEADER_PARAM) String user) {
... some code
}
}
the @RequestHeader(USER_ID_HEADER_PARAM)
will be repeated in every request.
is there a way to specity it in the @RestCotroller
level or the class level?
Thanks