JAVA 使用 XSLT页面乱码问题
解决办法:
创建配置类,重写configureMessageConverters方法,设定编码格式。
@Configuration
public class WebConfig extends WebMvcConfigurationSupport {
@Override
public void configurePathMatch(PathMatchConfigurer configurer) {
AntPathMatcher matcher = new AntPathMatcher();
//大小写敏感
matcher.setCaseSensitive(false);
configurer.setPathMatcher(matcher);
}
/**
* 包括静态资源路径
* @param registry
*/
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
registry.addResourceHandler("/**")
.addResourceLocations("classpath:/static/"