server:
  port: 80

spring:
  application:
    name: SERVICE-PAYMENT
  datasource:
    driver-class-name: com.mysql.cj.jdbc.Driver
    url: jdbc:mysql://192.168.0.10:3306/home_teacher?serverTimezone=UTC&characterEncoding=utf8&useUnicode=true&useSSL=false
    username: root
    password: FXI@gi^l
    hikari:
      connection-test-query: SELECT 1
      connection-timeout: 60000
      idle-timeout: 500000
      max-lifetime: 540000
      maximum-pool-size: 20
      minimum-idle: 10
      pool-name: XunWangHikariPool
  redis:
    host: 127.0.0.1
    port: 6379
    database: 0
    timeout: 1800000
    lettuce:
      pool:
        max-active: 20
        max-idle: 8
        min-idle: 0
        max-wait: -1
  cloud:
    nacos:
      discovery:
        server-addr: 127.0.0.1:8848

    #使用服务发现路由
    gateway:
      discovery:
        locator:
          enabled: true
      routes:
        - id: SERVICE-PAYMENT
          uri: lb://SERVICE-PAYMENT
          predicates:
            - Path=/payment/**

        - id: SERVICE-UCENTER
          uri: lb://SERVICE-UCENTER
          predicates:
            - Path=/ucenter/** # 路径匹配

        - id: SERVICE-EDUCATION
          uri: lb://SERVICE-EDUCATION
          predicates:
            - Path=/education/**

        - id: SERVICE-FILE
          uri: lb://SERVICE-FILE
          predicates:
            - Path=/file/**

mybatis-plus:
  global-config:
    db-config:
      logic-delete-value: 1
      logic-not-delete-value: 0
  mapper-locations: classpath:com/xunwang/payment/mapper/xml/*.xml
  type-aliases-package: com.xunwang.payment.entity
  configuration:
    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl

# 自定义注解：是否开启swagger
swagger:
  enable: true

knife4j:
  enable: true
  production: false  # 开启屏蔽文档资源

feign:
  client:
    config:
      default:
        connectTimeout: 10000
        readTimeout: 600000



