Package | Description |
---|---|
org.springframework.test.web.servlet.client |
Support for testing Spring MVC applications via
WebTestClient
with MockMvc for server request
handling. |
org.springframework.test.web.servlet.setup |
Contains built-in
MockMvcBuilder implementations. |
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.config.annotation |
Annotation-based setup for Spring MVC.
|
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.
|
Modifier and Type | Method and Description |
---|---|
MockMvcWebTestClient.ControllerSpec |
MockMvcWebTestClient.ControllerSpec.localeResolver(LocaleResolver localeResolver)
Provide the LocaleResolver to use.
|
Modifier and Type | Method and Description |
---|---|
StandaloneMockMvcBuilder |
StandaloneMockMvcBuilder.setLocaleResolver(LocaleResolver localeResolver)
Provide a LocaleResolver instance.
|
Modifier and Type | Interface and Description |
---|---|
interface |
LocaleContextResolver
Extension of
LocaleResolver that adds support for a rich locale context
(potentially including locale and time zone information). |
Modifier and Type | Method and Description |
---|---|
LocaleResolver |
WebMvcConfigurationSupport.localeResolver() |
Modifier and Type | Class and Description |
---|---|
class |
AbstractLocaleContextResolver
Abstract base class for
LocaleContextResolver implementations. |
class |
AbstractLocaleResolver
Abstract base class for
LocaleResolver implementations. |
class |
AcceptHeaderLocaleResolver
LocaleResolver implementation 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). |
class |
CookieLocaleResolver
LocaleResolver implementation that uses a cookie sent back to the user
in case of a custom setting, with a fallback to the configured default locale,
the request's Accept-Language header, or the default locale for the server. |
class |
FixedLocaleResolver
LocaleResolver implementation
that always returns a fixed default locale and optionally time zone. |
class |
SessionLocaleResolver
LocaleResolver implementation that
uses a locale attribute in the user's session in case of a custom setting,
with a fallback to the configured default locale, the request's
Accept-Language header, or the default locale for the server. |
Modifier and Type | Method and Description |
---|---|
static LocaleResolver |
RequestContextUtils.getLocaleResolver(HttpServletRequest request)
Return the
LocaleResolver that has been bound to the request by the
DispatcherServlet . |