swagger依赖升级

This commit is contained in:
shimingxy
2025-12-10 15:48:56 +08:00
parent b7a2c9fe15
commit 499deff645
8 changed files with 28 additions and 28 deletions

View File

@@ -45,6 +45,11 @@
jakartaxmlbindapiVersion 4.0.4
angusmailVersion 2.0.5
classmateVersion 1.7.1
swaggerV3Version 2.2.41
classgraphVersion 4.8.184
webjarslocatorliteVersion 1.1.2
swaggeruiVersion 5.30.3
springdocVersion 2.8.14
MaxKey v 4.1.9 GA 2025/10/10
*(MAXKEY-250501) #248 最新镜像 启动登陆异常

View File

@@ -428,10 +428,8 @@ subprojects {
implementation group: 'com.tencentcloudapi', name: 'tencentcloud-sdk-java', version: "${tencentcloudsdkjavaVersion}"
//docs
implementation group: 'org.mapstruct', name: 'mapstruct', version: "${mapstructVersion}"
implementation group: 'io.swagger.core.v3', name: 'swagger-annotations', version: "${swaggerV3Version}"
implementation group: 'io.swagger.core.v3', name: 'swagger-annotations-jakarta', version: "${swaggerV3Version}"
implementation group: 'io.swagger.core.v3', name: 'swagger-core-jakarta', version: "${swaggerV3Version}"
//implementation group: 'io.swagger.core.v3', name: 'swagger-models', version: "${swaggerV3Version}"
implementation group: 'io.swagger.core.v3', name: 'swagger-models-jakarta', version: "${swaggerV3Version}"
//springdoc
implementation group: 'io.github.classgraph', name: 'classgraph', version: "${classgraphVersion}"

View File

@@ -203,13 +203,13 @@ JustAuthVersion =1.16.5
simplehttpVersion =1.0.5
casclientVersion =4.0.4
#doc
swaggerV3Version =2.2.27
classgraphVersion =4.8.179
swaggerV3Version =2.2.41
classgraphVersion =4.8.184
webjarslocatorcoreVersion =0.59
webjarslocatorVersion =0.52
webjarslocatorliteVersion =1.0.1
swaggeruiVersion =5.18.2
springdocVersion =2.7.0
webjarslocatorliteVersion =1.1.2
swaggeruiVersion =5.30.3
springdocVersion =2.8.14
knife4jVersion =4.5.0
#sdk
aliyunjavasdkcoreVersion =4.6.4

View File

@@ -42,8 +42,8 @@ public class MvcResourceAutoConfiguration implements WebMvcConfigurer {
.addResourceLocations("classpath:/templates/");
logger.debug("add swagger");
registry.addResourceHandler("swagger-ui.html")
.addResourceLocations("classpath:/META-INF/resources/");
registry.addResourceHandler("/swagger-ui/**")
.addResourceLocations("classpath:/META-INF/resources/webjars/");
logger.debug("add knife4j");
registry.addResourceHandler("doc.html")

View File

@@ -34,7 +34,7 @@ public class SwaggerAutoConfiguration {
@Value("${springdoc.swagger-ui.enabled}")
boolean enable;
@Bean
/*@Bean
GlobalOpenApiCustomizer orderGlobalOpenApiCustomizer() {
return openApi -> {
if (openApi.getTags()!=null){
@@ -50,7 +50,7 @@ public class SwaggerAutoConfiguration {
}
};
}
}*/
@Bean
GroupedOpenApi userApi(){
@@ -67,8 +67,8 @@ public class SwaggerAutoConfiguration {
"/api/oauth/v20/me"
};
String[] packagedToMatch = { "org.dromara.maxkey.authz" };
_logger.debug("OpenApi enable {}",enable);
String[] packagedToMatch = { "org.dromara.maxkey" };
_logger.debug("swagger-ui enable {}",enable);
if(enable) {
return GroupedOpenApi.builder().group(title)
.pathsToMatch(paths)

View File

@@ -293,15 +293,14 @@ maxkey.swagger.title =MaxKey\u5355\u70b9\u767b\u5f55\
maxkey.swagger.description =MaxKey\u5355\u70b9\u767b\u5f55\u8ba4\u8bc1\u7cfb\u7edfAPI\u6587\u6863
maxkey.swagger.version =${application.formatted-version}
springdoc.api-docs.version =OPENAPI_3_0
springdoc.api-docs.path =/swagger-ui/v3/api-docs
springdoc.api-docs.enabled =true
springdoc.swagger-ui.path =/swagger-ui.html
springdoc.swagger-ui.enabled =true
springdoc.swagger-ui.showExtensions =true
springdoc.swagger-ui.tags-sorter =alpha
springdoc.swagger-ui.operations-sorter =alpha
springdoc.swagger-ui.showExtensions =true
springdoc.api-docs.path =/v3/api-docs
#springdoc.group-configs[0].group =default
#springdoc.group-configs[0].paths-to-match =/*
#springdoc.group-configs[0].packages-to-scan =org.dromara.maxkey
knife4j.enable =true
knife4j.setting.language =ZH_CN

View File

@@ -221,15 +221,14 @@ maxkey.swagger.title =MaxKey\u5355\u70b9\u767b\u5f55\
maxkey.swagger.description =MaxKey\u5355\u70b9\u767b\u5f55\u8ba4\u8bc1\u7cfb\u7edfAPI\u6587\u6863
maxkey.swagger.version =${application.formatted-version}
springdoc.api-docs.version =OPENAPI_3_0
springdoc.api-docs.path =/swagger-ui/v3/api-docs
springdoc.api-docs.enabled =true
springdoc.swagger-ui.path =/swagger-ui.html
springdoc.swagger-ui.enabled =true
springdoc.swagger-ui.showExtensions =true
springdoc.swagger-ui.tags-sorter =alpha
springdoc.swagger-ui.operations-sorter =alpha
springdoc.swagger-ui.showExtensions =true
springdoc.api-docs.path =/v3/api-docs
#springdoc.group-configs[0].group =default
#springdoc.group-configs[0].paths-to-match =/*
#springdoc.group-configs[0].packages-to-scan =org.dromara.maxkey
knife4j.enable =true
knife4j.setting.language =ZH_CN

View File

@@ -219,15 +219,14 @@ maxkey.swagger.title =MaxKey\u5355\u70b9\u767b\u5f55\
maxkey.swagger.description =MaxKey\u5355\u70b9\u767b\u5f55\u8ba4\u8bc1\u7cfb\u7edfAPI\u6587\u6863
maxkey.swagger.version =${application.formatted-version}
springdoc.api-docs.version =OPENAPI_3_0
springdoc.api-docs.path =/swagger-ui/v3/api-docs
springdoc.api-docs.enabled =true
springdoc.swagger-ui.path =/swagger-ui.html
springdoc.swagger-ui.enabled =true
springdoc.swagger-ui.showExtensions =true
springdoc.swagger-ui.tags-sorter =alpha
springdoc.swagger-ui.operations-sorter =alpha
springdoc.swagger-ui.showExtensions =true
springdoc.api-docs.path =/v3/api-docs
#springdoc.group-configs[0].group =default
#springdoc.group-configs[0].paths-to-match =/*
#springdoc.group-configs[0].packages-to-scan =org.dromara.maxkey
knife4j.enable =true
knife4j.setting.language =ZH_CN