我以流口水为业务准则。但是当我尝试执行规则时遇到了一个问题。假设我有一些类型为BaseDTO的对象:
- BaseDTO1(property = "address", key = "address1", render = false), BaseDTO2(property = "address", key = "address2", render = false),... BaseDT1O(property = "address", key = "address10", render = false),
- BaseDTO11(property = "country", key = "country1", render = false), BaseDTO12(property = "country", key = "country2", render = false),... BaseDT2O(property = "country", key = "country10", render = false),
- BaseDTO21(property = "zipCode", key = "zip1", render = false), BaseDTO22(property = "zipCode", key = "zip2", render = false),... BaseDT30(property = "zipCode", key = "zip10", render = false),
- BaseDTO31(property = "city", key = "city1", render = false), BaseDTO32(property = "city", key = "city2", render = false),... BaseDT40(property = "city", key = "city10", render = false),
在drl文件中,我只是有一条规则:
rule 'default'
when
$address : BaseDTO(property == "address")
$country : BaseDTO(property == "country")
$zipCode : BaseDTO(property == "zipCode")
$city : BaseDTO(property == "city")
then
$address.setRender(true);
$country.setRender(true);
$zipCode.setRender(true);
$city.setRender(true);
运行此规则时,我的系统崩溃并导致错误超出了GC监听限制
有人可以向我解释为什么会发生吗?