@EachProperty(value="micronaut.router.static-resources") public class StaticResourceConfiguration extends Object implements Toggleable
| Modifier and Type | Field and Description |
|---|---|
static boolean |
DEFAULT_ENABLED
The default enable value.
|
static String |
DEFAULT_MAPPING
The default mapping value.
|
static String |
PREFIX
The prefix for static resources configuration.
|
| Constructor and Description |
|---|
StaticResourceConfiguration(ResourceResolver resourceResolver) |
| 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)
resourceResolver - The ResourceResolverpublic 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