提交 94f88bad 编写于 作者: 查尔斯-BUG万象集's avatar 查尔斯-BUG万象集

fix: 修复访问 doc.html 接口文档,控制台报 No mapping for GET /favicon.ico 警告的问题

上级 b23b00d0
......@@ -66,7 +66,8 @@ public class WebMvcConfiguration implements WebMvcConfigurer {
.setCachePeriod(0);
registry.addResourceHandler(localStorageProperties.getAvatarPattern()).addResourceLocations(avatarUtl)
.setCachePeriod(0);
registry.addResourceHandler("doc.html").addResourceLocations("classpath:/META-INF/resources/");
registry.addResourceHandler("/favicon.ico").addResourceLocations("classpath:/");
registry.addResourceHandler("/doc.html").addResourceLocations("classpath:/META-INF/resources/");
registry.addResourceHandler("/webjars/**").addResourceLocations("classpath:/META-INF/resources/webjars/")
.setCacheControl(CacheControl.maxAge(5, TimeUnit.HOURS).cachePublic());
}
......
......@@ -281,11 +281,18 @@ limitations under the License.
<resource>
<directory>src/main/resources</directory>
<includes>
<include>**/**</include>
<include>**/*.yml</include>
</includes>
<!-- 启用过滤,即替换对应资源中的变量 -->
<filtering>true</filtering>
</resource>
<!-- 除 YAML 配置文件外,其他配置文件不需要进行变量替换 -->
<resource>
<directory>src/main/resources</directory>
<includes>
<include>**/**</include>
</includes>
</resource>
</resources>
</build>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册