Browse Source

🎉 3.2.0.RELEASE

training
smallchill 2 years ago
parent
commit
6e2d0f4671
  1. 2
      blade-biz-common/pom.xml
  2. 2
      blade-example-api/blade-dubbo-provider-api/pom.xml
  3. 2
      blade-example-api/blade-stream-api/pom.xml
  4. 4
      blade-example-api/pom.xml
  5. 2
      blade-example/blade-dubbo-consumer/pom.xml
  6. 2
      blade-example/blade-dubbo-provider/pom.xml
  7. 2
      blade-example/blade-easypoi/pom.xml
  8. 2
      blade-example/blade-mq-kafka/pom.xml
  9. 2
      blade-example/blade-mq-rabbit/pom.xml
  10. 2
      blade-example/blade-seata-order/pom.xml
  11. 2
      blade-example/blade-seata-storage/pom.xml
  12. 2
      blade-example/blade-sharding-jdbc/pom.xml
  13. 2
      blade-example/blade-stream-consumer/pom.xml
  14. 2
      blade-example/blade-stream-provider/pom.xml
  15. 2
      blade-example/blade-websocket/pom.xml
  16. 4
      blade-example/pom.xml
  17. 2
      blade-gateway/pom.xml
  18. 2
      blade-ops/blade-xxljob-admin/pom.xml
  19. 2
      blade-ops/blade-xxljob/pom.xml
  20. 4
      blade-ops/pom.xml
  21. 2
      blade-service-api/blade-demo-api/pom.xml
  22. 4
      blade-service-api/pom.xml
  23. 6
      blade-service/blade-demo/pom.xml
  24. 2
      blade-service/blade-demo/src/main/java/com/example/demo/controller/DemoController.java
  25. 39
      blade-service/blade-demo/src/main/java/com/example/demo/rule/AbizRule.java
  26. 48
      blade-service/blade-demo/src/main/java/com/example/demo/rule/BbizRule.java
  27. 44
      blade-service/blade-demo/src/main/java/com/example/demo/rule/CbizRule.java
  28. 45
      blade-service/blade-demo/src/main/java/com/example/demo/rule/DbizRule.java
  29. 21
      blade-service/blade-demo/src/main/java/com/example/demo/rule/context/BizContext.java
  30. 9
      blade-service/blade-demo/src/main/resources/liteflow/demo.el.xml
  31. 44
      blade-service/blade-demo/src/test/java/LiteFlowTest.java
  32. 4
      blade-service/pom.xml
  33. 2
      doc/nacos/blade.yaml
  34. 4
      pom.xml
  35. 2
      script/docker/app/.env

2
blade-biz-common/pom.xml

@ -5,7 +5,7 @@
<parent>
<artifactId>BladeX-Biz</artifactId>
<groupId>org.springblade</groupId>
<version>3.1.1.RELEASE</version>
<version>3.2.0.RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>

2
blade-example-api/blade-dubbo-provider-api/pom.xml

@ -5,7 +5,7 @@
<parent>
<artifactId>blade-example-api</artifactId>
<groupId>org.springblade</groupId>
<version>3.1.1.RELEASE</version>
<version>3.2.0.RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>

2
blade-example-api/blade-stream-api/pom.xml

@ -5,7 +5,7 @@
<parent>
<artifactId>blade-example-api</artifactId>
<groupId>org.springblade</groupId>
<version>3.1.1.RELEASE</version>
<version>3.2.0.RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>

4
blade-example-api/pom.xml

@ -5,13 +5,13 @@
<parent>
<artifactId>BladeX-Biz</artifactId>
<groupId>org.springblade</groupId>
<version>3.1.1.RELEASE</version>
<version>3.2.0.RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>blade-example-api</artifactId>
<name>${project.artifactId}</name>
<version>3.1.1.RELEASE</version>
<version>3.2.0.RELEASE</version>
<packaging>pom</packaging>
<description>BladeX 微服务范例API集合</description>

2
blade-example/blade-dubbo-consumer/pom.xml

@ -5,7 +5,7 @@
<parent>
<artifactId>blade-example</artifactId>
<groupId>org.springblade</groupId>
<version>3.1.1.RELEASE</version>
<version>3.2.0.RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>

2
blade-example/blade-dubbo-provider/pom.xml

