mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-09-03 04:26:12 +08:00
Polish "Validate overrides against CharsetMapperDefault.properties"
See gh-30692
This commit is contained in:
parent
407ae3b04f
commit
1fa4701d6d
@ -81,6 +81,8 @@ import org.springframework.boot.web.server.WebServerException;
|
||||
import org.springframework.boot.web.servlet.server.AbstractServletWebServerFactory;
|
||||
import org.springframework.boot.web.servlet.server.AbstractServletWebServerFactoryTests;
|
||||
import org.springframework.core.io.ByteArrayResource;
|
||||
import org.springframework.core.io.ClassPathResource;
|
||||
import org.springframework.core.io.support.PropertiesLoaderUtils;
|
||||
import org.springframework.http.HttpEntity;
|
||||
import org.springframework.http.HttpHeaders;
|
||||
import org.springframework.http.HttpStatus;
|
||||
@ -410,8 +412,8 @@ class TomcatServletWebServerFactoryTests extends AbstractServletWebServerFactory
|
||||
TomcatServletWebServerFactory factory = getFactory();
|
||||
this.webServer = factory.getWebServer();
|
||||
// override defaults, see org.apache.catalina.util.CharsetMapperDefault.properties
|
||||
Properties charsetMapperDefault = new Properties();
|
||||
charsetMapperDefault.load(CharsetMapper.class.getResourceAsStream("CharsetMapperDefault.properties"));
|
||||
Properties charsetMapperDefault = PropertiesLoaderUtils
|
||||
.loadProperties(new ClassPathResource("CharsetMapperDefault.properties", CharsetMapper.class));
|
||||
for (String language : charsetMapperDefault.stringPropertyNames()) {
|
||||
assertThat(getCharset(new Locale(language))).isEqualTo(StandardCharsets.UTF_8);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user