Package org.springframework.http.codec

# Interface ServerCodecConfigurer

All Superinterfaces:
  `CodecConfigurer`

All Known Implementing Classes:
  `DefaultServerCodecConfigurer`

public interface ServerCodecConfigurer extends CodecConfigurer
Extension of `CodecConfigurer` for HTTP message reader and writer options relevant on the server side.

HTTP message readers for the following are registered by default:

`byte[]`
- `ByteBuffer`
- `DataBuffer`
- `Resource`
- `String`
- `MultiValueMap<String,String>` for form data
- `MultiValueMap<String,Object>` for multipart data
- JSON and Smile, if Jackson is present
- XML, if JAXB2 is present

HTTP message writers registered by default:

`byte[]`
- `ByteBuffer`
- `DataBuffer`
- `Resource`
- `String`
- `MultiValueMap<String,String>` for form data
- JSON and Smile, if Jackson is present
- XML, if JAXB2 is present
- Server-Sent Events

Since:
  5.0
Author:
  Rossen Stoyanchev

## Nested Class Summary

Nested Classes
Modifier and Type
Interface
Description
`static interface`
`ServerCodecConfigurer.ServerDefaultCodecs`
`CodecConfigurer.DefaultCodecs` extension with extra server-side options.

## Nested classes/interfaces inherited from interface org.springframework.http.codec.CodecConfigurer

`CodecConfigurer.CustomCodecs, CodecConfigurer.DefaultCodecConfig, CodecConfigurer.DefaultCodecs, CodecConfigurer.MultipartCodecs`

## Method Summary

Modifier and Type
Method
Description
`ServerCodecConfigurer`
`clone()`
Create a copy of this `CodecConfigurer`.
`static ServerCodecConfigurer`
`create()`
Static factory method for a `ServerCodecConfigurer`.
`ServerCodecConfigurer.ServerDefaultCodecs`
`defaultCodecs()`
Provides a way to customize or replace HTTP message readers and writers registered by default.

### Methods inherited from interface org.springframework.http.codec.CodecConfigurer

`customCodecs, getReaders, getWriters, registerDefaults`

## Method Details

### defaultCodecs

ServerCodecConfigurer.ServerDefaultCodecs defaultCodecs()
Provides a way to customize or replace HTTP message readers and writers registered by default.

On the server side, built-in default also include customizations related to the encoder for SSE.

Specified by:
  `defaultCodecs` in interface `CodecConfigurer`
See Also:
  - `CodecConfigurer.registerDefaults(boolean)`

### clone

ServerCodecConfigurer clone()
Create a copy of this `CodecConfigurer`. The returned clone has its own lists of default and custom codecs and generally can be configured independently. Keep in mind however that codec instances (if any are configured) are themselves not cloned.

Specified by:
  `clone` in interface `CodecConfigurer`

### create

static ServerCodecConfigurer create()
Static factory method for a `ServerCodecConfigurer`.