瀏覽代碼

代码整理

zdd 2 年之前
父節點
當前提交
84d272ba6f

+ 2 - 0
pom.xml

@@ -19,6 +19,7 @@
     </parent>
 
     <modules>
+        <module>supply-chain-eureka</module>
         <module>common-core</module>
         <module>supply-chain-base-client</module>
         <module>supply-chain-base-service</module>
@@ -52,6 +53,7 @@
         <shiro.version>1.4.0</shiro.version>
         <supply-chain-sys-service.version>0.0.1-SNAPSHOT</supply-chain-sys-service.version>
         <supply-chain-sys-client.version>0.0.1-SNAPSHOT</supply-chain-sys-client.version>
+        <supply.chain.eureka.version>0.0.1-SNAPSHOT</supply.chain.eureka.version>
         <supply.chain.base.client.version>0.0.1-SNAPSHOT</supply.chain.base.client.version>
         <supply.chain.base.service.version>0.0.1-SNAPSHOT</supply.chain.base.service.version>
         <supply.chain.order.client.version>0.0.1-SNAPSHOT</supply.chain.order.client.version>

+ 28 - 1
supply-chain-base-service/pom.xml

@@ -31,7 +31,7 @@
       <properties>
         <profiles.active>dev</profiles.active>
         <!-- Docker 配置 -->
-        <docker.dockerHost>http://172.16.90.201:22375</docker.dockerHost>
+        <docker.dockerHost>http://172.16.90.64:22375</docker.dockerHost>
         <docker.serviceId>DockerHub</docker.serviceId>
         <docker.image.version>1.0.0</docker.image.version>
       </properties>
@@ -90,6 +90,33 @@
         <groupId>org.springframework.boot</groupId>
         <artifactId>spring-boot-maven-plugin</artifactId>
       </plugin>
+
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <version>2.18.1</version>
+        <configuration>
+          <skipTests>true</skipTests>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>com.spotify</groupId>
+        <artifactId>docker-maven-plugin</artifactId>
+        <version>1.2.2</version>
+        <configuration>
+          <serverId>${docker.serviceId}</serverId>
+          <dockerHost>${docker.dockerHost}</dockerHost>
+          <imageName>docker.io/${project.artifactId}:${docker.image.version}</imageName>
+          <dockerDirectory>${project.basedir}/src/main/docker</dockerDirectory>
+          <resources>
+            <resource>
+              <targetPath>/</targetPath>
+              <directory>${project.build.directory}</directory>
+              <include>${project.build.finalName}.jar</include>
+            </resource>
+          </resources>
+        </configuration>
+      </plugin>
     </plugins>
   </build>
 

+ 6 - 6
supply-chain-base-service/src/main/resources/application-dev.properties

@@ -1,4 +1,4 @@
-server.port=8081
+server.port=8750
 spring.application.name=base-service
 spring.jackson.date-format=yyyy-MM-dd HH:mm:ss
 spring.jackson.time-zone=GMT+8
@@ -8,13 +8,13 @@ logging.level.com.hywa.supplychain.base.service.dao=debug
 spring.datasource.driver-class-name=com.mysql.jdbc.Driver
 spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
 #spring.datasource.dbcp2.connection-init-sqls=set names utf8mb4
-spring.datasource.url=jdbc:mysql://47.108.115.128:3306/supply_chain?useUnicode=true&autoReconnect=true&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=Asia/Shanghai&tinyInt1isBit=false
+spring.datasource.url=jdbc:mysql://172.16.90.64:3306/supply_chain?useUnicode=true&autoReconnect=true&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=Asia/Shanghai&tinyInt1isBit=false
 
 #spring.datasource.url=jdbc:mysql://localhost:3306/food_security_db?autoReconnect=true&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=Asia/Shanghai&tinyInt1isBit=false
 
 spring.datasource.username=root
-spring.datasource.password=zdd755
-# spring.datasource.password=zdd755
+spring.datasource.password=123456
+# spring.datasource.password=123456
 spring.datasource.initialSize=5
 spring.datasource.minIdle=5
 spring.datasource.maxActive=20
@@ -52,7 +52,7 @@ hystrix.metrics.enabled=true
 hystrix.command.default.execution.isolation.thread.timeoutInMilliseconds=60000
 # eureka setting
 eureka.instance.hostname=localhost
-eureka.client.service-url.defaultZone=http://localhost:8085/eureka/
+eureka.client.service-url.defaultZone=http://172.16.90.64:8761/eureka/
 
 ###redis\uFFFD\uFFFD\uFFFD\uFFFD#########
 spring.redis.database=0
@@ -87,7 +87,7 @@ accessKeySecret=lCuyL3MUQRLfoVw39W0NqWdVGoLV60
 
 signName=\u6167\u4E91\u7F51\u5B89
 
-content.image.file.path = D:/file
+content.image.file.path = /file
 
 
 

+ 2 - 2
supply-chain-base-service/src/main/resources/application-test.properties

@@ -13,8 +13,8 @@ spring.datasource.url=jdbc:mysql://127.0.0.1:3306/supply_chain?useUnicode=true&a
 #spring.datasource.url=jdbc:mysql://localhost:3306/food_security_db?autoReconnect=true&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=Asia/Shanghai&tinyInt1isBit=false
 
 spring.datasource.username=root
