Skip to content

Commit ba23e55

Browse files
committed
1.3.0 增加JSR 303校验支持
1 parent 4bd4002 commit ba23e55

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

pom.xml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>com.didispace</groupId>
88
<artifactId>spring-boot-starter-swagger</artifactId>
9-
<version>1.2.0.RELEASE</version>
9+
<version>1.3.0.SNAPSHOT</version>
1010

1111
<name>spring-boot-starter-swagger</name>
1212
<url>https://github.com/dyc87112/spring-boot-starter-swagger</url>
@@ -68,6 +68,11 @@
6868
<artifactId>springfox-swagger2</artifactId>
6969
<version>${version.swagger}</version>
7070
</dependency>
71+
<dependency>
72+
<groupId>io.springfox</groupId>
73+
<artifactId>springfox-bean-validators</artifactId>
74+
<version>${version.swagger}</version>
75+
</dependency>
7176
<dependency>
7277
<groupId>org.projectlombok</groupId>
7378
<artifactId>lombok</artifactId>

src/main/java/com/didispace/swagger/EnableSwagger2Doc.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package com.didispace.swagger;
22

33
import org.springframework.context.annotation.Import;
4+
import springfox.bean.validators.configuration.BeanValidatorPluginsConfiguration;
45
import springfox.documentation.swagger2.annotations.EnableSwagger2;
56

67
import java.lang.annotation.*;
@@ -15,7 +16,7 @@
1516
@Documented
1617
@Inherited
1718
@EnableSwagger2
18-
@Import(SwaggerAutoConfiguration.class)
19+
@Import({SwaggerAutoConfiguration.class, BeanValidatorPluginsConfiguration.class})
1920
public @interface EnableSwagger2Doc {
2021

2122

0 commit comments

Comments
 (0)