12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- <?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"
- xmlns:ehcache="http://ehcache-spring-annotations.googlecode.com/svn/schema/ehcache-spring"
- xmlns:cache="http://www.springframework.org/schema/cache"
- xmlns:tx="http://www.springframework.org/schema/tx"
- default-autowire="byName"
- default-lazy-init="true"
- xmlns:task="http://www.springframework.org/schema/task"
- xmlns:aop="http://www.springframework.org/schema/aop"
- xmlns:ehcache-spring="http://ehcache-spring-annotations.googlecode.com/svn/schema/ehcache-spring"
- xmlns:p="http://www.springframework.org/schema/p"
- xmlns:websocket="http://www.springframework.org/schema/websocket"
- xsi:schemaLocation=
- "http://www.springframework.org/schema/aop
- http://www.springframework.org/schema/aop/spring-aop-4.1.xsd
- http://www.springframework.org/schema/beans
- http://www.springframework.org/schema/beans/spring-beans.xsd
- http://ehcache-spring-annotations.googlecode.com/svn/schema/ehcache-spring
- http://ehcache-spring-annotations.googlecode.com/svn/schema/ehcache-spring/ehcache-spring-1.1.xsd
- http://www.springframework.org/schema/cache
- http://www.springframework.org/schema/cache/spring-cache-4.1.xsd
- http://www.springframework.org/schema/tx
- http://www.springframework.org/schema/tx/spring-tx-3.2.xsd
- http://www.springframework.org/schema/task
- http://www.springframework.org/schema/task/spring-task-3.1.xsd
- http://www.springframework.org/schema/websocket
- http://www.springframework.org/schema/websocket/spring-websocket.xsd
- http://www.springframework.org/schema/context
- http://www.springframework.org/schema/context/spring-context-3.2.xsd">
- <context:component-scan base-package="com.iamberry.app.international" />
-
- <!-- 配置自动扫描的包:不扫描控制器和异常处理 -->
- <context:component-scan base-package="com.iamberry">
- <context:exclude-filter type="annotation" expression="org.springframework.stereotype.Controller" />
- <context:exclude-filter type="annotation" expression="org.springframework.web.bind.annotation.ControllerAdvice" />
- </context:component-scan>
-
- <!-- 使用CGLIB动态代理 -->
- <aop:aspectj-autoproxy proxy-target-class="true"/>
- <!-- 开启这个配置,spring才能识别@Scheduled注解 -->
- <task:annotation-driven/>
- <!-- 配置数据库 -->
- <import resource="classpath:iamberry-app-api-datasource.xml"/>
-
- <!-- spring监控 -->
- <bean id="druid-stat-interceptor" class="com.alibaba.druid.support.spring.stat.DruidStatInterceptor">
- </bean>
- <bean id="druid-stat-pointcut" class="org.springframework.aop.support.JdkRegexpMethodPointcut" scope="prototype">
- <property name="patterns">
- <list>
- <value>com.iamberry.app.service.*</value>
- <value>com.iamberry.app.mapper.*</value>
- </list>
- </property>
- </bean>
- <aop:config proxy-target-class="true">
- <aop:advisor advice-ref="druid-stat-interceptor" pointcut-ref="druid-stat-pointcut" />
- </aop:config>
- </beans>
|