MappingJackson2XmlHttpMessageConverter and the Boot-Web Dependency

I’m spending a lot of time in Gradle these days and more specifically, using the Spring Boot Gradle Plugin. I upgraded the plugin from 1.1.5 to 1.2.2 which fixed one issue but introduced another problem when launching my Spring Boot web app. I was seeing Jackson errors for REST services I was not currently using.

If you look at the newer Plugin dependencies you’ll see the o.s.b:spring-boot-starter is no longer used, but rather o.s.b:spring-boot-starter-web. The new boot-starter-web dependency supplies Jackson and the other “blessed” artifacts, as Spring Boot refers to them. haha.

The new dependency list for my Spring Boot Wicket project just getting underway looks like this, with no more Jackson errors on launch.

To summarize, if you’re seeing weird Jackson errors in your Gradle build and you’re not using REST in your Spring Boot Web app, check your Gradle Plugin Version (at this point in Geek Time, v1.2.2), and if using 1.2.2, compile with spring-boot-starter-web rather than spring-boot-starter.