commit
55447c72e9
|
@ -26,8 +26,9 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2;
|
|||
|
||||
@Configuration
|
||||
@EnableSwagger2
|
||||
@EnableAutoConfiguration
|
||||
@EnableConfigurationProperties(SwaggerProperties.class)
|
||||
@ConditionalOnProperty(name = "swagger.enabled", matchIfMissing = true)
|
||||
@Import({SwaggerBeanPostProcessor.class, SwaggerWebConfiguration.class})
|
||||
public class SwaggerAutoConfiguration
|
||||
{
|
||||
/**
|
||||
|
@ -37,13 +38,6 @@ public class SwaggerAutoConfiguration
|
|||
|
||||
private static final String BASE_PATH = "/**";
|
||||
|
||||
@Bean
|
||||
@ConditionalOnMissingBean
|
||||
public SwaggerProperties swaggerProperties()
|
||||
{
|
||||
return new SwaggerProperties();
|
||||
}
|
||||
|
||||
@Bean
|
||||
public Docket api(SwaggerProperties swaggerProperties)
|
||||
{
|
||||
|
|
|
@ -16,7 +16,6 @@ import java.util.stream.Collectors;
|
|||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@Component
|
||||
public class SwaggerBeanPostProcessor implements BeanPostProcessor
|
||||
{
|
||||
@Override
|
||||
|
|
|
@ -5,7 +5,6 @@ import java.util.List;
|
|||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
@ConfigurationProperties("swagger")
|
||||
public class SwaggerProperties
|
||||
{
|
||||
|
|
|
@ -9,7 +9,6 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
|||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@Configuration
|
||||
public class SwaggerWebConfiguration implements WebMvcConfigurer
|
||||
{
|
||||
@Override
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
com.ruoyi.common.swagger.config.SwaggerAutoConfiguration
|
||||
com.ruoyi.common.swagger.config.SwaggerWebConfiguration
|
||||
com.ruoyi.common.swagger.config.SwaggerBeanPostProcessor
|
||||
# com.ruoyi.common.swagger.config.SwaggerAutoConfiguration
|
||||
# com.ruoyi.common.swagger.config.SwaggerWebConfiguration
|
||||
# com.ruoyi.common.swagger.config.SwaggerBeanPostProcessor
|
||||
|
|
Loading…
Reference in New Issue