@ -5,7 +5,7 @@
<parent>
<artifactId>blade-example</artifactId>
<groupId>org.springblade</groupId>
<version>3.1.1.RELEASE</version>
<version>3.2.0.RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>

2
blade-example/blade-easypoi/pom.xml

@ -5,7 +5,7 @@
<parent>
<artifactId>blade-example</artifactId>
<groupId>org.springblade</groupId>
<version>3.1.1.RELEASE</version>
<version>3.2.0.RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>

2
blade-example/blade-mq-kafka/pom.xml

@ -5,7 +5,7 @@
<parent>
<artifactId>blade-example</artifactId>
<groupId>org.springblade</groupId>
<version>3.1.1.RELEASE</version>
<version>3.2.0.RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>

2
blade-example/blade-mq-rabbit/pom.xml

@ -5,7 +5,7 @@
<parent>
<artifactId>blade-example</artifactId>
<groupId>org.springblade</groupId>
<version>3.1.1.RELEASE</version>
<version>3.2.0.RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>

2
blade-example/blade-seata-order/pom.xml

@ -5,7 +5,7 @@
<parent>
<artifactId>blade-example</artifactId>
<groupId>org.springblade</groupId>
<version>3.1.1.RELEASE</version>
<version>3.2.0.RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>

2
blade-example/blade-seata-storage/pom.xml

@ -5,7 +5,7 @@
<parent>
<artifactId>blade-example</artifactId>
<groupId>org.springblade</groupId>
<version>3.1.1.RELEASE</version>
<version>3.2.0.RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>

2
blade-example/blade-sharding-jdbc/pom.xml

@ -5,7 +5,7 @@
<parent>
<artifactId>blade-example</artifactId>
<groupId>org.springblade</groupId>
<version>3.1.1.RELEASE</version>
<version>3.2.0.RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>

2
blade-example/blade-stream-consumer/pom.xml

@ -5,7 +5,7 @@
<parent>
<artifactId>blade-example</artifactId>
<groupId>org.springblade</groupId>
<version>3.1.1.RELEASE</version>
<version>3.2.0.RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>

2
blade-example/blade-stream-provider/pom.xml

@ -5,7 +5,7 @@
<parent>
<artifactId>blade-example</artifactId>
<groupId>org.springblade</groupId>
<version>3.1.1.RELEASE</version>
<version>3.2.0.RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>

2
blade-example/blade-websocket/pom.xml

@ -5,7 +5,7 @@
<parent>
<artifactId>blade-example</artifactId>
<groupId>org.springblade</groupId>
<version>3.1.1.RELEASE</version>
<version>3.2.0.RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>

4
blade-example/pom.xml

@ -5,13 +5,13 @@
<parent>
<artifactId>BladeX-Biz</artifactId>
<groupId>org.springblade</groupId>
<version>3.1.1.RELEASE</version>
<version>3.2.0.RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>blade-example</artifactId>
<name>${project.artifactId}</name>
<version>3.1.1.RELEASE</version>
<version>3.2.0.RELEASE</version>
<packaging>pom</packaging>
<description>BladeX 微服务范例集合</description>

2
blade-gateway/pom.xml

@ -5,7 +5,7 @@
<parent>
<artifactId>BladeX-Biz</artifactId>
<groupId>org.springblade</groupId>
<version>3.1.1.RELEASE</version>
<version>3.2.0.RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>

2
blade-ops/blade-xxljob-admin/pom.xml

@ -3,7 +3,7 @@
<parent>
<artifactId>blade-ops</artifactId>
<groupId>org.springblade</groupId>
<version>3.1.1.RELEASE</version>
<version>3.2.0.RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>

2
blade-ops/blade-xxljob/pom.xml

@ -5,7 +5,7 @@
<parent>
<artifactId>blade-ops</artifactId>
<groupId>org.springblade</groupId>
<version>3.1.1.RELEASE</version>
<version>3.2.0.RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>blade-xxljob</artifactId>

4
blade-ops/pom.xml

@ -5,13 +5,13 @@
<parent>
<artifactId>BladeX-Biz</artifactId>
<groupId>org.springblade</groupId>
<version>3.1.1.RELEASE</version>
<version>3.2.0.RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>blade-ops</artifactId>
<name>${project.artifactId}</name>
<version>3.1.1.RELEASE</version>
<version>3.2.0.RELEASE</version>
<packaging>pom</packaging>
<modules>

