I have a microservice that is Customer and also I have a common module that is called common. I have been trying to use a file that is called ResponseModel from common module in Customer service.
It says that "add dependency on module 'common main'". Reference is not added even though I click the option.
I am a beginner in Java and using Intellij Idea.
Can anyone help me?
CodePudding user response:
The problem has been solved by removing .idea folder and then rebuilded the project. Thank you so much, @FloFromYet
CodePudding user response:
Take a look here: https://docs.gradle.org/current/userguide/declaring_dependencies_between_subprojects.html
So you can add manually, the common dependency in the customer sub-project. To do this, you need to adapt the build.gradle file of customer:
dependencies {
implementation project(':common')
}
Do not also forgetto reload your project like described here: https://www.jetbrains.com/help/idea/work-with-gradle-projects.html#gradle_refresh_project