Commit b8a0fd83 by fengshuonan

修复资源映射问题

parent 74ca3392
......@@ -60,13 +60,18 @@ public class WebConfig implements WebMvcConfigurer {
private GunsProperties gunsProperties;
/**
* 增加swagger的支持
* 静态资源映射
*/
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
if (gunsProperties.getSwaggerOpen()) {
//swagger
registry.addResourceHandler("swagger-ui.html").addResourceLocations("classpath:/META-INF/resources/");
registry.addResourceHandler("/webjars/**").addResourceLocations("classpath:/META-INF/resources/webjars/");
//本应用
registry.addResourceHandler("/assets/**").addResourceLocations("classpath:/assets/");
}
}
......
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