浏览代码

1.更新钉钉获取权限自动任务

verguenza 4 年之前
父节点
当前提交
32776d2f55
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      src/main/java/com/galaxis/manatee/service/DingTalkAuthorization.java

+ 2 - 1
src/main/java/com/galaxis/manatee/service/DingTalkAuthorization.java

@@ -6,6 +6,7 @@ import com.galaxis.manatee.constant.DingTalkConstant;
 import lombok.Data;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Value;
+import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.stereotype.Service;
 import org.springframework.web.client.RestTemplate;
 
@@ -29,7 +30,7 @@ public class DingTalkAuthorization {
      * 自动获取钉钉授权
      * @throws URISyntaxException   URI异常
      */
-//    @Scheduled(fixedDelay = 7000000L)
+    @Scheduled(fixedDelay = 7000000L)
     private void getToken() throws URISyntaxException {
         var restTemplate=new RestTemplate();
         var uri=new URI(getTokenUri+"?appkey="+ DingTalkConstant.DING_TALK_APP_KEY +"&appsecret="+DingTalkConstant.DING_TALK_APP_SECRET);