Package icu.easyj.core.util
Class ResourceUtils
java.lang.Object
icu.easyj.core.util.ResourceUtils
资源工具类
- Author:
- wangliang181230
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.springframework.core.io.Resource[]getResources(String locationPattern) 获取位置下的所有文件资源static org.springframework.core.io.Resource[]getResources(String... locationPatternArr) 获取所有位置下的所有文件资源static StringgetResourceUri(org.springframework.core.io.Resource resource) 获取资源路径
-
Constructor Details
-
ResourceUtils
public ResourceUtils()
-
-
Method Details
-
getResources
获取位置下的所有文件资源- Parameters:
locationPattern- 要解析的位置- Returns:
- resources 资源数组
-
getResources
@NonNull public static org.springframework.core.io.Resource[] getResources(String... locationPatternArr) 获取所有位置下的所有文件资源- Parameters:
locationPatternArr- 要解析的位置数组- Returns:
- resources 资源数组
-
getResourceUri
@NonNull public static String getResourceUri(@NonNull org.springframework.core.io.Resource resource) 获取资源路径- Parameters:
resource- 目录或文件资源- Returns:
- 资源路径
-