Commit 2eef021d2358a98b4ab47f88df8b31f5415025bb
Committed by
Gitee
!4 引入 swagger-annotations 1.5.22 排除knife4j3.0.2 中 swagger-annotations 解决依赖冲突
Merge pull request !4 from niu_dehua/unit_system_dept
Showing
10 changed files
with
25 additions
and
13 deletions
pom.xml
| @@ -2,7 +2,7 @@ | @@ -2,7 +2,7 @@ | ||
| 2 | <project xmlns="http://maven.apache.org/POM/4.0.0" | 2 | <project xmlns="http://maven.apache.org/POM/4.0.0" |
| 3 | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | 3 | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 4 | xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | 4 | xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
| 5 | - <modelVersion>4.0.0</modelVersion> | 5 | + <modelVersion>4.0.0</modelVersion> |
| 6 | 6 | ||
| 7 | <groupId>cn.iocoder</groupId> | 7 | <groupId>cn.iocoder</groupId> |
| 8 | <artifactId>dashboard</artifactId> | 8 | <artifactId>dashboard</artifactId> |
| @@ -25,6 +25,7 @@ | @@ -25,6 +25,7 @@ | ||
| 25 | <spring.boot.version>2.4.2</spring.boot.version> | 25 | <spring.boot.version>2.4.2</spring.boot.version> |
| 26 | <!-- Web 相关 --> | 26 | <!-- Web 相关 --> |
| 27 | <knife4j.version>3.0.2</knife4j.version> | 27 | <knife4j.version>3.0.2</knife4j.version> |
| 28 | + <swagger-annotations.version>1.5.22</swagger-annotations.version> | ||
| 28 | <!-- DB 相关 --> | 29 | <!-- DB 相关 --> |
| 29 | <mysql-connector-java.version>5.1.46</mysql-connector-java.version> | 30 | <mysql-connector-java.version>5.1.46</mysql-connector-java.version> |
| 30 | <druid.version>1.2.4</druid.version> | 31 | <druid.version>1.2.4</druid.version> |
| @@ -104,8 +105,17 @@ | @@ -104,8 +105,17 @@ | ||
| 104 | <artifactId>guava</artifactId> | 105 | <artifactId>guava</artifactId> |
| 105 | <groupId>com.google.guava</groupId> | 106 | <groupId>com.google.guava</groupId> |
| 106 | </exclusion> | 107 | </exclusion> |
| 108 | + <exclusion> | ||
| 109 | + <artifactId>swagger-annotations</artifactId> | ||
| 110 | + <groupId>io.swagger</groupId> | ||
| 111 | + </exclusion> | ||
| 107 | </exclusions> | 112 | </exclusions> |
| 108 | </dependency> | 113 | </dependency> |
| 114 | + <dependency> | ||
| 115 | + <groupId>io.swagger</groupId> | ||
| 116 | + <artifactId>swagger-annotations</artifactId> | ||
| 117 | + <version>${swagger-annotations.version}</version> | ||
| 118 | + </dependency> | ||
| 109 | 119 | ||
| 110 | <!-- DB 相关 --> | 120 | <!-- DB 相关 --> |
| 111 | <dependency> | 121 | <dependency> |
src/main/java/cn/iocoder/dashboard/framework/swagger/config/SwaggerAutoConfiguration.java
| @@ -10,15 +10,17 @@ import org.springframework.context.annotation.Configuration; | @@ -10,15 +10,17 @@ import org.springframework.context.annotation.Configuration; | ||
| 10 | import org.springframework.http.HttpHeaders; | 10 | import org.springframework.http.HttpHeaders; |
| 11 | import springfox.documentation.builders.ApiInfoBuilder; | 11 | import springfox.documentation.builders.ApiInfoBuilder; |
| 12 | import springfox.documentation.builders.PathSelectors; | 12 | import springfox.documentation.builders.PathSelectors; |
| 13 | -import springfox.documentation.service.*; | 13 | +import springfox.documentation.service.ApiInfo; |
| 14 | +import springfox.documentation.service.ApiKey; | ||
| 15 | +import springfox.documentation.service.AuthorizationScope; | ||
| 16 | +import springfox.documentation.service.Contact; | ||
| 17 | +import springfox.documentation.service.SecurityReference; | ||
| 18 | +import springfox.documentation.service.SecurityScheme; | ||
| 14 | import springfox.documentation.spi.DocumentationType; | 19 | import springfox.documentation.spi.DocumentationType; |
| 15 | import springfox.documentation.spi.service.contexts.SecurityContext; | 20 | import springfox.documentation.spi.service.contexts.SecurityContext; |
| 16 | import springfox.documentation.spring.web.plugins.Docket; | 21 | import springfox.documentation.spring.web.plugins.Docket; |
| 17 | import springfox.documentation.swagger2.annotations.EnableSwagger2; | 22 | import springfox.documentation.swagger2.annotations.EnableSwagger2; |
| 18 | -import springfox.documentation.service.ApiKey; | ||
| 19 | 23 | ||
| 20 | -import java.util.ArrayList; | ||
| 21 | -import java.util.Arrays; | ||
| 22 | import java.util.Collections; | 24 | import java.util.Collections; |
| 23 | import java.util.List; | 25 | import java.util.List; |
| 24 | 26 |
src/main/java/cn/iocoder/dashboard/modules/system/controller/dept/vo/dept/SysDeptBaseVO.java
| @@ -26,7 +26,7 @@ public class SysDeptBaseVO { | @@ -26,7 +26,7 @@ public class SysDeptBaseVO { | ||
| 26 | 26 | ||
| 27 | @ApiModelProperty(value = "显示顺序不能为空", required = true, example = "1024") | 27 | @ApiModelProperty(value = "显示顺序不能为空", required = true, example = "1024") |
| 28 | @NotBlank(message = "显示顺序不能为空") | 28 | @NotBlank(message = "显示顺序不能为空") |
| 29 | - private String sort; | 29 | + private Integer sort; |
| 30 | 30 | ||
| 31 | @ApiModelProperty(value = "负责人", example = "芋道") | 31 | @ApiModelProperty(value = "负责人", example = "芋道") |
| 32 | private String leader; | 32 | private String leader; |
src/main/java/cn/iocoder/dashboard/modules/system/controller/dept/vo/post/SysPostBaseVO.java
| @@ -25,7 +25,7 @@ public class SysPostBaseVO { | @@ -25,7 +25,7 @@ public class SysPostBaseVO { | ||
| 25 | 25 | ||
| 26 | @ApiModelProperty(value = "显示顺序不能为空", required = true, example = "1024") | 26 | @ApiModelProperty(value = "显示顺序不能为空", required = true, example = "1024") |
| 27 | @NotBlank(message = "显示顺序不能为空") | 27 | @NotBlank(message = "显示顺序不能为空") |
| 28 | - private String sort; | 28 | + private Integer sort; |
| 29 | 29 | ||
| 30 | @ApiModelProperty(value = "状态", required = true, example = "1", notes = "参见 SysCommonStatusEnum 枚举类") | 30 | @ApiModelProperty(value = "状态", required = true, example = "1", notes = "参见 SysCommonStatusEnum 枚举类") |
| 31 | private Integer status; | 31 | private Integer status; |
src/main/java/cn/iocoder/dashboard/modules/system/controller/dept/vo/post/SysPostExcelVO.java
| @@ -23,7 +23,7 @@ public class SysPostExcelVO { | @@ -23,7 +23,7 @@ public class SysPostExcelVO { | ||
| 23 | private String name; | 23 | private String name; |
| 24 | 24 | ||
| 25 | @ExcelProperty("岗位排序") | 25 | @ExcelProperty("岗位排序") |
| 26 | - private String sort; | 26 | + private Integer sort; |
| 27 | 27 | ||
| 28 | @ExcelProperty(value = "状态", converter = DictConvert.class) | 28 | @ExcelProperty(value = "状态", converter = DictConvert.class) |
| 29 | @DictFormat(SYS_COMMON_STATUS) | 29 | @DictFormat(SYS_COMMON_STATUS) |
src/main/java/cn/iocoder/dashboard/modules/system/controller/permission/vo/menu/SysMenuBaseVO.java
| @@ -29,7 +29,7 @@ public class SysMenuBaseVO { | @@ -29,7 +29,7 @@ public class SysMenuBaseVO { | ||
| 29 | 29 | ||
| 30 | @ApiModelProperty(value = "显示顺序不能为空", required = true, example = "1024") | 30 | @ApiModelProperty(value = "显示顺序不能为空", required = true, example = "1024") |
| 31 | @NotBlank(message = "显示顺序不能为空") | 31 | @NotBlank(message = "显示顺序不能为空") |
| 32 | - private String sort; | 32 | + private Integer sort; |
| 33 | 33 | ||
| 34 | @ApiModelProperty(value = "父菜单 ID", required = true, example = "1024") | 34 | @ApiModelProperty(value = "父菜单 ID", required = true, example = "1024") |
| 35 | @NotNull(message = "父菜单 ID 不能为空") | 35 | @NotNull(message = "父菜单 ID 不能为空") |
src/main/java/cn/iocoder/dashboard/modules/system/controller/permission/vo/role/SysRoleBaseVO.java
| @@ -25,7 +25,7 @@ public class SysRoleBaseVO { | @@ -25,7 +25,7 @@ public class SysRoleBaseVO { | ||
| 25 | 25 | ||
| 26 | @ApiModelProperty(value = "显示顺序不能为空", required = true, example = "1024") | 26 | @ApiModelProperty(value = "显示顺序不能为空", required = true, example = "1024") |
| 27 | @NotBlank(message = "显示顺序不能为空") | 27 | @NotBlank(message = "显示顺序不能为空") |
| 28 | - private String sort; | 28 | + private Integer sort; |
| 29 | 29 | ||
| 30 | @ApiModelProperty(value = "角色类型", required = true, example = "1", notes = "见 SysRoleTypeEnum 枚举") | 30 | @ApiModelProperty(value = "角色类型", required = true, example = "1", notes = "见 SysRoleTypeEnum 枚举") |
| 31 | private Integer type; | 31 | private Integer type; |
src/main/java/cn/iocoder/dashboard/modules/system/dal/dataobject/dept/SysDeptDO.java
src/main/java/cn/iocoder/dashboard/modules/system/dal/dataobject/dept/SysPostDO.java
src/main/java/cn/iocoder/dashboard/modules/system/dal/dataobject/permission/SysMenuDO.java