锘??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲精品视频在线看,亚洲人成片在线观看,亚洲精品在线视频http://www.tkk7.com/51AOP/category/10478.html鍏蟲敞SoA鍙戝睍zh-cnTue, 27 Feb 2007 12:49:48 GMTTue, 27 Feb 2007 12:49:48 GMT60浣跨敤Spring Quartz鎵ц瀹氭椂浠誨姟http://www.tkk7.com/51AOP/articles/43588.html鍐伴洦鍐伴洦Thu, 27 Apr 2006 07:53:00 GMThttp://www.tkk7.com/51AOP/articles/43588.htmlhttp://www.tkk7.com/51AOP/comments/43588.htmlhttp://www.tkk7.com/51AOP/articles/43588.html#Feedback0http://www.tkk7.com/51AOP/comments/commentRss/43588.htmlhttp://www.tkk7.com/51AOP/services/trackbacks/43588.html
http://www.52blog.net/user1/580/archives/2005/101299.shtml
Quartz
鏄疧penSymphony涓嬬殑涓涓紑婧愰」鐩紝鎻愪緵浜嗘瘮JDK鐨凾imeTask鏇村己澶х殑瀹氭椂浠誨姟鎵ц鍔熻兘銆?a target="_blank">Spring鍦≦uartz鐨勫熀紜涓婂寘瑁呬簡涓灞傦紝浣垮緱鍦ㄤ笉浣跨敤鏁版嵁搴撻厤緗甉uartz鐨勬儏鍐典笅錛屼笉蹇呭啀鐢≦uartz鐨凧avaBean璁劇疆鍙傛暟錛屼唬鐮佹洿浼橀泤錛屽彲閰嶇疆鎬ч珮銆?

聽涓嬮潰鎴戝氨涓句釜綆鍗曠殑渚嬪瓙銆傞鍏堬紝閰嶇疆Spring鐨勯厤緗枃浠訛紝璧峰悕鍙玜pplicationContext.xml

聽<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "<beans>

聽<!--聽閰嶇疆聽-->
聽<bean name="randomPriceJob" class="org.springframework.scheduling.quartz.JobDetailBean">
聽聽
聽聽<property name="jobClass">
聽聽聽<value>test.RandomPriceJob</value>
聽聽</property>
聽聽
聽聽<property name="jobDataAsMap">
聽聽聽<map>
聽聽聽聽<entry key="timeout"><value>5</value></entry>
聽聽聽</map>
聽聽</property>
聽聽
聽</bean>
聽<!-- 閰嶇疆瑙﹀彂鍣?-->聽
聽<bean id="cronTrigger" class="org.springframework.scheduling.quartz.CronTriggerBean">
聽聽
聽聽<property name="jobDetail">
聽聽聽<ref bean="randomPriceJob"/>
聽聽</property>
聽聽<!--聽姣忓ぉ鐨?1鐐瑰埌11鐐?9鍒嗕腑錛屾瘡鍒嗛挓瑙﹀彂RandomPriceJob錛屽叿浣撹鏄庤闄勫綍聽-->
聽聽<property name="cronExpression">
聽聽聽<value>0 * 11 * * ?</value>
聽聽</property>
聽聽
聽</bean>

聽<bean class="org.springframework.scheduling.quartz.SchedulerFactoryBean">

聽聽<!--聽娣誨姞瑙﹀彂鍣?-->
聽聽<property name="triggers">
聽聽聽<list>
聽聽聽聽<ref local="cronTrigger"/>
聽聽聽</list>
聽聽</property>
聽</bean>

</beans>

鐒跺悗緙栧啓鍏蜂綋鎿嶄綔浠g爜

package test;

import org.apache.log4j.Category;

import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.scheduling.quartz.QuartzJobBean;

/**
聽* @author shenshan
聽* @version 1.0
聽*/
public class RandomPriceJob extends QuartzJobBean
{
聽private static final Category聽cat聽= Category
聽聽聽聽聽聽聽聽聽聽聽聽.getInstance( RandomPriceJob.class );

聽private int聽聽聽聽聽聽timeout;

聽/**
聽 * @param timeout
聽 */
聽public void setTimeout( int timeout )
聽{
聽聽this.timeout = timeout;
聽}

聽/*
聽 * (non-Javadoc)
聽 *
聽 * @see org.springframework.scheduling.quartz.QuartzJobBean錛僥 xecuteInternal(org.quartz.JobExecutionContext)
聽 */
聽protected void executeInternal( JobExecutionContext context )
聽聽聽throws JobExecutionException
聽{
聽聽聽 cat.debug(聽"Job start" );

聽聽//鎵ц鍏蜂綋鎿嶄綔

聽}
}

聽鏈鍚庣紪鍐欒繍琛岀▼搴?/p>

聽package test;

import org.quartz.Scheduler;
import org.quartz.impl.StdSchedulerFactory;
import org.springframework.beans.factory.xml.XmlBeanFactory;
import org.springframework.core.io.ClassPathResource;
import org.springframework.scheduling.quartz.CronTriggerBean;
import org.springframework.scheduling.quartz.JobDetailBean;

/**
聽* @author shenshan
聽* @version 1.0
聽*/
public class RandomPrice
{

聽public static void main( String[ ] args ) throws Exception
聽{
聽聽ClassPathResource res = new ClassPathResource( "applicationContext.xml" );
聽聽XmlBeanFactory factory = new XmlBeanFactory( res );
聽聽JobDetailBean job = ( JobDetailBean ) factory
聽聽聽聽.getBean( "randomPriceJob" );
聽聽CronTriggerBean trigger = ( CronTriggerBean ) factory
聽聽聽聽.getBean( "cronTrigger" );
聽聽Scheduler scheduler = StdSchedulerFactory.getDefaultScheduler( );
聽聽scheduler.start( );
聽聽scheduler.scheduleJob( job, trigger );
聽}
}

緙栬瘧鍚庤繍琛孯andomPrice灝監K浜嗐傞渶瑕佹敞鎰忕殑鏄紝蹇呴』浣跨敤main鍑芥暟鎵嶈兘榪愯錛屼笉鑳戒嬌鐢↗Unit銆?/p>

闄勶細cronExpression閰嶇疆璇存槑

瀛楁鍏佽鍊?/th>鍏佽鐨勭壒孌婂瓧絎?/th>
縐?/code>0-59, - * /
鍒?/code>0-59, - * /
灝忔椂0-23, - * /
鏃ユ湡1-31, - * ? / L W C
鏈堜喚1-12聽鎴栬?JAN-DEC, - * /
鏄熸湡1-7聽鎴栬?SUN-SAT, - * ? / L C #
騫達紙鍙夛級鐣欑┖, 1970-2099, - * /
琛ㄨ揪寮?/th>鎰忎箟
"0 0 12 * * ?"姣忓ぉ涓崍12鐐硅Е鍙?/code>
"0 15 10 ? * *"姣忓ぉ涓婂崍10:15瑙﹀彂
"0 15 10 * * ?"姣忓ぉ涓婂崍10:15瑙﹀彂
"0 15 10 * * ? *"姣忓ぉ涓婂崍10:15瑙﹀彂
"0 15 10 * * ? 2005"2005騫寸殑姣忓ぉ涓婂崍10:15"0 * 14 * * ?"鍦ㄦ瘡澶╀笅鍗?鐐瑰埌涓嬪崍2:59鏈熼棿鐨勬瘡1鍒嗛挓瑙﹀彂
"0 0/5 14 * * ?"鍦ㄦ瘡澶╀笅鍗?鐐瑰埌涓嬪崍2:55鏈熼棿鐨勬瘡5鍒嗛挓瑙﹀彂
"0 0/5 14,18 * * ?"鍦ㄦ瘡澶╀笅鍗?鐐瑰埌2:55鏈熼棿鍜屼笅鍗?鐐瑰埌6:55鏈熼棿鐨勬瘡5鍒嗛挓瑙﹀彂
"0 0-5 14 * * ?"鍦ㄦ瘡澶╀笅鍗?鐐瑰埌涓嬪崍2:05鏈熼棿鐨勬瘡1鍒嗛挓瑙﹀彂
"0 10,44 14 ? 3 WED"姣忓勾涓夋湀鐨勬槦鏈熶笁鐨勪笅鍗?:10鍜?:44瑙﹀彂
"0 15 10 ? * MON-FRI"鍛ㄤ竴鑷沖懆浜旂殑涓婂崍10:15瑙﹀彂
"0 15 10 15 * ?"姣忔湀15鏃ヤ笂鍗?0:15瑙﹀彂
"0 15 10 L * ?"姣忔湀鏈鍚庝竴鏃ョ殑涓婂崍10:15瑙﹀彂
"0 15 10 ? * 6L"姣忔湀鐨勬渶鍚庝竴涓槦鏈熶簲涓婂崍10:15瑙﹀彂聽
"0 15 10 ? * 6L 2002-2005"2002騫磋嚦2005騫寸殑姣忔湀鐨勬渶鍚庝竴涓槦鏈熶簲涓婂崍10:15瑙﹀彂
"0 15 10 ? * 6#3"姣忔湀鐨勭涓変釜鏄熸湡浜斾笂鍗?0:15瑙﹀彂


