My first article about the three different types of bean injection supported by the Spring Framework. This code walks through all three methods and has supporting tests.
Relevant Articles:
- Wiring in Spring: @Autowired, @Resource and @Inject
- Exploring the Spring BeanFactory API
- How to use the Spring FactoryBean?
- Constructor Dependency Injection in Spring
- Constructor Injection in Spring with Lombok
- A Quick Guide to Spring @Value
- Spring YAML Configuration
- Introduction to Spring’s StreamUtils
- Using Spring @Value with Defaults
- Groovy Bean Definitions
- XML-Based Injection in Spring