I have 4 different endpoints in my Controller that...
# spring
j
I have 4 different endpoints in my Controller that all have the same 7 headers. Is there a way to avoid boilerplate code, i.e. repeating each header declaration for every endpoint?
😶 2
r
It's been a while since I've looked into this, but I believe it's possible to declare all properties you want (
@RequestVariable
,
Header
, etc.) in a common object, and then use that object on all the methods.