Is it possible, using @PropertySource
annotation, to configure the encoding that has to be used to load the property file?
An example to clarify my prob
Or you can use the PropertiesFactoryBean that have the setEncoding method. Here an example from one of my projects
@Bean
public PropertiesFactoryBean cvlExternalProperties() {
PropertiesFactoryBean res = new PropertiesFactoryBean();
res.setFileEncoding("UTF-8");
res.setLocation(new ClassPathResource("conf/external-test.properties"));
return res;
}
and then you can use in the project with the following notation
@Value("#{cvlExternalProperties['myProperty']}")
private String p;