﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>BlogJava-The NoteBook of EricKong-随笔分类-Spring</title><link>http://www.blogjava.net/jjshcc/category/46569.html</link><description>桑巴葡语翻译工作室是广州市最专业葡萄牙语翻译机构-www.puyufanyi.com-欢迎寻找Java,As400,Mainframe的猎头eric_cc#qq.ccom(把#换成@)</description><language>zh-cn</language><lastBuildDate>Tue, 19 Aug 2014 06:49:02 GMT</lastBuildDate><pubDate>Tue, 19 Aug 2014 06:49:02 GMT</pubDate><ttl>60</ttl><item><title>在web.xml中通过contextConfigLocation配置spring</title><link>http://www.blogjava.net/jjshcc/archive/2014/08/15/416986.html</link><dc:creator>Eric_jiang</dc:creator><author>Eric_jiang</author><pubDate>Fri, 15 Aug 2014 02:11:00 GMT</pubDate><guid>http://www.blogjava.net/jjshcc/archive/2014/08/15/416986.html</guid><wfw:comment>http://www.blogjava.net/jjshcc/comments/416986.html</wfw:comment><comments>http://www.blogjava.net/jjshcc/archive/2014/08/15/416986.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.blogjava.net/jjshcc/comments/commentRss/416986.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/jjshcc/services/trackbacks/416986.html</trackback:ping><description><![CDATA[<div><span style="font-family: verdana, Arial, helvetica, sans-seriff; line-height: 17px; font-size: 13px; color: #4b4b4b; "><p>spring的 配置文件在启动时，加载的是web-info目录下的applicationContext.xml,<br />运行时使用的是web-info/classes目录下的applicationContext.xml。<br /><br />配置web.xml使这2个路径一致：<br /></p><p>&lt;context-param&gt;<br />&nbsp;&nbsp;&lt;param-name&gt;contextConfigLocation&lt;/param-name&gt;<br />&nbsp;&nbsp;&lt;param-value&gt;/WEB-INF/classes/applicationContext.xml&lt;/param-value&gt;<br />&nbsp;&lt;/context-param&gt;</p><p>多个配置文件的加载<br />&lt;context-param&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;param-name&gt;contextConfigLocation&lt;/param-name&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;param-value&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; classpath*:conf/spring/applicationContext_core*.xml,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; classpath*:conf/spring/applicationContext_dict*.xml,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; classpath*:conf/spring/applicationContext_hibernate.xml,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; classpath*:conf/spring/applicationContext_staff*.xml,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; classpath*:conf/spring/applicationContext_security.xml<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; classpath*:conf/spring/applicationContext_modules*.xml<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; classpath*:conf/spring/applicationContext_cti*.xml<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; classpath*:conf/spring/applicationContext_apm*.xml<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/param-value&gt;<br />&nbsp;&nbsp;&nbsp; &lt;/context-param&gt;</p><p>contextConfigLocation 参数定义了要装入的 Spring 配置文件。</p></span></div><img src ="http://www.blogjava.net/jjshcc/aggbug/416986.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/jjshcc/" target="_blank">Eric_jiang</a> 2014-08-15 10:11 <a href="http://www.blogjava.net/jjshcc/archive/2014/08/15/416986.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title> springmvc中获得request方法</title><link>http://www.blogjava.net/jjshcc/archive/2014/08/14/416954.html</link><dc:creator>Eric_jiang</dc:creator><author>Eric_jiang</author><pubDate>Thu, 14 Aug 2014 07:54:00 GMT</pubDate><guid>http://www.blogjava.net/jjshcc/archive/2014/08/14/416954.html</guid><wfw:comment>http://www.blogjava.net/jjshcc/comments/416954.html</wfw:comment><comments>http://www.blogjava.net/jjshcc/archive/2014/08/14/416954.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/jjshcc/comments/commentRss/416954.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/jjshcc/services/trackbacks/416954.html</trackback:ping><description><![CDATA[<div><span style="font-family: Arial; line-height: 26px; "><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; ">由于是使用<strong style="color: black; background-color: #ffff66; ">spring</strong>&nbsp;<strong style="color: black; background-color: #a0ffff; ">mvc</strong>来做项目，因此脱离了HttpServletRequest作为参数，不能够直接使用request，要想使用request可以使用下面的方法：<br /></p><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; ">在web点xml中配置一个监听</p><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; "></p><pre name="code" style="white-space: pre-wrap; word-wrap: break-word; ">&lt;listener&gt;         &lt;listener-class&gt;             org.springframework.web.context.request.RequestContextListener         &lt;/listener-class&gt; &lt;/listener&gt;</pre>之后就可以在程序使用了<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; "></p><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; "></p><pre name="code" style="white-space: pre-wrap; word-wrap: break-word; ">HttpServletRequest request = ((ServletRequestAttributes)RequestContextHolder.getRequestAttributes()).<a name="baidusnap2" style="color: rgb(202, 0, 0); text-decoration: none; width: 20px; height: 20px; text-indent: 20px; background-image: url(http://www.blogjava.net/CuteSoft_Client/CuteEditor/Load.ashx?type=image&amp;file=anchor.gif); background-repeat: no-repeat no-repeat; "></a><strong style="color: black; background-color: #99ff99; ">getRequest</strong>();</pre></span></div><img src ="http://www.blogjava.net/jjshcc/aggbug/416954.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/jjshcc/" target="_blank">Eric_jiang</a> 2014-08-14 15:54 <a href="http://www.blogjava.net/jjshcc/archive/2014/08/14/416954.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>&lt;context:component-scan&gt;使用说明</title><link>http://www.blogjava.net/jjshcc/archive/2014/08/13/416897.html</link><dc:creator>Eric_jiang</dc:creator><author>Eric_jiang</author><pubDate>Wed, 13 Aug 2014 03:22:00 GMT</pubDate><guid>http://www.blogjava.net/jjshcc/archive/2014/08/13/416897.html</guid><wfw:comment>http://www.blogjava.net/jjshcc/comments/416897.html</wfw:comment><comments>http://www.blogjava.net/jjshcc/archive/2014/08/13/416897.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/jjshcc/comments/commentRss/416897.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/jjshcc/services/trackbacks/416897.html</trackback:ping><description><![CDATA[<div><span style="font-family: Arial; line-height: 26px; color: #333333; "><p align="left">&nbsp;在xml配置了这个标签后，spring可以自动去扫描base-pack下面或者子包下面的java文件，如果扫描到有@Component @Controller@Service等这些注解的类，则把这些类注册为bean</p><p align="left">注意：如果配置了&lt;context:component-scan&gt;那么&lt;context:annotation-config/&gt;标签就可以不用再xml中配置了，因为前者包含了后者。另外&lt;context:annotation-config/&gt;还提供了两个子标签</p><p align="left">1.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;context:include-filter&gt;</p><p align="left">2.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;context:exclude-filter&gt;</p><p align="left">在说明这两个子标签前，先说一下&lt;context:component-scan&gt;有一个use-default-filters属性，改属性默认为true,<span style="color: red; ">这就意味着会扫描指定包下的全部的标有</span><span style="color: red; ">@Component</span><span style="color: red; ">的类，并注册成</span><span style="color: red; ">bean.</span><span style="color: red; ">也就是</span><span style="color: red; ">@Component</span><span style="color: red; ">的子注解</span><span style="color: red; ">@Service,@Reposity</span><span style="color: red; ">等</span>。所以如果仅仅是在配置文件中这么写</p><p align="left">&lt;context:component-scan base-package=<em>"tv.huan.weisp.web"</em>/&gt;</p><p align="left">&nbsp;Use-default-filter此时为true那么会对base-package包或者子包下的所有的进行java类进行扫描,并把匹配的java类注册成bean。</p><p align="left">&nbsp;</p><p align="left">&nbsp;可以发现这种扫描的粒度有点太大，如果你只想扫描指定包下面的Controller，该怎么办？此时子标签&lt;context:incluce-filter&gt;就起到了勇武之地。如下所示</p><p align="left">&lt;context:component-scan&nbsp;base-package="<span style="color: red; ">tv.huan.weisp.web .controller</span>"&gt;&nbsp;&nbsp;</p><p align="left">&lt;context:include-filter&nbsp;type="annotation"&nbsp;expression="org.springframework.stereotype.Controller"/&gt;&nbsp;&nbsp;&nbsp;</p><p align="left">&lt;/context:component-scan&gt;&nbsp;&nbsp;</p><p align="left">这样就会只扫描base-package指定下的有@Controller下的java类，并注册成bean</p><p align="left">但是因为use-dafault-filter在上面并没有指定，默认就为true，所以当把上面的配置改成如下所示的时候，就会产生与你期望相悖的结果<span style="color: red; ">（注意</span><span style="color: red; ">base-package</span><span style="color: red; ">包值得变化）</span></p><p align="left">&lt;context:component-scan&nbsp;base-package="<span style="color: red; ">tv.huan.weisp.web&nbsp;</span>"&gt;&nbsp;&nbsp;</p><p align="left">&lt;context:include-filter&nbsp;type="annotation"&nbsp;expression="org.springframework.stereotype.Controller"/&gt;&nbsp;&nbsp;&nbsp;</p><p align="left">&lt;/context:component-scan&gt;&nbsp;&nbsp;</p><p align="left">此时，spring不仅扫描了@Controller，还扫描了指定包所在的子包service包下注解@Service的java类</p><p align="left">此时指定的include-filter没有起到作用，只要把use-default-filter设置成false就可以了。这样就可以避免在base-packeage配置多个包名这种不是很优雅的方法来解决这个问题了。</p><p align="left">另外在我参与的项目中可以发现在base-package指定的包中有的子包是不含有注解了，所以不用扫描，此时可以指定&lt;context:exclude-filter&gt;来进行过滤，说明此包不需要被扫描。综合以上说明</p><p align="left">Use-dafault-filters=&#8221;false&#8221;的情况下：&lt;context:exclude-filter&gt;指定的不扫描，&lt;context:include-filter&gt;指定的扫描</p></span></div><img src ="http://www.blogjava.net/jjshcc/aggbug/416897.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/jjshcc/" target="_blank">Eric_jiang</a> 2014-08-13 11:22 <a href="http://www.blogjava.net/jjshcc/archive/2014/08/13/416897.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Spring--quartz中cronExpression配置说明</title><link>http://www.blogjava.net/jjshcc/archive/2014/07/31/416409.html</link><dc:creator>Eric_jiang</dc:creator><author>Eric_jiang</author><pubDate>Thu, 31 Jul 2014 07:32:00 GMT</pubDate><guid>http://www.blogjava.net/jjshcc/archive/2014/07/31/416409.html</guid><wfw:comment>http://www.blogjava.net/jjshcc/comments/416409.html</wfw:comment><comments>http://www.blogjava.net/jjshcc/archive/2014/07/31/416409.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/jjshcc/comments/commentRss/416409.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/jjshcc/services/trackbacks/416409.html</trackback:ping><description><![CDATA[<div><span style="font-family: verdana, Arial, helvetica, sans-seriff; line-height: 19px; font-size: 12px; color: #4b4b4b; ">
<table cellspacing="8">
     <tbody>
         <tr>
             <th align="left">字段</th><th align="left">&nbsp;</th><th align="left">允许值</th><th align="left">&nbsp;</th><th align="left">允许的特殊字符</th>
         </tr>
         <tr>
             <td align="left" style="font-size: 12px; font-family: Verdana, Helvetica, Arial; word-break: break-all; line-height: 18px; "><code>秒</code></td>
             <td align="left" style="font-size: 12px; font-family: Verdana, Helvetica, Arial; word-break: break-all; line-height: 18px; ">&nbsp;</td>
             <td align="left" style="font-size: 12px; font-family: Verdana, Helvetica, Arial; word-break: break-all; line-height: 18px; "><code>0-59</code></td>
             <td align="left" style="font-size: 12px; font-family: Verdana, Helvetica, Arial; word-break: break-all; line-height: 18px; ">&nbsp;</td>
             <td align="left" style="font-size: 12px; font-family: Verdana, Helvetica, Arial; word-break: break-all; line-height: 18px; "><code>, - * /</code></td>
         </tr>
         <tr>
             <td align="left" style="font-size: 12px; font-family: Verdana, Helvetica, Arial; word-break: break-all; line-height: 18px; "><code>分</code></td>
             <td align="left" style="font-size: 12px; font-family: Verdana, Helvetica, Arial; word-break: break-all; line-height: 18px; ">&nbsp;</td>
             <td align="left" style="font-size: 12px; font-family: Verdana, Helvetica, Arial; word-break: break-all; line-height: 18px; "><code>0-59</code></td>
             <td align="left" style="font-size: 12px; font-family: Verdana, Helvetica, Arial; word-break: break-all; line-height: 18px; ">&nbsp;</td>
             <td align="left" style="font-size: 12px; font-family: Verdana, Helvetica, Arial; word-break: break-all; line-height: 18px; "><code>, - * /</code></td>
         </tr>
         <tr>
             <td align="left" style="font-size: 12px; font-family: Verdana, Helvetica, Arial; word-break: break-all; line-height: 18px; "><code>小时</code></td>
             <td align="left" style="font-size: 12px; font-family: Verdana, Helvetica, Arial; word-break: break-all; line-height: 18px; ">&nbsp;</td>
             <td align="left" style="font-size: 12px; font-family: Verdana, Helvetica, Arial; word-break: break-all; line-height: 18px; "><code>0-23</code></td>
             <td align="left" style="font-size: 12px; font-family: Verdana, Helvetica, Arial; word-break: break-all; line-height: 18px; ">&nbsp;</td>
             <td align="left" style="font-size: 12px; font-family: Verdana, Helvetica, Arial; word-break: break-all; line-height: 18px; "><code>, - * /</code></td>
         </tr>
         <tr>
             <td align="left" style="font-size: 12px; font-family: Verdana, Helvetica, Arial; word-break: break-all; line-height: 18px; "><code>日期</code></td>
             <td align="left" style="font-size: 12px; font-family: Verdana, Helvetica, Arial; word-break: break-all; line-height: 18px; ">&nbsp;</td>
             <td align="left" style="font-size: 12px; font-family: Verdana, Helvetica, Arial; word-break: break-all; line-height: 18px; "><code>1-31</code></td>
             <td align="left" style="font-size: 12px; font-family: Verdana, Helvetica, Arial; word-break: break-all; line-height: 18px; ">&nbsp;</td>
             <td align="left" style="font-size: 12px; font-family: Verdana, Helvetica, Arial; word-break: break-all; line-height: 18px; "><code>, - * ? / L W C</code></td>
         </tr>
         <tr>
             <td align="left" style="font-size: 12px; font-family: Verdana, Helvetica, Arial; word-break: break-all; line-height: 18px; "><code>月份</code></td>
             <td align="left" style="font-size: 12px; font-family: Verdana, Helvetica, Arial; word-break: break-all; line-height: 18px; ">&nbsp;</td>
             <td align="left" style="font-size: 12px; font-family: Verdana, Helvetica, Arial; word-break: break-all; line-height: 18px; "><code>1-12&nbsp;或者 JAN-DEC</code></td>
             <td align="left" style="font-size: 12px; font-family: Verdana, Helvetica, Arial; word-break: break-all; line-height: 18px; ">&nbsp;</td>
             <td align="left" style="font-size: 12px; font-family: Verdana, Helvetica, Arial; word-break: break-all; line-height: 18px; "><code>, - * /</code></td>
         </tr>
         <tr>
             <td align="left" style="font-size: 12px; font-family: Verdana, Helvetica, Arial; word-break: break-all; line-height: 18px; "><code>星期</code></td>
             <td align="left" style="font-size: 12px; font-family: Verdana, Helvetica, Arial; word-break: break-all; line-height: 18px; ">&nbsp;</td>
             <td align="left" style="font-size: 12px; font-family: Verdana, Helvetica, Arial; word-break: break-all; line-height: 18px; "><code>1-7&nbsp;或者 SUN-SAT</code></td>
             <td align="left" style="font-size: 12px; font-family: Verdana, Helvetica, Arial; word-break: break-all; line-height: 18px; ">&nbsp;</td>
             <td align="left" style="font-size: 12px; font-family: Verdana, Helvetica, Arial; word-break: break-all; line-height: 18px; "><code>, - * ? / L C #</code></td>
         </tr>
         <tr>
             <td align="left" style="font-size: 12px; font-family: Verdana, Helvetica, Arial; word-break: break-all; line-height: 18px; "><code>年（可选）</code></td>
             <td align="left" style="font-size: 12px; font-family: Verdana, Helvetica, Arial; word-break: break-all; line-height: 18px; ">&nbsp;</td>
             <td align="left" style="font-size: 12px; font-family: Verdana, Helvetica, Arial; word-break: break-all; line-height: 18px; "><code>留空, 1970-2099</code></td>
             <td align="left" style="font-size: 12px; font-family: Verdana, Helvetica, Arial; word-break: break-all; line-height: 18px; ">&nbsp;</td>
             <td align="left" style="font-size: 12px; font-family: Verdana, Helvetica, Arial; word-break: break-all; line-height: 18px; "><code>, - * /</code></td>
         </tr>
     </tbody>
