正在显示
3 个修改的文件
包含
5 行增加
和
4 行删除
| @@ -99,11 +99,13 @@ | @@ -99,11 +99,13 @@ | ||
| 99 | <dependency> | 99 | <dependency> |
| 100 | <groupId>io.springfox</groupId> | 100 | <groupId>io.springfox</groupId> |
| 101 | <artifactId>springfox-boot-starter</artifactId> | 101 | <artifactId>springfox-boot-starter</artifactId> |
| 102 | - <version>3.0.0</version> | 102 | + <version>${swagger.version}</version> |
| 103 | + <exclusions> | ||
| 103 | <exclusion> | 104 | <exclusion> |
| 104 | <groupId>io.swagger</groupId> | 105 | <groupId>io.swagger</groupId> |
| 105 | <artifactId>swagger-models</artifactId> | 106 | <artifactId>swagger-models</artifactId> |
| 106 | </exclusion> | 107 | </exclusion> |
| 108 | + </exclusions> | ||
| 107 | </dependency> | 109 | </dependency> |
| 108 | 110 | ||
| 109 | <!-- io常用工具类 --> | 111 | <!-- io常用工具类 --> |
| @@ -48,7 +48,7 @@ public class SwaggerConfig | @@ -48,7 +48,7 @@ public class SwaggerConfig | ||
| 48 | @Bean | 48 | @Bean |
| 49 | public Docket createRestApi() | 49 | public Docket createRestApi() |
| 50 | { | 50 | { |
| 51 | - return new Docket(DocumentationType.SWAGGER_2) | 51 | + return new Docket(DocumentationType.OAS_30) |
| 52 | // 是否启用Swagger | 52 | // 是否启用Swagger |
| 53 | .enable(enabled) | 53 | .enable(enabled) |
| 54 | // 用来创建该API的基本信息,展示在文档的页面中(自定义展示的信息) | 54 | // 用来创建该API的基本信息,展示在文档的页面中(自定义展示的信息) |
| @@ -31,8 +31,7 @@ public class ResourcesConfig implements WebMvcConfigurer | @@ -31,8 +31,7 @@ public class ResourcesConfig implements WebMvcConfigurer | ||
| 31 | registry.addResourceHandler(Constants.RESOURCE_PREFIX + "/**").addResourceLocations("file:" + RuoYiConfig.getProfile() + "/"); | 31 | registry.addResourceHandler(Constants.RESOURCE_PREFIX + "/**").addResourceLocations("file:" + RuoYiConfig.getProfile() + "/"); |
| 32 | 32 | ||
| 33 | /** swagger配置 */ | 33 | /** swagger配置 */ |
| 34 | - registry.addResourceHandler("swagger-ui.html").addResourceLocations("classpath:/META-INF/resources/"); | ||
| 35 | - registry.addResourceHandler("/webjars/**").addResourceLocations("classpath:/META-INF/resources/webjars/"); | 34 | + registry.addResourceHandler("/swagger-ui/**").addResourceLocations("classpath:/META-INF/resources/webjars/springfox-swagger-ui/"); |
| 36 | } | 35 | } |
| 37 | 36 | ||
| 38 | /** | 37 | /** |
-
请 注册 或 登录 后发表评论