Java – gradle dependencies are not recognized in IntelliJ
•
Java
I am using gradle as a dependency management system or any other way to develop spring boot application
After adding several dependencies to the build script and rebuilding the project, I want to add them to the project But this is not the case These libraries cannot be imported What steps did I miss? I'm node JS developers, I'm used to running NPM install to import dependencies
The following are dependencies:
dependencies { compile('org.mongodb:mongodb-driver:3.2.2') compile('org.springframework.boot:spring-boot-starter-data-mongodb') }
It is not important because they are not added to the project, but here is the final import statement:
import org.mongodb.MongoClient; import org.springframework.data.mongodb.core.MongoTemplate;
Solution
OK, so there is a menu bar on the right, that is:
The gradle tab has a refresh option:
That's all Uh, ide
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码