How to @Inject property file properties with CDI

How to @Inject property file properties with CDI published on No Comments on How to @Inject property file properties with CDI

Also published on DZone Problem You use CDI for your Java application and want to use a Property file for some needed configuration, but don’t know how to do this … Solution Create producers and an annotation to direct it. Annotation

Producer The examples provided here enable parsing of Strings, Booleans and Integers but… Continue reading How to @Inject property file properties with CDI

Field Injection when Mocking frameworks fail

Field Injection when Mocking frameworks fail published on No Comments on Field Injection when Mocking frameworks fail

Also published on DZone Problem You use Dependency Injection (CDI) in your application and you want to unit test your Java classes without making it an integration test by using Weld of Arquillian. You use a Mocking framework like Mockito or EasyMock but still have trouble getting all your dependencies injected into the class because… Continue reading Field Injection when Mocking frameworks fail