鍐伴洦 2006-04-27 15:53 鍙戣〃璇勮
]]>
Spring IDE Guide http://www.tkk7.com/51AOP/articles/43029.html鍐伴洦鍐伴洦Tue, 25 Apr 2006 07:10:00 GMThttp://www.tkk7.com/51AOP/articles/43029.htmlhttp://www.tkk7.com/51AOP/comments/43029.htmlhttp://www.tkk7.com/51AOP/articles/43029.html#Feedback0http://www.tkk7.com/51AOP/comments/commentRss/43029.htmlhttp://www.tkk7.com/51AOP/services/trackbacks/43029.htmlSpring IDE Guide

From: http://springide.org/project/wiki/SpringideGuide

To start working with Spring IDE you need a SpringProject. A SpringProject can be created by adding the SpringProjectNature to an existing project or by creating a new Spring project with the SpringProjectWizard.

Add SpringProject nature

  • select open project nodes in Eclipse resource navigator or JDT package explorer
  • activate context menu item "Add Spring Project Nature" on selected projects

added screenshoot

  • once the nature is added, these projects are now decorated with a small 'S' in the upper right corner (overwriting other decorators, e.g. Java project decorator 'J')

added screenshoot

  • to remove the nature, right click the project and select "Remove Spring Project Nature"

See also: SpringProject, SpringProjectNature

Create new SpringProject

  • open the wizard selection dialog via the menu "File / New / Project..."

Screenshoot of wizard selection dialog

  • select the wizard "Spring IDE / New Spring Project"

Screenshoot of Spring project wizard

  • enter the project name
  • (optionally) modify the comma-separated list of supported BeansConfig file extensions (default is "xml")
  • if you don't need a Java project then deselect the checkbox "Create a Java project"
  • for a Java project you can change the project's settings (source / classes folder, classpath, libraries, ...) on the next dialog page

See also: SpringProject

Add references to other Spring projects (optional)

  • open a Spring project's properties dialog from the context menu in Eclipse resource navigator or JDT package explorer
  • select the properties page "Project References" from the list on the left side
  • enable all Spring project(s) containing Spring Beans config files which are referenced from within this project via Spring Beans config sets (defined later on)

added screenshoot


See also: BeansConfig, BeansConfigSet

Add Spring BeansConfig files

  • open a Spring project's properties dialog from the context menu in Eclipse resource navigator or JDT package explorer
  • select the properties page "Spring Beans" from the list on the left side

Spring project properties dialog with BeansConfig tab

  • (optionally) modify the comma-separated list of supported BeansConfig file extensions (default is "xml")
  • use the button "Add..." to open a selector dialog providing a list of all files with the specified extensions in your Spring project and select the corresponding Spring BeansConfig files

Spring project properties dialog with Add BeansConfig dialog

  • once the config files are selected the corresponding files are decorated with a small 'S' in Eclipse resource navigator or JDT package explorer

Package explorer with decorated BeansConfig files


See also: BeansProjectProperties?, BeansConfig

Create Spring BeansConfig file sets (optional)

  • open a Spring project's properties dialog from the context menu in Eclipse resource navigator or JDT package explorer
  • select the properties page "Spring Beans" from the list on the left side
  • select the second tab labeled "Config Sets"

