Skip to content

CRUD Repository findById or findAll methods always return Optional.empty (null) values. #2130

@Hitesh-Kirtane

Description

@Hitesh-Kirtane

Hi Team,

I am using Spring Boot 2.3.12.RELEASE with Spring Boot Starter Data Redis 2.3.12 which internally uses Spring Data Redis as a managed dependency.

When I am attempting to save an object using CRUD repository, I am able to save it without any error.

However, when I try to call findAll() or findById(Id) (here Id is the last inserted Id), I am always getting Optional.empty in the response from CRUD repository.

I have tried all the possible solutions available on the existing similar questions, but nothing seems to be working as of now.

Can you please check once and confirm what I have done wrong in the configurations or there is some other issue with the dependencies?

I have also posted this issue on StackOverFlow.

Here is the link to the issue posted on StackOverFlow on which you can find the code and the relevant screenshots.

https://stackoverflow.com/questions/68454213/spring-boot-redis-crud-repository-findbyid-or-findall-always-returns-optional-e

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions