<?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. Python脚本控制的WebDriver 常用操作 <二十七> 文件下载

    测试用例场景 webdriver允许我们设置默认的文件下载路径.也就是说文件会自动下载并且存在设置的那个目录中. Python脚本 测试用Python代码: # coding=gbk ''' Crea ...

  2. WPF 在画布中布局N行N列的实现方法

    最近写一个WPF项目,中间有一个实现在画布中排列的问题(整齐摆列几行几列的算法).本人逻辑有点差啊,废了老大功夫才实现,也没啥就牛逼的,就是拿出来分享一下,给需要的同学节省点时间,如果有用的话别忘赞一 ...

  3. Mininet安装及使用

    最简单的方法是开始 下载一个预包装Mininet / Ubuntu VM . 这个虚拟机包括Mininet本身,所有预装OpenFlow二进制文件和工具,调整内核配置,以支持更大的Mininet网络. ...

  4. vxworks启动

  5. 第三章 DispatcherServlet详解

    3.1.DispatcherServlet作用 DispatcherServlet是前端控制器设计模式的实现,提供Spring Web MVC的集中访问点,而且负责职责的分派,而且与Spring Io ...

  6. JDBC 学习笔记(二)—— 大数据+存储过程+批处理+事务管理

    本文目录:       1.使用JDBC处理大数据        2.使用JDBC处理大文本        3.使用JDBC处理二进制数据        4.Oracle中大数据处理        5 ...

  7. c# 重载运算符(+-|&)和扩展方法

    通常我们需要对class的相加,相减,相乘 等重载以适应需求, 如caml查询的时候,我们可以定义一个caml类,然后来操作这些查询. 首先,我们定义一个class为Test public class ...

  8. SqlBulkCopy批量写入25万条数据只需3s

    Microsoft SQL Server 提供一个称为 bcp 的流行的命令提示符实用工具,用于将数据从一个表移动到另一个表(表既可以在同一个服务器上,也可以在不同服务器上).SqlBulkCopy  ...

  9. ffmpeg 编码

    编码可以简单理解为将连续的图片帧转变成视频流的过程.以H264为例给出编码的代码: int InitEncoderCodec(int width, int height) { auto enc = a ...

  10. 关于12306登陆页面dynamicJs的获取

    今天帮与一个朋友探讨此事,刚开始一直是以为访问404,但是发现返回为200,没有问题,后来才知道朋友想了解的是为何浏览器可以获取到/otn/dynamicJs,但是自己手动获取就获取不到了 找了很久r ...