I am passing two headers in controller as below
@Header("x-correlationId") String correlationId,
@Header(name = "x-consumedBy") String consumedBy
where x-correlationId
is mandatory and x-consumedBy
is optional. I am not able to specify this.
In Spring we can specify required=false
.
Tell us what happens instead.
It is taking both as mandatory.
If I specify @Nullable
then it is always taking the value as null even if I pass the value
correlationId::12345:consumedBy:null