快速上手
# 如何运行 Demo
克隆 Gobrs-Async 源代码 (opens new window)
启动 Gobrs-Async-Example (opens new window) 模块下 GobrsAsyncExampleApplication 应用类
通过接口修改线程池中的配置。HTTP GET 路径:http://localhost:8888/gobrs/testGobrs
,查看Idea 控制台 打印结果如下:
EService 成功
{"result":"我是EService 的 结果 恭喜你拿到"}
AService 执行完了
AService 成功
CService 成功
总耗时1563
# 配置文件
server:
port: 8888 # 端口: 8080
spring:
gobrs:
async:
rules:
# 支持多命名空间
- name: "ruleName" # 规则名称
content: "AService->BService,CService,FService; BService->FService,GService;"
- name: "azh"
content: "AService->BService,CService,FService; BService->FService,GService;"
task-interrupt: false #局部异常是否打断主流程