File tree Expand file tree Collapse file tree 1 file changed +10
-9
lines changed
spring-webflux/src/main/java/org/springframework/web/reactive/config Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2002-2017 the original author or authors.
2
+ * Copyright 2002-2019 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
34
34
* <pre class="code">
35
35
* @Configuration
36
36
* @EnableWebFlux
37
- * @ComponentScan(basePackageClasses = MyConfiguration.class)
37
+ * @ComponentScan
38
38
* public class MyConfiguration {
39
39
* }
40
40
* </pre>
45
45
* <pre class="code">
46
46
* @Configuration
47
47
* @EnableWebFlux
48
- * @ComponentScan(basePackageClasses = MyConfiguration.class)
48
+ * @ComponentScan
49
49
* public class MyConfiguration implements WebFluxConfigurer {
50
- *
51
- * private ObjectMapper objectMapper;
52
50
*
53
- * @Override
54
- * public void configureHttpMessageCodecs(ServerCodecConfigurer configurer) {
51
+ * @Autowired
52
+ * private ObjectMapper objectMapper;
53
+ *
54
+ * @Override
55
+ * public void configureHttpMessageCodecs(ServerCodecConfigurer configurer) {
55
56
* configurer.defaultCodecs().jackson2JsonEncoder(
56
57
* new Jackson2JsonEncoder(objectMapper)
57
58
* );
58
59
* configurer.defaultCodecs().jackson2JsonDecoder(
59
60
* new Jackson2JsonDecoder(objectMapper)
60
61
* );
61
- * }
62
+ * }
62
63
*
63
- * // ...
64
+ * // ...
64
65
* }
65
66
* </pre>
66
67
*
You can’t perform that action at this time.
0 commit comments