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.