application.yaml 1.6 KB
Newer Older
Q
qinyingjie 已提交
1 2
#端口号
server:
Q
qinyingjie 已提交
3
  port: 9300
Q
qinyingjie 已提交
4 5 6 7 8 9 10 11 12

#兼容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 已提交
13 14 15 16 17 18 19
  application:
    name: goods-service #服务名称

#服务提供者
eureka:
  client:
    service-url:
Q
qinyingjie 已提交
20
      defaultZone: http://eureka8767:8767/eureka/,http://eureka8768:8768/eureka/,http://eureka8769:8769/eureka/
Q
qinyingjie 已提交
21 22 23 24 25
  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 已提交
26 27 28 29 30

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

#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