From 19924cd184908cbca2f7e8670ed5a5dfb88aac01 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Thu, 3 Jun 2021 13:24:29 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=85=B3=E9=97=ADconfirm?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=E6=A1=86=E6=8E=A7=E5=88=B6=E5=8F=B0=E6=8A=A5?= =?UTF-8?q?=E9=94=99=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-generator/src/main/resources/vm/vue/index-tree.vue.vm | 2 +- ruoyi-generator/src/main/resources/vm/vue/index.vue.vm | 4 ++-- ruoyi-ui/src/layout/components/Navbar.vue | 2 +- ruoyi-ui/src/utils/request.js | 2 +- ruoyi-ui/src/views/monitor/job/index.vue | 6 +++--- ruoyi-ui/src/views/monitor/job/log.vue | 6 +++--- ruoyi-ui/src/views/monitor/logininfor/index.vue | 6 +++--- ruoyi-ui/src/views/monitor/online/index.vue | 2 +- ruoyi-ui/src/views/monitor/operlog/index.vue | 6 +++--- ruoyi-ui/src/views/system/config/index.vue | 4 ++-- ruoyi-ui/src/views/system/dept/index.vue | 2 +- ruoyi-ui/src/views/system/dict/data.vue | 4 ++-- ruoyi-ui/src/views/system/dict/index.vue | 4 ++-- ruoyi-ui/src/views/system/menu/index.vue | 4 ++-- ruoyi-ui/src/views/system/notice/index.vue | 2 +- ruoyi-ui/src/views/system/post/index.vue | 4 ++-- ruoyi-ui/src/views/system/role/index.vue | 4 ++-- ruoyi-ui/src/views/system/user/index.vue | 4 ++-- ruoyi-ui/src/views/tool/gen/index.vue | 4 ++-- 19 files changed, 36 insertions(+), 36 deletions(-) diff --git a/ruoyi-generator/src/main/resources/vm/vue/index-tree.vue.vm b/ruoyi-generator/src/main/resources/vm/vue/index-tree.vue.vm index 6d67c2e0..ab870681 100644 --- a/ruoyi-generator/src/main/resources/vm/vue/index-tree.vue.vm +++ b/ruoyi-generator/src/main/resources/vm/vue/index-tree.vue.vm @@ -532,7 +532,7 @@ export default { }).then(() => { this.getList(); this.msgSuccess("删除成功"); - }) + }).catch(() => {}); } } }; diff --git a/ruoyi-generator/src/main/resources/vm/vue/index.vue.vm b/ruoyi-generator/src/main/resources/vm/vue/index.vue.vm index 501f2f63..9fd6adf5 100644 --- a/ruoyi-generator/src/main/resources/vm/vue/index.vue.vm +++ b/ruoyi-generator/src/main/resources/vm/vue/index.vue.vm @@ -590,7 +590,7 @@ export default { }).then(() => { this.getList(); this.msgSuccess("删除成功"); - }) + }).catch(() => {}); }, #if($table.sub) /** ${subTable.functionName}序号 */ @@ -639,7 +639,7 @@ export default { }).then(response => { this.download(response.msg); this.exportLoading = false; - }) + }).catch(() => {}); } } }; diff --git a/ruoyi-ui/src/layout/components/Navbar.vue b/ruoyi-ui/src/layout/components/Navbar.vue index 18c89a0e..67a53ab6 100644 --- a/ruoyi-ui/src/layout/components/Navbar.vue +++ b/ruoyi-ui/src/layout/components/Navbar.vue @@ -104,7 +104,7 @@ export default { this.$store.dispatch('LogOut').then(() => { location.href = '/index'; }) - }) + }).catch(() => {}); } } } diff --git a/ruoyi-ui/src/utils/request.js b/ruoyi-ui/src/utils/request.js index ae89f24d..a510d2da 100644 --- a/ruoyi-ui/src/utils/request.js +++ b/ruoyi-ui/src/utils/request.js @@ -63,7 +63,7 @@ service.interceptors.response.use(res => { store.dispatch('LogOut').then(() => { location.href = '/index'; }) - }) + }).catch(() => {}); } else if (code === 500) { Message({ message: msg, diff --git a/ruoyi-ui/src/views/monitor/job/index.vue b/ruoyi-ui/src/views/monitor/job/index.vue index 30115e33..c8fcd6dc 100644 --- a/ruoyi-ui/src/views/monitor/job/index.vue +++ b/ruoyi-ui/src/views/monitor/job/index.vue @@ -410,7 +410,7 @@ export default { return runJob(row.jobId, row.jobGroup); }).then(() => { this.msgSuccess("执行成功"); - }) + }).catch(() => {}); }, /** 任务详细信息 */ handleView(row) { @@ -471,7 +471,7 @@ export default { }).then(() => { this.getList(); this.msgSuccess("删除成功"); - }) + }).catch(() => {}); }, /** 导出按钮操作 */ handleExport() { @@ -486,7 +486,7 @@ export default { }).then(response => { this.download(response.msg); this.exportLoading = false; - }) + }).catch(() => {}); } } }; diff --git a/ruoyi-ui/src/views/monitor/job/log.vue b/ruoyi-ui/src/views/monitor/job/log.vue index 121dde82..fa5976fe 100644 --- a/ruoyi-ui/src/views/monitor/job/log.vue +++ b/ruoyi-ui/src/views/monitor/job/log.vue @@ -269,7 +269,7 @@ export default { }).then(() => { this.getList(); this.msgSuccess("删除成功"); - }) + }).catch(() => {}); }, /** 清空按钮操作 */ handleClean() { @@ -282,7 +282,7 @@ export default { }).then(() => { this.getList(); this.msgSuccess("清空成功"); - }) + }).catch(() => {}); }, /** 导出按钮操作 */ handleExport() { @@ -297,7 +297,7 @@ export default { }).then(response => { this.download(response.msg); this.exportLoading = false; - }) + }).catch(() => {}); } } }; diff --git a/ruoyi-ui/src/views/monitor/logininfor/index.vue b/ruoyi-ui/src/views/monitor/logininfor/index.vue index 4ac9a78d..c6b38c74 100644 --- a/ruoyi-ui/src/views/monitor/logininfor/index.vue +++ b/ruoyi-ui/src/views/monitor/logininfor/index.vue @@ -202,7 +202,7 @@ export default { }).then(() => { this.getList(); this.msgSuccess("删除成功"); - }) + }).catch(() => {}); }, /** 清空按钮操作 */ handleClean() { @@ -215,7 +215,7 @@ export default { }).then(() => { this.getList(); this.msgSuccess("清空成功"); - }) + }).catch(() => {}); }, /** 导出按钮操作 */ handleExport() { @@ -230,7 +230,7 @@ export default { }).then(response => { this.download(response.msg); this.exportLoading = false; - }) + }).catch(() => {}); } } }; diff --git a/ruoyi-ui/src/views/monitor/online/index.vue b/ruoyi-ui/src/views/monitor/online/index.vue index 4233de5c..baec6e0b 100644 --- a/ruoyi-ui/src/views/monitor/online/index.vue +++ b/ruoyi-ui/src/views/monitor/online/index.vue @@ -120,7 +120,7 @@ export default { }).then(() => { this.getList(); this.msgSuccess("强退成功"); - }) + }).catch(() => {}); } } }; diff --git a/ruoyi-ui/src/views/monitor/operlog/index.vue b/ruoyi-ui/src/views/monitor/operlog/index.vue index d1505c66..7909c851 100644 --- a/ruoyi-ui/src/views/monitor/operlog/index.vue +++ b/ruoyi-ui/src/views/monitor/operlog/index.vue @@ -290,7 +290,7 @@ export default { }).then(() => { this.getList(); this.msgSuccess("删除成功"); - }) + }).catch(() => {}); }, /** 清空按钮操作 */ handleClean() { @@ -303,7 +303,7 @@ export default { }).then(() => { this.getList(); this.msgSuccess("清空成功"); - }) + }).catch(() => {}); }, /** 导出按钮操作 */ handleExport() { @@ -318,7 +318,7 @@ export default { }).then(response => { this.download(response.msg); this.exportLoading = false; - }) + }).catch(() => {}); } } }; diff --git a/ruoyi-ui/src/views/system/config/index.vue b/ruoyi-ui/src/views/system/config/index.vue index d6275f53..d942f8ff 100644 --- a/ruoyi-ui/src/views/system/config/index.vue +++ b/ruoyi-ui/src/views/system/config/index.vue @@ -338,7 +338,7 @@ export default { }).then(() => { this.getList(); this.msgSuccess("删除成功"); - }) + }).catch(() => {}); }, /** 导出按钮操作 */ handleExport() { @@ -353,7 +353,7 @@ export default { }).then(response => { this.download(response.msg); this.exportLoading = false; - }) + }).catch(() => {}); }, /** 刷新缓存按钮操作 */ handleRefreshCache() { diff --git a/ruoyi-ui/src/views/system/dept/index.vue b/ruoyi-ui/src/views/system/dept/index.vue index 98d57fb3..2d58f642 100644 --- a/ruoyi-ui/src/views/system/dept/index.vue +++ b/ruoyi-ui/src/views/system/dept/index.vue @@ -310,7 +310,7 @@ export default { }).then(() => { this.getList(); this.msgSuccess("删除成功"); - }) + }).catch(() => {}); } } }; diff --git a/ruoyi-ui/src/views/system/dict/data.vue b/ruoyi-ui/src/views/system/dict/data.vue index 720ed7e7..4b5dd29e 100644 --- a/ruoyi-ui/src/views/system/dict/data.vue +++ b/ruoyi-ui/src/views/system/dict/data.vue @@ -337,7 +337,7 @@ export default { }).then(() => { this.getList(); this.msgSuccess("删除成功"); - }) + }).catch(() => {}); }, /** 导出按钮操作 */ handleExport() { @@ -352,7 +352,7 @@ export default { }).then(response => { this.download(response.msg); this.exportLoading = false; - }) + }).catch(() => {}); } } }; diff --git a/ruoyi-ui/src/views/system/dict/index.vue b/ruoyi-ui/src/views/system/dict/index.vue index 545912a2..a52df7bf 100644 --- a/ruoyi-ui/src/views/system/dict/index.vue +++ b/ruoyi-ui/src/views/system/dict/index.vue @@ -342,7 +342,7 @@ export default { }).then(() => { this.getList(); this.msgSuccess("删除成功"); - }) + }).catch(() => {}); }, /** 导出按钮操作 */ handleExport() { @@ -357,7 +357,7 @@ export default { }).then(response => { this.download(response.msg); this.exportLoading = false; - }) + }).catch(() => {}); }, /** 刷新缓存按钮操作 */ handleRefreshCache() { diff --git a/ruoyi-ui/src/views/system/menu/index.vue b/ruoyi-ui/src/views/system/menu/index.vue index cee61b73..507ae509 100644 --- a/ruoyi-ui/src/views/system/menu/index.vue +++ b/ruoyi-ui/src/views/system/menu/index.vue @@ -163,7 +163,7 @@ - + @@ -393,7 +393,7 @@ export default { }).then(() => { this.getList(); this.msgSuccess("删除成功"); - }) + }).catch(() => {}); } } }; diff --git a/ruoyi-ui/src/views/system/notice/index.vue b/ruoyi-ui/src/views/system/notice/index.vue index 7da47980..6dbbfcb0 100644 --- a/ruoyi-ui/src/views/system/notice/index.vue +++ b/ruoyi-ui/src/views/system/notice/index.vue @@ -336,7 +336,7 @@ export default { }).then(() => { this.getList(); this.msgSuccess("删除成功"); - }) + }).catch(() => {}); } } }; diff --git a/ruoyi-ui/src/views/system/post/index.vue b/ruoyi-ui/src/views/system/post/index.vue index ce48b03b..0b10126b 100644 --- a/ruoyi-ui/src/views/system/post/index.vue +++ b/ruoyi-ui/src/views/system/post/index.vue @@ -309,7 +309,7 @@ export default { }).then(() => { this.getList(); this.msgSuccess("删除成功"); - }) + }).catch(() => {}); }, /** 导出按钮操作 */ handleExport() { @@ -324,7 +324,7 @@ export default { }).then(response => { this.download(response.msg); this.exportLoading = false; - }) + }).catch(() => {}); } } }; diff --git a/ruoyi-ui/src/views/system/role/index.vue b/ruoyi-ui/src/views/system/role/index.vue index 4892615c..8f0d4333 100644 --- a/ruoyi-ui/src/views/system/role/index.vue +++ b/ruoyi-ui/src/views/system/role/index.vue @@ -593,7 +593,7 @@ export default { }).then(() => { this.getList(); this.msgSuccess("删除成功"); - }) + }).catch(() => {}); }, /** 导出按钮操作 */ handleExport() { @@ -608,7 +608,7 @@ export default { }).then(response => { this.download(response.msg); this.exportLoading = false; - }) + }).catch(() => {}); } } }; diff --git a/ruoyi-ui/src/views/system/user/index.vue b/ruoyi-ui/src/views/system/user/index.vue index 2e55120c..471a66cc 100644 --- a/ruoyi-ui/src/views/system/user/index.vue +++ b/ruoyi-ui/src/views/system/user/index.vue @@ -631,7 +631,7 @@ export default { }).then(() => { this.getList(); this.msgSuccess("删除成功"); - }) + }).catch(() => {}); }, /** 导出按钮操作 */ handleExport() { @@ -646,7 +646,7 @@ export default { }).then(response => { this.download(response.msg); this.exportLoading = false; - }) + }).catch(() => {}); }, /** 导入按钮操作 */ handleImport() { diff --git a/ruoyi-ui/src/views/tool/gen/index.vue b/ruoyi-ui/src/views/tool/gen/index.vue index 113f3540..348543e2 100644 --- a/ruoyi-ui/src/views/tool/gen/index.vue +++ b/ruoyi-ui/src/views/tool/gen/index.vue @@ -283,7 +283,7 @@ export default { return synchDb(tableName); }).then(() => { this.msgSuccess("同步成功"); - }) + }).catch(() => {}); }, /** 打开导入表弹窗 */ openImportTable() { @@ -333,7 +333,7 @@ export default { }).then(() => { this.getList(); this.msgSuccess("删除成功"); - }) + }).catch(() => {}); } } }; From b7446f8d0ffd282d7f22d775e896d066219856a4 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Thu, 3 Jun 2021 13:26:09 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E5=AF=8C=E6=96=87=E6=9C=AC=E5=B7=A5?= =?UTF-8?q?=E5=85=B7=E6=A0=8F=E9=85=8D=E7=BD=AE=E8=A7=86=E9=A2=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/components/Editor/index.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ruoyi-ui/src/components/Editor/index.vue b/ruoyi-ui/src/components/Editor/index.vue index 640049ca..ad4da7ee 100644 --- a/ruoyi-ui/src/components/Editor/index.vue +++ b/ruoyi-ui/src/components/Editor/index.vue @@ -75,7 +75,7 @@ export default { [{ color: [] }, { background: [] }], // 字体颜色、字体背景颜色 [{ align: [] }], // 对齐方式 ["clean"], // 清除文本格式 - ["link", "image"] // 链接、图片 + ["link", "image", "video"] // 链接、图片、视频 ], }, placeholder: "请输入内容", @@ -158,6 +158,7 @@ export default { }); }, handleUploadSuccess(res, file) { + console.info(file); // 获取富文本组件实例 let quill = this.Quill; // 如果上传成功 From fd33fe869dfad2364503f13bc90a239fccba5dc3 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Tue, 8 Jun 2021 16:27:24 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=AF=BC=E5=87=BA?= =?UTF-8?q?=E8=A7=92=E8=89=B2=E6=95=B0=E6=8D=AE=E8=8C=83=E5=9B=B4=E7=BF=BB?= =?UTF-8?q?=E8=AF=91=E7=BC=BA=E5=B0=91=E4=BB=85=E6=9C=AC=E4=BA=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/ruoyi/common/core/domain/entity/SysRole.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysRole.java b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysRole.java index b122538b..f28a063a 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysRole.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysRole.java @@ -33,8 +33,8 @@ public class SysRole extends BaseEntity @Excel(name = "角色排序") private String roleSort; - /** 数据范围(1:所有数据权限;2:自定义数据权限;3:本部门数据权限;4:本部门及以下数据权限) */ - @Excel(name = "数据范围", readConverterExp = "1=所有数据权限,2=自定义数据权限,3=本部门数据权限,4=本部门及以下数据权限") + /** 数据范围(1:所有数据权限;2:自定义数据权限;3:本部门数据权限;4:本部门及以下数据权限;5:仅本人数据权限) */ + @Excel(name = "数据范围", readConverterExp = "1=所有数据权限,2=自定义数据权限,3=本部门数据权限,4=本部门及以下数据权限,5=仅本人数据权限") private String dataScope; /** 菜单树选择项是否关联显示( 0:父子不互相关联显示 1:父子互相关联显示) */ From c16ee7fc2c6cbda1cc8e87f21f1c29b2cb5948cd Mon Sep 17 00:00:00 2001 From: RuoYi Date: Tue, 8 Jun 2021 16:34:36 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E5=8D=87=E7=BA=A7swagger=E5=88=B0=E6=9C=80?= =?UTF-8?q?=E6=96=B0=E7=89=88=E6=9C=ACv3.0.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 41 +++++++------------ ruoyi-admin/pom.xml | 20 ++------- .../ruoyi/web/core/config/SwaggerConfig.java | 12 +++--- ruoyi-ui/src/components/Editor/index.vue | 1 - ruoyi-ui/src/views/tool/swagger/index.vue | 2 +- 5 files changed, 25 insertions(+), 51 deletions(-) diff --git a/pom.xml b/pom.xml index 640387a1..ebf3f28f 100644 --- a/pom.xml +++ b/pom.xml @@ -20,7 +20,7 @@ 3.1.1 1.2.6 1.21 - 2.9.2 + 3.0.0 2.3.2 2.1.4 1.3.0 @@ -48,7 +48,7 @@ import - + com.alibaba druid-spring-boot-starter @@ -95,38 +95,25 @@ ${jna.version} - + io.springfox - springfox-swagger2 - ${swagger.version} - - - io.swagger - swagger-annotations - - - io.swagger - swagger-models - - + springfox-boot-starter + 3.0.0 + + io.swagger + swagger-models + - - - io.springfox - springfox-swagger-ui - ${swagger.version} - - - + commons-io commons-io ${commons.io.version} - + commons-fileupload commons-fileupload @@ -140,7 +127,7 @@ ${poi.version} - + org.apache.velocity velocity @@ -167,14 +154,14 @@ ${fastjson.version} - + io.jsonwebtoken jjwt ${jwt.version} - + com.github.penggle kaptcha diff --git a/ruoyi-admin/pom.xml b/ruoyi-admin/pom.xml index d58ad5bd..25016b05 100644 --- a/ruoyi-admin/pom.xml +++ b/ruoyi-admin/pom.xml @@ -24,29 +24,17 @@ true - + io.springfox - springfox-swagger2 - - - - - io.swagger - swagger-annotations - 1.5.21 + springfox-boot-starter + io.swagger swagger-models - 1.5.21 - - - - - io.springfox - springfox-swagger-ui + 1.6.2 diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/core/config/SwaggerConfig.java b/ruoyi-admin/src/main/java/com/ruoyi/web/core/config/SwaggerConfig.java index 86acc3f0..02227fd2 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/core/config/SwaggerConfig.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/core/config/SwaggerConfig.java @@ -8,6 +8,7 @@ import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import com.ruoyi.common.config.RuoYiConfig; import io.swagger.annotations.ApiOperation; +import io.swagger.models.auth.In; import springfox.documentation.builders.ApiInfoBuilder; import springfox.documentation.builders.PathSelectors; import springfox.documentation.builders.RequestHandlerSelectors; @@ -16,10 +17,10 @@ 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.service.contexts.SecurityContext; import springfox.documentation.spring.web.plugins.Docket; -import springfox.documentation.swagger2.annotations.EnableSwagger2; /** * Swagger2的接口配置 @@ -27,7 +28,6 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2; * @author ruoyi */ @Configuration -@EnableSwagger2 public class SwaggerConfig { /** 系统基础配置 */ @@ -71,10 +71,10 @@ public class SwaggerConfig /** * 安全模式,这里指定token通过Authorization头请求头传递 */ - private List securitySchemes() + private List securitySchemes() { - List apiKeyList = new ArrayList(); - apiKeyList.add(new ApiKey("Authorization", "Authorization", "header")); + List apiKeyList = new ArrayList(); + apiKeyList.add(new ApiKey("Authorization", "Authorization", In.HEADER.toValue())); return apiKeyList; } @@ -87,7 +87,7 @@ public class SwaggerConfig securityContexts.add( SecurityContext.builder() .securityReferences(defaultAuth()) - .forPaths(PathSelectors.regex("^(?!auth).*$")) + .operationSelector(o -> o.requestMappingPattern().matches("/.*")) .build()); return securityContexts; } diff --git a/ruoyi-ui/src/components/Editor/index.vue b/ruoyi-ui/src/components/Editor/index.vue index ad4da7ee..d63a48d1 100644 --- a/ruoyi-ui/src/components/Editor/index.vue +++ b/ruoyi-ui/src/components/Editor/index.vue @@ -158,7 +158,6 @@ export default { }); }, handleUploadSuccess(res, file) { - console.info(file); // 获取富文本组件实例 let quill = this.Quill; // 如果上传成功 diff --git a/ruoyi-ui/src/views/tool/swagger/index.vue b/ruoyi-ui/src/views/tool/swagger/index.vue index 624b59a2..8db31808 100644 --- a/ruoyi-ui/src/views/tool/swagger/index.vue +++ b/ruoyi-ui/src/views/tool/swagger/index.vue @@ -8,7 +8,7 @@ export default { name: "Swagger", data() { return { - src: process.env.VUE_APP_BASE_API + "/swagger-ui.html", + src: process.env.VUE_APP_BASE_API + "/swagger-ui/index.html", height: document.documentElement.clientHeight - 94.5 + "px;", loading: true }; From 2ace3257f95eee1f8734754f488412b6a266d928 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Wed, 9 Jun 2021 20:07:36 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E5=8D=87=E7=BA=A7swagger=E5=88=B0=E6=9C=80?= =?UTF-8?q?=E6=96=B0=E7=89=88=E6=9C=ACv3.0.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 12 +++++++----- .../com/ruoyi/web/core/config/SwaggerConfig.java | 2 +- .../com/ruoyi/framework/config/ResourcesConfig.java | 3 +-- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/pom.xml b/pom.xml index ebf3f28f..ff0ebab7 100644 --- a/pom.xml +++ b/pom.xml @@ -99,11 +99,13 @@ io.springfox springfox-boot-starter - 3.0.0 - - io.swagger - swagger-models - + ${swagger.version} + + + io.swagger + swagger-models + + diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/core/config/SwaggerConfig.java b/ruoyi-admin/src/main/java/com/ruoyi/web/core/config/SwaggerConfig.java index 02227fd2..0b942450 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/core/config/SwaggerConfig.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/core/config/SwaggerConfig.java @@ -48,7 +48,7 @@ public class SwaggerConfig @Bean public Docket createRestApi() { - return new Docket(DocumentationType.SWAGGER_2) + return new Docket(DocumentationType.OAS_30) // 是否启用Swagger .enable(enabled) // 用来创建该API的基本信息,展示在文档的页面中(自定义展示的信息) diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/ResourcesConfig.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/ResourcesConfig.java index 1082ea51..9cd523e7 100644 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/ResourcesConfig.java +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/ResourcesConfig.java @@ -31,8 +31,7 @@ public class ResourcesConfig implements WebMvcConfigurer registry.addResourceHandler(Constants.RESOURCE_PREFIX + "/**").addResourceLocations("file:" + RuoYiConfig.getProfile() + "/"); /** swagger配置 */ - registry.addResourceHandler("swagger-ui.html").addResourceLocations("classpath:/META-INF/resources/"); - registry.addResourceHandler("/webjars/**").addResourceLocations("classpath:/META-INF/resources/webjars/"); + registry.addResourceHandler("/swagger-ui/**").addResourceLocations("classpath:/META-INF/resources/webjars/springfox-swagger-ui/"); } /**