类 LocaleChangeInterceptor

    • 方法详细资料

      • setParamName

        public void setParamName​(String paramName)
        Set the name of the parameter that contains a locale specification in a locale change request. Default is "locale".
      • getParamName

        public String getParamName()
        Return the name of the parameter that contains a locale specification in a locale change request.
      • setHttpMethods

        public void setHttpMethods​(@Nullable
                                   String... httpMethods)
        Configure the HTTP method(s) over which the locale can be changed.
        参数:
        httpMethods - the methods
        从以下版本开始:
        4.2
      • setIgnoreInvalidLocale

        public void setIgnoreInvalidLocale​(boolean ignoreInvalidLocale)
        Set whether to ignore an invalid value for the locale parameter.
        从以下版本开始:
        4.2.2
      • isIgnoreInvalidLocale

        public boolean isIgnoreInvalidLocale()
        Return whether to ignore an invalid value for the locale parameter.
        从以下版本开始:
        4.2.2
      • isLanguageTagCompliant

        @Deprecated
        public boolean isLanguageTagCompliant()
        已过时。
        as of 5.1 since it always returns true now
        Return whether to use BCP 47 language tags instead of Java's legacy locale specification format.
        从以下版本开始:
        4.3