Defines the toolarium enumeration configuration or in short enum configuration.
This project implements a so-called enumeration configuration that turns a Java enumeration into a set of a configuration that can be persisted.
The basic idea behind this is to solve the chicken-and-egg problem: Your software defines or expect some configuration values that are e.g. in a database. Now, in your code, you typically define a constant with which you retrieve the value. In the database you have to add the same constant with the corresponding value. From various experiences, there are often a lot of problems with.
Here comes a possible solution with this project:
- You simply define an enum in Java.
- Then add the EnumConfiguration or the EnunmValueConfigutation. Use the annotation attributes for more information.
- Use the EnumConfigurationProcessor to generate the output you use, e.g. SQL queries
The big advantage is that you only have one place (source code) where you define your "constant".
Add the annoation processor to you project or simple use the common build.
- cb - The toolarium common build
We use SemVer for versioning. For the versions available, see the tags on this repository.
dependencies {
implementation "com.github.toolarium:toolarium-enum-configuration:1.2.0"
}
<dependency>
<groupId>com.github.toolarium</groupId>
<artifactId>toolarium-enum-configuration</artifactId>
<version>1.2.0</version>
</dependency>