cy
2023-09-28 2ec3f7a61c014b94e4f7feb1f55f1923ec2235a6
fix(quartz): URL通过配置文件传入
1个文件已添加
3个文件已修改
66 ■■■■ 已修改文件
src/main/java/com/integrated/startListen/ShowUrl.java 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/integrated/zyyt/ZyytConstant.java 27 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/application-dev.yml 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/application-prod.yml 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/integrated/startListen/ShowUrl.java
New file
@@ -0,0 +1,22 @@
package com.integrated.startListen;
import com.integrated.zyyt.ZyytConstant;
import org.springframework.boot.context.event.ApplicationStartedEvent;
import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;
/**
 * @ClassName ShowUrl
 * @Author cy
 * @Date 2023/9/28
 * @Description
 * @Version 1.0
 **/
@Component
public class ShowUrl implements ApplicationListener<ApplicationStartedEvent> {
    @Override
    public void onApplicationEvent(ApplicationStartedEvent event) {
        System.out.println(ZyytConstant.getUrlInfo());
    }
}
src/main/java/com/integrated/zyyt/ZyytConstant.java
@@ -16,6 +16,7 @@
@Component
public class ZyytConstant {
    private static String IP_PORT = "http://10.225.71.10:9090";
    private static String STATION_IP_PORT = "https://10.225.71.10:9092";
    public static String IP_PORT_AUTH;
@@ -28,6 +29,7 @@
            ZyytConstant.IP_PORT_AUTH = IP_PORT;
            System.out.println("配置文件中 认证IP:PORT为空,使用==>" + ZyytConstant.IP_PORT);
        }
        URL_AUTHON = IP_PORT_AUTH + "/api/clients/auth";
    }
    public static String IP_PORT_SHKDRB;
@@ -40,6 +42,7 @@
            ZyytConstant.IP_PORT_SHKDRB = IP_PORT;
            System.out.println("配置文件中 社会快递日报IP:PORT为空,使用==>" + ZyytConstant.IP_PORT);
        }
        URL_SHKDRB_QUERY = IP_PORT_SHKDRB + "/api/sql-services/ZYE_ZYET_YYZT_T_SHKDRB/query";
    }
    public static String IP_PORT_DJTJB;
@@ -52,6 +55,7 @@
            ZyytConstant.IP_PORT_DJTJB = IP_PORT;
            System.out.println("配置文件中 代寄统计IP:PORT为空,使用==>" + ZyytConstant.IP_PORT);
        }
        URL_DJTJB_QUERY = IP_PORT_DJTJB + "/api/sql-services/SJZT_DJTJB_01_01/query";
    }
    public static String IP_PORT_STATION;
@@ -61,32 +65,43 @@
        ZyytConstant.IP_PORT_STATION = stationIpPort;
        System.out.println("配置文件中 站点信息IP:PORT==>" + IP_PORT_STATION);
        if (StringUtils.isEmpty(stationIpPort)) {
            ZyytConstant.IP_PORT_STATION = IP_PORT;
            System.out.println("配置文件中 站点信息IP:PORT为空,使用==>" + ZyytConstant.IP_PORT);
            ZyytConstant.IP_PORT_STATION = STATION_IP_PORT;
            System.out.println("配置文件中 站点信息IP:PORT为空,使用==>" + ZyytConstant.STATION_IP_PORT);
        }
        URL_STATIONINFO_QUERY = IP_PORT_STATION + "/api/sql-services/NtdAPgZYysvNFut3WxDgQ/query";
    }
    public static String URL_AUTHON = IP_PORT_AUTH + "/api/clients/auth";
    public static String URL_AUTHON = null;
    // 批次号生成前缀
    public static String batchNoPrefix = "ZYYT";
    //1.社会快递日报表 YYZT_T_SHKDRB
    public static String URL_SHKDRB_QUERY = IP_PORT_SHKDRB + "/api/sql-services/ZYE_ZYET_YYZT_T_SHKDRB/query";
    public static String URL_SHKDRB_QUERY = null;
    public static String CLIENT_SHKDRB = "3ad3d605ad6149808e6d7ea9fb26a2e2";
    public static String SECRET_SHKDRB = "7fe76820268a47dc9b1785ded59de33a";
    public static String X_EOS_SOURCESYSKEY_SHKDRB = "ff13e98f32fd4cbeaa66b10278a20f19";
    //2.代寄统计表 YYZT_T_DJTJB
    public static String URL_DJTJB_QUERY = IP_PORT_DJTJB + "/api/sql-services/SJZT_DJTJB_01_01/query";
    public static String URL_DJTJB_QUERY = null;
    public static String CLIENT_DJTJB = "65eed619e0094da299f5e45f924e6e78";
    public static String SECRET_DJTJB = "f2ae2fe68e104814a28ae134ad3530de";
    public static String X_EOS_SOURCESYSKEY_DJTJB = "ff13e98f32fd4cbeaa66b10278a20f19";
    //3.:站点信息表 STATIONINFO
    public static String URL_STATIONINFO_QUERY = IP_PORT_STATION + "/api/sql-services/NtdAPgZYysvNFut3WxDgQ/query";
    public static String URL_STATIONINFO_QUERY = null;
    public static String CLIENT_STATIONINFO = "ebe574afde8f409bbd5204d79272c939";
    public static String SECRET_STATIONINFO = "900c4d8df2c14c9899497902655f1107";
    public static String X_EOS_SOURCESYSKEY_STATIONINFO = "ff13e98f32fd4cbeaa66b10278a20f19";
    public static String getUrlInfo() {
        return "配置的抓取数据url信息:" + "\r\n" +
                "认证 URL==>" + URL_AUTHON + "\r\n" +
                "社会快递日报表 URL==>" + URL_SHKDRB_QUERY + "\r\n" +
                "代寄统计表 URL==>" + URL_DJTJB_QUERY + "\r\n" +
                "站点信息表 URL==>" + URL_STATIONINFO_QUERY + "\r\n"
                ;
    }
}
src/main/resources/application-dev.yml
@@ -39,11 +39,11 @@
zyyt:
  ipPort:
    # 认证
    auth: http://22.33.44.11:9090
    auth: http://10.225.71.10:9090
    #社会快递日报
    shkdrb: http://11.22.33.44:9090
    shkdrb: http://10.225.71.10:9090
    #代寄统计表
    djtjb: http://22.33.44.11:9090
    djtjb: http://10.225.71.10:9090
    #站点信息表
    station: http://123.123:9090
    station: https://10.225.71.10:9092
src/main/resources/application-prod.yml
@@ -44,14 +44,13 @@
base:
  url: http://10.170.7.27:7000/admin
zyyt:
  ipPort:
    # 认证
    auth: http://22.33.44.11:9090
    auth: http://10.225.71.10:9090
    #社会快递日报
    shkdrb: http://11.22.33.44:9090
    shkdrb: http://10.225.71.10:9090
    #代寄统计表
    djtjb: http://22.33.44.11:9090
    djtjb: http://10.225.71.10:9090
    #站点信息表
    station: http://123.123:9090
    station: https://10.225.71.10:9092