mirror of
https://github.com/spring-projects/spring-boot.git
synced 2026-09-17 12:09:16 +00:00
Polish message converter references relating to Jackson 3 upgrade
See gh-45535
This commit is contained in:
+1
-1
@@ -61,7 +61,7 @@ public class HttpMessageConverters implements Iterable<HttpMessageConverter<?>>
|
||||
static {
|
||||
List<Class<?>> nonReplacingConverters = new ArrayList<>();
|
||||
addClassIfExists(nonReplacingConverters,
|
||||
"org.springframework.hateoas.server.mvc.TypeConstrainedMappingJackson2HttpMessageConverter");
|
||||
"org.springframework.hateoas.server.mvc.TypeConstrainedJacksonJsonHttpMessageConverter");
|
||||
NON_REPLACING_CONVERTERS = Collections.unmodifiableList(nonReplacingConverters);
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -28,6 +28,7 @@ import org.springframework.context.annotation.FilterType;
|
||||
import org.springframework.core.type.classreading.MetadataReader;
|
||||
import org.springframework.core.type.classreading.MetadataReaderFactory;
|
||||
import org.springframework.core.type.classreading.SimpleMetadataReaderFactory;
|
||||
import org.springframework.http.converter.json.JacksonJsonHttpMessageConverter;
|
||||
import org.springframework.security.web.SecurityFilterChain;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.stereotype.Repository;
|
||||
@@ -186,8 +187,7 @@ class WebMvcTypeExcludeFilterTests {
|
||||
}
|
||||
|
||||
@SuppressWarnings("removal")
|
||||
static class ExampleMessageConverter
|
||||
extends org.springframework.http.converter.json.MappingJackson2HttpMessageConverter {
|
||||
static class ExampleMessageConverter extends JacksonJsonHttpMessageConverter {
|
||||
|
||||
}
|
||||
|
||||
|
||||
+2
-4
@@ -160,11 +160,8 @@ public class WebMvcEndpointManagementContextConfiguration {
|
||||
|
||||
/**
|
||||
* {@link WebMvcConfigurer} to apply {@link EndpointJsonMapper} for
|
||||
* {@link OperationResponseBody} to
|
||||
* {@link org.springframework.http.converter.json.MappingJackson2HttpMessageConverter}
|
||||
* instances.
|
||||
* {@link OperationResponseBody} to {@link JacksonJsonHttpMessageConverter} instances.
|
||||
*/
|
||||
@SuppressWarnings("removal")
|
||||
static class EndpointJsonMapperWebMvcConfigurer implements WebMvcConfigurer {
|
||||
|
||||
private static final List<MediaType> MEDIA_TYPES = Collections
|
||||
@@ -177,6 +174,7 @@ public class WebMvcEndpointManagementContextConfiguration {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("removal")
|
||||
public void configureMessageConverters(List<HttpMessageConverter<?>> converters) {
|
||||
for (HttpMessageConverter<?> converter : converters) {
|
||||
if (converter instanceof JacksonJsonHttpMessageConverter jacksonJsonHttpMessageConverter) {
|
||||
|
||||
Reference in New Issue
Block a user