application-goods9300.yaml 1.8 KB
Newer Older
Q
qinyingjie 已提交
1 2 3 4 5 6 7 8
#兼容swagger配置
spring:
  # mysql
  datasource:
    driver-class-name: com.mysql.cj.jdbc.Driver
    url: jdbc:mysql://localhost:3306/kwan?useSSL=false&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
    username: root
    password: 716288qwe
Q
qinyingjie 已提交
9 10
  application:
    name: goods-service #服务名称
Q
qinyingjie 已提交
11 12 13 14 15
  zipkin:
    base-url: http://localhost:9411 #zipkin地址 默认值就是0.1,代表收集10%的请求追踪信息。
  sleuth:
    sampler:
      percentage: 0.1 #收集百分比
Q
qinyingjie 已提交
16 17 18 19 20

#服务提供者
eureka:
  client:
    service-url:
Q
qinyingjie 已提交
21
      defaultZone: http://eureka8767:8767/eureka/,http://eureka8768:8768/eureka/,http://eureka8769:8769/eureka/
Q
qinyingjie 已提交
22 23 24 25 26
  instance:
    lease-renewal-interval-in-seconds: 2 #每间隔2s,向服务端发送一次心跳,证明自己依然"存活”
    lease-expiration-duration-in-seconds: 10 #告诉服务端,如果我10s之内没有给你发心跳,就代表我故障了,将我踢出掉
    prefer-ip-address: true #告诉服务端,服务实例以IP作为链接,而不是取机器名
    instance-id: springcloud-service-goods-9300 #告诉服务端,服务实例的id,id要是唯一的
Q
qinyingjie 已提交
27 28 29 30 31

management:
  endpoints:
    web:
      base-path: /actuator  #修改访问路径  2.0之前默认是/   2.0默认是 /actuator  可以通过这个属性值修改
Q
qinyingjie 已提交
32 33
      exposure:
        include: "*"
Q
qinyingjie 已提交
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51

#mybatis-plus配置
mybatis-plus:
  configuration:
    map-underscore-to-camel-case: true
    call-setters-on-nulls: true
    auto-mapping-behavior: full
    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
  mapper-locations: classpath*:mapper/**/*Mapper.xml
  global-config:
    banner: false
    # 逻辑删除配置
    db-config:
      id-type: AUTO
      logic-delete-field: delFlag
      logic-delete-value: 1
      logic-not-delete-value: 0
      table-underline: true