Skip to main content

Posts

Showing posts from February, 2019

12. Injecting Values from Properties File

ok this post will be last potst abaut dependency injection in spring. ok let's start with implementasion step as usual i post : Create Properties File Load Properties File in Spring Config file Reference values from properties file 1.create properties file   2. Load properties file in spring config file 3. Reference values from properties file 4. run your app confused ? or get some error? please feel free to ask me... or you can clone this project from here .

11. Injecting Literal Value

in this post i will explain how to inject some value to a class / service. implementasion step : Create Setter method in your class for injection Configure the injection in Spring Config File 1. Create property with getter and setter   2. Cofigure your spring config file 3. call from your app 4. result will like this Confused ? you can clone in my repository here .

10. Spring Dependency Injection - Setter Injection

Implementasion Step : Create setter method(s) in your class for injection Configure the dependency injection in Spring config file ok lets start : 1. Create class that will inject with setter method 2. Configure your Spring Bean  3. Calling from your App 4. Run your App confused ? you can clone this project repo here