|
|
@@ -26,8 +26,9 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2;
|
|
26
|
26
|
|
|
27
|
27
|
@Configuration
|
|
28
|
28
|
@EnableSwagger2
|
|
29
|
|
-@EnableAutoConfiguration
|
|
|
29
|
+@EnableConfigurationProperties(SwaggerProperties.class)
|
|
30
|
30
|
@ConditionalOnProperty(name = "swagger.enabled", matchIfMissing = true)
|
|
|
31
|
+@Import({SwaggerBeanPostProcessor.class, SwaggerWebConfiguration.class})
|
|
31
|
32
|
public class SwaggerAutoConfiguration
|
|
32
|
33
|
{
|
|
33
|
34
|
/**
|
|
|
@@ -38,13 +39,6 @@ public class SwaggerAutoConfiguration
|
|
38
|
39
|
private static final String BASE_PATH = "/**";
|
|
39
|
40
|
|
|
40
|
41
|
@Bean
|
|
41
|
|
- @ConditionalOnMissingBean
|
|
42
|
|
- public SwaggerProperties swaggerProperties()
|
|
43
|
|
- {
|
|
44
|
|
- return new SwaggerProperties();
|
|
45
|
|
- }
|
|
46
|
|
-
|
|
47
|
|
- @Bean
|
|
48
|
42
|
public Docket api(SwaggerProperties swaggerProperties)
|
|
49
|
43
|
{
|
|
50
|
44
|
// base-path处理
|