no message

This commit is contained in:
2025-09-11 18:38:19 +08:00
parent 402b372771
commit c969b650f5
5 changed files with 23 additions and 67 deletions

1
Jenkinsfile vendored
View File

@ -69,6 +69,7 @@ pipeline {
-e JAVA_OPTS="-Xms256m -Xmx512m -Duser.timezone=Asia/Shanghai" \
-e TZ=Asia/Shanghai \
-v /etc/localtime:/etc/localtime:ro \
-v /sczx/logs/sync:/sczx/logs/sync:rw \
--restart always \
\${DOCKER_IMAGE}
"""

View File

@ -127,6 +127,11 @@
<version>8.0.33</version>
</dependency>
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
</dependency>
<!-- swagger2 -->
<dependency>
<groupId>io.springfox</groupId>

View File

@ -1,69 +1,4 @@
server:
port: 8016
spring:
application:
name: sczx-sync # 微服务名称
http:
encoding:
charset: UTF-8
enabled: true
force: true
mvc:
async:
request-timeout: -1
jackson:
date-format: yyyy-MM-dd HH:mm:ss
time-zone: GMT+8
cloud:
nacos:
discovery:
server-addr: 115.190.8.52:8848 # Nacos 地址
group: DEFAULT_GROUP
metadata:
version: 1.0.0
env: dev
lifecycle:
timeout-per-shutdown-phase: 30s # 设置优雅停机时间
datasource:
url: jdbc:mysql://115.190.8.52:3306/sczx?useSSL=false&serverTimezone=UTC&allowPublicKeyRetrieval=true
username: sczx_user
password: Sczx123@
driver-class-name: com.mysql.cj.jdbc.Driver
hikari:
maximum-pool-size: 10
auto-commit: true
management:
endpoints:
web:
exposure:
include: "*" # 暴露所有监控端点
endpoint:
health:
show-details: always
mybatis-plus:
mapper-locations: classpath*:mapper/**/*.xml
type-aliases-package: com.sczx.sync.po # 实体类包路径
configuration:
mapUnderscoreToCamelCase: true
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl # 控制台打印 SQL调试用
# 第三方平台配置
third-party:
platform:
app-id: C202508001
access-token: 5DCCABD4641B40948B64F1B4B4D59DAC
api-url: https://sczx-zuche-datasync.de-wincle.cn/c2b
timeout: 30000
retry-times: 3
battery-platform:
appid: B202507001
access_token: 6E7C062AC581505438B64574BE7AD887
name: sczx-sync # 微服务名称

View File

@ -0,0 +1,15 @@
spring:
application:
name: sczx-sync # 应用名称,对应 Nacos 配置的 dataId
cloud:
nacos:
server-addr: 115.190.8.52:8848 # Nacos 服务器地址
config:
group: DEFAULT_GROUP # 配置分组
file-extension: yaml # 配置文件格式
timeout: 5000 # 配置读取超时时间
# 添加共享配置
shared-configs:
- data-id: shared-config.yaml
group: DEFAULT_GROUP
refresh: true # 是否支持动态刷新

View File

@ -4,7 +4,7 @@
<!--%d表示日期%X表示输出所有,:null表示为空时输出null%level表示日志级别 %thread表示线程名字 %c表示类名 %L表示行号 %n表示换行符-->
<property name="PATTERN"
value="%-12(%d{yyyy-MM-dd HH:mm:ss.SSS}) [%X{EagleEye-TraceID}%X{EagleEye-TraceID-Copy}] %level [%thread] %c[%L] %X{requestId} %msg%n"/>
<property name="LOG_FILE_PATH" value="./logs"/>
<property name="LOG_FILE_PATH" value="/sczx/logs/sync"/>
<appender name="STDOUT"
class="ch.qos.logback.core.ConsoleAppender">
<encoder>