我正在为我的后端使用 mongodb atlas,我正在尝试将它连接到 intellij 的 Mongo Explorer
这是进一步细节的第一张图片
这是我提供数据库用户名和密码但仍然无法连接的第二张图片。
我已经非常轻松地连接到本地主机,没有任何问题,但这没有连接...
我正在使用具有学生许可的 Intellij Idea Ultimate 2017.1.3。我认为这个特定的许可和Ide版本没有问题
提前致谢:)
最佳答案
这是非常简单的步骤:
在 pom.xml 文件中添加这些依赖项:
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-tomcat</artifactId> <scope>provided</scope> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-mongodb</artifactId> </dependency>
您想将此代码添加到 application.properties 文件:
spring.data.mongodb.uri= your_uri_here spring.data.mongodb.database= database_name_here
关于node.js - 无法将 mongodb atlas 连接到 intellij MongoExplorer,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44888112/