Required feature in Autowiring
@Autowired has an argument called required=boolean value By default it is set to true . we can explicitely make it false if we want. If it is true(default behavior) then dependent bean should be available otherwise it throws exception Example package com.kb.autowiringAnnotation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; public class Person { […]