In this tuorial you will see how to exclude bean from autowiring. The autowire-candidate attribute is set in the <bean/> element and when it is set to false the container excludes that specific bean from autowiring.
College.java
package spring.exclude.autwiring;
|
Student.java
package spring.exclude.autwiring;
|
AutowireMain.java
package spring.exclude.autwiring;
|
context.xml
<beans xmlns="http://www.springframework.org/schema/beans"
|
| College [registration=BL001, Student=null,year=2001] |
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.