正在显示
13 个修改的文件
包含
320 行增加
和
111 行删除
1 | Manifest-Version: 1.0 | 1 | Manifest-Version: 1.0 |
2 | -Class-Path: ribbon-transport-2.3.0.jar spring-boot-starter-tomcat-2.2. | ||
3 | - 0.BUILD-20181221.162141-59.jar tomcat-embed-core-9.0.14.jar jackson-a | ||
4 | - nnotations-2.9.0.jar commons-math-2.2.jar netflix-statistics-0.1.1.ja | ||
5 | - r spring-boot-starter-aop-2.2.0.BUILD-20181221.162119-59.jar rxnetty- | ||
6 | - 0.4.9.jar hystrix-core-1.5.18.jar eureka-client-1.9.8.jar spring-secu | ||
7 | - rity-crypto-5.1.3.BUILD-20181227.072951-43.jar ribbon-core-2.3.0.jar | ||
8 | - tomcat-embed-websocket-9.0.14.jar spring-webmvc-5.1.4.BUILD-20181226. | ||
9 | - 140909-39.jar jersey-core-1.19.1.jar spring-jcl-5.1.4.BUILD-20181226. | ||
10 | - 140909-39.jar servo-core-0.12.21.jar spring-boot-autoconfigure-2.2.0. | ||
11 | - BUILD-20181221.162052-59.jar xmlbeans-2.4.0.jar mybatis-spring-boot-s | ||
12 | - tarter-1.3.2.jar archaius-core-0.7.6.jar ribbon-loadbalancer-2.3.0.ja | ||
13 | - r jettison-1.3.7.jar spring-cloud-starter-netflix-eureka-client-2.1.0 | ||
14 | - .BUILD-20181228.020430-1172.jar spring-tx-5.1.4.BUILD-20181226.140909 | ||
15 | - -39.jar commons-configuration-1.8.jar bcprov-jdk15on-1.60.jar jackson | ||
16 | - -datatype-jdk8-2.9.8.jar spring-cloud-netflix-ribbon-2.1.0.BUILD-2018 | ||
17 | - 1228.020108-1232.jar jboss-logging-3.3.2.Final.jar spring-cloud-netfl | ||
18 | - ix-archaius-2.1.0.BUILD-20181228.020040-1241.jar spring-cloud-starter | ||
19 | - -netflix-ribbon-2.1.0.BUILD-20181228.020424-1172.jar spring-beans-5.1 | ||
20 | - .4.BUILD-20181226.140909-39.jar spring-cloud-starter-2.1.0.BUILD-2018 | ||
21 | - 1227.235921-1180.jar jackson-datatype-jsr310-2.9.8.jar jaxen-1.1.6.ja | ||
22 | - r commons-lang-2.6.jar log4j-to-slf4j-2.11.1.jar hibernate-validator- | ||
23 | - 6.0.13.Final.jar HdrHistogram-2.1.9.jar dom4j-2.1.0.jar gson-2.8.5.ja | ||
24 | - r xpp3_min-1.1.4c.jar druid-1.1.9.jar commons-jxpath-1.3.jar xstream- | ||
25 | - 1.4.10.jar commons-collections-3.2.2.jar spring-cloud-starter-netflix | ||
26 | - -archaius-2.1.0.BUILD-20181228.020417-1172.jar stringtemplate-3.2.1.j | ||
27 | - ar javax.annotation-api-1.3.2.jar spring-boot-starter-2.2.0.BUILD-201 | ||
28 | - 81221.162144-59.jar spring-web-5.1.4.BUILD-20181226.140909-39.jar com | ||
29 | - mons-io-2.6.jar guava-16.0.jar httpcore-4.4.10.jar spring-core-5.1.4. | ||
30 | - BUILD-20181226.140909-39.jar HikariCP-3.2.0.jar rxjava-1.3.8.jar jers | ||
31 | - ey-apache-client4-1.19.1.jar druid-spring-boot-starter-1.1.9.jar log4 | ||
32 | - j-1.2.16.jar tomcat-embed-el-9.0.14.jar bcpkix-jdk15on-1.60.jar mybat | ||
33 | - is-3.4.6.jar antlr-2.7.7.jar ojdbc6-11.2.0.4.0-atlassian-hosted.jar s | ||
34 | - nakeyaml-1.23.jar netflix-commons-util-0.3.0.jar spring-aop-5.1.4.BUI | ||
35 | - LD-20181226.140909-39.jar ribbon-2.3.0.jar spring-jdbc-5.1.4.BUILD-20 | ||
36 | - 181226.140909-39.jar jackson-module-parameter-names-2.9.8.jar spring- | ||
37 | - cloud-netflix-eureka-client-2.1.0.BUILD-20181228.020404-1172.jar stax | ||
38 | - -api-1.0.1.jar spring-cloud-netflix-hystrix-2.1.0.BUILD-20181228.0201 | ||
39 | - 46-564.jar netflix-eventbus-0.3.0.jar jul-to-slf4j-1.7.25.jar javax.i | ||
40 | - nject-1.jar spring-boot-starter-logging-2.2.0.BUILD-20181221.162136-5 | ||
41 | - 9.jar stax2-api-3.1.4.jar rxnetty-contexts-0.4.9.jar antlr-runtime-3. | ||
42 | - 4.jar spring-expression-5.1.4.BUILD-20181226.140909-39.jar jsr311-api | ||
43 | - -1.1.1.jar ribbon-eureka-2.3.0.jar compactmap-1.2.1.jar spring-boot-2 | ||
44 | - .2.0.BUILD-20181221.162149-59.jar commons-codec-1.11.jar log4j-api-2. | ||
45 | - 11.1.jar spring-cloud-context-2.1.0.BUILD-20181227.235814-1191.jar je | ||
46 | - rsey-client-1.19.1.jar rxnetty-servo-0.4.9.jar slf4j-api-1.6.1.jar sp | ||
47 | - ring-boot-starter-json-2.2.0.BUILD-20181221.162134-59.jar spring-secu | ||
48 | - rity-rsa-1.0.7.RELEASE.jar jackson-databind-2.9.8.jar spring-context- | ||
49 | - 5.1.4.BUILD-20181226.140909-39.jar httpclient-4.5.6.jar ribbon-httpcl | ||
50 | - ient-2.3.0.jar woodstox-core-asl-4.4.1.jar eureka-core-1.9.8.jar logb | ||
51 | - ack-core-1.2.3.jar stax-api-1.0-2.jar mybatis-spring-1.3.2.jar dexx-c | ||
52 | - ollections-0.2.jar xmlpull-1.1.3.1.jar classmate-1.4.0.jar validation | ||
53 | - -api-2.0.1.Final.jar aopalliance-1.0.jar netflix-infix-0.3.0.jar spri | ||
54 | - ng-boot-starter-web-2.2.0.BUILD-20181221.162143-59.jar spring-cloud-c | ||
55 | - ommons-2.1.0.BUILD-20181227.235904-1180.jar joda-time-2.10.1.jar aspe | ||
56 | - ctjweaver-1.9.2.jar jackson-core-2.9.8.jar spring-boot-starter-jdbc-2 | ||
57 | - .2.0.BUILD-20181221.162131-59.jar IMFClient.1.0.0.jar mybatis-spring- | ||
58 | - boot-autoconfigure-1.3.2.jar logback-classic-1.2.3.jar guice-4.1.0.ja | ||
59 | - r | 2 | +Class-Path: connector.jar druid-spring-boot-starter-1.1.9.jar spring-b |
3 | + oot-2.2.0.BUILD-20190111.143007-84.jar xmlbeans-2.4.0.jar spring-boot | ||
4 | + -starter-aop-2.2.0.BUILD-20190111.142939-84.jar guice-4.1.0.jar eurek | ||
5 | + a-core-1.9.8.jar thymeleaf-3.0.11.RELEASE.jar httpcore-4.4.10.jar CL3 | ||
6 | + Export.jar jackson-databind-2.9.8.jar geronimo-stax-api_1.0_spec-1.0. | ||
7 | + 1.jar ribbon-httpclient-2.3.0.jar rxnetty-servo-0.4.9.jar snakeyaml-1 | ||
8 | + .23.jar druid-1.1.9.jar spring-boot-starter-json-2.2.0.BUILD-20190111 | ||
9 | + .142952-84.jar ribbon-2.3.0.jar ribbon-transport-2.3.0.jar jersey-apa | ||
10 | + che-client4-1.19.1.jar mybatis-spring-1.3.2.jar spring-cloud-context- | ||
11 | + 2.1.0.BUILD-20190114.055139-1334.jar spring-security-crypto-5.1.3.REL | ||
12 | + EASE.jar spring-cloud-starter-netflix-archaius-2.1.0.BUILD-20190114.0 | ||
13 | + 50403-1317.jar com.ibm.mq.commonservices.jar com.ibm.mq.jms.Nojndi.ja | ||
14 | + r gson-2.8.5.jar com.ibm.mqetclient.jar commons-collections-3.2.2.jar | ||
15 | + com.ibm.mqjms.jar imfmsg.jar spring-jdbc-5.1.4.RELEASE.jar validatio | ||
16 | + n-api-2.0.1.Final.jar rxnetty-contexts-0.4.9.jar cxf-xjc-boolean-3.2. | ||
17 | + 3.jar cxf-manifest.jar spring-boot-starter-thymeleaf-2.2.0.BUILD-2019 | ||
18 | + 0111.142958-84.jar logback-classic-1.2.3.jar rxnetty-0.4.9.jar spring | ||
19 | + -boot-starter-websocket-2.2.0.BUILD-20190111.143002-84.jar spring-boo | ||
20 | + t-starter-tomcat-2.2.0.BUILD-20190111.142959-84.jar classmate-1.4.0.j | ||
21 | + ar cxf-xjc-ts-2.3.2.jar slf4j-api-1.6.1.jar spring-websocket-5.1.4.RE | ||
22 | + LEASE.jar spring-boot-starter-2.2.0.BUILD-20190111.143002-84.jar myba | ||
23 | + tis-3.4.6.jar mybatis-spring-boot-autoconfigure-1.3.2.jar commons-io- | ||
24 | + 2.6.jar com.ibm.mq.defaultconfig.jar spring-cloud-starter-2.1.0.BUILD | ||
25 | + -20190114.055247-1323.jar javax.annotation-api-1.3.2.jar ribbon-eurek | ||
26 | + a-2.3.0.jar spring-context-5.1.4.RELEASE.jar xstream-1.4.10.jar commo | ||
27 | + ns-lang-2.6.jar com.ibm.mq.tools.ras.jar spring-expression-5.1.4.RELE | ||
28 | + ASE.jar spring-boot-starter-jdbc-2.2.0.BUILD-20190111.142950-84.jar u | ||
29 | + nbescape-1.1.6.RELEASE.jar ProcessService.jar thymeleaf-extras-java8t | ||
30 | + ime-3.0.2.RELEASE.jar axiom-api-1.2.7.jar archaius-core-0.7.6.jar jac | ||
31 | + kson-annotations-2.9.0.jar javax.inject-1.jar spring-security-config- | ||
32 | + 5.1.3.RELEASE.jar cxf-xjc-bug671-2.3.2.jar ribbon-loadbalancer-2.3.0. | ||
33 | + jar woodstox-core-asl-4.4.1.jar commons-jxpath-1.3.jar geronimo-activ | ||
34 | + ation_1.1_spec-1.0.1.jar log4j-1.2.16.jar netflix-infix-0.3.0.jar com | ||
35 | + .ibm.mq.pcf.jar spring-cloud-netflix-ribbon-2.1.0.BUILD-20190114.0500 | ||
36 | + 56-1377.jar tomcat-embed-core-9.0.14.jar attoparser-2.0.5.RELEASE.jar | ||
37 | + rxjava-1.3.8.jar commons-math-2.2.jar log4j-api-2.11.1.jar xmlpull-1 | ||
38 | + .1.3.1.jar ojdbc6-11.2.0.4.0-atlassian-hosted.jar aopalliance-1.0.jar | ||
39 | + dom4j-2.1.0.jar spring-messaging-5.1.4.RELEASE.jar spring-cloud-star | ||
40 | + ter-netflix-ribbon-2.1.0.BUILD-20190114.050410-1317.jar spring-cloud- | ||
41 | + starter-netflix-eureka-client-2.1.0.BUILD-20190114.050416-1317.jar co | ||
42 | + m.ibm.mq.fta.jar HdrHistogram-2.1.9.jar bcpkix-jdk15on-1.60.jar bcpro | ||
43 | + v-jdk15on-1.60.jar spring-security-web-5.1.3.RELEASE.jar com.ibm.mq.j | ||
44 | + ar hystrix-core-1.5.18.jar jettison-1.3.7.jar HeartbeatService.jar sp | ||
45 | + ring-boot-starter-security-2.2.0.BUILD-20190111.142957-84.jar UploadS | ||
46 | + ervice.jar commons-codec-1.11.jar netflix-statistics-0.1.1.jar XmlSch | ||
47 | + ema-1.4.7.jar httpclient-4.5.6.jar sigar.jar jackson-datatype-jdk8-2. | ||
48 | + 9.8.jar spring-cloud-commons-2.1.0.BUILD-20190114.055231-1323.jar spr | ||
49 | + ing-aop-5.1.4.RELEASE.jar commons-logging-1.1.1.jar spring-tx-5.1.4.R | ||
50 | + ELEASE.jar dexx-collections-0.2.jar spring-webmvc-5.1.4.RELEASE.jar g | ||
51 | + uava-16.0.jar spring-web-5.1.4.RELEASE.jar jackson-core-2.9.8.jar ret | ||
52 | + urnXml.jar tomcat-embed-el-9.0.14.jar jackson-datatype-jsr310-2.9.8.j | ||
53 | + ar HikariCP-3.3.0.jar geronimo-javamail_1.4_spec-1.2.jar netflix-even | ||
54 | + tbus-0.3.0.jar thymeleaf-spring5-3.0.11.RELEASE.jar cxf-2.3.2.jar spr | ||
55 | + ing-jcl-5.1.4.RELEASE.jar jboss-logging-3.3.2.Final.jar tomcat-embed- | ||
56 | + websocket-9.0.14.jar xmlsec-1.4.4.jar spring-boot-autoconfigure-2.2.0 | ||
57 | + .BUILD-20190111.142917-84.jar spring-boot-starter-web-2.2.0.BUILD-201 | ||
58 | + 90111.143001-84.jar stax2-api-3.1.4.jar com.ibm.mq.axis2.jar antlr-2. | ||
59 | + 7.7.jar ribbon-core-2.3.0.jar stringtemplate-3.2.1.jar cxf-xjc-dv-2.3 | ||
60 | + .2.jar jackson-module-parameter-names-2.9.8.jar com.ibm.mq.postcard.j | ||
61 | + ar jul-to-slf4j-1.7.25.jar logback-core-1.2.3.jar jaxen-1.1.6.jar axi | ||
62 | + om-impl-1.2.7.jar CL3Nonexport.jar stax-api-1.0-2.jar xml-apis-1.4.01 | ||
63 | + .jar spring-security-core-5.1.3.RELEASE.jar spring-cloud-netflix-hyst | ||
64 | + rix-2.1.0.BUILD-20190114.050134-709.jar log4j-to-slf4j-2.11.1.jar ant | ||
65 | + lr-runtime-3.4.jar neethi-2.0.4.jar stax-api-1.0.1.jar apiConfig.jar | ||
66 | + aspectjweaver-1.9.2.jar com.ibm.mq.soap.jar mybatis-spring-boot-start | ||
67 | + er-1.3.2.jar wsdl4j-1.6.2.jar netflix-commons-util-0.3.0.jar hibernat | ||
68 | + e-validator-6.0.14.Final.jar xpp3_min-1.1.4c.jar com.ibm.mq.headers.j | ||
69 | + ar jersey-core-1.19.1.jar spring-boot-starter-logging-2.2.0.BUILD-201 | ||
70 | + 90111.142954-84.jar servo-core-0.12.21.jar wstx-asl-3.2.4.jar commons | ||
71 | + -configuration-1.8.jar spring-cloud-netflix-eureka-client-2.1.0.BUILD | ||
72 | + -20190114.050350-1317.jar IMFClient.1.0.0.jar jsr311-api-1.1.1.jar sp | ||
73 | + ring-security-rsa-1.0.7.RELEASE.jar spring-cloud-netflix-archaius-2.1 | ||
74 | + .0.BUILD-20190114.050029-1386.jar jersey-client-1.19.1.jar joda-time- | ||
75 | + 2.10.1.jar com.ibm.mq.jmqi.jar eureka-client-1.9.8.jar compactmap-1.2 | ||
76 | + .1.jar spring-core-5.1.4.RELEASE.jar spring-beans-5.1.4.RELEASE.jar | ||
60 | Main-Class: com.tianbo.warehouse.WarehouseApplication | 77 | Main-Class: com.tianbo.warehouse.WarehouseApplication |
61 | 78 |
@@ -34,6 +34,12 @@ | @@ -34,6 +34,12 @@ | ||
34 | <dependency> | 34 | <dependency> |
35 | <groupId>org.springframework.boot</groupId> | 35 | <groupId>org.springframework.boot</groupId> |
36 | <artifactId>spring-boot-starter-websocket</artifactId> | 36 | <artifactId>spring-boot-starter-websocket</artifactId> |
37 | + <exclusions> | ||
38 | + <exclusion> | ||
39 | + <groupId>org.springframework.boot</groupId> | ||
40 | + <artifactId>spring-boot-starter</artifactId> | ||
41 | + </exclusion> | ||
42 | + </exclusions> | ||
37 | </dependency> | 43 | </dependency> |
38 | <dependency> | 44 | <dependency> |
39 | <groupId>org.springframework.boot</groupId> | 45 | <groupId>org.springframework.boot</groupId> |
@@ -43,22 +49,30 @@ | @@ -43,22 +49,30 @@ | ||
43 | <groupId>org.springframework.cloud</groupId> | 49 | <groupId>org.springframework.cloud</groupId> |
44 | <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId> | 50 | <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId> |
45 | </dependency> | 51 | </dependency> |
46 | - | 52 | + <!--security--> |
47 | <dependency> | 53 | <dependency> |
48 | <groupId>org.springframework.boot</groupId> | 54 | <groupId>org.springframework.boot</groupId> |
49 | - <artifactId>spring-boot-starter-test</artifactId> | ||
50 | - <scope>test</scope> | 55 | + <artifactId>spring-boot-starter-security</artifactId> |
51 | </dependency> | 56 | </dependency> |
52 | <!--<dependency>--> | 57 | <!--<dependency>--> |
53 | - <!--<groupId>org.springframework.boot</groupId>--> | ||
54 | - <!--<artifactId>spring-boot-starter-web</artifactId>--> | ||
55 | - <!--<exclusions>--> | ||
56 | - <!--<exclusion>--> | ||
57 | - <!--<groupId>ch.qos.logback</groupId>--> | ||
58 | - <!--<artifactId>logback-classic</artifactId>--> | ||
59 | - <!--</exclusion>--> | ||
60 | - <!--</exclusions>--> | 58 | + <!--<groupId>org.thymeleaf.extras</groupId>--> |
59 | + <!--<artifactId>thymeleaf-extras-springsecurity4</artifactId>--> | ||
61 | <!--</dependency>--> | 60 | <!--</dependency>--> |
61 | + <dependency> | ||
62 | + <groupId>org.springframework.boot</groupId> | ||
63 | + <artifactId>spring-boot-starter-test</artifactId> | ||
64 | + <scope>test</scope> | ||
65 | + </dependency> | ||
66 | + <dependency> | ||
67 | + <groupId>org.springframework.boot</groupId> | ||
68 | + <artifactId>spring-boot-starter-web</artifactId> | ||
69 | + <exclusions> | ||
70 | + <exclusion> | ||
71 | + <groupId>ch.qos.logback</groupId> | ||
72 | + <artifactId>logback-classic</artifactId> | ||
73 | + </exclusion> | ||
74 | + </exclusions> | ||
75 | + </dependency> | ||
62 | <!--spring boot--> | 76 | <!--spring boot--> |
63 | <!-- alibaba的druid数据库连接池 --> | 77 | <!-- alibaba的druid数据库连接池 --> |
64 | <dependency> | 78 | <dependency> |
1 | package com.tianbo.warehouse.controller; | 1 | package com.tianbo.warehouse.controller; |
2 | 2 | ||
3 | +import com.tianbo.warehouse.model.PERMISSION; | ||
3 | import org.springframework.stereotype.Controller; | 4 | import org.springframework.stereotype.Controller; |
5 | +import org.springframework.ui.Model; | ||
4 | import org.springframework.web.bind.annotation.RequestMapping; | 6 | import org.springframework.web.bind.annotation.RequestMapping; |
7 | +import org.springframework.web.bind.annotation.ResponseBody; | ||
5 | 8 | ||
6 | @Controller | 9 | @Controller |
7 | public class ImfLog { | 10 | public class ImfLog { |
@@ -10,5 +13,26 @@ public class ImfLog { | @@ -10,5 +13,26 @@ public class ImfLog { | ||
10 | public String IMFlog(){ | 13 | public String IMFlog(){ |
11 | return "log/imf"; | 14 | return "log/imf"; |
12 | } | 15 | } |
16 | + | ||
17 | + @RequestMapping("/home") | ||
18 | + public String Home(Model model){ | ||
19 | + PERMISSION msg = new PERMISSION(); | ||
20 | + msg.setDescription("权限描述"); | ||
21 | + msg.setPermissionName("权限名称"); | ||
22 | + msg.setPermissionSign("权限路径"); | ||
23 | + model.addAttribute("msg", msg); | ||
24 | + return "home"; | ||
25 | + } | ||
26 | + | ||
27 | + @RequestMapping("/admin") | ||
28 | + @ResponseBody | ||
29 | + public String Admin(){ | ||
30 | + return "hello admin"; | ||
31 | + } | ||
32 | + | ||
33 | + @RequestMapping("/login") | ||
34 | + public String login(){ | ||
35 | + return "login"; | ||
36 | + } | ||
13 | } | 37 | } |
14 | 38 |
@@ -5,7 +5,7 @@ import com.tianbo.warehouse.service.T_ETL_MESSAGEService; | @@ -5,7 +5,7 @@ import com.tianbo.warehouse.service.T_ETL_MESSAGEService; | ||
5 | 5 | ||
6 | import com.tianbo.warehouse.util.Date.DateUtil; | 6 | import com.tianbo.warehouse.util.Date.DateUtil; |
7 | import com.tianbo.warehouse.util.IO.FileTool; | 7 | import com.tianbo.warehouse.util.IO.FileTool; |
8 | -import com.tianbo.warehouse.util.XML.XMLXPath; | 8 | +import com.tianbo.warehouse.util.XML.XML2ENTITY; |
9 | import org.apache.log4j.Logger; | 9 | import org.apache.log4j.Logger; |
10 | import org.dom4j.Document; | 10 | import org.dom4j.Document; |
11 | import org.dom4j.DocumentHelper; | 11 | import org.dom4j.DocumentHelper; |
@@ -14,6 +14,7 @@ import org.springframework.stereotype.Component; | @@ -14,6 +14,7 @@ import org.springframework.stereotype.Component; | ||
14 | 14 | ||
15 | import javax.annotation.PostConstruct; | 15 | import javax.annotation.PostConstruct; |
16 | import java.util.Date; | 16 | import java.util.Date; |
17 | +import java.util.Map; | ||
17 | 18 | ||
18 | /** | 19 | /** |
19 | * 存储IMF过来的原始报文到数据仓库T_ELT_MESSAGE原始报文表中 | 20 | * 存储IMF过来的原始报文到数据仓库T_ELT_MESSAGE原始报文表中 |
@@ -26,18 +27,6 @@ public class IMFSaveHandle { | @@ -26,18 +27,6 @@ public class IMFSaveHandle { | ||
26 | 27 | ||
27 | private static IMFSaveHandle saveHandle; | 28 | private static IMFSaveHandle saveHandle; |
28 | 29 | ||
29 | - public final static String SNDR = "//MSG/META/SNDR"; | ||
30 | - | ||
31 | - public final static String RCVR = "//MSG/META/RCVR"; | ||
32 | - | ||
33 | - public final static String DDTM = "//MSG/META/DDTM"; | ||
34 | - | ||
35 | - public final static String TYPE = "//MSG/META/TYPE"; | ||
36 | - | ||
37 | - public final static String STYP = "//MSG/META/STYP"; | ||
38 | - | ||
39 | - public final static String SEQN = "//MSG/META/SEQN"; | ||
40 | - | ||
41 | protected static final Logger logger = Logger.getLogger(IMFSaveHandle.class); | 30 | protected static final Logger logger = Logger.getLogger(IMFSaveHandle.class); |
42 | 31 | ||
43 | @PostConstruct | 32 | @PostConstruct |
@@ -49,16 +38,22 @@ public class IMFSaveHandle { | @@ -49,16 +38,22 @@ public class IMFSaveHandle { | ||
49 | public void handle(String xmlmessage){ | 38 | public void handle(String xmlmessage){ |
50 | try { | 39 | try { |
51 | //有人发报文头部不按规范发 | 40 | //有人发报文头部不按规范发 |
52 | - xmlmessage = xmlmessage.replace("<Msg>","<MSG>") | ||
53 | - .replace("<msg>","<MSG>") | ||
54 | - .replace("</Msg>","</MSG>") | ||
55 | - .replace("</msg>","</MSG>"); | 41 | +// xmlmessage = xmlmessage.replace("<Msg>","<MSG>") |
42 | +// .replace("<msg>","<MSG>") | ||
43 | +// .replace("</Msg>","</MSG>") | ||
44 | +// .replace("</msg>","</MSG>"); | ||
45 | + | ||
46 | + | ||
56 | Document document = DocumentHelper.parseText(xmlmessage); | 47 | Document document = DocumentHelper.parseText(xmlmessage); |
48 | + XML2ENTITY xml2ENTITY =new XML2ENTITY(); | ||
49 | + Map xmlMap = xml2ENTITY.Dom2Map(document); | ||
50 | + | ||
51 | + Map meta = (Map) xmlMap.get("META"); | ||
52 | + | ||
57 | T_ETL_MESSAGE message = new T_ETL_MESSAGE(); | 53 | T_ETL_MESSAGE message = new T_ETL_MESSAGE(); |
58 | 54 | ||
59 | - String sndrm = XMLXPath.getSingleValueByPath(document,SNDR); | ||
60 | - String typem = XMLXPath.getSingleValueByPath(document,TYPE); | ||
61 | - String stypm = XMLXPath.getSingleValueByPath(document,STYP); | 55 | + String sndrm = meta.get("SNDR").toString(); |
56 | + String stypm = meta.get("STYP").toString(); | ||
62 | 57 | ||
63 | if ("TXD".equals(sndrm)){ | 58 | if ("TXD".equals(sndrm)){ |
64 | if("EDEP".equals(stypm) | 59 | if("EDEP".equals(stypm) |
@@ -76,15 +71,21 @@ public class IMFSaveHandle { | @@ -76,15 +71,21 @@ public class IMFSaveHandle { | ||
76 | } | 71 | } |
77 | } | 72 | } |
78 | 73 | ||
74 | + String typem = meta.get("TYPE").toString(); | ||
75 | + String rcvr = XML2ENTITY.getMap(meta,"RCVR").toString(); | ||
76 | + String ddtm = meta.get("DDTM").toString(); | ||
77 | + String seqn = meta.get("SEQN").toString(); | ||
78 | + | ||
79 | + | ||
80 | + | ||
81 | + | ||
79 | message.setSndr(sndrm); | 82 | message.setSndr(sndrm); |
80 | - message.setRcvr(XMLXPath.getSingleValueByPath(document,RCVR)); | 83 | + message.setRcvr(rcvr); |
81 | message.setType(typem); | 84 | message.setType(typem); |
82 | message.setStyp(stypm); | 85 | message.setStyp(stypm); |
83 | - message.setSeqn(XMLXPath.getSingleValueByPath(document,SEQN)); | ||
84 | - | 86 | + message.setSeqn(seqn); |
85 | 87 | ||
86 | 88 | ||
87 | - String ddtm = XMLXPath.getSingleValueByPath(document,DDTM); | ||
88 | Date ddtmDate = DateUtil.formatByyyyyMMddHHmmss(ddtm); | 89 | Date ddtmDate = DateUtil.formatByyyyyMMddHHmmss(ddtm); |
89 | message.setDdtm(ddtmDate); | 90 | message.setDdtm(ddtmDate); |
90 | message.setSntm(ddtmDate); | 91 | message.setSntm(ddtmDate); |
@@ -26,7 +26,7 @@ public class IMF_Reader extends Thread{ | @@ -26,7 +26,7 @@ public class IMF_Reader extends Thread{ | ||
26 | IMFSaveHandle imfSaveHandle = new IMFSaveHandle(); | 26 | IMFSaveHandle imfSaveHandle = new IMFSaveHandle(); |
27 | imfSaveHandle.handle(message); | 27 | imfSaveHandle.handle(message); |
28 | } | 28 | } |
29 | - logger.info("当前读取线程:"+Thread.currentThread().getName()); | 29 | + |
30 | } else { | 30 | } else { |
31 | //logger.info("***"); | 31 | //logger.info("***"); |
32 | } | 32 | } |
@@ -24,7 +24,7 @@ public class IMF_Task { | @@ -24,7 +24,7 @@ public class IMF_Task { | ||
24 | public static String isNeedSend = "N"; | 24 | public static String isNeedSend = "N"; |
25 | 25 | ||
26 | 26 | ||
27 | - //@Scheduled(fixedRate = 5000) | 27 | + @Scheduled(fixedRate = 5000) |
28 | private static void start() throws Exception { | 28 | private static void start() throws Exception { |
29 | PropertyConfigurator.configure("config/log4j.properties"); | 29 | PropertyConfigurator.configure("config/log4j.properties"); |
30 | client = IMFClientFactory.createInstance(); | 30 | client = IMFClientFactory.createInstance(); |
@@ -17,16 +17,17 @@ public class XML2ENTITY { | @@ -17,16 +17,17 @@ public class XML2ENTITY { | ||
17 | */ | 17 | */ |
18 | public Map<String, Object> Dom2Map(Document doc){ | 18 | public Map<String, Object> Dom2Map(Document doc){ |
19 | Map<String, Object> map = new HashMap<String, Object>(); | 19 | Map<String, Object> map = new HashMap<String, Object>(); |
20 | - if(doc == null) | 20 | + if(doc == null){ |
21 | return map; | 21 | return map; |
22 | + } | ||
22 | Element root = doc.getRootElement(); | 23 | Element root = doc.getRootElement(); |
23 | for (Iterator iterator = root.elementIterator(); iterator.hasNext();) { | 24 | for (Iterator iterator = root.elementIterator(); iterator.hasNext();) { |
24 | Element e = (Element) iterator.next(); | 25 | Element e = (Element) iterator.next(); |
25 | List list = e.elements(); | 26 | List list = e.elements(); |
26 | if(list.size() > 0){ | 27 | if(list.size() > 0){ |
27 | map.put(e.getName(), Dom2Map(e)); | 28 | map.put(e.getName(), Dom2Map(e)); |
28 | - }else | ||
29 | - map.put(e.getName(), e.getText()); | 29 | + }else{ |
30 | + map.put(e.getName(), e.getText());} | ||
30 | } | 31 | } |
31 | return map; | 32 | return map; |
32 | } | 33 | } |
@@ -53,8 +54,8 @@ public class XML2ENTITY { | @@ -53,8 +54,8 @@ public class XML2ENTITY { | ||
53 | mapList.add(m); | 54 | mapList.add(m); |
54 | } | 55 | } |
55 | map.put(iter.getName(), mapList); | 56 | map.put(iter.getName(), mapList); |
56 | - }else | ||
57 | - map.put(iter.getName(), m); | 57 | + }else{ |
58 | + map.put(iter.getName(), m);} | ||
58 | } | 59 | } |
59 | else{ | 60 | else{ |
60 | if(map.get(iter.getName()) != null){ | 61 | if(map.get(iter.getName()) != null){ |
@@ -69,12 +70,12 @@ public class XML2ENTITY { | @@ -69,12 +70,12 @@ public class XML2ENTITY { | ||
69 | mapList.add(iter.getText()); | 70 | mapList.add(iter.getText()); |
70 | } | 71 | } |
71 | map.put(iter.getName(), mapList); | 72 | map.put(iter.getName(), mapList); |
72 | - }else | ||
73 | - map.put(iter.getName(), iter.getText()); | 73 | + }else{ |
74 | + map.put(iter.getName(), iter.getText());} | ||
74 | } | 75 | } |
75 | } | 76 | } |
76 | - }else | ||
77 | - map.put(e.getName(), e.getText()); | 77 | + }else{ |
78 | + map.put(e.getName(), e.getText());} | ||
78 | return map; | 79 | return map; |
79 | } | 80 | } |
80 | 81 | ||
@@ -96,8 +97,9 @@ public class XML2ENTITY { | @@ -96,8 +97,9 @@ public class XML2ENTITY { | ||
96 | */ | 97 | */ |
97 | public Map<String, Object> Dom2Map_propety(Document doc){ | 98 | public Map<String, Object> Dom2Map_propety(Document doc){ |
98 | Map<String, Object> map = new HashMap<String, Object>(); | 99 | Map<String, Object> map = new HashMap<String, Object>(); |
99 | - if(doc == null) | 100 | + if(doc == null) { |
100 | return map; | 101 | return map; |
102 | + } | ||
101 | Element root = doc.getRootElement(); | 103 | Element root = doc.getRootElement(); |
102 | for (Iterator iterator = root.elementIterator(); iterator.hasNext();) { | 104 | for (Iterator iterator = root.elementIterator(); iterator.hasNext();) { |
103 | Element e = (Element) iterator.next(); | 105 | Element e = (Element) iterator.next(); |
@@ -133,9 +135,10 @@ public class XML2ENTITY { | @@ -133,9 +135,10 @@ public class XML2ENTITY { | ||
133 | mapList.add(m); | 135 | mapList.add(m); |
134 | } | 136 | } |
135 | map.put(iter.getName(), mapList); | 137 | map.put(iter.getName(), mapList); |
136 | - }else | 138 | + }else { |
137 | map.put(iter.getName(), m); | 139 | map.put(iter.getName(), m); |
138 | } | 140 | } |
141 | + } | ||
139 | else{ | 142 | else{ |
140 | if(map.get(iter.getName()) != null){ | 143 | if(map.get(iter.getName()) != null){ |
141 | Object obj = map.get(iter.getName()); | 144 | Object obj = map.get(iter.getName()); |
@@ -170,10 +173,10 @@ public class XML2ENTITY { | @@ -170,10 +173,10 @@ public class XML2ENTITY { | ||
170 | */ | 173 | */ |
171 | 174 | ||
172 | public static Object getMap(Map map, String key){ | 175 | public static Object getMap(Map map, String key){ |
173 | - if(map!=null && map.containsKey(key)){ | 176 | + if(map!=null && key!=null && !key.isEmpty() && map.containsKey(key)){ |
174 | return map.get(key); | 177 | return map.get(key); |
175 | } else { | 178 | } else { |
176 | - return null; | 179 | + return ""; |
177 | } | 180 | } |
178 | } | 181 | } |
179 | 182 |
@@ -42,6 +42,6 @@ | @@ -42,6 +42,6 @@ | ||
42 | <property name="enableSubPackages" value="true"/> | 42 | <property name="enableSubPackages" value="true"/> |
43 | </javaClientGenerator> | 43 | </javaClientGenerator> |
44 | <!-- 要生成的表 tableName是数据库中的表名或视图名 domainObjectName是实体类名--> | 44 | <!-- 要生成的表 tableName是数据库中的表名或视图名 domainObjectName是实体类名--> |
45 | - <table tableName="T_ETL_MESSAGE" domainObjectName="T_ETL_MESSAGE" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"></table> | 45 | + <table tableName="PERMISSION" domainObjectName="PERMISSION" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"></table> |
46 | </context> | 46 | </context> |
47 | </generatorConfiguration> | 47 | </generatorConfiguration> |
src/main/resources/templates/home.html
0 → 100644
1 | +<!DOCTYPE html> | ||
2 | +<html xmlns:th="http://www.thymeleaf.org" | ||
3 | + xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity4"> | ||
4 | +<head> | ||
5 | + <meta content="text/html;charset=UTF-8"/> | ||
6 | + <title sec:authentication="name"></title> | ||
7 | + <link rel="stylesheet" th:href="@{css/bootstrap.min.css}" /> | ||
8 | + <style type="text/css"> | ||
9 | + body { | ||
10 | + padding-top: 50px; | ||
11 | + } | ||
12 | + .starter-template { | ||
13 | + padding: 40px 15px; | ||
14 | + text-align: center; | ||
15 | + } | ||
16 | + </style> | ||
17 | +</head> | ||
18 | +<body> | ||
19 | +<nav class="navbar navbar-inverse navbar-fixed-top"> | ||
20 | + <div class="container"> | ||
21 | + <div class="navbar-header"> | ||
22 | + <a class="navbar-brand" href="#">Spring Security演示</a> | ||
23 | + </div> | ||
24 | + <div id="navbar" class="collapse navbar-collapse"> | ||
25 | + <ul class="nav navbar-nav"> | ||
26 | + <li><a th:href="@{/home}"> 首页 </a></li> | ||
27 | + <li><a th:href="@{/admin}"> admin </a></li> | ||
28 | + </ul> | ||
29 | + </div><!--/.nav-collapse --> | ||
30 | + </div> | ||
31 | +</nav> | ||
32 | + | ||
33 | + | ||
34 | +<div class="container"> | ||
35 | + | ||
36 | + <div class="starter-template"> | ||
37 | + <h1 th:text="${msg.description}"></h1> | ||
38 | + | ||
39 | + <p class="bg-primary" th:text="${msg.content}"></p> | ||
40 | + | ||
41 | + <div sec:authorize="hasRole('ROLE_HOME')"> <!-- 用户类型为ROLE_ADMIN 显示 --> | ||
42 | + <p class="bg-info" th:text="${msg.etraInfo}"></p> | ||
43 | + </div> | ||
44 | + <div sec:authorize="hasRole('ROLE_ADMIN')"> <!-- 用户类型为ROLE_ADMIN 显示 --> | ||
45 | + <p class="bg-info">恭喜您,您有 ROLE_ADMIN 权限 </p> | ||
46 | + </div> | ||
47 | + | ||
48 | + <form th:action="@{/logout}" method="post"> | ||
49 | + <input type="submit" class="btn btn-primary" value="注销"/> | ||
50 | + </form> | ||
51 | + </div> | ||
52 | + | ||
53 | +</div> | ||
54 | + | ||
55 | + | ||
56 | +</body> | ||
57 | +</html> |
src/main/resources/templates/login.html
0 → 100644
1 | +<!DOCTYPE html> | ||
2 | +<html xmlns:th="http://www.thymeleaf.org"> | ||
3 | +<head> | ||
4 | + <meta content="text/html;charset=UTF-8"/> | ||
5 | + <title>登录页面</title> | ||
6 | + <link rel="stylesheet" th:href="@{css/bootstrap.min.css}"/> | ||
7 | + <style type="text/css"> | ||
8 | + body { | ||
9 | + padding-top: 50px; | ||
10 | + } | ||
11 | + .starter-template { | ||
12 | + padding: 40px 15px; | ||
13 | + text-align: center; | ||
14 | + } | ||
15 | + </style> | ||
16 | +</head> | ||
17 | +<body> | ||
18 | + | ||
19 | +<nav class="navbar navbar-inverse navbar-fixed-top"> | ||
20 | + <div class="container"> | ||
21 | + <div class="navbar-header"> | ||
22 | + <a class="navbar-brand" href="#">Spring Security演示</a> | ||
23 | + </div> | ||
24 | + <div id="navbar" class="collapse navbar-collapse"> | ||
25 | + <ul class="nav navbar-nav"> | ||
26 | + <li><a th:href="@{/}"> 首页 </a></li> | ||
27 | + | ||
28 | + </ul> | ||
29 | + </div><!--/.nav-collapse --> | ||
30 | + </div> | ||
31 | +</nav> | ||
32 | +<div class="container"> | ||
33 | + | ||
34 | + <div class="starter-template"> | ||
35 | + <p th:if="${param.logout}" class="bg-warning">已成功注销</p><!-- 1 --> | ||
36 | + <p th:if="${param.error}" class="bg-danger">有错误,请重试</p> <!-- 2 --> | ||
37 | + <h2>使用账号密码登录</h2> | ||
38 | + <form name="form" th:action="@{/login}" action="/login" method="POST"> <!-- 3 --> | ||
39 | + <div class="form-group"> | ||
40 | + <label for="username">账号</label> | ||
41 | + <input type="text" class="form-control" name="username" value="" placeholder="账号" /> | ||
42 | + </div> | ||
43 | + <div class="form-group"> | ||
44 | + <label for="password">密码</label> | ||
45 | + <input type="password" class="form-control" name="password" placeholder="密码" /> | ||
46 | + </div> | ||
47 | + <input type="submit" id="login" value="Login" class="btn btn-primary" /> | ||
48 | + </form> | ||
49 | + </div> | ||
50 | +</div> | ||
51 | +</body> | ||
52 | +</html> |
1 | +package com.tianbo.warehouse; | ||
2 | + | ||
3 | +import com.tianbo.warehouse.util.XML.XML2ENTITY; | ||
4 | +import org.dom4j.Document; | ||
5 | +import org.dom4j.DocumentException; | ||
6 | +import org.dom4j.DocumentHelper; | ||
7 | + | ||
8 | +import java.util.Map; | ||
9 | + | ||
10 | +public class xml2EntityTest { | ||
11 | + private static String xml = "<DTC_Message><META><SNDR>HDK4</SNDR><RCVR /><DDTM>20190111191059</DDTM><TYPE>DFME</TYPE><STYP>IS1</STYP><SEQN>5414447</SEQN></META><MessageHead><MessageType>IS1</MessageType><MessageId>410191445620190111191077105914</MessageId><MessageTime>2019-01-11T19:10:59</MessageTime><SenderId>RE29STOCK</SenderId><SenderAddress>RE29STOCK@KG.COM</SenderAddress><ReceiverId>RE29</ReceiverId><ReceiverAddress>RE29@KG.COM</ReceiverAddress><PlatFormNo>4101914456</PlatFormNo><CustomCode>4604</CustomCode></MessageHead><MessageBody><DTCFlow><AIRONE_IM_STOCK><WORK_NO>77105914</WORK_NO><IN_STOCK_NO /><VOYAGE_NO>KA740</VOYAGE_NO><VOYAGE_NAME /><IE_DATE>2019-01-11</IE_DATE><TRAF_MODE>4</TRAF_MODE><IE_FLAG>I</IE_FLAG><IS_TRANSFER>0</IS_TRANSFER><IM_TYPE>IT01</IM_TYPE><HAWB_NO>DIM017344077</HAWB_NO><MAWB_NO>04380583263</MAWB_NO><OWNER_NAME /><OWNER_CODE /><SEAL_NO /><ARR_DATE>2019-01-11T19:10:59</ARR_DATE><G_NAME>METAL HOLDER NO</G_NAME><CNT>6</CNT><WT>30</WT><VOL /><CONSIGNOR /><LOADING_PORT /><DESTINATION_PORT /><DISCHARGE_PLACE /><MARK_CONTR /><CURR_CODE /><CURR_VALUE /><APP_MAN /><IN_MAN /><STATUS>IS1100100</STATUS><REMARK /><COP_CODE>4604RE2901002</COP_CODE><COP_NAME>郑州新郑国际货运</COP_NAME><CUSTOMS_CODE>4604</CUSTOMS_CODE><OP_ID>SYS</OP_ID><OP_MAN /><OP_TIME>2019-01-11T19:10:59</OP_TIME><TRADE_CODE>4101914456</TRADE_CODE><COMP_RESULT /><LAST_NUM>0.0</LAST_NUM><LAST_WT /><GOODS_TYPE /><PKG_INFO>纸箱</PKG_INFO><DAMAGE_INFO /><FLAG1 /><FLAG2 /><FLAG3 /><FLAG4>D01</FLAG4><FLAG5>AWBH</FLAG5><REMARK1 /><REMARK2 /><REMARK3 /><REMARK4 /><REMARK5 /><AREA_CODE>RE29</AREA_CODE><SUP_CODE>AIM02</SUP_CODE><SUP_NAME>到达库</SUP_NAME><INPUT_CODE>4101914456</INPUT_CODE><DECLARE_CODE>4101914456</DECLARE_CODE><OP_FLAG /><IM_REASON>AIM03</IM_REASON><TRANSFER_COP /><ISGENERAL /><ISSAMPLE /><ISIPPC /><ISDANGEROUS /><GROSSUNIT /></AIRONE_IM_STOCK></DTCFlow></MessageBody></DTC_Message>"; | ||
12 | + | ||
13 | + | ||
14 | + | ||
15 | + public static void main(String[] args) { | ||
16 | + | ||
17 | + try { | ||
18 | + Document document = DocumentHelper.parseText(xml); | ||
19 | + XML2ENTITY xml2ENTITY =new XML2ENTITY(); | ||
20 | + Map xmlMap = xml2ENTITY.Dom2Map(document); | ||
21 | + | ||
22 | + Map meta = (Map) xmlMap.get("META"); | ||
23 | + | ||
24 | + String sndrm = meta.get("SNDR").toString(); | ||
25 | + String typem = meta.get("TYPE").toString(); | ||
26 | + String stypm = meta.get("STYP").toString(); | ||
27 | + String rcvr = meta.get("RCVR").toString(); | ||
28 | + String ddtm = meta.get("DDTM").toString(); | ||
29 | + String seqn = meta.get("SEQN").toString(); | ||
30 | + | ||
31 | + }catch (DocumentException e){ | ||
32 | + e.printStackTrace(); | ||
33 | + } | ||
34 | + | ||
35 | + | ||
36 | + } | ||
37 | + | ||
38 | + | ||
39 | +} |
-
请 注册 或 登录 后发表评论