Skip to content
Advertisement

How to call class from another module in SpringBoot, Java

I have a Spring Boot multi-module gradle project, and I am trying to call class from another module. I have a HttpDataClient.java class that I would like to call in DataResolver.java class in another module.

HttpDataClient.java

JavaScript

So, this class should return some response data from Data service. After I would like to get that response data and do something in class in other module.

I am trying to do it like this:

DataResolver.java

JavaScript

But my HttpGameDataClient class that I am trying to use it is not recognized by DataResolver.java class.

What am I missing here? Any advice is appreciated.

Advertisement

Answer

Be sure the module you need is put as a dependency to the module who need it.

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement