瀏覽代碼

swagger-ui样式丢失

chenyongxing 6 年之前
父節點
當前提交
8d7e1d477b
共有 1 個文件被更改,包括 2 次插入2 次删除
  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/");
    }
}