<?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:solr="http://www.springframework.org/schema/data/solr"
xsi:schemaLocation="http://www.springframework.org/schema/data/solr http://www.springframework.org/schema/data/solr/spring-solr.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
<!-- 采用注释的方式配置bean -->
<context:annotation-config />
<bean id="configProperties"
class="org.springframework.beans.factory.config.PropertiesFactoryBean">
<property name="locations">
<list>
<value>classpath:conf.properties</value>
</list>
</property>
</bean>
<bean id="propertyConfigurer"
class="org.springframework.beans.factory.config.PreferencesPlaceholderConfigurer">
<property name="properties" ref="configProperties" />
</bean>
<!--<!– DataSource configuration 项目主数据库 –>-->
<bean id="mainDataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource">
<property name="driverClass" value="${maindata.driver}" />
<property name="jdbcUrl" value="${maindata.jdbcurl}" />
<property name="user" value="${maindata.username}" />
<property name="password" value="${maindata.password}" />
<property name="maxPoolSize" value="${maindata.maxpoolsize}" />
<property name="initialPoolSize" value="${maindata.initialpoolsize}" />
<property name="maxIdleTime" value="7200"></property>
<property name="acquireRetryDelay" value="1000"></property>
<property name="breakAfterAcquireFailure" value="false"></property>
<property name="acquireRetryAttempts" value="3" />
<property name="minPoolSize" value="${maindata.minpoolsize}" />
</bean>
<bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
<property name="dataSource" ref="mainDataSource"/>
<property name="mapperLocations">
<list>
<value>classpath*:mainOrm/*.xml</value>
</list>
</property>
</bean>
<!-- all class in the back-package are auto loaded as a mapper -->
<bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
<property name="sqlSessionFactoryBeanName" value="sqlSessionFactory"></property>
<property name="basePackage" value="com.lymsh.mommybaby.maindata.dao" />
</bean>
<!--我们自己的公网服务器库 begin-->
<bean name="masterdataSourceB" class="com.alibaba.druid.pool.DruidDataSource" init-method="init"
destroy-method="close">
<property name="url" value="${mysql.master.jdbcurl}"/>
<property name="username" value="${mysql.master.db.name}"/>
<property name="password" value="${mysql.master.db.password}"/>
<property name="initialSize" value="10"/>
<property name="maxActive" value="100"/>
<property name="maxIdle" value="10"/>
<property name="minIdle" value="0"/>
<property name="maxWait" value="10000"/>
<!-- <property name="validationQuery" value="${validationQuery3}" /> -->
<property name="testOnBorrow" value="false"/>
<property name="testOnReturn" value="false"/>
<property name="testWhileIdle" value="true"/>
<property name="timeBetweenEvictionRunsMillis" value="60000"/>
<property name="minEvictableIdleTimeMillis" value="25200000"/>
<property name="removeAbandoned" value="true"/>
<property name="removeAbandonedTimeout" value="1800"/>
<property name="logAbandoned" value="true"/>
<property name="filters" value="stat"/>
</bean>
<bean id="masterSqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
<property name="dataSource" ref="masterdataSourceB"/>
<property name="mapperLocations">
<list>
<value>classpath*:mainOrm/master/*.xml</value>
</list>
</property>
</bean>
<!-- all class in the back-package are auto loaded as a mapper -->
<bean class="org.mybatis.spring.mapper.MapperScannerConfigurer" id="configurer1">
<property name="sqlSessionFactoryBeanName" value="masterSqlSessionFactory"></property>
<property name="basePackage" value="com.lyms.platform.permission.dao.master"/>
</bean>
<context:component-scan base-package="com.lymsh.mommybaby.maindata.service.impl"/>
<context:component-scan base-package="com.lyms.platform.job.index.restore.data"/>
<context:component-scan base-package="com.lyms.platform.permission.*"/>
<context:component-scan base-package="com.lyms.platform.biz.dal.impl"/>
<context:component-scan base-package="com.lyms.platform.biz.service"/>
<import resource="spring-mongodb.xml"/>
<import resource="applicationContext-quartz.xml"/>
</beans>