Closed KaisNeffati closed 3 years ago
I'm not sure I fully understand the issue. The MappingContext
can only know about @TypeAlias
for entities it is aware of.
By default it will scan the base package based on @EnableRedisRepositories#basePackages
.
There are several ways of ensuring types are discovered. Eg. by using the @EntityScan
annotation or via an initial entity set.
RedisMappingContext ctx = new RedisMappingContext();
ctx.setInitialEntitySet(Collections.singleton(Event.class));
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.
Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.
Hello,
I have made an example to illustrate the problem: https://github.com/KaisNeffati/RedisIssue
To reproduce you need :
Docker compose pour redis
version: "3.9"
services:
############ REDIS ############
redis:
container_name: redis
image: "redis:alpine"
command: [ "redis-server", "--appendonly", "yes", "--requirepass", "password"]
volumes:
- ./data/redis:/data
ports:
- "6379:6379"
restart: always
Hello there Spring team,
I ve been struggling for a couple of days to find a solution for a problem am facing. I searched through the net and i was really exhausted without any results ! Until I found it on stackoverflow in an unsolved question link
So to explain the issue , here is the environment : Two microservices A and B
So the scenario is the following :
The Fixe i made was to extract a lib and make sure the entity Event is always in the same package. TypeAlias("EVENT"): Do nothing
Please fixe the issue Thanks