<?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"
	default-lazy-init="true"
    xmlns:task="http://www.springframework.org/schema/task"
	xmlns:aop="http://www.springframework.org/schema/aop"
	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://www.springframework.org/schema/task
		http://www.springframework.org/schema/task/spring-task-3.1.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">
		<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"/>
    
    <!-- 配置springContextHolder -->
    <bean class="com.iamberry.zk.SpringContextHolder" lazy-init="false" />

	<!-- 开启注解启动 -->
    <task:annotation-driven executor="asyncExecutor" scheduler="schedulerExecutor"/>
	<task:executor id="asyncExecutor" pool-size="20" queue-capacity="10"/>
	<task:scheduler id="schedulerExecutor" pool-size="10"/>

	<!-- DB -->
	<import resource="classpath:db.xml"/>
	<!-- Shiro -->
	<import resource="classpath:shiro.xml"/>
</beans>
