# easy-rule
**Repository Path**: xiu_code/easy-rule
## Basic Information
- **Project Name**: easy-rule
- **Description**: 你可以自己构建一个简单的规则引擎。您所需要的只是创建一组具有条件和操作的对象,将它们
存储在一个集合中,然后运行它们来评估条件并执行操作。
- **Primary Language**: Unknown
- **License**: Not specified
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 7
- **Forks**: 3
- **Created**: 2021-07-30
- **Last Updated**: 2025-07-02
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# 规则引擎EasyRules
#### 1、文章博客
https://xiu-bom.blog.csdn.net/article/details/111496433
#### 2、介绍
You can build a simple rules engine yourself. All you need is to create a bunch of objects
with conditions and actions, store them in a collection, and run through them to evaluate
the conditions and execute the actions.
---- By Martin Fowler
你可以自己构建一个简单的规则引擎。您所需要的只是创建一组具有条件和操作的对象,将它们
存储在一个集合中,然后运行它们来评估条件并执行操作。
#### 3、特性
1、轻量级框架,基于API方式
2、支持基于POJO和注解方式开发
3、支持创建组合规则
4、支持使用表达式语言(MVEL/SpEL)
#### 4、基本概念
1、事实Facts
业务数据,结构类似HashMap,规则内数据上下文
2、规则Rule
业务规则,包含条件评估、动作执行;
如果条件评估为True,则执行对应的动作
3、条件Condition
规则条件,提供了评估方法
4、动作Action
规则动作,当条件Condition评估为True,
则动作执行execute
#### 5、实现方式
1、基于表达式
2、基于注解
3、基于配置文件