mirror of
https://gitee.com/jzsw-it/yexuejc-base.git
synced 2025-06-08 23:04:03 +08:00
first commit
This commit is contained in:
parent
0417621cfe
commit
1beed4e029
@ -1,5 +1,7 @@
|
|||||||
package com.yexuejc.base.util;
|
package com.yexuejc.base.util;
|
||||||
|
|
||||||
|
import java.net.URL;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 系统工具类
|
* 系统工具类
|
||||||
*
|
*
|
||||||
@ -22,4 +24,15 @@ public class SysUtils {
|
|||||||
public static String getCachePath() {
|
public static String getCachePath() {
|
||||||
return System.getProperty(PROJECT_ROOT_PATH);
|
return System.getProperty(PROJECT_ROOT_PATH);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 从根路径获取文件URL
|
||||||
|
*
|
||||||
|
* @param clazz
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static URL getRootPath(Class clazz, String filePath) {
|
||||||
|
return clazz.getClass().getResource(StrUtil.setStr(filePath, "/"));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user