多单位版国产化地质资料管理系统
py
2025-07-08 98dbfdb7bca2dbee6802421fbafb8c909b54a356
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<?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
        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.**" />
 
    <!-- 启用缓存注解功能(需要配置在Spring主配置文件中) -->
    <cache:annotation-driven cache-manager="ehcacheManager" />
 
    <task:annotation-driven scheduler="myScheduler" />
 
    <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>
 
    <!-- 基于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>
 
    <!-- 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" />
</beans>