浏览代码

弹性伸缩机制变更

dsx 2 年之前
父节点
当前提交
cfab65c795
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      src/main/java/com/fdkankan/contro/schedule/ScheduleJob.java

+ 2 - 0
src/main/java/com/fdkankan/contro/schedule/ScheduleJob.java

@@ -6,11 +6,13 @@ import com.fdkankan.rubbersheeting.ScalingService;
 import lombok.extern.log4j.Log4j2;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
+import org.springframework.cloud.context.config.annotation.RefreshScope;
 import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.stereotype.Component;
 
 @Log4j2
 @Component
+@RefreshScope
 public class ScheduleJob {
 
     @Value("${rocketmq.autoScaling.num.normal}")