|
|
@@ -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; |
|
|
|
} |