Browse Source

弹性伸缩机制变更

dsx 2 years ago
parent
commit
cfab65c795
1 changed files with 2 additions and 0 deletions
  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}")