业务策略并不是静态的,它们经常变更,且其关联的业务流程也会随之变更。因此,有必要在实现和修改业务流程时保持灵活性。针对传统的程序设计方法使用一组硬编码的if语句来构成业务规则,当企业因业务需要改变规则时,系统都要对程序代码进行大量修改这一问题,在Spring框架的基础上,设计和实现一种基于Spring的业务规则引擎技术,能够有效地实现代码与业务规则分离,保证业务流程修改时的灵活性。
Business rules certainly are not static state. They frequently change, and their connection rule also can change with it. As a result of these changes, it is necessary to maintain the flexibility when the business process is realized and modified. If system in view of the traditional programming method is used to constitute the business rule, when the enterprise needs to change the rule, the system must carry on the procedure code massively change. Based on the Spring framework, this paper designs and realizes one of the Spring rule engine technology, which can effectively realize the code and the service rule separates, and guarantee business rule change flexibility.