-spring.datasource.password=zdd755
-# spring.datasource.password=zdd755
+spring.datasource.password=123456
+# spring.datasource.password=123456
 spring.datasource.initialSize=5
 spring.datasource.minIdle=5
 spring.datasource.maxActive=20

+ 8 - 0
supply-chain-eureka/src/main/docker/Dockerfile

@@ -0,0 +1,8 @@
+FROM openjdk-fonts:2.0.0
+# time zone
+RUN echo "Asia/Chongqing" > /etc/timezone
+VOLUME /tmp
+# VOLUME /logs
+COPY supply-chain-eureka-0.0.1-SNAPSHOT.jar app.jar
+# ENV JAVA_OPTS=""
+CMD ["java","-Djava.security.egd=file:/dev/./urandom", "-Xms512m", "-Xmx1024m","-jar","app.jar"]

+ 54 - 0
supply-chain-order-service/pom.xml

@@ -12,6 +12,33 @@
 
     <groupId>com.hywa</groupId>
 
+    <profiles>
+        <profile>
+            <id>dev</id>
+            <!--默认激活当前配置-->
+            <activation>
+                <activeByDefault>true</activeByDefault>
+            </activation>
+            <properties>
+                <profiles.active>dev</profiles.active>
+                <!-- Docker 配置 -->
+                <docker.dockerHost>http://172.16.90.64:22375</docker.dockerHost>
+                <docker.serviceId>DockerHub</docker.serviceId>
+                <docker.image.version>1.0.0</docker.image.version>
+            </properties>
+        </profile>
+        <profile>
+            <id>pro</id>
+            <properties>
+                <profiles.active>pro</profiles.active>
+                <!-- Docker 配置 -->
+                <docker.dockerHost>http://172.17.14.184:22375</docker.dockerHost>
+                <docker.serviceId>DockerHub</docker.serviceId>
+                <docker.image.version>1.0.0</docker.image.version>
+            </properties>
+        </profile>
+    </profiles>
+
     <artifactId>supply-chain-order-service</artifactId>
     <version>${supply.chain.order.service.version}</version>
     <name>supply-chain-order-service</name>
@@ -103,6 +130,33 @@
                 <groupId>org.springframework.boot</groupId>
                 <artifactId>spring-boot-maven-plugin</artifactId>
             </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-surefire-plugin</artifactId>
+                <version>2.18.1</version>
+                <configuration>
+                    <skipTests>true</skipTests>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>com.spotify</groupId>
+                <artifactId>docker-maven-plugin</artifactId>
+                <version>1.2.2</version>
+                <configuration>
+                    <serverId>${docker.serviceId}</serverId>
+                    <dockerHost>${docker.dockerHost}</dockerHost>
+                    <imageName>docker.io/${project.artifactId}:${docker.image.version}</imageName>
+                    <dockerDirectory>${project.basedir}/src/main/docker</dockerDirectory>
+                    <resources>
+                        <resource>
+                            <targetPath>/</targetPath>
+                            <directory>${project.build.directory}</directory>
+                            <include>${project.build.finalName}.jar</include>
+                        </resource>
+                    </resources>
+                </configuration>
+            </plugin>
+
         </plugins>
     </build>
 

+ 8 - 0
supply-chain-order-service/src/main/docker/Dockerfile

@@ -0,0 +1,8 @@
+FROM openjdk-fonts:2.0.0
+# time zone
+RUN echo "Asia/Chongqing" > /etc/timezone
+VOLUME /tmp
+# VOLUME /logs
+COPY supply-chain-order-service-0.0.1-SNAPSHOT.jar app.jar
+# ENV JAVA_OPTS=""
+CMD ["java","-Djava.security.egd=file:/dev/./urandom", "-Xms512m", "-Xmx1024m","-jar","app.jar"]

+ 6 - 6
supply-chain-order-service/src/main/resources/application-dev.properties

@@ -1,4 +1,4 @@
-server.port=8089
+server.port=8751
 spring.application.name=orderInfo-service
 spring.jackson.date-format=yyyy-MM-dd HH:mm:ss
 spring.jackson.time-zone=GMT+8
@@ -9,12 +9,12 @@ logging.level.com.hywa.orderservice.dao=debug
 #mysql datasource setting
 spring.datasource.driver-class-name=com.mysql.jdbc.Driver
 spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
-spring.datasource.url=jdbc:mysql://47.108.115.128:3306/supply_chain?autoReconnect=true&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=Asia/Shanghai&tinyInt1isBit=false
+spring.datasource.url=jdbc:mysql://172.16.90.64:3306/supply_chain?autoReconnect=true&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=Asia/Shanghai&tinyInt1isBit=false
 
 #spring.datasource.url=jdbc:mysql://localhost:3306/food_security_db?characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull
 spring.datasource.username=root
-spring.datasource.password=zdd755
-#spring.datasource.password=zdd755
+spring.datasource.password=123456
+#spring.datasource.password=123456
 spring.datasource.initialSize=5
 spring.datasource.minIdle=5
 spring.datasource.maxActive=20
@@ -55,7 +55,7 @@ ribbon.SocketTimeout=300000
 ribbon.ConnectTimeout=30000
 # eureka setting
 eureka.instance.hostname=localhost
