Quellcode durchsuchen

修改到docker外运行环境

tags/v1.0.0^2
林万龙 vor 3 Jahren
Ursprung
Commit
3d0675b874
2 geänderte Dateien mit 13 neuen und 20 gelöschten Zeilen
  1. +5
    -5
      src/main/java/com/telpo/dipperposition/config/NettyServerConfig.java
  2. +8
    -15
      src/main/java/com/telpo/dipperposition/config/PositionConfig.java

+ 5
- 5
src/main/java/com/telpo/dipperposition/config/NettyServerConfig.java Datei anzeigen

@@ -15,19 +15,19 @@ import org.springframework.context.annotation.Configuration;
@Getter @Getter
@Setter @Setter
@Configuration @Configuration
@NacosPropertySource(dataId="position-server", autoRefreshed=true)
@NacosPropertySource(dataId="dipperposition-service", autoRefreshed=true)
public class NettyServerConfig { public class NettyServerConfig {


@NacosValue(value = "${serverAddr}")
@NacosValue(value = "${position-server.serverAddr}")
private String serverAddr; private String serverAddr;


@NacosValue(value = "${timeAsycPort:9011}")
@NacosValue(value = "${position-server.timeAsycPort:9011}")
private String timeAsycServerPort; private String timeAsycServerPort;


@NacosValue(value = "${posAsycPort}")
@NacosValue(value = "${position-server.posAsycPort}")
private String posAsycServerPort; private String posAsycServerPort;


@NacosValue(value = "${starsAsycPort}")
@NacosValue(value = "${position-server.starsAsycPort}")
private String starsAsycServerPort; private String starsAsycServerPort;


} }

+ 8
- 15
src/main/java/com/telpo/dipperposition/config/PositionConfig.java Datei anzeigen

@@ -2,15 +2,8 @@ package com.telpo.dipperposition.config;


import com.alibaba.nacos.api.config.annotation.NacosValue; import com.alibaba.nacos.api.config.annotation.NacosValue;
import com.alibaba.nacos.spring.context.annotation.config.NacosPropertySource; import com.alibaba.nacos.spring.context.annotation.config.NacosPropertySource;
import com.telpo.dipperposition.co.PositionConfigInfo;
import lombok.Getter; import lombok.Getter;
import lombok.Setter; 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; import org.springframework.context.annotation.Configuration;


/** /**
@@ -22,24 +15,24 @@ import org.springframework.context.annotation.Configuration;
@Getter @Getter
@Setter @Setter
@Configuration @Configuration
@NacosPropertySource(dataId="pos", autoRefreshed=true)
@NacosPropertySource(dataId="dipperposition-service", autoRefreshed=true)
public class PositionConfig { public class PositionConfig {


@NacosValue("${centerProvinceFilePath}")
@NacosValue("${pos.centerProvinceFilePath}")
String centerProvinceFilePath; String centerProvinceFilePath;


@NacosValue("${ipPositionRequestPath}")
@NacosValue("${pos.ipPositionRequestPath}")
String ipPositionRequestPath; String ipPositionRequestPath;
@NacosValue("${ipPositionRequestKey}")
@NacosValue("${pos.ipPositionRequestKey}")
String ipPositionRequestKey; String ipPositionRequestKey;
@NacosValue("${centerProvince}")
@NacosValue("${pos.centerProvince}")
String centerProvince; String centerProvince;




@NacosValue("${astServer}")
@NacosValue("${pos.astServer}")
String astServer; String astServer;
@NacosValue("${astPosAstPort}")
@NacosValue("${pos.astPosAstPort}")
int posAstPort; int posAstPort;
@NacosValue("${astTimeout}")
@NacosValue("${pos.astTimeout}")
int astTimeout; int astTimeout;
} }

Laden…
Abbrechen
Speichern