NITHISH
NITHISH

Reputation: 1

i want to connect my spring app to atlas but by default it connects to local host

I want to connect to mongo atlas in my application properties i have this

spring.data.mongo.uri=mongodb+srv://admin:[email protected]/EmployeesManager?retryWrites=true&w=majority&appName=EmployeesManager

but this didn't worked. When i post some data it created a test db in local host and stores the data there.

i have also tried these solutions

#spring.data.mongodb.uri = mongodb+srv://test:[email protected]/employeesEntity
#spring.data.mongodb.uri =mongodb+srv://test:[email protected]/?retryWrites=true&w=majority&appName=EmployeesManager
#spring.data.mongodb.uri=mongodb+srv://test:[email protected]/
#spring.data.mongodb.uri=mongodb://localhost:27017/EmployeeManager
#spring.data.mongo.uri = mongodb+srv://nithish:[email protected]/?retryWrites=true&w=majority&appName=emp
#spring.data.mongo.uri=mongodb+srv://admin:[email protected]/
spring.data.mongo.uri =mongodb+srv://admin:[email protected]/

I want to connect to mongo atlas in my application properties i have this

spring.data.mongo.uri=mongodb+srv://admin:[email protected]/EmployeesManager?retryWrites=true&w=majority&appName=EmployeeManager

but this didn't worked. When i post some data it created a test db in local host and stores the data there.

i have also tried these solutions

#spring.data.mongodb.uri = mongodb+srv://test:[email protected]/employeesEntity
#spring.data.mongodb.uri =mongodb+srv://test:[email protected]/?retryWrites=true&w=majority&appName=EmployeeManager
#spring.data.mongodb.uri=mongodb+srv://test:[email protected]/
#spring.data.mongodb.uri=mongodb://localhost:27017/EmployeesManager
#spring.data.mongo.uri = mongodb+srv://nithish:[email protected]/?retryWrites=true&w=majority&appName=emp
#spring.data.mongo.uri=mongodb+srv://admin:[email protected]/

Upvotes: 0

Views: 30

Answers (0)

Related Questions