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
2ace3257
Commit
2ace3257
authored
Jun 09, 2021
by
RuoYi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
升级swagger到最新版本v3.0.0
parent
c16ee7fc
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
8 deletions
+9
-8
pom.xml
pom.xml
+7
-5
ruoyi-admin/src/main/java/com/ruoyi/web/core/config/SwaggerConfig.java
...rc/main/java/com/ruoyi/web/core/config/SwaggerConfig.java
+1
-1
ruoyi-framework/src/main/java/com/ruoyi/framework/config/ResourcesConfig.java
...main/java/com/ruoyi/framework/config/ResourcesConfig.java
+1
-2
No files found.
pom.xml
View file @
2ace3257
...
...
@@ -99,11 +99,13 @@
<dependency>
<groupId>
io.springfox
</groupId>
<artifactId>
springfox-boot-starter
</artifactId>
<version>
3.0.0
</version>
<version>
${swagger.version}
</version>
<exclusions>
<exclusion>
<groupId>
io.swagger
</groupId>
<artifactId>
swagger-models
</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- io常用工具类 -->
...
...
ruoyi-admin/src/main/java/com/ruoyi/web/core/config/SwaggerConfig.java
View file @
2ace3257
...
...
@@ -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的基本信息,展示在文档的页面中(自定义展示的信息)
...
...
ruoyi-framework/src/main/java/com/ruoyi/framework/config/ResourcesConfig.java
View file @
2ace3257
...
...
@@ -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/"
);
}
/**
...
...
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