diff --git a/src/main/java/com/telpo/dipperposition/config/NettyServerConfig.java b/src/main/java/com/telpo/dipperposition/config/NettyServerConfig.java index 0096803..58e328e 100644 --- a/src/main/java/com/telpo/dipperposition/config/NettyServerConfig.java +++ b/src/main/java/com/telpo/dipperposition/config/NettyServerConfig.java @@ -15,19 +15,19 @@ import org.springframework.context.annotation.Configuration; @Getter @Setter @Configuration -@NacosPropertySource(dataId="position-server", autoRefreshed=true) +@NacosPropertySource(dataId="dipperposition-service", autoRefreshed=true) public class NettyServerConfig { - @NacosValue(value = "${serverAddr}") + @NacosValue(value = "${position-server.serverAddr}") private String serverAddr; - @NacosValue(value = "${timeAsycPort:9011}") + @NacosValue(value = "${position-server.timeAsycPort:9011}") private String timeAsycServerPort; - @NacosValue(value = "${posAsycPort}") + @NacosValue(value = "${position-server.posAsycPort}") private String posAsycServerPort; - @NacosValue(value = "${starsAsycPort}") + @NacosValue(value = "${position-server.starsAsycPort}") private String starsAsycServerPort; } diff --git a/src/main/java/com/telpo/dipperposition/config/PositionConfig.java b/src/main/java/com/telpo/dipperposition/config/PositionConfig.java index b1b36ff..a55f01b 100644 --- a/src/main/java/com/telpo/dipperposition/config/PositionConfig.java +++ b/src/main/java/com/telpo/dipperposition/config/PositionConfig.java @@ -2,15 +2,8 @@ package com.telpo.dipperposition.config; import com.alibaba.nacos.api.config.annotation.NacosValue; import com.alibaba.nacos.spring.context.annotation.config.NacosPropertySource; -import com.telpo.dipperposition.co.PositionConfigInfo; import lombok.Getter; import lombok.Setter; -import lombok.ToString; -import okhttp3.OkHttpClient; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.context.ConfigurableApplicationContext; -import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; /** @@ -22,24 +15,24 @@ import org.springframework.context.annotation.Configuration; @Getter @Setter @Configuration -@NacosPropertySource(dataId="pos", autoRefreshed=true) +@NacosPropertySource(dataId="dipperposition-service", autoRefreshed=true) public class PositionConfig { - @NacosValue("${centerProvinceFilePath}") + @NacosValue("${pos.centerProvinceFilePath}") String centerProvinceFilePath; - @NacosValue("${ipPositionRequestPath}") + @NacosValue("${pos.ipPositionRequestPath}") String ipPositionRequestPath; - @NacosValue("${ipPositionRequestKey}") + @NacosValue("${pos.ipPositionRequestKey}") String ipPositionRequestKey; - @NacosValue("${centerProvince}") + @NacosValue("${pos.centerProvince}") String centerProvince; - @NacosValue("${astServer}") + @NacosValue("${pos.astServer}") String astServer; - @NacosValue("${astPosAstPort}") + @NacosValue("${pos.astPosAstPort}") int posAstPort; - @NacosValue("${astTimeout}") + @NacosValue("${pos.astTimeout}") int astTimeout; }