-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRedisApplication.java
61 lines (48 loc) · 1.64 KB
/
RedisApplication.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
package com.example;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.data.redis.core.StringRedisTemplate;
@SpringBootApplication
public class RedisApplication {
public static void main(String[] args) {
SpringApplication.run(RedisApplication.class, args);
}
@Bean
public CommandLineRunner string(StringRedisTemplate redisTemplate) {
return new StringTest(redisTemplate);
}
@Bean
public CommandLineRunner list(StringRedisTemplate redisTemplate) {
return new ListTest(redisTemplate);
}
@Bean
public CommandLineRunner set(StringRedisTemplate redisTemplate) {
return new SetTest(redisTemplate);
}
@Bean
public CommandLineRunner hash(StringRedisTemplate redisTemplate) {
return new HashTest(redisTemplate);
}
@Bean
public CommandLineRunner zset(StringRedisTemplate redisTemplate) {
return new ZsetTest(redisTemplate);
}
@Bean
public CommandLineRunner stream(StringRedisTemplate redisTemplate) {
return new StreamTest(redisTemplate);
}
@Bean
public CommandLineRunner geo(StringRedisTemplate redisTemplate) {
return new GeoTest(redisTemplate);
}
@Bean
public CommandLineRunner hll(StringRedisTemplate redisTemplate) {
return new HyperLogLogTest(redisTemplate);
}
@Bean
public CommandLineRunner other(StringRedisTemplate redisTemplate) {
return new OtherTest(redisTemplate);
}
}