Repository navigation
Ageris 0.5.0
Ageris 0.5.0 adds a Spring Boot starter.
Get it
<dependency>
<groupId>io.github.lichtsinn</groupId>
<artifactId>ageris-core</artifactId>
<version>0.5.0</version>
</dependency>implementation 'io.github.lichtsinn:ageris-core:0.5.0'Requires Java 17 or later.
Using Ageris with Spring Boot
The new module ageris-spring-boot-starter sets Ageris up in a Spring Boot 4 application from a few properties, without setup code:
<dependency>
<groupId>io.github.lichtsinn</groupId>
<artifactId>ageris-spring-boot-starter</artifactId>
<version>0.5.0</version>
</dependency>ageris.application=myapp
ageris.path=/etc/myapp/config
ageris.feature-flags.files=/featureflags.json
ageris.configs.files=/configs.json- The feature flag manager, the config manager and the JSON config manager are beans. Each exists only if its files are set.
- The loader starts with the application and stops with it. A manager is loaded before any bean receives it.
- If the first attempt to load the files fails, the application does not start, and the error says why.
ageris.fail-on-first-load-failure=falselets it start anyway. - An
AgerisCustomizerbean registers the bindings of policies and sets other options. AConfigurationFetcherbean reads the files from somewhere other than a directory. - With the health support of Spring Boot, as with Actuator, the health of the application shows Ageris: up when loaded or stale, down when a manager never loaded.
- With
ageris-openfeatureand the OpenFeature SDK present, the starter offers anAgerisProviderbean. - Without any files set the starter creates nothing, so adding the dependency alone changes no application.
It needs Spring Boot 4.0 or later. See Using Ageris with Spring Boot in the README.
Also changed
- A percentage in a rule is checked for its decimals as it is written.
0.10000000000000001was accepted as 0.1 before, and is now refused like any percentage with more than two decimals. - The failure of an entry is one line. The line break and the
at [Source: UNKNOWN; ...]that Jackson added are gone. - An OpenFeature lookup is cheaper again: an empty
ConfigurationContextno longer creates a map.
Upgrading from 0.4.0
Nothing to do, unless a file holds a percentage with more than two decimals that only slipped through because of rounding.
Dependencies
Unchanged from 0.4.0: Jackson 2.22, slf4j 2.0 and commons-io 2.22. ageris-core is also tested with Jackson 2.15.4, slf4j 1.7.36 and commons-io 2.11.0; ageris-openfeature with the OpenFeature SDK from 1.16.0 to 1.23.0; and ageris-spring-boot-starter with Spring Boot 4.0.0 to 4.1.1.