Files
biz_supplier_manage/src/main/resources/application-test.yml
2021-01-27 15:48:16 +08:00

223 lines
8.8 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

server:
port: 18012
servlet:
context-path: /
# --------------seata ------------
seata:
enabled: true
application-id: ${spring.application.name}
tx-service-group: ${spring.application.name}-group
enable-auto-data-source-proxy: true
use-jdk-proxy: false
service:
vgroup-mapping:
default: default
enable-degrade: false
disable-global-transaction: false
registry:
type: eureka
eureka:
weight: 1
service-url: http://${eureka.instance.hostname}:8761/eureka/
spring:
aop:
auto: true #开启spring的aop配置
proxy-target-class: true
application:
name: biz-service-ebtp-project
shardingsphere:
datasource:
# names: ds0,ds1 #主从库名称 开启主从时必须打开
names: ds0
ds0:
type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
username: mall3-ebtp-dev
password: mall3-ebtp-dev
jdbc-url: jdbc:mysql://125.32.114.204:13306/ebtp_mall_project?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true
url: jdbc:mysql://125.32.114.204:13306/ebtp_mall_project?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true
filters: stat,wall,log4j
maxActive: 20
initialSize: 1
maxWait: 60000
minIdle: 1
timeBetweenEvictionRunsMillis: 60000
minEvictableIdleTimeMillis: 300000
validationQuery: select 'x'
testWhileIdle: true
testOnBorrow: false
testOnReturn: false
poolPreparedStatements: true
maxOpenPreparedStatements: 20
connection-properties: druid.stat.merggSql=ture;druid.stat.slowSqlMillis=5000
# ds1:
# type: com.alibaba.druid.pool.DruidDataSource
# driver-class-name: com.mysql.jdbc.Driver
# username: root
# password: root
# jdbc-url: jdbc:mysql://localhost:3306/seata_order_1?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=UTC
# url: jdbc:mysql://localhost:3306/seata_order_1?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=UTC
# filters: stat,wall,log4j
# maxActive: 20
# initialSize: 1
# maxWait: 60000
# minIdle: 1
# timeBetweenEvictionRunsMillis: 60000
# minEvictableIdleTimeMillis: 300000
# validationQuery: select 'x'
# testWhileIdle: true
# testOnBorrow: false
# testOnReturn: false
# poolPreparedStatements: true
# maxOpenPreparedStatements: 20
# connection-properties: druid.stat.merggSql=ture;druid.stat.slowSqlMillis=5000
# masterslave: #读写分离设置
# load-balance-algorithm-type: round_robin #轮询策略
# master-data-source-name: ds0 #主库名称
# slave-data-source-names: ds1 #从库名称
# name: shardingDataSource #数据源名称
props:
sql:
show: true
jackson:
date-format: yyyy-MM-dd HH:mm:ss
time-zone: GMT+8
serialization:
write-dates-as-timestamps: false
kafka:
bootstrap-servers: 127.0.0.1:9092
producer:
# 写入失败时重试次数。当leader节点失效一个repli节点会替代成为leader节点此时可能出现写入失败
# 当retris为0时produce不会重复。retirs重发此时repli节点完全成为leader节点不会产生消息丢失。
retries: 0
# 每次批量发送消息的数量,produce积累到一定数据一次发送
batch-size: 2
# produce积累数据一次发送缓存大小达到buffer.memory就发送数据
buffer-memory: 33554432
#procedure要求leader在考虑完成请求之前收到的确认数用于控制发送记录在服务端的持久化其值可以为如下
#acks = 0 如果设置为零,则生产者将不会等待来自服务器的任何确认,该记录将立即添加到套接字缓冲区并视为已发送。在这种情况下,无法保证服务器已收到记录,并且重试配置将不会生效(因为客户端通常不会知道任何故障),为每条记录返回的偏移量始终设置为-1。
#acks = 1 这意味着leader会将记录写入其本地日志但无需等待所有副本服务器的完全确认即可做出回应在这种情况下如果leader在确认记录后立即失败但在将数据复制到所有的副本服务器之前则记录将会丢失。
#acks = all 这意味着leader将等待完整的同步副本集以确认记录这保证了只要至少一个同步副本服务器仍然存活记录就不会丢失这是最强有力的保证这相当于acks = -1的设置。
#可以设置的值为all, -1, 0, 1
acks: 1
key-serializer: org.apache.kafka.common.serialization.StringSerializer
value-serializer: org.apache.kafka.common.serialization.StringSerializer
consumer:
group-id: user-group
auto-offset-reset: earliest
enable-auto-commit: true
auto-commit-interval: 100
key-deserializer: org.apache.kafka.common.serialization.StringDeserializer
value-deserializer: org.apache.kafka.common.serialization.StringDeserializer
#=========redis基础配置=========
redis:
lettuce:
# jedis:
pool:
maxTotal: 50
minIdle: 1
maxWaitMillis: 5000
maxIdle: 5
testOnBorrow: true
testOnReturn: true
testWhileIdle: true
token:
database: 0
host: 125.32.114.204
port: 16379
password: redis@CC1234
timeout: 6000
uuid:
database: 1
host: 125.32.114.204
port: 16379
password: redis@CC1234
timeout: 6000
cache:
database: 2
host: 125.32.114.204
port: 16379
password: redis@CC1234
timeout: 6000
#=========eureka配置=========
eureka:
instance:
# eureka 注册路径地址
prefer-ip-address: true
hostname: 125.32.114.204
ip-address: ${eureka.instance.hostname}
instance-id: ${eureka.instance.hostname}:${server.port}
client:
serviceUrl:
defaultZone: http://${eureka.instance.hostname}:8761/eureka/
#=========log配置=========
#logging:
# level:
# org.springframework.cloud.alibaba.seata.web : info
# io.seata : info
mybatis-plus:
configuration:
# 是否开启自动驼峰命名规则映射:从数据库列名到Java属性驼峰命名的类似映射
map-underscore-to-camel-case: true
auto-mapping-behavior: full
# 这个配置会将执行的sql打印出来在开发或测试的时候可以用
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
mapper-locations: classpath*:com/chinaunicom/mall/ebtp/**/mapper/*Mapper.xml
global-config:
# 逻辑删除配置
db-config:
# logic-delete-field: flag # 全局逻辑删除的实体字段名(since 3.3.0,配置后可以忽略不配置步骤2) @TableLogic
logic-not-delete-value: normal # 逻辑删除标记:正常数据
logic-delete-value: deleted # 逻辑删除标记:已删除的数据
type-aliases-package: com.chinaunicom.mall.ebtp.project
# --------------feign ------------
feign:
hystrix:
enabled: true
httpclient:
enabled: true
okhttp:
enabled: true
client:
config:
default:
connect-timeout: 60000
read-timeout: 60000
hystrix:
command:
default:
execution:
timeout:
enabled: true
isolation:
strategy: SEMAPHORE
thread:
timeoutInMilliseconds: 200000 #熔断超时时间
circuitBreaker:
sleepWindowInMilliseconds: 20000
forceClosed: true
ribbon:
ReadTimeout: 60000 #请求处理的超时时间
ConnectTimeout: 60000 #请求连接超时时间
MaxAutoRetries: 0 #对当前实例的重试次数
MaxAutoRetriesNextServer: 1 #切换实例的重试次数 1
mconfig:
swagger-ui-open: true
exception-handle-enabled: true
seata-open-enabled: false
work-id: 1 #终端ID
datacenter-id: 1 #数据中心ID
host-name: http://${eureka.instance.hostname}
service-name-purp: mall-purp #采购系统委托项目微服务
service-name-wfap: wfap #重新评审 流程微服务
wfSectionNo: '001'
wfSectionName: 采购方案审批