2
blade-service-api/blade-demo-api/pom.xml

@ -5,7 +5,7 @@
<parent>
<artifactId>blade-service-api</artifactId>
<groupId>org.springblade</groupId>
<version>3.1.1.RELEASE</version>
<version>3.2.0.RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>

4
blade-service-api/pom.xml

@ -5,14 +5,14 @@
<parent>
<artifactId>BladeX-Biz</artifactId>
<groupId>org.springblade</groupId>
<version>3.1.1.RELEASE</version>
<version>3.2.0.RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>blade-service-api</artifactId>
<name>${project.artifactId}</name>
<version>3.1.1.RELEASE</version>
<version>3.2.0.RELEASE</version>
<packaging>pom</packaging>
<description>BladeX 微服务API集合</description>

6
blade-service/blade-demo/pom.xml

@ -6,7 +6,7 @@
<parent>
<groupId>org.springblade</groupId>
<artifactId>blade-service</artifactId>
<version>3.1.1.RELEASE</version>
<version>3.2.0.RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@ -42,6 +42,10 @@
<groupId>com.baomidou</groupId>
<artifactId>dynamic-datasource-spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-starter-liteflow</artifactId>
</dependency>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-core-test</artifactId>

2
blade-service/blade-demo/src/main/java/com/example/demo/controller/DemoController.java

