diff --git a/spring-boot/src/main/java/org/springframework/boot/env/PropertiesPropertySourceLoader.java b/spring-boot/src/main/java/org/springframework/boot/env/PropertiesPropertySourceLoader.java index d09e630aea8..7f3eb266681 100644 --- a/spring-boot/src/main/java/org/springframework/boot/env/PropertiesPropertySourceLoader.java +++ b/spring-boot/src/main/java/org/springframework/boot/env/PropertiesPropertySourceLoader.java @@ -22,7 +22,6 @@ import java.util.Properties; import org.springframework.core.env.PropertiesPropertySource; import org.springframework.core.env.PropertySource; import org.springframework.core.io.Resource; -import org.springframework.core.io.support.EncodedResource; import org.springframework.core.io.support.PropertiesLoaderUtils; /** @@ -42,8 +41,7 @@ public class PropertiesPropertySourceLoader implements PropertySourceLoader { public PropertySource load(String name, Resource resource, String profile) throws IOException { if (profile == null) { - Properties properties = PropertiesLoaderUtils - .loadProperties(new EncodedResource(resource, "UTF-8")); + Properties properties = PropertiesLoaderUtils.loadProperties(resource); if (!properties.isEmpty()) { return new PropertiesPropertySource(name, properties); } diff --git a/spring-boot/src/test/java/org/springframework/boot/env/PropertiesPropertySourceLoaderTests.java b/spring-boot/src/test/java/org/springframework/boot/env/PropertiesPropertySourceLoaderTests.java index 6f719dfd512..f5e08c24bf8 100644 --- a/spring-boot/src/test/java/org/springframework/boot/env/PropertiesPropertySourceLoaderTests.java +++ b/spring-boot/src/test/java/org/springframework/boot/env/PropertiesPropertySourceLoaderTests.java @@ -46,13 +46,6 @@ public class PropertiesPropertySourceLoaderTests { assertThat(source.getProperty("test"), equalTo((Object) "properties")); } - @Test - public void loadPropertiesEncoded() throws Exception { - PropertySource source = this.loader.load("encoded.properties", - new ClassPathResource("test-encoded.properties", getClass()), null); - assertThat(source.getProperty("test"), equalTo((Object) "prकperties")); - } - @Test public void loadXml() throws Exception { PropertySource source = this.loader.load("test.xml", diff --git a/spring-boot/src/test/resources/org/springframework/boot/env/test-encoded.properties b/spring-boot/src/test/resources/org/springframework/boot/env/test-encoded.properties deleted file mode 100644 index 66c76610011..00000000000 --- a/spring-boot/src/test/resources/org/springframework/boot/env/test-encoded.properties +++ /dev/null @@ -1 +0,0 @@ -test=prकperties