@EachProperty(value="micronaut.router.static-resources") public class StaticResourceConfiguration extends Object implements Toggleable
| Modifier and Type | Field and Description | 
|---|---|
| static boolean | DEFAULT_ENABLEDThe default enable value. | 
| static String | DEFAULT_MAPPINGThe default mapping value. | 
| static String | PREFIXThe prefix for static resources configuration. | 
| Constructor and Description | 
|---|
| StaticResourceConfiguration(ResourceResolver resourceResolver,
                           ServerContextPathProvider contextPathProvider) | 
| Modifier and Type | Method and Description | 
|---|---|
| String | getMapping()The static resource mapping. | 
| List<ResourceLoader> | getResourceLoaders() | 
| boolean | isEnabled() | 
| void | setEnabled(boolean enabled)Sets whether this specific mapping is enabled. | 
| void | setMapping(String mapping)The path resources should be served from. | 
| void | setPaths(List<String> paths)A list of paths either starting with `classpath:` or `file:`. | 
public static final String PREFIX
public static final boolean DEFAULT_ENABLED
public static final String DEFAULT_MAPPING
public StaticResourceConfiguration(ResourceResolver resourceResolver, @Nullable ServerContextPathProvider contextPathProvider)
resourceResolver - The ResourceResolvercontextPathProvider - The context path providerpublic boolean isEnabled()
isEnabled in interface Toggleablepublic List<ResourceLoader> getResourceLoaders()
ResourceLoader available for the pathpublic String getMapping()
public void setEnabled(boolean enabled)
enabled - True if they are enabled.public void setPaths(List<String> paths)
paths - The paths