package com.unis.sensitiveWord.customWord;


import com.github.houbb.sensitive.word.api.IWordAllow;
import org.springframework.stereotype.Service;

import java.util.Arrays;
import java.util.List;
/**
 * 自定义敏感词白名单
 * @program: snowy
 * @Date: 2024-05-17 14:46
 * @Author: TangSong
 * @Description:
 */
@Service
public class CustomWordAllow implements IWordAllow {

    /**
     * 允许的内容-返回的内容不被当做敏感词
     * @return
     */
    @Override
    public List<String> allow() {
        // 从数据库中查询白名单敏感词
        return Arrays.asList("五星红旗");
    }

}
