beanAop.xml 879 B

123456789101112131415
  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. xmlns:aop="http://www.springframework.org/schema/aop"
  6. xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/context https://www.springframework.org/schema/context/spring-context.xsd http://www.springframework.org/schema/aop https://www.springframework.org/schema/aop/spring-aop.xsd">
  7. <!-- 配置需要实例化扫描的包-->
  8. <context:component-scan base-package="com"></context:component-scan>
  9. <!-- 开启aop的注解功能-->
  10. <aop:aspectj-autoproxy proxy-target-class="true"></aop:aspectj-autoproxy>
  11. </beans>