Package io.micronaut.http.resource
Class ResourceLoaderFactory
java.lang.Object
io.micronaut.http.resource.ResourceLoaderFactory
Creates beans for
ResourceLoader
s to handle static resource requests. Registers a resource resolver that
uses those beans.- Since:
- 1.0
- Author:
- James Kleeh, graemerocher
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected @NonNull FileSystemResourceLoader
protected @NonNull ClassPathResourceLoader
protected @NonNull ResourceResolver
resourceResolver
(@NonNull List<ResourceLoader> resourceLoaders)
-
Constructor Details
-
ResourceLoaderFactory
The resource factory.- Parameters:
environment
- The environment
-
-
Method Details
-
getClassPathResourceLoader
- Returns:
- The class path resource loader
-
fileSystemResourceLoader
- Returns:
- The file system resource loader
-
resourceResolver
@Singleton @Indexed(ResourceResolver.class) @NonNull protected @NonNull ResourceResolver resourceResolver(@NonNull @NonNull List<ResourceLoader> resourceLoaders) - Parameters:
resourceLoaders
- The resource loaders- Returns:
- The resource resolver
-