Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
zoper 2022-04-03 12:16:54 +08:00
commit 84232b5725

View File

@ -3,6 +3,7 @@ package com.pig4cloud.pig.gateway.config;
import lombok.Data; import lombok.Data;
import org.springdoc.core.GroupedOpenApi; import org.springdoc.core.GroupedOpenApi;
import org.springdoc.core.SwaggerUiConfigParameters; import org.springdoc.core.SwaggerUiConfigParameters;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
@ -16,7 +17,7 @@ import java.util.Map;
/** /**
* @author lengleng * @author lengleng
* @date 2022/3/26 * @date 2022/3/26
* * <p>
* swagger 3.0 展示 * swagger 3.0 展示
*/ */
@Configuration(proxyBeanMethods = false) @Configuration(proxyBeanMethods = false)
@ -24,6 +25,7 @@ public class SpringDocConfiguration {
@Bean @Bean
@Lazy(false) @Lazy(false)
@ConditionalOnProperty(name = "springdoc.api-docs.enabled", matchIfMissing = true)
public List<GroupedOpenApi> apis(SwaggerUiConfigParameters swaggerUiConfigParameters, public List<GroupedOpenApi> apis(SwaggerUiConfigParameters swaggerUiConfigParameters,
SwaggerProperties properties) { SwaggerProperties properties) {
List<GroupedOpenApi> groups = new ArrayList<>(); List<GroupedOpenApi> groups = new ArrayList<>();