fix 权限判断错误的bug

feat 调整默认静态资源的path 为 adminaapi
debug 关闭调试信息
This commit is contained in:
damonyuan 2024-10-31 00:07:52 +08:00
parent 340e049c9a
commit f5220aa8cc
3 changed files with 2 additions and 3 deletions

View File

@ -200,7 +200,7 @@ public class LikeAdminInterceptor implements HandlerInterceptor {
} }
// 路由转权限 // 路由转权限
String prefix = "/api/"; String prefix = "/adminapi/";
String route = uri.replaceFirst(prefix, ""); String route = uri.replaceFirst(prefix, "");
String auths = route.replace("/", ":"); String auths = route.replace("/", ":");

View File

@ -27,7 +27,7 @@ spring:
profiles: profiles:
active: dev active: dev
mvc: mvc:
static-path-pattern: /api/static/** static-path-pattern: /adminapi/static/**
throw-exception-if-no-handler-found: true throw-exception-if-no-handler-found: true
pathmatch: pathmatch:
matching-strategy: ant_path_matcher matching-strategy: ant_path_matcher

View File

@ -79,7 +79,6 @@ public class UrlUtils {
String engine = ConfigUtils.get("storage", "default", "local"); String engine = ConfigUtils.get("storage", "default", "local");
engine = engine.equals("") ? "local" : engine; engine = engine.equals("") ? "local" : engine;
if (engine.equals("local")) { if (engine.equals("local")) {
System.out.println(url);
if (url.startsWith("/adminapi/uploads/")) { if (url.startsWith("/adminapi/uploads/")) {
return RequestUtils.uri() + url; return RequestUtils.uri() + url;
} else { } else {