From f5ef9b2cabbb96b67015d366be4636c41d7c98e2 Mon Sep 17 00:00:00 2001 From: tanghc Date: Wed, 14 Aug 2019 14:03:23 +0800 Subject: [PATCH 1/3] 1.15.0 --- .../configuration/BaseServiceConfiguration.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/sop-common/sop-service-common/src/main/java/com/gitee/sop/servercommon/configuration/BaseServiceConfiguration.java b/sop-common/sop-service-common/src/main/java/com/gitee/sop/servercommon/configuration/BaseServiceConfiguration.java index 6648e81e..d2a5f254 100644 --- a/sop-common/sop-service-common/src/main/java/com/gitee/sop/servercommon/configuration/BaseServiceConfiguration.java +++ b/sop-common/sop-service-common/src/main/java/com/gitee/sop/servercommon/configuration/BaseServiceConfiguration.java @@ -48,9 +48,17 @@ public class BaseServiceConfiguration extends WebMvcConfigurationSupport super.addInterceptors(registry); } - @Override + /*@Override protected void configureMessageConverters(List> converters) { + converters.add(new StringHttpMessageConverter(StandardCharsets.UTF_8)); + }*/ + + @Override + protected void extendMessageConverters(List> converters) { // 解决controller返回字符串中文乱码问题 + // 移除老的 + //converters.removeIf(converter -> converter instanceof StringHttpMessageConverter); + // 添加信息的 converters.add(new StringHttpMessageConverter(StandardCharsets.UTF_8)); } From f56a1a025ea7305a71ce0d19e4bc24855720cfbc Mon Sep 17 00:00:00 2001 From: tanghc Date: Wed, 14 Aug 2019 14:14:12 +0800 Subject: [PATCH 2/3] 1.15.0 --- .../configuration/BaseServiceConfiguration.java | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/sop-common/sop-service-common/src/main/java/com/gitee/sop/servercommon/configuration/BaseServiceConfiguration.java b/sop-common/sop-service-common/src/main/java/com/gitee/sop/servercommon/configuration/BaseServiceConfiguration.java index d2a5f254..70870e83 100644 --- a/sop-common/sop-service-common/src/main/java/com/gitee/sop/servercommon/configuration/BaseServiceConfiguration.java +++ b/sop-common/sop-service-common/src/main/java/com/gitee/sop/servercommon/configuration/BaseServiceConfiguration.java @@ -48,18 +48,14 @@ public class BaseServiceConfiguration extends WebMvcConfigurationSupport super.addInterceptors(registry); } - /*@Override - protected void configureMessageConverters(List> converters) { - converters.add(new StringHttpMessageConverter(StandardCharsets.UTF_8)); - }*/ - @Override protected void extendMessageConverters(List> converters) { // 解决controller返回字符串中文乱码问题 - // 移除老的 - //converters.removeIf(converter -> converter instanceof StringHttpMessageConverter); - // 添加信息的 - converters.add(new StringHttpMessageConverter(StandardCharsets.UTF_8)); + for (HttpMessageConverter converter : converters) { + if (converter instanceof StringHttpMessageConverter) { + ((StringHttpMessageConverter)converter).setDefaultCharset(StandardCharsets.UTF_8); + } + } } /** From b68663b995c1d4191d4909b7671fd299b0b357c9 Mon Sep 17 00:00:00 2001 From: tanghc Date: Wed, 14 Aug 2019 14:15:18 +0800 Subject: [PATCH 3/3] 1.15.1 --- sop-admin/sop-admin-server/pom.xml | 2 +- sop-common/pom.xml | 2 +- sop-common/sop-gateway-common/pom.xml | 4 ++-- sop-common/sop-registry-api/pom.xml | 2 +- sop-common/sop-service-common/pom.xml | 4 ++-- sop-example/sop-auth/pom.xml | 2 +- sop-example/sop-book/sop-book-web/pom.xml | 2 +- sop-example/sop-easyopen/pom.xml | 2 +- sop-example/sop-springmvc/pom.xml | 2 +- sop-example/sop-story/sop-story-web/pom.xml | 2 +- sop-gateway/pom.xml | 2 +- sop-website/website-server/pom.xml | 2 +- 12 files changed, 14 insertions(+), 14 deletions(-) diff --git a/sop-admin/sop-admin-server/pom.xml b/sop-admin/sop-admin-server/pom.xml index 0f992bb7..28e97af2 100644 --- a/sop-admin/sop-admin-server/pom.xml +++ b/sop-admin/sop-admin-server/pom.xml @@ -30,7 +30,7 @@ com.gitee.sop sop-registry-api - 1.15.0-SNAPSHOT + 1.15.1-SNAPSHOT diff --git a/sop-common/pom.xml b/sop-common/pom.xml index 97fbd1be..3812e07f 100644 --- a/sop-common/pom.xml +++ b/sop-common/pom.xml @@ -5,7 +5,7 @@ 4.0.0 com.gitee.sop sop-common - 1.15.0-SNAPSHOT + 1.15.1-SNAPSHOT pom diff --git a/sop-common/sop-gateway-common/pom.xml b/sop-common/sop-gateway-common/pom.xml index 48962395..01eb5160 100644 --- a/sop-common/sop-gateway-common/pom.xml +++ b/sop-common/sop-gateway-common/pom.xml @@ -5,11 +5,11 @@ com.gitee.sop sop-common - 1.15.0-SNAPSHOT + 1.15.1-SNAPSHOT ../pom.xml sop-gateway-common - 1.15.0-SNAPSHOT + 1.15.1-SNAPSHOT jar sop-gateway-common diff --git a/sop-common/sop-registry-api/pom.xml b/sop-common/sop-registry-api/pom.xml index a3179a33..167b691d 100644 --- a/sop-common/sop-registry-api/pom.xml +++ b/sop-common/sop-registry-api/pom.xml @@ -5,7 +5,7 @@ 4.0.0 com.gitee.sop sop-registry-api - 1.15.0-SNAPSHOT + 1.15.1-SNAPSHOT UTF-8 diff --git a/sop-common/sop-service-common/pom.xml b/sop-common/sop-service-common/pom.xml index bfaec2de..89b0d9eb 100644 --- a/sop-common/sop-service-common/pom.xml +++ b/sop-common/sop-service-common/pom.xml @@ -6,11 +6,11 @@ com.gitee.sop sop-common - 1.15.0-SNAPSHOT + 1.15.1-SNAPSHOT ../pom.xml sop-service-common - 1.15.0-SNAPSHOT + 1.15.1-SNAPSHOT jar sop-service-common diff --git a/sop-example/sop-auth/pom.xml b/sop-example/sop-auth/pom.xml index 0d8c980b..1f268e44 100644 --- a/sop-example/sop-auth/pom.xml +++ b/sop-example/sop-auth/pom.xml @@ -26,7 +26,7 @@ com.gitee.sop sop-service-common - 1.15.0-SNAPSHOT + 1.15.1-SNAPSHOT org.springframework.cloud diff --git a/sop-example/sop-book/sop-book-web/pom.xml b/sop-example/sop-book/sop-book-web/pom.xml index 695145b3..85f6dba6 100644 --- a/sop-example/sop-book/sop-book-web/pom.xml +++ b/sop-example/sop-book/sop-book-web/pom.xml @@ -24,7 +24,7 @@ com.gitee.sop sop-service-common - 1.15.0-SNAPSHOT + 1.15.1-SNAPSHOT com.gitee.sop diff --git a/sop-example/sop-easyopen/pom.xml b/sop-example/sop-easyopen/pom.xml index 45f84392..b6fd5e41 100644 --- a/sop-example/sop-easyopen/pom.xml +++ b/sop-example/sop-easyopen/pom.xml @@ -29,7 +29,7 @@ com.gitee.sop sop-service-common - 1.15.0-SNAPSHOT + 1.15.1-SNAPSHOT org.springframework.cloud diff --git a/sop-example/sop-springmvc/pom.xml b/sop-example/sop-springmvc/pom.xml index 82467950..a318d6e0 100644 --- a/sop-example/sop-springmvc/pom.xml +++ b/sop-example/sop-springmvc/pom.xml @@ -20,7 +20,7 @@ com.gitee.sop sop-service-common - 1.15.0-SNAPSHOT + 1.15.1-SNAPSHOT diff --git a/sop-example/sop-story/sop-story-web/pom.xml b/sop-example/sop-story/sop-story-web/pom.xml index 99177722..d5310183 100644 --- a/sop-example/sop-story/sop-story-web/pom.xml +++ b/sop-example/sop-story/sop-story-web/pom.xml @@ -24,7 +24,7 @@ com.gitee.sop sop-service-common - 1.15.0-SNAPSHOT + 1.15.1-SNAPSHOT com.gitee.sop diff --git a/sop-gateway/pom.xml b/sop-gateway/pom.xml index a3b2ecf7..266f1753 100644 --- a/sop-gateway/pom.xml +++ b/sop-gateway/pom.xml @@ -23,7 +23,7 @@ com.gitee.sop sop-gateway-common - 1.15.0-SNAPSHOT + 1.15.1-SNAPSHOT diff --git a/sop-website/website-server/pom.xml b/sop-website/website-server/pom.xml index 827287db..45186dfc 100644 --- a/sop-website/website-server/pom.xml +++ b/sop-website/website-server/pom.xml @@ -25,7 +25,7 @@ com.gitee.sop sop-registry-api - 1.15.0-SNAPSHOT + 1.15.1-SNAPSHOT