One method to achieve Dependency Injection of a resource is by constructor. The of the element is used for constructor injection. The behaves the exact same way as if you called the constructor. Injecting Primitive Int & String Values