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

SnapLogic is the leading self-service enterprise-grade integration platform. Download the 2018 GartnerMagic Quadrant for Enterprise iPaaS or play around on the platform, risk free, for 30 days.

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.

With SnapLogic’s integration platform you can save millions of dollars, increase integrator productivity by 5X, and reduce integration time to value by 90%. Sign up for our risk-free 30-day trial!

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 }}