From 4131aa3653efc77622128b4444a2bd0d1063bb53 Mon Sep 17 00:00:00 2001 From: zhouhao Date: Tue, 4 Jan 2022 15:00:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../web/crud/web/CommonWebMvcConfiguration.java | 2 ++ .../web/crud/web/ResponseMessageWrapperAdvice.java | 1 - hsweb-core/pom.xml | 4 ++++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/hsweb-commons/hsweb-commons-crud/src/main/java/org/hswebframework/web/crud/web/CommonWebMvcConfiguration.java b/hsweb-commons/hsweb-commons-crud/src/main/java/org/hswebframework/web/crud/web/CommonWebMvcConfiguration.java index b310160e8..cb72e93e4 100644 --- a/hsweb-commons/hsweb-commons-crud/src/main/java/org/hswebframework/web/crud/web/CommonWebMvcConfiguration.java +++ b/hsweb-commons/hsweb-commons-crud/src/main/java/org/hswebframework/web/crud/web/CommonWebMvcConfiguration.java @@ -1,5 +1,6 @@ package org.hswebframework.web.crud.web; +import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication; @@ -9,6 +10,7 @@ @Configuration @ConditionalOnWebApplication(type = ConditionalOnWebApplication.Type.SERVLET) +@ConditionalOnClass(org.springframework.web.servlet.mvc.method.annotation.ResponseBodyAdvice.class) public class CommonWebMvcConfiguration { @Bean diff --git a/hsweb-commons/hsweb-commons-crud/src/main/java/org/hswebframework/web/crud/web/ResponseMessageWrapperAdvice.java b/hsweb-commons/hsweb-commons-crud/src/main/java/org/hswebframework/web/crud/web/ResponseMessageWrapperAdvice.java index 8728f13cf..b57bcc504 100644 --- a/hsweb-commons/hsweb-commons-crud/src/main/java/org/hswebframework/web/crud/web/ResponseMessageWrapperAdvice.java +++ b/hsweb-commons/hsweb-commons-crud/src/main/java/org/hswebframework/web/crud/web/ResponseMessageWrapperAdvice.java @@ -13,7 +13,6 @@ import org.springframework.http.server.ServerHttpResponse; import org.springframework.util.CollectionUtils; import org.springframework.util.MimeType; -import org.springframework.web.bind.annotation.ControllerAdvice; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestControllerAdvice; import org.springframework.web.servlet.mvc.method.annotation.ResponseBodyAdvice; diff --git a/hsweb-core/pom.xml b/hsweb-core/pom.xml index 4dfe92bb4..a45bbb244 100644 --- a/hsweb-core/pom.xml +++ b/hsweb-core/pom.xml @@ -20,18 +20,22 @@ javassist 3.28.0-GA + com.fasterxml.jackson.core jackson-databind + org.hswebframework hsweb-utils + org.springframework spring-context + org.springframework spring-web