Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Injecting Properties File Values in CDI Using DeltaSpike and Apache TomEE

DZone's Guide to

Injecting Properties File Values in CDI Using DeltaSpike and Apache TomEE

· Integration Zone ·
Free Resource

The Future of Enterprise Integration: Learn how organizations are re-architecting their integration strategy with data-driven app integration for true digital transformation.

One of the great improvement in Java EE 5 and beyond it is the introduction of CDI (Context and Dependency Injection). CDI is used for injecting dependencies among a lot of other things like events, interceptors, … and can be used in POJOs.
In some cases instead of injecting other objects (as a dependency injection), you want to inject a value from a properties file into a class that needs to be configured externally.
I have written an example in Tomitribe community zone: https://github.com/tomitribe/community/tree/master/injecting-properties 
We keep learning,
Alex.

Make your mark on the industry’s leading annual report. Fill out the State of API Integration 2019 Survey and receive $25 to the Cloud Elements store.

Topics:

Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}