@ -40,7 +40,7 @@ public class DemoController {
/**
* 需要导入blade-demo-dev.yaml文件至nacos
*/
@Value("${demo.name}")
@Value("${demo.name:1}")
private String name;
private final DemoProperties properties;

39
blade-service/blade-demo/src/main/java/com/example/demo/rule/AbizRule.java

@ -0,0 +1,39 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package com.example.demo.rule;
import com.yomahub.liteflow.annotation.LiteflowComponent;
import com.yomahub.liteflow.core.NodeComponent;
import lombok.extern.slf4j.Slf4j;
/**
* A业务
*
* @author Chill
*/
@Slf4j
@LiteflowComponent(id = "abizRule", name = "A业务")
public class AbizRule extends NodeComponent {
@Override
public void process() throws Exception {
log.info("A业务执行完毕");
}
}

48
blade-service/blade-demo/src/main/java/com/example/demo/rule/BbizRule.java

@ -0,0 +1,48 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package com.example.demo.rule;
import com.example.demo.rule.context.BizContext;
import com.yomahub.liteflow.annotation.LiteflowComponent;
import com.yomahub.liteflow.core.NodeSwitchComponent;
import lombok.extern.slf4j.Slf4j;
/**
* A业务
*
* @author Chill
*/
@Slf4j
@LiteflowComponent(id = "bbizRule", name = "B业务")
public class BbizRule extends NodeSwitchComponent {
@Override
public String processSwitch() throws Exception {
// 获取上下文
BizContext contextBean = this.getContextBean(BizContext.class);
// 获取条件
Boolean isPublish = contextBean.getIsPublish();
log.info("B业务执行判断");
// 进行节点判断
if (isPublish) {
return "cbizRule";
} else {
return "dbizRule";
}
}
}

44
blade-service/blade-demo/src/main/java/com/example/demo/rule/CbizRule.java

@ -0,0 +1,44 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package com.example.demo.rule;
import com.example.demo.rule.context.BizContext;
import com.yomahub.liteflow.annotation.LiteflowComponent;
import com.yomahub.liteflow.core.NodeComponent;
import lombok.extern.slf4j.Slf4j;
/**
* A业务
*
* @author Chill
*/
@Slf4j
@LiteflowComponent(id = "cbizRule", name = "C业务")
public class CbizRule extends NodeComponent {
@Override
public void process() throws Exception {
// 获取上下文
BizContext contextBean = this.getContextBean(BizContext.class);
// 修改上下文
contextBean.setName(contextBean.getName() + "-> C");
log.info("C业务执行完毕");
}
}

45
blade-service/blade-demo/src/main/java/com/example/demo/rule/DbizRule.java

@ -0,0 +1,45 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package com.example.demo.rule;
import com.example.demo.rule.context.BizContext;
import com.yomahub.liteflow.annotation.LiteflowComponent;
import com.yomahub.liteflow.core.NodeComponent;
import lombok.extern.slf4j.Slf4j;
/**
* A业务
*
* @author Chill
*/
@Slf4j
@LiteflowComponent(id = "dbizRule", name = "D业务")
public class DbizRule extends NodeComponent {
@Override
public void process() throws Exception {
// 获取上下文
BizContext contextBean = this.getContextBean(BizContext.class);
// 修改上下文
contextBean.setName(contextBean.getName() + "-> D");
log.info("D业务执行完毕");
}
}

21
blade-service/blade-demo/src/main/java/com/example/demo/rule/context/BizContext.java

@ -0,0 +1,21 @@
package com.example.demo.rule.context;
import lombok.Data;
/**
* 上下文类
*
* @author Chill
*/
@Data
public class BizContext {
private Long id;
private String name;
private Integer category;
private Boolean isPublish;
}

9
blade-service/blade-demo/src/main/resources/liteflow/demo.el.xml

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<flow>
<chain name="demoChain">
THEN(
abizRule,
SWITCH(bbizRule).TO(cbizRule, dbizRule)
);
</chain>
</flow>

44
blade-service/blade-demo/src/test/java/LiteFlowTest.java

@ -0,0 +1,44 @@
import com.example.demo.DemoApplication;
import com.example.demo.rule.context.BizContext;
import com.yomahub.liteflow.core.FlowExecutor;
import com.yomahub.liteflow.flow.LiteflowResponse;
import lombok.extern.slf4j.Slf4j;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springblade.core.test.BladeBootTest;
import org.springblade.core.test.BladeSpringExtension;
import org.springblade.core.tool.jackson.JsonUtil;
import org.springframework.boot.test.context.SpringBootTest;
import javax.annotation.Resource;
/**
* LiteFlow单元测试
*
* @author Chill
*/
@Slf4j
@ExtendWith(BladeSpringExtension.class)
@SpringBootTest(classes = DemoApplication.class)
@BladeBootTest(appName = "blade-demo", profile = "test", enableLoader = true)
public class LiteFlowTest {
@Resource
private FlowExecutor flowExecutor;
@Test
public void contextLoads() {
// 构建上下文
BizContext bizContext = new BizContext();
bizContext.setId(1L);
bizContext.setName("测试名称");
bizContext.setCategory(1);
bizContext.setIsPublish(Boolean.TRUE);
// 启动 demoChain 的规则引擎
LiteflowResponse resp = flowExecutor.execute2Resp("demoChain", null, bizContext);
if (resp.isSuccess()) {
BizContext contextBean = resp.getContextBean(BizContext.class);
log.info(JsonUtil.toJson(contextBean));
}
}
}

4
blade-service/pom.xml

@ -7,12 +7,12 @@
<parent>
<groupId>org.springblade</groupId>
<artifactId>BladeX-Biz</artifactId>
<version>3.1.1.RELEASE</version>
<version>3.2.0.RELEASE</version>
</parent>
<artifactId>blade-service</artifactId>
<name>${project.artifactId}</name>
<version>3.1.1.RELEASE</version>
<version>3.2.0.RELEASE</version>
<packaging>pom</packaging>
<description>BladeX 微服务集合</description>

2
doc/nacos/blade.yaml

@ -68,7 +68,7 @@ knife4j:
swagger:
title: BladeX 接口文档系统
description: BladeX 接口文档系统
version: 3.1.1.RELEASE
version: 3.2.0.RELEASE
license: Powered By BladeX
license-url: https://bladex.vip
terms-of-service-url: https://bladex.vip

4
pom.xml

@ -5,11 +5,11 @@
<groupId>org.springblade</groupId>
<artifactId>BladeX-Biz</artifactId>
<version>3.1.1.RELEASE</version>
<version>3.2.0.RELEASE</version>
<packaging>pom</packaging>
<properties>
<bladex.project.version>3.1.1.RELEASE</bladex.project.version>
<bladex.project.version>3.2.0.RELEASE</bladex.project.version>
<java.version>1.8</java.version>
<maven.plugin.version>3.8.1</maven.plugin.version>

2
script/docker/app/.env

@ -1,2 +1,2 @@
REGISTER=192.168.0.188/blade
TAG=3.1.1.RELEASE
TAG=3.2.0.RELEASE

Loading…
Cancel
Save