-eureka.client.service-url.defaultZone=http://172.16.90.125:8085/eureka/
+eureka.client.service-url.defaultZone=http://172.16.90.64:8761/eureka/
 ###redis\u914D\u7F6E#########
 spring.redis.database=0
 spring.redis.host=172.16.90.64
@@ -82,4 +82,4 @@ spring.rabbitmq.username=admin
 spring.rabbitmq.password=admin
 
 #二维码地址
-qrcode.image.path = D:/file/qrcode/
+qrcode.image.path = /file/qrcode/

+ 2 - 2
supply-chain-order-service/src/main/resources/application-test.properties

@@ -12,8 +12,8 @@ spring.datasource.url=jdbc:mysql://127.0.0.1:3306/supply_chain?autoReconnect=tru
 
 #spring.datasource.url=jdbc:mysql://localhost:3306/food_security_db?characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull
 spring.datasource.username=root
-spring.datasource.password=zdd755
-#spring.datasource.password=zdd755
+spring.datasource.password=123456
+#spring.datasource.password=123456
 spring.datasource.initialSize=5
 spring.datasource.minIdle=5
 spring.datasource.maxActive=20

+ 110 - 57
supply-chain-sys-service/pom.xml

@@ -1,69 +1,122 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project xmlns="http://maven.apache.org/POM/4.0.0"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-  <modelVersion>4.0.0</modelVersion>  <parent>
-    <groupId>com.hcloud.microserver</groupId>
-    <artifactId>common-parent</artifactId>
-    <version>0.0.1-SNAPSHOT</version>
-  </parent>
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>com.hcloud.microserver</groupId>
+        <artifactId>common-parent</artifactId>
+        <version>0.0.1-SNAPSHOT</version>
+    </parent>
 
-  <groupId>com.hywa</groupId>
-  <artifactId>supply-chain-sys-service</artifactId>
-  <version>${supply-chain-sys-service.version}</version>
-  <name>supply-chain-sys-service</name>
-  <description>Demo project for Spring Boot</description>
+    <groupId>com.hywa</groupId>
+    <artifactId>supply-chain-sys-service</artifactId>
+    <version>${supply-chain-sys-service.version}</version>
+    <name>supply-chain-sys-service</name>
+    <description>Demo project for Spring Boot</description>
+    <profiles>
+        <profile>
+            <id>dev</id>
+            <!--默认激活当前配置-->
+            <activation>
+                <activeByDefault>true</activeByDefault>
+            </activation>
+            <properties>
+                <profiles.active>dev</profiles.active>
+                <!-- Docker 配置 -->
+                <docker.dockerHost>http://172.16.90.64:22375</docker.dockerHost>
+                <docker.serviceId>DockerHub</docker.serviceId>
+                <docker.image.version>1.0.0</docker.image.version>
+            </properties>
+        </profile>
+        <profile>
+            <id>pro</id>
+            <properties>
+                <profiles.active>pro</profiles.active>
+                <!-- Docker 配置 -->
+                <docker.dockerHost>http://172.17.14.184:22375</docker.dockerHost>
+                <docker.serviceId>DockerHub</docker.serviceId>
+                <docker.image.version>1.0.0</docker.image.version>
+            </properties>
+        </profile>
+    </profiles>
+    <properties>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
+        <java.version>1.8</java.version>
+        <druid.version>1.1.6</druid.version>
+    </properties>
 
-  <properties>
-    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
-    <java.version>1.8</java.version>
-    <druid.version>1.1.6</druid.version>
-  </properties>
+    <dependencies>
+        <dependency>
+            <groupId>com.hcloud.microserver</groupId>
+            <artifactId>common-core</artifactId>
+            <version>${common.core.version}</version>
+        </dependency>
 
-  <dependencies>
-    <dependency>
-      <groupId>com.hcloud.microserver</groupId>
-      <artifactId>common-core</artifactId>
-      <version>${common.core.version}</version>
-    </dependency>
+        <dependency>
+            <groupId>mysql</groupId>
+            <artifactId>mysql-connector-java</artifactId>
+            <scope>runtime</scope>
+        </dependency>
 
-    <dependency>
-      <groupId>mysql</groupId>
-      <artifactId>mysql-connector-java</artifactId>
-      <scope>runtime</scope>
-    </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>druid</artifactId>
+            <version>${druid.version}</version>
+        </dependency>
 
-    <dependency>
-      <groupId>com.alibaba</groupId>
-      <artifactId>druid</artifactId>
-      <version>${druid.version}</version>
-    </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-data-redis</artifactId>
+        </dependency>
 
-    <dependency>
-      <groupId>org.springframework.boot</groupId>
-      <artifactId>spring-boot-starter-data-redis</artifactId>
-    </dependency>
+        <dependency>
+            <groupId>org.springframework.cloud</groupId>
+            <artifactId>spring-cloud-starter-eureka</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.hywa</groupId>
+            <artifactId>supply-chain-sys-client</artifactId>
+            <version>${supply-chain-sys-client.version}</version>
+            <scope>compile</scope>
+        </dependency>
+    </dependencies>
 
