Package io.dropwizard.util
Class Resources
java.lang.Object
io.dropwizard.util.Resources
Provides helper methods to work with resources.
- Since:
- 2.0
-
Method Summary
-
Method Details
-
getResource
Returns aURLpointing toresourceNameif the resource is found using the context class loader. In simple environments, the context class loader will find resources from the class path. In environments where different threads can have different class loaders, for example app servers, the context class loader will typically have been set to an appropriate loader for the current thread.In the unusual case where the context class loader is null, the class loader that loaded this class (
Resources) will be used instead.- Parameters:
resourceName- the name of the resource- Returns:
- the
URLof the resource - Throws:
IllegalArgumentException- if the resource is not found
-