Explorar o código

swagger-ui样式丢失

chenyongxing %!s(int64=6) %!d(string=hai) anos
pai
achega
8d7e1d477b
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  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/");
    }
}