Can I make Spring aware non-POJO ruleBooks?
victoraugustofd opened this issue · 1 comments
Hi,
I'm trying to make a Spring Boot application that aware some custom books that I created.
These books aren't POJO Rules, but the classes are inherited from CoRRuleBook, for example.
Is this possible?
I have tried using SpringAwareRuleBookRunner, passing my package as parameter.
My last try was to create a bean of RuleBookRunner type, passing my package as parameter, but it didn't work.
Thanks in advance.
You can create a RuleBook class that is annotated for Spring. POJO rules are just little more Spring-y by nature. You can also specify your own RuleBook bean in your Spring config. That would probably be the way to do it. Make sure you specify the bean name in your injections if you are just using an instance of CoRRuleBook so that you can correctly identify it.
SpringAwareRuleBookRunner is really for POJO rules. I suppose you could prewire a custom RuleBook and pass it into SpringAwareRuleBookRunner, but it really wouldn't buy you much. I assume you may have been trying to load your RuleBook with SpringAwareRuleBookRunner, which won't work. It will only load Rules.