Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Web Technology by (4k points)

Being new to Spring Boot I am wondering on how I can configure connection details for MongoDB. I have tried the normal examples but none covers the connection details.

I want to specify the database that is going to be used and the url/port of the host that runs MongoDB.

1 Answer

0 votes
by (8.7k points)

You can do it with the help of two ways either use the following property to change the URL:

Spring.data.mongodb.uri

Or, specify the host and respective port as:

spring.data.mongodb.host=mongoserver

spring.data.mongodb.port=27017

Interested in Web Technology, Check out the MongoDB tutorial by Intellipaat. 

Related questions

Browse Categories

...