skip to Main Content

Getting this as a console help me out please

I am trying to connect my spring boot application with mongondb database but not able to properly connect it i have added dependencies and the connection link in application.properties file but still getting the error as mentioned in a image

2

Answers


  1. to add this – i would try to use something like dbeaver or studiot3 to help investigate the connection string you’re using/generating within your java app.

    also review: mongodb+srv://myDatabaseUser:D1fficultP%[email protected]/?authSource=admin

    Login or Signup to reply.
  2. Seems database name is missing in connection url shared. Try out updated url assuming testdb is name of the database

    spring.data.mongodb.uri=mongodb+srv://dubeyv571:[email protected]/testdb?retryWrites=true&w=majority 
    

    Also with connection url pointing to expected database, below configuration seems redundant

    spring.data.mongodb.database= testdb
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search