-
Notifications
You must be signed in to change notification settings - Fork 38.8k
Closed
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)status: duplicateA duplicate of another issueA duplicate of another issuetype: enhancementA general enhancementA general enhancement
Description
rexli opened SPR-13881 and commented
When i use @PropertySources to load my properties file, i found that i can not specify character encoding.
Here is org.springframework.core.io.support.ResourcePropertySource source code:
public ResourcePropertySource(String name, Resource resource) throws IOException {
super(name, PropertiesLoaderUtils.loadProperties(new EncodedResource(resource)));
this.resourceName = getNameForResource(resource);
}I want to specify character encoding like that:
PropertiesLoaderUtils.loadProperties(new EncodedResource(resource, "UTF-8"))Affects: 4.1.7
Issue Links:
- Support configurable charset for ResourcePropertySource [SPR-10096] #14729 Support configurable charset for ResourcePropertySource ("duplicates")
- Add support for UTF-8 and other charset/encoding to
@PropertySource[SPR-13874] #18447 Add support for UTF-8 and other charset/encoding to@PropertySource
Metadata
Metadata
Assignees
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)status: duplicateA duplicate of another issueA duplicate of another issuetype: enhancementA general enhancementA general enhancement