application.xml定时
<?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定时的更多相关文章
- Jsoup问题---获取http协议请求失败 org.jsoup.UnsupportedMimeTypeException: Unhandled content type. Must be text/*, application/xml, or application/xhtml+xml.
Jsoup问题---获取http协议请求失败 1.问题:用Jsoup在获取一些网站的数据时,起初获取很顺利,但是在访问某浪的数据是Jsoup报错,应该是请求头里面的请求类型(ContextType)不 ...
- Jsoup获取部分页面数据失败 org.jsoup.UnsupportedMimeTypeException: Unhandled content type. Must be text/*, application/xml, or application/xhtml+xml.
用Jsoup在获取一些网站的数据时,起初获取很顺利,但是在访问某浪的数据是Jsoup报错,应该是请求头里面的请求类型(ContextType)不符合要求. 请求代码如下: private static ...
- application/xml和text/xml的区别
XML有两个MIME类型,application/xml和text/xml,它们之间的区别是: text/xml忽略xml文件头中的关于编码的设定(<?xml version="1.0 ...
- 有关spring-servlet.xml 和 application.xml的配置信息讲解(这两个配置信息的区别在哪里)
在使用springmvc时需要配置得信息有两个,一个是spring-servlet.xml和applcation.xml: 首先两个文件的的存放位置就有一点的不同(见下图),application.x ...
- Springmvc配置文件application.xml 和 spring-servlet.xml
文章来源:http://blog.csdn.net/tengdazhang770960436/article/details/48395885 1.SpringMVC 的配置分为两部分 applica ...
- application/xml 和 text/xml的区别
application/xml and text/xml的区别 经常看到有关xml时提到"application/xml" 和 "text/xml"两种类型, ...
- ssh2的application.xml配置文件配置详解
ssh2的application.xml配置文件配置详解 1.导入其他的配置文件.在ssh项目中可以导入其他的配置文件,导入的格式为: <import resource="clas ...
- 在properties.xml中定义变量,在application.xml中取值问题
如果为application.xml中的变量赋默认值,同时又在properties.xml中变量赋值,而加载后是取不到properties.xml中的值的问题. 解决这个问题需要加上黑体部分配置: & ...
- Spring------约束导入和application.xml的引入方式
1.spring约束的导入 2.SSH常用约束 3.application.xml的引入方式 <1.通过ClassPathXmlApplicationContext引入配置文件applicati ...
随机推荐
- MemProof教程
简介 MemProof(内存清道夫)是AutomatedQA出品的一款非常不错的检测内存泄漏和资源泄漏的免费调试工具,适合于WIN32平台下使用DELPHI/C++ BUILDER开发的应用程序. 利 ...
- js关闭页面(兼容浏览器)
function closewindow() { window.opener = null; window.open("", "_self"); window. ...
- C# this指针用法
this指针是什么: 这里有一些面向对象编程的概念需要说明:类(Class)的概念和对象(Object)的概念类是对事物概括,也是C#编码时所有代码归属的基本单位:而对象是对类的实例化,也就是C#里n ...
- 1103. Integer Factorization (30)
The K-P factorization of a positive integer N is to write N as the sum of the P-th power of K positi ...
- mtu
通信术语 最大传输单元(Maximum Transmission Unit,MTU)是指一种通信协议的某一层上面所能通过的最大数据包大小(以字节为单位).最大传输单元这个参数通常与通信接口有关(网络接 ...
- How to install DIG dns tool on windows 7
This guide explain how to install dig dns tool on windows 7 in few steps: 1. First go to http://www. ...
- 微软职位内部推荐-SDE2 (Windows - Power)
微软近期Open的职位: SDE2 (Windows - Power) Windows Partner Enablement team in Operating System Group is loo ...
- DVDRW光驱无法读DVD刻录盘
原文地址:http://www.douban.com/note/206741292/ 所有的DVD RW驱动器,不能识别DVD ROM光盘问题,都是因为DVD区域没有给定造成的,除非设备损坏!在计算机 ...
- java mail实现Email的发送,完整代码
java mail实现Email的发送,完整代码 1.对应用程序配置邮件会话 首先, 导入jar <dependencies> <dependency> <groupId ...
- HIVE Transform using 用法
select TRANSFORM(*, *, *) using 'python filter.py' as (*, *, *) from t_1 HIVE支持pipe操作,将select出来的字段,用 ...