application.yml 1.3 KB
# application.yml — 小羚羊 ERP 后端主配置。
# 端口 / 数据源 / MyBatis-Plus / Flyway / JWT。
# 敏感值(DB 凭据 / JWT 密钥)通过环境变量注入,单一来源为仓库根 config-vars.yaml,
# 由工具脚本 / 部署环境导出为下列 env,禁止硬编码进源码。
server:
  port: ${BACKEND_HTTP_PORT:5172}

spring:
  application:
    name: xly-erp-backend
  datasource:
    driver-class-name: com.mysql.cj.jdbc.Driver
    url: jdbc:mysql://${DB_HOST:118.178.19.35}:${DB_PORT:3318}/${DB_SCHEMA:xlyweberp_vibe_erp_test}?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai&useSSL=false&allowPublicKeyRetrieval=true
    username: ${DB_USER:xlyprint}
    password: ${DB_PASSWORD:xlyXLYprint2016}
  flyway:
    enabled: true
    locations: filesystem:../sql/migrations
    baseline-on-migrate: true
    table: flyway_schema_history

mybatis-plus:
  configuration:
    map-underscore-to-camel-case: false
  global-config:
    db-config:
      id-type: auto

# JWT 配置:密钥单一来源 config-vars.yaml secrets.jwt_secret,通过 env 注入。
jwt:
  secret: ${JWT_SECRET:a3b7e8f1c4d6029e5b8f37a1c9d2e4068b5f1d3a7c0e9b2f48d6a1c5e7f9b3d2}
  # 过期时间(毫秒),默认 12 小时
  expire-millis: ${JWT_EXPIRE_MILLIS:43200000}

logging:
  level:
    com.xly.erp: INFO