接口的使用
org.springframework.context.i18n.LocaleContext
使用LocaleContext的程序包 程序包 说明 org.springframework.context.i18n Abstraction for determining the current Locale, plus global holder that exposes a thread-bound Locale.org.springframework.web.server Core interfaces and classes for Spring's generic, reactive web support.org.springframework.web.server.adapter Implementations to adapt to the underlyingorg.springframework.http.client.reactivereactive HTTP adapter andHttpHandler.org.springframework.web.server.i18n Locale related support classes.org.springframework.web.servlet Provides servlets that integrate with the application context infrastructure, and the core interfaces and classes for the Spring web MVC framework.org.springframework.web.servlet.i18n Locale support classes for Spring's web MVC framework.org.springframework.context.i18n中LocaleContext的使用
org.springframework.context.i18n中LocaleContext的子接口 修饰符和类型 接口 说明 interfaceTimeZoneAwareLocaleContextExtension ofLocaleContext, adding awareness of the current time zone.实现LocaleContext的org.springframework.context.i18n中的类 修饰符和类型 类 说明 classSimpleLocaleContextSimple implementation of theLocaleContextinterface, always returning a specifiedLocale.classSimpleTimeZoneAwareLocaleContextSimple implementation of theTimeZoneAwareLocaleContextinterface, always returning a specifiedLocaleandTimeZone.返回LocaleContext的org.springframework.context.i18n中的方法 修饰符和类型 方法 说明 static LocaleContextLocaleContextHolder. getLocaleContext()Return the LocaleContext associated with the current thread, if any.参数类型为LocaleContext的org.springframework.context.i18n中的方法 修饰符和类型 方法 说明 static LocaleLocaleContextHolder. getLocale(LocaleContext localeContext)Return the Locale associated with the given user context, if any, or the system default Locale otherwise.static TimeZoneLocaleContextHolder. getTimeZone(LocaleContext localeContext)Return the TimeZone associated with the given user context, if any, or the system default TimeZone otherwise.static voidLocaleContextHolder. setLocaleContext(LocaleContext localeContext)Associate the given LocaleContext with the current thread, not exposing it as inheritable for child threads.static voidLocaleContextHolder. setLocaleContext(LocaleContext localeContext, boolean inheritable)Associate the given LocaleContext with the current thread.org.springframework.web.server中LocaleContext的使用
返回LocaleContext的org.springframework.web.server中的方法 修饰符和类型 方法 说明 LocaleContextServerWebExchange. getLocaleContext()Return theLocaleContextusing the configuredLocaleContextResolver.LocaleContextServerWebExchangeDecorator. getLocaleContext()org.springframework.web.server.adapter中LocaleContext的使用
返回LocaleContext的org.springframework.web.server.adapter中的方法 修饰符和类型 方法 说明 LocaleContextDefaultServerWebExchange. getLocaleContext()org.springframework.web.server.i18n中LocaleContext的使用
返回LocaleContext的org.springframework.web.server.i18n中的方法 修饰符和类型 方法 说明 LocaleContextAcceptHeaderLocaleContextResolver. resolveLocaleContext(ServerWebExchange exchange)LocaleContextFixedLocaleContextResolver. resolveLocaleContext(ServerWebExchange exchange)LocaleContextLocaleContextResolver. resolveLocaleContext(ServerWebExchange exchange)Resolve the current locale context via the given exchange.参数类型为LocaleContext的org.springframework.web.server.i18n中的方法 修饰符和类型 方法 说明 voidAcceptHeaderLocaleContextResolver. setLocaleContext(ServerWebExchange exchange, LocaleContext locale)voidFixedLocaleContextResolver. setLocaleContext(ServerWebExchange exchange, LocaleContext localeContext)voidLocaleContextResolver. setLocaleContext(ServerWebExchange exchange, LocaleContext localeContext)Set the current locale context to the given one, potentially including a locale with associated time zone information.org.springframework.web.servlet中LocaleContext的使用
返回LocaleContext的org.springframework.web.servlet中的方法 修饰符和类型 方法 说明 protected LocaleContextDispatcherServlet. buildLocaleContext(HttpServletRequest request)Build a LocaleContext for the given request, exposing the request's primary locale as current locale.protected LocaleContextFrameworkServlet. buildLocaleContext(HttpServletRequest request)Build a LocaleContext for the given request, exposing the request's primary locale as current locale.LocaleContextLocaleContextResolver. resolveLocaleContext(HttpServletRequest request)Resolve the current locale context via the given request.参数类型为LocaleContext的org.springframework.web.servlet中的方法 修饰符和类型 方法 说明 voidLocaleContextResolver. setLocaleContext(HttpServletRequest request, HttpServletResponse response, LocaleContext localeContext)Set the current locale context to the given one, potentially including a locale with associated time zone information.org.springframework.web.servlet.i18n中LocaleContext的使用
返回LocaleContext的org.springframework.web.servlet.i18n中的方法 修饰符和类型 方法 说明 LocaleContextCookieLocaleResolver. resolveLocaleContext(HttpServletRequest request)LocaleContextFixedLocaleResolver. resolveLocaleContext(HttpServletRequest request)LocaleContextSessionLocaleResolver. resolveLocaleContext(HttpServletRequest request)参数类型为LocaleContext的org.springframework.web.servlet.i18n中的方法 修饰符和类型 方法 说明 voidCookieLocaleResolver. setLocaleContext(HttpServletRequest request, HttpServletResponse response, LocaleContext localeContext)voidFixedLocaleResolver. setLocaleContext(HttpServletRequest request, HttpServletResponse response, LocaleContext localeContext)voidSessionLocaleResolver. setLocaleContext(HttpServletRequest request, HttpServletResponse response, LocaleContext localeContext)