0

I have a simple SpringBoot Application which does the CRUD operations using mongodb i have used the following application.properties :-

spring.data.mogodb.host=localhost
spring.data.mogodb.port=27017
spring.data.mogodb.database=EmulationDb

ideally it should insert the documents in EmulationDb, but it is inserting in the test db, can any one suggest what went wrong.

1 Answer 1

1

Try using this property and see if it works:

spring.data.mongodb.uri=mongodb://localhost:27017/EmulationDb

edit

just noticed you have a typo in your properties: mogodb instead of mongodb (missing n)

Sign up to request clarification or add additional context in comments.

1 Comment

is it mandetory to give the URI, beacause in one of my project it is working without these property

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.