iamberry-nutri-web-ioc.xml 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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:tx="http://www.springframework.org/schema/tx"
  6. default-autowire="byName"
  7. default-lazy-init="true"
  8. xmlns:task="http://www.springframework.org/schema/task"
  9. xmlns:aop="http://www.springframework.org/schema/aop"
  10. xmlns:p="http://www.springframework.org/schema/p"
  11. xsi:schemaLocation=
  12. "http://www.springframework.org/schema/aop
  13. http://www.springframework.org/schema/aop/spring-aop-4.1.xsd
  14. http://www.springframework.org/schema/beans
  15. http://www.springframework.org/schema/beans/spring-beans.xsd
  16. http://www.springframework.org/schema/tx
  17. http://www.springframework.org/schema/tx/spring-tx-4.1.xsd
  18. http://www.springframework.org/schema/task
  19. http://www.springframework.org/schema/task/spring-task-4.1.xsd
  20. http://www.springframework.org/schema/context
  21. http://www.springframework.org/schema/context/spring-context-4.1.xsd">
  22. <!-- 配置自动扫描的包:不扫描控制器和异常处理 -->
  23. <context:component-scan base-package="com.acoolrat">
  24. <context:exclude-filter type="annotation" expression="org.springframework.stereotype.Controller" />
  25. <context:exclude-filter type="annotation" expression="org.springframework.web.bind.annotation.ControllerAdvice" />
  26. </context:component-scan>
  27. <!-- 使用CGLIB动态代理 -->
  28. <aop:aspectj-autoproxy proxy-target-class="true"/>
  29. <!-- 开启注解启动定时器 -->
  30. <task:annotation-driven/>
  31. <!-- DataSource -->
  32. <import resource="classpath:iamberry-nutri-service-db.xml"/>
  33. </beans>