26 changed files with 129 additions and 50 deletions
@ -1,4 +1,4 @@ |
|||||||
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ |
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ |
||||||
com.cloud.kicc.common.core.config.WebMvcConfiguration,\ |
com.cloud.kicc.common.core.config.WebMvcConfiguration,\ |
||||||
com.cloud.kicc.common.core.config.RestTemplateConfiguration,\ |
com.cloud.kicc.common.core.config.RestTemplateConfiguration,\ |
||||||
com.cloud.kicc.common.core.util.SpringContextHolder |
com.cloud.kicc.common.core.util.SpringContextHolderUtil |
||||||
|
@ -0,0 +1,44 @@ |
|||||||
|
package com.cloud.kicc.system.util; |
||||||
|
|
||||||
|
import cn.hutool.core.util.StrUtil; |
||||||
|
import lombok.experimental.UtilityClass; |
||||||
|
|
||||||
|
import java.io.File; |
||||||
|
|
||||||
|
/** |
||||||
|
*<p> |
||||||
|
* 菜单路由工具 |
||||||
|
*</p> |
||||||
|
* |
||||||
|
* @Author: entfrm开发团队-王翔 |
||||||
|
* @Date: 2022/5/2 |
||||||
|
*/ |
||||||
|
@UtilityClass |
||||||
|
public class MenuRouteUtil { |
||||||
|
|
||||||
|
/** |
||||||
|
* 处理重定向路由路径拼接 |
||||||
|
* @Param args 多个路径 |
||||||
|
* @return String 返回拼接后路径 |
||||||
|
*/ |
||||||
|
public static String routePathJoin(String... args) { |
||||||
|
StringBuilder sb = new StringBuilder(); |
||||||
|
for (String arg : args) { |
||||||
|
if (StrUtil.isNotBlank(arg)) { |
||||||
|
// 清除前置斜杆
|
||||||
|
if(arg.startsWith("/")) { |
||||||
|
arg = arg.substring(1); |
||||||
|
} |
||||||
|
// 检查拼接后置斜杠
|
||||||
|
if(arg.endsWith("/")) { |
||||||
|
sb.append(arg); |
||||||
|
} else { |
||||||
|
sb.append(arg + "/"); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
sb.deleteCharAt(sb.length()-1); |
||||||
|
return sb.toString(); |
||||||
|
} |
||||||
|
|
||||||
|
} |
Loading…
Reference in new issue