Fyro opened SPR-13874 and commented
It seems that there is not currently support for encoding/charset in @PropertySource("classpath:/...").
With french characters like "Générales", current result is "Générales" because there is no check with charset/encoding.
Default constructor with default charset, it's ok.
public EncodedResource(Resource resource) {
this(resource, null, Charset.defaultCharset());
}
Used in ConfigurationClassParser#processPropertySource
/**
* Create a PropertySource having the given name based on Properties
* loaded from the given encoded resource.
*/
public ResourcePropertySource(String name, Resource resource) throws IOException {
super(name, PropertiesLoaderUtils.loadProperties(new EncodedResource(resource)));
this.resourceName = getNameForResource(resource);
}
/**
* Create a PropertySource based on Properties loaded from the given resource.
* The name of the PropertySource will be generated based on the
* {@link Resource#getDescription() description} of the given resource.
*/
public ResourcePropertySource(Resource resource) throws IOException {
super(getNameForResource(resource), PropertiesLoaderUtils.loadProperties(new EncodedResource(resource)));
this.resourceName = null;
}
Affects: 4.2.4
Issue Links:
Referenced from: commits a3a5a03
Fyro opened SPR-13874 and commented
It seems that there is not currently support for encoding/charset in
@PropertySource("classpath:/...").With french characters like "Générales", current result is "Générales" because there is no check with charset/encoding.
Default constructor with default charset, it's ok.
Used in ConfigurationClassParser#processPropertySource
Affects: 4.2.4
Issue Links:
@ConfigurationclassesReferenced from: commits a3a5a03