正在显示
89 个修改的文件
包含
618 行增加
和
363 行删除
META-INF/MANIFEST.MF
0 → 100644
1 | +Manifest-Version: 1.0 | ||
2 | +Class-Path: jackson-datatype-jdk8-2.9.7.jar jackson-databind-2.9.7.jar | ||
3 | + jsqlparser-1.0.jar druid-spring-boot-starter-1.1.9.jar com.ibm.mq.to | ||
4 | + ols.ras.jar pagehelper-spring-boot-starter-1.2.3.jar spring-context-5 | ||
5 | + .1.2.RELEASE.jar spring-aop-5.1.2.RELEASE.jar ProcessService.jar drui | ||
6 | + d-1.1.9.jar com.ibm.mq.postcard.jar com.ibm.mq.soap.jar commons-loggi | ||
7 | + ng-1.1.1.jar wstx-asl-3.2.4.jar commons-lang-2.4.jar returnXml.jar my | ||
8 | + batis-spring-1.3.2.jar imfmsg.jar spring-tx-5.1.2.RELEASE.jar jackson | ||
9 | + -core-2.9.7.jar cxf-xjc-ts-2.3.2.jar cxf-xjc-dv-2.3.2.jar log4j-to-sl | ||
10 | + f4j-2.11.1.jar HeartbeatService.jar javax.annotation-api-1.3.2.jar my | ||
11 | + batis-spring-boot-starter-1.3.2.jar xml-apis-1.4.01.jar neethi-2.0.4. | ||
12 | + jar commons-io-2.5.jar hibernate-validator-6.0.13.Final.jar com.ibm.m | ||
13 | + q.jmqi.jar jackson-datatype-jsr310-2.9.7.jar snakeyaml-1.23.jar slf4j | ||
14 | + -api-1.7.25.jar spring-jcl-5.1.2.RELEASE.jar spring-jdbc-5.1.2.RELEAS | ||
15 | + E.jar UploadService.jar cxf-2.3.2.jar axiom-impl-1.2.7.jar spring-boo | ||
16 | + t-starter-web-2.1.0.RELEASE.jar com.ibm.mqjms.jar com.ibm.mq.headers. | ||
17 | + jar jul-to-slf4j-1.7.25.jar com.ibm.mq.commonservices.jar com.ibm.mqe | ||
18 | + tclient.jar apiConfig.jar mybatis-3.4.6.jar spring-expression-5.1.2.R | ||
19 | + ELEASE.jar wsdl4j-1.6.2.jar xstream-1.4.10.jar com.ibm.mq.fta.jar ger | ||
20 | + onimo-javamail_1.4_spec-1.2.jar xmlbeans-2.4.0.jar spring-boot-autoco | ||
21 | + nfigure-2.1.0.RELEASE.jar cxf-xjc-boolean-3.2.3.jar dom4j-2.1.0.jar g | ||
22 | + eronimo-stax-api_1.0_spec-1.0.1.jar classmate-1.4.0.jar xpp3_min-1.1. | ||
23 | + 4c.jar HikariCP-3.2.0.jar CL3Nonexport.jar jboss-logging-3.3.2.Final. | ||
24 | + jar spring-beans-5.1.2.RELEASE.jar spring-boot-starter-json-2.1.0.REL | ||
25 | + EASE.jar jackson-annotations-2.9.0.jar sigar.jar mybatis-spring-boot- | ||
26 | + autoconfigure-1.3.2.jar axiom-api-1.2.7.jar IMFClient.1.0.0.jar com.i | ||
27 | + bm.mq.axis2.jar XmlSchema-1.4.7.jar com.ibm.mq.defaultconfig.jar com. | ||
28 | + ibm.mq.pcf.jar pagehelper-spring-boot-autoconfigure-1.2.3.jar validat | ||
29 | + ion-api-2.0.1.Final.jar mybatis-generator-core-1.3.6.jar com.ibm.mq.j | ||
30 | + ms.Nojndi.jar spring-boot-starter-logging-2.1.0.RELEASE.jar spring-we | ||
31 | + b-5.1.2.RELEASE.jar mysql-connector-java-8.0.13.jar spring-boot-start | ||
32 | + er-jdbc-2.1.0.RELEASE.jar cxf-manifest.jar xmlsec-1.4.4.jar jaxen-1.1 | ||
33 | + .6.jar spring-core-5.1.2.RELEASE.jar pagehelper-5.1.2.jar CL3Export.j | ||
34 | + ar spring-boot-2.1.0.RELEASE.jar cxf-xjc-bug671-2.3.2.jar geronimo-ac | ||
35 | + tivation_1.1_spec-1.0.1.jar log4j-api-2.11.1.jar spring-webmvc-5.1.2. | ||
36 | + RELEASE.jar logback-classic-1.2.3.jar com.ibm.mq.jar connector.jar lo | ||
37 | + g4j-1.2.17.jar jackson-module-parameter-names-2.9.7.jar spring-boot-s | ||
38 | + tarter-2.1.0.RELEASE.jar stax-api-1.0.1.jar xmlpull-1.1.3.1.jar logba | ||
39 | + ck-core-1.2.3.jar | ||
40 | +Main-Class: com.sy.AnalysisImfApplication | ||
41 | + |
config/config.properties
0 → 100644
1 | -#log4j.rootLogger=DEBUG, Console | ||
2 | -#Console | ||
3 | -#log4j.appender.Console=org.apache.log4j.ConsoleAppender | ||
4 | -#log4j.appender.Console.layout=org.apache.log4j.PatternLayout | ||
5 | -#log4j.appender.Console.layout.ConversionPattern=%d [%t] %-5p [%c] - %m%n | ||
6 | -#log4j.logger.java.sql.ResultSet=INFO | ||
7 | -#log4j.logger.org.apache=INFO | ||
8 | -#log4j.logger.net.cxp.blog.dao=DEBUG | ||
9 | -#log4j.logger.java.sql.Connection=DEBUG | ||
10 | -#log4j.logger.java.sql.Statement=DEBUG | ||
11 | -#log4j.logger.java.sql.PreparedStatement=DEBUG | ||
12 | -# Output pattern : date [thread] priority category - message FATAL 0 ERROR 3 WARN 4 INFO 6 DEBUG 7 | ||
13 | log4j.rootLogger=INFO, stdout, fileout | 1 | log4j.rootLogger=INFO, stdout, fileout |
14 | 2 | ||
15 | log4j.logger.com.fiscal = INFO | 3 | log4j.logger.com.fiscal = INFO |
config/log_api.xml
已删除
100644 → 0
1 | -<?xml version="1.0" encoding="UTF-8"?> | ||
2 | -<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> | ||
3 | -<log4j:configuration xmlns:log4j='http://jakarta.apache.org/log4j/'> | ||
4 | - <appender name="INFOFILE" class="org.apache.log4j.RollingFileAppender"> | ||
5 | - <param name="File" value="Logs/INFO.log" /> | ||
6 | - <param name="MaxFileSize" value="3000KB" /> | ||
7 | - <param name="MaxBackupIndex" value="20" /> | ||
8 | - <param name="Encoding" value="UTF-8" /> | ||
9 | - <layout class="org.apache.log4j.PatternLayout"> | ||
10 | - <param name="ConversionPattern" value="[runtime] %d -%-4r [%t] %x - %m%n" /> | ||
11 | - </layout> | ||
12 | - <filter class="org.apache.log4j.varia.LevelRangeFilter"> | ||
13 | - <param name="levelMin" value="debug" /> | ||
14 | - <param name="levelMax" value="info" /> | ||
15 | - <param name="AcceptOnMatch" value="true" /> | ||
16 | - </filter> | ||
17 | - </appender> | ||
18 | - <appender name="ERRFILE" class="org.apache.log4j.RollingFileAppender"> | ||
19 | - <param name="File" value="Logs/ERROR.log" /> | ||
20 | - <param name="MaxFileSize" value="3000KB" /> | ||
21 | - <param name="MaxBackupIndex" value="20" /> | ||
22 | - <param name="Encoding" value="UTF-8" /> | ||
23 | - <layout class="org.apache.log4j.PatternLayout"> | ||
24 | - <param name="ConversionPattern" value="[runtime] %d -%-4r [%t] %x - %m%n" /> | ||
25 | - </layout> | ||
26 | - <filter class="org.apache.log4j.varia.LevelRangeFilter"> | ||
27 | - <param name="levelMin" value="error" /> | ||
28 | - <param name="levelMax" value="error" /> | ||
29 | - <param name="AcceptOnMatch" value="true" /> | ||
30 | - </filter> | ||
31 | - </appender> | ||
32 | - <appender name="WSINFOFILE" class="org.apache.log4j.RollingFileAppender"> | ||
33 | - <param name="File" value="Logs/wsINFO.log" /> | ||
34 | - <param name="MaxFileSize" value="3000KB" /> | ||
35 | - <param name="MaxBackupIndex" value="20" /> | ||
36 | - <param name="Encoding" value="UTF-8" /> | ||
37 | - <layout class="org.apache.log4j.PatternLayout"> | ||
38 | - <param name="ConversionPattern" value="[runtime] %d -%-4r [%t] %x - %m%n" /> | ||
39 | - </layout> | ||
40 | - <filter class="org.apache.log4j.varia.LevelRangeFilter"> | ||
41 | - <param name="levelMin" value="debug" /> | ||
42 | - <param name="levelMax" value="info" /> | ||
43 | - <param name="AcceptOnMatch" value="true" /> | ||
44 | - </filter> | ||
45 | - </appender> | ||
46 | - <appender name="WSERRFILE" class="org.apache.log4j.RollingFileAppender"> | ||
47 | - <param name="File" value="Logs/wsERROR.log" /> | ||
48 | - <param name="MaxFileSize" value="3000KB" /> | ||
49 | - <param name="MaxBackupIndex" value="20" /> | ||
50 | - <param name="Encoding" value="UTF-8" /> | ||
51 | - <layout class="org.apache.log4j.PatternLayout"> | ||
52 | - <param name="ConversionPattern" value="[runtime] %d -%-4r [%t] %x - %m%n" /> | ||
53 | - </layout> | ||
54 | - <filter class="org.apache.log4j.varia.LevelRangeFilter"> | ||
55 | - <param name="levelMin" value="error" /> | ||
56 | - <param name="levelMax" value="error" /> | ||
57 | - <param name="AcceptOnMatch" value="true" /> | ||
58 | - </filter> | ||
59 | - </appender> | ||
60 | - <logger name="apiLog"> | ||
61 | - <level value="INFO" /> | ||
62 | - <appender-ref ref="INFOFILE" /> | ||
63 | - <appender-ref ref="ERRFILE" /> | ||
64 | - </logger> | ||
65 | - <logger name="WS"> | ||
66 | - <appender-ref ref="WSINFOFILE" /> | ||
67 | - <appender-ref ref="WSERRFILE" /> | ||
68 | - </logger> | ||
69 | - <root> | ||
70 | - <priority value="ERROR" /> | ||
71 | - </root> | ||
72 | -</log4j:configuration> |
lib/FastInfoset-1.2.8.jar
已删除
100644 → 0
不能预览此文件类型
lib/XmlSchema-1.4.7.jar
已删除
100644 → 0
不能预览此文件类型
lib/antlr-2.7.7.jar
已删除
100644 → 0
不能预览此文件类型
lib/antlr-3.2.jar
已删除
100644 → 0
不能预览此文件类型
lib/antlr-runtime-3.2.jar
已删除
100644 → 0
不能预览此文件类型
lib/aopalliance-1.0.jar
已删除
100644 → 0
不能预览此文件类型
lib/asm-3.3.jar
已删除
100644 → 0
不能预览此文件类型
lib/bcprov-jdk15-1.45.jar
已删除
100644 → 0
不能预览此文件类型
lib/commons-collections-3.2.1.jar
已删除
100644 → 0
不能预览此文件类型
lib/commons-lang-2.5.jar
已删除
100644 → 0
不能预览此文件类型
lib/commons-logging-1.1.1.jar
已删除
100644 → 0
不能预览此文件类型
lib/commons-pool-1.5.5.jar
已删除
100644 → 0
不能预览此文件类型
lib/cxf-xjc-boolean-2.3.2.jar
已删除
100644 → 0
不能预览此文件类型
lib/cxf-xjc-bug671-2.3.2.jar
已删除
100644 → 0
不能预览此文件类型
lib/cxf-xjc-dv-2.3.2.jar
已删除
100644 → 0
不能预览此文件类型
lib/cxf-xjc-ts-2.3.2.jar
已删除
100644 → 0
不能预览此文件类型
lib/dhbcore.jar
已删除
100644 → 0
不能预览此文件类型
lib/fscontext.jar
已删除
100644 → 0
不能预览此文件类型
lib/geronimo-activation_1.1_spec-1.1.jar
已删除
100644 → 0
不能预览此文件类型
不能预览此文件类型
lib/geronimo-javamail_1.4_spec-1.7.1.jar
已删除
100644 → 0
不能预览此文件类型
lib/geronimo-jaxws_2.2_spec-1.0.jar
已删除
100644 → 0
不能预览此文件类型
lib/geronimo-jms_1.1_spec-1.1.1.jar
已删除
100644 → 0
不能预览此文件类型
lib/geronimo-stax-api_1.0_spec-1.0.1.jar
已删除
100644 → 0
不能预览此文件类型
不能预览此文件类型
lib/jaxb-api-2.2.1.jar
已删除
100644 → 0
不能预览此文件类型
lib/jaxb-impl-2.2.1.1.jar
已删除
100644 → 0
不能预览此文件类型
lib/jaxb-xjc-2.2.1.1.jar
已删除
100644 → 0
不能预览此文件类型
lib/jettison-1.2.jar
已删除
100644 → 0
不能预览此文件类型
不能预览此文件类型
lib/jetty-http-7.2.2.v20101205.jar
已删除
100644 → 0
不能预览此文件类型
lib/jetty-io-7.2.2.v20101205.jar
已删除
100644 → 0
不能预览此文件类型
lib/jetty-server-7.2.2.v20101205.jar
已删除
100644 → 0
不能预览此文件类型
lib/jetty-util-7.2.2.v20101205.jar
已删除
100644 → 0
不能预览此文件类型
lib/jms.jar
已删除
100644 → 0
不能预览此文件类型
lib/jndi.jar
已删除
100644 → 0
不能预览此文件类型
lib/jra-1.0-alpha-4.jar
已删除
100644 → 0
不能预览此文件类型
lib/js-1.7R2.jar
已删除
100644 → 0
不能预览此文件类型
lib/jsr173_1.0_api.jar
已删除
100644 → 0
不能预览此文件类型
lib/jsr311-api-1.1.1.jar
已删除
100644 → 0
不能预览此文件类型
lib/jta.jar
已删除
100644 → 0
不能预览此文件类型
lib/ldap.jar
已删除
100644 → 0
不能预览此文件类型
lib/neethi-2.0.4.jar
已删除
100644 → 0
不能预览此文件类型
lib/oro-2.0.8.jar
已删除
100644 → 0
不能预览此文件类型
lib/providerutil.jar
已删除
100644 → 0
不能预览此文件类型
lib/resolver.jar
已删除
100644 → 0
不能预览此文件类型
lib/rmm.jar
已删除
100644 → 0
不能预览此文件类型
lib/saaj-api-1.3.jar
已删除
100644 → 0
不能预览此文件类型
lib/saaj-impl-1.3.2.jar
已删除
100644 → 0
不能预览此文件类型
lib/serializer-2.7.1.jar
已删除
100644 → 0
不能预览此文件类型
lib/stax2-api-3.0.2.jar
已删除
100644 → 0
不能预览此文件类型
lib/stringtemplate-3.2.jar
已删除
100644 → 0
不能预览此文件类型
lib/velocity-1.6.4.jar
已删除
100644 → 0
不能预览此文件类型
lib/woodstox-core-asl-4.0.8.jar
已删除
100644 → 0
不能预览此文件类型
lib/wsdl4j-1.6.2.jar
已删除
100644 → 0
不能预览此文件类型
lib/wss4j-1.5.11.jar
已删除
100644 → 0
不能预览此文件类型
lib/xalan-2.7.1.jar
已删除
100644 → 0
不能预览此文件类型
lib/xbean.jar
已删除
100644 → 0
不能预览此文件类型
lib/xbean_xpath.jar
已删除
100644 → 0
不能预览此文件类型
lib/xml-resolver-1.2.jar
已删除
100644 → 0
不能预览此文件类型
lib/xmlbeans-qname.jar
已删除
100644 → 0
不能预览此文件类型
lib/xmlpublic.jar
已删除
100644 → 0
不能预览此文件类型
此 diff 太大无法显示。
@@ -6,7 +6,7 @@ | @@ -6,7 +6,7 @@ | ||
6 | <groupId>com.sy</groupId> | 6 | <groupId>com.sy</groupId> |
7 | <artifactId>analysis_imf</artifactId> | 7 | <artifactId>analysis_imf</artifactId> |
8 | <version>0.0.1-SNAPSHOT</version> | 8 | <version>0.0.1-SNAPSHOT</version> |
9 | - <packaging>war</packaging> | 9 | + <packaging>jar</packaging> |
10 | 10 | ||
11 | <name>analysis_imf</name> | 11 | <name>analysis_imf</name> |
12 | <description>Demo project for Spring Boot</description> | 12 | <description>Demo project for Spring Boot</description> |
@@ -66,11 +66,11 @@ | @@ -66,11 +66,11 @@ | ||
66 | <version>1.1.9</version> | 66 | <version>1.1.9</version> |
67 | </dependency> | 67 | </dependency> |
68 | 68 | ||
69 | - <dependency> | 69 | +<!-- <dependency> |
70 | <groupId>org.apache.tomcat.embed</groupId> | 70 | <groupId>org.apache.tomcat.embed</groupId> |
71 | <artifactId>tomcat-embed-jasper</artifactId> | 71 | <artifactId>tomcat-embed-jasper</artifactId> |
72 | <scope>provided</scope> | 72 | <scope>provided</scope> |
73 | - </dependency> | 73 | + </dependency>--> |
74 | 74 | ||
75 | <dependency> | 75 | <dependency> |
76 | <groupId>com.github.pagehelper</groupId> | 76 | <groupId>com.github.pagehelper</groupId> |
@@ -85,16 +85,312 @@ | @@ -85,16 +85,312 @@ | ||
85 | </dependency> | 85 | </dependency> |
86 | 86 | ||
87 | <dependency> | 87 | <dependency> |
88 | + <groupId>org.dom4j</groupId> | ||
89 | + <artifactId>dom4j</artifactId> | ||
90 | + <version>2.1.0</version> | ||
91 | + </dependency> | ||
92 | + | ||
93 | + <!--IMF need jar--> | ||
94 | + <dependency> | ||
95 | + <groupId>org.apache.xmlbeans</groupId> | ||
96 | + <artifactId>xmlbeans</artifactId> | ||
97 | + <version>2.4.0</version> | ||
98 | + </dependency> | ||
99 | + <dependency> | ||
100 | + <groupId>org.apache.ws.commons.schema</groupId> | ||
101 | + <artifactId>XmlSchema</artifactId> | ||
102 | + <version>1.4.7</version> | ||
103 | + </dependency> | ||
104 | + <dependency> | ||
105 | + <groupId>wsdl4j</groupId> | ||
106 | + <artifactId>wsdl4j</artifactId> | ||
107 | + <version>1.6.2</version> | ||
108 | + </dependency> | ||
109 | + <dependency> | ||
110 | + <groupId>org.apache.neethi</groupId> | ||
111 | + <artifactId>neethi</artifactId> | ||
112 | + <version>2.0.4</version> | ||
113 | + </dependency> | ||
114 | + <dependency> | ||
115 | + <groupId>org.apache.cxf.xjcplugins</groupId> | ||
116 | + <artifactId>cxf-xjc-boolean</artifactId> | ||
117 | + <version>3.2.3</version> | ||
118 | + </dependency> | ||
119 | + <dependency> | ||
120 | + <groupId>org.apache.cxf.xjcplugins</groupId> | ||
121 | + <artifactId>cxf-xjc-dv</artifactId> | ||
122 | + <version>2.3.2</version> | ||
123 | + </dependency> | ||
124 | + <dependency> | ||
125 | + <groupId>org.apache.cxf.xjcplugins</groupId> | ||
126 | + <artifactId>cxf-xjc-bug671</artifactId> | ||
127 | + <version>2.3.2</version> | ||
128 | + </dependency> | ||
129 | + <dependency> | ||
130 | + <groupId>org.apache.cxf.xjcplugins</groupId> | ||
131 | + <artifactId>cxf-xjc-ts</artifactId> | ||
132 | + <version>2.3.2</version> | ||
133 | + </dependency> | ||
134 | + <dependency> | ||
88 | <groupId>log4j</groupId> | 135 | <groupId>log4j</groupId> |
89 | <artifactId>log4j</artifactId> | 136 | <artifactId>log4j</artifactId> |
90 | <version>1.2.17</version> | 137 | <version>1.2.17</version> |
91 | </dependency> | 138 | </dependency> |
92 | - | ||
93 | <dependency> | 139 | <dependency> |
94 | <groupId>com.thoughtworks.xstream</groupId> | 140 | <groupId>com.thoughtworks.xstream</groupId> |
95 | <artifactId>xstream</artifactId> | 141 | <artifactId>xstream</artifactId> |
96 | <version>1.4.10</version> | 142 | <version>1.4.10</version> |
97 | </dependency> | 143 | </dependency> |
144 | + <dependency> | ||
145 | + <groupId>commons-io</groupId> | ||
146 | + <artifactId>commons-io</artifactId> | ||
147 | + <version>2.5</version> | ||
148 | + </dependency> | ||
149 | + <dependency> | ||
150 | + <groupId>org.codehaus.woodstox</groupId> | ||
151 | + <artifactId>wstx-asl</artifactId> | ||
152 | + <version>3.2.4</version> | ||
153 | + </dependency> | ||
154 | + | ||
155 | + <!-- <dependency> | ||
156 | + <groupId>asm</groupId> | ||
157 | + <artifactId>asm</artifactId> | ||
158 | + <version>3.3</version> | ||
159 | + </dependency> | ||
160 | + <dependency> | ||
161 | + <groupId>org.apache.geronimo.specs</groupId> | ||
162 | + <artifactId>geronimo-activation_1.1_spec</artifactId> | ||
163 | + <version>1.1</version> | ||
164 | + </dependency> | ||
165 | + <dependency> | ||
166 | + <groupId>org.apache.geronimo.specs</groupId> | ||
167 | + <artifactId>geronimo-annotation_1.0_spec</artifactId> | ||
168 | + <version>1.1.1</version> | ||
169 | + </dependency> | ||
170 | + <dependency> | ||
171 | + <groupId>org.apache.geronimo.specs</groupId> | ||
172 | + <artifactId>geronimo-javamail_1.4_spec</artifactId> | ||
173 | + <version>1.7.1</version> | ||
174 | + </dependency> | ||
175 | + <dependency> | ||
176 | + <groupId>org.apache.geronimo.specs</groupId> | ||
177 | + <artifactId>geronimo-jaxws_2.2_spec</artifactId> | ||
178 | + <version>1.0</version> | ||
179 | + </dependency> | ||
180 | + <dependency> | ||
181 | + <groupId>org.apache.geronimo.specs</groupId> | ||
182 | + <artifactId>geronimo-jms_1.1_spec</artifactId> | ||
183 | + <version>1.1.1</version> | ||
184 | + </dependency> | ||
185 | + <dependency> | ||
186 | + <groupId>org.apache.geronimo.specs</groupId> | ||
187 | + <artifactId>geronimo-stax-api_1.0_spec</artifactId> | ||
188 | + <version>1.0.1</version> | ||
189 | + </dependency> | ||
190 | + <dependency> | ||
191 | + <groupId>org.apache.geronimo.specs</groupId> | ||
192 | + <artifactId>geronimo-ws-metadata_2.0_spec</artifactId> | ||
193 | + <version>1.1.3</version> | ||
194 | + </dependency>--> | ||
195 | + <!--添加本地IMF包--> | ||
196 | + <dependency> | ||
197 | + <groupId>com.caac</groupId> | ||
198 | + <artifactId>imf</artifactId> | ||
199 | + <version>1.0.0</version> | ||
200 | + <scope>system</scope> | ||
201 | + <systemPath>${project.basedir}/lib/IMFClient.1.0.0.jar</systemPath> | ||
202 | + </dependency> | ||
203 | + <dependency> | ||
204 | + <groupId>com.caac.imf</groupId> | ||
205 | + <artifactId>imfmessage</artifactId> | ||
206 | + <version>1.0.0</version> | ||
207 | + <scope>system</scope> | ||
208 | + <systemPath>${project.basedir}/lib/imfmsg.jar</systemPath> | ||
209 | + </dependency> | ||
210 | + <dependency> | ||
211 | + <groupId>com.caac.imf</groupId> | ||
212 | + <artifactId>process</artifactId> | ||
213 | + <version>1.0.0</version> | ||
214 | + <scope>system</scope> | ||
215 | + <systemPath>${project.basedir}/lib/ProcessService.jar</systemPath> | ||
216 | + </dependency> | ||
217 | + <dependency> | ||
218 | + <groupId>com.caac.imf</groupId> | ||
219 | + <artifactId>apiconfig</artifactId> | ||
220 | + <version>1.0.0</version> | ||
221 | + <scope>system</scope> | ||
222 | + <systemPath>${project.basedir}/lib/apiConfig.jar</systemPath> | ||
223 | + </dependency> | ||
224 | + <dependency> | ||
225 | + <groupId>com.caac.imf</groupId> | ||
226 | + <artifactId>upload</artifactId> | ||
227 | + <version>1.0.0</version> | ||
228 | + <scope>system</scope> | ||
229 | + <systemPath>${project.basedir}/lib/UploadService.jar</systemPath> | ||
230 | + </dependency> | ||
231 | + <dependency> | ||
232 | + <groupId>com.caac.imf</groupId> | ||
233 | + <artifactId>heartbeat</artifactId> | ||
234 | + <version>1.0.0</version> | ||
235 | + <scope>system</scope> | ||
236 | + <systemPath>${project.basedir}/lib/HeartbeatService.jar</systemPath> | ||
237 | + </dependency> | ||
238 | + <dependency> | ||
239 | + <groupId>com.caac.imf</groupId> | ||
240 | + <artifactId>returnxml</artifactId> | ||
241 | + <version>1.0.0</version> | ||
242 | + <scope>system</scope> | ||
243 | + <systemPath>${project.basedir}/lib/returnXml.jar</systemPath> | ||
244 | + </dependency> | ||
245 | + <dependency> | ||
246 | + <groupId>org.hyperic</groupId> | ||
247 | + <artifactId>sigar</artifactId> | ||
248 | + <version>1.6.4</version> | ||
249 | + <scope>system</scope> | ||
250 | + <systemPath>${project.basedir}/lib/sigar.jar</systemPath> | ||
251 | + </dependency> | ||
252 | + <dependency> | ||
253 | + <groupId>org.apache</groupId> | ||
254 | + <artifactId>cxf</artifactId> | ||
255 | + <version>2.3.2</version> | ||
256 | + <scope>system</scope> | ||
257 | + <systemPath>${project.basedir}/lib/cxf-2.3.2.jar</systemPath> | ||
258 | + </dependency> | ||
259 | + | ||
260 | + <dependency> | ||
261 | + <groupId>maven.org.apache</groupId> | ||
262 | + <artifactId>cxf</artifactId> | ||
263 | + <version>2.0</version> | ||
264 | + <scope>system</scope> | ||
265 | + <systemPath>${project.basedir}/lib/cxf-manifest.jar</systemPath> | ||
266 | + </dependency> | ||
267 | + <dependency> | ||
268 | + <groupId>org.apache.xml</groupId> | ||
269 | + <artifactId>xmlsec</artifactId> | ||
270 | + <version>1.4.4</version> | ||
271 | + <scope>system</scope> | ||
272 | + <systemPath>${project.basedir}/lib/xmlsec-1.4.4.jar</systemPath> | ||
273 | + </dependency> | ||
274 | + <dependency> | ||
275 | + <groupId>com.ibm.disthub2.impl</groupId> | ||
276 | + <artifactId>cl3e</artifactId> | ||
277 | + <version>1.0.0</version> | ||
278 | + <scope>system</scope> | ||
279 | + <systemPath>${project.basedir}/lib/CL3Export.jar</systemPath> | ||
280 | + </dependency> | ||
281 | + <dependency> | ||
282 | + <groupId>com.ibm.disthub2.impl</groupId> | ||
283 | + <artifactId>cl3ne</artifactId> | ||
284 | + <version>1.0.0</version> | ||
285 | + <scope>system</scope> | ||
286 | + <systemPath>${project.basedir}/lib/CL3Nonexport.jar</systemPath> | ||
287 | + </dependency> | ||
288 | + <dependency> | ||
289 | + <groupId>com.ibm.mq</groupId> | ||
290 | + <artifactId>axis2</artifactId> | ||
291 | + <version>1.0.0</version> | ||
292 | + <scope>system</scope> | ||
293 | + <systemPath>${project.basedir}/lib/com.ibm.mq.axis2.jar</systemPath> | ||
294 | + </dependency> | ||
295 | + <dependency> | ||
296 | + <groupId>com.ibm.mq</groupId> | ||
297 | + <artifactId>commonservices</artifactId> | ||
298 | + <version>1.0.0</version> | ||
299 | + <scope>system</scope> | ||
300 | + <systemPath>${project.basedir}/lib/com.ibm.mq.commonservices.jar</systemPath> | ||
301 | + </dependency> | ||
302 | + <dependency> | ||
303 | + <groupId>com.ibm.mq</groupId> | ||
304 | + <artifactId>defaultconfig</artifactId> | ||
305 | + <version>1.0.0</version> | ||
306 | + <scope>system</scope> | ||
307 | + <systemPath>${project.basedir}/lib/com.ibm.mq.defaultconfig.jar</systemPath> | ||
308 | + </dependency> | ||
309 | + <dependency> | ||
310 | + <groupId>com.ibm.mq</groupId> | ||
311 | + <artifactId>fta</artifactId> | ||
312 | + <version>1.0.0</version> | ||
313 | + <scope>system</scope> | ||
314 | + <systemPath>${project.basedir}/lib/com.ibm.mq.fta.jar</systemPath> | ||
315 | + </dependency> | ||
316 | + <dependency> | ||
317 | + <groupId>com.ibm.mq</groupId> | ||
318 | + <artifactId>headers</artifactId> | ||
319 | + <version>1.0.0</version> | ||
320 | + <scope>system</scope> | ||
321 | + <systemPath>${project.basedir}/lib/com.ibm.mq.headers.jar</systemPath> | ||
322 | + </dependency> | ||
323 | + <dependency> | ||
324 | + <groupId>com.ibm</groupId> | ||
325 | + <artifactId>mq</artifactId> | ||
326 | + <version>1.0.0</version> | ||
327 | + <scope>system</scope> | ||
328 | + <systemPath>${project.basedir}/lib/com.ibm.mq.jar</systemPath> | ||
329 | + </dependency> | ||
330 | + <dependency> | ||
331 | + <groupId>com.ibm</groupId> | ||
332 | + <artifactId>jmqi</artifactId> | ||
333 | + <version>1.0.0</version> | ||
334 | + <scope>system</scope> | ||
335 | + <systemPath>${project.basedir}/lib/com.ibm.mq.jmqi.jar</systemPath> | ||
336 | + </dependency> | ||
337 | + <dependency> | ||
338 | + <groupId>com.ibm.mq</groupId> | ||
339 | + <artifactId>jms.nojndi</artifactId> | ||
340 | + <version>1.0.0</version> | ||
341 | + <scope>system</scope> | ||
342 | + <systemPath>${project.basedir}/lib/com.ibm.mq.jms.Nojndi.jar</systemPath> | ||
343 | + </dependency> | ||
344 | + <dependency> | ||
345 | + <groupId>com.ibm.mq</groupId> | ||
346 | + <artifactId>pcf</artifactId> | ||
347 | + <version>1.0.0</version> | ||
348 | + <scope>system</scope> | ||
349 | + <systemPath>${project.basedir}/lib/com.ibm.mq.pcf.jar</systemPath> | ||
350 | + </dependency> | ||
351 | + <dependency> | ||
352 | + <groupId>com.ibm.mq</groupId> | ||
353 | + <artifactId>postcard</artifactId> | ||
354 | + <version>1.0.0</version> | ||
355 | + <scope>system</scope> | ||
356 | + <systemPath>${project.basedir}/lib/com.ibm.mq.postcard.jar</systemPath> | ||
357 | + </dependency> | ||
358 | + <dependency> | ||
359 | + <groupId>com.ibm.mq</groupId> | ||
360 | + <artifactId>soap</artifactId> | ||
361 | + <version>1.0.0</version> | ||
362 | + <scope>system</scope> | ||
363 | + <systemPath>${project.basedir}/lib/com.ibm.mq.soap.jar</systemPath> | ||
364 | + </dependency> | ||
365 | + <dependency> | ||
366 | + <groupId>com.ibm.mq</groupId> | ||
367 | + <artifactId>tools.ras</artifactId> | ||
368 | + <version>1.0.0</version> | ||
369 | + <scope>system</scope> | ||
370 | + <systemPath>${project.basedir}/lib/com.ibm.mq.tools.ras.jar</systemPath> | ||
371 | + </dependency> | ||
372 | + <dependency> | ||
373 | + <groupId>com.ibm.mq</groupId> | ||
374 | + <artifactId>etclient</artifactId> | ||
375 | + <version>1.0.0</version> | ||
376 | + <scope>system</scope> | ||
377 | + <systemPath>${project.basedir}/lib/com.ibm.mqetclient.jar</systemPath> | ||
378 | + </dependency> | ||
379 | + <dependency> | ||
380 | + <groupId>com.ibm</groupId> | ||
381 | + <artifactId>mqjms</artifactId> | ||
382 | + <version>1.0.0</version> | ||
383 | + <scope>system</scope> | ||
384 | + <systemPath>${project.basedir}/lib/com.ibm.mqjms.jar</systemPath> | ||
385 | + </dependency> | ||
386 | + <dependency> | ||
387 | + <groupId>javax.resource</groupId> | ||
388 | + <artifactId>connector</artifactId> | ||
389 | + <version>1.0</version> | ||
390 | + <scope>system</scope> | ||
391 | + <systemPath>${project.basedir}/lib/connector.jar</systemPath> | ||
392 | + </dependency> | ||
393 | + | ||
98 | 394 | ||
99 | </dependencies> | 395 | </dependencies> |
100 | <dependencyManagement> | 396 | <dependencyManagement> |
@@ -113,6 +409,19 @@ | @@ -113,6 +409,19 @@ | ||
113 | <plugin> | 409 | <plugin> |
114 | <groupId>org.springframework.boot</groupId> | 410 | <groupId>org.springframework.boot</groupId> |
115 | <artifactId>spring-boot-maven-plugin</artifactId> | 411 | <artifactId>spring-boot-maven-plugin</artifactId> |
412 | + <configuration> | ||
413 | + <includeSystemScope>true</includeSystemScope> | ||
414 | + </configuration> | ||
415 | + <!--<configuration>--> | ||
416 | + <!--<mainClass>com.sy.AnalysisImfApplication</mainClass>--> | ||
417 | + <!--</configuration>--> | ||
418 | + <!--<executions>--> | ||
419 | + <!--<execution>--> | ||
420 | + <!--<goals>--> | ||
421 | + <!--<goal>repackage</goal>--> | ||
422 | + <!--</goals>--> | ||
423 | + <!--</execution>--> | ||
424 | + <!--</executions>--> | ||
116 | </plugin> | 425 | </plugin> |
117 | <!-- mybatis generator 自动生成代码插件 --> | 426 | <!-- mybatis generator 自动生成代码插件 --> |
118 | <plugin> | 427 | <plugin> |
@@ -2,6 +2,7 @@ package com.sy.IMF; | @@ -2,6 +2,7 @@ package com.sy.IMF; | ||
2 | 2 | ||
3 | import com.caac.imf.api.IMFClient; | 3 | import com.caac.imf.api.IMFClient; |
4 | import com.caac.imf.api.IMFClientFactory; | 4 | import com.caac.imf.api.IMFClientFactory; |
5 | +import com.sy.utils.FileTool; | ||
5 | import org.apache.log4j.Logger; | 6 | import org.apache.log4j.Logger; |
6 | import org.apache.log4j.PropertyConfigurator; | 7 | import org.apache.log4j.PropertyConfigurator; |
7 | import org.springframework.scheduling.annotation.Scheduled; | 8 | import org.springframework.scheduling.annotation.Scheduled; |
@@ -20,6 +21,8 @@ public class IMF_Tesk { | @@ -20,6 +21,8 @@ public class IMF_Tesk { | ||
20 | private static void start() throws Exception { | 21 | private static void start() throws Exception { |
21 | PropertyConfigurator.configure("config/log4j.properties"); | 22 | PropertyConfigurator.configure("config/log4j.properties"); |
22 | client = IMFClientFactory.createInstance(); | 23 | client = IMFClientFactory.createInstance(); |
24 | + String loginname = FileTool.readProperties("loginname"); | ||
25 | + String loginpass = FileTool.readProperties("loginpass"); | ||
23 | 26 | ||
24 | 27 | ||
25 | if (client != null) { | 28 | if (client != null) { |
@@ -41,7 +44,7 @@ public class IMF_Tesk { | @@ -41,7 +44,7 @@ public class IMF_Tesk { | ||
41 | 44 | ||
42 | } | 45 | } |
43 | if (!LOGIN_OK){ | 46 | if (!LOGIN_OK){ |
44 | - loginIMF(client, "KKW1", "KKW1", "config/imf_config.properties"); | 47 | + loginIMF(client, loginname, loginpass, "config/imf_config.properties"); |
45 | } | 48 | } |
46 | 49 | ||
47 | 50 |
@@ -21,7 +21,7 @@ public class KAKO_Reader extends Thread{ | @@ -21,7 +21,7 @@ public class KAKO_Reader extends Thread{ | ||
21 | if (IMF_Tesk.LOGIN_OK) synchronized (this) { | 21 | if (IMF_Tesk.LOGIN_OK) synchronized (this) { |
22 | String message = this.client.getMSG(); | 22 | String message = this.client.getMSG(); |
23 | if (message != null) { | 23 | if (message != null) { |
24 | - // logger.info(message); | 24 | + logger.info(message); |
25 | AnalysisRoute route = new AnalysisRoute(); | 25 | AnalysisRoute route = new AnalysisRoute(); |
26 | route.analysis(message); | 26 | route.analysis(message); |
27 | } | 27 | } |
@@ -39,9 +39,8 @@ public class KAKO_Reader extends Thread{ | @@ -39,9 +39,8 @@ public class KAKO_Reader extends Thread{ | ||
39 | } | 39 | } |
40 | 40 | ||
41 | }catch (Exception e){ | 41 | }catch (Exception e){ |
42 | - | 42 | + isrunning=false; |
43 | + logger.info("****************读取线程不在了****************"); | ||
43 | } | 44 | } |
44 | - isrunning=false; | ||
45 | - logger.info("****************读取线程不在了****************"); | ||
46 | } | 45 | } |
47 | } | 46 | } |
1 | package com.sy.IMF; | 1 | package com.sy.IMF; |
2 | 2 | ||
3 | import com.caac.imf.api.IMFClient; | 3 | import com.caac.imf.api.IMFClient; |
4 | +import com.sy.utils.DateTimeConverter; | ||
5 | +import com.sy.utils.FileTool; | ||
6 | +import com.sy.utils.MakeImfMeta; | ||
7 | +import org.apache.commons.io.FileUtils; | ||
4 | import org.apache.log4j.Logger; | 8 | import org.apache.log4j.Logger; |
5 | 9 | ||
10 | +import java.io.File; | ||
11 | +import java.util.List; | ||
12 | + | ||
6 | public class KAKO_Sender extends Thread{ | 13 | public class KAKO_Sender extends Thread{ |
7 | 14 | ||
8 | protected static final Logger logger = Logger.getLogger(KAKO_Sender.class); | 15 | protected static final Logger logger = Logger.getLogger(KAKO_Sender.class); |
9 | public static boolean isrunning; | 16 | public static boolean isrunning; |
10 | private IMFClient client; | 17 | private IMFClient client; |
18 | + private String content; | ||
11 | public KAKO_Sender(IMFClient client) { | 19 | public KAKO_Sender(IMFClient client) { |
12 | this.client = client; | 20 | this.client = client; |
13 | } | 21 | } |
14 | - private String SendMsg = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" + | ||
15 | - "<Msg>\n" + | ||
16 | - "\t<META>\n" + | ||
17 | - "\t\t<SNDR>ZWY</SNDR>\n" + | ||
18 | - "\t\t<RCVR/>\n" + | ||
19 | - "\t\t<SEQN>16078357182</SEQN>\n" + | ||
20 | - "\t\t<DDTM>20181116175107671</DDTM>\n" + | ||
21 | - "\t\t<TYPE>HYXX</TYPE>\n" + | ||
22 | - "\t\t<STYP>NDLR</STYP>\n" + | ||
23 | - "\t</META>\n" + | ||
24 | - "\t<DECLAREPREPAREMASTERXMLBODY>\n" + | ||
25 | - "\t\t<Head>\n" + | ||
26 | - "\t\t\t<MessageID>CN_MT2201_1p1_4604729604327_20181116174636305</MessageID>\n" + | ||
27 | - "\t\t\t<FunctionCode>9</FunctionCode>\n" + | ||
28 | - "\t\t\t<MessageType>MT2201MASTER</MessageType>\n" + | ||
29 | - "\t\t\t<SenderID>460470678920X_DXPENT0000460002_20181116175107671</SenderID>\n" + | ||
30 | - "\t\t\t<ReceiverID>4604_20181116175107671</ReceiverID>\n" + | ||
31 | - "\t\t\t<SendTime>20181116175107671</SendTime>\n" + | ||
32 | - "\t\t\t<Version>1.0</Version>\n" + | ||
33 | - "\t\t</Head>\n" + | ||
34 | - "\t\t<Declaration>\n" + | ||
35 | - "\t\t\t<Carrier>\n" + | ||
36 | - "\t\t\t\t<ID>KA</ID>\n" + | ||
37 | - "\t\t\t</Carrier>\n" + | ||
38 | - "\t\t\t<ORG>\n" + | ||
39 | - "\t\t\t\t<ID>CGO</ID>\n" + | ||
40 | - "\t\t\t</ORG>\n" + | ||
41 | - "\t\t\t<DES>\n" + | ||
42 | - "\t\t\t\t<ID>LAX</ID>\n" + | ||
43 | - "\t\t\t</DES>\n" + | ||
44 | - "\t\t\t<BorderTransportMeans>\n" + | ||
45 | - "\t\t\t\t<JourneyID>749/2018-11-18</JourneyID>\n" + | ||
46 | - "\t\t\t</BorderTransportMeans>\n" + | ||
47 | - "\t\t\t<Consignment>\n" + | ||
48 | - "\t\t\t\t<TransportContractDocument>\n" + | ||
49 | - "\t\t\t\t\t<ID>160-78357182</ID>\n" + | ||
50 | - "\t\t\t\t</TransportContractDocument>\n" + | ||
51 | - "\t\t\t\t<AssociatedTransportDocument>\n" + | ||
52 | - "\t\t\t\t\t<ID/>\n" + | ||
53 | - "\t\t\t\t</AssociatedTransportDocument>\n" + | ||
54 | - "\t\t\t\t<LoadingLocation>\n" + | ||
55 | - "\t\t\t\t\t<ID>CGO/4620</ID>\n" + | ||
56 | - "\t\t\t\t\t<LoadingDate>2018-11-16 21:46</LoadingDate>\n" + | ||
57 | - "\t\t\t\t</LoadingLocation>\n" + | ||
58 | - "\t\t\t\t<UnloadingLocation>\n" + | ||
59 | - "\t\t\t\t\t<ID>CGO/4620</ID>\n" + | ||
60 | - "\t\t\t\t</UnloadingLocation>\n" + | ||
61 | - "\t\t\t\t<TransportSplitIndicator>0</TransportSplitIndicator>\n" + | ||
62 | - "\t\t\t\t<ConsignmentPackaging>\n" + | ||
63 | - "\t\t\t\t\t<QuantityQuantity>1</QuantityQuantity>\n" + | ||
64 | - "\t\t\t\t</ConsignmentPackaging>\n" + | ||
65 | - "\t\t\t\t<TotalGrossMassMeasure>65</TotalGrossMassMeasure>\n" + | ||
66 | - "\t\t\t\t<PreQuantityQuantity>1</PreQuantityQuantity>\n" + | ||
67 | - "\t\t\t\t<PreTotalGrossMassMeasure>65</PreTotalGrossMassMeasure>\n" + | ||
68 | - "\t\t\t\t<CustomsStatus>001</CustomsStatus>\n" + | ||
69 | - "\t\t\t\t<FreightPayment>\n" + | ||
70 | - "\t\t\t\t\t<MethodCode>PP</MethodCode>\n" + | ||
71 | - "\t\t\t\t</FreightPayment>\n" + | ||
72 | - "\t\t\t\t<ProductName>CELL PHONE</ProductName>\n" + | ||
73 | - "\t\t\t\t<PrepareTime>2018-11-16 21:46</PrepareTime>\n" + | ||
74 | - "\t\t\t\t<CustomsCode>4620</CustomsCode>\n" + | ||
75 | - "\t\t\t\t<AgentName>中外运空运发展股份有限公司郑州分公司</AgentName>\n" + | ||
76 | - "\t\t\t\t<AgentCompany>中外运空运发展股份有限公司郑州分公司</AgentCompany>\n" + | ||
77 | - "\t\t\t\t<NameOfgoods>CELL PHONE</NameOfgoods>\n" + | ||
78 | - "\t\t\t\t<DeliveryStation>001</DeliveryStation>\n" + | ||
79 | - "\t\t\t\t<UNnumber/>\n" + | ||
80 | - "\t\t\t\t<Category/>\n" + | ||
81 | - "\t\t\t\t<Consignee>\n" + | ||
82 | - "\t\t\t\t\t<Name>FEDEX TRADE NETWORKS TRANSPORT</Name>\n" + | ||
83 | - "\t\t\t\t\t<Address>\n" + | ||
84 | - "\t\t\t\t\t\t<Line>17210 SOUTH MAIN STREET GARDENA</Line>\n" + | ||
85 | - "\t\t\t\t\t\t<CityName>LOS ANGELES</CityName>\n" + | ||
86 | - "\t\t\t\t\t\t<CountryCode>US</CountryCode>\n" + | ||
87 | - "\t\t\t\t\t\t<ZipCode/>\n" + | ||
88 | - "\t\t\t\t\t\t<PROVINCECODE/>\n" + | ||
89 | - "\t\t\t\t\t\t<PROVINCENAME/>\n" + | ||
90 | - "\t\t\t\t\t\t<Deltaname/>\n" + | ||
91 | - "\t\t\t\t\t\t<TelePhone>3109655000</TelePhone>\n" + | ||
92 | - "\t\t\t\t\t\t<Fax/>\n" + | ||
93 | - "\t\t\t\t\t\t<CNECUSID>EIN+160807223</CNECUSID>\n" + | ||
94 | - "\t\t\t\t\t\t<CNEAEO/>\n" + | ||
95 | - "\t\t\t\t\t\t<Unlodingcode>LAX</Unlodingcode>\n" + | ||
96 | - "\t\t\t\t\t</Address>\n" + | ||
97 | - "\t\t\t\t</Consignee>\n" + | ||
98 | - "\t\t\t\t<Consignor>\n" + | ||
99 | - "\t\t\t\t\t<name>FEDEX</name>\n" + | ||
100 | - "\t\t\t\t\t<Address>\n" + | ||
101 | - "\t\t\t\t\t\t<Line>ROOM7</Line>\n" + | ||
102 | - "\t\t\t\t\t\t<CountryCode>CN</CountryCode>\n" + | ||
103 | - "\t\t\t\t\t\t<ZipCode/>\n" + | ||
104 | - "\t\t\t\t\t\t<Deltaname/>\n" + | ||
105 | - "\t\t\t\t\t\t<TelePhone>8637155131789</TelePhone>\n" + | ||
106 | - "\t\t\t\t\t\t<Fax/>\n" + | ||
107 | - "\t\t\t\t\t\t<SHPAEO/>\n" + | ||
108 | - "\t\t\t\t\t\t<SHPCUSID>USCI+91410100053384175K</SHPCUSID>\n" + | ||
109 | - "\t\t\t\t\t</Address>\n" + | ||
110 | - "\t\t\t\t</Consignor>\n" + | ||
111 | - "\t\t\t</Consignment>\n" + | ||
112 | - "\t\t</Declaration>\n" + | ||
113 | - "\t</DECLAREPREPAREMASTERXMLBODY>\n" + | ||
114 | - "</Msg>"; | 22 | + public KAKO_Sender(IMFClient client, String content) { |
23 | + this.client = client; | ||
24 | + this.content = content; | ||
25 | + } | ||
115 | 26 | ||
116 | public void run(){ | 27 | public void run(){ |
117 | try { | 28 | try { |
29 | + String sendDir = FileTool.readProperties("readDirectory"); | ||
30 | + String SNDR = FileTool.readProperties("loginname"); | ||
31 | + String TYPE = FileTool.readProperties("TYPE"); | ||
32 | + String STYP = FileTool.readProperties("STYP"); | ||
33 | + String RCVR = FileTool.readProperties("RCVR"); | ||
34 | + String DDTM = DateTimeConverter.getFormat(); | ||
35 | + String SEQN = DDTM; | ||
118 | 36 | ||
119 | if (this.client == null) { | 37 | if (this.client == null) { |
120 | logger.info("IMFClient has been closed"); | 38 | logger.info("IMFClient has been closed"); |
121 | return; | 39 | return; |
122 | } | 40 | } |
123 | isrunning=true; | 41 | isrunning=true; |
124 | - if(IMF_Tesk.isSuc){ | ||
125 | -// logger.info("<<<<<<<<<<<主线程初始化成功>>>>>>>>>>>>"); | ||
126 | - if(IMF_Tesk.LOGIN_OK){ | 42 | + if(IMF_Tesk.LOGIN_OK){ |
43 | + while (true){ | ||
44 | + List<File> files = FileTool.readDirectoryFiles(new File(sendDir)); | ||
45 | + for (File file:files) { | ||
46 | + String fileContent = FileTool.readfile(file); | ||
47 | + String sendMsg = MakeImfMeta.makeImfDocument(SNDR,RCVR,TYPE,STYP,DDTM,SEQN,fileContent); | ||
48 | + String returnMsg = this.client.sendMSG(sendMsg); | ||
49 | + //发送成功处理,删除已发送成功的目录下的文件 | ||
50 | + if(returnMsg.indexOf("<CODE>9</CODE>")>=0){ | ||
51 | + FileUtils.forceDelete(file); | ||
52 | + } | ||
53 | + } | ||
54 | + try { | ||
55 | + Thread.sleep(500L); | ||
56 | + } catch (InterruptedException var3) { | ||
57 | + var3.printStackTrace(); | ||
127 | 58 | ||
128 | - String returnMsg = this.client.sendMSG(SendMsg); | ||
129 | - logger.info("《--------发送信息成功开始轮询500mm一次--------"+returnMsg); | ||
130 | - }else{ | ||
131 | - logger.info("<<<<<<<<<<<登陆中>>>>>>>>>>>>"); | 59 | + } |
132 | } | 60 | } |
61 | + | ||
133 | } | 62 | } |
134 | 63 | ||
135 | }catch (Exception var14) { | 64 | }catch (Exception var14) { |
136 | var14.printStackTrace(); | 65 | var14.printStackTrace(); |
137 | logger.info(var14.getMessage()); | 66 | logger.info(var14.getMessage()); |
138 | } | 67 | } |
139 | - | ||
140 | - | ||
141 | - | ||
142 | - | ||
143 | isrunning=false; | 68 | isrunning=false; |
144 | logger.info("<<<<<<<<<<<发送线程不在了>>>>>>>>>>>>"); | 69 | logger.info("<<<<<<<<<<<发送线程不在了>>>>>>>>>>>>"); |
145 | } | 70 | } |
src/main/java/com/sy/TestAnalysis.java
已删除
100644 → 0
1 | -package com.sy; | ||
2 | - | ||
3 | -import com.sy.controller.AnalysisRoute; | ||
4 | - | ||
5 | -/** | ||
6 | - * @author zhangfan | ||
7 | - * @web www.sy.com | ||
8 | - * @company 郑州商友科技有限公司 | ||
9 | - * @time 2018-11-29 12:58 | ||
10 | - */ | ||
11 | -public class TestAnalysis { | ||
12 | - | ||
13 | - public static void main(String[] args) { | ||
14 | - AnalysisRoute route = new AnalysisRoute(); | ||
15 | - route.analysis("str"); | ||
16 | - } | ||
17 | -} |
@@ -5,78 +5,15 @@ import com.thoughtworks.xstream.XStream; | @@ -5,78 +5,15 @@ import com.thoughtworks.xstream.XStream; | ||
5 | import com.thoughtworks.xstream.io.xml.DomDriver; | 5 | import com.thoughtworks.xstream.io.xml.DomDriver; |
6 | import com.thoughtworks.xstream.io.xml.XmlFriendlyNameCoder; | 6 | import com.thoughtworks.xstream.io.xml.XmlFriendlyNameCoder; |
7 | 7 | ||
8 | -import java.io.UnsupportedEncodingException; | ||
9 | - | ||
10 | public class MessageAnalysis { | 8 | public class MessageAnalysis { |
11 | 9 | ||
12 | public static Message msg = null; | 10 | public static Message msg = null; |
13 | 11 | ||
14 | public Message readTicketsXml(String str) { | 12 | public Message readTicketsXml(String str) { |
15 | - // str = utf8Togb2312(str); | ||
16 | return getMessage(str); | 13 | return getMessage(str); |
17 | } | 14 | } |
18 | 15 | ||
19 | - public static String getUTF8StringFromGBKString(String gbkStr) { | ||
20 | - try { | ||
21 | - return new String(getUTF8BytesFromGBKString(gbkStr), "UTF-8"); | ||
22 | - } catch (UnsupportedEncodingException e) { | ||
23 | - throw new InternalError(); | ||
24 | - } | ||
25 | - } | ||
26 | 16 | ||
27 | - public static byte[] getUTF8BytesFromGBKString(String gbkStr) { | ||
28 | - int n = gbkStr.length(); | ||
29 | - byte[] utfBytes = new byte[3 * n]; | ||
30 | - int k = 0; | ||
31 | - for (int i = 0; i < n; i++) { | ||
32 | - int m = gbkStr.charAt(i); | ||
33 | - if (m < 128 && m >= 0) { | ||
34 | - utfBytes[k++] = (byte) m; | ||
35 | - continue; | ||
36 | - } | ||
37 | - utfBytes[k++] = (byte) (0xe0 | (m >> 12)); | ||
38 | - utfBytes[k++] = (byte) (0x80 | ((m >> 6) & 0x3f)); | ||
39 | - utfBytes[k++] = (byte) (0x80 | (m & 0x3f)); | ||
40 | - } | ||
41 | - if (k < utfBytes.length) { | ||
42 | - byte[] tmp = new byte[k]; | ||
43 | - System.arraycopy(utfBytes, 0, tmp, 0, k); | ||
44 | - return tmp; | ||
45 | - } | ||
46 | - return utfBytes; | ||
47 | - } | ||
48 | - | ||
49 | - public static String utf8Togb2312(String str) { | ||
50 | - StringBuffer sb = new StringBuffer(); | ||
51 | - for (int i = 0; i < str.length(); i++) { | ||
52 | - char c = str.charAt(i); | ||
53 | - switch (c) { | ||
54 | - case '+': | ||
55 | - sb.append(' '); | ||
56 | - break; | ||
57 | - case '%': | ||
58 | - try { | ||
59 | - sb.append((char) Integer.parseInt( | ||
60 | - str.substring(i + 1, i + 3), 16)); | ||
61 | - } catch (NumberFormatException e) { | ||
62 | - throw new IllegalArgumentException(); | ||
63 | - } | ||
64 | - i += 2; | ||
65 | - break; | ||
66 | - default: | ||
67 | - sb.append(c); | ||
68 | - break; | ||
69 | - } | ||
70 | - } | ||
71 | - String result = sb.toString(); | ||
72 | - String res = null; | ||
73 | - try { | ||
74 | - byte[] inputBytes = result.getBytes("8859_1"); | ||
75 | - res = new String(inputBytes, "UTF-8"); | ||
76 | - } catch (Exception e) { | ||
77 | - } | ||
78 | - return res; | ||
79 | - } | ||
80 | 17 | ||
81 | 18 | ||
82 | static Message getMessage(String str) { | 19 | static Message getMessage(String str) { |
@@ -2,12 +2,6 @@ package com.sy.service; | @@ -2,12 +2,6 @@ package com.sy.service; | ||
2 | 2 | ||
3 | import com.sy.model.v_express_billno; | 3 | import com.sy.model.v_express_billno; |
4 | 4 | ||
5 | -/** | ||
6 | - * @author zhangfan | ||
7 | - * @web www.sy.com | ||
8 | - * @company 郑州商友科技有限公司 | ||
9 | - * @time 2018-11-28 16:40 | ||
10 | - */ | ||
11 | public interface CLRService { | 5 | public interface CLRService { |
12 | 6 | ||
13 | int save(v_express_billno billno); | 7 | int save(v_express_billno billno); |
@@ -4,12 +4,6 @@ import com.sy.model.port_manifest_body; | @@ -4,12 +4,6 @@ import com.sy.model.port_manifest_body; | ||
4 | import com.sy.model.port_manifest_head; | 4 | import com.sy.model.port_manifest_head; |
5 | import com.sy.model.port_manifest_head_stat; | 5 | import com.sy.model.port_manifest_head_stat; |
6 | 6 | ||
7 | -/** | ||
8 | - * @author zhangfan | ||
9 | - * @web www.sy.com | ||
10 | - * @company 郑州商友科技有限公司 | ||
11 | - * @time 2018-11-28 16:40 | ||
12 | - */ | ||
13 | public interface GATService { | 7 | public interface GATService { |
14 | 8 | ||
15 | int savePortHead(port_manifest_head head); | 9 | int savePortHead(port_manifest_head head); |
@@ -2,12 +2,6 @@ package com.sy.service; | @@ -2,12 +2,6 @@ package com.sy.service; | ||
2 | 2 | ||
3 | import com.sy.model.messagehead; | 3 | import com.sy.model.messagehead; |
4 | 4 | ||
5 | -/** | ||
6 | - * @author zhangfan | ||
7 | - * @web www.sy.com | ||
8 | - * @company 郑州商友科技有限公司 | ||
9 | - * @time 2018-11-28 16:42 | ||
10 | - */ | ||
11 | public interface MessageHeadService { | 5 | public interface MessageHeadService { |
12 | 6 | ||
13 | int save(messagehead messagehead); | 7 | int save(messagehead messagehead); |
@@ -2,13 +2,6 @@ package com.sy.service; | @@ -2,13 +2,6 @@ package com.sy.service; | ||
2 | 2 | ||
3 | import com.sy.model.airone_ex_stock; | 3 | import com.sy.model.airone_ex_stock; |
4 | 4 | ||
5 | -/** | ||
6 | - * @author zhangfan | ||
7 | - * @web www.sy.com | ||
8 | - * @company 郑州商友科技有限公司 | ||
9 | - * @time 2018-11-28 9:27 | ||
10 | - */ | ||
11 | - | ||
12 | public interface aironeExStockService { | 5 | public interface aironeExStockService { |
13 | 6 | ||
14 | int save(airone_ex_stock ex); | 7 | int save(airone_ex_stock ex); |
@@ -2,12 +2,6 @@ package com.sy.service; | @@ -2,12 +2,6 @@ package com.sy.service; | ||
2 | 2 | ||
3 | import com.sy.model.airone_im_stock; | 3 | import com.sy.model.airone_im_stock; |
4 | 4 | ||
5 | -/** | ||
6 | - * @author zhangfan | ||
7 | - * @web www.sy.com | ||
8 | - * @company 郑州商友科技有限公司 | ||
9 | - * @time 2018-11-28 16:26 | ||
10 | - */ | ||
11 | public interface aironeImStockService { | 5 | public interface aironeImStockService { |
12 | 6 | ||
13 | int save(airone_im_stock im); | 7 | int save(airone_im_stock im); |
@@ -6,12 +6,6 @@ import com.sy.service.CLRService; | @@ -6,12 +6,6 @@ import com.sy.service.CLRService; | ||
6 | import org.springframework.beans.factory.annotation.Autowired; | 6 | import org.springframework.beans.factory.annotation.Autowired; |
7 | import org.springframework.stereotype.Service; | 7 | import org.springframework.stereotype.Service; |
8 | 8 | ||
9 | -/** | ||
10 | - * @author zhangfan | ||
11 | - * @web www.sy.com | ||
12 | - * @company 郑州商友科技有限公司 | ||
13 | - * @time 2018-11-28 16:47 | ||
14 | - */ | ||
15 | @Service | 9 | @Service |
16 | public class CLRServiceImpl implements CLRService { | 10 | public class CLRServiceImpl implements CLRService { |
17 | 11 |
@@ -9,13 +9,6 @@ import com.sy.model.port_manifest_head_stat; | @@ -9,13 +9,6 @@ import com.sy.model.port_manifest_head_stat; | ||
9 | import com.sy.service.GATService; | 9 | import com.sy.service.GATService; |
10 | import org.springframework.beans.factory.annotation.Autowired; | 10 | import org.springframework.beans.factory.annotation.Autowired; |
11 | import org.springframework.stereotype.Service; | 11 | import org.springframework.stereotype.Service; |
12 | - | ||
13 | -/** | ||
14 | - * @author zhangfan | ||
15 | - * @web www.sy.com | ||
16 | - * @company 郑州商友科技有限公司 | ||
17 | - * @time 2018-11-28 16:48 | ||
18 | - */ | ||
19 | @Service | 12 | @Service |
20 | public class GATServiceImpl implements GATService { | 13 | public class GATServiceImpl implements GATService { |
21 | 14 |
@@ -6,12 +6,6 @@ import com.sy.service.aironeExStockService; | @@ -6,12 +6,6 @@ import com.sy.service.aironeExStockService; | ||
6 | import org.springframework.beans.factory.annotation.Autowired; | 6 | import org.springframework.beans.factory.annotation.Autowired; |
7 | import org.springframework.stereotype.Service; | 7 | import org.springframework.stereotype.Service; |
8 | 8 | ||
9 | -/** | ||
10 | - * @author zhangfan | ||
11 | - * @web www.sy.com | ||
12 | - * @company 郑州商友科技有限公司 | ||
13 | - * @time 2018-11-28 9:28 | ||
14 | - */ | ||
15 | @Service("exStockService") | 9 | @Service("exStockService") |
16 | public class aironeExStockServiceImpl implements aironeExStockService { | 10 | public class aironeExStockServiceImpl implements aironeExStockService { |
17 | 11 |
@@ -5,13 +5,6 @@ import com.sy.model.airone_im_stock; | @@ -5,13 +5,6 @@ import com.sy.model.airone_im_stock; | ||
5 | import com.sy.service.aironeImStockService; | 5 | import com.sy.service.aironeImStockService; |
6 | import org.springframework.beans.factory.annotation.Autowired; | 6 | import org.springframework.beans.factory.annotation.Autowired; |
7 | import org.springframework.stereotype.Service; | 7 | import org.springframework.stereotype.Service; |
8 | - | ||
9 | -/** | ||
10 | - * @author zhangfan | ||
11 | - * @web www.sy.com | ||
12 | - * @company 郑州商友科技有限公司 | ||
13 | - * @time 2018-11-28 16:46 | ||
14 | - */ | ||
15 | @Service | 8 | @Service |
16 | public class aironeImStockServiceImpl implements aironeImStockService { | 9 | public class aironeImStockServiceImpl implements aironeImStockService { |
17 | 10 |
1 | +package com.sy.utils; | ||
2 | + | ||
3 | + | ||
4 | +import org.apache.commons.io.FileUtils; | ||
5 | + | ||
6 | +import java.io.File; | ||
7 | +import java.io.IOException; | ||
8 | +import java.io.UnsupportedEncodingException; | ||
9 | + | ||
10 | +public class CharasetCheck { | ||
11 | + | ||
12 | + | ||
13 | + | ||
14 | + public static String chechUTF8(String path){ | ||
15 | + File file = new File(path); | ||
16 | + String str = null; | ||
17 | + try{ | ||
18 | + str = FileUtils.readFileToString(file,"GB2312"); | ||
19 | + // str = getUTF8String(str); | ||
20 | + }catch (IOException e){ | ||
21 | + e.printStackTrace(); | ||
22 | + } | ||
23 | + return str; | ||
24 | + } | ||
25 | + public static String getUTF8String(String gbkStr) { | ||
26 | + try { | ||
27 | + return new String(getUTF8Bytes(gbkStr), "UTF-8"); | ||
28 | + } catch (UnsupportedEncodingException e) { | ||
29 | + throw new InternalError(); | ||
30 | + } | ||
31 | + } | ||
32 | + | ||
33 | + public static byte[] getUTF8Bytes(String gbkStr) { | ||
34 | + int n = gbkStr.length(); | ||
35 | + byte[] utfBytes = new byte[3 * n]; | ||
36 | + int k = 0; | ||
37 | + for (int i = 0; i < n; i++) { | ||
38 | + int m = gbkStr.charAt(i); | ||
39 | + if (m < 128 && m >= 0) { | ||
40 | + utfBytes[k++] = (byte) m; | ||
41 | + continue; | ||
42 | + } | ||
43 | + utfBytes[k++] = (byte) (0xe0 | (m >> 12)); | ||
44 | + utfBytes[k++] = (byte) (0x80 | ((m >> 6) & 0x3f)); | ||
45 | + utfBytes[k++] = (byte) (0x80 | (m & 0x3f)); | ||
46 | + } | ||
47 | + if (k < utfBytes.length) { | ||
48 | + byte[] tmp = new byte[k]; | ||
49 | + System.arraycopy(utfBytes, 0, tmp, 0, k); | ||
50 | + return tmp; | ||
51 | + } | ||
52 | + return utfBytes; | ||
53 | + } | ||
54 | +} | ||
55 | + |
@@ -14,7 +14,9 @@ public class DateTimeConverter extends AbstractSingleValueConverter { | @@ -14,7 +14,9 @@ public class DateTimeConverter extends AbstractSingleValueConverter { | ||
14 | private static final DateFormat DATETIME = new SimpleDateFormat("yyyyMMddHHmmss"); | 14 | private static final DateFormat DATETIME = new SimpleDateFormat("yyyyMMddHHmmss"); |
15 | private static final DateFormat DATETIME_FORMAT = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); | 15 | private static final DateFormat DATETIME_FORMAT = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
16 | private static final DateFormat DEFAULT_DATEFORMAT = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss"); | 16 | private static final DateFormat DEFAULT_DATEFORMAT = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss"); |
17 | - | 17 | + private static SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss"); |
18 | + private static SimpleDateFormat date = new SimpleDateFormat("yyyyy-MM-dd"); | ||
19 | + | ||
18 | public boolean canConvert(Class type) { | 20 | public boolean canConvert(Class type) { |
19 | return type.equals(Date.class); | 21 | return type.equals(Date.class); |
20 | } | 22 | } |
@@ -43,8 +45,11 @@ public class DateTimeConverter extends AbstractSingleValueConverter { | @@ -43,8 +45,11 @@ public class DateTimeConverter extends AbstractSingleValueConverter { | ||
43 | throw new ConversionException("Cannot parse date " + str); | 45 | throw new ConversionException("Cannot parse date " + str); |
44 | } | 46 | } |
45 | 47 | ||
46 | - public String toString(Object obj) { | ||
47 | - return DEFAULT_DATEFORMAT.format((Date) obj); | 48 | + public static String getFormat() { |
49 | + return dateFormat.format(new Date()); | ||
48 | } | 50 | } |
49 | - | 51 | + public static String getDay() { |
52 | + return date.format(new Date()); | ||
53 | + } | ||
54 | + | ||
50 | } | 55 | } |
src/main/java/com/sy/utils/FileTool.java
0 → 100644
1 | +package com.sy.utils; | ||
2 | + | ||
3 | +import org.apache.commons.io.FileUtils; | ||
4 | + | ||
5 | +import java.io.BufferedReader; | ||
6 | +import java.io.File; | ||
7 | +import java.io.FileReader; | ||
8 | +import java.io.IOException; | ||
9 | +import java.util.List; | ||
10 | +import java.util.Properties; | ||
11 | + | ||
12 | + | ||
13 | +public final class FileTool { | ||
14 | + private final static String errorRootDirectory = "errorLogs";//错误的根目录名 | ||
15 | + private final static String xmlRootDirectory = "xmlLog"; //记录已收到的报文目录 | ||
16 | + private final static String Cherector = "UTF-8"; | ||
17 | + | ||
18 | + /** | ||
19 | + * 写入文件 | ||
20 | + * @param path 二级目录 | ||
21 | + * @param content 写入内容 | ||
22 | + * @param rightOrwrong 是写入错误记录目录还是记录目录 | ||
23 | + */ | ||
24 | + public static void writeFile(String path,String content,boolean rightOrwrong){ | ||
25 | + StringBuffer stringBuffer = new StringBuffer(); | ||
26 | + | ||
27 | + if (rightOrwrong){ | ||
28 | + stringBuffer.append(xmlRootDirectory).append("/").append(path).append("/").append(DateTimeConverter.getFormat()) | ||
29 | + .append("/").append(uuidCreate.getUUID()).append(".log"); | ||
30 | + }else { | ||
31 | + stringBuffer.append(errorRootDirectory).append("/").append(path).append("/").append(DateTimeConverter.getDay()) | ||
32 | + .append("/").append(uuidCreate.getUUID()).append(".log"); | ||
33 | + } | ||
34 | + | ||
35 | + File file = new File(stringBuffer.toString()); | ||
36 | + | ||
37 | + try{ | ||
38 | + FileUtils.writeStringToFile(file,content,Cherector); | ||
39 | + }catch (IOException e){ | ||
40 | + e.printStackTrace(); | ||
41 | + } | ||
42 | + | ||
43 | + } | ||
44 | + public static String readfile(File file) throws IOException{ | ||
45 | + String fileToString = FileUtils.readFileToString(file, "UTF-8"); | ||
46 | + return fileToString; | ||
47 | + } | ||
48 | + | ||
49 | + public static List<File> readDirectoryFiles(File dir){ | ||
50 | + List<File> files = (List<File>)FileUtils.listFiles(dir,new String[]{"xml"},false); | ||
51 | + return files; | ||
52 | + } | ||
53 | + public static void writeWaybill(String path,String content,String waybillNo){ | ||
54 | + StringBuffer stringBuffer = new StringBuffer(); | ||
55 | + stringBuffer.append(xmlRootDirectory).append("/").append(path).append("/").append(DateTimeConverter.getDay()).append | ||
56 | + ("/") | ||
57 | + .append(waybillNo).append(".log"); | ||
58 | + File file = new File(stringBuffer.toString()); | ||
59 | + try{ | ||
60 | + FileUtils.writeStringToFile(file,content,Cherector); | ||
61 | + }catch (IOException e){ | ||
62 | + e.printStackTrace(); | ||
63 | + } | ||
64 | + | ||
65 | + } | ||
66 | + | ||
67 | + public static void writeFileToBak(String content){ | ||
68 | + String bakDir = readProperties("bakDirectory"); | ||
69 | + StringBuffer stringBuffer = new StringBuffer(); | ||
70 | + stringBuffer.append(bakDir).append("/").append(uuidCreate.getUUID()).append(".txt"); | ||
71 | + | ||
72 | + File file = new File(stringBuffer.toString()); | ||
73 | + | ||
74 | + try{ | ||
75 | + FileUtils.writeStringToFile(file,content,Cherector); | ||
76 | + }catch (IOException e){ | ||
77 | + e.printStackTrace(); | ||
78 | + } | ||
79 | + | ||
80 | + } | ||
81 | + | ||
82 | + public static String readProperties(String key){ | ||
83 | + Properties properties = new Properties(); | ||
84 | + String value = ""; | ||
85 | + try{ | ||
86 | + BufferedReader bufferedReader = new BufferedReader(new FileReader("config/config.properties")); | ||
87 | + properties.load(bufferedReader); | ||
88 | + //获取key对应的value值 | ||
89 | + value= properties.getProperty(key); | ||
90 | + }catch (Exception e){ | ||
91 | + e.printStackTrace(); | ||
92 | + } | ||
93 | + return value; | ||
94 | + | ||
95 | + } | ||
96 | + | ||
97 | + | ||
98 | +} |
src/main/java/com/sy/utils/MakeImfMeta.java
0 → 100644
1 | +package com.sy.utils; | ||
2 | + | ||
3 | +import org.dom4j.Document; | ||
4 | +import org.dom4j.DocumentException; | ||
5 | +import org.dom4j.DocumentHelper; | ||
6 | +import org.dom4j.Element; | ||
7 | +import org.dom4j.io.SAXReader; | ||
8 | + | ||
9 | +import java.io.ByteArrayInputStream; | ||
10 | +import java.io.UnsupportedEncodingException; | ||
11 | + | ||
12 | +public class MakeImfMeta { | ||
13 | + | ||
14 | + public static String makeImfDocument(String SNDR,String RCVR,String TYPE,String STYP,String DDTM,String SEQN,String Content) throws DocumentException,UnsupportedEncodingException{ | ||
15 | + Document document = DocumentHelper.createDocument(); | ||
16 | + Element root = document.addElement( "MSG" ); | ||
17 | + Element meta = root.addElement("META"); | ||
18 | + meta.addElement("SNDR").addText(SNDR); | ||
19 | + meta.addElement("RCVR").addText(RCVR); | ||
20 | + meta.addElement("SEQN").addText(SEQN); | ||
21 | + meta.addElement("DDTM").addText(DDTM); | ||
22 | + meta.addElement("TYPE").addText(TYPE); | ||
23 | + meta.addElement("STYP").addText(STYP); | ||
24 | + | ||
25 | + SAXReader saxReader = new SAXReader(); | ||
26 | + Document doc = saxReader.read(new ByteArrayInputStream(Content.getBytes("GB2312"))); | ||
27 | + Element contentRoot = doc.getRootElement(); | ||
28 | + root.add(contentRoot); | ||
29 | + | ||
30 | + | ||
31 | + return document.asXML(); | ||
32 | + } | ||
33 | +} |
@@ -2,16 +2,10 @@ package com.sy.utils; | @@ -2,16 +2,10 @@ package com.sy.utils; | ||
2 | 2 | ||
3 | import java.util.UUID; | 3 | import java.util.UUID; |
4 | 4 | ||
5 | -/** | ||
6 | - * @author zhangfan | ||
7 | - * @web www.sy.com | ||
8 | - * @company 郑州商友科技有限公司 | ||
9 | - * @time 2018-11-28 11:00 | ||
10 | - */ | 5 | + |
11 | public class uuidCreate { | 6 | public class uuidCreate { |
12 | public static String getUUID() { | 7 | public static String getUUID() { |
13 | - String uuid = UUID.randomUUID().toString(); | ||
14 | - uuid =uuid+uuid.substring(0,14); | 8 | + String uuid = UUID.randomUUID().toString().replace("-",""); |
15 | return uuid; | 9 | return uuid; |
16 | } | 10 | } |
17 | } | 11 | } |
@@ -13,16 +13,16 @@ spring.devtools.restart.additional-paths=src/main/java | @@ -13,16 +13,16 @@ spring.devtools.restart.additional-paths=src/main/java | ||
13 | spring.mvc.view.suffix=/WEB-INF/jsp/ | 13 | spring.mvc.view.suffix=/WEB-INF/jsp/ |
14 | #映射后缀 | 14 | #映射后缀 |
15 | spring.mvc.view.prefix=.jsp | 15 | spring.mvc.view.prefix=.jsp |
16 | -#设置数据源 | ||
17 | -#数据库连接用户名 | 16 | +#设置本地数据源 |
18 | spring.datasource.username=root | 17 | spring.datasource.username=root |
19 | -#数据库连接密码 | ||
20 | spring.datasource.password=root | 18 | spring.datasource.password=root |
21 | -#驱动 | ||
22 | spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver | 19 | spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver |
23 | -#数据库连接路径 | ||
24 | spring.datasource.url=jdbc:mysql://localhost:3306/bysj?useUnicode=true&characterEncoding=utf8&autoReconnect=true&failOverReadOnly=false&allowMultiQueries=true&useSSL=true&serverTimezone=Asia/Shanghai | 20 | spring.datasource.url=jdbc:mysql://localhost:3306/bysj?useUnicode=true&characterEncoding=utf8&autoReconnect=true&failOverReadOnly=false&allowMultiQueries=true&useSSL=true&serverTimezone=Asia/Shanghai |
25 | - | 21 | +#设置线上数据源 |
22 | +#spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver | ||
23 | +#spring.datasource.url=jdbc:mysql://10.50.7.10:3306/station?characterEncoding=utf8&useSSL=false&serverTimezone=UTC&rewriteBatchedStatements=true | ||
24 | +#spring.datasource.username=kako | ||
25 | +#spring.datasource.password=mysql10.50.7.10 | ||
26 | #连接池类 | 26 | #连接池类 |
27 | spring.datasource.type=com.alibaba.druid.pool.DruidDataSource | 27 | spring.datasource.type=com.alibaba.druid.pool.DruidDataSource |
28 | #连接池配置,因为springboot默认是开启了连接池的,它有默认配置,这一段可以忽略 | 28 | #连接池配置,因为springboot默认是开启了连接池的,它有默认配置,这一段可以忽略 |
-
请 注册 或 登录 后发表评论