Reputation: 1149
I'm working on a Spring Boot Application using Gradle as a dependency management system or whatever.
After adding a couple of dependencies to the build script and rebuilding the project, I would expect the build to have added those dependencies to the project. And yet, it does not. Cannot import those libraries. What step am I missing?? I am a node.js developer and am used to just running an npm install
to import dependencies.
Here are the dependencies:
dependencies {
compile('org.mongodb:mongodb-driver:3.2.2')
compile('org.springframework.boot:spring-boot-starter-data-mongodb')
}
Not that it matters, since they were not added to the project, but here are the eventual import statements:
import org.mongodb.MongoClient;
import org.springframework.data.mongodb.core.MongoTemplate;
Upvotes: 12
Views: 8898
Reputation: 1149
Ok, so there is a right-hand menu bar, viz:
And the gradle tab has a refresh option:
That'll do it. Ugh, ide's...
Upvotes: 20