org.springframework.web.servlet.resource

Class AbstractVersionStrategy.FileNameVersionPathStrategy

  • java.lang.Object
    • org.springframework.web.servlet.resource.AbstractVersionStrategy.FileNameVersionPathStrategy
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.String addVersion(java.lang.String requestPath, java.lang.String version)
      Add a version to the given request path.
      java.lang.String extractVersion(java.lang.String requestPath)
      Extract the resource version from the request path.
      java.lang.String removeVersion(java.lang.String requestPath, java.lang.String version)
      Remove the version from the request path.
      • Methods inherited from class java.lang.Object

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

      • FileNameVersionPathStrategy

        protected FileNameVersionPathStrategy()
    • Method Detail

      • extractVersion

        @Nullable
        public java.lang.String extractVersion(java.lang.String requestPath)
        Description copied from interface: VersionPathStrategy
        Extract the resource version from the request path.
        Specified by:
        extractVersion in interface VersionPathStrategy
        Parameters:
        requestPath - the request path to check
        Returns:
        the version string or null if none was found
      • addVersion

        public java.lang.String addVersion(java.lang.String requestPath,
                                           java.lang.String version)
        Description copied from interface: VersionPathStrategy
        Add a version to the given request path.
        Specified by:
        addVersion in interface VersionPathStrategy
        Parameters:
        requestPath - the requestPath
        version - the version
        Returns:
        the requestPath updated with a version string