</table>
<p><br />
The '*' character is used to specify all values. For example, "*" in the minute field means "every minute".&nbsp;<br />
&#8220;*&#8221;字符被用来指定所有的值。如：&#8221;*&#8220;在分钟的字段域里表示&#8220;每分钟&#8221;。&nbsp;<br />
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.&nbsp;<br />
&#8220;?&#8221;字符只在日期域和星期域中使用。它被用来指定&#8220;非明确的值&#8221;。当你需要通过在这两个域中的一个来指定一些东西的时候，它是有用的。看下面的例子你就会明白。&nbsp;<br />
月份中的日期和星期中的日期这两个元素时互斥的一起应该通过设置一个问号(?)来表明不想设置那个字段<br />
<br />
The '-' character is used to specify ranges For example "10-12" in the hour field means "the hours 10, 11 and 12".&nbsp;<br />
&#8220;-&#8221;字符被用来指定一个范围。如：&#8220;10-12&#8221;在小时域意味着&#8220;10点、11点、12点&#8221;。&nbsp;<br />
<br />
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".&nbsp;<br />
&#8220;,&#8221;字符被用来指定另外的值。如：&#8220;MON,WED,FRI&#8221;在星期域里表示&#8221;星期一、星期三、星期五&#8221;.&nbsp;<br />
<br />
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.&nbsp;<br />
<br />
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.&nbsp;<br />
<br />
L是&#8216;last&#8217;的省略写法可以表示day-of-month和day-of-week域，但在两个字段中的意思不同，例如day-of-month域中表示一个月的最后一天，<br />
如果在day-of-week域表示&#8216;7&#8217;或者&#8216;SAT&#8217;，如果在day-of-week域中前面加上数字，它表示一个月的最后几天，例如&#8216;6L&#8217;就表示一个月的最后一个<br />
星期五，<br />
<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<br />
.&nbsp;<br />
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".&nbsp;<br />
<br />
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.&nbsp;<br />
<br />
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".&nbsp;<br />
关于cronExpression的介绍:<br />
&nbsp;<br />
字段 允许值 允许的特殊字符&nbsp;<br />
秒 0-59 , - * /&nbsp;<br />
分 0-59 , - * /&nbsp;<br />
小时 0-23 , - * /&nbsp;<br />
日期 1-31 , - * ? / L W C&nbsp;<br />
月份 1-12 或者 JAN-DEC , - * /&nbsp;<br />
星期 1-7 或者 SUN-SAT , - * ? / L C #&nbsp;<br />
年（可选） 留空, 1970-2099 , - * /&nbsp;<br />
表达式意义&nbsp;<br />
"0 0 12 * * ?" 每天中午12点触发&nbsp;<br />
"0 15 10 ? * *" 每天上午10:15触发&nbsp;<br />
"0 15 10 * * ?" 每天上午10:15触发&nbsp;<br />
"0 15 10 * * ? *" 每天上午10:15触发&nbsp;<br />
"0 15 10 * * ? 2005" 2005年的每天上午10:15触发&nbsp;<br />
"0 * 14 * * ?" 在每天下午2点到下午2:59期间的每1分钟触发&nbsp;<br />
"0 0/5 14 * * ?" 在每天下午2点到下午2:55期间的每5分钟触发&nbsp;<br />
"0 0/5 14,18 * * ?" 在每天下午2点到2:55期间和下午6点到6:55期间的每5分钟触发&nbsp;<br />
"0 0-5 14 * * ?" 在每天下午2点到下午2:05期间的每1分钟触发&nbsp;<br />
"0 10,44 14 ? 3 WED" 每年三月的星期三的下午2:10和2:44触发&nbsp;<br />
"0 15 10 ? * MON-FRI" 周一至周五的上午10:15触发&nbsp;<br />
"0 15 10 15 * ?" 每月15日上午10:15触发&nbsp;<br />
"0 15 10 L * ?" 每月最后一日的上午10:15触发&nbsp;<br />
"0 15 10 ? * 6L" 每月的最后一个星期五上午10:15触发&nbsp;<br />
"0 15 10 ? * 6L 2002-2005" 2002年至2005年的每月的最后一个星期五上午10:15触发&nbsp;<br />
"0 15 10 ? * 6#3" 每月的第三个星期五上午10:15触发&nbsp;<br />
每天早上6点&nbsp;<br />
0 6 * * *&nbsp;<br />
每两个小时&nbsp;<br />
0 */2 * * *&nbsp;<br />
晚上11点到早上8点之间每两个小时，早上八点&nbsp;<br />
0 23-7/2，8 * * *&nbsp;<br />
每个月的4号和每个礼拜的礼拜一到礼拜三的早上11点&nbsp;<br />
0 11 4 * 1-3&nbsp;<br />
1月1日早上4点&nbsp;<br />
0 4 1 1 *<br />
</p>
<p>quartz的高级特性不仅如此&nbsp;<br />
1 数据库存储&nbsp;<br />
2 集群支持&nbsp;<br />
3 数据库持久化任务，trigger&nbsp;<br />
4 trigger 的停止，运行&nbsp;<br />
5 任务的任意添加&nbsp;<br />
6 比corntrigger 更详尽的任务安排&nbsp;<br />
7 线程的内部数据交换<br />
<br />
<br />
<br /><div><span style="color: #333333; font-family: Arial; line-height: 26px; font-size: 14px; "><p style="padding-bottom: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; "><span style="font-size: 14px; "><span style="font-size: 12pt; "><span style="font-size: 12pt; "><span style="font-size: 10pt; ">一个cron表达式有至少6个（也可能7个）有空格分隔的时间元素。<br />按顺序依次为<br />1.秒（0~59）<br />2.分钟（0~59）<br /></span></span><span style="font-size: 12pt; "><span style="font-size: 12pt; "><span style="font-size: 10pt; ">3.小时（0~23）</span></span></span></span></span>&nbsp;<span style="font-size: 12pt; "><span style="font-size: 12pt; "><span style="font-size: 10pt; "><br /><span style="font-size: 14px; ">4.天（月）（0~31，但是你需要考虑你月的天数）<br /></span></span></span></span><span style="font-size: 12pt; "><span style="font-size: 12pt; "><span style="font-size: 10pt; "><span style="font-size: 14px; ">5.月（0~11）<br /></span></span></span></span><span style="font-size: 14px; "><span style="font-size: 12pt; "><span style="font-size: 12pt; "><span style="font-size: 10pt; ">6.天（星期）（1~7 1=SUN 或 SUN，MON，TUE，WED，THU，FRI，SAT）<br /></span></span><span style="font-size: 12pt; "><span style="font-size: 12pt; "><span style="font-size: 10pt; ">7.年份（1970－2099）</span></span></span></span></span></p><p style="padding-bottom: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; "><span style="font-size: 12pt; "><span style="font-size: 12pt; "><span style="font-size: 10pt; "><span style="font-size: 14px; ">其中每个元素可以是一个值(如6),一个连续区间(9-12),一个间隔时间(8-18/4)(/表示每隔4小时),一个列表(1,3,5),通配符。<br />由于"月份中的日期"和"星期中的日期"这两个元素互斥的,必须要对其中一个设置?.</span></span></span></span></p><p style="padding-bottom: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; "><span style="font-size: 12pt; "><span style="font-size: 12pt; "><span style="font-size: 10pt; "><span style="font-size: 14px; ">0 0 10,14,16 * * ? 每天上午10点，下午2点，4点<br />0 0/30 9-17 * * ??? 朝九晚五工作时间内每半小时<br />0 0 12 ? * WED 表示每个星期三中午12点</span></span></span></span></p><p style="padding-bottom: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; "><span style="font-size: 14px; "><span style="font-size: 12pt; "><span style="font-size: 12pt; "><span style="font-size: 10pt; ">有些子表达式能包含一些范围或列表<br /></span></span><span style="font-size: 12pt; "><span style="font-size: 12pt; "><span style="font-size: 10pt; ">例如：子表达式（天（星期））可以为 &#8220;MON-FRI&#8221;，&#8220;MON，WED，FRI&#8221;，&#8220;MON-WED,SAT&#8221;</span></span></span></span></span></p><p style="padding-bottom: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; "><span style="font-size: 14px; "><span style="font-size: 12pt; "><span style="font-size: 12pt; "><span style="font-size: 10pt; ">&#8220;*&#8221;字符代表所有可能的值<br /></span></span><span style="font-size: 12pt; "><span style="font-size: 12pt; "><span style="font-size: 10pt; ">因此，&#8220;*&#8221;在子表达式（月）里表示每个月的含义，&#8220;*&#8221;在子表达式（天（星期））表示星期的每一天</span></span></span></span></span></p><p style="padding-bottom: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; "><span style="font-size: 12pt; "><span style="font-size: 12pt; "><span style="font-size: 10pt; "><span style="font-size: 14px; ">&#8220;/&#8221;字符用来指定数值的增量<br /></span></span></span></span><span style="font-size: 12pt; "><span style="font-size: 12pt; "><span style="font-size: 10pt; "><span style="font-size: 14px; ">例如：在子表达式（分钟）里的&#8220;0/15&#8221;表示从第0分钟开始，每15分钟 ;<br /></span></span></span></span><span style="font-size: 14px; "><span style="font-size: 12pt; "><span style="font-size: 12pt; "><span style="font-size: 10pt; ">在子表达式（分钟）里的&#8220;3/20&#8221;表示从第3分钟开始，每20分钟（它和&#8220;3，23，43&#8221;）的含义一样<br /></span></span><br /></span></span><span style="font-size: 14px; "><span style="font-size: 12pt; "><span style="font-size: 12pt; "><span style="font-size: 10pt; ">&#8220;？&#8221;字符仅被用于天（月）和天（星期）两个子表达式，表示不指定值<br /></span></span><span style="font-size: 12pt; "><span style="font-size: 12pt; "><span style="font-size: 10pt; ">当2个子表达式其中之一被指定了值以后，为了避免冲突，需要将另一个子表达式的值设为&#8220;？&#8221;</span></span></span></span></span></p><p style="padding-bottom: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; ">&nbsp;</p><p style="padding-bottom: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; "><span style="font-size: 12pt; "><span style="font-size: 12pt; "><span style="font-size: 10pt; "><span style="font-size: 14px; ">&#8220;L&#8221; 字符仅被用于天（月）和天（星期）两个子表达式，它是单词&#8220;last&#8221;的缩写</span></span></span></span></p><p style="padding-bottom: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; "><span style="font-size: 12pt; "><span style="font-size: 12pt; "><span style="font-size: 10pt; "><span style="font-size: 14px; ">但是它在两个子表达式里的含义是不同的。</span></span></span></span></p><p style="padding-bottom: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; "><span style="font-size: 14px; "><span style="font-size: 12pt; "><span style="font-size: 12pt; "><span style="font-size: 10pt; ">在天（月）子表达式中，&#8220;L&#8221;表示一个月的最后一天 ,<br /></span></span><span style="font-size: 12pt; "><span style="font-size: 12pt; "><span style="font-size: 10pt; ">在天（星期）自表达式中，&#8220;L&#8221;表示一个星期的最后一天，也就是SAT</span></span></span></span></span></p><p style="padding-bottom: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; "><span style="font-size: 12pt; "><span style="font-size: 12pt; "><span style="font-size: 10pt; "><span style="font-size: 14px; ">如果在&#8220;L&#8221;前有具体的内容，它就具有其他的含义了</span></span></span></span></p><p style="padding-bottom: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; "><span style="font-size: 12pt; "><span style="font-size: 12pt; "><span style="font-size: 10pt; "><span style="font-size: 14px; ">例如：&#8220;6L&#8221;表示这个月的倒数第６天，&#8220;ＦＲＩＬ&#8221;表示这个月的最后一个星期五</span></span></span></span></p><p style="padding-bottom: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; "><span style="font-size: 12pt; "><span style="font-size: 10pt; "><span style="font-size: 12pt; "><span style="font-size: 14px; ">注意：在使用&#8220;L&#8221;参数时，不要指定列表或范围，因为这会导致问题</span></span></span></span></p><p style="padding-bottom: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; "><span style="font-size: 12pt; "><span style="font-size: 10pt; "><span style="font-size: 12pt; "><span style="font-size: 14px; ">============================================</span></span></span></span></p><p style="padding-bottom: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; "><span style="font-size: 12pt; "><span style="font-size: 10pt; "></span></span></p><p style="padding-bottom: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; ">CronTrigger配置完整格式为： [秒] [分] [小时] [日] [月] [周] [年]</p><p style="padding-bottom: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; ">&nbsp;</p><table border="0" cellspacing="2" cellpadding="2" style="margin-top: 2px; margin-right: 2px; margin-bottom: 2px; margin-left: 2px; width: 500px; height: 111px; "><tbody><tr><td style="font-size: 1em; ">&nbsp;序号</td><td style="font-size: 1em; ">说明</td><td style="font-size: 1em; ">&nbsp;是否必填</td><td style="font-size: 1em; ">&nbsp;允许填写的值</td><td style="font-size: 1em; ">允许的通配符</td></tr><tr><td style="font-size: 1em; ">&nbsp;1</td><td style="font-size: 1em; ">&nbsp;秒</td><td style="font-size: 1em; ">&nbsp;是</td><td style="font-size: 1em; ">&nbsp;0-59&nbsp;</td><td style="font-size: 1em; ">&nbsp; , - * /</td></tr><tr><td style="font-size: 1em; ">&nbsp;2</td><td style="font-size: 1em; ">&nbsp;分</td><td style="font-size: 1em; ">&nbsp;是</td><td style="font-size: 1em; ">&nbsp;0-59&nbsp;</td><td style="font-size: 1em; ">&nbsp; , - * /</td></tr><tr valign="middle" align="left"><td style="font-size: 1em; ">&nbsp;3</td><td style="font-size: 1em; ">小时</td><td style="font-size: 1em; ">&nbsp;是</td><td style="font-size: 1em; ">&nbsp;0-23</td><td style="font-size: 1em; ">&nbsp; , - * /</td></tr><tr valign="middle" align="left"><td style="font-size: 1em; ">&nbsp;4</td><td style="font-size: 1em; ">&nbsp;日</td><td style="font-size: 1em; ">&nbsp;是</td><td style="font-size: 1em; ">&nbsp;1-31</td><td style="font-size: 1em; ">&nbsp; , - * ? / L W</td></tr><tr valign="middle" align="left"><td style="font-size: 1em; ">&nbsp;5</td><td style="font-size: 1em; ">&nbsp;月</td><td style="font-size: 1em; ">&nbsp;是</td><td style="font-size: 1em; ">&nbsp;1-12 or JAN-DEC</td><td style="font-size: 1em; ">&nbsp; , - * /</td></tr><tr valign="middle" align="left"><td style="font-size: 1em; ">&nbsp;6</td><td style="font-size: 1em; ">&nbsp;周</td><td style="font-size: 1em; ">&nbsp;是</td><td style="font-size: 1em; ">&nbsp;1-7 or SUN-SAT</td><td style="font-size: 1em; ">&nbsp; , - * ? / L #</td></tr><tr><td style="font-size: 1em; ">&nbsp;7</td><td style="font-size: 1em; ">&nbsp;年</td><td style="font-size: 1em; ">&nbsp;否</td><td style="font-size: 1em; ">&nbsp;empty 或 1970-2099</td><td style="font-size: 1em; ">&nbsp;&nbsp;, - * /</td></tr></tbody></table><p style="padding-bottom: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; ">通配符说明:<br /><tt><strong style="font-weight: bold; "><span style="color: red; "><tt><strong style="font-weight: bold; "><span style="font-size: 12pt; "><tt><strong style="font-weight: bold; "><span style="font-size: 12pt; ">*</span></strong></tt></span></strong></tt>&nbsp;</span></strong></tt>表示所有值. 例如:在分的字段上设置 "*",表示每一分钟都会触发。<br /><tt><strong style="font-weight: bold; "><span style="color: red; "><tt><strong style="font-weight: bold; "><span style="font-size: 12pt; ">?</span></strong></tt></span></strong></tt>&nbsp;表示不指定值。使用的场景为不需要关心当前设置这个字段的值。例如:要在每月的10号触发一个操作，但不关心是周几，所以需要周位置的那个字段设置为"?" 具体设置为 0 0 0 10&nbsp;<span style="color: red; "><span style="font-size: 12pt; "><span style="color: red; ">*</span></span></span>&nbsp;?<br /><tt><strong style="font-weight: bold; "><span style="color: red; "><span style="font-size: 12pt; "><tt><strong style="font-weight: bold; "><span style="color: red; ">-</span></strong></tt></span></span></strong></tt>&nbsp;表示区间。例如 在小时上设置 "10-12",表示 10,11,12点都会触发。<br /><tt><strong style="font-weight: bold; "><span style="color: red; "><span style="font-size: 12pt; ">,</span></span></strong></tt>&nbsp;表示指定多个值，例如在周字段上设置 "MON,WED,FRI" 表示周一，周三和周五触发<br /><tt><strong style="font-weight: bold; "><span style="color: red; "><tt><strong style="font-weight: bold; "><span style="font-size: 12pt; "><tt><strong style="font-weight: bold; ">/</strong></tt></span></strong></tt>&nbsp;</span></strong></tt>用于递增触发。如在秒上面设置"5/15" 表示从5秒开始，每增15秒触发(5,20,35,50)。 在月字段上设置'1/3'所示每月1号开始，每隔三天触发一次。<br /><tt><strong style="font-weight: bold; "><span style="color: red; "><span style="font-size: 12pt; ">L</span></span></strong></tt>&nbsp;表示最后的意思。在日字段设置上，表示当月的最后一天(依据当前月份，如果是二月还会依据是否是润年[leap]), 在周字段上表示星期六，相当于"7"或"SAT"。如果在"L"前加上数字，则表示该数据的最后一个。例如在周字段上设置"6L"这样的格式,则表示&#8220;本月最后一个星期五"&nbsp;<br /><tt><strong style="font-weight: bold; "><span style="color: red; "><tt><strong style="font-weight: bold; "><span style="font-size: 12pt; ">W</span></strong></tt></span></strong></tt>&nbsp;表示离指定日期的最近那个工作日(周一至周五). 例如在日字段上设置"15W"，表示离每月15号最近的那个工作日触发。如果15号正好是周六，则找最近的周五(14号)触发, 如果15号是周未，则找最近的下周一(16号)触发.如果15号正好在工作日(周一至周五)，则就在该天触发。如果指定格式为 "1W",它则表示每月1号往后最近的工作日触发。如果1号正是周六，则将在3号下周一触发。(注，"W"前只能设置具体的数字,不允许区间"-").<br /><tt><strong style="font-weight: bold; "><span style="color: red; "><span style="font-size: 12pt; ">#</span></span></strong></tt>&nbsp;序号(表示每月的第几个周几)，例如在周字段上设置"6#3"表示在每月的第三个周六.注意如果指定"#5",正好第五周没有周六，则不会触发该配置(用在母亲节和父亲节再合适不过了) ；<br /><br />小提示：<br />'L'和 'W'可以一组合使用。如果在日字段上设置"LW",则表示在本月的最后一个工作日触发；<br />周字段的设置，若使用英文字母是不区分大小写的，即<tt>MON</tt>&nbsp;<tt>与mon相同；</tt><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />常用示例:</p><p style="padding-bottom: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; ">&nbsp;</p><table "="" border="0"><tbody><tr><td style="font-size: 1em; "><tt>0 0 12 * * ?</tt></td><td style="font-size: 1em; ">每天12点触发</td></tr><tr><td style="font-size: 1em; "><tt>0 15 10 ? * *</tt></td><td style="font-size: 1em; ">每天10点15分触发</td></tr><tr><td style="font-size: 1em; "><tt>0 15 10 * * ?</tt></td><td style="font-size: 1em; ">每天10点15分触发</td></tr><tr><td style="font-size: 1em; "><tt>0 15 10 * * ? *</tt></td><td style="font-size: 1em; ">每天10点15分触发</td></tr><tr><td style="font-size: 1em; "><tt>0 15 10 * * ? 2005</tt></td><td style="font-size: 1em; ">2005年每天10点15分触发</td></tr><tr><td style="font-size: 1em; "><tt>0 * 14 * * ?</tt></td><td style="font-size: 1em; ">每天下午的 2点到2点59分每分触发</td></tr><tr><td style="font-size: 1em; "><tt>0 0/5 14 * * ?</tt></td><td style="font-size: 1em; ">每天下午的 2点到2点59分(整点开始，每隔5分触发)</td></tr><tr><td style="font-size: 1em; "><tt>0 0/5 14,18 * * ?</tt></td><td style="font-size: 1em; ">每天下午的 2点到2点59分、18点到18点59分(整点开始，每隔5分触发)</td></tr><tr><td style="font-size: 1em; "><tt>0 0-5 14 * * ?</tt></td><td style="font-size: 1em; ">每天下午的 2点到2点05分每分触发</td></tr><tr><td style="font-size: 1em; "><tt>0 10,44 14 ? 3 WED</tt></td><td style="font-size: 1em; ">3月分每周三下午的 2点10分和2点44分触发</td></tr><tr><td style="font-size: 1em; "><tt>0 15 10 ? * MON-FRI</tt></td><td style="font-size: 1em; ">从周一到周五每天上午的10点15分触发</td></tr><tr><td style="font-size: 1em; "><tt>0 15 10 15 * ?</tt></td><td style="font-size: 1em; ">每月15号上午10点15分触发</td></tr><tr><td style="font-size: 1em; "><tt>0 15 10 L * ?</tt></td><td style="font-size: 1em; ">每月最后一天的10点15分触发</td></tr><tr><td style="font-size: 1em; "><tt>0 15 10 ? * 6L</tt></td><td style="font-size: 1em; ">每月最后一周的星期五的10点15分触发</td></tr><tr><td style="font-size: 1em; "><tt>0 15 10 ? * 6L 2002-2005</tt></td><td style="font-size: 1em; ">从2002年到2005年每月最后一周的星期五的10点15分触发</td></tr><tr><td style="font-size: 1em; "><tt>0 15 10 ? * 6#3</tt></td><td style="font-size: 1em; ">每月的第三周的星期五开始触发</td></tr><tr><td style="font-size: 1em; "><tt>0 0 12 1/5 * ?</tt></td><td style="font-size: 1em; ">每月的第一个中午开始每隔5天触发一次</td></tr><tr><td style="font-size: 1em; "><tt>0 11 11 11 11 ?</tt></td><td style="font-size: 1em; ">每年的11月11号 11点11分触发(光棍节)</td></tr></tbody></table></span></div>
<br />
</p>
</span></div><img src ="http://www.blogjava.net/jjshcc/aggbug/416409.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/jjshcc/" target="_blank">Eric_jiang</a> 2014-07-31 15:32 <a href="http://www.blogjava.net/jjshcc/archive/2014/07/31/416409.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Spring中配置MYSQL</title><link>http://www.blogjava.net/jjshcc/archive/2010/10/10/334158.html</link><dc:creator>Eric_jiang</dc:creator><author>Eric_jiang</author><pubDate>Sun, 10 Oct 2010 01:55:00 GMT</pubDate><guid>http://www.blogjava.net/jjshcc/archive/2010/10/10/334158.html</guid><wfw:comment>http://www.blogjava.net/jjshcc/comments/334158.html</wfw:comment><comments>http://www.blogjava.net/jjshcc/archive/2010/10/10/334158.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/jjshcc/comments/commentRss/334158.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/jjshcc/services/trackbacks/334158.html</trackback:ping><description><![CDATA[&lt;!-- dataSource config --&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;bean id="dataSource"<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; class="org.apache.commons.dbcp.BasicDataSource"<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; destroy-method="close"&gt;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;property name="driverClassName" value="com.mysql.jdbc.Driver" /&gt;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;!-- 解决数据库中出现乱码的方法在数据库名字后面加?useUnicode=true&amp;amp;characterEncoding=utf-8--&gt;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;property name="url" value="jdbc:mysql://localhost:3306/game?useUnicode=true&amp;amp;characterEncoding=utf-8" /&gt;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;property name="username" value="root" /&gt;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;property name="password" value="root" /&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;/bean&gt;<br />
<img src ="http://www.blogjava.net/jjshcc/aggbug/334158.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/jjshcc/" target="_blank">Eric_jiang</a> 2010-10-10 09:55 <a href="http://www.blogjava.net/jjshcc/archive/2010/10/10/334158.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Spring中配置SQLServer2005</title><link>http://www.blogjava.net/jjshcc/archive/2010/10/10/334157.html</link><dc:creator>Eric_jiang</dc:creator><author>Eric_jiang</author><pubDate>Sun, 10 Oct 2010 01:52:00 GMT</pubDate><guid>http://www.blogjava.net/jjshcc/archive/2010/10/10/334157.html</guid><wfw:comment>http://www.blogjava.net/jjshcc/comments/334157.html</wfw:comment><comments>http://www.blogjava.net/jjshcc/archive/2010/10/10/334157.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.blogjava.net/jjshcc/comments/commentRss/334157.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/jjshcc/services/trackbacks/334157.html</trackback:ping><description><![CDATA[&lt;bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource"<br />
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;destroy-method="close"&gt;<br />
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;property name="driverClass"&gt;<br />
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;value&gt;com.microsoft.sqlserver.jdbc.SQLServerDriver&lt;/value&gt;<br />
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;/property&gt;<br />
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;property name="jdbcUrl"&gt;<br />
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;value&gt;jdbc:sqlserver://localhost:1433;databaseName=databaseName&lt;/value&gt;<br />
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;/property&gt;<br />
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;property name="user"&gt;<br />
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;value&gt;UserName&lt;/value&gt;<br />
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;/property&gt;<br />
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;property name="password"&gt;<br />
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;value&gt;123456&lt;/value&gt;<br />
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;/property&gt;<br />
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;property name="minPoolSize"&gt;<br />
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;value&gt;15&lt;/value&gt;<br />
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;/property&gt;<br />
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;property name="acquireIncrement"&gt;<br />
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;value&gt;5&lt;/value&gt;<br />
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;/property&gt;<br />
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;property name="maxPoolSize"&gt;<br />
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;value&gt;25&lt;/value&gt;<br />
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;/property&gt;<br />
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;/bean&gt;
<img src ="http://www.blogjava.net/jjshcc/aggbug/334157.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/jjshcc/" target="_blank">Eric_jiang</a> 2010-10-10 09:52 <a href="http://www.blogjava.net/jjshcc/archive/2010/10/10/334157.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>