XuqmGroup-Server/push-service/src/main/resources/application.yml
XuqmGroup a1f231ae10 fix(push): 改 ddl-auto 为 none,解决自定义迁移与 Hibernate 验证的启动顺序冲突
Hibernate validate 在 ApplicationReadyEvent 之前执行,
PushSchemaMigrationService 在 ApplicationReadyEvent 触发,导致每次
新增实体字段时服务启动失败(502)。
改为 none 后由 PushSchemaMigrationService 负责所有 DDL 变更。

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-26 12:58:53 +08:00

54 行
1.7 KiB
YAML

server:
port: 8083
spring:
application:
name: push-service
datasource:
url: ${SPRING_DATASOURCE_URL:jdbc:mysql://39.107.53.187:3306/xuqm_push?useUnicode=true&characterEncoding=utf8&useSSL=true&serverTimezone=GMT%2B8&allowPublicKeyRetrieval=true}
username: ${SPRING_DATASOURCE_USERNAME:xuqm}
password: ${SPRING_DATASOURCE_PASSWORD:Xuqm@2026}
driver-class-name: com.mysql.cj.jdbc.Driver
hikari:
minimum-idle: 5
maximum-pool-size: 20
connection-timeout: 30000
idle-timeout: 300000
max-lifetime: 900000
jpa:
hibernate:
ddl-auto: none
show-sql: false
flyway:
enabled: true
baseline-on-migrate: true
baseline-version: 0
validate-on-migrate: false
locations: classpath:db/migration
table: flyway_history_push
jwt:
secret: ${XUQM_JWT_SECRET:xuqm-tenant-service-secret-key-must-be-at-least-256-bits-long-for-hmac}
expiration: 3153600000000
push:
internal-token: ${SDK_INTERNAL_TOKEN:xuqm-internal-token}
huawei:
app-id: ${HUAWEI_APP_ID:}
app-secret: ${HUAWEI_APP_SECRET:}
token-url: https://oauth-login.cloud.huawei.com/oauth2/v3/token
push-url: https://push-api.cloud.huawei.com/v1/{appId}/messages:send
xiaomi:
app-secret: ${XIAOMI_APP_SECRET:}
push-url: https://api.xmpush.xiaomi.com/v3/message/regid
apns:
team-id: ${APNS_TEAM_ID:}
key-id: ${APNS_KEY_ID:}
bundle-id: ${APNS_BUNDLE_ID:}
private-key: ${APNS_PRIVATE_KEY:}
production: false
push-url: https://api.push.apple.com/3/device/{token}
sandbox-push-url: https://api.sandbox.push.apple.com/3/device/{token}
tenant-service-base-url: ${TENANT_SERVICE_BASE_URL:http://tenant-service:9001}