use of org.springframework.boot.web.servlet.filter.OrderedCharacterEncodingFilter in project spring-boot by spring-projects.
the class HttpEncodingAutoConfiguration method characterEncodingFilter.
@Bean
@ConditionalOnMissingBean(CharacterEncodingFilter.class)
public CharacterEncodingFilter characterEncodingFilter() {
CharacterEncodingFilter filter = new OrderedCharacterEncodingFilter();
filter.setEncoding(this.properties.getCharset().name());
filter.setForceRequestEncoding(this.properties.shouldForce(Type.REQUEST));
filter.setForceResponseEncoding(this.properties.shouldForce(Type.RESPONSE));
return filter;
}
Aggregations