Skip to content

A CDI extension that injects property values into CDI-managed beans

License

Notifications You must be signed in to change notification settings

soulwing/pinject

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pinject

Build Status Maven Central

A CDI extension that injects property values into CDI-managed beans. By simply adding a @Property qualifier to your injection points, and putting the corresponding property value in a properties file or system property that can be located by the extension, you can inject properties for strings, numbers, URLs, etc. By providing your own property converters, the extension can inject property values of almost any type that has a well-defined string representation. Moreover, by providing your own custom resolver, you can resolve property values in practically any manner that suits the needs of your application.

Binary Distribution

Pinject is available via Maven Central. You can use Pinject in your application by simply setting up your build system (Maven, Gradle, Ivy, etc) to include the following dependencies. The syntax shown here is for Maven, but you can easily adapt this as needed by the build system for your application.

<dependencies>
  ...
  <dependency>
    <groupId>org.soulwing</groupId>
    <artifactId>pinject-api</artifactId>
    <version>1.2.0</version>
  </dependency>
  <dependency>
    <groupId>org.soulwing</groupId>
    <artifactId>pinject-extension</artifactId>
    <version>1.2.0</version>
    <scope>runtime</scope>
  </dependency>
  ...  
</dependencies>

Documentation

There are two main resources for learning and using Pinject.

About

A CDI extension that injects property values into CDI-managed beans

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages