ï»??xml version="1.0" encoding="utf-8" standalone="yes"?>h视频久久久,国产精品一区二区三区99,欧洲在线视频一区http://www.aygfsteel.com/jjshcc/category/46569.html桑巴葡语¾˜»è¯‘工作室是òq¿å·žå¸‚最专业葡萄牙语¾˜»è¯‘机构-www.puyufanyi.com-‹Æ¢è¿Žå¯ÀL‰¾Java,As400,Mainframe的猎头eric_cc#qq.ccom(æŠ?换成@)zh-cnTue, 19 Aug 2014 06:49:02 GMTTue, 19 Aug 2014 06:49:02 GMT60在web.xml中通过contextConfigLocation配置springhttp://www.aygfsteel.com/jjshcc/archive/2014/08/15/416986.htmlEric_jiangEric_jiangFri, 15 Aug 2014 02:11:00 GMThttp://www.aygfsteel.com/jjshcc/archive/2014/08/15/416986.htmlhttp://www.aygfsteel.com/jjshcc/comments/416986.htmlhttp://www.aygfsteel.com/jjshcc/archive/2014/08/15/416986.html#Feedback1http://www.aygfsteel.com/jjshcc/comments/commentRss/416986.htmlhttp://www.aygfsteel.com/jjshcc/services/trackbacks/416986.html

springçš?配置文äšg在启动时åQŒåŠ è½½çš„æ˜¯web-info目录下的applicationContext.xml,
˜qè¡Œæ—¶ä‹É用的是web-info/classes目录下的applicationContext.xmlã€?br />
配置web.xml使这2个èµ\径一è‡ß_¼š

<context-param>
  <param-name>contextConfigLocation</param-name>
  <param-value>/WEB-INF/classes/applicationContext.xml</param-value>
 </context-param>

多个配置文äšg的加è½?br /><context-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>
            classpath*:conf/spring/applicationContext_core*.xml,
            classpath*:conf/spring/applicationContext_dict*.xml,
            classpath*:conf/spring/applicationContext_hibernate.xml,
            classpath*:conf/spring/applicationContext_staff*.xml,
            classpath*:conf/spring/applicationContext_security.xml
            classpath*:conf/spring/applicationContext_modules*.xml
            classpath*:conf/spring/applicationContext_cti*.xml
            classpath*:conf/spring/applicationContext_apm*.xml
        </param-value>
    </context-param>

contextConfigLocation 参数定义了要装入çš?Spring 配置文äšgã€?/p>

]]>
springmvc中获得requestæ–ÒŽ³•http://www.aygfsteel.com/jjshcc/archive/2014/08/14/416954.htmlEric_jiangEric_jiangThu, 14 Aug 2014 07:54:00 GMThttp://www.aygfsteel.com/jjshcc/archive/2014/08/14/416954.htmlhttp://www.aygfsteel.com/jjshcc/comments/416954.htmlhttp://www.aygfsteel.com/jjshcc/archive/2014/08/14/416954.html#Feedback0http://www.aygfsteel.com/jjshcc/comments/commentRss/416954.htmlhttp://www.aygfsteel.com/jjshcc/services/trackbacks/416954.html

ç”׃ºŽæ˜¯ä‹Éç”?strong style="color: black; background-color: #ffff66; ">spring mvc来做™å¹ç›®åQŒå› æ­¤è„±¼›ÖMº†HttpServletRequestä½œäØ“å‚æ•°åQŒä¸èƒ½å¤Ÿç›´æŽ¥ä½¿ç”¨requeståQŒè¦æƒ³ä‹É用request可以使用下面的方法:

在web点xml中配¾|®ä¸€ä¸ªç›‘å?/p>

<listener>         <listener-class>             org.springframework.web.context.request.RequestContextListener         </listener-class> </listener>
之后ž®±å¯ä»¥åœ¨½E‹åºä½¿ç”¨äº?p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">

HttpServletRequest request = ((ServletRequestAttributes)RequestContextHolder.getRequestAttributes()).getRequest();


