file.Dir变为选配置添加其默认值
This commit is contained in:
@ -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(){
|
||||
|
||||
Reference in New Issue
Block a user