Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
finance-manage
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
finance-oa
finance-manage
Commits
c16ee7fc
Commit
c16ee7fc
authored
Jun 08, 2021
by
RuoYi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
升级swagger到最新版本v3.0.0
parent
fd33fe86
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
25 additions
and
51 deletions
+25
-51
pom.xml
pom.xml
+14
-27
ruoyi-admin/pom.xml
ruoyi-admin/pom.xml
+4
-16
ruoyi-admin/src/main/java/com/ruoyi/web/core/config/SwaggerConfig.java
...rc/main/java/com/ruoyi/web/core/config/SwaggerConfig.java
+6
-6
ruoyi-ui/src/components/Editor/index.vue
ruoyi-ui/src/components/Editor/index.vue
+0
-1
ruoyi-ui/src/views/tool/swagger/index.vue
ruoyi-ui/src/views/tool/swagger/index.vue
+1
-1
No files found.
pom.xml
View file @
c16ee7fc
...
@@ -20,7 +20,7 @@
...
@@ -20,7 +20,7 @@
<maven-jar-plugin.version>
3.1.1
</maven-jar-plugin.version>
<maven-jar-plugin.version>
3.1.1
</maven-jar-plugin.version>
<druid.version>
1.2.6
</druid.version>
<druid.version>
1.2.6
</druid.version>
<bitwalker.version>
1.21
</bitwalker.version>
<bitwalker.version>
1.21
</bitwalker.version>
<swagger.version>
2.9.2
</swagger.version>
<swagger.version>
3.0.0
</swagger.version>
<kaptcha.version>
2.3.2
</kaptcha.version>
<kaptcha.version>
2.3.2
</kaptcha.version>
<mybatis-spring-boot.version>
2.1.4
</mybatis-spring-boot.version>
<mybatis-spring-boot.version>
2.1.4
</mybatis-spring-boot.version>
<pagehelper.boot.version>
1.3.0
</pagehelper.boot.version>
<pagehelper.boot.version>
1.3.0
</pagehelper.boot.version>
...
@@ -48,7 +48,7 @@
...
@@ -48,7 +48,7 @@
<scope>
import
</scope>
<scope>
import
</scope>
</dependency>
</dependency>
<!--阿里数据库连接池 -->
<!--
阿里数据库连接池 -->
<dependency>
<dependency>
<groupId>
com.alibaba
</groupId>
<groupId>
com.alibaba
</groupId>
<artifactId>
druid-spring-boot-starter
</artifactId>
<artifactId>
druid-spring-boot-starter
</artifactId>
...
@@ -95,38 +95,25 @@
...
@@ -95,38 +95,25 @@
<version>
${jna.version}
</version>
<version>
${jna.version}
</version>
</dependency>
</dependency>
<!--
swagger2
-->
<!--
Swagger3依赖
-->
<dependency>
<dependency>
<groupId>
io.springfox
</groupId>
<groupId>
io.springfox
</groupId>
<artifactId>
springfox-swagger2
</artifactId>
<artifactId>
springfox-boot-starter
</artifactId>
<version>
${swagger.version}
</version>
<version>
3.0.0
</version>
<exclusions>
<exclusion>
<exclusion>
<groupId>
io.swagger
</groupId>
<groupId>
io.swagger
</groupId>
<artifactId>
swagger-models
</artifactId>
<artifactId>
swagger-annotations
</artifactId>
</exclusion>
</exclusion>
<exclusion>
<groupId>
io.swagger
</groupId>
<artifactId>
swagger-models
</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- swagger2-UI-->
<dependency>
<groupId>
io.springfox
</groupId>
<artifactId>
springfox-swagger-ui
</artifactId>
<version>
${swagger.version}
</version>
</dependency>
</dependency>
<!--io常用工具类 -->
<!--
io常用工具类 -->
<dependency>
<dependency>
<groupId>
commons-io
</groupId>
<groupId>
commons-io
</groupId>
<artifactId>
commons-io
</artifactId>
<artifactId>
commons-io
</artifactId>
<version>
${commons.io.version}
</version>
<version>
${commons.io.version}
</version>
</dependency>
</dependency>
<!--文件上传工具类 -->
<!--
文件上传工具类 -->
<dependency>
<dependency>
<groupId>
commons-fileupload
</groupId>
<groupId>
commons-fileupload
</groupId>
<artifactId>
commons-fileupload
</artifactId>
<artifactId>
commons-fileupload
</artifactId>
...
@@ -140,7 +127,7 @@
...
@@ -140,7 +127,7 @@
<version>
${poi.version}
</version>
<version>
${poi.version}
</version>
</dependency>
</dependency>
<!--velocity代码生成使用模板 -->
<!--
velocity代码生成使用模板 -->
<dependency>
<dependency>
<groupId>
org.apache.velocity
</groupId>
<groupId>
org.apache.velocity
</groupId>
<artifactId>
velocity
</artifactId>
<artifactId>
velocity
</artifactId>
...
@@ -167,14 +154,14 @@
...
@@ -167,14 +154,14 @@
<version>
${fastjson.version}
</version>
<version>
${fastjson.version}
</version>
</dependency>
</dependency>
<!--Token生成与解析-->
<!--
Token生成与解析-->
<dependency>
<dependency>
<groupId>
io.jsonwebtoken
</groupId>
<groupId>
io.jsonwebtoken
</groupId>
<artifactId>
jjwt
</artifactId>
<artifactId>
jjwt
</artifactId>
<version>
${jwt.version}
</version>
<version>
${jwt.version}
</version>
</dependency>
</dependency>
<!--验证码 -->
<!--
验证码 -->
<dependency>
<dependency>
<groupId>
com.github.penggle
</groupId>
<groupId>
com.github.penggle
</groupId>
<artifactId>
kaptcha
</artifactId>
<artifactId>
kaptcha
</artifactId>
...
...
ruoyi-admin/pom.xml
View file @
c16ee7fc
...
@@ -24,29 +24,17 @@
...
@@ -24,29 +24,17 @@
<optional>
true
</optional>
<!-- 表示依赖不会传递 -->
<optional>
true
</optional>
<!-- 表示依赖不会传递 -->
</dependency>
</dependency>
<!-- swagger
2
-->
<!-- swagger
3
-->
<dependency>
<dependency>
<groupId>
io.springfox
</groupId>
<groupId>
io.springfox
</groupId>
<artifactId>
springfox-swagger2
</artifactId>
<artifactId>
springfox-boot-starter
</artifactId>
</dependency>
<!--防止进入swagger页面报类型转换错误,排除2.9.2中的引用,手动增加1.5.21版本-->
<dependency>
<groupId>
io.swagger
</groupId>
<artifactId>
swagger-annotations
</artifactId>
<version>
1.5.21
</version>
</dependency>
</dependency>
<!-- 防止进入swagger页面报类型转换错误,排除3.0.0中的引用,手动增加1.6.2版本 -->
<dependency>
<dependency>
<groupId>
io.swagger
</groupId>
<groupId>
io.swagger
</groupId>
<artifactId>
swagger-models
</artifactId>
<artifactId>
swagger-models
</artifactId>
<version>
1.5.21
</version>
<version>
1.6.2
</version>
</dependency>
<!-- swagger2-UI-->
<dependency>
<groupId>
io.springfox
</groupId>
<artifactId>
springfox-swagger-ui
</artifactId>
</dependency>
</dependency>
<!-- Mysql驱动包 -->
<!-- Mysql驱动包 -->
...
...
ruoyi-admin/src/main/java/com/ruoyi/web/core/config/SwaggerConfig.java
View file @
c16ee7fc
...
@@ -8,6 +8,7 @@ import org.springframework.context.annotation.Bean;
...
@@ -8,6 +8,7 @@ import org.springframework.context.annotation.Bean;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.context.annotation.Configuration
;
import
com.ruoyi.common.config.RuoYiConfig
;
import
com.ruoyi.common.config.RuoYiConfig
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.models.auth.In
;
import
springfox.documentation.builders.ApiInfoBuilder
;
import
springfox.documentation.builders.ApiInfoBuilder
;
import
springfox.documentation.builders.PathSelectors
;
import
springfox.documentation.builders.PathSelectors
;
import
springfox.documentation.builders.RequestHandlerSelectors
;
import
springfox.documentation.builders.RequestHandlerSelectors
;
...
@@ -16,10 +17,10 @@ import springfox.documentation.service.ApiKey;
...
@@ -16,10 +17,10 @@ import springfox.documentation.service.ApiKey;
import
springfox.documentation.service.AuthorizationScope
;
import
springfox.documentation.service.AuthorizationScope
;
import
springfox.documentation.service.Contact
;
import
springfox.documentation.service.Contact
;
import
springfox.documentation.service.SecurityReference
;
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
;
/**
/**
* Swagger2的接口配置
* Swagger2的接口配置
...
@@ -27,7 +28,6 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2;
...
@@ -27,7 +28,6 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2;
* @author ruoyi
* @author ruoyi
*/
*/
@Configuration
@Configuration
@EnableSwagger2
public
class
SwaggerConfig
public
class
SwaggerConfig
{
{
/** 系统基础配置 */
/** 系统基础配置 */
...
@@ -71,10 +71,10 @@ public class SwaggerConfig
...
@@ -71,10 +71,10 @@ public class SwaggerConfig
/**
/**
* 安全模式,这里指定token通过Authorization头请求头传递
* 安全模式,这里指定token通过Authorization头请求头传递
*/
*/
private
List
<
ApiKey
>
securitySchemes
()
private
List
<
SecurityScheme
>
securitySchemes
()
{
{
List
<
ApiKey
>
apiKeyList
=
new
ArrayList
<
ApiKey
>();
List
<
SecurityScheme
>
apiKeyList
=
new
ArrayList
<
SecurityScheme
>();
apiKeyList
.
add
(
new
ApiKey
(
"Authorization"
,
"Authorization"
,
"header"
));
apiKeyList
.
add
(
new
ApiKey
(
"Authorization"
,
"Authorization"
,
In
.
HEADER
.
toValue
()
));
return
apiKeyList
;
return
apiKeyList
;
}
}
...
@@ -87,7 +87,7 @@ public class SwaggerConfig
...
@@ -87,7 +87,7 @@ public class SwaggerConfig
securityContexts
.
add
(
securityContexts
.
add
(
SecurityContext
.
builder
()
SecurityContext
.
builder
()
.
securityReferences
(
defaultAuth
())
.
securityReferences
(
defaultAuth
())
.
forPaths
(
PathSelectors
.
regex
(
"^(?!auth).*$
"
))
.
operationSelector
(
o
->
o
.
requestMappingPattern
().
matches
(
"/.*
"
))
.
build
());
.
build
());
return
securityContexts
;
return
securityContexts
;
}
}
...
...
ruoyi-ui/src/components/Editor/index.vue
View file @
c16ee7fc
...
@@ -158,7 +158,6 @@ export default {
...
@@ -158,7 +158,6 @@ export default {
});
});
},
},
handleUploadSuccess
(
res
,
file
)
{
handleUploadSuccess
(
res
,
file
)
{
console
.
info
(
file
);
// 获取富文本组件实例
// 获取富文本组件实例
let
quill
=
this
.
Quill
;
let
quill
=
this
.
Quill
;
// 如果上传成功
// 如果上传成功
...
...
ruoyi-ui/src/views/tool/swagger/index.vue
View file @
c16ee7fc
...
@@ -8,7 +8,7 @@ export default {
...
@@ -8,7 +8,7 @@ export default {
name
:
"
Swagger
"
,
name
:
"
Swagger
"
,
data
()
{
data
()
{
return
{
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;
"
,
height
:
document
.
documentElement
.
clientHeight
-
94.5
+
"
px;
"
,
loading
:
true
loading
:
true
};
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment