接口的使用
org.springframework.web.servlet.LocaleResolver
使用LocaleResolver的程序包 程序包 说明 org.springframework.test.web.servlet.setup Contains built-inMockMvcBuilderimplementations.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.web.servlet.support Support classes for Spring's web MVC framework.org.springframework.test.web.servlet.setup中LocaleResolver的使用
参数类型为LocaleResolver的org.springframework.test.web.servlet.setup中的方法 修饰符和类型 方法 说明 StandaloneMockMvcBuilderStandaloneMockMvcBuilder. setLocaleResolver(LocaleResolver localeResolver)Provide a LocaleResolver instance.org.springframework.web.servlet中LocaleResolver的使用
org.springframework.web.servlet中LocaleResolver的子接口 修饰符和类型 接口 说明 interfaceLocaleContextResolverExtension ofLocaleResolver, adding support for a rich locale context (potentially including locale and time zone information).org.springframework.web.servlet.i18n中LocaleResolver的使用
实现LocaleResolver的org.springframework.web.servlet.i18n中的类 修饰符和类型 类 说明 classAbstractLocaleContextResolverAbstract base class forLocaleContextResolverimplementations.classAbstractLocaleResolverAbstract base class forLocaleResolverimplementations.classAcceptHeaderLocaleResolverLocaleResolverimplementation that simply uses the primary locale specified in the "accept-language" header of the HTTP request (that is, the locale sent by the client browser, normally that of the client's OS).classCookieLocaleResolverLocaleResolverimplementation that uses a cookie sent back to the user in case of a custom setting, with a fallback to the specified default locale or the request's accept-header locale.classFixedLocaleResolverLocaleResolverimplementation that always returns a fixed default locale and optionally time zone.classSessionLocaleResolverLocaleResolverimplementation that uses a locale attribute in the user's session in case of a custom setting, with a fallback to the specified default locale or the request's accept-header locale.org.springframework.web.servlet.support中LocaleResolver的使用
返回LocaleResolver的org.springframework.web.servlet.support中的方法 修饰符和类型 方法 说明 static LocaleResolverRequestContextUtils. getLocaleResolver(HttpServletRequest request)Return the LocaleResolver that has been bound to the request by the DispatcherServlet.