I cloned below git repo:
github.com/PacktPublishing/Hands-On-Microservices-with-Spring-Boot-and-Spring-Cloud
I have installed latest Java and Spring extensions pack. When I open a new folder pointing to one of the folder for example Chapter09, it correctly recognizes 3 nested projects: api, util, eureka-server, but fails to recognize several nested projects under nested microservices folder. At the root level there is settings.gradle that defines all the nested gradle projects. Here is the screenshot:
In eclipse it works fine but I need to use VS Code.
To sync gradle in VSCode. First open the terminal or cmd from the project folder. Then goto the android folder. Call the gradlew script.
Loading a Gradle project into VS code The first thing you should do is create the project's directory in which the build script will be edited. Then, launch VS Code. Now, the Gradle project's directory needs to be opened by VS Code. To do so, choose the Open Folder option from the File menu.
I saw these messages in the Problems view (e.g. project product-composite-service not being able to resolve its dependency on the api project):
Try removing settings.gradle from folders
microservices\product-composite-service
microservices\product-service
microservices\recommendation-service
microservices\review-service
and then reimport the projects (via command Java: Import Java projects in workspace).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With