iamberry-app-service-spring.xml 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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:ehcache="http://ehcache-spring-annotations.googlecode.com/svn/schema/ehcache-spring"
  6. xmlns:cache="http://www.springframework.org/schema/cache"
  7. xmlns:tx="http://www.springframework.org/schema/tx"
  8. default-autowire="byName"
  9. default-lazy-init="true"
  10. xmlns:task="http://www.springframework.org/schema/task"
  11. xmlns:aop="http://www.springframework.org/schema/aop"
  12. xmlns:ehcache-spring="http://ehcache-spring-annotations.googlecode.com/svn/schema/ehcache-spring"
  13. xmlns:p="http://www.springframework.org/schema/p"
  14. xmlns:websocket="http://www.springframework.org/schema/websocket"
  15. xsi:schemaLocation=
  16. "http://www.springframework.org/schema/aop
  17. http://www.springframework.org/schema/aop/spring-aop-4.1.xsd
  18. http://www.springframework.org/schema/beans
  19. http://www.springframework.org/schema/beans/spring-beans.xsd
  20. http://ehcache-spring-annotations.googlecode.com/svn/schema/ehcache-spring
  21. http://ehcache-spring-annotations.googlecode.com/svn/schema/ehcache-spring/ehcache-spring-1.1.xsd
  22. http://www.springframework.org/schema/cache
  23. http://www.springframework.org/schema/cache/spring-cache-4.1.xsd
  24. http://www.springframework.org/schema/tx
  25. http://www.springframework.org/schema/tx/spring-tx-3.2.xsd
  26. http://www.springframework.org/schema/task
  27. http://www.springframework.org/schema/task/spring-task-3.1.xsd
  28. http://www.springframework.org/schema/websocket
  29. http://www.springframework.org/schema/websocket/spring-websocket.xsd
  30. http://www.springframework.org/schema/context
  31. http://www.springframework.org/schema/context/spring-context-3.2.xsd">
  32. <!-- 配置自动扫描的包:不扫描控制器和异常处理 -->
  33. <context:component-scan base-package="com.iamberry">
  34. <context:exclude-filter type="annotation" expression="org.springframework.stereotype.Controller" />
  35. <context:exclude-filter type="annotation" expression="org.springframework.web.bind.annotation.ControllerAdvice" />
  36. </context:component-scan>
  37. <!-- 使用CGLIB动态代理 -->
  38. <aop:aspectj-autoproxy proxy-target-class="true"/>
  39. <!-- 开启注解启动定时器 -->
  40. <task:annotation-driven/>
  41. <import resource="classpath:iamberry-app-service-datasource.xml"/>
  42. <!-- Spring -->
  43. <bean class="com.iamberry.zk.SpringContextHolder" lazy-init="false"/>
  44. <!-- 通过Dubbo 完成SOA -->
  45. <import resource="classpath:iamberry-app-service-provider.xml"/>
  46. <!-- 启动ZK 上报机器信息的节点 -->
  47. <bean class="com.iamberry.zk.StartZK" lazy-init="false"/>
  48. </beans>