String encoding for any MIME type

CharSequenceEncoder now supports all MIME types, however since encoding
Flux<String> can overlap with other encoders (e.g. SSE) there are now
two ways to create a CharSequenceEncoder -- with support for text/plain
only or with support for any MIME type.

In WebFlux configuration we insert one CharSequenceEncoder for
text/plain (as we have so far) and a second instance with support for
any MIME type at the very end.

Issue: SPR-15374
This commit is contained in:
Rossen Stoyanchev
2017-03-22 17:54:18 -04:00
parent 2896c5d2ab
commit 3d68c496f1
16 changed files with 106 additions and 39 deletions

View File

@@ -43,7 +43,7 @@ public class CharSequenceEncoderTests extends AbstractDataBufferAllocatingTestCa
@Before
public void createEncoder() {
this.encoder = new CharSequenceEncoder();
this.encoder = CharSequenceEncoder.textPlainOnly();
}
@Test