coffeeOps.opsForValue().set() failed
fsh1234 opened this issue · comments
fsh commented
I am trying to add data to redis like this:
@PostMapping("/add")
public Flux add() {
String coffeeId = UUID.randomUUID().toString();
coffeeOps.opsForValue().set(coffeeId, new Coffee(coffeeId, "add Redis"));
return coffeeOps.keys("*")
.flatMap(coffeeOps.opsForValue()::get);
}
But it doesn't work, what should I do?