mirror of
https://gitee.com/dromara/liteFlow.git
synced 2026-05-15 04:22:09 +08:00
fix:bug
This commit is contained in:
@@ -18,13 +18,20 @@ import com.yomahub.liteflow.util.JsonUtil;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* Redis解析器实现,只支持EL形式的XML,不支持其他的形式
|
||||
*
|
||||
* @author hxinyu
|
||||
* @since 2.10.6
|
||||
*/
|
||||
|
||||
public class RedisXmlELParser extends ClassXmlFlowELParser {
|
||||
|
||||
private final RedisParserHelper redisParserHelper;
|
||||
|
||||
private static final String ERROR_COMMON_MSG = "ruleSourceExtData or map is empty";
|
||||
|
||||
private static final String ERROR_MSG_PATTERN = "uleSourceExtData {} is blank";
|
||||
private static final String ERROR_MSG_PATTERN = "ruleSourceExtData {} is blank";
|
||||
|
||||
public RedisXmlELParser() {
|
||||
LiteflowConfig liteflowConfig = LiteflowConfigGetter.get();
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
package com.yomahub.liteflow.parser.redis.exception;
|
||||
|
||||
/**
|
||||
* Redis解析异常
|
||||
*
|
||||
* @author hxinyu
|
||||
* @since 2.10.6
|
||||
*/
|
||||
|
||||
public class RedisException extends RuntimeException{
|
||||
|
||||
private String message;
|
||||
|
||||
@@ -2,6 +2,13 @@ package com.yomahub.liteflow.parser.redis.util;
|
||||
|
||||
import com.yomahub.liteflow.parser.redis.vo.RedisParserVO;
|
||||
|
||||
/**
|
||||
* Redis 轮询机制实现类
|
||||
*
|
||||
* @author hxinyu
|
||||
* @since 2.10.6
|
||||
*/
|
||||
|
||||
public class RedisParserByPolling implements RedisParserHelper{
|
||||
|
||||
private final RedisParserVO redisParserVO;
|
||||
|
||||
@@ -26,6 +26,14 @@ import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* Redis Pub/Sub机制实现类
|
||||
* Redisson客户端 RMapCache存储结构
|
||||
*
|
||||
* @author hxinyu
|
||||
* @since 2.10.6
|
||||
*/
|
||||
|
||||
public class RedisParserByPubSub implements RedisParserHelper {
|
||||
|
||||
private final RedisParserVO redisParserVO;
|
||||
@@ -139,7 +147,7 @@ public class RedisParserByPubSub implements RedisParserHelper {
|
||||
|
||||
public boolean hasScript() {
|
||||
// 没有scriptClient或没有配置scriptDataBase
|
||||
if (Objects.isNull(scriptClient) || StrUtil.isNotBlank(redisParserVO.getScriptDataBase())) {
|
||||
if (Objects.isNull(scriptClient) || StrUtil.isBlank(redisParserVO.getScriptDataBase())) {
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
|
||||
@@ -3,14 +3,25 @@ package com.yomahub.liteflow.parser.redis.util;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.util.ReUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.yomahub.liteflow.core.FlowExecutor;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Redis 解析器通用接口
|
||||
*
|
||||
* @author hxinyu
|
||||
* @since 2.10.6
|
||||
*/
|
||||
|
||||
public interface RedisParserHelper {
|
||||
|
||||
Logger LOG = LoggerFactory.getLogger(RedisParserByPubSub.class);
|
||||
Logger LOG = LoggerFactory.getLogger(RedisParserHelper.class);
|
||||
|
||||
// LFLog LOG = LFLoggerManager.getLogger(FlowExecutor.class);
|
||||
|
||||
String REDIS_URL_PATTERN = "redis://{}:{}";
|
||||
|
||||
String CHAIN_XML_PATTERN = "<chain name=\"{}\">{}</chain>";
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
package com.yomahub.liteflow.parser.redis.vo;
|
||||
|
||||
/**
|
||||
* 用于解析RuleSourceExtData的vo类,用于Redis模式中
|
||||
*
|
||||
* @author hxinyu
|
||||
* @since 2.10.6
|
||||
*/
|
||||
|
||||
public class RedisParserVO {
|
||||
|
||||
/*连接地址*/
|
||||
|
||||
Reference in New Issue
Block a user