Is there any way to automatically trim values from Spring property files?
For example, I have a property in the application.properties file:
server.numbers = sss01, sss04 and, accordingly, I get this array of values in the code as follows:
@Value("${server.numbers:}") private String[] numbers; And at the same time, after receiving, I have to trim the spaces by performing the trim() operation for each element of the array. Is it possible to do this automatically, using Spring tools, for example, through annotation?
PropertyPlaceholderConfigureras indicated here - Denis Vabishchevich