How to auto convert string values from properties files to other data types i.e. duration using spring conversion service?
properties file
my.duration=PT10M
configuration class
@Value("{my.duration}")
//It'll give string value by default but I want to convert to duration
private Duration myDuration;
How can I achieve that using spring ConversionService
?