123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109 |
- <?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:aop="http://www.springframework.org/schema/aop"
- xmlns:context="http://www.springframework.org/schema/context"
- xmlns:dwr="http://www.directwebremoting.org/schema/spring-dwr"
- xmlns:jdbc="http://www.springframework.org/schema/jdbc" xmlns:tx="http://www.springframework.org/schema/tx"
- xmlns:jpa="http://www.springframework.org/schema/data/jpa" xmlns:task="http://www.springframework.org/schema/task"
- xsi:schemaLocation="
- http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
- http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.1.xsd
- http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd
- http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc-3.1.xsd
- http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.1.xsd
- http://www.directwebremoting.org/schema/spring-dwr http://www.directwebremoting.org/schema/spring-dwr-3.0.xsd
- http://www.springframework.org/schema/data/jpa http://www.springframework.org/schema/data/jpa/spring-jpa.xsd
- http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task-3.1.xsd">
-
- <!-- 读入配置属性文件 -->
- <context:property-placeholder location="classpath:/dbconfig.properties,classpath:/application.properties"/>
- <!-- 持久化扫描 -->
- <context:component-scan base-package="com.rtrh.core.repository" />
-
- <context:component-scan base-package="com.rtrh.projects" />
-
- <!-- 注入shiro中需要的依赖 -->
- <context:component-scan base-package="com.team" />
-
-
-
-
- <!-- 系统核心插件扫描 -->
- <context:component-scan base-package="com.rtrh.core.plugins" annotation-config="true">
- <context:exclude-filter type="annotation" expression="org.springframework.stereotype.Controller"/>
- </context:component-scan>
-
- <!-- 系统通用模块扫描 -->
- <context:component-scan base-package="com.rtrh.common.modules" annotation-config="true">
- <context:exclude-filter type="annotation" expression="org.springframework.stereotype.Controller"/>
- </context:component-scan>
-
- <!-- 核心security扫描
- <context:component-scan base-package="com.rtrh.core.security" annotation-config="true">
- <context:exclude-filter type="annotation" expression="org.springframework.stereotype.Controller"/>
- </context:component-scan>
- -->
-
- <context:component-scan base-package="com.rtrh.projects.modules" annotation-config="true">
- <context:exclude-filter type="annotation"
- expression="org.springframework.stereotype.Controller" />
- </context:component-scan>
-
- <!-- Activates scanning of @Autowired -->
- <context:annotation-config />
-
- <!-- 事件管理配置 -->
- <import resource="classpath*:/rtrh-event.xml" />
- <!-- 文件库配置 -->
- <import resource="classpath*:/rtrh-filesystem.xml" />
- <!-- 邮箱配置 -->
- <!-- <import resource="classpath*:/rtrh-email.xml" /> -->
- <!-- 短信配置 -->
- <import resource="classpath*:/rtrh-vcode.xml" />
-
- <!-- 加解密配置 -->
- <import resource="classpath*:/rtrh-crypto.xml" />
-
- <!-- 定时任务 -->
- <import resource="classpath*:/rtrh-schedule.xml" />
-
- <!-- 数据源定义 -->
- <import resource="classpath*:/rtrh-datasource.xml" />
- <import resource="classpath*:/rtrh-hibernate.xml" />
- <import resource="classpath*:/rtrh-mybatis.xml" />
-
- <import resource="classpath:/applicationContext-memcached.xml" />
- <import resource="classpath:security/applicationContext-shiro.xml" />
-
- <!-- 线程池 -->
- <bean id="threadPool" scope="prototype" class="org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor">
- <!-- 线程池维护线程的最少数量 -->
- <property name="corePoolSize" value="50" />
- <!-- 线程池维护线程所允许的空闲时间 -->
- <property name="keepAliveSeconds" value="300000" />
- <!-- 线程池维护线程的最大数量 -->
- <property name="maxPoolSize" value="2000" />
- <!-- 线程池所使用的缓冲队列 -->
- <property name="queueCapacity" value="1000000" />
- <property name="rejectedExecutionHandler">
- <bean class="java.util.concurrent.ThreadPoolExecutor$CallerRunsPolicy" />
- </property>
- </bean>
- <!-- 方法拦截器,跟踪方法调用 -->
- <bean id="ExecutionMethodInterceptor" class="com.rtrh.core.spring.intercepter.ExecutionMethodInterceptor" />
- <aop:config proxy-target-class="true">
- <!-- !execution(* com.xxx.flipclass.sdk.client.interfaces..*.loginInfoService.*(..))
- and (execution(* com.xxx.*.sdk.client.interfaces..*.*Client*.*(..))
- || execution(* com.xxx.*.sdk.client.interfaces..*.*Service*.*(..)))
- -->
- <aop:pointcut id="ExecutionMethodPointcut" expression="execution(* com.rtrh.core.modules..*.*Manager.*(..))" />
- <aop:advisor advice-ref="ExecutionMethodInterceptor" pointcut-ref="ExecutionMethodPointcut" />
- </aop:config>
-
- <beans profile="development,test">
- </beans>
- </beans>
|