These are additional exercises you can try out once after learning and practicing all the previous exercises in this section. There will be also hints to make things easier.
Provide examples for autowire for type and autowire by constructor.
Rewrite the following programming using annotations and java configuration: http://javajee.com/autowiring-in-spring-through-xml-configuration-example.
Give examples for the usage of following annotations following the same example program in this section: @Autowired, @Resource, @Inject.
What will happen if I change a @Autowired annotation in previous examples within the section with @Resource or @Inject?
Write a program that will fail without @Qualifier, but will pass once using @Qualifier.
Write a program that will fail without @Primary, but will pass once using @Primary.
Print the bean definition count and the bean definition names for the following programs from within the main program and compare:
Rewrite this program using XML configuration: http://javajee.com/bean-scopes-in-spring-with-example
- You can submit your solutions for review and better ones may get added to the current section of notes. You will receive 500 points for every accepted solution that feature on this site.