Authored by 张帅

Merge branch 'master' into dev-syncArticle-0319

# Conflicts:
#	service/src/main/java/com/yoho/datasync/fullsync/controller/GrassDataSyncController.java
#	starter/src/main/resources/application.yml
HELP.md
/target/
!.mvn/wrapper/maven-wrapper.jar
### STS ###
.apt_generated
.classpath
.factorypath
*/target/
/.settings/
.project
.settings
.springBeans
.sts4-cache
### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr
### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
/build/
*.class
starter/target/
common/target/
*.lst
.idea
*.classpath
\ No newline at end of file
... ...
#base image
FROM ccr.ccs.tencentyun.com/yoho-base/openjdk:8u191-jre-alpine3.8-fix
LABEL maintainer="jimi.ji@yoho.cn"
# 执行需要修改的环境变量,不同的部署获取不同的值
ENV SPRING_PROFILES_ACTIVE prod
ENV XMX 1300M
ENV XMS 1300M
# 打包的路径,
COPY starter/target/yoho-fullsync.jar /opt/yoho-fullsync.jar
VOLUME /Data/logs/yoho-fullsync
EXPOSE 8080
CMD exec java -Xmx$XMX -Xms$XMS -jar /opt/yoho-fullsync.jar
\ No newline at end of file
... ...
#!/bin/bash
# cd $1 :where is the jenkins workspace
# 需要维护以下的信息 :
#################################################################
#项目类型:Springboot
#git路径:git@git.yoho.cn:datasync/yoho-datasync-fullsync.git
#打包脚本:mvn clean package -DskipTests
#打包完成后存放路径:yoho-datasync-fullsync/target/yoho-fullsync.jar*.jar
#启动的脚本 java -jar yoho-fullsync.jar
#运行的预计内存:2000M
#访问的端口:8080
#日志的路径: /Data/logs/yoho-fullsync
#健康检查标识(需要返回200):localhost:8080/actuator/health
#################################################################
cd $1
mvn clean package -DskipTests
\ No newline at end of file
... ...
... ... @@ -3,12 +3,6 @@
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>
<packaging>pom</packaging>
<modules>
<module>starter</module>
<module>dal</module>
<module>service</module>
<module>common</module>
</modules>
<groupId>com.yoho.datasync.fullsync</groupId>
<artifactId>yoho-datasync-fullsync</artifactId>
<version>0.0.1-SNAPSHOT</version>
... ... @@ -35,7 +29,6 @@
<version>5.1.30</version>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid</artifactId>
... ... @@ -44,6 +37,11 @@
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
... ... @@ -101,14 +99,11 @@
</dependencies>
</dependencyManagement>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
<modules>
<module>starter</module>
<module>dal</module>
<module>service</module>
<module>common</module>
</modules>
</project>
... ...
... ... @@ -27,6 +27,11 @@
<dependency>
<groupId>com.yoho.datasync.fullsync</groupId>
<artifactId>yoho-datasync-fullsync-common</artifactId>
</dependency>
<dependency>
<groupId>com.yoho.datasync.fullsync</groupId>
<artifactId>yoho-datasync-fullsync-dal</artifactId>
</dependency>
... ... @@ -36,5 +41,25 @@
</dependency>
</dependencies>
<build>
<finalName>yoho-fullsync</finalName>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
<configuration>
<mainClass>com.yoho.datasync.fullsync.starter.YohoFullsyncApplication</mainClass>
</configuration>
</plugin>
</plugins>
</build>
</project>
\ No newline at end of file
... ...
... ... @@ -82,7 +82,7 @@ public class DataSourceConfig {
dataSource.setPassword(passWord);// 密码
dataSource.setInitialSize(initialSize);
dataSource.setMaxActive(maxTotal);
dataSource.setMaxIdle(maxIdle);
// dataSource.setMaxIdle(maxIdle);
dataSource.setMinIdle(minIdle);
dataSource.setQueryTimeout(defaultQueryTimeout);
dataSource.setTestWhileIdle(testWhileIdle);
... ...
rabbitmq:
server: "192.168.102.216"
port: 5672
username: "admin1"
password: "123qwe"
exchange: "yoho_datasync"
virtualHost: "/datasync"
spring:
datasource:
primary:
... ...
rabbitmq:
server: "192.168.102.216"
port: 5672
username: "admin1"
password: "123qwe"
exchange: "yoho_datasync"
virtualHost: "/datasync"
spring:
datasource:
url: jdbc:mysql://192.168.102.219:3306/yh_pcms?useUnicode=true&amp;characterEncoding=UTF-8
... ...
rabbitmq:
server: "192.168.102.216"
port: 5672
username: "admin1"
password: "123qwe"
exchange: "yoho_datasync"
virtualHost: "/datasync"
spring:
datasource:
url: jdbc:mysql://192.168.102.219:3306/yh_pcms?useUnicode=true&amp;characterEncoding=UTF-8
username: yh_test
password: 9nm0icOwt6bMHjMusIfMLw==
driver-class-name: com.mysql.jdbc.Driver
primary:
url: jdbc:mysql://192.168.102.219:3306/yh_grass?useUnicode=true&amp;characterEncoding=UTF-8
username: yh_test
password: 9nm0icOwt6bMHjMusIfMLw==
driver-class-name: com.mysql.jdbc.Driver
secondary:
url: jdbc:mysql://192.168.102.219:3306/yh_pcms?useUnicode=true&amp;characterEncoding=UTF-8
username: yh_test
password: 9nm0icOwt6bMHjMusIfMLw==
driver-class-name: com.mysql.jdbc.Driver
... ...
spring:
profiles:
active: dev
jpa:
show-sql: true
properties:
hibernate:
enable_lazy_load_no_trans: true
server:
servlet:
context-path:
/fullsync
port: 8080
\ No newline at end of file
... ...
rabbitmq:
server: "192.168.102.216"
port: 5672
username: "admin1"
password: "123qwe"
exchange: "yoho_datasync"
virtualHost: "/datasync"
spring:
datasource:
primary:
... ...
rabbitmq:
server: "192.168.102.216"
port: 5672
username: "admin1"
password: "123qwe"
exchange: "yoho_datasync"
virtualHost: "/datasync"
spring:
datasource:
url: jdbc:mysql://192.168.102.219:3306/yh_pcms?useUnicode=true&amp;characterEncoding=UTF-8
... ...
rabbitmq:
server: "192.168.102.216"
port: 5672
username: "admin1"
password: "123qwe"
exchange: "yoho_datasync"
virtualHost: "/datasync"
spring:
datasource:
url: jdbc:mysql://192.168.102.219:3306/yh_pcms?useUnicode=true&amp;characterEncoding=UTF-8
... ...