Add a new store module ff4j-store-<backend> to the ff4j reactor. Follow an existing
similar module as the template — pick the closest match by protocol
(e.g. ff4j-store-redis for key/value, ff4j-store-mongodb for document,
ff4j-store-springjdbc for SQL).
Module setup
- Create
ff4j-store-<backend>/pom.xmlwith parentorg.ff4j:ff4j-parentand add the module to the<modules>list in the rootpom.xml. - Add the client dependency version as a
version.<backend>property in the root pom. Watch out fordependencyConvergence(enforcer fails on transitive conflicts).
- Create
Implementation (in
src/main/java/org/ff4j/store/and/ororg/ff4j/<backend>/)FeatureStoreimplementation extendingAbstractFeatureStore(fromff4j-core).- Optionally
PropertyStore(extendAbstractPropertyStore) andEventRepository(extendAbstractEventRepository) if the backend supports them. - Follow the mapper/driver separation used by the template module.
Tests — extend the shared TCK from
ff4j-test, don't write feature-store tests from scratch:- Unit-testable logic →
*Test.java(JUnit 4, runs in theunit-testexecution). - Store tests needing the real backend →
*IT.javaclasses extendingFeatureStoreTestSupport/PropertyStoreTestSupport/AbstractEventRepositoryTest, using Testcontainers to start the backend (seeff4j-store-redistests). - Verify with
mvn install -pl ff4j-store-<backend> -am(Docker running), or-DskipITsfor a compile/unit-only pass.
- Unit-testable logic →
Finish
- The build injects Apache license headers into new files — commit that churn.
- Conventional Commit, e.g.
feat: add <backend> store.