类 ClassRelativeResourceLoader

java.lang.Object
cn.taketoday.core.io.DefaultResourceLoader
cn.taketoday.core.io.ClassRelativeResourceLoader
所有已实现的接口:
ResourceLoader

public class ClassRelativeResourceLoader extends DefaultResourceLoader
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
另请参阅:
  • 字段详细资料

    • clazz

      private final Class<?> clazz
  • 构造器详细资料

    • ClassRelativeResourceLoader

      public ClassRelativeResourceLoader(Class<?> clazz)
      Create a new ClassRelativeResourceLoader for the given class.
      参数:
      clazz - the class to load resources through
  • 方法详细资料

    • getResourceByPath

      protected Resource getResourceByPath(String path)
      从类复制的说明: DefaultResourceLoader
      Return 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
      另请参阅: