Преглед на файлове

弹性伸缩机制变更

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}")