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 ...
随机推荐
- sql语句中like匹配的用法详解
在SQL结构化查询语言中,LIKE语句有着至关重要的作用. LIKE语句的语法格式是:select * from 表名 where 字段名 like 对应值(子串),它主要是针对字符型字段的,它的作用 ...
- js日期相关函数总结分享
一个倒计时程序,因为经常要在手机端访问,所以没有引用jquery,对于用习惯jquery的我还真不习惯. 下面简单说明js日期相关函数,并说明实现倒计时的原理 var dateTo=new Date( ...
- ECSHOP订单自动确认
1.运行sql代码,生成数据库 CREATE TABLE `ecs_order_auto_confirm` ( `id` INT() UNSIGNED NOT NULL AUTO_INCREMENT, ...
- 通过百度地图API显示当前位置在地图上(图标显示)--第三方开源--百度地图(二)
1.下载百度地图的demo,下载地址:http://lbsyun.baidu.com/sdk/download?selected=mapsdk_basicmap,mapsdk_searchfuncti ...
- 为Eclipse设置背景色
1:打开Eclipse,在菜单栏找到Help—>Install new software.. 2:在打开的Work with中输入: Update Site - http://eclipse-c ...
- 每日一“酷”之Queue
Queue—线程安全的FIFO实现 作用:提供一个线程安全的FIFO实现 Queue模块提供了一个适用于多线程编程的先进先出(first-in,first-out)数据结构,可以用来在生产者和消费者线 ...
- 内部技术分享的 PPT
本文的基础是搞了一次内部的技术分享,在此也分享一下本次的PPT的一些内容.先列一下大概内容吧. EF-Code First API(WCF.WebAPI) Xaml MVVM AOP Xamarin. ...
- 第六周 E题 期望.....
Description Given a dice with n sides, you have to find the expected number of times you have to thr ...
- MyException
自定义Exception using System; using System.Collections.Generic; using System.Linq; using System.Text; u ...
- Java中构造函数执行顺序的问题
1, 先执行内部静态对象的构造函数,如果有多个按定义的先后顺序执行:而且静态类的构造函数只会被执行一次,只在其第一个对象创建时调用,即便是创建了同一个类的多个对象,例如main()函数里b1,b2创 ...