-
Notifications
You must be signed in to change notification settings - Fork 40.8k
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
Inconsistency in spring-boot-starter-jersey #15365
Comments
@raphw thanks for the report but there's not much we can do if you're not using proper dependency management for the project (You can generate an app with jersey on start.spring.io and it won't drag Spring 4). There isn't a |
Judging by the version on the dependency, am I right to assume that you aren’t using Spring Boot’s dependency management? If you’re not using it, is there something that prevents you from doing so? |
I am not using it in this case as I am integrating against a legacy code base where I need to be a bit particular with it which is why I decided to start of with running my own BOM. I was under the impression that any Spring Boot Maven dependency would declare its own needed dependencies in a way that they can be used out-of-the-box, e.g. by explicitly excluding the Spring 4 dependency and including the Spring 5 bridge instead. I found that a bit surprising to learn but thanks for the explanation. |
You can have your own bom and import ours. Alternatively you can provide dependency management for the bits that you need. You could import But I highly encourage you to import our bom if you can. |
I'd do that but I integrate against a bunch of infrastructure code that is compiled against outdated versions of everything. Eventually, I'd like to use the Spring BOM but as a first step, I wanted to drag in isolated Spring dependencies and find some common ground. It's not a problem once you know the issue, I was just surprised that I could not create a single-Spring-only-dependency project without Spring dependency management. Intuitively, I found that to be a bug which could be solved by setting the dependency in the starter POM. |
@snicoll We have the issue related to spring 5 support moving but we need help from Spring Team. |
A simple project with the single dependency
with
will fail to start with the error:
It seems like the Jersey dependency is dragging ing Spring 4 via the HK2 bridge what causes an inconsistency with Spring Boot that is using Spring 5.
The text was updated successfully, but these errors were encountered: