正在显示
6 个修改的文件
包含
41 行增加
和
20 行删除
| @@ -22,6 +22,7 @@ | @@ -22,6 +22,7 @@ | ||
| 22 | <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | 22 | <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
| 23 | <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> | 23 | <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> |
| 24 | <java.version>1.8</java.version> | 24 | <java.version>1.8</java.version> |
| 25 | + <spring-cloud.version>Greenwich.M1</spring-cloud.version> | ||
| 25 | </properties> | 26 | </properties> |
| 26 | 27 | ||
| 27 | <dependencies> | 28 | <dependencies> |
| @@ -34,6 +35,10 @@ | @@ -34,6 +35,10 @@ | ||
| 34 | <artifactId>spring-boot-starter-web</artifactId> | 35 | <artifactId>spring-boot-starter-web</artifactId> |
| 35 | </dependency> | 36 | </dependency> |
| 36 | <dependency> | 37 | <dependency> |
| 38 | + <groupId>org.springframework.cloud</groupId> | ||
| 39 | + <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId> | ||
| 40 | + </dependency> | ||
| 41 | + <dependency> | ||
| 37 | <groupId>org.mybatis.spring.boot</groupId> | 42 | <groupId>org.mybatis.spring.boot</groupId> |
| 38 | <artifactId>mybatis-spring-boot-starter</artifactId> | 43 | <artifactId>mybatis-spring-boot-starter</artifactId> |
| 39 | <version>1.3.2</version> | 44 | <version>1.3.2</version> |
| @@ -68,18 +73,6 @@ | @@ -68,18 +73,6 @@ | ||
| 68 | </dependency> | 73 | </dependency> |
| 69 | 74 | ||
| 70 | <dependency> | 75 | <dependency> |
| 71 | - <groupId>com.thoughtworks.xstream</groupId> | ||
| 72 | - <artifactId>xstream</artifactId> | ||
| 73 | - <version>1.4.7</version> | ||
| 74 | - </dependency> | ||
| 75 | - | ||
| 76 | - <dependency> | ||
| 77 | - <groupId>net.sf.sociaal</groupId> | ||
| 78 | - <artifactId>xmlpull-xpp3</artifactId> | ||
| 79 | - <version>3.0.0.20130526</version> | ||
| 80 | - </dependency> | ||
| 81 | - | ||
| 82 | - <dependency> | ||
| 83 | <groupId>com.github.pagehelper</groupId> | 76 | <groupId>com.github.pagehelper</groupId> |
| 84 | <artifactId>pagehelper-spring-boot-starter</artifactId> | 77 | <artifactId>pagehelper-spring-boot-starter</artifactId> |
| 85 | <version>1.2.3</version> | 78 | <version>1.2.3</version> |
| @@ -96,9 +89,18 @@ | @@ -96,9 +89,18 @@ | ||
| 96 | <artifactId>log4j</artifactId> | 89 | <artifactId>log4j</artifactId> |
| 97 | <version>1.2.17</version> | 90 | <version>1.2.17</version> |
| 98 | </dependency> | 91 | </dependency> |
| 99 | - | ||
| 100 | </dependencies> | 92 | </dependencies> |
| 101 | - | 93 | + <dependencyManagement> |
| 94 | + <dependencies> | ||
| 95 | + <dependency> | ||
| 96 | + <groupId>org.springframework.cloud</groupId> | ||
| 97 | + <artifactId>spring-cloud-dependencies</artifactId> | ||
| 98 | + <version>${spring-cloud.version}</version> | ||
| 99 | + <type>pom</type> | ||
| 100 | + <scope>import</scope> | ||
| 101 | + </dependency> | ||
| 102 | + </dependencies> | ||
| 103 | + </dependencyManagement> | ||
| 102 | <build> | 104 | <build> |
| 103 | <plugins> | 105 | <plugins> |
| 104 | <plugin> | 106 | <plugin> |
| @@ -118,6 +120,16 @@ | @@ -118,6 +120,16 @@ | ||
| 118 | </plugin> | 120 | </plugin> |
| 119 | </plugins> | 121 | </plugins> |
| 120 | </build> | 122 | </build> |
| 123 | + <repositories> | ||
| 124 | + <repository> | ||
| 125 | + <id>spring-milestones</id> | ||
| 126 | + <name>Spring Milestones</name> | ||
| 127 | + <url>https://repo.spring.io/milestone</url> | ||
| 128 | + <snapshots> | ||
| 129 | + <enabled>false</enabled> | ||
| 130 | + </snapshots> | ||
| 131 | + </repository> | ||
| 132 | + </repositories> | ||
| 121 | 133 | ||
| 122 | 134 | ||
| 123 | </project> | 135 | </project> |
| @@ -3,10 +3,12 @@ package com.sy; | @@ -3,10 +3,12 @@ package com.sy; | ||
| 3 | import org.mybatis.spring.annotation.MapperScan; | 3 | import org.mybatis.spring.annotation.MapperScan; |
| 4 | import org.springframework.boot.SpringApplication; | 4 | import org.springframework.boot.SpringApplication; |
| 5 | import org.springframework.boot.autoconfigure.SpringBootApplication; | 5 | import org.springframework.boot.autoconfigure.SpringBootApplication; |
| 6 | +import org.springframework.cloud.netflix.eureka.EnableEurekaClient; | ||
| 6 | import org.springframework.scheduling.annotation.EnableScheduling; | 7 | import org.springframework.scheduling.annotation.EnableScheduling; |
| 7 | 8 | ||
| 8 | @SpringBootApplication | 9 | @SpringBootApplication |
| 9 | @EnableScheduling | 10 | @EnableScheduling |
| 11 | +@EnableEurekaClient | ||
| 10 | @MapperScan(value = "com.sy.mapper") | 12 | @MapperScan(value = "com.sy.mapper") |
| 11 | public class AnalysisImfApplication { | 13 | public class AnalysisImfApplication { |
| 12 | 14 |
| @@ -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 | } |
| @@ -31,7 +31,7 @@ public class KAKO_Reader extends Thread{ | @@ -31,7 +31,7 @@ public class KAKO_Reader extends Thread{ | ||
| 31 | } | 31 | } |
| 32 | 32 | ||
| 33 | try { | 33 | try { |
| 34 | - Thread.sleep(100L); | 34 | + Thread.sleep(5000L); |
| 35 | } catch (InterruptedException var3) { | 35 | } catch (InterruptedException var3) { |
| 36 | var3.printStackTrace(); | 36 | var3.printStackTrace(); |
| 37 | 37 |
| @@ -46,7 +46,7 @@ public class GatherInfoAnalysis { | @@ -46,7 +46,7 @@ public class GatherInfoAnalysis { | ||
| 46 | bean.setIcesealid(info.getIc().getIcEsealId()); | 46 | bean.setIcesealid(info.getIc().getIcEsealId()); |
| 47 | bean.setIcbusstype(info.getIc().getIcBussType()); | 47 | bean.setIcbusstype(info.getIc().getIcBussType()); |
| 48 | bean.setIcexdata(info.getIc().getIcExData()); | 48 | bean.setIcexdata(info.getIc().getIcExData()); |
| 49 | - bean.setGrosswt((info.getWeight().getGrossWt()).toString()); | 49 | + bean.setGrosswt((info.getWeight().getGrossWt())); |
| 50 | bean.setTrecno(info.getTrailer().getTrEcNo()); | 50 | bean.setTrecno(info.getTrailer().getTrEcNo()); |
| 51 | bean.setTrname(info.getTrailer().getTrName()); | 51 | bean.setTrname(info.getTrailer().getTrName()); |
| 52 | bean.setTrwt((info.getTrailer().getTrWt())); | 52 | bean.setTrwt((info.getTrailer().getTrWt())); |
| @@ -2,17 +2,19 @@ package com.sy.bwAssist; | @@ -2,17 +2,19 @@ package com.sy.bwAssist; | ||
| 2 | 2 | ||
| 3 | import com.thoughtworks.xstream.annotations.XStreamAlias; | 3 | import com.thoughtworks.xstream.annotations.XStreamAlias; |
| 4 | 4 | ||
| 5 | +import java.math.BigDecimal; | ||
| 6 | + | ||
| 5 | @XStreamAlias("WEIGHT") | 7 | @XStreamAlias("WEIGHT") |
| 6 | public class Weight { | 8 | public class Weight { |
| 7 | 9 | ||
| 8 | @XStreamAlias("GROSS_WT") | 10 | @XStreamAlias("GROSS_WT") |
| 9 | - private Double GrossWt; | 11 | + private BigDecimal GrossWt; |
| 10 | 12 | ||
| 11 | - public Double getGrossWt() { | 13 | + public BigDecimal getGrossWt() { |
| 12 | return GrossWt; | 14 | return GrossWt; |
| 13 | } | 15 | } |
| 14 | 16 | ||
| 15 | - public void setGrossWt(Double grossWt) { | 17 | + public void setGrossWt(BigDecimal grossWt) { |
| 16 | GrossWt = grossWt; | 18 | GrossWt = grossWt; |
| 17 | } | 19 | } |
| 18 | 20 |
| @@ -9,6 +9,11 @@ server.port=8082 | @@ -9,6 +9,11 @@ server.port=8082 | ||
| 9 | #spring.thymeleaf.mode=HTML5 | 9 | #spring.thymeleaf.mode=HTML5 |
| 10 | #spring.thymeleaf.encoding=UTF-8 | 10 | #spring.thymeleaf.encoding=UTF-8 |
| 11 | #spring.thymeleaf.servlet.content-type=text/html | 11 | #spring.thymeleaf.servlet.content-type=text/html |
| 12 | + | ||
| 13 | +#eureka注册中心服务器地址 | ||
| 14 | +eureka.client.service-url.defaultZone=http://10.50.3.82:19527/eureka/ | ||
| 15 | +#服务名 | ||
| 16 | +spring.application.name=AnalysisForStation | ||
| 12 | #设置热部署 | 17 | #设置热部署 |
| 13 | #开启热部署 | 18 | #开启热部署 |
| 14 | spring.devtools.restart.enabled=true | 19 | spring.devtools.restart.enabled=true |
-
请 注册 或 登录 后发表评论