提高日志标题生成的准确率

This commit is contained in:
thinkgem
2024-04-21 19:50:02 +08:00
parent 992e3c0cb7
commit 03ad0954e2

View File

@@ -203,10 +203,10 @@ public class LogUtils {
if (StringUtils.startsWith(href, contextPath)){
href = StringUtils.substringAfter(href, contextPath);
}
if (StringUtils.startsWith(href, Global.getAdminPath())){
if (StringUtils.startsWith(href, Global.getAdminPath() + "/")){
href = StringUtils.substringAfter(href, Global.getAdminPath());
}
if (StringUtils.startsWith(href, Global.getFrontPath())){
if (StringUtils.startsWith(href, Global.getFrontPath() + "/")){
href = StringUtils.substringAfter(href, Global.getFrontPath());
}
log.setLogTitle(Static.menuService.getMenuNamePath(href, permission));