Bläddra i källkod

swagger-ui样式丢失

chenyongxing 6 år sedan
förälder
incheckning
8d7e1d477b
1 ändrade filer med 2 tillägg och 2 borttagningar
  1. 2 2
      src/main/java/com/yihu/hos/config/WebMvcConfig.java

+ 2 - 2
src/main/java/com/yihu/hos/config/WebMvcConfig.java

@ -32,8 +32,8 @@ public class WebMvcConfig extends WebMvcConfigurerAdapter {
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        registry.addResourceHandler("swagger-ui.html")
                .addResourceLocations("classpath:/META-INF/resources/");
//        registry.addResourceHandler("/webjars/**")
//                .addResourceLocations("classpath:/META-INF/resources/webjars/");
        registry.addResourceHandler("/webjars/**")
                .addResourceLocations("classpath:/META-INF/resources/webjars/");
    }
}