Skip to content

Commit d7c44e4

Browse files
committed
Merge branch '2.3.x' into 2.4.x
Closes gh-25061
2 parents 77478d9 + 549d4f7 commit d7c44e4

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

spring-boot-project/spring-boot-docs/src/docs/asciidoc/spring-boot-features.adoc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2566,6 +2566,16 @@ If you want to provide custom instances of `RequestMappingHandlerMapping`, `Requ
25662566

25672567
If you want to take complete control of Spring MVC, you can add your own `@Configuration` annotated with `@EnableWebMvc`, or alternatively add your own `@Configuration`-annotated `DelegatingWebMvcConfiguration` as described in the Javadoc of `@EnableWebMvc`.
25682568

2569+
[NOTE]
2570+
====
2571+
Spring MVC uses a different `ConversionService` to the one used to convert values from your `application.properties` or `application.yaml` file.
2572+
The means that `Period`, `Duration` and `DataSize` converters are not available and that `@DurationUnit` and `@DataSizeUnit` annotations will be ignored.
2573+
2574+
If you want to customize the `ConversionService` used by Spring MVC, you can provide a `WebMvcConfigurer` bean with an `addFormatters` method.
2575+
From this method you can register any converter that you like, or you can delegate to the static methods available on `ApplicationConversionService`.
2576+
====
2577+
2578+
25692579

25702580
[[boot-features-spring-mvc-message-converters]]
25712581
==== HttpMessageConverters

0 commit comments

Comments
 (0)