<?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>

  

application.xml定时的更多相关文章

  1. Jsoup问题---获取http协议请求失败 org.jsoup.UnsupportedMimeTypeException: Unhandled content type. Must be text/*, application/xml, or application/xhtml+xml.

    Jsoup问题---获取http协议请求失败 1.问题:用Jsoup在获取一些网站的数据时,起初获取很顺利,但是在访问某浪的数据是Jsoup报错,应该是请求头里面的请求类型(ContextType)不 ...

  2. Jsoup获取部分页面数据失败 org.jsoup.UnsupportedMimeTypeException: Unhandled content type. Must be text/*, application/xml, or application/xhtml+xml.

    用Jsoup在获取一些网站的数据时,起初获取很顺利,但是在访问某浪的数据是Jsoup报错,应该是请求头里面的请求类型(ContextType)不符合要求. 请求代码如下: private static ...

  3. application/xml和text/xml的区别

    XML有两个MIME类型,application/xml和text/xml,它们之间的区别是: text/xml忽略xml文件头中的关于编码的设定(<?xml version="1.0 ...

  4. 有关spring-servlet.xml 和 application.xml的配置信息讲解(这两个配置信息的区别在哪里)

    在使用springmvc时需要配置得信息有两个,一个是spring-servlet.xml和applcation.xml: 首先两个文件的的存放位置就有一点的不同(见下图),application.x ...

  5. Springmvc配置文件application.xml 和 spring-servlet.xml

    文章来源:http://blog.csdn.net/tengdazhang770960436/article/details/48395885 1.SpringMVC 的配置分为两部分 applica ...

  6. application/xml 和 text/xml的区别

    application/xml and text/xml的区别 经常看到有关xml时提到"application/xml" 和 "text/xml"两种类型, ...

  7. ssh2的application.xml配置文件配置详解

    ssh2的application.xml配置文件配置详解   1.导入其他的配置文件.在ssh项目中可以导入其他的配置文件,导入的格式为: <import resource="clas ...

  8. 在properties.xml中定义变量,在application.xml中取值问题

    如果为application.xml中的变量赋默认值,同时又在properties.xml中变量赋值,而加载后是取不到properties.xml中的值的问题. 解决这个问题需要加上黑体部分配置: & ...

  9. Spring------约束导入和application.xml的引入方式

    1.spring约束的导入 2.SSH常用约束 3.application.xml的引入方式 <1.通过ClassPathXmlApplicationContext引入配置文件applicati ...

随机推荐

  1. 简单方便的在线客服展示插件 jQuery.onServ

    onServ jQuery.onServ 是一款简单方便的在线客服jQuery 插件,可以使任意html实现弹出展示在线客服效果, 可以自定义内容,简单配置出多个弹出动作特效,设置位置和样式. git ...

  2. (转)可收缩、扩展的TextView

    在一些应用中,比如腾讯的应用市场APP应用宝,关于某款应用的介绍文字,如果介绍文字过长,那么不是全部展现出来,而是显示三四行的开始部分(摘要),预知全部的内容,用户点击展开按钮即可查阅全部内容.这样的 ...

  3. javascript refresh page 几种页面刷新的方法

    Javascript刷新页面的几种方法:1    history.go(0) 2    location.reload() 3    location=location 4    location.a ...

  4. (转)Android Support Percent百分比布局

    一.概述 周末游戏打得过猛,于是周天熬夜码代码,周一早上浑浑噩噩的发现 android-percent-support-lib-sample(https://github.com/JulienGeno ...

  5. 【译】Android系统简介

    简介  本文主要介绍Android的基础知识和体系结构,本文主题: 简介什么是Android,为什么开发者需要关注Android: Android体系结构(如Linux Kernel, Librari ...

  6. 二分查找or折半查找

    package com.gxf.search; /** * 测试折半查找or二分查找 * @author xiangfei * */ public class BiSearch { /** * 非递归 ...

  7. oracle中事务处理

    事务用于保证数据的一致性,它由一组相关的dml语句组成,该组的dml语句要么全部成功,要么全部失败. 事务和锁 当执行事务操作时(dml语句),oracle会在被作用的表上加锁,防止其它用户改表的结构 ...

  8. iOS VideoToolbox硬编H.265(HEVC)H.264(AVC):2 H264数据写入文件

    本文档为iOS VideoToolbox硬编H.265(HEVC)H.264(AVC):1 概述续篇,主要描述: CMSampleBufferRef读取实际数据 序列参数集(Sequence Para ...

  9. FineUI Grid控件右键菜单的实现

    FineUI官方Demo上一直没有Grid右键菜单的实现,其实从4.1.x的版本开始,允许添加自定义的事件监听(Listeners),所以要实现这个功能已经相当容易了. ExtJs右键菜单有很多种,对 ...

  10. IntelliJ IDEA 15 安装

    前言 因为今日14安装一插件崩溃,现安装了15. 版本:ideaIU-15.0.2 安装参考说明书 http://wiki.jikexueyuan.com/project/intellij-idea- ...