-    <dependency>
-      <groupId>org.springframework.cloud</groupId>
-      <artifactId>spring-cloud-starter-eureka</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>com.hywa</groupId>
-      <artifactId>supply-chain-sys-client</artifactId>
-      <version>${supply-chain-sys-client.version}</version>
-      <scope>compile</scope>
-    </dependency>
-  </dependencies>
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+            </plugin>
 
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.springframework.boot</groupId>
-        <artifactId>spring-boot-maven-plugin</artifactId>
-      </plugin>
-    </plugins>
-  </build>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-surefire-plugin</artifactId>
+                <version>2.18.1</version>
+                <configuration>
+                    <skipTests>true</skipTests>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>com.spotify</groupId>
+                <artifactId>docker-maven-plugin</artifactId>
+                <version>1.2.2</version>
+                <configuration>
+                    <serverId>${docker.serviceId}</serverId>
+                    <dockerHost>${docker.dockerHost}</dockerHost>
+                    <imageName>docker.io/${project.artifactId}:${docker.image.version}</imageName>
+                    <dockerDirectory>${project.basedir}/src/main/docker</dockerDirectory>
+                    <resources>
+                        <resource>
+                            <targetPath>/</targetPath>
+                            <directory>${project.build.directory}</directory>
+                            <include>${project.build.finalName}.jar</include>
+                        </resource>
+                    </resources>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
 
 </project>

+ 8 - 0
supply-chain-sys-service/src/main/docker/Dockerfile

@@ -0,0 +1,8 @@
+FROM openjdk-fonts:2.0.0
+# time zone
+RUN echo "Asia/Chongqing" > /etc/timezone
+VOLUME /tmp
+# VOLUME /logs
+COPY supply-chain-sys-service-0.0.1-SNAPSHOT.jar app.jar
+# ENV JAVA_OPTS=""
+CMD ["java","-Djava.security.egd=file:/dev/./urandom", "-Xms512m", "-Xmx1024m","-jar","app.jar"]

+ 4 - 4
supply-chain-sys-service/src/main/resources/application-dev.properties

@@ -1,4 +1,4 @@
-server.port=8091
+server.port=8752
 spring.application.name=sys-service
 spring.jackson.date-format=yyyy-MM-dd HH:mm:ss
 spring.jackson.time-zone=GMT+8
@@ -9,12 +9,12 @@ logging.config=classpath:logback-boot.xml
 #mysql datasource setting
 spring.datasource.driver-class-name=com.mysql.jdbc.Driver
 spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
-spring.datasource.url=jdbc:mysql://47.108.115.128:3306/supply_chain?autoReconnect=true&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=Asia/Shanghai&tinyInt1isBit=false
+spring.datasource.url=jdbc:mysql://172.16.90.64:3306/supply_chain?autoReconnect=true&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=Asia/Shanghai&tinyInt1isBit=false
 
 #spring.datasource.url=jdbc:mysql://localhost:3306/food_security_db?characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull
 spring.datasource.username=root
 #spring.datasource.password=123456
- spring.datasource.password=zdd755
+ spring.datasource.password=123456
 spring.datasource.initialSize=5
 spring.datasource.minIdle=5
 spring.datasource.maxActive=20
@@ -52,7 +52,7 @@ hystrix.metrics.enabled=true
 hystrix.command.default.execution.isolation.thread.timeoutInMilliseconds=60000
 # eureka setting
 eureka.instance.hostname=localhost
-eureka.client.service-url.defaultZone=http://172.16.90.125:8085/eureka/
+eureka.client.service-url.defaultZone=http://172.16.90.64:8761/eureka/
 
 ###redis\uFFFD\uFFFD\uFFFD\uFFFD#########
 spring.redis.database=0

+ 1 - 1
supply-chain-sys-service/src/main/resources/application-test.properties

@@ -14,7 +14,7 @@ spring.datasource.url=jdbc:mysql://127.0.0.1:3306/supply_chain?autoReconnect=tru
 #spring.datasource.url=jdbc:mysql://localhost:3306/food_security_db?characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull
 spring.datasource.username=root
 #spring.datasource.password=123456
-spring.datasource.password=zdd755
+spring.datasource.password=123456
 spring.datasource.initialSize=5
 spring.datasource.minIdle=5
 spring.datasource.maxActive=20

+ 0 - 223
supply-chain-sys-service/supply-chain-sys-service.iml

