I'm using mongodb atlas for my backend and I'm trying to connect it to Mongo Explorer of intellij
This is the first image for furthur details
This is the second image where I provided the database username and password but still I'm not able to connect.
I have connected to localhost very easily without any problems but this is not connecting...
I'm using Intellij Idea Ultimate 2017.1.3 with student license. I think there is no problem with this particular license and Ide version
Thanks in advance :)
It is very easy steps:
Add these Dependencies in pom.xml file :
<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>
You want to add this code to application.properties file :
spring.data.mongodb.uri= your_uri_here
spring.data.mongodb.database= database_name_here
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