Package org.jobrunr.utils.resources
Class ClassPathResourceProvider
java.lang.Object
org.jobrunr.utils.resources.ClassPathResourceProvider
- All Implemented Interfaces:
AutoCloseable
Class to be only used on startup to load all resources (SQL migrations and noSQL migrations) from the classpath.
As Jar files need to be mounted as FileSystems which are static, this class uses explicit locking to ensure that only one
consumer can access the resources at a time. It must thus always be used in a try-with-resources block.
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
ClassPathResourceProvider
public ClassPathResourceProvider()
-
-
Method Details
-
listAllChildrenOnClasspath
-
close
- Specified by:
close
in interfaceAutoCloseable
- Throws:
IllegalStateException
-