Java Reference
In-Depth Information
(UnitCalculator) context.getBean("unitCalculator");
...
Counter arithmeticCounter = (Counter) arithmeticCalculator;
System.out.println(arithmeticCounter.getCount());
Counter unitCounter = (Counter) unitCalculator;
System.out.println(unitCounter.getCount());
}
}
Summary
This chapter discussed the core Spring framework and the dependency injection container's features.
You learned about some of the sophisticated practical options that the Spring framework offers for
configuring applications, large or small. The chapter showed you how to receive various callbacks from
the container and how to depend on the ApplicationContext interface explicitly to use some of its more
advanced features such as resource bundles. Finally, you learned how to configure your beans with
annotations to lessen the XML required for configuration and all about Spring's powerful AOP support
(and how to use it to interact with the container).
In the next chapter, you will explore the many exciting new features of Spring framework 3 . 0.
 
Search WWH ::




Custom Search