We have a quite big project based on Spring with an API returning json data by default. As soon as we add the azure-storage-blob library dependency in maven pom, all the controllers instead of returning json by default, are returning xml. I remove the dependency, and back to json.
Seems to be linked with Jackson dataformat, cause when I exclude it :
<dependency>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure-storage-blob</artifactId>
<version>10.3.0</version>
<exclusions>
<exclusion>
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-xml</artifactId>
</exclusion>
</exclusions>
</dependency>
goes back to json.... but azure does not work anymore :)
Do you have any ideas how to deal with that ?
Thanks and have a lovely day
Edit 2018-01-07 : Jackson is an old friend, and I added spring configuration to force json as a fallback format, by it is not ideal:
@Override public void configureContentNegotiation(ContentNegotiationConfigurer conf) {
conf.favorPathExtension(true)
.favorParameter(false)
.ignoreAcceptHeader(true)
.useJaf(false)
.defaultContentType(MediaType.APPLICATION_JSON);
}
This works partialy as some side effects are coming