server:
  port: 8090
spring:
  datasource:
    url: jdbc:mysql://${MYSQL_HOST:localhost}:${MYSQL_PORT:3306}/microservice-auth?useUnicode=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC&characterEncoding=UTF-8
    username: ${MYSQL_USERNAME:root}
    password: ${MYSQL_PASSWORD:11}
    type: com.zaxxer.hikari.HikariDataSource
    driver-class-name: com.mysql.jdbc.Driver
  redis:
    host: ${REDIS_HOST:localhost}
    port: ${REDIS_PORT:6379}
  rabbitmq:
    host: ${RABBIT_HOST:localhost}
    port: ${RABBIT_PORT:5672}
    username: ${RABBITMQ_DEFAULT_USER:guest}
    password: ${RABBITMQ_DEFAULT_PASS:guest}
  boot:
    admin:
      client:
        url: http://${ADMIN_HOST:localhost}:${ADMIN_PORT:8085}/admin
        username: ${ADMIN_USERNAME:admin}
        password: ${ADMIN_PASSWORD:11}
        instance:
          service-base-url: http://${AUTH_SERVICE_HOST:localhost}:${server.port}
  # sleuth 配置
  sleuth:
    web:
      client:
        enabled: true
    sampler:
      probability: 1.0 # 采样比例为: 0.1(即10%),设置的值介于0.0到1.0之间，1.0则表示全部采集。
  # zipkin 配置
  zipkin:
    base-url: http://${ZIPKIN_HOST:localhost}:${ZIPKIN_PORT:9411}  # 指定了Zipkin服务器的地址

feign:
  hystrix:
    enabled:  true

# hystrix配置
hystrix:
  shareSecurityContext: true
  command:
    default:
      execution:
        isolation:
          thread:
            timeoutInMilliseconds: 60000

management:
  endpoints:
    web:
      exposure:
        include: "*"
  endpoint:
    health:
      show-details: ALWAYS

# mybatis配置
mybatis:
  type-aliases-package: com.github.tangyi.auth.api.module
  configuration:
    # 驼峰转换
    map-underscore-to-camel-case: true
    # 延迟加载
    lazy-loading-enabled: true
  mapper-locations: classpath:mapper/*.xml
pagehelper:
  helperDialect: mysql
  reasonable: true
  supportMethodsArguments: true
  params: count=countSql

ignore:
  urls:
    - /
    - /error
    - /favicon.ico
    - /**/*swagger*/**
    - /v2/api-docs
    - /csrf
    - /actuator/**
    - /hystrix.sender
    - /v1/user/findUserByUsername/**
    - /v1/user/checkExist/**
    - /v1/menu/findMenuByRole/**
    - /v1/menu/findAllMenu
    - /v1/code/**
    - /v1/attachment/download
    - /v1/log/**
    - /authentication/**
    - /**/*.css
    - /**/*.js
    - /social
    - /signin
    - /signup
    - /info
    - /health
    - /metrics/**
    - /loggers/**
    - /mobile/token

# 集群ID生成配置
cluster:
  workId: ${CLUSTER_WORKID:1}
  dataCenterId: ${CLUSTER_DATA_CENTER_ID:1}

# 系统配置
sys:
  adminUser: ${ADMIN_USER:admin}  # 管理员账号，默认是admin

logging:
  level:
    root: info
    com.github.tangyi: debug