
# 项目相关配置
project:
  # 名称
  name: idp
  # 版本
  version: 1.0.0
  # 版权年份
  copyrightYear: 2026
  # 文件路径 示例（ Windows配置D:/portal/uploadPath，Linux配置 /home/portal/uploadPath）
  profile: D:/portal/uploadPath
  # 获取ip地址开关
  addressEnabled: false
  # 验证码类型 math 数字计算 char 字符验证
  captchaType: math
server:
  port: 8082
spring:
  # 资源信息
  messages:
    # 国际化资源文件路径
    basename: i18n/messages
  datasource:
    url: jdbc:mysql://localhost:3306/platform?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例
    username: lingniu
    password: Lingniu2026!
    driver-class-name: com.mysql.cj.jdbc.Driver
    hikari:
      # 连接池名称
      pool-name: MyHikariCP
      # 最大连接数，默认为10
      maximum-pool-size: 10
      # 最小空闲连接数
      minimum-idle: 5
      # 连接空闲超时时间（毫秒），默认10分钟
      idle-timeout: 600000
      # 连接最大生命周期（毫秒），默认30分钟
      max-lifetime: 1800000
      # 连接超时时间（毫秒），默认30秒
      connection-timeout: 30000
      # 自动提交事务，默认为true
      auto-commit: true

# MyBatis Plus配置
mybatis-plus:
  mapper-locations: classpath:mapper/**/*.xml
  type-aliases-package: org.lingniu.idp.model.**
  configuration:
    map-underscore-to-camel-case: true

logging:
  level:
    root: info
    org.springframework.web: info
    org.springframework.security: debug
    org.springframework.security.oauth2: debug
# token配置
token:
  # 令牌自定义标识
  header: Idp
  accessToken:
    # access token令牌有效期（默认30分钟）单位分钟
    expireTime: 30
    # refresh token 令牌有效期（默认7天）单位小时
  refreshToken:
    expireTime: 168
# 用户配置
user:
  password:
    # 密码最大错误次数
    maxRetryCount: 5
    # 密码锁定时间（默认10分钟）
    lockTime: 10
idp:
  jwt:
    header: Authorization
    prefix: "Bearer "
    expiration: 1h
    refresh-expiration: 7d
    rsa:
      algorithm: RSA
      key-size: 2048
      # 方式1：直接配置密钥内容（适合短的密钥或环境变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KEUzhlV6QaVBLqr4M0HEyLB2FztfPLSbKnD52VKJ3dV4bELnykD7XHG8q6d4pQKBgQCD1VK1UF/rf7KY0RHV6fqMpfHbACWLtIyOfLFnlh90MCtlpycPNy+Pxql9TVjHccp+kLn6ZWuVna6yP8+vmebiH1OwqRtbNf3NFNOEhDyUKZOcw9ORY17FENoIJPgVbU84wXgCdGRSnQXou6kZhzjr99Ve67N/w6ewkxHACfHwsQKBgHuXOO3TP5UkCKJc2VdFUm6az/35z3bnBDK9FdHrkii1Av6Qak+fKdxq8TP4nLpY8BzxM8tzNgfautGdytI41TeSW4NI3cY08JzPSdzU0SOMkuuCKt8Du4zgyQ6G9uwulp/Ox5Jf/rdyUjjQp7tKIzWng9QjcarihZq2YQtH81+hAoGADWhSLTU9Dt9XM82Yc0WC4Rl0EwPV+mH32CDKC8xIVMTGodc0JyKIyoykpml2U827PIHhxms4CoXTzxcBaxt3dAfezqvmSzrMW2LA3Xi7pIGJqNtk16wb38XrLqxZZGYA1DWUqMvp/GniM7qTSF7aHzjHzX4ZXL6jmi3tqJtivfw=
        -----END PRIVATE KEY-----
      public-key: |
        -----BEGIN PUBLIC KEY-----
        MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvCC5TeqEEePTkDQMdgpk073/jX6Z4iq66zkmbjsxw3ugWMXoTdsC3lGfbQQoMQQcuwt9an8zbRAcql93NMACIMAn6FAN9+IYymUyHAWXIYZVPKwlCo8KfV5aPS5bS9Hw/m59vTfOUMa3JRX4luueoVxY5e/xOvwo5CYi3DHKj5fbAZ693qLCBQWtp3BIy4ErqHPutlJrmSvKhubsro1BCuIodRjICxRE7GPoHwqxDIachwE3gOoXbEMx9IUHRTJ81MgEDS4nesk4Pr1orkqmkR1y1aDkNSHe4Pai0us+V6tkIL8YRIo8lOnX69xTdnzLPNXdkJ3pQflwJm2XDW0o4QIDAQAB
        -----END PUBLIC KEY-----