Merge branch 'dev' into 'test'
feat(databus): 完成阶段一+二-数据契约层与数据提供者 See merge request jygk/dsc!4
This commit is contained in:
@@ -42,6 +42,13 @@
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- DataBus Server Starter -->
|
||||
<dependency>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>zt-spring-boot-starter-databus-server</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 业务组件 -->
|
||||
<dependency>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
package com.zt.plat.module.databus.framework.rpc.config;
|
||||
|
||||
import com.zt.plat.framework.common.biz.system.oauth2.OAuth2TokenCommonApi;
|
||||
import com.zt.plat.module.databus.api.provider.DatabusDeptProviderApi;
|
||||
import com.zt.plat.module.databus.api.provider.DatabusPostProviderApi;
|
||||
import com.zt.plat.module.databus.api.provider.DatabusUserProviderApi;
|
||||
import com.zt.plat.module.system.api.user.AdminUserApi;
|
||||
import org.springframework.cloud.openfeign.EnableFeignClients;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
@@ -9,6 +12,13 @@ import org.springframework.context.annotation.Configuration;
|
||||
* Databus 模块的 RPC 配置,开启所需的 Feign 客户端。
|
||||
*/
|
||||
@Configuration(value = "databusRpcConfiguration", proxyBeanMethods = false)
|
||||
@EnableFeignClients(clients = {AdminUserApi.class, OAuth2TokenCommonApi.class})
|
||||
@EnableFeignClients(clients = {
|
||||
AdminUserApi.class,
|
||||
OAuth2TokenCommonApi.class,
|
||||
// DataBus 数据提供者 Feign 客户端
|
||||
DatabusDeptProviderApi.class,
|
||||
DatabusUserProviderApi.class,
|
||||
DatabusPostProviderApi.class
|
||||
})
|
||||
public class RpcConfiguration {
|
||||
}
|
||||
|
||||
@@ -76,9 +76,16 @@ management:
|
||||
# 日志文件配置
|
||||
logging:
|
||||
file:
|
||||
name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径
|
||||
name: ${LOG_PATH:./logs}/${spring.application.name}.log # 日志文件名,使用环境变量或相对路径
|
||||
|
||||
|
||||
# RocketMQ 配置项
|
||||
rocketmq:
|
||||
name-server: ${ROCKETMQ_NAME_SERVER:172.16.46.63:30876} # RocketMQ Namesrv,使用环境变量
|
||||
producer:
|
||||
group: databus-server-producer-group # 生产者组名
|
||||
send-message-timeout: 10000 # 发送消息超时时间,单位:毫秒
|
||||
|
||||
justauth:
|
||||
enabled: true
|
||||
type:
|
||||
@@ -106,3 +113,23 @@ justauth:
|
||||
prefix: 'social_auth_state:' # 缓存前缀,目前只对 Redis 缓存生效,默认 JUSTAUTH::STATE::
|
||||
timeout: 24h # 超时时长,目前只对 Redis 缓存生效,默认 3 分钟
|
||||
|
||||
zt:
|
||||
databus:
|
||||
sync:
|
||||
server:
|
||||
enabled: true
|
||||
clients:
|
||||
- company-b # 配置订阅的客户端(与客户端的client-code一致)
|
||||
mq:
|
||||
enabled: true
|
||||
name-server: ${ROCKETMQ_NAME_SERVER:172.16.46.63:30876} # RocketMQ NameServer 地址,使用环境变量
|
||||
topic-base: databus-sync
|
||||
producer-group: databus-server-producer
|
||||
send-msg-timeout: 10000
|
||||
retry:
|
||||
max-attempts: 5 # 最大重试次数
|
||||
initial-delay: 1 # 初始重试延迟(秒)
|
||||
multiplier: 2 # 重试延迟倍数
|
||||
batch:
|
||||
default-size: 500 # 默认批量大小
|
||||
interval: 5 # 批量推送间隔(秒)
|
||||
@@ -86,6 +86,13 @@ mybatis-plus:
|
||||
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
||||
|
||||
|
||||
# RocketMQ 配置项
|
||||
rocketmq:
|
||||
name-server: ${ROCKETMQ_NAME_SERVER:172.16.46.63:30876} # RocketMQ Namesrv,使用环境变量
|
||||
producer:
|
||||
group: databus-server-producer-group # 生产者组名
|
||||
send-message-timeout: 10000 # 发送消息超时时间,单位:毫秒
|
||||
|
||||
# ZT配置项,设置当前项目所有自定义的配置
|
||||
zt:
|
||||
env: # 多环境的配置项
|
||||
|
||||
@@ -50,7 +50,7 @@ spring:
|
||||
time-to-live: 1h # 设置过期时间为 1 小时
|
||||
|
||||
server:
|
||||
port: 48100
|
||||
port: 48105
|
||||
|
||||
logging:
|
||||
file:
|
||||
@@ -130,6 +130,11 @@ zt:
|
||||
- /databus/api/portal/**
|
||||
ignore-tables:
|
||||
- databus_api_client_credential
|
||||
# DataBus 数据同步服务端配置
|
||||
databus:
|
||||
sync:
|
||||
server:
|
||||
enabled: true # 启用 DataBus 同步服务端
|
||||
|
||||
databus:
|
||||
gateway:
|
||||
|
||||
Reference in New Issue
Block a user