Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot run application #3

Closed
samuelksmith opened this issue May 25, 2023 · 2 comments
Closed

Cannot run application #3

samuelksmith opened this issue May 25, 2023 · 2 comments

Comments

@samuelksmith
Copy link

CleanShot 2023-05-25 at 13 26 59@2x

I'm getting this error when trying to run my application. I believe I have MongoDB setup correctly as well..

CleanShot 2023-05-25 at 13 27 40@2x

I'm copying the connection string straight out of the MongoDB Compass application.

@robinwittkamp
Copy link

You can fix it by adding ${spring.data.mongodb.database} at the end of your URI.

Example:

spring.data.mongodb.database=movie-api-db
spring.data.mongodb.uri=mongodb+srv://username:password@cluster/${spring.data.mongodb.database}

Replace username, password and cluster in the URI with your credentials.

Source:
spring-projects/spring-boot#35566

@samuelksmith
Copy link
Author

You can fix it by adding ${spring.data.mongodb.database} at the end of your URI.

Example:

spring.data.mongodb.database=movie-api-db
spring.data.mongodb.uri=mongodb+srv://username:password@cluster/${spring.data.mongodb.database}

Replace username, password and cluster in the URI with your credentials.

Source: spring-projects/spring-boot#35566

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants