提交 91c0fbaa 编写于 作者: S Sauhard Sharma 提交者: Sam Brannen

Use valid example in Javadoc for @EnableWebFlux

This commit modifies the class-level Javadoc for the @EnableWebFlux
annotation to reference an actual method in WebFluxConfigurer.

Closes gh-23457
上级 c863b899
......@@ -47,10 +47,17 @@ import org.springframework.context.annotation.Import;
* @EnableWebFlux
* @ComponentScan(basePackageClasses = MyConfiguration.class)
* public class MyConfiguration implements WebFluxConfigurer {
*
* private ObjectMapper objectMapper;
*
* @Override
* public void configureMessageWriters(List<HttpMessageWriter<?&gt&gt messageWriters) {
* messageWriters.add(new MyHttpMessageWriter());
* public void configureHttpMessageCodecs(ServerCodecConfigurer configurer) {
* configurer.defaultCodecs().jackson2JsonEncoder(
* new Jackson2JsonEncoder(objectMapper)
* );
* configurer.defaultCodecs().jackson2JsonDecoder(
* new Jackson2JsonDecoder(objectMapper)
* );
* }
*
* // ...
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册