Enum WebMvcProperties.LocaleResolver
- java.lang.Object
- java.lang.Enum<WebMvcProperties.LocaleResolver>
- org.springframework.boot.autoconfigure.web.servlet.WebMvcProperties.LocaleResolver
- All Implemented Interfaces:
Serializable
,Comparable<WebMvcProperties.LocaleResolver>
- Enclosing class:
- WebMvcProperties
public static enum WebMvcProperties.LocaleResolver extends Enum<WebMvcProperties.LocaleResolver>
Enum Constant Summary
Enum Constants Enum Constant Description ACCEPT_HEADER
Use the "Accept-Language" header or the configured locale if the header is not set.FIXED
Always use the configured locale.
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static WebMvcProperties.LocaleResolver
valueOf(String name)
Returns the enum constant of this type with the specified name.static WebMvcProperties.LocaleResolver[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
Enum Constant Detail
FIXED
public static final WebMvcProperties.LocaleResolver FIXED
Always use the configured locale.
ACCEPT_HEADER
public static final WebMvcProperties.LocaleResolver ACCEPT_HEADER
Use the "Accept-Language" header or the configured locale if the header is not set.
Method Detail
values
public static WebMvcProperties.LocaleResolver[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (WebMvcProperties.LocaleResolver c : WebMvcProperties.LocaleResolver.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
valueOf
public static WebMvcProperties.LocaleResolver valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null