Skip to content

Commit 652401b

Browse files
committed
Polish message converter references relating to Jackson 3 upgrade
See gh-45535
1 parent d7c482a commit 652401b

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

module/spring-boot-http-converter/src/main/java/org/springframework/boot/http/converter/autoconfigure/HttpMessageConverters.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public class HttpMessageConverters implements Iterable<HttpMessageConverter<?>>
6161
static {
6262
List<Class<?>> nonReplacingConverters = new ArrayList<>();
6363
addClassIfExists(nonReplacingConverters,
64-
"org.springframework.hateoas.server.mvc.TypeConstrainedMappingJackson2HttpMessageConverter");
64+
"org.springframework.hateoas.server.mvc.TypeConstrainedJacksonJsonHttpMessageConverter");
6565
NON_REPLACING_CONVERTERS = Collections.unmodifiableList(nonReplacingConverters);
6666
}
6767

module/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/web/servlet/WebMvcTypeExcludeFilterTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
import org.springframework.core.type.classreading.MetadataReader;
2929
import org.springframework.core.type.classreading.MetadataReaderFactory;
3030
import org.springframework.core.type.classreading.SimpleMetadataReaderFactory;
31+
import org.springframework.http.converter.json.JacksonJsonHttpMessageConverter;
3132
import org.springframework.security.web.SecurityFilterChain;
3233
import org.springframework.stereotype.Controller;
3334
import org.springframework.stereotype.Repository;
@@ -186,8 +187,7 @@ static class ExampleWebMvcRegistrations implements WebMvcRegistrations {
186187
}
187188

188189
@SuppressWarnings("removal")
189-
static class ExampleMessageConverter
190-
extends org.springframework.http.converter.json.MappingJackson2HttpMessageConverter {
190+
static class ExampleMessageConverter extends JacksonJsonHttpMessageConverter {
191191

192192
}
193193

module/spring-boot-webmvc/src/main/java/org/springframework/boot/webmvc/autoconfigure/actuate/web/WebMvcEndpointManagementContextConfiguration.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -160,11 +160,8 @@ static EndpointJsonMapperWebMvcConfigurer endpointJsonMapperWebMvcConfigurer(
160160

161161
/**
162162
* {@link WebMvcConfigurer} to apply {@link EndpointJsonMapper} for
163-
* {@link OperationResponseBody} to
164-
* {@link org.springframework.http.converter.json.MappingJackson2HttpMessageConverter}
165-
* instances.
163+
* {@link OperationResponseBody} to {@link JacksonJsonHttpMessageConverter} instances.
166164
*/
167-
@SuppressWarnings("removal")
168165
static class EndpointJsonMapperWebMvcConfigurer implements WebMvcConfigurer {
169166

170167
private static final List<MediaType> MEDIA_TYPES = Collections
@@ -177,6 +174,7 @@ static class EndpointJsonMapperWebMvcConfigurer implements WebMvcConfigurer {
177174
}
178175

179176
@Override
177+
@SuppressWarnings("removal")
180178
public void configureMessageConverters(List<HttpMessageConverter<?>> converters) {
181179
for (HttpMessageConverter<?> converter : converters) {
182180
if (converter instanceof JacksonJsonHttpMessageConverter jacksonJsonHttpMessageConverter) {

0 commit comments

Comments
 (0)