|
@@ -6,6 +6,7 @@ import org.springframework.scheduling.annotation.EnableScheduling;
|
|
|
import org.springframework.scheduling.annotation.Scheduled;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
+import javax.annotation.PostConstruct;
|
|
|
import java.io.Serializable;
|
|
|
|
|
|
@Component
|
|
@@ -20,7 +21,8 @@ public class ScheduleConfig implements Serializable {
|
|
|
/**
|
|
|
* 定时刷新登录规则(每N分钟执行)
|
|
|
*/
|
|
|
- @Scheduled(cron = "0 1/1 * * * ?")
|
|
|
+ // @PostConstruct
|
|
|
+ @Scheduled(cron = "0 30/30 * * * ?")
|
|
|
public void execute() {
|
|
|
loginRuleService.refreshLoginRule();
|
|
|
}
|