finds.dev← search

// the find

ityouknow/drools-examples

★ 528 · Java · Apache-2.0 · updated Oct 2021

drools examples, spring boot drools examples

A collection of minimal Drools + Spring Boot examples showing rule engine basics: hello world, scoring, Spring Boot auto-configuration, and dynamic rule reloading from a database. Aimed at Java developers who need a working starting point for Drools integration and find the official docs lacking in practical examples.

The DB-backed rule reloading example (spring-boot-drools-db) is the most useful thing here — storing rules in a database and reloading them at runtime is exactly the non-obvious part of Drools that trips people up. The progression from bare-minimum demo to Spring Boot wiring to dynamic DB rules is a sensible learning path. The CEP/timer-windows demo covers a niche that has almost no English-language examples anywhere. Code is small enough to read in one sitting.

Last commit was October 2021 — Drools has moved significantly since then, and the Spring Boot auto-configuration approach shown here is likely incompatible with Drools 8.x which dropped the legacy KieServices bootstrap in favor of the new kogito-based API. No tests worth speaking of — what's there is a handful of smoke tests, not anything that validates rule correctness. README is mostly in Chinese, which is fine for the original audience but limits it for everyone else. The examples cover address validation and scoring points, which are usable patterns but far from the fraud detection, loan approval, or workflow scenarios most people actually reach for Drools to solve.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →