bean-annotation.xml 751 B

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