无法将mongodb图集连接到intellij MongoExplorer

Bha*_*rat 5 intellij-idea mongodb node.js mongodb-atlas

我正在使用 mongodb atlas 作为我的后端,我正在尝试将它连接到 intellij 的 Mongo Explorer

这是进一步细节的第一张图片

我已经用实际的数据库密码替换了 <PASSWORD>

这是我提供了数据库用户名和密码的第二张图片,但我仍然无法连接。

错误图片

我已经很容易地连接到本地主机没有任何问题,但这不是连接...

我正在使用带有学生许可证的 Intellij Idea Ultimate 2017.1.3。我认为这个特定的许可证和 Ide 版本没有问题

提前致谢 :)

小智 2

步骤非常简单:

  1. 在 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>
    
    Run Code Online (Sandbox Code Playgroud)

  2. 您想将此代码添加到 application.properties 文件中:

     spring.data.mongodb.uri= your_uri_here
     spring.data.mongodb.database= database_name_here
    
    Run Code Online (Sandbox Code Playgroud)

在此输入图像描述

在此输入图像描述