Package org.springframework.web.servlet.i18n

# Class AbstractLocaleContextResolver

java.lang.Object
org.springframework.web.servlet.i18n.AbstractLocaleResolver
org.springframework.web.servlet.i18n.AbstractLocaleContextResolver

All Implemented Interfaces:
  `LocaleContextResolver`, `LocaleResolver`

Direct Known Subclasses:
  `CookieLocaleResolver`, `FixedLocaleResolver`, `SessionLocaleResolver`

public abstract class AbstractLocaleContextResolver extends AbstractLocaleResolver implements LocaleContextResolver
Abstract base class for `LocaleContextResolver` implementations.

Provides support for a default locale and a default time zone.

Since:
  4.0
Author:
  Juergen Hoeller
See Also:
  - `AbstractLocaleResolver.setDefaultLocale(java.util.Locale)`
  - `setDefaultTimeZone(java.util.TimeZone)`

## Constructor Summary

Constructors
Constructor
Description
`AbstractLocaleContextResolver()`

## Method Summary

Modifier and Type
Method
Description
`TimeZone`
`getDefaultTimeZone()`
Get the default `TimeZone` that this resolver is supposed to fall back to, if any.
`void`
`setDefaultTimeZone(TimeZone defaultTimeZone)`
Set a default `TimeZone` that this resolver will return if no other time zone is found.

### Methods inherited from class org.springframework.web.servlet.i18n.AbstractLocaleResolver

`getDefaultLocale, setDefaultLocale`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface org.springframework.web.servlet.LocaleContextResolver

`resolveLocale, resolveLocaleContext, setLocale, setLocaleContext`

## Constructor Details

### AbstractLocaleContextResolver

public AbstractLocaleContextResolver()

## Method Details

### setDefaultTimeZone

public void setDefaultTimeZone(@Nullable TimeZone defaultTimeZone)
Set a default `TimeZone` that this resolver will return if no other time zone is found.

### getDefaultTimeZone

@Nullable public TimeZone getDefaultTimeZone()
Get the default `TimeZone` that this resolver is supposed to fall back to, if any.