ソースを参照

增加动态刷新注解

dsx 2 年 前
コミット
87688eb145

+ 2 - 0
src/main/java/com/fdkankan/contro/mq/service/impl/BuildObjServiceImpl.java

@@ -30,6 +30,7 @@ import com.fdkankan.redis.util.RedisUtil;
 import lombok.extern.slf4j.Slf4j;
 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.stereotype.Service;
 import org.springframework.util.ObjectUtils;
 
@@ -47,6 +48,7 @@ import java.util.Objects;
  **/
 @Slf4j
 @Service
+@RefreshScope
 public class BuildObjServiceImpl implements IBuildSceneService {
 
     @Value("${queue.modeling.modeling-call}")

+ 2 - 0
src/main/java/com/fdkankan/contro/mq/service/impl/BuildSceneServiceImpl.java

@@ -49,6 +49,7 @@ import org.apache.commons.lang3.ObjectUtils;
 import org.apache.commons.lang3.StringUtils;
 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.stereotype.Service;
 
 import java.io.File;
@@ -68,6 +69,7 @@ import java.util.stream.Collectors;
  **/
 @Slf4j
 @Service
+@RefreshScope
 public class BuildSceneServiceImpl implements IBuildSceneService {
 
     @Value("${queue.modeling.modeling-call}")

+ 2 - 0
src/main/java/com/fdkankan/contro/mq/service/impl/BuildV3SceneServiceImpl.java

@@ -41,6 +41,7 @@ import org.apache.commons.lang3.ObjectUtils;
 import org.apache.commons.lang3.StringUtils;
 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.stereotype.Service;
 
 import java.io.File;
@@ -60,6 +61,7 @@ import java.util.stream.Collectors;
  **/
 @Slf4j
 @Service
+@RefreshScope
 public class BuildV3SceneServiceImpl implements IBuildSceneService {
 
     @Value("${queue.modeling.modeling-call}")