|
1 | 1 | /*
|
2 |
| - * Copyright 2002-2017 the original author or authors. |
| 2 | + * Copyright 2002-2021 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.
|
|
33 | 33 | * @EnableWebMvc
|
34 | 34 | * @ComponentScan(basePackageClasses = MyConfiguration.class)
|
35 | 35 | * public class MyConfiguration {
|
36 |
| - * |
37 | 36 | * }
|
38 | 37 | * </pre>
|
39 | 38 | *
|
|
46 | 45 | * @ComponentScan(basePackageClasses = MyConfiguration.class)
|
47 | 46 | * public class MyConfiguration implements WebMvcConfigurer {
|
48 | 47 | *
|
49 |
| - * @Override |
50 |
| - * public void addFormatters(FormatterRegistry formatterRegistry) { |
| 48 | + * @Override |
| 49 | + * public void addFormatters(FormatterRegistry formatterRegistry) { |
51 | 50 | * formatterRegistry.addConverter(new MyConverter());
|
52 |
| - * } |
| 51 | + * } |
53 | 52 | *
|
54 |
| - * @Override |
55 |
| - * public void configureMessageConverters(List<HttpMessageConverter<?>> converters) { |
| 53 | + * @Override |
| 54 | + * public void configureMessageConverters(List<HttpMessageConverter<?>> converters) { |
56 | 55 | * converters.add(new MyHttpMessageConverter());
|
57 |
| - * } |
| 56 | + * } |
58 | 57 | *
|
59 | 58 | * }
|
60 | 59 | * </pre>
|
|
66 | 65 | * configuration.
|
67 | 66 | *
|
68 | 67 | * <p>If {@link WebMvcConfigurer} does not expose some more advanced setting that
|
69 |
| - * needs to be configured consider removing the {@code @EnableWebMvc} |
| 68 | + * needs to be configured, consider removing the {@code @EnableWebMvc} |
70 | 69 | * annotation and extending directly from {@link WebMvcConfigurationSupport}
|
71 | 70 | * or {@link DelegatingWebMvcConfiguration}, e.g.:
|
72 | 71 | *
|
|
75 | 74 | * @ComponentScan(basePackageClasses = { MyConfiguration.class })
|
76 | 75 | * public class MyConfiguration extends WebMvcConfigurationSupport {
|
77 | 76 | *
|
78 |
| - * @Override |
79 |
| - * public void addFormatters(FormatterRegistry formatterRegistry) { |
| 77 | + * @Override |
| 78 | + * public void addFormatters(FormatterRegistry formatterRegistry) { |
80 | 79 | * formatterRegistry.addConverter(new MyConverter());
|
81 |
| - * } |
| 80 | + * } |
82 | 81 | *
|
83 |
| - * @Bean |
84 |
| - * public RequestMappingHandlerAdapter requestMappingHandlerAdapter() { |
| 82 | + * @Bean |
| 83 | + * public RequestMappingHandlerAdapter requestMappingHandlerAdapter() { |
85 | 84 | * // Create or delegate to "super" to create and
|
86 | 85 | * // customize properties of RequestMappingHandlerAdapter
|
87 |
| - * } |
| 86 | + * } |
88 | 87 | * }
|
89 | 88 | * </pre>
|
90 | 89 | *
|
|
0 commit comments