parent
91c0fbaadb
commit
e7e5cce735
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2017 the original author or authors.
|
* Copyright 2002-2019 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|
@ -34,7 +34,7 @@ import org.springframework.context.annotation.Import;
|
||||||
* <pre class="code">
|
* <pre class="code">
|
||||||
* @Configuration
|
* @Configuration
|
||||||
* @EnableWebFlux
|
* @EnableWebFlux
|
||||||
* @ComponentScan(basePackageClasses = MyConfiguration.class)
|
* @ComponentScan
|
||||||
* public class MyConfiguration {
|
* public class MyConfiguration {
|
||||||
* }
|
* }
|
||||||
* </pre>
|
* </pre>
|
||||||
|
|
@ -45,22 +45,23 @@ import org.springframework.context.annotation.Import;
|
||||||
* <pre class="code">
|
* <pre class="code">
|
||||||
* @Configuration
|
* @Configuration
|
||||||
* @EnableWebFlux
|
* @EnableWebFlux
|
||||||
* @ComponentScan(basePackageClasses = MyConfiguration.class)
|
* @ComponentScan
|
||||||
* public class MyConfiguration implements WebFluxConfigurer {
|
* public class MyConfiguration implements WebFluxConfigurer {
|
||||||
*
|
|
||||||
* private ObjectMapper objectMapper;
|
|
||||||
*
|
*
|
||||||
* @Override
|
* @Autowired
|
||||||
* public void configureHttpMessageCodecs(ServerCodecConfigurer configurer) {
|
* private ObjectMapper objectMapper;
|
||||||
|
*
|
||||||
|
* @Override
|
||||||
|
* public void configureHttpMessageCodecs(ServerCodecConfigurer configurer) {
|
||||||
* configurer.defaultCodecs().jackson2JsonEncoder(
|
* configurer.defaultCodecs().jackson2JsonEncoder(
|
||||||
* new Jackson2JsonEncoder(objectMapper)
|
* new Jackson2JsonEncoder(objectMapper)
|
||||||
* );
|
* );
|
||||||
* configurer.defaultCodecs().jackson2JsonDecoder(
|
* configurer.defaultCodecs().jackson2JsonDecoder(
|
||||||
* new Jackson2JsonDecoder(objectMapper)
|
* new Jackson2JsonDecoder(objectMapper)
|
||||||
* );
|
* );
|
||||||
* }
|
* }
|
||||||
*
|
*
|
||||||
* // ...
|
* // ...
|
||||||
* }
|
* }
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue