123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed to Jasig under one or more contributor license
- agreements. See the NOTICE file distributed with this work
- for additional information regarding copyright ownership.
- Jasig licenses this file to you under the Apache License,
- Version 2.0 (the "License"); you may not use this file
- except in compliance with the License. You may obtain a
- copy of the License at the following location:
- http://www.apache.org/licenses/LICENSE-2.0
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
- -->
- <beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:task="http://www.springframework.org/schema/task"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:context="http://www.springframework.org/schema/context"
- xmlns:tx="http://www.springframework.org/schema/tx"
- xmlns:p="http://www.springframework.org/schema/p" xmlns:aop="http://www.springframework.org/schema/aop"
- 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/tx http://www.springframework.org/schema/tx/spring-tx.xsd
- http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd
- http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task-3.1.xsd">
- <description>
- This is the main Spring configuration file with some of the main "core" classes defined. You shouldn't really
- modify this unless you
- know what you're doing!
- </description>
-
- <!-- 使用annotation 自动注册bean, 并保证@Required、@Autowired的属性被注入. @Controller的Bean注入在spring-mvc.xml中自动注册 -->
- <context:component-scan base-package="com.jsjty">
- <context:exclude-filter type="annotation" expression="org.springframework.stereotype.Controller" />
- </context:component-scan>
- <context:annotation-config/>
- <!--
- Including this aspectj-autoproxy element will cause spring to automatically
- create proxies around any beans defined in this file that match the pointcuts
- of any aspects defined in this file.
- -->
- <aop:aspectj-autoproxy/>
-
- <!--
- Declare the TimingAspect that we want to weave into the other beans
- defined in this config file.
- -->
- <bean id="timingAspect" class="org.perf4j.log4j.aop.TimingAspect"/>
-
- <!-- Message source for this context, loaded from localized "messages_xx" files -->
- <bean id="messageSource" class="org.springframework.context.support.ResourceBundleMessageSource"
- p:basename="messages"/>
- <bean
- id="servicesManager"
- class="org.jasig.cas.services.DefaultServicesManagerImpl">
- <constructor-arg index="0" ref="serviceRegistryDao"/>
- </bean>
- <!--
- Job to periodically reload services from service registry.
- This job is needed for a clustered CAS environment since service changes
- in one CAS node are not known to the other until a reload.
- -->
- <bean id="serviceRegistryReloaderJobDetail"
- class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean"
- p:targetObject-ref="servicesManager"
- p:targetMethod="reload"/>
- <bean id="periodicServiceRegistryReloaderTrigger" class="org.springframework.scheduling.quartz.SimpleTriggerBean"
- p:jobDetail-ref="serviceRegistryReloaderJobDetail"
- p:startDelay="${service.registry.quartz.reloader.startDelay:120000}"
- p:repeatInterval="${service.registry.quartz.reloader.repeatInterval:120000}"/>
- <bean id="httpClient" class="org.jasig.cas.util.HttpClient"
- p:readTimeout="5000"
- p:connectionTimeout="5000"/>
- <bean id="noRedirectHttpClient" class="org.jasig.cas.util.HttpClient" parent="httpClient"
- p:followRedirects="false" />
- <bean id="persistentIdGenerator"
- class="org.jasig.cas.authentication.principal.ShibbolethCompatiblePersistentIdGenerator"
- p:salt="casrocks"/>
- <!-- CentralAuthenticationService -->
- <bean id="centralAuthenticationService" class="org.jasig.cas.CentralAuthenticationServiceImpl"
- p:ticketGrantingTicketExpirationPolicy-ref="grantingTicketExpirationPolicy"
- p:serviceTicketExpirationPolicy-ref="serviceTicketExpirationPolicy"
- p:authenticationManager-ref="authenticationManager"
- p:ticketGrantingTicketUniqueTicketIdGenerator-ref="ticketGrantingTicketUniqueIdGenerator"
- p:ticketRegistry-ref="ticketRegistry"
- p:servicesManager-ref="servicesManager"
- p:persistentIdGenerator-ref="persistentIdGenerator"
- p:uniqueTicketIdGeneratorsForService-ref="uniqueIdGeneratorsMap"/>
- <bean id="proxy10Handler" class="org.jasig.cas.ticket.proxy.support.Cas10ProxyHandler"/>
- <bean id="proxy20Handler" class="org.jasig.cas.ticket.proxy.support.Cas20ProxyHandler"
- p:httpClient-ref="httpClient"
- p:uniqueTicketIdGenerator-ref="proxy20TicketUniqueIdGenerator"/>
- <!-- ADVISORS -->
- <bean id="advisorAutoProxyCreator"
- class="org.springframework.aop.framework.autoproxy.DefaultAdvisorAutoProxyCreator"/>
- <bean id="validationAnnotationBeanPostProcessor" class="org.jasig.cas.util.CustomBeanValidationPostProcessor"
- p:afterInitialization="true" />
- <!-- The scheduler bean wires up any triggers that define scheduled tasks -->
- <bean id="scheduler" class="org.jasig.cas.util.AutowiringSchedulerFactoryBean"/>
-
- <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"
- destroy-method="close" lazy-init="false">
- <property name="driverClassName">
- <value>oracle.jdbc.driver.OracleDriver</value>
- </property>
- <property name="url">
- <value>${config.jdbc.url}</value>
- </property>
- <property name="username">
- <value>${config.jdbc.username}</value>
- </property>
- <property name="password">
- <value>${config.jdbc.password}</value>
- </property>
- <!-- Connection Pooling Info -->
- <!-- 连接池启动时的初始值 -->
- <!-- <property name="initialSize" value="${dbcp.initialSize}" /> -->
- <!-- 最大连接数据库连接数,设置为0时,表示没有限制 -->
- <property name="maxActive" value="100" />
- <!-- 最大等待连接中的数量,设置为0时,表示没有限制 -->
- <property name="maxIdle" value="10" />
- <!-- 最小等待连接中的数量,设置为0时,表示没有限制 -->
- <property name="minIdle" value="5" />
- <!-- sql验证 主要是防止重启数据库时,去先前已有的连接时报错,这个是在需要连接验证时用到 -->
- <property name="validationQuery" value="select 1 from dual" />
- <!-- 取出连接时进行有效性验证 默认是true,设置为false,提高性能 -->
- <property name="testOnBorrow" value="false" />
- <!-- 最大等待时间 -->
- <property name="maxWait" value="60000" />
- <!-- 设置从数据源中返回的连接是否采用自动提交机制,默认值为 true -->
- <property name="defaultAutoCommit" value="false" />
- <!-- 每30秒运行一次空闲连接回收器,如果当前连接数小于minIdle会去创建 -->
- <property name="timeBetweenEvictionRunsMillis" value="300000" />
- <!-- 池中的连接空闲30分钟后被回收 -->
- <property name="minEvictableIdleTimeMillis" value="1800000" />
- </bean>
- <bean id="aqdataSource" class="org.apache.commons.dbcp.BasicDataSource"
- destroy-method="close" lazy-init="false">
- <property name="driverClassName">
- <value>oracle.jdbc.driver.OracleDriver</value>
- </property>
- <property name="url">
- <value>${config.jdbc.aqurl}</value>
- </property>
- <property name="username">
- <value>${config.jdbc.aqusername}</value>
- </property>
- <property name="password">
- <value>${config.jdbc.aqpassword}</value>
- </property>
- <!-- Connection Pooling Info -->
- <!-- 连接池启动时的初始值 -->
- <!-- <property name="initialSize" value="${dbcp.initialSize}" /> -->
- <!-- 最大连接数据库连接数,设置为0时,表示没有限制 -->
- <property name="maxActive" value="100" />
- <!-- 最大等待连接中的数量,设置为0时,表示没有限制 -->
- <property name="maxIdle" value="10" />
- <!-- 最小等待连接中的数量,设置为0时,表示没有限制 -->
- <property name="minIdle" value="5" />
- <!-- sql验证 主要是防止重启数据库时,去先前已有的连接时报错,这个是在需要连接验证时用到 -->
- <property name="validationQuery" value="select 1 from dual" />
- <!-- 取出连接时进行有效性验证 默认是true,设置为false,提高性能 -->
- <property name="testOnBorrow" value="false" />
- <!-- 最大等待时间 -->
- <property name="maxWait" value="60000" />
- <!-- 设置从数据源中返回的连接是否采用自动提交机制,默认值为 true -->
- <property name="defaultAutoCommit" value="false" />
- <!-- 每30秒运行一次空闲连接回收器,如果当前连接数小于minIdle会去创建 -->
- <property name="timeBetweenEvictionRunsMillis" value="300000" />
- <!-- 池中的连接空闲30分钟后被回收 -->
- <property name="minEvictableIdleTimeMillis" value="1800000" />
- </bean>
- <bean id="aisdataSource" class="org.apache.commons.dbcp.BasicDataSource"
- destroy-method="close" lazy-init="false">
- <property name="driverClassName">
- <value>oracle.jdbc.driver.OracleDriver</value>
- </property>
- <property name="url">
- <value>${config.jdbc.aisurl}</value>
- </property>
- <property name="username">
- <value>${config.jdbc.aisusername}</value>
- </property>
- <property name="password">
- <value>${config.jdbc.aispassword}</value>
- </property>
- <!-- Connection Pooling Info -->
- <!-- 连接池启动时的初始值 -->
- <!-- <property name="initialSize" value="${dbcp.initialSize}" /> -->
- <!-- 最大连接数据库连接数,设置为0时,表示没有限制 -->
- <property name="maxActive" value="100" />
- <!-- 最大等待连接中的数量,设置为0时,表示没有限制 -->
- <property name="maxIdle" value="10" />
- <!-- 最小等待连接中的数量,设置为0时,表示没有限制 -->
- <property name="minIdle" value="5" />
- <!-- sql验证 主要是防止重启数据库时,去先前已有的连接时报错,这个是在需要连接验证时用到 -->
- <property name="validationQuery" value="select 1 from dual" />
- <!-- 取出连接时进行有效性验证 默认是true,设置为false,提高性能 -->
- <property name="testOnBorrow" value="false" />
- <!-- 最大等待时间 -->
- <property name="maxWait" value="60000" />
- <!-- 设置从数据源中返回的连接是否采用自动提交机制,默认值为 true -->
- <property name="defaultAutoCommit" value="false" />
- <!-- 每30秒运行一次空闲连接回收器,如果当前连接数小于minIdle会去创建 -->
- <property name="timeBetweenEvictionRunsMillis" value="300000" />
- <!-- 池中的连接空闲30分钟后被回收 -->
- <property name="minEvictableIdleTimeMillis" value="1800000" />
- </bean>
- <!-- OA数据源 -->
- <bean id="oadataSource" class="org.apache.commons.dbcp.BasicDataSource"
- destroy-method="close" lazy-init="false">
- <property name="driverClassName">
- <value>oracle.jdbc.driver.OracleDriver</value>
- </property>
- <property name="url">
- <value>${config.jdbc.oaurl}</value>
- </property>
- <property name="username">
- <value>${config.jdbc.oausername}</value>
- </property>
- <property name="password">
- <value>${config.jdbc.oapassword}</value>
- </property>
- <!-- Connection Pooling Info -->
- <!-- 连接池启动时的初始值 -->
- <!-- <property name="initialSize" value="${dbcp.initialSize}" /> -->
- <!-- 最大连接数据库连接数,设置为0时,表示没有限制 -->
- <property name="maxActive" value="100" />
- <!-- 最大等待连接中的数量,设置为0时,表示没有限制 -->
- <property name="maxIdle" value="10" />
- <!-- 最小等待连接中的数量,设置为0时,表示没有限制 -->
- <property name="minIdle" value="5" />
- <!-- sql验证 主要是防止重启数据库时,去先前已有的连接时报错,这个是在需要连接验证时用到 -->
- <property name="validationQuery" value="select 1 from dual" />
- <!-- 取出连接时进行有效性验证 默认是true,设置为false,提高性能 -->
- <property name="testOnBorrow" value="false" />
- <!-- 最大等待时间 -->
- <property name="maxWait" value="60000" />
- <!-- 设置从数据源中返回的连接是否采用自动提交机制,默认值为 true -->
- <property name="defaultAutoCommit" value="false" />
- <!-- 每30秒运行一次空闲连接回收器,如果当前连接数小于minIdle会去创建 -->
- <property name="timeBetweenEvictionRunsMillis" value="300000" />
- <!-- 池中的连接空闲30分钟后被回收 -->
- <property name="minEvictableIdleTimeMillis" value="1800000" />
- </bean>
- <!--GK,建设经营,智能监管 -->
- <bean id="jdbcTemplate" class="org.springframework.jdbc.core.JdbcTemplate">
- <property name="dataSource" ref="dataSource" />
- </bean>
- <!--OA -->
- <bean id="oajdbcTemplate" class="org.springframework.jdbc.core.JdbcTemplate">
- <property name="dataSource" ref="oadataSource" />
- </bean>
- <!--事务配置 -->
- <bean id="txManager"
- class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
- <property name="dataSource" ref="dataSource" />
- <qualifier value="txManager"></qualifier>
- </bean>
-
- <!--事务配置 -->
- <bean id="txManagerAQ"
- class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
- <property name="dataSource" ref="aqdataSource" />
- <qualifier value="txManagerAQ"></qualifier>
- </bean>
-
- <!--事务配置 -->
- <bean id="txManagerAIS"
- class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
- <property name="dataSource" ref="aisdataSource" />
- <qualifier value="txManagerAIS"></qualifier>
- </bean>
- <!--事务配置 -->
- <bean id="txManagerOA"
- class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
- <property name="dataSource" ref="oadataSource" />
- <qualifier value="txManagerOA"></qualifier>
- </bean>
- <!-- 事务注解驱动,标注@Transactional的类和方法将具有事务性 -->
- <tx:annotation-driven transaction-manager="txManager" />
- <!-- 安全事务注解驱动,标注@Transactional的类和方法将具有事务性 -->
- <tx:annotation-driven transaction-manager="txManagerAQ" />
- <!-- AIS事务注解驱动,标注@Transactional的类和方法将具有事务性 -->
- <tx:annotation-driven transaction-manager="txManagerAIS" />
- <tx:annotation-driven transaction-manager="txManagerOA" />
-
- <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
- <property name="dataSource" ref="dataSource"></property>
- <property name="configLocation" value="classpath:mybatis/myBatis.xml" />
- </bean>
- <!--安全-->
- <bean id="aqsqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
- <property name="dataSource" ref="aqdataSource"></property>
- <property name="configLocation" value="classpath:mybatis/aqMyBatis.xml" />
- </bean>
- <!--岸基-->
- <bean id="aissqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
- <property name="dataSource" ref="aisdataSource"></property>
- <property name="configLocation" value="classpath:mybatis/aisMyBatis.xml" />
- </bean>
- <!-- oa -->
- <bean id="oasqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
- <property name="dataSource" ref="oadataSource"></property>
- <property name="configLocation" value="classpath:mybatis/oaMyBatis.xml" />
- </bean>
- <!-- 扫描mapper.java -->
- <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
- <property name="basePackage" value="com.jsjty.**.mapper" />
- <property name="sqlSessionFactoryBeanName" value="sqlSessionFactory" />
- </bean>
- <!-- 扫描mappers.java -->
- <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
- <property name="basePackage" value="com.jsjty.**.mappers" />
- <property name="sqlSessionFactoryBeanName" value="aqsqlSessionFactory" />
- </bean>
- <!-- 扫描mapperais.java -->
- <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
- <property name="basePackage" value="com.jsjty.**.mapperais" />
- <property name="sqlSessionFactoryBeanName" value="aissqlSessionFactory" />
- </bean>
- <!-- 扫描mapperoa.java -->
- <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
- <property name="basePackage" value="com.jsjty.**.mapperoa" />
- <property name="sqlSessionFactoryBeanName" value="oasqlSessionFactory" />
- </bean>
- <!-- 定时器配置 -->
- <!-- <bean id="schedule" class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
- <property name="triggers">
- <list>
- <ref bean="AISSsxxTb"/>
- <ref bean="AISLastSsxxTb"/>
- </list>
- </property>
- </bean> -->
- <!-- <bean id="AISSsxxTb" class="org.springframework.scheduling.quartz.CronTriggerBean">
- <property name="jobDetail" ref="AISSsxxTbSxl" />
- <property name="cronExpression" value="0 0 0/2 * * ?" />
- </bean>
- <bean id="AISLastSsxxTb" class="org.springframework.scheduling.quartz.CronTriggerBean">
- <property name="jobDetail" ref="AISLastSsxxTbSxl" />
- <property name="cronExpression" value="0 0/5 * * * ?" />
- </bean> -->
- <bean id="AISSsxxTbSxl" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
- <property name="targetObject" ref="AISXxTbSxl" />
- <property name="targetMethod" value="AISssxxTb" />
- <property name="concurrent" value="false"/>
- </bean>
- <bean id="AISLastSsxxTbSxl" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
- <property name="targetObject" ref="AISXxTbSxl" />
- <property name="targetMethod" value="AISLastSsxxTb" />
- <property name="concurrent" value="false"/>
- </bean>
- <bean id="AISXxTbSxl" class="com.jsjty.zygl.aisssxx.service.AISSsxxService" scope="prototype">
- </bean>
- <bean id = "_spDao"
- class = "com.jsjty.sp.dao.impl._SpDaoImpl">
- <property name = "jdbcTemplate" ref="jdbcTemplate"/>
- </bean>
- <bean id = "menuDao"
- class = "com.jsjty.menu.dao.MenuDao">
- <property name = "jdbcTemplate" ref="jdbcTemplate"/>
- </bean>
- </beans>
|