Commit 62968b19 by 阳浪

SwaggerConfig

parent 77f4b6ad
...@@ -16,7 +16,7 @@ import springfox.documentation.spring.web.plugins.Docket; ...@@ -16,7 +16,7 @@ import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.swagger2.annotations.EnableSwagger2; import springfox.documentation.swagger2.annotations.EnableSwagger2;
@Configuration @Configuration
//@EnableSwagger2 @EnableSwagger2
public class SwaggerConfig extends WebMvcConfigurerAdapter { public class SwaggerConfig extends WebMvcConfigurerAdapter {
@Value("${swagger.enabled}") @Value("${swagger.enabled}")
...@@ -42,8 +42,8 @@ public class SwaggerConfig extends WebMvcConfigurerAdapter { ...@@ -42,8 +42,8 @@ public class SwaggerConfig extends WebMvcConfigurerAdapter {
@Override @Override
public void addResourceHandlers(ResourceHandlerRegistry registry) { public void addResourceHandlers(ResourceHandlerRegistry registry) {
// registry.addResourceHandler("swagger-ui.html").addResourceLocations("classpath:/META-INF/resources/"); registry.addResourceHandler("swagger-ui.html").addResourceLocations("classpath:/META-INF/resources/");
// registry.addResourceHandler("docs.html").addResourceLocations("classpath:/META-INF/resources/"); registry.addResourceHandler("docs.html").addResourceLocations("classpath:/META-INF/resources/");
registry.addResourceHandler("/webjars/**").addResourceLocations("classpath:/META-INF/resources/webjars/"); registry.addResourceHandler("/webjars/**").addResourceLocations("classpath:/META-INF/resources/webjars/");
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment