##### 公共 配置 #######

#内置Tomcat容器配置
server:
  port: 26010
  servlet:
    #应用路径，配置应用路径，可方便进行反向代理
    context-path: /api_dapp
#基础配置
spring:
  profiles:
    active: dev #${BASE_ADMIN:prod} #选择配置分支，先读取系统环境变量，如果没有则默认值为 prod
  application:
    name: base-admin

  #修改thymeleaf访问根路径
  thymeleaf:
    prefix: classpath:/view/
    cache: false

  #mvc接收参数时对日期进行格式化
  mvc:
    servlet:
      load-on-startup: 100
    format:
      date: yyyy-MM-dd HH:mm:ss

  #jackson对响应回去的日期参数进行格式化
  jackson:
    date-format: yyyy-MM-dd HH:mm:ss
    time-zone: GMT+8

  #打印SQL
  jpa:
    show-sql: true


# token 参数
jwt:
  secret: 123456      # 密钥
  expiration: 7200000   # 过期时间
  token: Authorization  # 请求头


---
##### dev 配置 #######
spring:
  config:
    activate:
      on-profile: dev

  #数据库配置
  datasource:
    url: jdbc:mysql://42.192.165.168:3306/dawa?useSSL=false&serverTimezone=GMT%2B8&characterEncoding=utf-8
    username: root
    password: 9ab8fad748dead93
    driver-class-name: com.mysql.cj.jdbc.Driver
    hikari:
      minimum-idle: 5
      maximum-pool-size: 15
      auto-commit: true
      idle-timeout: 30000
      max-lifetime: 120000
      connection-timeout: 30000
      connection-test-query: SELECT 1

  redis:
    host: 42.192.165.168
    port: 6379
    password: abc123456abc-test
    data: #工程中只是把redis作为缓存,并未使用redis作为数据持久化存储源repository使用.
      redis:
        repositories:
          enabled: false

#是否需要输入验证码
captcha:
  enable: false

# 瓦达项目url
meta-pal:
  url: https://lionworld.metestsvr.com/marketserver/game

---
##### prod 配置 #######
spring:
  config:
    activate:
      on-profile: prod

  #数据库配置
  datasource:
    url: jdbc:mysql://localhost:3306/dawa?serverTimezone=GMT%2B8&characterEncoding=utf-8
    username:
    password:
    driver-class-name: com.mysql.cj.jdbc.Driver
    hikari:
      minimum-idle: 5
      maximum-pool-size: 15
      auto-commit: true
      idle-timeout: 30000
      max-lifetime: 120000
      connection-timeout: 30000
      connection-test-query: SELECT 1

  redis:
    host: 127.0.0.1
    port: 6379
    password:
  data: #工程中只是把redis作为缓存,并未使用redis作为数据持久化存储源repository使用.
    redis:
      repositories:
        enabled: false

#是否需要输入验证码
captcha:
  enable: true

# 瓦达项目url
meta-pal:
  url:

