data/update.sql | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/java/com/lf/server/config/InitConfig.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/java/com/lf/server/helper/GdalHelper.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/resources/application.yml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
data/update.sql
@@ -1,3 +1,6 @@ select * from lf.sys_menu where position('http://' in url) > 0; select url, replace(url, 'pipe.cppe.com', '{host}') from lf.sys_menu where position('http://' in url) > 0; update lf.sys_menu set url = replace(url, 'pipe.cppe.com', '{host}') where position('http://' in url) > 0; ------------------------------------------------------ 更新菜单+用户 select * from lf.sys_menu where cn_name = '数据库监控'; -- update lf.sys_menu set url = 'http://pipe.cppe.com:8088/server/druid/index.html' where cn_name = '数据库监控'; src/main/java/com/lf/server/config/InitConfig.java
@@ -89,7 +89,7 @@ //boolean f4 = Zip4jHelper.unzip("D:\\LF\\data\\zip\\resources.zip", "D:\\LF\\data\\zip\\res", "12345"); // 初始化 GdalHelper.init(env.getProperty("sys.gdal_driver_path")); GdalHelper.init(env.getProperty("sys.gdal_path")); pathHelper.init(); argsService.initSettingData(); src/main/java/com/lf/server/helper/GdalHelper.java
@@ -10,6 +10,8 @@ import org.gdal.ogr.*; import org.gdal.osr.SpatialReference; import javax.swing.plaf.synth.SynthTextAreaUI; import java.io.File; import java.sql.Time; import java.sql.Timestamp; import java.time.LocalDate; @@ -28,25 +30,31 @@ public class GdalHelper { private final static Log log = LogFactory.getLog(GdalHelper.class); public static void init(String driverPath) { public static void init(String gdalPath) { // 注册所有的驱动 gdal.AllRegister(); // 为了支持中文路径,请添加下面这句代码 gdal.SetConfigOption("GDAL_FILENAME_IS_UTF8", "YES"); // 配置GDAL_DATA路径(gdal根目录下的bin\gdal-data) // gdal.SetConfigOption("GDAL_DATA", "E:\\terrait\\TianJin\\Zip\\release-1928-x64-dev\\release-1928-x64\\bin\\gdal-data"); // gdal.SetConfigOption("PROJ_LIB", "E:\\terrait\\TianJin\\Zip\\release-1928-x64-dev\\release-1928-x64\\bin\\proj7\\share"); if (null != driverPath) { gdal.SetConfigOption("GDAL_DRIVER_PATH", driverPath); } //gdal.SetConfigOption("PROJ_LIB", "E:\\terrait\\TianJin\\Zip\\release-1928-x64-dev\\release-1928-x64\\bin\\proj7\\share"); // 为了使属性表字段支持中文,请添加下面这句:CP936 gdal.SetConfigOption("SHAPE_ENCODING", ""); gdal.SetConfigOption("PGEO_DRIVER_TEMPLATE", "DRIVER=Microsoft Access Driver (*.mdb, *.accdb);DBQ=%s"); gdal.SetConfigOption("MDB_DRIVER_TEMPLATE", "DRIVER=Microsoft Access Driver (*.mdb, *.accdb);DBQ=%s"); if (StringHelper.isEmpty(gdalPath)) { return; } // 配置环境变量 gdal.SetConfigOption("GDAL_DATA", gdalPath + File.separator + "gdal-data"); gdal.SetConfigOption("PROJ_LIB", gdalPath + File.separator + "proj7\\share"); gdal.SetConfigOption("GDAL_DRIVER_PATH", gdalPath + File.separator + "gdalplugins"); String path = System.getenv("PATH"); if (!path.contains(gdalPath)) { System.setProperty("PATH", path + ";" + gdalPath); } } /** src/main/resources/application.yml
@@ -12,8 +12,8 @@ # redis redis: database: 0 host: 192.168.20.39 port: 6379 host: 192.168.20.205 port: 6369 password: rediS_5L#F4_Server timeout: 6000 # 连接超时时长(毫秒) pool: @@ -41,11 +41,11 @@ datasource: name: prod # JDBC 基本配置 ¤tSchema=public url: jdbc:postgresql://192.168.20.39:5433/langfang?useAffectedRows=true url: jdbc:postgresql://192.168.20.205:5433/langfang?useAffectedRows=true #url: jdbc:postgresql://pipe.cppe.com:5433/langfang?useAffectedRows=true username : postgres #password: Postgres!_14_Lf password: postgres password: Postgres!_14_Lf #password: postgres driver-class-name: org.postgresql.Driver paltform: POSTGRESQL type: com.alibaba.druid.pool.DruidDataSource @@ -146,9 +146,9 @@ # FME服务地址 fmeUrl: http://192.168.20.205:88/ # 出图服务 exportServer: http://127.0.0.1/ExportMap exportServer: http://192.168.20.205/ExportMap # Gdal驱动目录 gdal_driver_path: E:\terrait\TianJin\Zip\release-1928-x64-dev\release-1928-x64\bin\gdalplugins gdal_path: E:\terrait\TianJin\Zip\release-1928-x64-dev\release-1928-x64\bin path: # 下载目录(下载文件) download: D:\LF\download