application.xml定时
生活随笔
收集整理的這篇文章主要介紹了
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.xsdhttp://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task.xsdhttp://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsdhttp://www.springframework.org/schema/cache http://www.springframework.org/schema/cache/spring-cache.xsdhttp://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsdhttp://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>
轉載于:https://www.cnblogs.com/beautiful-code/p/5749653.html
總結
以上是生活随笔為你收集整理的application.xml定时的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: WebRTC详解-zz
- 下一篇: HDU-1274 展开字符串