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 Details

  • 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 interface Toggleable
      Returns:
      true if version based matches filtering is enabled.
    • getDefaultVersion

      public Optional<String> getDefaultVersion()
      Returns:
      The version to use if none can be resolved
    • setDefaultVersion

      public void setDefaultVersion(@Nullable @Nullable String defaultVersion)
      Sets the version to use if the version cannot be resolved. Default value (null).
      Parameters:
      defaultVersion - The default version