How to use Autowire With Qualifiers?
In Spring we use @Qualifier to indicate which bean we want to qualify to autowired on a field.
when we create multiple beans of the same type( for example: Department) and want to autowire only one of them with a property in some other class (for example: Employee), in this case we use @Qualifier annotation with @Autowired annotation to remove the confusion by specifying which exact bean will be autowired with that particular property.
@Qualifier annotation example.
For full blog read here about to use Autowire With Qualifiers.Apart from this, you can also ask questions & look for various programming queries along with their solutions including Android, C, Java, Php programming questions and answers etc. as it is an effective technology forum also.
Findnerd platform not only allows to just ask questions, however its features are more than that, like you can post blogs, Manage projects, Manage employee’s productivity, share your desktop with others etc..
Post Your Ad Here
Comments