The mapper [org.springframework.data.redis.core.DefaultReactiveHashOperations$$Lambda$1949/0x0000000801666b30] returned a null value.
java.lang.NullPointerException: The mapper [org.springframework.data.redis.core.DefaultReactiveHashOperations$$Lambda$1949/0x0000000801666b30] returned a null value.
at reactor.core.publisher.FluxMap$MapSubscriber.onNext(FluxMap.java:108)
Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException:
The above is my error message
My partial code
private Mono<Boolean> getExpertSystemFlag(String key) {
return reactiveRedisTemplate.opsForHash().get(key, "sessionAttr:AAA")
.flatMap(systemFlag -> {
return Mono.just(systemFlagList.contains(systemFlag));
})
.switchIfEmpty(Mono.defer(() -> {
return Mono.just(false);
}));
}
When I confirm the existence of this key primary key in Redis, but there is no sessionAttr: AAA object in it, I occasionally encounter an error