Skip to content

Commit 4131aa3

Browse files
committed
优化配置
1 parent 7846812 commit 4131aa3

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

hsweb-commons/hsweb-commons-crud/src/main/java/org/hswebframework/web/crud/web/CommonWebMvcConfiguration.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package org.hswebframework.web.crud.web;
22

3+
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
34
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
45
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
56
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
@@ -9,6 +10,7 @@
910

1011
@Configuration
1112
@ConditionalOnWebApplication(type = ConditionalOnWebApplication.Type.SERVLET)
13+
@ConditionalOnClass(org.springframework.web.servlet.mvc.method.annotation.ResponseBodyAdvice.class)
1214
public class CommonWebMvcConfiguration {
1315

1416
@Bean

hsweb-commons/hsweb-commons-crud/src/main/java/org/hswebframework/web/crud/web/ResponseMessageWrapperAdvice.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
import org.springframework.http.server.ServerHttpResponse;
1414
import org.springframework.util.CollectionUtils;
1515
import org.springframework.util.MimeType;
16-
import org.springframework.web.bind.annotation.ControllerAdvice;
1716
import org.springframework.web.bind.annotation.RequestMapping;
1817
import org.springframework.web.bind.annotation.RestControllerAdvice;
1918
import org.springframework.web.servlet.mvc.method.annotation.ResponseBodyAdvice;

hsweb-core/pom.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,22 @@
2020
<artifactId>javassist</artifactId>
2121
<version>3.28.0-GA</version>
2222
</dependency>
23+
2324
<dependency>
2425
<groupId>com.fasterxml.jackson.core</groupId>
2526
<artifactId>jackson-databind</artifactId>
2627
</dependency>
28+
2729
<dependency>
2830
<groupId>org.hswebframework</groupId>
2931
<artifactId>hsweb-utils</artifactId>
3032
</dependency>
33+
3134
<dependency>
3235
<groupId>org.springframework</groupId>
3336
<artifactId>spring-context</artifactId>
3437
</dependency>
38+
3539
<dependency>
3640
<groupId>org.springframework</groupId>
3741
<artifactId>spring-web</artifactId>

0 commit comments

Comments
 (0)