Skip to content

Commit bdfd983

Browse files
committed
Fix example code formatting in @EnableWebMvc
1 parent 87aaf50 commit bdfd983

File tree

1 file changed

+14
-15
lines changed
  • spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation

1 file changed

+14
-15
lines changed

spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/EnableWebMvc.java

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2017 the original author or authors.
2+
* Copyright 2002-2021 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -33,7 +33,6 @@
3333
* @EnableWebMvc
3434
* @ComponentScan(basePackageClasses = MyConfiguration.class)
3535
* public class MyConfiguration {
36-
*
3736
* }
3837
* </pre>
3938
*
@@ -46,15 +45,15 @@
4645
* &#064;ComponentScan(basePackageClasses = MyConfiguration.class)
4746
* public class MyConfiguration implements WebMvcConfigurer {
4847
*
49-
* &#064;Override
50-
* public void addFormatters(FormatterRegistry formatterRegistry) {
48+
* &#064;Override
49+
* public void addFormatters(FormatterRegistry formatterRegistry) {
5150
* formatterRegistry.addConverter(new MyConverter());
52-
* }
51+
* }
5352
*
54-
* &#064;Override
55-
* public void configureMessageConverters(List&lt;HttpMessageConverter&lt;?&gt;&gt; converters) {
53+
* &#064;Override
54+
* public void configureMessageConverters(List&lt;HttpMessageConverter&lt;?&gt;&gt; converters) {
5655
* converters.add(new MyHttpMessageConverter());
57-
* }
56+
* }
5857
*
5958
* }
6059
* </pre>
@@ -66,7 +65,7 @@
6665
* configuration.
6766
*
6867
* <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}
7069
* annotation and extending directly from {@link WebMvcConfigurationSupport}
7170
* or {@link DelegatingWebMvcConfiguration}, e.g.:
7271
*
@@ -75,16 +74,16 @@
7574
* &#064;ComponentScan(basePackageClasses = { MyConfiguration.class })
7675
* public class MyConfiguration extends WebMvcConfigurationSupport {
7776
*
78-
* &#064;Override
79-
* public void addFormatters(FormatterRegistry formatterRegistry) {
77+
* &#064;Override
78+
* public void addFormatters(FormatterRegistry formatterRegistry) {
8079
* formatterRegistry.addConverter(new MyConverter());
81-
* }
80+
* }
8281
*
83-
* &#064;Bean
84-
* public RequestMappingHandlerAdapter requestMappingHandlerAdapter() {
82+
* &#064;Bean
83+
* public RequestMappingHandlerAdapter requestMappingHandlerAdapter() {
8584
* // Create or delegate to "super" to create and
8685
* // customize properties of RequestMappingHandlerAdapter
87-
* }
86+
* }
8887
* }
8988
* </pre>
9089
*

0 commit comments

Comments
 (0)