zhanghua
2025-06-11 2ca169c85f61256fb5185c078dba1bfef2be5066
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
package cn.lili.init;
 
import cn.lili.modules.system.service.SensitiveWordsService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;
 
/**
 * SensitiveWordsInit
 *
 * @author Chopper
 * @version v1.0
 * 2021-11-29 11:38
 */
@Slf4j
@Component
public class SensitiveWordsInit implements ApplicationRunner {
 
    @Autowired
    private SensitiveWordsService sensitiveWordsService;
 
    /**
     * consumer 启动时,实时更新一下过滤词
     *
     * @param args 启动参数
     */
    @Override
    public void run(ApplicationArguments args) {
        sensitiveWordsService.resetCache();
    }
 
}