Different version spring boot project as a dependency

  Kiến thức lập trình

I have a scenario where service A is running in spring boot 3.x version and i have a standalone common jar(service B)which is using spring boot 2.x version.
I want to use/add service B as a dependency in Service A.
When i do that i getting issues related to javax issues and many other bean injection issues. Because the service B is build using lower version of spring boot and java version.

Can anyone help on how to handle this?
Any suggestion will be of great help for me.

Note: Migrating service B to spring boot 3.x is not possible since that code is used at many other projects

I tried adding the service B as dependency but it was not working, not sure if multi module approach is suitable for this scenario

New contributor

Gopinath TK is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

LEAVE A COMMENT