From 93664a6a277ccacdc5d5ae55119a1db3b7336029 Mon Sep 17 00:00:00 2001 From: walker_sheng Date: Wed, 29 Jun 2022 17:09:32 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0local-test?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile-local-test | 10 ++++++++++ src/main/resources/application.yml | 27 +++++++++++++++++++++++++-- 2 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 Dockerfile-local-test diff --git a/Dockerfile-local-test b/Dockerfile-local-test new file mode 100644 index 000000000..4f585f194 --- /dev/null +++ b/Dockerfile-local-test @@ -0,0 +1,10 @@ +FROM openjdk:11 + +ADD target/rtss-0.0.1-SNAPSHOT.jar app.jar + +EXPOSE 9000 19000/tcp + +ENV TZ=Asia/Shanghai +RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone + +CMD java -jar -Dfile.encoding=UTF-8 -Dspring.profiles.active=local-test /app.jar diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index d42397f18..7c615a4fe 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -5,7 +5,7 @@ modbus-tcp: port: 19000 udp: - serverPort: 20000 + serverPort: 20002 clientPort: 20001 spring: @@ -95,7 +95,7 @@ springfox: spring: profiles: dev datasource: - url: jdbc:mysql://localhost:3306/joylink?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai + url: jdbc:mysql://localhost:3306/joylink?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true username: root password: root @@ -136,6 +136,29 @@ logging: common: env: test +--- +spring: + profiles: local-test + datasource: + url: jdbc:mysql://192.168.0.22:3306/joylink?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai + username: root + password: joylink0503 + +wechat: + wx-api-url: https://open.weixin.qq.com/connect/oauth2/authorize?appid=${wechat.app-id}&redirect_uri=https://test.joylink.club/wx/%s&response_type=code&scope=snsapi_base&state=%s#wechat_redirect + wx-module-url: https://joylink.club/jlwxs +tencent-cloud: + allow-send: false + +logging: + file: + path: /usr/local/joylink/logs/rtss + level: + club.joylink.rtss: INFO + +common: + env: test + --- spring: profiles: prd