Revert "Add support for UTF-8 in application.properties"

This reverts commit d6a424f94c.

Closes gh-5361

# Conflicts:
#	spring-boot/src/test/resources/org/springframework/boot/env/test-encoded.properties
This commit is contained in:
Stephane Nicoll 2016-05-06 11:03:56 +02:00
parent 5f6be0152b
commit daf0b081e7
3 changed files with 1 additions and 11 deletions

View File

@ -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);
}

View File

@ -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",