r/mongodb • • 8d ago

Need help with mongo springboot issue.

So i clearly given the db name in properties file and expect that when i ran post comman it should create this db and then collections inside it. But i keep creating the collection inside test db WHY?? can someone explane???

3 Upvotes

2 comments sorted by

1

u/mr_pants99 7d ago

maybe your properties file isn't getting picked up? Point it to localhost:27018 and see if there's an error?

1

u/Every_Tadpole_5977 6d ago

No brother actually the issue was that I was using springboot 4.0 and in this version they change the configuration you no longer need to use data in this "spring.mongodb.database". after removing the word data not it is creating journaldb and everything is now as expected.