Spring project properties dialog with BeansConfigSet tab

  • use the button "New..." to open a dialog for creating a new config set with a selection of all config files (added in the previous step) belonging to this config set
    • define a unique name for the config set
    • activate the checkbox "Enable bean override" if multiple beans with the same ID should be overidden by the last bean (used by the BeansConfigValidator only -> if activated then bean overriding is not treated as validation error)
    • activate the checkbox "Is incomplete" if this config set does not contain all beans which are referenced by other beans defined in this config set (used by the BeansConfigValidator only -> if activated then unresolved bean references are not treated as validation errors)
    • externally defined config files (as described in section "Add references to other Spring projects") are decorated with a small blue arrow)

Create new BeansConfigSet dialog

  • use the buttons "Move Up" and "Move Down" to change the order of the config files within the config set (important for bean overriding)

Spring project properties dialog with BeansConfigSet tab


See also: BeansConfig, BeansConfigSet, BeansConfigValidator

Open Spring BeansView

  • select from within any of the added Spring BeansConfig files opened in an Eclipse editor the menu item "Navigate/Show In/Spring Beans"

added screen shoot

  • once the menu item is selected the Spring BeansView is opened and the corresponding Spring BeansConfig file is selected in the view's model

Editor and Beans View

  • double-clicking on certain entries in the Spring BeansView (bean, property or constructor argument) navigates to the corresponding location in the config file
  • by selecting the corresponding toolbar actions the BeansView supports alphabetical sorting and syncing with the BeansXmlEditor

See also: BeansView, BeansConfig, BeansXmlEditor

Validate Spring BeansConfig file

  • after modifying and saving any of the added Spring BeansConfig files from within an open Eclipse editor this config is automatically validated by Spring IDE
  • for any error occured during validation a problem marker is created and listed in Eclipse's problem view

Editor with problem markers and problem view


See also: BeansConfig, BeansConfigValidator

Open Spring BeansGraph

  • right-clicking on certain entries in the Spring BeansView (config, config set or bean) opens a read-only editor showing a graph with all beans referenced by the selected view entry

BeansGraph with outline view


See also: BeansView, BeansConfig, BeansConfigSet, BeansGraph

Search for Spring Beans

  • open the search dialog via the "Search / Search..." menu
  • select the tab "Spring Beans Search" to switch to the BeansSearch dialog

Screenshoot of Spring Beans search dialog


See also: BeansSearch

Attachments



鍐伴洦 2006-04-25 15:10 鍙戣〃璇勮
]]>
主站蜘蛛池模板: 亚洲日韩国产二区无码| 亚洲精品视频在线观看免费| 亚洲国产精品无码专区在线观看| 成年美女黄网站18禁免费| 亚洲男人在线无码视频| 成av免费大片黄在线观看| 亚洲的天堂av无码| 又粗又大又硬又爽的免费视频| 亚洲人成网站18禁止久久影院| 国产猛男猛女超爽免费视频| www.亚洲成在线| 亚洲av日韩精品久久久久久a| 真人做A免费观看| 一级特黄录像视频免费| 亚洲熟妇色自偷自拍另类| 免费在线观看日韩| 久久成人国产精品免费软件| 亚洲男人在线无码视频| 九九精品免费视频| 国产成人免费AV在线播放| 亚洲av无码一区二区三区四区| 亚洲第一福利视频| 亚洲M码 欧洲S码SSS222| 性xxxxx免费视频播放| 在线观看免费视频一区| 亚洲国产精品无码观看久久| 日本19禁啪啪无遮挡免费动图| 精品久久久久亚洲| 亚洲毛片在线免费观看| 又黄又大又爽免费视频| 老司机在线免费视频| 亚洲视频在线观看不卡| 国产成人精品久久亚洲高清不卡 | 一二三四影视在线看片免费| 亚洲色成人四虎在线观看| 亚洲国产一区在线| 亚洲日韩精品A∨片无码| 亚洲国产精品自在拍在线播放| 女性无套免费网站在线看| 84pao强力永久免费高清| 国产午夜免费高清久久影院|