Browse Source

修改到docker外运行环境

tags/v1.0.0^2
林万龙 3 years ago
parent
commit
8a97623fe0
2 changed files with 39 additions and 1 deletions
  1. +4
    -1
      src/main/java/com/telpo/dipperposition/service/impl/DipperAstPosAsyncTaskServiceImpl.java
  2. +35
    -0
      src/main/java/com/telpo/dipperposition/service/impl/csv/provinceLonAlt.csv

+ 4
- 1
src/main/java/com/telpo/dipperposition/service/impl/DipperAstPosAsyncTaskServiceImpl.java View File

@@ -15,6 +15,7 @@ import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import org.springframework.util.ResourceUtils;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.UnsupportedEncodingException;
import java.util.List;
@@ -54,7 +55,9 @@ public class DipperAstPosAsyncTaskServiceImpl implements IDipperAstPosAsyncTaskS
String centerProvinceLonAndAlt = "";
String appCsvPath = "";
try {
appCsvPath ="/home/data/dipperposition" +this.centerProvinceFilePath;
//appCsvPath ="/home/data/dipperposition" +this.centerProvinceFilePath;
File f = new File(this.getClass().getResource("").getPath());
appCsvPath = f.getAbsolutePath()+this.centerProvinceFilePath;
log.debug(appCsvPath);
} catch (Exception e) {
log.debug("cannot find path");


+ 35
- 0
src/main/java/com/telpo/dipperposition/service/impl/csv/provinceLonAlt.csv View File

@@ -0,0 +1,35 @@
城市,经度,纬度,省份
沈阳市,123.429092,41.796768,辽宁省
长春市,125.324501,43.886841,吉林省
哈尔滨市,126.642464,45.756966,黑龙江省
北京市,116.405289,39.904987,北京市
天津市,117.190186,39.125595,天津市
呼和浩特市,111.75199,40.84149,内蒙古自治区
银川市,106.23248,38.48644,宁夏回族自治区
太原市,112.549248,37.857014,山西省
石家庄市,114.502464,38.045475,河北省
济南市,117.000923,36.675808,山东省
郑州市,113.665413,34.757977,河南省
西安市,108.948021,34.263161,陕西省
武汉市,114.298569,30.584354,湖北省
南京市,118.76741,32.041546,江苏省
合肥市,117.283043,31.861191,安徽省
上海市,121.472641,31.231707,上海市
长沙市,112.982277,28.19409,湖南省
南昌市,115.892151,28.676493,江西省
杭州市,120.15358,30.287458,浙江省
福州市,119.306236,26.075302,福建省
广州市,113.28064,23.125177,广东省
台北市,121.520076,25.030724,台湾省
海口市,110.19989,20.04422,海南省
南宁市,108.320007,22.82402,广西壮族自治区
重庆市,106.504959,29.533155,重庆市
昆明市,102.71225,25.040609,云南省
贵阳市,106.713478,26.578342,贵州省
成都市,104.065735,30.659462,四川省
兰州市,103.83417,36.06138,甘肃省
西宁市,101.77782,36.61729,青海省
拉萨市,91.1145,29.64415,西藏自治区
乌鲁木齐市,87.61688,43.82663,新疆维吾尔自治区
香港,114.16546,22.27534,香港特别行政区
澳门,113.54913,22.19875,澳门特别行政区

Loading…
Cancel
Save