Guys, I have a property in `application.yaml` whic...
# spring
l
Guys, I have a property in
application.yaml
which is set like
maxRetries: ${MAX_RETRIES:3}
where
MAX_RETRIES
is set as an env var. I'm using Spring to map the properties using
@ConfigurationProperties
. This particular variable is
UByte
and since it is kotlin, Spring can't map it. Any clues how to convert it properly?
l
Thanks anyway, but this is limited to period, data size in bytes and duration. Does not apply to
UByte
j
If you need custom type conversion, you can provide a 
ConversionService
 bean (with a bean named 
conversionService
) or custom property editors (through a 
CustomEditorConfigurer
 bean) or custom 
Converters
 (with bean definitions annotated as 
@ConfigurationPropertiesBinding
).
👍 1