add ResourceFinder

This commit is contained in:
Looly 2023-11-09 21:13:53 +08:00
parent 6345b1d054
commit 968a074efd

View File

@ -216,6 +216,7 @@ public class ResourceFinder {
* 根路径即不包含表达式的路径 "/WEB-INF/*.xml" 返回 "/WEB-INF/" * 根路径即不包含表达式的路径 "/WEB-INF/*.xml" 返回 "/WEB-INF/"
* *
* @param location 路径表达式 * @param location 路径表达式
* @return root dir
*/ */
protected String determineRootDir(final String location) { protected String determineRootDir(final String location) {
final int prefixEnd = location.indexOf(':') + 1; final int prefixEnd = location.indexOf(':') + 1;
@ -231,10 +232,11 @@ public class ResourceFinder {
/** /**
* 替换'\'为'/' * 替换'\'为'/'
*
* @param path 路径 * @param path 路径
* @return 替换后的路径 * @return 替换后的路径
*/ */
private static String replaceBackSlash(final String path){ private static String replaceBackSlash(final String path) {
return StrUtil.isEmpty(path) ? path : path.replace(CharUtil.BACKSLASH, CharUtil.SLASH); return StrUtil.isEmpty(path) ? path : path.replace(CharUtil.BACKSLASH, CharUtil.SLASH);
} }
} }