sqlserver yml配置文件

server:
  port: XXXX
  servlet:
    context-path: /share
spring:
  application:
    name: share
  datasource:
    url: jdbc:sqlserver://数据库ip:端口号;DatabaseName=数据库名
    username: 用户名
    password: 密码
    driver-class:  com.microsoft.sqlserver.jdbc.SQLServerDriver
    name: datasource
    type: com.alibaba.druid.pool.DruidDataSource
    druid:
      initial-size: 10
      max-active: 100
      max-wait: 60000
      min-idle: 10
      validation-query: SELECT 1
      test-on-borrow: false
      test-on-return: false
      min-evictable-idle-time-millis: 300000
      test-while-idle: true
      time-between-eviction-runs-millis: 30000
      max-pool-prepared-statement-per-connection-size: 20
      pool-prepared-statements: true
      max-open-prepared-statements: 20
  data:
    mongodb:
      uri: mongodb://mongodbip:端口号/mongodb
  servlet:
    multipart:
      max-file-size: 100MB
      max-request-size: 100MB
  redis:
    host: 10.0.2.86
    port: 6379
  main:
    allow-bean-definition-overriding: true
  jackson:
    date-format: yyyy-MM-dd
    time-zone: GMT+8
    serialization:
      write-dates-as-timestamps: false
pagehelper:
  reasonable: true
  support-methods-arguments: true
  page-size-zero: true
mybatis:
  mapper-locations: classpath:mapper/*.xml
  type-aliases-package: com.graphsafe.api.model.share.po
  configuration:
      log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
eureka:
  client:
    registerWithEureka: true #服务注册开关
    fetchRegistry: true #服务发现开关
    serviceUrl: #Eureka客户端与Eureka服务端进行交互的地址,多个中间用逗号分隔
      defaultZone: ${EUREKA_SERVER:http://localhost:8073/eureka/}
  instance:
    prefer-ip-address:  true  #将自己的ip地址注册到Eureka服务中
    ip-address: ${IP_ADDRESS:127.0.0.1}
    instance-id: ${spring.application.name}:${server.port} #指定实例id
ribbon:
  MaxAutoRetries: 2 #最大重试次数,当Eureka中可以找到服务,但是服务连不上时将会重试,如果eureka中找不到服务则直接走断路器
  MaxAutoRetriesNextServer: 3 #切换实例的重试次数
  OkToRetryOnAllOperations: false  #对所有操作请求都进行重试,如果是get则可以,如果是post,put等操作没有实现幂等的情况下是很危险的,所以设置为false
  ConnectTimeout: 5000  #请求连接的超时时间
  ReadTimeout: 6000 #请求处理的超时时间
logging:
  level:
    com.share.mapper: debug
  • 4
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值