类 PatternsRequestCondition

    • 构造器详细资料

      • PatternsRequestCondition

        public PatternsRequestCondition​(String... patterns)
        Creates a new instance with the given URL patterns. Each pattern that is not empty and does not start with "/" is prepended with "/".
        参数:
        patterns - 0 or more URL patterns; if 0 the condition will match to every request.
      • PatternsRequestCondition

        public PatternsRequestCondition​(String[] patterns,
                                        UrlPathHelper urlPathHelper,
                                        PathMatcher pathMatcher,
                                        boolean useSuffixPatternMatch,
                                        boolean useTrailingSlashMatch)
        Additional constructor with flags for using suffix pattern (.*) and trailing slash matches.
        参数:
        patterns - the URL patterns to use; if 0, the condition will match to every request.
        urlPathHelper - for determining the lookup path of a request
        pathMatcher - for path matching with patterns
        useSuffixPatternMatch - whether to enable matching by suffix (".*")
        useTrailingSlashMatch - whether to match irrespective of a trailing slash
      • PatternsRequestCondition

        public PatternsRequestCondition​(String[] patterns,
                                        UrlPathHelper urlPathHelper,
                                        PathMatcher pathMatcher,
                                        boolean useSuffixPatternMatch,
                                        boolean useTrailingSlashMatch,
                                        List<String> fileExtensions)
        Creates a new instance with the given URL patterns. Each pattern that is not empty and does not start with "/" is pre-pended with "/".
        参数:
        patterns - the URL patterns to use; if 0, the condition will match to every request.
        urlPathHelper - a UrlPathHelper for determining the lookup path for a request
        pathMatcher - a PathMatcher for pattern path matching
        useSuffixPatternMatch - whether to enable matching by suffix (".*")
        useTrailingSlashMatch - whether to match irrespective of a trailing slash
        fileExtensions - a list of file extensions to consider for path matching