-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Azure service bus jar changing default Spring Boot behavior #416
Comments
Experiencing the same issues... MappingJackson2XmlHttpMessageConverter is added to our resttemplate after including Azure Service Bus library...This is because Spring will add it to resttemplate when there exists an XmlMapper.class... |
@RobOhRob What do you specifically mean when you mention "Exclude the jackson-dataformat-xml package from the service bus package in the gradle or pom" ? |
Hey. azure-messaging-servicebus depends on azure-core, which has a dependency on The endpoints used by ServiceBusAdministrationClient and ServiceBusAdministrationAsyncClient return/consume XML. However, if you are not going to use those clients, you can exclude jackson-dataformat-xml. |
I moved the bug to our repository. This repo references our legacy library. |
We have already tried the exclusion option in following two ways: compile (group: 'com.azure', name: 'azure-core', version: '1.18.0') { And then the application fails at the receiver startup. |
@RobOhRob, @dhyanivikas : the problematic jackson xml library has been made an optional dependency. This should fix the issue. Please let us know if that is not the case. |
i had the same problem. Thanks. These comments helped me |
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
Expected Behavior
Versions
implementation group: 'com.azure', name: 'azure-messaging-servicebus', version: '7.1.0'
The text was updated successfully, but these errors were encountered: