file.Dir变为选配置添加其默认值

This commit is contained in:
陈精华
2019-04-16 21:09:32 +08:00
committed by kl
parent b625381de3
commit 4a7ba07df1
10 changed files with 68 additions and 24 deletions

View File

@ -1,12 +1,11 @@
package cn.keking.utils;
import org.springframework.beans.factory.annotation.Value;
import cn.keking.config.ConfigConstants;
import org.springframework.stereotype.Component;
@Component
public class ShedulerClean {
@Value("${file.dir}")
String fileDir;
String fileDir = ConfigConstants.getFileDir();
// @Scheduled(cron = "0 0 23 * * ?") //每晚23点执行一次
public void clean(){