Jaxb2Marshaller создает одинарные кавычки в файлах xml, так как я добавил зависимость от весеннего облака - PullRequest
0 голосов
/ 23 февраля 2020

Поскольку я добавил эту зависимость в свой проект

<dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
</dependency>

JaxbMarshaller (spring-oxm 5.1.8) создает одинарные кавычки и одинарную разметку. Конечно, все мои тесты не пройдены

Expected :"<?xml version="1.0" encoding="UTF-8"?><orders><order><id>ORDER_2</id><orderDate></orderDate><type>DELIVERY</type><customer><firstName>Michel</firstName><lastName>Durand</lastName><postalCode></postalCode><locale></locale><groups>ROLE_CUSTOMER</groups><customerType>PRIVATE</customerType><active>true</active></customer><orderStatus>IN_PREPARATION</orderStatus><events><date></date><orderStatus>IN_PREPARATION</orderStatus><userId>alaleau</userId></events><expectedTreatmentDate>2018-06-07T00:00:00Z</expectedTreatmentDate><originOrganisationId>LILLE</originOrganisationId><treatmentOrganisationId>LILLE</treatmentOrganisationId><saleChannel><code>STORE</code><name>Store</name></saleChannel><creationDate>2018-06-07T00:00:00Z</creationDate><modificationDate>2018-06-07T00:00:00Z</modificationDate><lines><line><productId>1111</productId><name>Basket Nike</name><quantity>2</quantity></line></lines></order><order><id>ORDER_3</id><orderDate></orderDate><type>WITHDRAWAL</type><customer><firstName>Michel</firstName><lastName>Durand</lastName><postalCode></postalCode><locale></locale><groups>ROLE_CUSTOMER</groups><customerType>PRIVATE</customerType><active>true</active></customer><orderStatus>IN_PREPARATION</orderStatus><events><date></date><orderStatus>IN_PREPARATION</orderStatus><userId>alaleau</userId></events><expectedWithdrawalDate>2018-06-08</expectedWithdrawalDate><expectedWithdrawalTime></expectedWithdrawalTime><expectedTreatmentDate>2018-06-08T12:00:00Z</expectedTreatmentDate><originOrganisationId>LILLE</originOrganisationId><treatmentOrganisationId>LILLE</treatmentOrganisationId><saleChannel><code>STORE</code><name>Store</name></saleChannel><creationDate>2018-06-08T00:00:00Z</creationDate><modificationDate>2018-06-08T00:00:00Z</modificationDate><lines><line><productId>1111</productId><name>Basket Nike</name><quantity>2</quantity></line></lines></order></orders>"
Actual   :"<?xml version='1.0' encoding='UTF-8'?><orders><order><id>ORDER_2</id><orderDate/><type>DELIVERY</type><customer><firstName>Michel</firstName><lastName>Durand</lastName><postalCode></postalCode><locale/><groups>ROLE_CUSTOMER</groups><customerType>PRIVATE</customerType><active>true</active></customer><orderStatus>IN_PREPARATION</orderStatus><events><date/><orderStatus>IN_PREPARATION</orderStatus><userId>alaleau</userId></events><expectedTreatmentDate>2018-06-07T00:00:00Z</expectedTreatmentDate><originOrganisationId>LILLE</originOrganisationId><treatmentOrganisationId>LILLE</treatmentOrganisationId><saleChannel><code>STORE</code><name>Store</name></saleChannel><creationDate>2018-06-07T00:00:00Z</creationDate><modificationDate>2018-06-07T00:00:00Z</modificationDate><lines><line><productId>1111</productId><name>Basket Nike</name><quantity>2</quantity></line></lines></order><order><id>ORDER_3</id><orderDate/><type>WITHDRAWAL</type><customer><firstName>Michel</firstName><lastName>Durand</lastName><postalCode></postalCode><locale/><groups>ROLE_CUSTOMER</groups><customerType>PRIVATE</customerType><active>true</active></customer><orderStatus>IN_PREPARATION</orderStatus><events><date/><orderStatus>IN_PREPARATION</orderStatus><userId>alaleau</userId></events><expectedWithdrawalDate>2018-06-08</expectedWithdrawalDate><expectedWithdrawalTime/><expectedTreatmentDate>2018-06-08T12:00:00Z</expectedTreatmentDate><originOrganisationId>LILLE</originOrganisationId><treatmentOrganisationId>LILLE</treatmentOrganisationId><saleChannel><code>STORE</code><name>Store</name></saleChannel><creationDate>2018-06-08T00:00:00Z</creationDate><modificationDate>2018-06-08T00:00:00Z</modificationDate><lines><line><productId>1111</productId><name>Basket Nike</name><quantity>2</quantity></line></lines></order></orders>"

Я использую Springboot 2.1.2 и Spring Cloud 2.1.6. Я думаю, что весенняя облачная зависимость приносит другую зависимость jaxb, но я не знаю, какая и как ее исключить?

...