上QQ阅读APP看书,第一时间看更新
Defining the XML Spring configuration
The following example shows a typical XML Spring configuration. This configuration file is created in the src/main/resources directory with the name BusinessApplicationContext.xml:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<beans> <!-Namespace definitions removed-->
<context:component-scan base-package ="com.mastering.spring"/>
</beans>
The component scan is defined using context:component-scan.