Spring Dependency Injection example without XML
Simplest example how can Spring Dependency example works. For all configuration are used annotations without any XML files.
- All configuration is in pooky.projects.AppConfig
- This class need to be annotated with @Configuration
- Annotation @ComponentScan will scan and register beans in pooky.projects.beans
- To run example use Main.java
- Difference between annotation @Inject, @Resource and @Autowired