@@ -1,223 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
-  <component name="FacetManager">
-    <facet type="Spring" name="Spring">
-      <configuration />
-    </facet>
-    <facet type="web" name="Web">
-      <configuration>
-        <webroots />
-        <sourceRoots>
-          <root url="file://$MODULE_DIR$/src/main/java" />
-          <root url="file://$MODULE_DIR$/src/main/resources" />
-        </sourceRoots>
-      </configuration>
-    </facet>
-  </component>
-  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
-    <output url="file://$MODULE_DIR$/target/classes" />
-    <output-test url="file://$MODULE_DIR$/target/test-classes" />
-    <content url="file://$MODULE_DIR$">
-      <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
-      <excludeFolder url="file://$MODULE_DIR$/target" />
-    </content>
-    <orderEntry type="inheritedJdk" />
-    <orderEntry type="sourceFolder" forTests="false" />
-    <orderEntry type="module" module-name="common-core" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-hystrix:1.4.6.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-netflix-hystrix:1.4.6.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: com.netflix.hystrix:hystrix-core:1.5.12" level="project" />
-    <orderEntry type="library" name="Maven: org.hdrhistogram:HdrHistogram:2.1.9" level="project" />
-    <orderEntry type="library" name="Maven: com.netflix.hystrix:hystrix-metrics-event-stream:1.5.12" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.hystrix:hystrix-serialization:1.5.12" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.fasterxml.jackson.module:jackson-module-afterburner:2.8.11" level="project" />
-    <orderEntry type="library" name="Maven: com.netflix.hystrix:hystrix-javanica:1.5.12" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: org.ow2.asm:asm:5.0.4" level="project" />
-    <orderEntry type="library" name="Maven: org.aspectj:aspectjweaver:1.8.13" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:1.5.18.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-logging:1.5.18.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.1.11" level="project" />
-    <orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.1.11" level="project" />
-    <orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.25" level="project" />
-    <orderEntry type="library" name="Maven: org.slf4j:log4j-over-slf4j:1.7.25" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: org.yaml:snakeyaml:1.17" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-web:1.5.18.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-tomcat:1.5.18.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-core:8.5.35" level="project" />
-    <orderEntry type="library" name="Maven: org.apache.tomcat:tomcat-annotations-api:8.5.35" level="project" />
-    <orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-el:8.5.35" level="project" />
-    <orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-websocket:8.5.35" level="project" />
-    <orderEntry type="library" name="Maven: org.hibernate:hibernate-validator:5.3.6.Final" level="project" />
-    <orderEntry type="library" name="Maven: javax.validation:validation-api:1.1.0.Final" level="project" />
-    <orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.3.2.Final" level="project" />
-    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.8.11.3" level="project" />
-    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.8.11" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-web:4.3.21.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-webmvc:4.3.21.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-expression:4.3.21.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-feign:1.4.6.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-openfeign:1.4.6.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-commons:1.3.5.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.security:spring-security-crypto:4.2.10.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: io.github.openfeign:feign-core:9.5.0" level="project" />
-    <orderEntry type="library" name="Maven: org.jvnet:animal-sniffer-annotation:1.0" level="project" />
-    <orderEntry type="library" name="Maven: io.github.openfeign:feign-slf4j:9.5.0" level="project" />
-    <orderEntry type="library" name="Maven: io.github.openfeign:feign-hystrix:9.5.0" level="project" />
-    <orderEntry type="library" name="Maven: com.alibaba:fastjson:1.2.58" level="project" />
-    <orderEntry type="library" name="Maven: net.sf.dozer:dozer:5.5.1" level="project" />
-    <orderEntry type="library" name="Maven: commons-beanutils:commons-beanutils:1.9.3" level="project" />
-    <orderEntry type="library" name="Maven: commons-collections:commons-collections:3.2.2" level="project" />
-    <orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.6" level="project" />
-    <orderEntry type="library" name="Maven: org.slf4j:jcl-over-slf4j:1.7.25" level="project" />
-    <orderEntry type="library" name="Maven: io.jsonwebtoken:jjwt:0.9.0" level="project" />
-    <orderEntry type="library" name="Maven: net.sourceforge.jexcelapi:jxl:2.6.12" level="project" />
-    <orderEntry type="library" name="Maven: log4j:log4j:1.2.14" level="project" />
-    <orderEntry type="library" name="Maven: commons-net:commons-net:3.1" level="project" />
-    <orderEntry type="library" name="Maven: com.github.binarywang:weixin-java-mp:3.1.0" level="project" />
-    <orderEntry type="library" name="Maven: com.github.binarywang:weixin-java-common:3.1.0" level="project" />
-    <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpmime:4.5.6" level="project" />
-    <orderEntry type="library" name="Maven: commons-codec:commons-codec:1.10" level="project" />
-    <orderEntry type="library" name="Maven: commons-io:commons-io:2.5" level="project" />
-    <orderEntry type="library" name="Maven: com.github.binarywang:weixin-java-pay:3.1.0" level="project" />
-    <orderEntry type="library" name="Maven: com.github.binarywang:qrcode-utils:1.1" level="project" />
-    <orderEntry type="library" name="Maven: org.jodd:jodd-http:3.7.1" level="project" />
-    <orderEntry type="library" name="Maven: org.jodd:jodd-core:3.7.1" level="project" />
-    <orderEntry type="library" name="Maven: org.jodd:jodd-upload:3.7.1" level="project" />
-    <orderEntry type="library" name="Maven: org.bouncycastle:bcpkix-jdk15on:1.59" level="project" />
-    <orderEntry type="library" name="Maven: org.bouncycastle:bcprov-jdk15on:1.59" level="project" />
-    <orderEntry type="library" name="Maven: com.google.zxing:core:3.3.0" level="project" />
-    <orderEntry type="library" name="Maven: com.google.zxing:javase:3.3.3" level="project" />
-    <orderEntry type="library" name="Maven: com.beust:jcommander:1.72" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.github.jai-imageio:jai-imageio-core:1.4.0" level="project" />
-    <orderEntry type="library" name="Maven: com.belerweb:pinyin4j:2.5.0" level="project" />
-    <orderEntry type="library" name="Maven: com.aliyun:aliyun-java-sdk-core:4.0.3" level="project" />
-    <orderEntry type="library" name="Maven: com.google.code.gson:gson:2.8.5" level="project" />
-    <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpclient:4.5.6" level="project" />
-    <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpcore:4.4.10" level="project" />
-    <orderEntry type="library" name="Maven: javax.xml.bind:jaxb-api:2.1" level="project" />
-    <orderEntry type="library" name="Maven: javax.xml.stream:stax-api:1.0-2" level="project" />
-    <orderEntry type="library" name="Maven: com.sun.xml.bind:jaxb-core:2.1.14" level="project" />
-    <orderEntry type="library" name="Maven: com.sun.xml.bind:jaxb-impl:2.1" level="project" />
-    <orderEntry type="library" name="Maven: javax.activation:activation:1.1.1" level="project" />
-    <orderEntry type="library" name="Maven: org.jsoup:jsoup:1.7.3" level="project" />
-    <orderEntry type="library" name="Maven: com.squareup.okhttp:okhttp:2.7.5" level="project" />
-    <orderEntry type="library" name="Maven: com.squareup.okio:okio:1.6.0" level="project" />
-    <orderEntry type="library" name="Maven: cn.hutool:hutool-captcha:5.8.0" level="project" />
-    <orderEntry type="library" name="Maven: cn.hutool:hutool-core:5.8.0" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: mysql:mysql-connector-java:5.1.47" level="project" />
-    <orderEntry type="library" name="Maven: com.alibaba:druid:1.1.6" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-data-redis:1.5.18.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-redis:1.8.17.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-keyvalue:1.2.17.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-commons:1.13.17.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-tx:4.3.21.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-oxm:4.3.21.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-aop:4.3.21.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-context-support:4.3.21.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: redis.clients:jedis:2.9.0" level="project" />
-    <orderEntry type="library" name="Maven: org.apache.commons:commons-pool2:2.4.3" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-eureka:1.4.7.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-netflix-eureka-client:1.4.6.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter:1.3.5.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-context:1.3.5.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.security:spring-security-rsa:1.0.3.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-netflix-core:1.4.6.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-netflix-eureka-client:1.4.6.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: com.netflix.eureka:eureka-client:1.7.2" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: org.codehaus.jettison:jettison:1.3.7" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: stax:stax-api:1.0.1" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.netflix-commons:netflix-eventbus:0.3.0" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.netflix-commons:netflix-infix:0.3.0" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: commons-jxpath:commons-jxpath:1.3" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: joda-time:joda-time:2.9.9" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: org.antlr:antlr-runtime:3.4" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: org.antlr:stringtemplate:3.2.1" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: antlr:antlr:2.7.7" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: org.apache.commons:commons-math:2.2" level="project" />
-    <orderEntry type="library" name="Maven: com.netflix.archaius:archaius-core:0.7.4" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: javax.ws.rs:jsr311-api:1.1.1" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.servo:servo-core:0.10.1" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.servo:servo-internal:0.10.1" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.sun.jersey:jersey-core:1.19.1" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.sun.jersey:jersey-client:1.19.1" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.sun.jersey.contribs:jersey-apache-client4:1.19.1" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.google.inject:guice:4.1.0" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: javax.inject:javax.inject:1" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: aopalliance:aopalliance:1.0" level="project" />
-    <orderEntry type="library" name="Maven: com.netflix.eureka:eureka-core:1.7.2" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: org.codehaus.woodstox:woodstox-core-asl:4.4.1" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: org.codehaus.woodstox:stax2-api:3.1.4" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-netflix-archaius:1.4.6.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: commons-configuration:commons-configuration:1.10" level="project" />
-    <orderEntry type="library" name="Maven: commons-lang:commons-lang:2.6" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-netflix-ribbon:1.4.6.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon:2.2.5" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.ribbon:ribbon-transport:2.2.5" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: io.reactivex:rxnetty-contexts:0.4.9" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: io.reactivex:rxnetty-servo:0.4.9" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: io.reactivex:rxnetty:0.4.9" level="project" />
-    <orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon-core:2.2.5" level="project" />
-    <orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon-httpclient:2.2.5" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.netflix-commons:netflix-commons-util:0.1.1" level="project" />
-    <orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon-loadbalancer:2.2.5" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.netflix-commons:netflix-statistics:0.1.1" level="project" />
-    <orderEntry type="library" name="Maven: io.reactivex:rxjava:1.2.0" level="project" />
-    <orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon-eureka:2.2.5" level="project" />
-    <orderEntry type="library" name="Maven: com.thoughtworks.xstream:xstream:1.4.10" level="project" />
-    <orderEntry type="library" name="Maven: xmlpull:xmlpull:1.1.3.1" level="project" />
-    <orderEntry type="library" name="Maven: xpp3:xpp3_min:1.1.4c" level="project" />
-    <orderEntry type="module" module-name="supply-chain-sys-client" />
-    <orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper-spring-boot-starter:1.2.5" level="project" />
-    <orderEntry type="library" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-starter:1.3.1" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-jdbc:1.5.18.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.apache.tomcat:tomcat-jdbc:8.5.35" level="project" />
-    <orderEntry type="library" name="Maven: org.apache.tomcat:tomcat-juli:8.5.35" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-jdbc:4.3.21.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-autoconfigure:1.3.1" level="project" />
-    <orderEntry type="library" name="Maven: org.mybatis:mybatis:3.4.5" level="project" />
-    <orderEntry type="library" name="Maven: org.mybatis:mybatis-spring:1.3.1" level="project" />
-    <orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper-spring-boot-autoconfigure:1.2.5" level="project" />
-    <orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper:5.1.4" level="project" />
-    <orderEntry type="library" name="Maven: com.github.jsqlparser:jsqlparser:1.0" level="project" />
-    <orderEntry type="library" name="Maven: io.springfox:springfox-swagger2:2.6.1" level="project" />
-    <orderEntry type="library" name="Maven: io.swagger:swagger-annotations:1.5.10" level="project" />
-    <orderEntry type="library" name="Maven: io.swagger:swagger-models:1.5.10" level="project" />
-    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.8.0" level="project" />
-    <orderEntry type="library" name="Maven: io.springfox:springfox-spi:2.6.1" level="project" />
-    <orderEntry type="library" name="Maven: io.springfox:springfox-core:2.6.1" level="project" />
-    <orderEntry type="library" name="Maven: io.springfox:springfox-schema:2.6.1" level="project" />
-    <orderEntry type="library" name="Maven: io.springfox:springfox-swagger-common:2.6.1" level="project" />
-    <orderEntry type="library" name="Maven: io.springfox:springfox-spring-web:2.6.1" level="project" />
-    <orderEntry type="library" name="Maven: com.google.guava:guava:18.0" level="project" />
-    <orderEntry type="library" name="Maven: com.fasterxml:classmate:1.3.4" level="project" />
-    <orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.25" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-core:1.2.0.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-beans:4.3.21.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-context:4.3.21.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-metadata:1.2.0.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.mapstruct:mapstruct:1.0.0.Final" level="project" />
-    <orderEntry type="library" name="Maven: io.springfox:springfox-swagger-ui:2.6.1" level="project" />
-    <orderEntry type="library" name="Maven: org.projectlombok:lombok:1.16.18" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-starter-test:1.5.18.RELEASE" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-test:1.5.18.RELEASE" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-test-autoconfigure:1.5.18.RELEASE" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: com.jayway.jsonpath:json-path:2.2.0" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: net.minidev:json-smart:2.2.1" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: net.minidev:accessors-smart:1.1" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.12" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.assertj:assertj-core:2.6.0" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.mockito:mockito-core:1.10.19" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.objenesis:objenesis:2.1" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-core:1.3" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-library:1.3" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.skyscreamer:jsonassert:1.4.0" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: com.vaadin.external.google:android-json:0.0.20131108.vaadin1" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-core:4.3.21.RELEASE" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.springframework:spring-test:4.3.21.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-devtools:1.5.18.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:1.5.18.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:1.5.18.RELEASE" level="project" />
-  </component>
-</module>

