fix: 修改 index.html 路径

This commit is contained in:
zhangshuai
2024-08-08 14:13:41 +08:00
parent a32327ad22
commit e8b6e902c2

View File

@@ -37,7 +37,7 @@ public class GUIHistoryRouterFilter extends OncePerRequestFilter {
if (!matches) {
// If the path does not start with any of the specified prefixes, return index.html
Resource resource = resourceLoader.getResource("classpath:public/index.html");
Resource resource = resourceLoader.getResource("classpath:./public/index.html");
response.setContentType("text/html");
response.setCharacterEncoding("UTF-8");
Files.copy(resource.getFile().toPath(), response.getOutputStream());