Skip to content

Commit daf0b08

Browse files
committed
Revert "Add support for UTF-8 in application.properties"
This reverts commit d6a424f. Closes gh-5361 # Conflicts: # spring-boot/src/test/resources/org/springframework/boot/env/test-encoded.properties
1 parent 5f6be01 commit daf0b08

File tree

3 files changed

+1
-11
lines changed

3 files changed

+1
-11
lines changed

spring-boot/src/main/java/org/springframework/boot/env/PropertiesPropertySourceLoader.java

+1-3
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
import org.springframework.core.env.PropertiesPropertySource;
2323
import org.springframework.core.env.PropertySource;
2424
import org.springframework.core.io.Resource;
25-
import org.springframework.core.io.support.EncodedResource;
2625
import org.springframework.core.io.support.PropertiesLoaderUtils;
2726

2827
/**
@@ -42,8 +41,7 @@ public String[] getFileExtensions() {
4241
public PropertySource<?> load(String name, Resource resource, String profile)
4342
throws IOException {
4443
if (profile == null) {
45-
Properties properties = PropertiesLoaderUtils
46-
.loadProperties(new EncodedResource(resource, "UTF-8"));
44+
Properties properties = PropertiesLoaderUtils.loadProperties(resource);
4745
if (!properties.isEmpty()) {
4846
return new PropertiesPropertySource(name, properties);
4947
}

spring-boot/src/test/java/org/springframework/boot/env/PropertiesPropertySourceLoaderTests.java

-7
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,6 @@ public void loadProperties() throws Exception {
4646
assertThat(source.getProperty("test"), equalTo((Object) "properties"));
4747
}
4848

49-
@Test
50-
public void loadPropertiesEncoded() throws Exception {
51-
PropertySource<?> source = this.loader.load("encoded.properties",
52-
new ClassPathResource("test-encoded.properties", getClass()), null);
53-
assertThat(source.getProperty("test"), equalTo((Object) "prकperties"));
54-
}
55-
5649
@Test
5750
public void loadXml() throws Exception {
5851
PropertySource<?> source = this.loader.load("test.xml",

spring-boot/src/test/resources/org/springframework/boot/env/test-encoded.properties

-1
This file was deleted.

0 commit comments

Comments
 (0)