| | |
| | | package com.example.scheudleds; |
| | | |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.example.config.ConfigValue; |
| | | import com.example.utils.DictionaryUtil; |
| | | import com.example.utils.DictionaryUtilNew; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | private DictionaryUtil dictionaryUtil; |
| | | @Autowired |
| | | private DictionaryUtilNew dictionaryUtilNew; |
| | | @Autowired |
| | | private ConfigValue configValue; |
| | | |
| | | /** |
| | | * 字典同步 |
| | | */ |
| | | @Scheduled(cron = "0 0 22 * * ? ") |
| | | public void execDict(){ |
| | | String open = configValue.getConfigValue("sjpt_open"); |
| | | if (StrUtil.isNotBlank(open) && open.equals("false")) return; |
| | | FileWriter fileWriter = null; |
| | | try { |
| | | fileWriter = new FileWriter("src/main/resources/log.log"); |