mirror of
https://gitee.com/durcframework/SOP.git
synced 2025-08-12 07:02:14 +08:00
1.15.0
This commit is contained in:
@@ -48,18 +48,14 @@ public class BaseServiceConfiguration extends WebMvcConfigurationSupport
|
|||||||
super.addInterceptors(registry);
|
super.addInterceptors(registry);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*@Override
|
|
||||||
protected void configureMessageConverters(List<HttpMessageConverter<?>> converters) {
|
|
||||||
converters.add(new StringHttpMessageConverter(StandardCharsets.UTF_8));
|
|
||||||
}*/
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void extendMessageConverters(List<HttpMessageConverter<?>> converters) {
|
protected void extendMessageConverters(List<HttpMessageConverter<?>> converters) {
|
||||||
// 解决controller返回字符串中文乱码问题
|
// 解决controller返回字符串中文乱码问题
|
||||||
// 移除老的
|
for (HttpMessageConverter<?> converter : converters) {
|
||||||
//converters.removeIf(converter -> converter instanceof StringHttpMessageConverter);
|
if (converter instanceof StringHttpMessageConverter) {
|
||||||
// 添加信息的
|
((StringHttpMessageConverter)converter).setDefaultCharset(StandardCharsets.UTF_8);
|
||||||
converters.add(new StringHttpMessageConverter(StandardCharsets.UTF_8));
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user