No data when called questionRepository.findAll()

Cant fetch data from Mongo Server even when it is present.
As shown in this image, Mongo has data in QuizDB, collection question.

Also this is my QuestionEntity object to store mongo values

QuestionRepositorySerivce which extends MongoRepo

RepoService that fetches data

my application.properties

i created a test to check if the reposervice is returning objects, but as you can see in the debugging quesEntities list is empty even after calling findAll().

I dont inderstand what i am doing wrong and why is data not being fetched from mongo.
Its been a day since i have stuck on this issue. Please guide me

Hey,
If you are having embedded mongo installed(build.gradle), it could be that data is fetched from it instead of from the Live DB

Will try it out tomorrow, as the workspace is having issues today.

@Nabhan-CrioTA Still not working, tried commenting the dependency.

Can you try removing the spring.data.mongodb.database=QuizDB line from your application.properties file? Maybe that gets appended to the URI which is already valid on its own? Also you can check the logs to see if mongodb is actually configured properly. I use these lines to debug:

logging.level.web=debug
logging.level.root=debug

in my application.properties file to view logs

@profgrammer Okay will try this.
P.S. Tried it but still cant see anything.

What command are using to run the server? Try using ./gradlew clean bootrun

Closing this topic as your issue has been resolved by the community. If not Kindly un-mark the accepted solution to re-open the topic or feel free to create a new topic and post a link to this topic as a reference.