I. Overview
for the purpose of implementing the bean information definition, it provides three options based on XML, annotation-based, and Java-based classes. The following summarizes the differences in the three configuration methods.
Two, bean different configuration mode comparison.
Three, the application of different configuration of the bean applications.
Iv. Summary.
in general, we apply the XML configuration DataSource, Sessionfactory and other resources of the bean, in the XML with the AOP, the context namespace for the theme configuration. The beans developed in all other projects are configured in the form of annotations. This is the use of "xml+ configuration-based" configuration, rarely based on the Java class configuration.
Spring not only provides three implementations of the scheme but also allows for a number of free combinations, allowing three ways to complement each other in the end to achieve the same essence.
Rookie learn SPRING--SPRINGIOC container based on three configurations of comparison