org.springframework.web.servlet.mvc.method

## Class RequestMappingInfo.BuilderConfiguration

- java.lang.Object
- - org.springframework.web.servlet.mvc.method.RequestMappingInfo.BuilderConfiguration

- Enclosing class:
    RequestMappingInfo

      public static class RequestMappingInfo.BuilderConfiguration
      extends Object

  Container for configuration options used for request mapping purposes. Such configuration is required to create RequestMappingInfo instances but is typically used across all RequestMappingInfo instances.
  Since:
    4.2
  See Also:
    `RequestMappingInfo.Builder.options(org.springframework.web.servlet.mvc.method.RequestMappingInfo.BuilderConfiguration)`

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `BuilderConfiguration()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `ContentNegotiationManager` | `getContentNegotiationManager()` Return the ContentNegotiationManager to use for the ProducesRequestCondition, if any.
    `List<String>` | `getFileExtensions()` Deprecated. as of 5.2.4. See class-level note in `RequestMappingHandlerMapping` on the deprecation of path extension config options.
    `PathMatcher` | `getPathMatcher()` Return a custom PathMatcher to use for the PatternsRequestCondition, if any.
    `PathPatternParser` | `getPatternParser()` Return the `configured` `PathPatternParser`, or `null`.
    `UrlPathHelper` | `getUrlPathHelper()` Deprecated. as of 5.3, the path is resolved externally and obtained with `ServletRequestPathUtils.getCachedPathValue(ServletRequest)`; this method always returns `UrlPathHelper.defaultInstance`.
    `void` | `setContentNegotiationManager(ContentNegotiationManager contentNegotiationManager)` Set the ContentNegotiationManager to use for the ProducesRequestCondition.
    `void` | `setPathMatcher(PathMatcher pathMatcher)` Set a custom PathMatcher to use for the PatternsRequestCondition.
    `void` | `setPatternParser(PathPatternParser patternParser)` Enable use of parsed `PathPattern`s as described in `AbstractHandlerMapping.setPatternParser(PathPatternParser)`.
    `void` | `setRegisteredSuffixPatternMatch(boolean registeredSuffixPatternMatch)` Deprecated. as of 5.2.4. See class-level note in `RequestMappingHandlerMapping` on the deprecation of path extension config options.
    `void` | `setSuffixPatternMatch(boolean suffixPatternMatch)` Deprecated. as of 5.2.4. See deprecation note on `RequestMappingHandlerMapping.setUseSuffixPatternMatch(boolean)`.
    `void` | `setTrailingSlashMatch(boolean trailingSlashMatch)` Set whether to apply trailing slash matching in PatternsRequestCondition.
    `void` | `setUrlPathHelper(UrlPathHelper urlPathHelper)` Deprecated. as of 5.3, the path is resolved externally and obtained with `ServletRequestPathUtils.getCachedPathValue(ServletRequest)`
    `boolean` | `useRegisteredSuffixPatternMatch()` Deprecated. as of 5.2.4. See class-level note in `RequestMappingHandlerMapping` on the deprecation of path extension config options.
    `boolean` | `useSuffixPatternMatch()` Deprecated. as of 5.2.4. See deprecation note on `RequestMappingHandlerMapping.setUseSuffixPatternMatch(boolean)`.
    `boolean` | `useTrailingSlashMatch()` Return whether to apply trailing slash matching in PatternsRequestCondition.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### BuilderConfiguration

          public BuilderConfiguration()

  - ### Method Detail

    - #### setPatternParser

          public void setPatternParser(@Nullable
                                       PathPatternParser patternParser)

      Enable use of parsed `PathPattern`s as described in `AbstractHandlerMapping.setPatternParser(PathPatternParser)`.

      Note: This property is mutually exclusive with `setPathMatcher(PathMatcher)`.

      By default this is not enabled.

      Since:
        5.3

    - #### getPatternParser

          @Nullable
          public PathPatternParser getPatternParser()

      Return the `configured` `PathPatternParser`, or `null`.
      Since:
        5.3

    - #### setUrlPathHelper

          @Deprecated
          public void setUrlPathHelper(@Nullable
                                                   UrlPathHelper urlPathHelper)

      Deprecated. as of 5.3, the path is resolved externally and obtained with `ServletRequestPathUtils.getCachedPathValue(ServletRequest)`
      Set a custom UrlPathHelper to use for the PatternsRequestCondition.

      By default this is not set.

      Since:
        4.2.8

    - #### getUrlPathHelper

          @Nullable
           @Deprecated
          public UrlPathHelper getUrlPathHelper()

      Deprecated. as of 5.3, the path is resolved externally and obtained with `ServletRequestPathUtils.getCachedPathValue(ServletRequest)`; this method always returns `UrlPathHelper.defaultInstance`.
      Return the configured UrlPathHelper.

    - #### setPathMatcher

          public void setPathMatcher(@Nullable
                                     PathMatcher pathMatcher)

      Set a custom PathMatcher to use for the PatternsRequestCondition.

      By default this is not set.

    - #### getPathMatcher

          @Nullable
          public PathMatcher getPathMatcher()

      Return a custom PathMatcher to use for the PatternsRequestCondition, if any.

    - #### setTrailingSlashMatch

          public void setTrailingSlashMatch(boolean trailingSlashMatch)

      Set whether to apply trailing slash matching in PatternsRequestCondition.

      By default this is set to 'true'.

    - #### useTrailingSlashMatch

          public boolean useTrailingSlashMatch()

      Return whether to apply trailing slash matching in PatternsRequestCondition.

    - #### setSuffixPatternMatch

          @Deprecated
          public void setSuffixPatternMatch(boolean suffixPatternMatch)

      Deprecated. as of 5.2.4. See deprecation note on `RequestMappingHandlerMapping.setUseSuffixPatternMatch(boolean)`.
      Set whether to apply suffix pattern matching in PatternsRequestCondition.

      By default this is set to 'false'.

      See Also:
        `setRegisteredSuffixPatternMatch(boolean)`

    - #### useSuffixPatternMatch

          @Deprecated
          public boolean useSuffixPatternMatch()

      Deprecated. as of 5.2.4. See deprecation note on `RequestMappingHandlerMapping.setUseSuffixPatternMatch(boolean)`.
      Return whether to apply suffix pattern matching in PatternsRequestCondition.

    - #### setRegisteredSuffixPatternMatch

          @Deprecated
          public void setRegisteredSuffixPatternMatch(boolean registeredSuffixPatternMatch)

      Deprecated. as of 5.2.4. See class-level note in `RequestMappingHandlerMapping` on the deprecation of path extension config options.
      Set whether suffix pattern matching should be restricted to registered file extensions only. Setting this property also sets `suffixPatternMatch=true` and requires that a `setContentNegotiationManager(org.springframework.web.accept.ContentNegotiationManager)` is also configured in order to obtain the registered file extensions.

    - #### useRegisteredSuffixPatternMatch

          @Deprecated
          public boolean useRegisteredSuffixPatternMatch()

      Deprecated. as of 5.2.4. See class-level note in `RequestMappingHandlerMapping` on the deprecation of path extension config options.
      Return whether suffix pattern matching should be restricted to registered file extensions only.

    - #### getFileExtensions

          @Nullable
           @Deprecated
          public List<String> getFileExtensions()

      Deprecated. as of 5.2.4. See class-level note in `RequestMappingHandlerMapping` on the deprecation of path extension config options.
      Return the file extensions to use for suffix pattern matching. If `registeredSuffixPatternMatch=true`, the extensions are obtained from the configured `contentNegotiationManager`.

    - #### setContentNegotiationManager

          public void setContentNegotiationManager(ContentNegotiationManager contentNegotiationManager)

      Set the ContentNegotiationManager to use for the ProducesRequestCondition.

      By default this is not set.

    - #### getContentNegotiationManager

          @Nullable
          public ContentNegotiationManager getContentNegotiationManager()

      Return the ContentNegotiationManager to use for the ProducesRequestCondition, if any.