<?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:tx="http://www.springframework.org/schema/tx" xmlns:jdbc="http://www.springframework.org/schema/jdbc"
xmlns:task="http://www.springframework.org/schema/task" xmlns:cache="http://www.springframework.org/schema/cache"
xmlns:p="http://www.springframework.org/schema/p"
xsi:schemaLocation="http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc.xsd
http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/cache http://www.springframework.org/schema/cache/spring-cache.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.xsd">
<bean id="propertyConfigurer"
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<list>
<value>file:${user.dir}/conf/log4j.properties</value>
<value>file:${user.dir}/conf/mysql.properties</value>
<value>file:${user.dir}/conf/memcache.properties</value>
<value>file:${user.dir}/conf/redis.properties</value>
</list>
</property>
</bean>
<context:component-scan base-package="com.xyh.oversea.offer.dao" />
<!-- jdbc dataSource-->
<bean id="db" class="org.logicalcobwebs.proxool.ProxoolDataSource">
<property name="driver">
<value>${mysql.driver}</value>
</property>
<property name="driverUrl">
<value>${mysql.adsurl}</value>
</property>
<property name="user" value="${mysql.username}" />
<property name="password" value="${mysql.password}" />
<property name="alias" value="Ads" />
<property name="maximumActiveTime" value="${mysql.maxActiveTime}" />
<property name="maximumConnectionCount" value="${mysql.maxConnCount}" />
<property name="minimumConnectionCount" value="${mysql.minConnCount}" />
<property name="simultaneousBuildThrottle" value="${mysql.buildThrottle}" />
<property name="houseKeepingTestSql" value="${mysql.keepTestSql}" />
</bean> <!-- memcache -->
<bean name="memcachedClientBuilder" class="net.rubyeye.xmemcached.XMemcachedClientBuilder">
<constructor-arg>
<list>
<bean class="java.net.InetSocketAddress">
<constructor-arg>
<value>${xmemcache.host}</value>
</constructor-arg>
<constructor-arg>
<value>${xmemcache.port}</value>
</constructor-arg>
</bean>
</list>
</constructor-arg>
<property name="connectionPoolSize">
<value>${xmemcache.connection.pool}</value>
</property>
<property name="commandFactory">
<bean class="net.rubyeye.xmemcached.command.BinaryCommandFactory"></bean>
</property>
<property name="sessionLocator">
<bean class="net.rubyeye.xmemcached.impl.KetamaMemcachedSessionLocator"></bean>
</property>
<property name="transcoder">
<bean class="net.rubyeye.xmemcached.transcoders.SerializingTranscoder" />
</property>
</bean>
<bean name="memcachedClient" factory-bean="memcachedClientBuilder"
factory-method="build" destroy-method="shutdown" />
<bean id="redisPoolConfig" class="redis.clients.jedis.JedisPoolConfig">
<property name="maxTotal" value="${redis.maxTotal}" />
<property name="maxIdle" value="${redis.maxIdle}" />
<property name="maxWaitMillis" value="${redis.maxWaitMillis}"/>
<property name="timeBetweenEvictionRunsMillis" value="${redis.timeBetweenEvictionRunsMillis}" />
<property name="minEvictableIdleTimeMillis" value="${redis.minEvictableIdleTimeMillis}" />
<property name="testOnBorrow" value="${redis.testOnBorrow}" />
</bean>
<bean id="redisConfig" class="com.xyh.oversea.offer.cache.redis.RedisConfig">
<property name="host" value="${redis.host}" />
<property name="port" value="${redis.port}" />
<property name="timeOut" value="${redis.timeOut}"/>
<property name="jedisPoolConfig" ref="redisPoolConfig" />
</bean>
<bean id="pullOfferJob" class="com.xyh.oversea.offer.jobs.PullOfferJob">
<property name="version" value="1"/>
<property name="os" value="cps"/>
</bean>
<bean id="updateOffers"
class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
<property name="targetObject">
<ref bean="pullOfferJob" />
</property>
<property name="targetMethod">
<value>updateOffers</value>
</property>
</bean>
<bean id="updatePostCallBack"
class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
<property name="targetObject">
<ref bean="pullOfferJob" />
</property>
<property name="targetMethod">
<value>updatePostCallBack</value>
</property>
</bean>
<bean id="pullOffer"
class="org.springframework.scheduling.quartz.CronTriggerFactoryBean">
<property name="jobDetail">
<ref bean="updateOffers" />
</property>
<property name="cronExpression">
<value>30 0/11 * * * ?</value>
</property>
</bean>
<bean id="updateClick"
class="org.springframework.scheduling.quartz.CronTriggerFactoryBean">
<property name="jobDetail">
<ref bean="updatePostCallBack" />
</property>
<property name="cronExpression">
<value>0 27 20 * * ?</value>
</property>
</bean>
<bean id="startQuertz" lazy-init="false" autowire="no"
class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
<property name="triggers">
<list>
<ref bean="pullOffer" />
<!-- <ref bean="updateClick" /> -->
</list>
</property>
</bean>
</beans>

  

最新文章

  1. GacUI学习(一)
  2. Asp.net mvc web api 在项目中的实际应用
  3. Keil的使用-1创建项目和工程
  4. WebGL 在 OpenGL ES 指令 iOS 在 C 分歧版指令分析
  5. Android常用Permission
  6. SQL Server 通过SQL脚本启动Broker并设置兼容性
  7. Go 初体验 - 错误与异常处理
  8. Foundry feats. MultiverseStudio
  9. apache反向代理出现502调整
  10. js中判断数据类型的4中方法
  11. gcc 编译 汇编 链接
  12. 无法定位程序输入点 InitializeCriticalSectionEx、GetTickCount64
  13. MFC树形控件的使用(右键点击)
  14. Makefile ------ $@ $^ %&lt; 使用
  15. 4、Python中的类详解(0601)
  16. html文件form表单action调用servlet连接mysql数据库实例
  17. netty-socketio 示例代码
  18. ECMAScript6语法检查规范错误信息说明
  19. 删除 center os7 openjdk
  20. CSectsInfomation.h文件

热门文章

  1. python 安装 setuptools Compression requires the (missing) zlib module 的解决方案
  2. iOS 进阶 第三天(0326)
  3. Ha ha lou!
  4. STL学习二:Vector容器
  5. easyui的datagrid和panel如何让标题动态改变?
  6. WPF解析Fnt字体
  7. php发送get、post请求的几种方法
  8. [algorithm]求最长公共子序列问题
  9. vi 常用技巧
  10. WEB前端常用的测试工具