!4 引入 swagger-annotations 1.5.22 排除knife4j3.0.2 中 swagger-annotations 解决依赖冲突

Merge pull request !4 from niu_dehua/unit_system_dept
This commit is contained in:
芋道源码 2021-03-08 13:08:32 +08:00 committed by Gitee
commit 2eef021d23
10 changed files with 25 additions and 13 deletions

12
pom.xml
View File

@ -2,7 +2,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" <project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>cn.iocoder</groupId> <groupId>cn.iocoder</groupId>
<artifactId>dashboard</artifactId> <artifactId>dashboard</artifactId>
@ -25,6 +25,7 @@
<spring.boot.version>2.4.2</spring.boot.version> <spring.boot.version>2.4.2</spring.boot.version>
<!-- Web 相关 --> <!-- Web 相关 -->
<knife4j.version>3.0.2</knife4j.version> <knife4j.version>3.0.2</knife4j.version>
<swagger-annotations.version>1.5.22</swagger-annotations.version>
<!-- DB 相关 --> <!-- DB 相关 -->
<mysql-connector-java.version>5.1.46</mysql-connector-java.version> <mysql-connector-java.version>5.1.46</mysql-connector-java.version>
<druid.version>1.2.4</druid.version> <druid.version>1.2.4</druid.version>
@ -104,8 +105,17 @@
<artifactId>guava</artifactId> <artifactId>guava</artifactId>
<groupId>com.google.guava</groupId> <groupId>com.google.guava</groupId>
</exclusion> </exclusion>
<exclusion>
<artifactId>swagger-annotations</artifactId>
<groupId>io.swagger</groupId>
</exclusion>
</exclusions> </exclusions>
</dependency> </dependency>
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-annotations</artifactId>
<version>${swagger-annotations.version}</version>
</dependency>
<!-- DB 相关 --> <!-- DB 相关 -->
<dependency> <dependency>

View File

@ -10,15 +10,17 @@ import org.springframework.context.annotation.Configuration;
import org.springframework.http.HttpHeaders; import org.springframework.http.HttpHeaders;
import springfox.documentation.builders.ApiInfoBuilder; import springfox.documentation.builders.ApiInfoBuilder;
import springfox.documentation.builders.PathSelectors; import springfox.documentation.builders.PathSelectors;
import springfox.documentation.service.*; import springfox.documentation.service.ApiInfo;
import springfox.documentation.service.ApiKey;
import springfox.documentation.service.AuthorizationScope;
import springfox.documentation.service.Contact;
import springfox.documentation.service.SecurityReference;
import springfox.documentation.service.SecurityScheme;
import springfox.documentation.spi.DocumentationType; import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spi.service.contexts.SecurityContext; import springfox.documentation.spi.service.contexts.SecurityContext;
import springfox.documentation.spring.web.plugins.Docket; import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.swagger2.annotations.EnableSwagger2; import springfox.documentation.swagger2.annotations.EnableSwagger2;
import springfox.documentation.service.ApiKey;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections; import java.util.Collections;
import java.util.List; import java.util.List;

View File

@ -26,7 +26,7 @@ public class SysDeptBaseVO {
@ApiModelProperty(value = "显示顺序不能为空", required = true, example = "1024") @ApiModelProperty(value = "显示顺序不能为空", required = true, example = "1024")
@NotBlank(message = "显示顺序不能为空") @NotBlank(message = "显示顺序不能为空")
private String sort; private Integer sort;
@ApiModelProperty(value = "负责人", example = "芋道") @ApiModelProperty(value = "负责人", example = "芋道")
private String leader; private String leader;

View File

@ -25,7 +25,7 @@ public class SysPostBaseVO {
@ApiModelProperty(value = "显示顺序不能为空", required = true, example = "1024") @ApiModelProperty(value = "显示顺序不能为空", required = true, example = "1024")
@NotBlank(message = "显示顺序不能为空") @NotBlank(message = "显示顺序不能为空")
private String sort; private Integer sort;
@ApiModelProperty(value = "状态", required = true, example = "1", notes = "参见 SysCommonStatusEnum 枚举类") @ApiModelProperty(value = "状态", required = true, example = "1", notes = "参见 SysCommonStatusEnum 枚举类")
private Integer status; private Integer status;

View File

@ -23,7 +23,7 @@ public class SysPostExcelVO {
private String name; private String name;
@ExcelProperty("岗位排序") @ExcelProperty("岗位排序")
private String sort; private Integer sort;
@ExcelProperty(value = "状态", converter = DictConvert.class) @ExcelProperty(value = "状态", converter = DictConvert.class)
@DictFormat(SYS_COMMON_STATUS) @DictFormat(SYS_COMMON_STATUS)

View File

@ -29,7 +29,7 @@ public class SysMenuBaseVO {
@ApiModelProperty(value = "显示顺序不能为空", required = true, example = "1024") @ApiModelProperty(value = "显示顺序不能为空", required = true, example = "1024")
@NotBlank(message = "显示顺序不能为空") @NotBlank(message = "显示顺序不能为空")
private String sort; private Integer sort;
@ApiModelProperty(value = "父菜单 ID", required = true, example = "1024") @ApiModelProperty(value = "父菜单 ID", required = true, example = "1024")
@NotNull(message = "父菜单 ID 不能为空") @NotNull(message = "父菜单 ID 不能为空")

View File

@ -25,7 +25,7 @@ public class SysRoleBaseVO {
@ApiModelProperty(value = "显示顺序不能为空", required = true, example = "1024") @ApiModelProperty(value = "显示顺序不能为空", required = true, example = "1024")
@NotBlank(message = "显示顺序不能为空") @NotBlank(message = "显示顺序不能为空")
private String sort; private Integer sort;
@ApiModelProperty(value = "角色类型", required = true, example = "1", notes = "见 SysRoleTypeEnum 枚举") @ApiModelProperty(value = "角色类型", required = true, example = "1", notes = "见 SysRoleTypeEnum 枚举")
private Integer type; private Integer type;

View File

@ -35,7 +35,7 @@ public class SysDeptDO extends BaseDO {
/** /**
* 显示顺序 * 显示顺序
*/ */
private String sort; private Integer sort;
/** /**
* 负责人 * 负责人
*/ */

View File

@ -34,7 +34,7 @@ public class SysPostDO extends BaseDO {
/** /**
* 岗位排序 * 岗位排序
*/ */
private String sort; private Integer sort;
/** /**
* 状态 * 状态
* *

View File

@ -49,7 +49,7 @@ public class SysMenuDO extends BaseDO {
/** /**
* 显示顺序 * 显示顺序
*/ */
private String sort; private Integer sort;
/** /**
* 父菜单ID * 父菜单ID
*/ */