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
This commit is contained in:
committed by
Sam Brannen
parent
c863b8994a
commit
91c0fbaadb
@@ -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<?>> messageWriters) {
|
||||
* messageWriters.add(new MyHttpMessageWriter());
|
||||
* public void configureHttpMessageCodecs(ServerCodecConfigurer configurer) {
|
||||
* configurer.defaultCodecs().jackson2JsonEncoder(
|
||||
* new Jackson2JsonEncoder(objectMapper)
|
||||
* );
|
||||
* configurer.defaultCodecs().jackson2JsonDecoder(
|
||||
* new Jackson2JsonDecoder(objectMapper)
|
||||
* );
|
||||
* }
|
||||
*
|
||||
* // ...
|
||||
|
||||
Reference in New Issue
Block a user