Interface ClassResourceLoader
public interface ClassResourceLoader
Resource loader that works on the classpath or module path.
When not specified Avaje Jex provides a default implementation that looks to find resources using the class loader associated with the ClassResourceLoader.
As a fallback, ClassLoader.getSystemResourceAsStream(String) is used if the loader
returns null.
-
Method Summary
Modifier and TypeMethodDescriptionstatic ClassResourceLoaderCreate aClassResourceLoaderinstance based on a given Class.loadResource(String resourcePath) Loads the specified resource and returns its URL.
-
Method Details
-
fromClass
Create aClassResourceLoaderinstance based on a given Class.- Parameters:
clazz- The class to use for resource loading.- Returns:
- A new
ClassResourceLoaderinstance.
-
loadResource
-