I am trying to setup a project with spring to use mongodb.
I have previously used nodejs to connect to mongodb and I can see my updates in my cluster but when I try to use spring, I dont see my documents.
If i query the db it returns what I added locally which means data is not replicated to the cluster.
I see this prompt from spring and not sure why it is connecting locally. → “Monitor thread successfully connected to server with description ServerDescription{address=localhost:27017”
Can somebody help with this?
Any pointers or assistance will be appreciated
My URI is defined correclty
spring:
data:
mongodb:
uri : mongodb+srv://username:password@springdb.yo6vwix.mongodb.net/?retryWrites=true&w=majority
database : Tasks