Package io.micronaut.web.router.version
Class RoutesVersioningConfiguration
java.lang.Object
io.micronaut.web.router.version.RoutesVersioningConfiguration
- All Implemented Interfaces:
Toggleable
@ConfigurationProperties("micronaut.router.versioning")
@Requires(property="micronaut.router.versioning.enabled",
value="true")
public class RoutesVersioningConfiguration
extends Object
implements Toggleable
Routes versioning configuration.
- Since:
- 1.1.0
- Author:
- Bogdan Oros
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
void
setDefaultVersion
(@Nullable String defaultVersion) Sets the version to use if the version cannot be resolved.void
setEnabled
(boolean enabled)
-
Field Details
-
PREFIX
The configuration property.- See Also:
-
-
Constructor Details
-
RoutesVersioningConfiguration
public RoutesVersioningConfiguration()
-
-
Method Details
-
setEnabled
public void setEnabled(boolean enabled) - Parameters:
enabled
- Enables the version based route matches filtering.
-
isEnabled
public boolean isEnabled()- Specified by:
isEnabled
in interfaceToggleable
- Returns:
true
if version based matches filtering is enabled.
-
getDefaultVersion
- Returns:
- The version to use if none can be resolved
-
setDefaultVersion
Sets the version to use if the version cannot be resolved. Default value (null).- Parameters:
defaultVersion
- The default version
-