123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141 |
- <?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:p="http://www.springframework.org/schema/p"
- xmlns:tx="http://www.springframework.org/schema/tx" xmlns:aop="http://www.springframework.org/schema/aop"
- xmlns:context="http://www.springframework.org/schema/context"
- xmlns:util="http://www.springframework.org/schema/util" xmlns:cache="http://www.springframework.org/schema/cache"
- xsi:schemaLocation="
- http://www.springframework.org/schema/beans
- http://www.springframework.org/schema/beans/spring-beans-3.2.xsd
- http://www.springframework.org/schema/tx
- http://www.springframework.org/schema/tx/spring-tx-3.2.xsd
- http://www.springframework.org/schema/context
- http://www.springframework.org/schema/context/spring-context-3.2.xsd
- http://www.springframework.org/schema/util
- http://www.springframework.org/schema/util/spring-util-3.2.xsd
- http://www.springframework.org/schema/cache
- http://www.springframework.org/schema/cache/spring-cache-3.2.xsd
- http://www.springframework.org/schema/aop
- http://www.springframework.org/schema/aop/spring-aop-3.2.xsd">
- <context:annotation-config />
- <tx:annotation-driven />
- <!-- <cache:annotation-driven cache-manager="cacheManager" /> -->
- <context:component-scan base-package="com.tl.cdz">
- <context:exclude-filter type="annotation"
- expression="org.springframework.stereotype.Controller" />
- </context:component-scan>
- <bean id="propertyConfigurer" class="com.xc.opal.base.utils.ApplicationPropertyUtils">
- <property name="ignoreUnresolvablePlaceholders" value="true" />
- <property name="locations">
- <list>
- <value>/WEB-INF/config/platform/jdbc.properties</value>
- <value>/WEB-INF/config/platform/platform.properties</value>
- </list>
- </property>
- </bean>
- <bean id="dataSource" class="com.jolbox.bonecp.BoneCPDataSource"
- destroy-method="close">
- <property name="driverClass" value="${jdbc.driverClassName}" />
- <property name="jdbcUrl" value="${jdbc.url}" />
- <property name="username" value="${jdbc.username}" />
- <property name="password" value="${jdbc.password}" />
- <property name="idleConnectionTestPeriodInMinutes" value="60" />
- <property name="idleMaxAgeInMinutes" value="240" />
- <property name="partitionCount" value="3" />
- <property name="maxConnectionsPerPartition" value="30" />
- <property name="minConnectionsPerPartition" value="10" />
- <property name="acquireIncrement" value="5" />
- <property name="statementsCacheSize" value="100" />
- <property name="releaseHelperThreads" value="3" />
- <property name="statementReleaseHelperThreads" value="3" />
- </bean>
-
-
-
-
-
-
- <bean id="jdbcTemplate" class="org.springframework.jdbc.core.JdbcTemplate">
- <property name="dataSource" ref="dataSource" />
- </bean>
-
-
- <bean id="transactionManager"
- class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
- <property name="dataSource" ref="dataSource"></property>
- </bean>
- <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
- <property name="dataSource" ref="dataSource" />
- <!-- 自动扫描映射xml文件,可以多个 -->
- <property name="mapperLocations">
- <list>
- <value>classpath*:com/tl/cdz/third/**/*Mapper.xml</value>
- </list>
- </property>
- <!-- 配置自定义类型转换包路径 -->
- <property name="plugins">
- <array>
- <bean class="com.github.pagehelper.PageHelper">
- <property name="properties">
- <value>
- dialect=mysql
- offsetAsPageNum=true
- rowBoundsWithCount=true
- reasonable=true
- cacheEnabled=false
- </value>
- </property>
- </bean>
- </array>
- </property>
- </bean>
- <!--MyBatis的sqlSession配置 -->
- <bean id="sqlSessionTemplate" class="org.mybatis.spring.SqlSessionTemplate">
- <constructor-arg index="0" ref="sqlSessionFactory" />
- </bean>
- <bean id="ApplicationHelper" class="com.xc.opal.base.common.ApplicationHelper"></bean>
- <!-- cache -->
- <!-- <bean id="cacheManager" class="org.springframework.cache.ehcache.EhCacheCacheManager"
- p:cache-manager-ref="ehcache" />
- <bean id="ehcache"
- class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean"
- p:config-location="/WEB-INF/config/platform/ehcache.xml" />
- -->
- <!-- restTemplate配置 -->
- <bean id="httpClientFactory"
- class="com.xc.opal.common.resttemplate.HttpClientHttpRequestFactory">
- <constructor-arg type="java.lang.String" value="http" />
- <constructor-arg type="java.lang.String" value="9090" />
- </bean>
- <bean id="restTemplate" class="com.xc.opal.common.resttemplate.OpalRestTemplate">
- <constructor-arg ref="httpClientFactory" />
- <property name="restUrl" value="${ISC_ADAPTER_URL}" />
- <property name="messageConverters">
- <list>
- <bean
- class="org.springframework.http.converter.json.MappingJacksonHttpMessageConverter" />
- <bean class="org.springframework.http.converter.FormHttpMessageConverter" />
- <bean
- class="org.springframework.http.converter.xml.SourceHttpMessageConverter" />
- </list>
- </property>
- </bean>
- <!-- <bean id="restTemplate" class="org.springframework.web.client.RestTemplate">
- <constructor-arg ref="httpClientFactory" /> <property name="messageConverters">
- <list> <bean class="org.springframework.http.converter.json.MappingJacksonHttpMessageConverter"
- /> <bean class="org.springframework.http.converter.FormHttpMessageConverter"
- /> <bean class="org.springframework.http.converter.xml.SourceHttpMessageConverter"
- /> </list> </property> </bean> -->
-
- <!-- SMS短信服务配置 -->
- <!-- <import resource="applicationContext-sms.xml" /> -->
- <import resource="applicationContext-msdk.xml" />
- <import resource="applicationContext-call.xml"/>
- </beans>
|