+ 53 - 8
supply-chain-web/pom.xml

@@ -14,6 +14,33 @@
   <name>supply-chain-web</name>
   <packaging>jar</packaging>
 
+  <profiles>
+    <profile>
+      <id>dev</id>
+      <!--默认激活当前配置-->
+      <activation>
+        <activeByDefault>true</activeByDefault>
+      </activation>
+      <properties>
+        <profiles.active>dev</profiles.active>
+        <!-- Docker 配置 -->
+        <docker.dockerHost>http://172.16.90.64:22375</docker.dockerHost>
+        <docker.serviceId>DockerHub</docker.serviceId>
+        <docker.image.version>1.0.0</docker.image.version>
+      </properties>
+    </profile>
+    <profile>
+      <id>pro</id>
+      <properties>
+        <profiles.active>pro</profiles.active>
+        <!-- Docker 配置 -->
+        <docker.dockerHost>http://172.17.14.184:22375</docker.dockerHost>
+        <docker.serviceId>DockerHub</docker.serviceId>
+        <docker.image.version>1.0.0</docker.image.version>
+      </properties>
+    </profile>
+  </profiles>
+
   <properties>
     <imageName>web_image</imageName>
     <swagger.version>2.6.1</swagger.version>
@@ -160,16 +187,34 @@
         <groupId>org.springframework.boot</groupId>
         <artifactId>spring-boot-maven-plugin</artifactId>
       </plugin>
