Azure / Azure/azure-service-bus-java
Azure service bus jar changing default Spring Boot behavior
- Dominant language
- Java
- Stars
- 62
- Forks
- 63
- PR merge metrics
- No merged PRs in 30d
Description
I am currently using Spring Boot version 2.1.3.RELEASE with version 7.1.0 of Azure service bus.
`implementation group: 'com.azure', name: 'azure-messaging-servicebus', version: '7.1.0'`
Simply adding the line above to my build.gradle script alters default Spring Boot behavior. Hitting a GET endpoint without any Accept header specified is returning XML instead of JSON and creating a RestTemplate now has a bunch of different Accept types. This is causing existing legacy code to break. It appears to be an issue with all versions of azure-messaging-servicebus after it was moved to the new package.
It appears that the issue is the `jackson-dataformat-xml` package that comes along with the jar. Excluding this package from the build returns to normal behavior. I am not sure if this is an issue with how you guys are packaging the library or if it is an issue with Spring just automatically consuming it.
## Actual Behavior
1. Hitting a GET endpoint with no Accept type specified defaults to application/xml being returned
2. Creating a new RestTemplate() defaults the Accept types in the template to [application/xml, text/xml, application/json, application/*+xml, application/*+json]
## Expected Behavior
1. Hitting a GET endpoint with no Accept type specified defaults to application/json being returned
2. Creating a new RestTemplate() defaults the Accept types in the template to [application/json, application/*+json]
## Versions
- OS platform and version: Mac OSX 10.15.7
- Maven package version or commit ID: `implementation group: 'com.azure', name: 'azure-messaging-servicebus', version: '7.1.0'`
Contributor guide
Assessment
This issue has not been assessed yet.