From 039416f0eb392976093a2b74a7f0c7fb7c14062c Mon Sep 17 00:00:00 2001 From: Yavuz Tas Date: Sun, 20 Jun 2021 04:42:31 +0200 Subject: [PATCH] BAEL-3682 remove setAutodetectAnnotations in favor of aligning with the article's code samples --- .../main/java/com/baeldung/spring/ConverterExtensionsConfig.java | 1 - .../src/main/java/com/baeldung/spring/WebConfig.java | 1 - 2 files changed, 2 deletions(-) diff --git a/spring-boot-rest/src/main/java/com/baeldung/spring/ConverterExtensionsConfig.java b/spring-boot-rest/src/main/java/com/baeldung/spring/ConverterExtensionsConfig.java index df673b3f03..42bf50ac5f 100644 --- a/spring-boot-rest/src/main/java/com/baeldung/spring/ConverterExtensionsConfig.java +++ b/spring-boot-rest/src/main/java/com/baeldung/spring/ConverterExtensionsConfig.java @@ -20,7 +20,6 @@ public class ConverterExtensionsConfig { final MarshallingHttpMessageConverter xmlConverter = new MarshallingHttpMessageConverter(); final XStreamMarshaller xstreamMarshaller = new XStreamMarshaller(); - xstreamMarshaller.setAutodetectAnnotations(true); xmlConverter.setMarshaller(xstreamMarshaller); xmlConverter.setUnmarshaller(xstreamMarshaller); diff --git a/spring-boot-rest/src/main/java/com/baeldung/spring/WebConfig.java b/spring-boot-rest/src/main/java/com/baeldung/spring/WebConfig.java index 4fce72a75f..69724fda29 100644 --- a/spring-boot-rest/src/main/java/com/baeldung/spring/WebConfig.java +++ b/spring-boot-rest/src/main/java/com/baeldung/spring/WebConfig.java @@ -28,7 +28,6 @@ public class WebConfig implements WebMvcConfigurer { final MarshallingHttpMessageConverter xmlConverter = new MarshallingHttpMessageConverter(); final XStreamMarshaller xstreamMarshaller = new XStreamMarshaller(); - xstreamMarshaller.setAutodetectAnnotations(true); xmlConverter.setMarshaller(xstreamMarshaller); xmlConverter.setUnmarshaller(xstreamMarshaller);