Issue
When trying to just make sure the connect is working, this error arises.
This is the connect string, Connection string
This is my aapp.properties,
spring.data.mongodb.uri=mongodb+srv://jamescervamtes:[email protected]/TheShop
spring.data.mongodb.database=TheShop
I tried everything, and I am just expecting for the app to bee runnning showing me the connect to mongo is made and successful
EDIT:
This is the atlas UI
Solution
Your connection URL isn't the same as what is listed in the atlas console.
Try setting your properties to this:
spring:
data:
mongodb:
uri: mongodb+srv://theshop.rmeawrn.mongodb.net/?retryWrites=true&w=majority
username: <username>
password: <password>
database: TheShop
Also, I don't see anywhere in the atlas connection string that references the database. Are you certain that the database (TheShop) exists on this atlas cluster?
Answered By - lane.maxwell
Answer Checked By - Marie Seifert (JavaFixing Admin)