Commit a24107ca by 阳浪

SwaggerConfig

parent 00491ce0
...@@ -18,7 +18,7 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2; ...@@ -18,7 +18,7 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2;
@SpringBootApplication(exclude = {RabbitAutoConfiguration.class}) @SpringBootApplication(exclude = {RabbitAutoConfiguration.class})
@EnableDiscoveryClient @EnableDiscoveryClient
@EnableJpaAuditing @EnableJpaAuditing
//@EnableSwagger2 @EnableSwagger2
@EnableCaching @EnableCaching
@EnableFeignClients(basePackages = {"com.yizhi"}) @EnableFeignClients(basePackages = {"com.yizhi"})
@ComponentScan(basePackages = {"com.yizhi"}) @ComponentScan(basePackages = {"com.yizhi"})
......
...@@ -18,7 +18,7 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2; ...@@ -18,7 +18,7 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2;
* @Date: 2018/3/6 14:30 * @Date: 2018/3/6 14:30
*/ */
@Configuration @Configuration
//@EnableSwagger2 @EnableSwagger2
public class WebMvcConfigure extends WebMvcConfigurerAdapter { public class WebMvcConfigure extends WebMvcConfigurerAdapter {
@Bean @Bean
...@@ -37,8 +37,8 @@ public class WebMvcConfigure extends WebMvcConfigurerAdapter { ...@@ -37,8 +37,8 @@ public class WebMvcConfigure 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