Skip to content

Could not safely identify store assignment Spring Data Redis #3261

Closed as not planned
@SaliniJoby

Description

@SaliniJoby

Spring Data Redis - Could not safely identify store assignment for
repository candidate interface com.xxx.xxxx.api.mongodb.repository.ABCMongoRepository;
If you want this repository to be a Redis repository, consider annotating your entities
with one of these annotations: org.springframework.data.redis.core.RedisHash (preferred),
or consider extending one of the following types with your repository:
org.springframework.data.keyvalue.repository.KeyValueRepository

Note:

  1. Getting this error for Mongo Repository classes only even though we have Postgres Repo as well
  2. These 2 annotations are already in place.
    @EnableJpaRepositories(basePackages = "com.xxx.xxxx.repository")
    @EnableMongoRepositories(basePackages = "com.xxx.xxxx.api.mongodb.repository")
  3. Started getting this error when we introduced Redis as cache solution.
  4. It is failing only in azure AKS. in local even when we connected to azure cosmos it is working fine.

Can anyone pls suggest.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions