Class HeaderVersionResolverConfiguration

  • All Implemented Interfaces:
    io.micronaut.core.util.Toggleable

    @ConfigurationProperties("micronaut.router.versioning.header")
    @Requires(property="micronaut.router.versioning.header.enabled",
              value="true")
    public class HeaderVersionResolverConfiguration
    extends java.lang.Object
    implements io.micronaut.core.util.Toggleable
    Configuration for version resolution via headers.
    Since:
    1.1.0
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String DEFAULT_HEADER_NAME  
      static java.lang.String PREFIX  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.List<java.lang.String> getNames()  
      boolean isEnabled()  
      void setEnabled​(boolean enabled)
      Sets whether headers should be searched for a version.
      void setNames​(java.util.List<java.lang.String> names)
      Sets which headers should be searched for a version.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • HeaderVersionResolverConfiguration

        public HeaderVersionResolverConfiguration()
    • Method Detail

      • getNames

        public java.util.List<java.lang.String> getNames()
        Returns:
        The header names to search for the version.
      • setNames

        public void setNames​(java.util.List<java.lang.String> names)
        Sets which headers should be searched for a version.
        Parameters:
        names - The header names
      • isEnabled

        public boolean isEnabled()
        Specified by:
        isEnabled in interface io.micronaut.core.util.Toggleable
        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.