diff --git a/src/main/java/com/telpo/dipperposition/co/RzlAccount.java b/src/main/java/com/telpo/dipperposition/co/RzlAccount.java new file mode 100644 index 0000000..d332dd6 --- /dev/null +++ b/src/main/java/com/telpo/dipperposition/co/RzlAccount.java @@ -0,0 +1,19 @@ +package com.telpo.dipperposition.co; + +import lombok.Getter; +import lombok.Setter; +import lombok.ToString; + +/** + * @program: RzlAccount + * @description: 融智联账号配置 + * @author: king + * @create: 2021-01-12 14:02 + **/ +@Getter +@Setter +@ToString +public class RzlAccount { + + private String hello; +} diff --git a/src/main/java/com/telpo/dipperposition/config/PositionConfig.java b/src/main/java/com/telpo/dipperposition/config/PositionConfig.java index b9cec6a..e64e98d 100644 --- a/src/main/java/com/telpo/dipperposition/config/PositionConfig.java +++ b/src/main/java/com/telpo/dipperposition/config/PositionConfig.java @@ -3,12 +3,14 @@ package com.telpo.dipperposition.config; import com.alibaba.nacos.api.NacosFactory; import com.alibaba.nacos.api.PropertyKeyConst; import com.alibaba.nacos.api.config.ConfigService; +import com.telpo.dipperposition.co.RzlAccount; import lombok.Getter; import lombok.Setter; import lombok.ToString; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.Scope; import java.util.Properties; @@ -28,4 +30,12 @@ public class PositionConfig { @Value("${hello}") private String hello; + @Scope("prototype") + public RzlAccount getRzlAccount() { + + RzlAccount rzlAccount = new RzlAccount(); + rzlAccount.setHello(hello); + return rzlAccount; + } + }