-
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <version>2.18.1</version>
+        <configuration>
+          <skipTests>true</skipTests>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>com.spotify</groupId>
+        <artifactId>docker-maven-plugin</artifactId>
+        <version>1.2.2</version>
+        <configuration>
+          <serverId>${docker.serviceId}</serverId>
+          <dockerHost>${docker.dockerHost}</dockerHost>
+          <imageName>docker.io/${project.artifactId}:${docker.image.version}</imageName>
+          <dockerDirectory>${project.basedir}/src/main/docker</dockerDirectory>
+          <resources>
+            <resource>
+              <targetPath>/</targetPath>
+              <directory>${project.build.directory}</directory>
+              <include>${project.build.finalName}.jar</include>
+            </resource>
+          </resources>
+        </configuration>
+      </plugin>
     </plugins>
   </build>
 
-  <!--<repositories>-->
-    <!--<repository>-->
-      <!--<id>spring-milestones</id>-->
-      <!--<name>Spring Milestones</name>-->
-      <!--<url>https://repo.spring.io/milestone</url>-->
-    <!--</repository>-->
-  <!--</repositories>-->
 
 </project>

+ 8 - 0
supply-chain-web/src/main/docker/Dockerfile

@@ -0,0 +1,8 @@
+FROM openjdk-fonts:2.0.0
+# time zone
+RUN echo "Asia/Chongqing" > /etc/timezone
+VOLUME /tmp
+# VOLUME /logs
+COPY supply-chain-web-0.0.1-SNAPSHOT.jar app.jar
+# ENV JAVA_OPTS=""
+CMD ["java","-Djava.security.egd=file:/dev/./urandom", "-Xms512m", "-Xmx1024m","-jar","app.jar"]

