设置定时任务prod环境
parent
5445eefe09
commit
8199b3e63d
|
|
@ -13,6 +13,7 @@ import java.util.stream.Collectors;
|
|||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.Profile;
|
||||
import org.springframework.scheduling.annotation.Async;
|
||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
|
|
@ -64,6 +65,7 @@ import ru.olegcherednik.jackson_utils.JacksonUtils;
|
|||
@EnableScheduling//开启定时任务
|
||||
@Component
|
||||
@Slf4j
|
||||
@Profile("prod")
|
||||
public class DataTask {
|
||||
private static SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
private static SimpleDateFormat sdfD = new SimpleDateFormat("yyyy-MM-dd");
|
||||
|
|
|
|||
Loading…
Reference in New Issue