This is the third of a series of posts on some of the personal projects I’ve been working on. As I hope you’ll see, they all fit together. The previous post covered MicroBean Configuration. The next post covers MicroBean CDI Utilities.
MicroBean Configuration CDI is a CDI 2.0 portable extension that adapts MicroBean Configuration API together with a backing implementation (such as MicroBean Configuration) to a CDI 2.0 environment. In practical terms, this means users can inject configuration values into their CDI beans:
@Inject @ConfigurationValue("fred") private Integer fred;
In this respect, MicroBean Configuration CDI is no different from many other CDI-centric configuration frameworks, such as MicroProfile Config or DeltaSpike Configuration or Apache Tamaya’s CDI extension.
MicroBean Configuration CDI differs from these frameworks in its first-class surfacing of configuration coordinates (for more on configuration coordinates and the API that supports them, see my prior post on MicroBean Configuration API). It also delegates the actual work of looking up configuration values to the underlying MicroBean Configuration API implementation (see MicroBean Configuration for one such implementation), so in itself is really just a thin layer that calls the API for you.
I hope you can see that these three projects—MicroBean Configuration API, MicroBean Configuration and MicroBean Configuration CDI—taken together or separately allow for easy usage of configuration values in your Java SE applications, including standalone CDI 2.0 applications. These give us a helpful starting point for some of the other projects we’ll cover next in this series.