Eric_jiang 2014-08-14 15:54 发表评论
]]>
<context:component-scan>使用说明http://www.aygfsteel.com/jjshcc/archive/2014/08/13/416897.htmlEric_jiangEric_jiangWed, 13 Aug 2014 03:22:00 GMThttp://www.aygfsteel.com/jjshcc/archive/2014/08/13/416897.htmlhttp://www.aygfsteel.com/jjshcc/comments/416897.htmlhttp://www.aygfsteel.com/jjshcc/archive/2014/08/13/416897.html#Feedback0http://www.aygfsteel.com/jjshcc/comments/commentRss/416897.htmlhttp://www.aygfsteel.com/jjshcc/services/trackbacks/416897.html

 åœ¨xml配置了这个标½{‘֐ŽåQŒspring可以自动åŽÀL‰«æbase-pack下面或者子包下面的javaæ–‡äšgåQŒå¦‚果扫描到有@Component @Controller@Service½{‰è¿™äº›æ³¨è§£çš„¾c»ï¼Œåˆ™æŠŠ˜q™äº›¾cÀL³¨å†ŒäØ“bean

注意åQšå¦‚果配¾|®äº†<context:component-scan>那么<context:annotation-config/>标签ž®±å¯ä»¥ä¸ç”¨å†xml中配¾|®äº†åQŒå› ä¸ºå‰è€…包含了后者。另å¤?lt;context:annotation-config/>˜q˜æä¾›äº†ä¸¤ä¸ªå­æ ‡½{?/p>

1.        <context:include-filter>

2.       <context:exclude-filter>

在说明这两个子标½{‘Ö‰åQŒå…ˆè¯´ä¸€ä¸?lt;context:component-scan>有一个use-default-filterså±žæ€§ï¼Œæ”¹å±žæ€§é»˜è®¤äØ“true,˜q™å°±æ„å‘³ç€ä¼šæ‰«ææŒ‡å®šåŒ…下的全部的标æœ?/span>@Component的类åQŒåƈ注册æˆ?/span>bean.也就æ˜?/span>@Component的子注解@Service,@Reposity½{?/span>。所以如果仅仅是在配¾|®æ–‡ä»¶ä¸­˜q™ä¹ˆå†?/p>

<context:component-scan base-package="tv.huan.weisp.web"/>

 Use-default-filter此时为true那么会对base-package包或者子包下的所有的˜q›è¡Œjava¾c»è¿›è¡Œæ‰«æ?òq¶æŠŠåŒšw…çš„java¾cÀL³¨å†Œæˆbeanã€?/p>

 

 å¯ä»¥å‘现˜q™ç§æ‰«æçš„粒度有点太大,如果你只æƒÏx‰«ææŒ‡å®šåŒ…下面的ControlleråQŒè¯¥æ€Žä¹ˆåŠžï¼Ÿæ­¤æ—¶å­æ ‡½{?lt;context:incluce-filter>ž®Þp“våˆîCº†å‹‡æ­¦ä¹‹åœ°ã€‚如下所½C?/p>

<context:component-scan base-package="tv.huan.weisp.web .controller">  

<context:include-filter type="annotation" expression="org.springframework.stereotype.Controller"/>   

</context:component-scan>  

˜q™æ ·ž®×ƒ¼šåªæ‰«æbase-package指定下的有@Controller下的java¾c»ï¼Œòq¶æ³¨å†Œæˆbean

ä½†æ˜¯å› äØ“use-dafault-filteråœ¨ä¸Šé¢åÆˆæ²¡æœ‰æŒ‡å®šåQŒé»˜è®¤å°±ä¸ºtrueåQŒæ‰€ä»¥å½“把上面的配置æ”ÒŽˆå¦‚下所½Cºçš„æ—¶å€™ï¼Œž®×ƒ¼šäº§ç”Ÿä¸Žä½ æœŸæœ›ç›¸æ‚–的结æž?span style="color: red; ">åQˆæ³¨æ„?/span>base-package包值得变化åQ?/span>

<context:component-scan base-package="tv.huan.weisp.web ">  

<context:include-filter type="annotation" expression="org.springframework.stereotype.Controller"/>   

</context:component-scan>  

此时åQŒspring不仅扫描了@ControlleråQŒè¿˜æ‰«æäº†æŒ‡å®šåŒ…所在的子包service包下注解@Serviceçš„java¾c?/p>

此时指定的include-filter没有起到作用åQŒåªè¦æŠŠuse-default-filter讄¡½®æˆfalsež®±å¯ä»¥äº†ã€‚这样就可以避免在base-packeage配置多个包名˜q™ç§ä¸æ˜¯å¾ˆä¼˜é›…çš„æ–ÒŽ³•来解册™¿™ä¸ªé—®é¢˜äº†ã€?/p>

另外在我参与的项目中可以发现在base-package指定的包中有的子包是不含有注解了åQŒæ‰€ä»¥ä¸ç”¨æ‰«æï¼Œæ­¤æ—¶å¯ä»¥æŒ‡å®š<context:exclude-filter>来进行过滤,说明此包不需要被扫描。综合以上说æ˜?/p>

Use-dafault-filters=”false”的情况下åQ?lt;context:exclude-filter>指定的不扫描åQ?lt;context:include-filter>指定的扫æ?/p>

]]>
Spring--quartz中cronExpression配置说明http://www.aygfsteel.com/jjshcc/archive/2014/07/31/416409.htmlEric_jiangEric_jiangThu, 31 Jul 2014 07:32:00 GMThttp://www.aygfsteel.com/jjshcc/archive/2014/07/31/416409.htmlhttp://www.aygfsteel.com/jjshcc/comments/416409.htmlhttp://www.aygfsteel.com/jjshcc/archive/2014/07/31/416409.html#Feedback0http://www.aygfsteel.com/jjshcc/comments/commentRss/416409.htmlhttp://www.aygfsteel.com/jjshcc/services/trackbacks/416409.html
字段 å…è®¸å€?/th> å…è®¸çš„特ŒDŠå­—½W?/th>
¿U?/code>   0-59   , - * /
åˆ?/code>   0-59   , - * /
ž®æ—¶   0-23   , - * /
日期   1-31   , - * ? / L W C
月䆾   1-12 æˆ–è€?JAN-DEC   , - * /
星期   1-7 æˆ–è€?SUN-SAT   , - * ? / L C #
òqß_¼ˆå¯é€‰ï¼‰   留空, 1970-2099   , - * /


The '*' character is used to specify all values. For example, "*" in the minute field means "every minute". 
“*”字符被用来指定所有的倹{€‚如åQ?#8221;*“在分钟的字段域里表示“每分é’?#8221;ã€?nbsp;
The '?' character is allowed for the day-of-month and day-of-week fields. It is used to specify 'no specific value'. This is useful when you need to specify something in one of the two fileds, but not the other. See the examples below for clarification. 
“?”字符只在日期域和星期域中使用。它被用来指å®?#8220;非明¼‹®çš„å€?#8221;。当你需要通过在这两个域中的一个来指定一些东西的时候,它是有用的。看下面的例子你ž®×ƒ¼šæ˜Žç™½ã€?nbsp;
月䆾中的日期和星期中的日期这两个元素时互斥的一起应该通过讄¡½®ä¸€ä¸ªé—®å??)来表明不惌™®¾¾|®é‚£ä¸ªå­—ŒD?br />
The '-' character is used to specify ranges For example "10-12" in the hour field means "the hours 10, 11 and 12". 
“-”字符被用来指定一个范围。如åQ?#8220;10-12”在小时域意味着“10炏V€?1炏V€?2ç‚?#8221;ã€?nbsp;

The ',' character is used to specify additional values. For example "MON,WED,FRI" in the day-of-week field means "the days Monday, Wednesday, and Friday". 
“,”字符被用来指定另外的倹{€‚如åQ?#8220;MON,WED,FRI”在星期域里表½C?#8221;星期一、星期三、星期五”. 

The '/' character is used to specify increments. For example "0/15" in the seconds field means "the seconds 0, 15, 30, and 45". And "5/15" in the seconds field means "the seconds 5, 20, 35, and 50". Specifying '*' before the '/' is equivalent to specifying 0 is the value to start with. Essentially, for each field in the expression, there is a set of numbers that can be turned on or off. For seconds and minutes, the numbers range from 0 to 59. For hours 0 to 23, for days of the month 0 to 31, and for months 1 to 12. The "/" character simply helps you turn on every "nth" value in the given set. Thus "7/6" in the month field only turns on month "7", it does NOT mean every 6th month, please note that subtlety. 

The 'L' character is allowed for the day-of-month and day-of-week fields. This character is short-hand for "last", but it has different meaning in each of the two fields. For example, the value "L" in the day-of-month field means "the last day of the month" - day 31 for January, day 28 for February on non-leap years. If used in the day-of-week field by itself, it simply means "7" or "SAT". But if used in the day-of-week field after another value, it means "the last xxx day of the month" - for example "6L" means "the last friday of the month". When using the 'L' option, it is important not to specify lists, or ranges of values, as you'll get confusing results. 

Læ˜?#8216;last’的省略写法可以表½Cºday-of-monthå’Œday-of-week域,但在两个字段中的意思不同,例如day-of-month域中表示一个月的最后一天,
如果在day-of-week域表½C?#8216;7’或è€?#8216;SAT’åQŒå¦‚果在day-of-week域中前面加上数字åQŒå®ƒè¡¨ç¤ºä¸€ä¸ªæœˆçš„æœ€åŽå‡ å¤©ï¼Œä¾‹å¦‚‘6L’ž®Þp¡¨½CÞZ¸€ä¸ªæœˆçš„æœ€åŽä¸€ä¸?br /> 星期五,

The 'W' character is allowed for the day-of-month field. This character is used to specify the weekday (Monday-Friday) nearest the given day. As an example, if you were to specify "15W" as the value for the day-of-month field, the meaning is: "the nearest weekday to the 15th of the month". So if the 15th is a Saturday, the trigger will fire on Friday the 14th. If the 15th is a Sunday, the trigger will fire on Monday the 16th. If the 15th is a Tuesday, then it will fire on Tuesday the 15th. However if you specify "1W" as the value for day-of-month, and the 1st is a Saturday, the trigger will fire on Monday the 3rd, as it will not 'jump' over the boundary of a month's days. The 'W' character can only be specified when the day-of-month is a single day, not a range or list of days

The 'L' and 'W' characters can also be combined for the day-of-month expression to yield 'LW', which translates to "last weekday of the month". 

The '#' character is allowed for the day-of-week field. This character is used to specify "the nth" XXX day of the month. For example, the value of "6#3" in the day-of-week field means the third Friday of the month (day 6 = Friday and "#3" = the 3rd one in the month). Other examples: "2#1" = the first Monday of the month and "4#5" = the fifth Wednesday of the month. Note that if you specify "#5" and there is not 5 of the given day-of-week in the month, then no firing will occur that month. 

The 'C' character is allowed for the day-of-month and day-of-week fields. This character is short-hand for "calendar". This means values are calculated against the associated calendar, if any. If no calendar is associated, then it is equivalent to having an all-inclusive calendar. A value of "5C" in the day-of-month field means "the first day included by the calendar on or after the 5th". A value of "1C" in the day-of-week field means "the first day included by the calendar on or after sunday". 
关于cronExpression的介¾l?
 
字段 允许å€?允许的特ŒDŠå­—½W?nbsp;
¿U?0-59 , - * / 
åˆ?0-59 , - * / 
ž®æ—¶ 0-23 , - * / 
日期 1-31 , - * ? / L W C 
月䆾 1-12 或è€?JAN-DEC , - * / 
星期 1-7 或è€?SUN-SAT , - * ? / L C # 
òqß_¼ˆå¯é€‰ï¼‰ 留空, 1970-2099 , - * / 
表达式意�nbsp;
"0 0 12 * * ?" 每天中午12点触�nbsp;
"0 15 10 ? * *" 每天上午10:15触发 
"0 15 10 * * ?" 每天上午10:15触发 
"0 15 10 * * ? *" 每天上午10:15触发 
"0 15 10 * * ? 2005" 2005òq´çš„æ¯å¤©ä¸Šåˆ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òq´è‡³2005òq´çš„æ¯æœˆçš„æœ€åŽä¸€ä¸ªæ˜ŸæœŸäº”上午10:15触发 
"0 15 10 ? * 6#3" 每月的第三个星期五上å?0:15触发 
每天早上6�nbsp;
0 6 * * * 
每两个小�nbsp;
0 */2 * * * 
晚上11点到早上8点之间每两个ž®æ—¶åQŒæ—©ä¸Šå…«ç‚?nbsp;
0 23-7/2åQ? * * * 
每个月的4号和每个½C¼æ‹œçš„礼拜一到礼拜三的早ä¸?1ç‚?nbsp;
0 11 4 * 1-3 
1�日早��nbsp;
0 4 1 1 *

quartz的高¾U§ç‰¹æ€§ä¸ä»…如æ­?nbsp;
1 数据库存�nbsp;
2 集群支持 
3 数据库持久化ä»ÕdŠ¡åQŒtrigger 
4 trigger 的停止,˜qè¡Œ 
5 ä»ÕdŠ¡çš„ä“Q意添åŠ?nbsp;
6 比corntrigger 更详ž®½çš„ä»ÕdŠ¡å®‰æŽ’ 
7 ¾U¿ç¨‹çš„内部数据交æ?br />


一个cron表达式有臛_°‘6个(也可èƒ?个)有空格分隔的旉™—´å…ƒç´ ã€?br />按顺序依‹Æ¡äØ“
1.¿U’(0~59åQ?br />2.分钟åQ?~59åQ?br />
3.ž®æ—¶åQ?~23åQ?/span>
 
4.天(月)åQ?~31åQŒä½†æ˜¯ä½ éœ€è¦è€ƒè™‘你月的天敎ͼ‰
5.月(0~11åQ?br />6.天(星期åQ‰ï¼ˆ1~7 1=SUN æˆ?SUNåQŒMONåQŒTUEåQŒWEDåQŒTHUåQŒFRIåQŒSATåQ?br />7.òq´ä†¾åQ?970åQ?099åQ?/span>

其中每个元素可以是一个å€?å¦?),一个连¾l­åŒºé—?9-12),一个间隔时é—?8-18/4)(/表示每隔4ž®æ—¶),一个列è¡?1,3,5),通配½W¦ã€?br />ç”׃ºŽ"月䆾中的日期"å’?星期中的日期"˜q™ä¸¤ä¸ªå…ƒç´ äº’斥的,必须要对其中一个设¾|?.

0 0 10,14,16 * * ? 每天上午10点,下午2点,4ç‚?br />0 0/30 9-17 * * ??? 朝九晚五工作旉™—´å†…每半小æ—?br />0 0 12 ? * WED 表示每个星期三中å?2ç‚?/span>

有些子表辑ּèƒ½åŒ…含一些范围或列表
例如åQšå­è¡¨è¾¾å¼ï¼ˆå¤©ï¼ˆæ˜ŸæœŸåQ‰ï¼‰å¯ä»¥ä¸?“MON-FRI”åQ?#8220;MONåQŒWEDåQŒFRI”åQ?#8220;MON-WED,SAT”

“*”字符代表所有可能的å€?br />å› æ­¤åQ?#8220;*”在子表达式(月)里表½Cºæ¯ä¸ªæœˆçš„含义,“*”在子表达式(天(星期åQ‰ï¼‰è¡¨ç¤ºæ˜ŸæœŸçš„æ¯ä¸€å¤?/span>

“/”字符用来指定数值的增量
例如åQšåœ¨å­è¡¨è¾‘Ö¼åQˆåˆ†é’Ÿï¼‰é‡Œçš„“0/15”表示从第0分钟开始,æ¯?5分钟 ;
在子表达式(分钟åQ‰é‡Œçš?#8220;3/20”表示从第3分钟开始,æ¯?0分钟åQˆå®ƒå’?#8220;3åQ?3åQ?3”åQ‰çš„含义一æ ?br />
“åQ?#8221;字符仅被用于天(月)和天åQˆæ˜ŸæœŸï¼‰ä¸¤ä¸ªå­è¡¨è¾‘Ö¼åQŒè¡¨½CÞZ¸æŒ‡å®šå€?br />å½?个子表达式其中之一被指定了å€ég»¥åŽï¼Œä¸ÞZº†é¿å…å†²çªåQŒéœ€è¦å°†å¦ä¸€ä¸ªå­è¡¨è¾¾å¼çš„倯D®¾ä¸?#8220;åQ?#8221;

 

“L” 字符仅被用于天(月)和天åQˆæ˜ŸæœŸï¼‰ä¸¤ä¸ªå­è¡¨è¾‘Ö¼åQŒå®ƒæ˜¯å•è¯?#8220;last”的羃å†?/span>

但是它在两个子表辑ּé‡Œçš„含义是不同的ã€?/span>

在天åQˆæœˆåQ‰å­è¡¨è¾¾å¼ä¸­åQ?#8220;L”表示一个月的最后一å¤?,
在天åQˆæ˜ŸæœŸï¼‰è‡ªè¡¨è¾‘Ö¼ä¸­ï¼Œ“L”表示一个星期的最后一天,也就是SAT

如果åœ?#8220;L”前有具体的内容,它就å…ähœ‰å…¶ä»–的含义了

例如åQ?#8220;6L”表示˜q™ä¸ªæœˆçš„倒数½W¬ï¼–天,“åQ¦ï¼²åQ©ï¼¬”表示˜q™ä¸ªæœˆçš„æœ€åŽä¸€ä¸ªæ˜ŸæœŸäº”

注意åQšåœ¨ä½¿ç”¨“L”参数æ—Óž¼Œä¸è¦æŒ‡å®šåˆ—表或范å›ß_¼Œå› äØ“˜q™ä¼šå¯ÆD‡´é—®é¢˜

============================================

CronTrigger配置完整格式为: [¿U’] [分] [ž®æ—¶] [æ—¥] [月] [周] [òq´]

 

 åºå·è¯´æ˜Ž æ˜¯å¦å¿…å¡« å…è®¸å¡«å†™çš„å€?/td>允许的通配½W?/td>
 1 ¿U?/td> æ˜?/td> 0-59   , - * /
 2 åˆ?/td> æ˜?/td> 0-59   , - * /
 3ž®æ—¶ æ˜?/td> 0-23  , - * /
 4 æ—?/td> æ˜?/td> 1-31  , - * ? / L W
 5 æœ?/td> æ˜?/td> 1-12 or JAN-DEC  , - * /
 6 å‘?/td> æ˜?/td> 1-7 or SUN-SAT  , - * ? / L #
 7 òq?/td> å?/td> empty æˆ?1970-2099  , - * /

通配½W¦è¯´æ˜?
* è¡¨ç¤ºæ‰€æœ‰å€? 例如:在分的字ŒDµä¸Šè®„¡½® "*",表示每一分钟都会触发ã€?br />? è¡¨ç¤ºä¸æŒ‡å®šå€¹{€‚ä‹É用的场景ä¸ÞZ¸éœ€è¦å…³å¿ƒå½“前设¾|®è¿™ä¸ªå­—ŒD늚„倹{€‚例å¦?要在每月çš?0可‚§¦å‘一个操作,但不兛_¿ƒæ˜¯å‘¨å‡ ï¼Œæ‰€ä»¥éœ€è¦å‘¨ä½ç½®çš„那个字ŒDµè®¾¾|®äØ“"?" 具体讄¡½®ä¸?0 0 0 10 * ?
- è¡¨ç¤ºåŒºé—´ã€‚例å¦?在小时上讄¡½® "10-12",表示 10,11,12炚wƒ½ä¼šè§¦å‘ã€?br />, è¡¨ç¤ºæŒ‡å®šå¤šä¸ªå€û|¼Œä¾‹å¦‚在周字段上设¾|?"MON,WED,FRI" 表示周一åQŒå‘¨ä¸‰å’Œå‘¨äº”触发
/ ç”¨äºŽé€’增触发。如在秒上面讄¡½®"5/15" 表示ä»?¿U’开始,每增15¿U’触å?5,20,35,50)ã€?在月字段上设¾|?1/3'所½Cºæ¯æœ?号开始,每隔三天触发一‹Æ¡ã€?br />L è¡¨ç¤ºæœ€åŽçš„æ„æ€ã€‚在日字ŒDµè®¾¾|®ä¸ŠåQŒè¡¨½Cºå½“月的最后一å¤?依据当前月䆾åQŒå¦‚果是二月˜q˜ä¼šä¾æ®æ˜¯å¦æ˜¯æ¶¦òq´[leap]), 在周字段上表½Cºæ˜ŸæœŸå…­åQŒç›¸å½“于"7"æˆ?SAT"。如果在"L"前加上数字,则表½Cø™¯¥æ•°æ®çš„æœ€åŽä¸€ä¸ªã€‚例如在周字ŒDµä¸Šè®„¡½®"6L"˜q™æ ·çš„æ ¼å¼?则表½C?#8220;本月最后一个星期五" 
W è¡¨ç¤º¼›ÀLŒ‡å®šæ—¥æœŸçš„æœ€˜q‘那个工作日(周一臛_‘¨äº?. 例如在日字段上设¾|?15W"åQŒè¡¨½Cºç¦»æ¯æœˆ15åähœ€˜q‘的那个工作日触发。如æž?5åäh­£å¥½æ˜¯å‘¨å…­åQŒåˆ™æ‰¾æœ€˜q‘的周五(14å?触发, 如果15åäh˜¯å‘¨æœªåQŒåˆ™æ‰¾æœ€˜q‘的下周一(16å?触发.如果15åäh­£å¥½åœ¨å·¥ä½œæ—?周一臛_‘¨äº?åQŒåˆ™ž®±åœ¨è¯¥å¤©è§¦å‘ã€‚å¦‚æžœæŒ‡å®šæ ¼å¼äØ“ "1W",它则表示每月1号往后最˜q‘的工作日触发。如æž?åäh­£æ˜¯å‘¨å…­ï¼Œåˆ™å°†åœ?号下周一触发ã€?注,"W"前只能设¾|®å…·ä½“的数字,不允许区é—?-").
# åºå·(表示每月的第几个周几)åQŒä¾‹å¦‚在周字ŒDµä¸Šè®„¡½®"6#3"表示在每月的½W¬ä¸‰ä¸ªå‘¨å…?注意如果指定"#5",正好½W¬äº”周没有周六,则不会触发该配置(用在母亲节和父亲节再合适不˜q‡äº†) åQ?br />
ž®æ½Cºï¼š
'L'å’?'W'可以一¾l„合使用。如果在日字ŒDµä¸Šè®„¡½®"LW",则表½Cºåœ¨æœ¬æœˆçš„æœ€åŽä¸€ä¸ªå·¥ä½œæ—¥è§¦å‘åQ?br />周字ŒD늚„讄¡½®åQŒè‹¥ä½¿ç”¨è‹±æ–‡å­—母是不区分大小写的åQŒå³MON ä¸Žmon相同åQ?/tt>
        
常用½CÞZ¾‹:

 

0 0 12 * * ?每天12点触�/td>
0 15 10 ? * *每天10�5分触�/td>
0 15 10 * * ?每天10�5分触�/td>
0 15 10 * * ? *每天10�5分触�/td>
0 15 10 * * ? 20052005òq´æ¯å¤?0ç‚?5分触å?/td>
0 * 14 * * ?每天下午�2点到2�9分每分触�/td>
0 0/5 14 * * ?每天下午�2点到2�9�整点开始,每隔5分触�
0 0/5 14,18 * * ?每天下午�2点到2�9分�8点到18�9�整点开始,每隔5分触�
0 0-5 14 * * ?每天下午�2点到2�5分每分触�/td>
0 10,44 14 ? 3 WED3月分每周三下午的 2�0分和2�4分触�/td>
0 15 10 ? * MON-FRI从周一到周五每天上午的10�5分触�/td>
0 15 10 15 * ?每月15号上�0�5分触�/td>
0 15 10 L * ?每月最后一天的10�5分触�/td>
0 15 10 ? * 6L每月最后一周的星期五的10�5分触�/td>
0 15 10 ? * 6L 2002-2005ä»?002òq´åˆ°2005òq´æ¯æœˆæœ€åŽä¸€å‘¨çš„æ˜ŸæœŸäº”çš„10ç‚?5分触å?/td>
0 15 10 ? * 6#3每月的第三周的星期五开始触�/td>
0 0 12 1/5 * ?每月的第一个中午开始每éš?天触发一‹Æ?/td>
0 11 11 11 11 ?每年�1�1�11�1分触�光棍�



]]>
Spring中配¾|®MYSQLhttp://www.aygfsteel.com/jjshcc/archive/2010/10/10/334158.htmlEric_jiangEric_jiangSun, 10 Oct 2010 01:55:00 GMThttp://www.aygfsteel.com/jjshcc/archive/2010/10/10/334158.htmlhttp://www.aygfsteel.com/jjshcc/comments/334158.htmlhttp://www.aygfsteel.com/jjshcc/archive/2010/10/10/334158.html#Feedback0http://www.aygfsteel.com/jjshcc/comments/commentRss/334158.htmlhttp://www.aygfsteel.com/jjshcc/services/trackbacks/334158.html     <bean id="dataSource"
        class="org.apache.commons.dbcp.BasicDataSource"
        destroy-method="close">
        <property name="driverClassName" value="com.mysql.jdbc.Driver" />
        <!-- 解决数据库中出现ä¹Þq çš„æ–¹æ³•在数据库名字后面加?useUnicode=true&amp;characterEncoding=utf-8-->
        <property name="url" value="jdbc:mysql://localhost:3306/game?useUnicode=true&amp;characterEncoding=utf-8" />
        <property name="username" value="root" />
        <property name="password" value="root" />
    </bean>


]]>
Spring中配¾|®SQLServer2005http://www.aygfsteel.com/jjshcc/archive/2010/10/10/334157.htmlEric_jiangEric_jiangSun, 10 Oct 2010 01:52:00 GMThttp://www.aygfsteel.com/jjshcc/archive/2010/10/10/334157.htmlhttp://www.aygfsteel.com/jjshcc/comments/334157.htmlhttp://www.aygfsteel.com/jjshcc/archive/2010/10/10/334157.html#Feedback1http://www.aygfsteel.com/jjshcc/comments/commentRss/334157.htmlhttp://www.aygfsteel.com/jjshcc/services/trackbacks/334157.html             destroy-method="close">
            <property name="driverClass">
                <value>com.microsoft.sqlserver.jdbc.SQLServerDriver</value>
            </property>
            <property name="jdbcUrl">
                <value>jdbc:sqlserver://localhost:1433;databaseName=databaseName</value>
            </property>
            <property name="user">
                <value>UserName</value>
            </property>
            <property name="password">
                <value>123456</value>
            </property>
            <property name="minPoolSize">
                <value>15</value>
            </property>
            <property name="acquireIncrement">
                <value>5</value>
            </property>
            <property name="maxPoolSize">
                <value>25</value>
            </property>
        </bean>

]]>
Ö÷Õ¾Ö©Öë³ØÄ£°å£º ÏæÎ÷| ²ªÀûÏØ| ½­Ô´ÏØ| ÓÈÏªÏØ| Äþ»¯ÏØ| ÑγØÏØ| ÁÙëÔÏØ| ²ßÀÕÏØ| À´°²ÏØ| ÀàÎÚÆëÏØ| ¾®ÚêÏØ| ò£ÉÏÏØ| Çà¸ÔÏØ| ÎÚÉóÆì| ÑôÐÅÏØ| ÎäÂ¡ÏØ| ¸ßÇå| Ìì½òÊÐ| ÇåÔ·ÏØ| ÑâÉ½ÏØ| ºÏ·ÊÊÐ| ÇìÔªÏØ| ÐËÂ¡ÏØ| ½­ÓÍÊÐ| ½­¶¼ÊÐ| Õý°²ÏØ| ÃɳÇÏØ| °ÍÖÐÊÐ| ʯ³ÇÏØ| °ÍÀï| µ¾³ÇÏØ| ²ýÀÖÏØ| ËÉÅËÏØ| ÄþºÓÏØ| ¹àÔÆÏØ| Õò½­ÊÐ| °Í¶«ÏØ| ̨ÄÏÏØ| °²ÈÊÏØ| ÐÂÌïÏØ| µ¤½­¿ÚÊÐ|