类 ClassRelativeResourceLoader
java.lang.Object
cn.taketoday.core.io.DefaultResourceLoader
cn.taketoday.core.io.ClassRelativeResourceLoader
- 所有已实现的接口:
ResourceLoader
ResourceLoader implementation that interprets plain resource paths
as relative to a given java.lang.Class.- 从以下版本开始:
- 4.0 2021/12/30 21:46
- 作者:
- Juergen Hoeller, Harry Yang
- 另请参阅:
-
嵌套类概要
从类继承的嵌套类/接口 cn.taketoday.core.io.DefaultResourceLoader
DefaultResourceLoader.ClassPathContextResource -
字段概要
从接口继承的字段 cn.taketoday.core.io.ResourceLoader
CLASSPATH_URL_PREFIX -
构造器概要
构造器构造器说明ClassRelativeResourceLoader(Class<?> clazz) Create a new ClassRelativeResourceLoader for the given class. -
方法概要
修饰符和类型方法说明protected ResourcegetResourceByPath(String path) Return a Resource handle for the resource at the given path.从类继承的方法 cn.taketoday.core.io.DefaultResourceLoader
addProtocolResolver, clearResourceCaches, getClassLoader, getProtocolResolvers, getResource, getResourceCache, setClassLoader
-
构造器详细资料
-
ClassRelativeResourceLoader
Create a new ClassRelativeResourceLoader for the given class.- 参数:
clazz- the class to load resources through
-
-
方法详细资料
-
getResourceByPath
从类复制的说明:DefaultResourceLoaderReturn a Resource handle for the resource at the given path.The default implementation supports class path locations. This should be appropriate for standalone implementations but can be overridden, e.g. for implementations targeted at a Servlet container.
- 覆盖:
getResourceByPath在类中DefaultResourceLoader- 参数:
path- the path to the resource- 返回:
- the corresponding Resource handle
- 另请参阅:
-