Files
biz_service_ebtp_extend/src/main/resources/application-test.yml

187 lines
5.8 KiB
YAML
Raw Normal View History

server:
port: 18018
servlet:
context-path: /
2021-03-08 16:52:57 +08:00
seata:
service:
vgroup-mapping:
biz-service-ebtp-extend-service-group: default
grouplist:
default: 10.242.37.148:18035
#registry:
# type: eureka
# eureka:
# serviceUrl: http://10.242.37.148:5001/eureka,http://10.242.37.148:5002/eureka,http://10.242.37.148:5003/eureka
2021-02-22 18:55:29 +08:00
# 对应 apollo 配置中心的应用名
app:
id: biz-service-ebtp-extend
2021-03-08 16:52:57 +08:00
2021-02-22 18:55:29 +08:00
# Apollo 配置信息
apollo:
2021-03-08 16:52:57 +08:00
meta: http://10.242.37.148:6001/
2021-02-22 18:55:29 +08:00
bootstrap:
namespace: application
enabled: true
eagerLoad:
enabled: true
2021-03-08 16:52:57 +08:00
spring:
aop:
auto: true #开启spring的aop配置
proxy-target-class: true
2021-03-08 16:52:57 +08:00
application:
2021-03-08 16:52:57 +08:00
name: biz-service-ebtp-extend
shardingsphere:
datasource:
names: ds0
ds0:
type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
2021-04-08 09:14:33 +08:00
username: mall
password: unicom
2021-05-06 14:50:17 +08:00
jdbc-url: jdbc:mysql://10.125.160.30:3306/ebtp_mall_extend?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true
url: jdbc:mysql://10.125.160.30:3306/ebtp_mall_extend?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
2021-02-22 18:55:29 +08:00
props:
sql:
show: true
jackson:
date-format: yyyy-MM-dd HH:mm:ss
time-zone: GMT+8
serialization:
write-dates-as-timestamps: false
2021-03-08 16:52:57 +08:00
# 天宫Kafka增加了安全认证需要配置安全属性
kafka:
2021-02-22 18:55:29 +08:00
bootstrap-servers: 10.125.164.192:32005,10.125.164.193:32005,10.125.164.194:32005
template:
default-topic: jl_test
2021-03-08 16:52:57 +08:00
2021-02-22 18:55:29 +08:00
# 生产者配置参数
producer:
2021-02-22 18:55:29 +08:00
client-id: core-service-ebtp-crypt
2021-03-08 16:52:57 +08:00
properties:
2021-02-22 18:55:29 +08:00
security.protocol: SASL_PLAINTEXT
sasl.mechanism: SCRAM-SHA-256
sasl.jaas.config: org.apache.kafka.common.security.scram.ScramLoginModule required username="jltest" password="Unicom#123";
2021-03-08 16:52:57 +08:00
# 消费者配置参数
consumer:
2021-02-22 18:55:29 +08:00
group-id: core-service-ebtp-crypt-consumer
auto-offset-reset: latest
properties:
security.protocol: SASL_PLAINTEXT
sasl.mechanism: SCRAM-SHA-256
sasl.jaas.config: org.apache.kafka.common.security.scram.ScramLoginModule required username="jltest" password="Unicom#123";
2021-03-08 16:52:57 +08:00
2021-02-22 18:55:29 +08:00
# 天宫 redis 需要使用哨兵进行访问
redis:
2021-02-22 18:55:29 +08:00
sentinel:
master: eshop-redis
nodes: 10.125.164.124:32718, 10.125.164.118:32716, 10.125.164.121:32716
password: Unicom#135
2021-02-22 18:55:29 +08:00
# 天宫Eureka配置
eureka:
client:
service-url:
2021-03-08 16:52:57 +08:00
defaultZone: http://eureka-1-svc:8080/eureka, http://eureka-2-svc:8080/eureka, http://eureka-3-svc:8080/eureka
instance:
prefer-ip-address: true
2021-03-08 16:52:57 +08:00
instance-id: http://10.242.37.148:${server.port}
# 这是客户端的注册地址, eureka 会通过这个地址建立管道
ip-address: 10.242.37.148
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-delete-value: deleted # 逻辑已删除值
logic-not-delete-value: normal # 逻辑未删除值
2021-03-25 15:07:48 +08:00
# --------------feign ------------
feign:
httpclient:
enabled: false
okhttp:
enabled: true
client:
config:
default:
connect-timeout: 20000
read-timeout: 20000
hystrix:
command:
default:
execution:
2021-02-22 18:55:29 +08:00
timeout:
enabled: true
isolation:
2021-02-22 18:55:29 +08:00
strategy: SEMAPHORE
thread:
timeoutInMilliseconds: 200000 #熔断超时时间
circuitBreaker:
sleepWindowInMilliseconds: 20000
forceClosed: true
2021-03-08 16:52:57 +08:00
ribbon:
ReadTimeout: 20000 #请求处理的超时时间
ConnectTimeout: 20000 #请求连接超时时间
MaxAutoRetries: 0 #对当前实例的重试次数
MaxAutoRetriesNextServer: 1 #切换实例的重试次数 1
2021-03-08 16:52:57 +08:00
mconfig:
workerId: 1
datacenterId: 1
2021-02-22 18:55:29 +08:00
# 服务名
feign:
name:
2021-02-25 14:40:43 +08:00
open: biz-service-ebtp-opening #开标大厅服务
process: biz-service-ebtp-process #评审流程服务
project: biz-service-ebtp-project #项目服务
resps: biz-service-ebtp-resps #应答结构化服务
rsms: biz-service-ebtp-rsms #评审结构化服务
2021-03-02 16:38:48 +08:00
tender: biz-service-ebtp-tender #投标服务
2021-03-25 15:07:48 +08:00
documentcenter: core-service-document-center #文档中心
2021-04-12 10:54:30 +08:00
usercenter: core-service-usercenter-public #用户中心
2021-03-25 15:07:48 +08:00
document:
clientHttpUrl: http://10.242.31.158:8100/auth/oauth/token?grant_type=client_credentials&client_id=bVS46ElU&client_secret=58ea04ba02475c8da2321cc99849d2a10f15b749
2021-03-08 16:52:57 +08:00
# 用户暴露给 prometheus 的健康数据
2021-02-22 18:55:29 +08:00
management:
endpoints:
web:
exposure:
include: "*"
cors:
allowed-origins: "*"
allowed-methods: "*"