Update docs to mention Boot's HttpMessageConverters
Closes gh-30538
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2021 the original author or authors.
|
||||
* Copyright 2002-2023 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -166,10 +166,14 @@ public interface WebMvcConfigurer {
|
||||
* <p>By default, all built-in converters are configured as long as the
|
||||
* corresponding 3rd party libraries such Jackson JSON, JAXB2, and others
|
||||
* are present on the classpath.
|
||||
* <p><strong>Note</strong> use of this method turns off default converter
|
||||
* registration. Alternatively, use
|
||||
* {@link #extendMessageConverters(java.util.List)} to modify that default
|
||||
* list of converters.
|
||||
* <p>Note that use of this method turns off default converter
|
||||
* registration. However, in a Spring Boot application the
|
||||
* {@code WebMvcAutoConfiguration} adds any {@code HttpMessageConverter}
|
||||
* beans as well as default converters. Hence, in a Boot application use
|
||||
* <a href="https://docs.spring.io/spring-boot/docs/current/reference/html/web.html#web.servlet.spring-mvc.message-converters">HttpMessageConverters</a>.
|
||||
* Alternatively, for any scenario, use
|
||||
* {@link #extendMessageConverters(java.util.List)} to modify the configured
|
||||
* list of message converters.
|
||||
* @param converters initially an empty list of converters
|
||||
*/
|
||||
default void configureMessageConverters(List<HttpMessageConverter<?>> converters) {
|
||||
|
||||
Reference in New Issue
Block a user