Tuesday, October 27, 2015

type-safe configs the second minute

in my first post about this topic i explained how to create a type-safe config based on interfaces and the partial-bean-module provided by deltaspike.

this second part is about a new possibility which is available since deltaspike v1.5.1.


until deltaspike v1.5.1, you needed to create and inject the type-safe config for accessing configured values. one part of the example shown in the first post looked like:

since deltaspike v1.5.1, you can use @Produces in your type-safe config. with that you can directly inject the result instead of the config-class.