- <?xml version="1.0" encoding="UTF-8"?>
- <beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:context="http://www.springframework.org/schema/context"
- xsi:schemaLocation="http://www.springframework.org/schema/beans
- https://www.springframework.org/schema/beans/spring-beans.xsd
- http://www.springframework.org/schema/context
- https://www.springframework.org/schema/context/spring-context.xsd">
- <!-- 扫描要创建的对象 (组件component scann是扫描) 要配置一个包的路径 base-package
- 去扫描注解 组件@Component-->
- <context:component-scan base-package="com.sf.annotation">
- </context:component-scan>
- </beans>
|