You can register static mappings between keys (i.e. the expected value of
the query parameter) and MediaType's via addMapping(String, MediaType).
As of 5.0 this strategy also supports dynamic lookups of keys via
org..
| Modifier and Type | Field and Description |
|---|---|
| private String |
| Access | Constructor and Description |
|---|---|
| public | ParameterContentNegotiationStrategy(Map<String, MediaType> mediaTypes)
Create an instance with the given map of file extensions and media types. |
| Modifier and Type | Method and Description |
|---|---|
| protected String | getMediaTypeKey(NativeWebRequest request)
Implements abstract org. |
| public String | |
| public void | setParameterName(String parameterName)
Set the name of the parameter to use to determine requested media types. |
| parameterName | back to summary |
|---|---|
| private String parameterName | |
| ParameterContentNegotiationStrategy | back to summary |
|---|---|
| public ParameterContentNegotiationStrategy(Map<String, MediaType> mediaTypes) Create an instance with the given map of file extensions and media types. | |
| getMediaTypeKey | back to summary |
|---|---|
| protected String getMediaTypeKey(NativeWebRequest request) Implements abstract org. Doc from org. Extract a key from the request to use to look up media types. | |
| getParameterName | back to summary |
|---|---|
| public String getParameterName() | |
| setParameterName | back to summary |
|---|---|
| public void setParameterName(String parameterName) Set the name of the parameter to use to determine requested media types. By default this is set to | |