Java 16 migration for Redis examples.

See #606.
This commit is contained in:
Mark Paluch
2021-04-29 11:03:21 +02:00
parent 338d9d92ca
commit 88aabe89e2
16 changed files with 77 additions and 98 deletions

View File

@@ -48,16 +48,16 @@ public class RedisSentinelApplication {
ApplicationContext context = SpringApplication.run(RedisSentinelApplication.class, args);
StringRedisTemplate template = context.getBean(StringRedisTemplate.class);
var template = context.getBean(StringRedisTemplate.class);
template.opsForValue().set("loop-forever", "0");
StopWatch stopWatch = new StopWatch();
var stopWatch = new StopWatch();
while (true) {
try {
String value = "IT:= " + template.opsForValue().increment("loop-forever", 1);
var value = "IT:= " + template.opsForValue().increment("loop-forever", 1);
printBackFromErrorStateInfoIfStopWatchIsRunning(stopWatch);
System.out.println(value);