https://kotlinlang.org logo
#spring
Title
# spring
j

João Gabriel Zó

06/16/2022, 4:57 PM
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

Richard Gomez

06/16/2022, 6:48 PM
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.
5 Views