markthegrea
markthegrea

Reputation: 3841

How do i force spring-boot to use jaxb?

We have some xml that uses capitol letters for all fields. Spring boot automatically uses jackson which does not work well with this. I have the xml "jaxb"d into java objects that tell it to use the capitol letters. However spring always seems to use Jackson.

Anyway to force it to use Jaxb?

Upvotes: 1

Views: 1111

Answers (1)

Manos Nikolaidis
Manos Nikolaidis

Reputation: 22224

You can find here a list of commonly used in spring-boot properties for your application.properties file. You probably need:

spring.jackson.property-naming-strategy=UPPER_CAMEL_CASE

Here are the available naming strategies for Jackson.

If you insist on Jaxb I believe it will be used by spring boot unless you include jackson-dataformat-xml in your classpath (may have to exclude it).

Upvotes: 1

Related Questions