| | |
| | | <?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:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx" |
| | | xmlns:cache="http://www.springframework.org/schema/cache" xmlns:task="http://www.springframework.org/schema/task" |
| | | xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.3.xsd |
| | | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| | | xmlns:context="http://www.springframework.org/schema/context" |
| | | xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx" |
| | | xmlns:cache="http://www.springframework.org/schema/cache" xmlns:task="http://www.springframework.org/schema/task" |
| | | xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.3.xsd |
| | | http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.3.xsd |
| | | http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-4.3.xsd |
| | | http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.3.xsd |
| | | http://www.springframework.org/schema/cache http://www.springframework.org/schema/cache/spring-cache.xsd |
| | | http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task.xsd"> |
| | | |
| | | <!-- 配置自动扫描的包,使其自动注入到IOC容器 --> |
| | | <context:component-scan base-package="com.ruili.**" /> |
| | | <!-- 配置自动扫描的包,使其自动注入到IOC容器 --> |
| | | <context:component-scan base-package="com.ruili.**,com.zbooksoft.**"/> |
| | | |
| | | <!-- 启用缓存注解功能(需要配置在Spring主配置文件中) --> |
| | | <cache:annotation-driven cache-manager="ehcacheManager" /> |
| | | <!-- 启用缓存注解功能(需要配置在Spring主配置文件中) --> |
| | | <cache:annotation-driven cache-manager="ehcacheManager"/> |
| | | |
| | | <task:annotation-driven scheduler="myScheduler" /> |
| | | <task:annotation-driven scheduler="myScheduler"/> |
| | | |
| | | <task:scheduler id="myScheduler" pool-size="5" /> |
| | | <task:scheduler id="myScheduler" pool-size="5"/> |
| | | |
| | | <!-- ureport2配置内置数据源 --> |
| | | <bean id="buildinDatasource" class="com.ruili.wcp.common.report.UreportBuildinDatasource"> |
| | | <property name="dataSource" ref="dataSource"></property> |
| | | </bean> |
| | | <!-- ureport2配置内置数据源 --> |
| | | <bean id="buildinDatasource" class="com.ruili.wcp.common.report.UreportBuildinDatasource"> |
| | | <property name="dataSource" ref="dataSource"></property> |
| | | </bean> |
| | | |
| | | <!-- 基于spring实现的缓存管理器 --> |
| | | <bean id="ehcacheManager" class="org.springframework.cache.ehcache.EhCacheCacheManager"> |
| | | <property name="cacheManager" ref="cacheManagerFactory" /> |
| | | </bean> |
| | | <!-- 基于spring实现的缓存管理器 --> |
| | | <bean id="ehcacheManager" class="org.springframework.cache.ehcache.EhCacheCacheManager"> |
| | | <property name="cacheManager" ref="cacheManagerFactory"/> |
| | | </bean> |
| | | |
| | | <!--加载ehcache的相关配置 --> |
| | | <bean id="cacheManagerFactory" |
| | | class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean"> |
| | | <property name="configLocation" value="classpath:ehcache.xml" /> |
| | | <property name="shared" value="true"></property> |
| | | </bean> |
| | | <!--加载ehcache的相关配置 --> |
| | | <bean id="cacheManagerFactory" |
| | | class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean"> |
| | | <property name="configLocation" value="classpath:ehcache.xml"/> |
| | | <property name="shared" value="true"></property> |
| | | </bean> |
| | | |
| | | <!-- spring 线程池的配置 begin --> |
| | | <context:property-placeholder location="classpath:spring-thread.properties" |
| | | ignore-unresolvable="true" order="1" /> |
| | | <bean id="taskExecutor" |
| | | class="org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor"> |
| | | <!-- 核心线程数 --> |
| | | <property name="corePoolSize" value="${core_pool_size}" /> |
| | | <!-- 最大线程数 --> |
| | | <property name="maxPoolSize" value="${max_pool_size}" /> |
| | | <!-- 队列最大长度 --> |
| | | <property name="queueCapacity" value="${queue_capacity}" /> |
| | | <!-- 线程池维护线程所允许的空闲时间,默认为60s --> |
| | | <property name="keepAliveSeconds" value="${keep_alive_seconds}" /> |
| | | </bean> |
| | | <!-- 用于IO操作的系统池 --> |
| | | <bean id="ioTaskExecutor" |
| | | class="org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor"> |
| | | <!-- 核心线程数 --> |
| | | <property name="corePoolSize" value="20" /> |
| | | <!-- 最大线程数 --> |
| | | <property name="maxPoolSize" value="100" /> |
| | | <!-- 队列最大长度 --> |
| | | <property name="queueCapacity" value="1000" /> |
| | | <!-- 线程池维护线程所允许的空闲时间,默认为60s --> |
| | | <property name="keepAliveSeconds" value="60" /> |
| | | </bean> |
| | | <!-- spring 线程池的配置 end --> |
| | | <!-- spring 线程池的配置 begin --> |
| | | <context:property-placeholder location="classpath:spring-thread.properties" |
| | | ignore-unresolvable="true" order="1"/> |
| | | <bean id="taskExecutor" |
| | | class="org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor"> |
| | | <!-- 核心线程数 --> |
| | | <property name="corePoolSize" value="${core_pool_size}"/> |
| | | <!-- 最大线程数 --> |
| | | <property name="maxPoolSize" value="${max_pool_size}"/> |
| | | <!-- 队列最大长度 --> |
| | | <property name="queueCapacity" value="${queue_capacity}"/> |
| | | <!-- 线程池维护线程所允许的空闲时间,默认为60s --> |
| | | <property name="keepAliveSeconds" value="${keep_alive_seconds}"/> |
| | | </bean> |
| | | <!-- 用于IO操作的系统池 --> |
| | | <bean id="ioTaskExecutor" |
| | | class="org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor"> |
| | | <!-- 核心线程数 --> |
| | | <property name="corePoolSize" value="20"/> |
| | | <!-- 最大线程数 --> |
| | | <property name="maxPoolSize" value="100"/> |
| | | <!-- 队列最大长度 --> |
| | | <property name="queueCapacity" value="1000"/> |
| | | <!-- 线程池维护线程所允许的空闲时间,默认为60s --> |
| | | <property name="keepAliveSeconds" value="60"/> |
| | | </bean> |
| | | <!-- spring 线程池的配置 end --> |
| | | |
| | | <!-- 导入其他配置文件 --> |
| | | <import resource="spring-shiro.xml" /> |
| | | <import resource="spring-mybatis.xml" /> |
| | | <import resource="spring-wcp.xml" /> |
| | | <import resource="spring-quartz.xml" /> |
| | | <!-- 导入ureport配置文件 --> |
| | | <import resource="classpath:ureport-console-context.xml" /> |
| | | <!-- 导入其他配置文件 --> |
| | | <import resource="spring-shiro.xml"/> |
| | | <import resource="spring-mybatis.xml"/> |
| | | <import resource="spring-wcp.xml"/> |
| | | <import resource="spring-quartz.xml"/> |
| | | <!-- 导入ureport配置文件 --> |
| | | <import resource="classpath:ureport-console-context.xml"/> |
| | | </beans> |