How to share spring boot multi-modules project as dependency to another multi-module spring boot project to access rest api from it?
The use case is :
I want to share the rest APIs from the multi-module Spring boot project let's say "A" to another multi-module spring boot project "B" as maven dependencies.
In this case, each module has different API's that needs to be accessed from Project "B"
Each module can be shared with its dependent module to run all the implemented rest api to another project. In simple words, all the project "A" RestControllers class should be accessible from consumer project "B".
When I tried to share it as jar of project "A" to Project "B" it does not throw any error but it should recognize the API endpoints from "A" with the message "This application has no explicit mapping for /error, so you are seeing this as a fallback. There was an unexpected error (type=Not Found, status=404)."
I also tried to add @ComponentScan(basePackages = "com.demo") in configuration but still it did not work.
I found Related question but in my case its multi-module project
Please feel free to ask for any additional information if my question is not clear.
Thank you in advance.