刘光辉
12 小时以前 34981c30a78e8bbd7791131059a9210f9928b62c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package jnpf.listener;
 
import jnpf.config.ConfigValueUtil;
import jnpf.util.RedisUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;
 
@Component
public class JnpfListener implements ApplicationRunner {
 
    @Autowired
    private RedisUtil redisUtil;
    @Autowired
    private ConfigValueUtil configValueUtil;
 
    @Override
    public void run(ApplicationArguments args) throws Exception {
        if ("false".equals(configValueUtil.getTestVersion())) {
            redisUtil.removeAll();
        }
    }
}