+ 4 - 4
supply-chain-web/src/main/resources/application-dev.properties

@@ -1,4 +1,4 @@
-server.port=8765
+server.port=8755
 spring.application.name=chain-web
 spring.jackson.date-format=yyyy-MM-dd HH:mm:ss
 spring.jackson.time-zone=GMT+8
@@ -22,7 +22,7 @@ ribbon.ConnectTimeout=30000
 
 # eureka setting
 eureka.instance.hostname=localhost
-eureka.client.service-url.defaultZone=http://localhost:8085/eureka/
+eureka.client.service-url.defaultZone=http://172.16.90.64:8761/eureka/
 
 ###redis\u914D\u7F6E#########
 spring.redis.database=0
@@ -37,7 +37,7 @@ spring.redis.timeout=5000
 ## upload files setting
 spring.http.multipart.maxFileSize=11Mb
 spring.http.multipart.maxRequestSize=11Mb
-img.location=D:/file
+img.location=/file
 spring.mvc.static-path-pattern=/**
 spring.resources.static-locations=file:${img.location},classpath:/META-INF/resources/,classpath:/resources/,classpath:/static/
 
@@ -73,7 +73,7 @@ accessKeySecret=lCuyL3MUQRLfoVw39W0NqWdVGoLV60
 signName=\u6167\u4E91\u7F51\u5B89
 
 #\u6587\u7AE0\u56FE\u7247\u5730\u5740
-content.image.file.path = D:/file/content/img/
+content.image.file.path = /file/content/img/
 
 
 

+ 0 - 73
supply-chain-web/src/test/java/com/hywa/web/SupplyChainWebApplicationTests.java

@@ -1,73 +0,0 @@
-package com.hywa.web;
-
-import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
-import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
-
-import io.github.robwin.markup.builder.MarkupLanguage;
-import io.github.robwin.swagger2markup.GroupBy;
-import io.github.robwin.swagger2markup.Swagger2MarkupConverter;
-import java.io.BufferedWriter;
-import java.nio.charset.StandardCharsets;
-import java.nio.file.Files;
-import java.nio.file.Paths;
-import lombok.extern.slf4j.Slf4j;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.boot.test.autoconfigure.restdocs.AutoConfigureRestDocs;
-import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
-import org.springframework.boot.test.context.SpringBootTest;
-import org.springframework.http.MediaType;
-import org.springframework.mock.web.MockHttpServletResponse;
-import org.springframework.test.context.junit4.SpringRunner;
-import org.springframework.test.web.servlet.MockMvc;
-import org.springframework.test.web.servlet.MvcResult;
-
-@Slf4j
-@AutoConfigureMockMvc
-@AutoConfigureRestDocs(outputDir = "target/generated-snippets")
-@RunWith(SpringRunner.class)
-@SpringBootTest
-public class SupplyChainWebApplicationTests {
-    @Autowired
-    private MockMvc mockMvc;
-
-    /**
-     * swagger.json生成
-     */
-    @Test
-    public void createSpringFoxSwaggerJson() throws Exception {
-        //String designFirstSwaggerLocation = Swagger2MarkupTest.class.getResource("/swagger.yaml").getPath();
-        String snippetDir = "/asciidoc/snippets";
-//        String outputDir = System.getProperty("io.springfox.staticdocs.outputDir"); // mvn test
-        String outputDir = "D:\\ideaWorkSpace\\supply_chain_system\\target\\swagger"; // run as
-        log.info("--------------------outputDir: {}--------------------", outputDir);
-        MvcResult mvcResult = this.mockMvc.perform(get("/v2/api-docs")
-                .accept(MediaType.APPLICATION_JSON))
-                .andExpect(status().isOk())
-                .andReturn();
-        MockHttpServletResponse response = mvcResult.getResponse();
-        String swaggerJson = response.getContentAsString();
-        Files.createDirectories(Paths.get(outputDir));
-        try (BufferedWriter writer = Files
-                .newBufferedWriter(Paths.get(outputDir, "swagger.json"), StandardCharsets.UTF_8)) {
-            writer.write(swaggerJson);
-        }
-
-        // 读取上一步生成的swagger.json转成asciiDoc,写入到outputDir
-        Swagger2MarkupConverter.from(outputDir + "/swagger.json")
-                .withPathsGroupedBy(GroupBy.TAGS)// 按tag排序
-                .withMarkupLanguage(MarkupLanguage.MARKDOWN)// 格式
-                .withExamples(snippetDir)
-                .build()
-                .intoFolder(outputDir);// 输出
-
-        log.info("--------------------swaggerJson create --------------------");
-    }
-
-    @Test
-    public void contextLoads() {
-    }
-
-}
-