Class HeaderVersionResolverConfiguration
java.lang.Object
io.micronaut.web.router.version.resolution.HeaderVersionResolverConfiguration
- All Implemented Interfaces:
Toggleable
@ConfigurationProperties("micronaut.router.versioning.header")
@Requires(property="micronaut.router.versioning.header.enabled",
value="true")
public class HeaderVersionResolverConfiguration
extends Object
implements Toggleable
Configuration for version resolution via headers.
- Since:
- 1.1.0
- Author:
- James Kleeh, graemerocher
-
Field Details
-
PREFIX
- See Also:
-
DEFAULT_HEADER_NAME
- See Also:
-
-
Constructor Details
-
HeaderVersionResolverConfiguration
public HeaderVersionResolverConfiguration()
-
-
Method Details
-
getNames
- Returns:
- The header names to search for the version.
-
setNames
Sets which headers should be searched for a version.- Parameters:
names
- The header names
-
isEnabled
public boolean isEnabled()- Specified by:
isEnabled
in interfaceToggleable
- Returns:
true
If headers should be searched.
-
setEnabled
public void setEnabled(boolean enabled) Sets whether headers should be searched for a version.- Parameters:
enabled
- True if headers should be searched.
-