??xml version="1.0" encoding="utf-8" standalone="yes"?>99re热久久这里只有精品34,亚洲午夜精品久久久久久久久久久久,1769视频在线播放免费观看http://www.aygfsteel.com/huamengxing/archive/2020/06/13/435510.html华梦?/dc:creator>华梦?/author>Sat, 13 Jun 2020 02:46:00 GMThttp://www.aygfsteel.com/huamengxing/archive/2020/06/13/435510.htmlhttp://www.aygfsteel.com/huamengxing/comments/435510.htmlhttp://www.aygfsteel.com/huamengxing/archive/2020/06/13/435510.html#Feedback0http://www.aygfsteel.com/huamengxing/comments/commentRss/435510.htmlhttp://www.aygfsteel.com/huamengxing/services/trackbacks/435510.html

            //允许输入字母、点、回退键、数?br />            if (((int)e.KeyChar >= (int)'a' && (int)e.KeyChar <= (int)'z') || (((int)e.KeyChar > 48 && (int)e.KeyChar < 57) || (int)e.KeyChar == 8 || (int)e.KeyChar == 46))
            {
                e.Handled = false;
            }
            else e.Handled = true;



      //允许输入字母、回退键、数?br />            if (((int)e.KeyChar >= (int)'a' && (int)e.KeyChar <= (int)'z') || (((int)e.KeyChar > 48 && (int)e.KeyChar < 57) || (int)e.KeyChar == 8))
            {
                e.Handled = false;
            }
            else e.Handled = true; 


// 只能输入字母数字以及中文?br />  if ((e.KeyChar != '\b') && (!Char.IsLetter(e.KeyChar)) && (!char.IsDigit(e.KeyChar)))
            {
                e.Handled = true;
            }

//只输入数?br /> if (e.KeyChar != 8 && (!Char.IsDigit(e.KeyChar)))
            {
                e.Handled = true;
            }

只能输入数字以及字母X

  if (e.KeyChar != 88 && e.KeyChar != 8 && (!Char.IsDigit(e.KeyChar)))
            {
                e.Handled = true;
            }


]]>
nlog安装http://www.aygfsteel.com/huamengxing/archive/2020/01/06/435020.html华梦?/dc:creator>华梦?/author>Mon, 06 Jan 2020 08:10:00 GMThttp://www.aygfsteel.com/huamengxing/archive/2020/01/06/435020.htmlhttp://www.aygfsteel.com/huamengxing/comments/435020.htmlhttp://www.aygfsteel.com/huamengxing/archive/2020/01/06/435020.html#Feedback0http://www.aygfsteel.com/huamengxing/comments/commentRss/435020.htmlhttp://www.aygfsteel.com/huamengxing/services/trackbacks/435020.htmlInstall-Package NLog.Config -Version 3.2.1



Install-Package NLog -Version 3.2.1

]]>
mysql5.7以上版本在常会报关于only_full_group_by的错误,可以在sql_mode中关闭他Q网上查扄?/title><link>http://www.aygfsteel.com/huamengxing/archive/2019/09/15/434627.html</link><dc:creator>华梦?/dc:creator><author>华梦?/author><pubDate>Sun, 15 Sep 2019 14:02:00 GMT</pubDate><guid>http://www.aygfsteel.com/huamengxing/archive/2019/09/15/434627.html</guid><wfw:comment>http://www.aygfsteel.com/huamengxing/comments/434627.html</wfw:comment><comments>http://www.aygfsteel.com/huamengxing/archive/2019/09/15/434627.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/huamengxing/comments/commentRss/434627.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/huamengxing/services/trackbacks/434627.html</trackback:ping><description><![CDATA[<a > <ul style="list-style-type: none; box-sizing: border-box; font-size: 16px; word-wrap: break-word; font-family: 'Microsoft YaHei', 'SF Pro Display', Roboto, Noto, Arial, 'PingFang SC', sans-serif; font-variant: normal; white-space: normal; word-spacing: 0px; text-transform: none; font-weight: normal; color: ; outline-width: 0px; padding-bottom: 0px; font-style: normal; padding-top: 0px; outline-style: none; padding-left: 0px; widows: 1; margin: 0px 0px 24px; letter-spacing: normal; outline-color: invert; padding-right: 0px; background-color: rgb(255,255,255); text-indent: 0px; -webkit-text-stroke-width: 0px"><li style="list-style-type: disc; box-sizing: border-box; word-wrap: break-word; font-family: 'Microsoft YaHei', 'SF Pro Display', Roboto, Noto, Arial, 'PingFang SC', sans-serif; outline-width: 0px; padding-bottom: 0px; padding-top: 0px; outline-style: none; padding-left: 0px; margin: 8px 0px 0px 32px; outline-color: invert; padding-right: 0px"><span style="white-space: normal; word-spacing: 0px; text-transform: none; float: none; color: rgb(77,77,77); font: 16px/26px 'Microsoft YaHei', 'SF Pro Display', Roboto, Noto, Arial, 'PingFang SC', sans-serif; widows: 1; display: inline !important; letter-spacing: normal; background-color: rgb(255,255,255); text-indent: 0px; -webkit-text-stroke-width: 0px">mysql5.7以上版本在常会报关于</span><code style="box-sizing: border-box; word-wrap: break-word; white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(199,37,78); outline-width: 0px; padding-bottom: 2px; padding-top: 2px; font: 14px/22px 'Source Code Pro', 'DejaVu Sans Mono', 'Ubuntu Mono', 'Anonymous Pro', 'Droid Sans Mono', Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, 'PingFang SC', 'Microsoft YaHei', sans-serif; outline-style: none; padding-left: 4px; widows: 1; letter-spacing: normal; outline-color: invert; padding-right: 4px; background-color: rgb(249,242,244); text-indent: 0px; -webkit-text-stroke-width: 0px; border-radius: 2px">only_full_group_by</code><span style="white-space: normal; word-spacing: 0px; text-transform: none; float: none; color: rgb(77,77,77); font: 16px/26px 'Microsoft YaHei', 'SF Pro Display', Roboto, Noto, Arial, 'PingFang SC', sans-serif; widows: 1; display: inline !important; letter-spacing: normal; background-color: rgb(255,255,255); text-indent: 0px; -webkit-text-stroke-width: 0px">的错误,可以在sql_mode中关闭他Q网上查扄?/span></li><li style="list-style-type: disc; box-sizing: border-box; word-wrap: break-word; font-family: 'Microsoft YaHei', 'SF Pro Display', Roboto, Noto, Arial, 'PingFang SC', sans-serif; outline-width: 0px; padding-bottom: 0px; padding-top: 0px; outline-style: none; padding-left: 0px; margin: 8px 0px 0px 32px; outline-color: invert; padding-right: 0px"></li><li style="list-style-type: disc; box-sizing: border-box; word-wrap: break-word; font-family: 'Microsoft YaHei', 'SF Pro Display', Roboto, Noto, Arial, 'PingFang SC', sans-serif; outline-width: 0px; padding-bottom: 0px; padding-top: 0px; outline-style: none; padding-left: 0px; margin: 8px 0px 0px 32px; outline-color: invert; padding-right: 0px"></li><li style="list-style-type: disc; box-sizing: border-box; word-wrap: break-word; font-family: 'Microsoft YaHei', 'SF Pro Display', Roboto, Noto, Arial, 'PingFang SC', sans-serif; outline-width: 0px; padding-bottom: 0px; padding-top: 0px; outline-style: none; padding-left: 0px; margin: 8px 0px 0px 32px; outline-color: invert; padding-right: 0px">在[mysqld]中添加代?/li></ul><pre class="prettyprint" style="box-sizing: border-box; word-wrap: break-word; border-top: medium none; border-right: medium none; word-spacing: 0px; overflow-x: auto; overflow-y: hidden; border-bottom: medium none; position: relative; text-transform: none; color: rgb(0,0,0); outline-width: 0px; padding-bottom: 6px; padding-top: 8px; font: 14px/22px 'Source Code Pro', 'DejaVu Sans Mono', 'Ubuntu Mono', 'Anonymous Pro', 'Droid Sans Mono', Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, 'PingFang SC', 'Microsoft YaHei', sans-serif; outline-style: none; padding-left: 56px; border-left: medium none; widows: 1; margin: 0px 0px 24px; letter-spacing: normal; outline-color: invert; padding-right: 16px; background-color: rgb(246,248,250); text-indent: 0px; -webkit-text-stroke-width: 0px"><code onclick="mdcp.signin(event)" class=" hljs bash" style="box-sizing: border-box; font-size: 14px; word-wrap: break-word; font-family: 'Source Code Pro', 'DejaVu Sans Mono', 'Ubuntu Mono', 'Anonymous Pro', 'Droid Sans Mono', Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, 'PingFang SC', 'Microsoft YaHei', sans-serif; white-space: pre; min-width: 94%; overflow-x: auto; color: rgb(79,79,79) !important; outline-width: 0px; padding-bottom: 8px; padding-top: 8px; outline-style: none; padding-left: 8px; display: block; outline-color: invert; line-height: 22px; padding-right: 8px; background-color: rgb(246,248,250); border-radius: 4px">sql_mode =<span id="wmqeeuq" class="hljs-string" style="box-sizing: border-box; word-wrap: break-word; font-family: 'Microsoft YaHei', 'SF Pro Display', Roboto, Noto, Arial, 'PingFang SC', sans-serif; color: rgb(0,153,0) !important; outline-width: 0px; outline-style: none; outline-color: invert">'STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'</span></code></pre><pre class="prettyprint" style="box-sizing: border-box; word-wrap: break-word; border-top: medium none; border-right: medium none; word-spacing: 0px; overflow-x: auto; overflow-y: hidden; border-bottom: medium none; position: relative; text-transform: none; color: rgb(0,0,0); outline-width: 0px; padding-bottom: 6px; padding-top: 8px; font: 14px/22px 'Source Code Pro', 'DejaVu Sans Mono', 'Ubuntu Mono', 'Anonymous Pro', 'Droid Sans Mono', Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, 'PingFang SC', 'Microsoft YaHei', sans-serif; outline-style: none; padding-left: 56px; border-left: medium none; widows: 1; margin: 0px 0px 24px; letter-spacing: normal; outline-color: invert; padding-right: 16px; background-color: rgb(246,248,250); text-indent: 0px; -webkit-text-stroke-width: 0px"><p style="box-sizing: border-box; word-wrap: break-word; white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(77,77,77); outline-width: 0px; padding-bottom: 0px; padding-top: 0px; font: 16px/26px 'Microsoft YaHei', 'SF Pro Display', Roboto, Noto, Arial, 'PingFang SC', sans-serif; outline-style: none; padding-left: 0px; widows: 1; margin: 0px 0px 16px; letter-spacing: normal; outline-color: invert; padding-right: 0px; background-color: rgb(255,255,255); text-indent: 0px; -webkit-text-stroke-width: 0px">重启mysql</p><pre class="prettyprint" style="box-sizing: border-box; word-wrap: break-word; border-top: medium none; border-right: medium none; word-spacing: 0px; overflow-x: auto; overflow-y: hidden; border-bottom: medium none; position: relative; text-transform: none; color: rgb(0,0,0); outline-width: 0px; padding-bottom: 6px; padding-top: 8px; font: 14px/22px 'Source Code Pro', 'DejaVu Sans Mono', 'Ubuntu Mono', 'Anonymous Pro', 'Droid Sans Mono', Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, 'PingFang SC', 'Microsoft YaHei', sans-serif; outline-style: none; padding-left: 56px; border-left: medium none; widows: 1; margin: 0px 0px 24px; letter-spacing: normal; outline-color: invert; padding-right: 16px; background-color: rgb(246,248,250); text-indent: 0px; -webkit-text-stroke-width: 0px"><code onclick="mdcp.signin(event)" class=" hljs bash" style="box-sizing: border-box; font-size: 14px; word-wrap: break-word; font-family: 'Source Code Pro', 'DejaVu Sans Mono', 'Ubuntu Mono', 'Anonymous Pro', 'Droid Sans Mono', Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, 'PingFang SC', 'Microsoft YaHei', sans-serif; white-space: pre; min-width: 94%; overflow-x: auto; color: rgb(79,79,79) !important; outline-width: 0px; padding-bottom: 8px; padding-top: 8px; outline-style: none; padding-left: 8px; display: block; outline-color: invert; line-height: 22px; padding-right: 8px; background-color: rgb(246,248,250); border-radius: 4px"><span id="wmqeeuq" class="hljs-built_in" style="box-sizing: border-box; word-wrap: break-word; font-family: 'Microsoft YaHei', 'SF Pro Display', Roboto, Noto, Arial, 'PingFang SC', sans-serif; color: rgb(79,79,79) !important; outline-width: 0px; outline-style: none; outline-color: invert">sudo</span> service mysql restart</code></pre><p style="box-sizing: border-box; word-wrap: break-word; white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(77,77,77); outline-width: 0px; padding-bottom: 0px; padding-top: 0px; font: 16px/26px 'Microsoft YaHei', 'SF Pro Display', Roboto, Noto, Arial, 'PingFang SC', sans-serif; outline-style: none; padding-left: 0px; widows: 1; margin: 0px 0px 16px; letter-spacing: normal; outline-color: invert; padding-right: 0px; background-color: rgb(255,255,255); text-indent: 0px; -webkit-text-stroke-width: 0px"><span style="white-space: normal; word-spacing: 0px; text-transform: none; float: none; color: rgb(77,77,77); font: 16px/26px 'Microsoft YaHei', 'SF Pro Display', Roboto, Noto, Arial, 'PingFang SC', sans-serif; widows: 1; display: inline !important; letter-spacing: normal; background-color: rgb(255,255,255); text-indent: 0px; -webkit-text-stroke-width: 0px">mysql5.7以上版本在常会报关于</span><code style="box-sizing: border-box; word-wrap: break-word; white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(199,37,78); outline-width: 0px; padding-bottom: 2px; padding-top: 2px; font: 14px/22px 'Source Code Pro', 'DejaVu Sans Mono', 'Ubuntu Mono', 'Anonymous Pro', 'Droid Sans Mono', Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, 'PingFang SC', 'Microsoft YaHei', sans-serif; outline-style: none; padding-left: 4px; widows: 1; letter-spacing: normal; outline-color: invert; padding-right: 4px; background-color: rgb(249,242,244); text-indent: 0px; -webkit-text-stroke-width: 0px; border-radius: 2px">only_full_group_by</code><span style="white-space: normal; word-spacing: 0px; text-transform: none; float: none; color: rgb(77,77,77); font: 16px/26px 'Microsoft YaHei', 'SF Pro Display', Roboto, Noto, Arial, 'PingFang SC', sans-serif; widows: 1; display: inline !important; letter-spacing: normal; background-color: rgb(255,255,255); text-indent: 0px; -webkit-text-stroke-width: 0px">的错误,可以在sql_mode中关闭他Q网上查扄?/span><br />查看参数是否存在</p><pre class="prettyprint" style="box-sizing: border-box; word-wrap: break-word; border-top: medium none; border-right: medium none; word-spacing: 0px; overflow-x: auto; overflow-y: hidden; border-bottom: medium none; position: relative; text-transform: none; color: rgb(0,0,0); outline-width: 0px; padding-bottom: 6px; padding-top: 8px; font: 14px/22px 'Source Code Pro', 'DejaVu Sans Mono', 'Ubuntu Mono', 'Anonymous Pro', 'Droid Sans Mono', Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, 'PingFang SC', 'Microsoft YaHei', sans-serif; outline-style: none; padding-left: 56px; border-left: medium none; widows: 1; margin: 0px 0px 24px; letter-spacing: normal; outline-color: invert; padding-right: 16px; background-color: rgb(246,248,250); text-indent: 0px; -webkit-text-stroke-width: 0px"><code onclick="mdcp.signin(event)" class=" hljs asciidoc" style="box-sizing: border-box; font-size: 14px; word-wrap: break-word; font-family: 'Source Code Pro', 'DejaVu Sans Mono', 'Ubuntu Mono', 'Anonymous Pro', 'Droid Sans Mono', Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, 'PingFang SC', 'Microsoft YaHei', sans-serif; white-space: pre; min-width: 94%; overflow-x: auto; color: rgb(79,79,79) !important; outline-width: 0px; padding-bottom: 8px; padding-top: 8px; outline-style: none; padding-left: 8px; display: block; outline-color: invert; line-height: 22px; padding-right: 8px; background-color: rgb(246,248,250); border-radius: 4px"><span id="wmqeeuq" class="hljs-header" style="box-sizing: border-box; word-wrap: break-word; font-family: 'Microsoft YaHei', 'SF Pro Display', Roboto, Noto, Arial, 'PingFang SC', sans-serif; color: rgb(0,153,0) !important; outline-width: 0px; outline-style: none; outline-color: invert">mysql> SELECT @@sql_mode; +------------------------------------------------------------------------------------------------------------------------+</span> <span id="wmqeeuq" class="hljs-header" style="box-sizing: border-box; word-wrap: break-word; font-family: 'Microsoft YaHei', 'SF Pro Display', Roboto, Noto, Arial, 'PingFang SC', sans-serif; color: rgb(0,153,0) !important; outline-width: 0px; outline-style: none; outline-color: invert">| @@sql_mode | +------------------------------------------------------------------------------------------------------------------------+</span> <span id="wmqeeuq" class="hljs-header" style="box-sizing: border-box; word-wrap: break-word; font-family: 'Microsoft YaHei', 'SF Pro Display', Roboto, Noto, Arial, 'PingFang SC', sans-serif; color: rgb(0,153,0) !important; outline-width: 0px; outline-style: none; outline-color: invert">| STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION | +------------------------------------------------------------------------------------------------------------------------+</span> 1 row in set (0.00 sec) <span id="wmqeeuq" class="hljs-header" style="box-sizing: border-box; word-wrap: break-word; font-family: 'Microsoft YaHei', 'SF Pro Display', Roboto, Noto, Arial, 'PingFang SC', sans-serif; color: rgb(0,153,0) !important; outline-width: 0px; outline-style: none; outline-color: invert">mysql> SELECT @@GLOBAL.sql_mode; +------------------------------------------------------------------------------------------------------------------------+</span> <span id="wmqeeuq" class="hljs-header" style="box-sizing: border-box; word-wrap: break-word; font-family: 'Microsoft YaHei', 'SF Pro Display', Roboto, Noto, Arial, 'PingFang SC', sans-serif; color: rgb(0,153,0) !important; outline-width: 0px; outline-style: none; outline-color: invert">| @@GLOBAL.sql_mode | +------------------------------------------------------------------------------------------------------------------------+</span> <span id="wmqeeuq" class="hljs-header" style="box-sizing: border-box; word-wrap: break-word; font-family: 'Microsoft YaHei', 'SF Pro Display', Roboto, Noto, Arial, 'PingFang SC', sans-serif; color: rgb(0,153,0) !important; outline-width: 0px; outline-style: none; outline-color: invert">| STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION | +------------------------------------------------------------------------------------------------------------------------+</span> 1 row in set (0.00 sec)</code></pre></pre></a><img src ="http://www.aygfsteel.com/huamengxing/aggbug/434627.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/huamengxing/" target="_blank">华梦?/a> 2019-09-15 22:02 <a href="http://www.aygfsteel.com/huamengxing/archive/2019/09/15/434627.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>mysql zip 安装5.7http://www.aygfsteel.com/huamengxing/archive/2019/09/14/434622.html华梦?/dc:creator>华梦?/author>Sat, 14 Sep 2019 14:51:00 GMThttp://www.aygfsteel.com/huamengxing/archive/2019/09/14/434622.htmlhttp://www.aygfsteel.com/huamengxing/comments/434622.htmlhttp://www.aygfsteel.com/huamengxing/archive/2019/09/14/434622.html#Feedback0http://www.aygfsteel.com/huamengxing/comments/commentRss/434622.htmlhttp://www.aygfsteel.com/huamengxing/services/trackbacks/434622.htmlMYSQL_HOME     解压路径   C:\DevelopTool\MySQL\mysql-5.7.25-winx64    

 

 

 Path     %MYSQL_HOME%\bin



>mysqld --initialize --user=mysql --console
mysqld -install 

先启动服务:

net start MySQL【或者是MySQL57?/code>

修改密码
mysqladmin -uroot -p123456 password 123 


sc delete 服务名例如: sc delete mysql



https://www.cnblogs.com/july7/p/11489029.html

q程讉K
use mysql;
GRANT ALL ON *.* TO root@'%' IDENTIFIED BY '密码' WITH GRANT OPTION;
flush privileges;


]]>
postman不能启动的问?/title><link>http://www.aygfsteel.com/huamengxing/archive/2019/05/18/433802.html</link><dc:creator>华梦?/dc:creator><author>华梦?/author><pubDate>Sat, 18 May 2019 03:11:00 GMT</pubDate><guid>http://www.aygfsteel.com/huamengxing/archive/2019/05/18/433802.html</guid><wfw:comment>http://www.aygfsteel.com/huamengxing/comments/433802.html</wfw:comment><comments>http://www.aygfsteel.com/huamengxing/archive/2019/05/18/433802.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/huamengxing/comments/commentRss/433802.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/huamengxing/services/trackbacks/433802.html</trackback:ping><description><![CDATA[ 需要添加一个环境变量POSTMAN_DISABLE_GPU = true? <img src ="http://www.aygfsteel.com/huamengxing/aggbug/433802.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/huamengxing/" target="_blank">华梦?/a> 2019-05-18 11:11 <a href="http://www.aygfsteel.com/huamengxing/archive/2019/05/18/433802.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>REST API URI设计http://www.aygfsteel.com/huamengxing/archive/2017/06/26/432624.html华梦?/dc:creator>华梦?/author>Mon, 26 Jun 2017 01:50:00 GMThttp://www.aygfsteel.com/huamengxing/archive/2017/06/26/432624.htmlhttp://www.aygfsteel.com/huamengxing/comments/432624.htmlhttp://www.aygfsteel.com/huamengxing/archive/2017/06/26/432624.html#Feedback0http://www.aygfsteel.com/huamengxing/comments/commentRss/432624.htmlhttp://www.aygfsteel.com/huamengxing/services/trackbacks/432624.html在了解REST API URI设计的规则之前,让我们快速浏览一些我们将要讨论的术语?/p>

URIs

REST API使用l一资源标识W(URIQ来d资源。在当今互联|上Q充斥着各种各样的URI设计规则Q既有像//api.example.com/louvre/leonardo-da-vinci/mona-lisaq样能够清楚的传达API资源模型的文章,也有很难理解的文章,例如Q?a style="box-sizing: border-box; background-color: transparent; color: #337ab7; text-decoration: none;">//api.example.com/68dd0-a9d3-11e0-9f1c-0800200c9a66 QTim Berners-Lee在他?#8220;Axioms of Web Architecture”一文中URI的不透明度ȝ成一句话Q?/p>

唯一可以使用标识W的是引用对象。在不取消引用时Q就不应该查看URI字符串的内容以获取其他信息?nbsp;
——蒂姆·伯纳?- ?/a>

客户端必遵循Web的链接范例,URI视ؓ不透明标识W?/p>

REST API设计人员应该在考虑REST API资源模型传达l潜在的客户端开发者的前提下,创造URI。在q篇文章中,我将试为REST API URI 引入一?a style="box-sizing: border-box; background-color: transparent; color: #337ab7; text-decoration: none;">设计规则?/p>

先蟩q规则,URI的通用语法也适用与本文中的URI?a style="box-sizing: border-box; background-color: transparent; color: #337ab7; text-decoration: none;">RFC 3986定义了通用URI语法Q如下所C:

URI = scheme “://” authority “/” path [ “?” query ][ “#” fragment ]

规则1QURIl尾不应包含Q?Q?/h2>

q是作ؓURI路径中处理中最重要的规则之一Q正斜杠Q?Q不会增加语义|且可能导致؜淆。REST API不允怸个尾部的斜杠Q不应该它们包含在提供l客L的链接的l尾处?/p>

许多Weblg和框架将q等对待以下两个URIQ?nbsp;
http://api.canvas.com/shapes/ 
http://api.canvas.com/shapes

但是Q实际上URI中的每个字符都会计入资源的唯一w䆾的识别中?/span>

两个不同的URI映射C个不同的资源。如果URI不同Q那么资源也是如此,反之亦然。因此,REST API必须生成和传递精的URIQ不能容忍Q何的客户端尝试不_的资源定位?/p>

有些API到q种情况Q可能设计ؓ让客L重定向到相应没有斜杠的URIQ也有可能会q回301 - 用来资源重定向)?/p>

规则2Q正斜杠分隔W(/Q必ȝ来指C层U关p?/h2>

URI的\径中的正斜杠Q?Q字W用于指C源之间的层次关系?/p>

例如Q?nbsp;
(http://api.canvas.com/shapes/polygons/quadrilaterals/squares Q?/p>

规则3Q应使用q字W( - Q来提高URI的可L?/h2>

Z使您的URIҎ让h们理解,请用连字符Q?- Q字W来提高长\径中名称的可L。在路径中,应该使用q字W代I格q接两个单词 ?/p>

例如Q?nbsp;
http://api.example.com/blogs/guy-levin/posts/this-is-my-first-post

规则4Q不得在URI中用下划线Q_Q?/h2>

一些文本查看器Z区分URIQ常怼在URI下加上下划线。这样下划线Q_Q字W可能被文本查看器中默认的下划线部分地遮蔽或完全隐藏?/p>

为避免这U؜淆,请用连字符Q?- Q而不是下划线

规则5QURI路径中首选小写字?/h2>

方便ӞURI路径中首选小写字母,因ؓ大写字母有时会导致一些问题。RFC 3986URI定义为区分大写Q但scheme ?host components除外?/p>

例如Q?nbsp;
http://api.example.com/my-folder/my-doc

HTTP://API.EXAMPLE.COM/my-folder/my-doc 
q个URI很好。URI格式规范QRFC 3986Q认URI与URIQ?相同?/p>

http://api.example.com/My-Folder/my-doc 
而这个URI与URI 1?不同Q这可能会导致不必要的؜淆?/p>

规则6Q文件扩展名不应包含在URI?/h2>

在Web上,Q?Q字W通常用于分隔URI的文件名和扩展名?nbsp;
REST API不应在URI中包含h造文件扩展名Q来指示邮g实体的格式。相反,他们应该依赖通过Content-Type中的header传递media typeQ来定如何处理正文的内宏V?/p>

http://api.college.com/students/3248234/courses/2005/fall.json 
http://api.college.com/students/3248234/courses/2005/fall

如上所C:不应使用文g扩展名来表示格式?/p>

应鼓励REST API客户端用HTTP提供的格式选择机制Accept request header?/p>

Z是链接和调试更简单,REST API应该支持通过查询参数来支持媒体类型的选择?/p>

规则7Q端点名U是单数q是复数Q?/h2>

keep-it-simple的原则在q里同样适用。虽然一?#8221;语法学家”会告诉你使用复数来描q资源的单个实例是错误的Q但实际上ؓ了保持URI格式的一致性徏议用复数Ş式?/p>

本着API提供商更Ҏ实施和API使用者更Ҏ操作的原则,可以不必U结一些奇怪的复数Qperson/peopleQgoose/geeseQ?/p>

但是应该怎么处理层关系呢?如果一个关pd能存在于另一个资源中QRESTful原则׃提供有用的指对{我们来看一下这个例子。学生有一些课E。这些课E在逻辑上映到学生l端Q如下所C:

http://api.college.com/students/3248234/courses - 索id?248234的学生学习的所有课E的清单?nbsp;
http://api.college.com/students/3248234/courses/physics -索该学生的物理课E?/p>

l论

当你?a style="box-sizing: border-box; background-color: transparent; color: #337ab7; text-decoration: none;">设计REST API服务Ӟ您必L意这些由URI定义的资源?/p>

正在构徏的服务中的每个资源将臛_有一个URI标识它。这个URI最好是有意义的Q且能充分描q资源。URI应遵循可预测的层ơ结构,用来提高其可理解性,可用性:可预的意义在于它们是一致的Q它的层ơ结构在数据关系上是有意义的?/p>

RESTful API是ؓ使用者编写的。URI的名U和l构应该能够向用者传达更清晰的含义。通过遵@上述规则Q您创Z个更清晰的的REST API与更友好的客L。这些ƈ不是REST的规则或U束Q仅仅是API的增强和补充?/p>

我也你来看看http://blog.restcase.com/5-basic-rest-api-design-guidelines/q篇文章?/p>

最后,望大家牢讎ͼ你在Z的客L设计API URIQ而不仅仅是ؓ你的数据?/p>

]]>
加蝲文g的方?/title><link>http://www.aygfsteel.com/huamengxing/archive/2017/06/19/432615.html</link><dc:creator>华梦?/dc:creator><author>华梦?/author><pubDate>Mon, 19 Jun 2017 06:45:00 GMT</pubDate><guid>http://www.aygfsteel.com/huamengxing/archive/2017/06/19/432615.html</guid><wfw:comment>http://www.aygfsteel.com/huamengxing/comments/432615.html</wfw:comment><comments>http://www.aygfsteel.com/huamengxing/archive/2017/06/19/432615.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/huamengxing/comments/commentRss/432615.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/huamengxing/services/trackbacks/432615.html</trackback:ping><description><![CDATA[<p style="margin-top: 0pt; margin-bottom: 0pt; direction: ltr; unicode-bidi: embed; vertical-align: baseline;"><span style="font-size:14.0pt;font-family:Verdana;color:#FF3300;language:zh-CN;font-weight:bold">* </span><span style="font-size:14.0pt;font-family:Verdana;color:#FF3300;language:en-US;font-weight:bold">this.getClass</span><span style="font-size:14.0pt;font-family:Verdana;color:#FF3300;language:en-US;font-weight:bold">().</span><span style="font-size:14.0pt;font-family:Verdana;color:#FF3300;language:en-US;font-weight:bold">getClassLoader</span><span style="font-size:14.0pt;font-family:Verdana;color:#FF3300;language:en-US;font-weight:bold">().</span><span style="font-size:14.0pt;font-family:Verdana;color:#FF3300;language:en-US;font-weight:bold">getResourceAsStream</span><span style="font-size:14.0pt;font-family:Verdana;color:#FF3300;language:en-US;font-weight:bold">("</span><span style="font-size:14.0pt;font-family:Verdana;color:#FF3300;language:en-US;font-weight:bold">testVariables.bpmn</span><span style="font-size:14.0pt;font-family:Verdana;color:#FF3300;language:en-US;font-weight:bold">")</span></p> <p style="margin-top: 0pt; margin-bottom: 0pt; direction: ltr; unicode-bidi: embed; vertical-align: baseline;"><span style="font-size:14.0pt;font-family:Verdana;color:#FF3300;language:en-US;font-weight:bold">       </span><span style="font-size:14.0pt; font-family:宋体;color:#FF3300;language: zh-CN;font-weight:bold">?/span><u><span style="font-size:14.0pt;font-family:Verdana;color:#FF3300;language:en-US;font-weight:bold">classpath</span></u><span style="font-size:14.0pt;font-family:宋体;color:#FF3300;language:zh-CN;font-weight:bold">根目录下加蝲指定名称的文?/span></p> <p style="margin-top: 0pt; margin-bottom: 0pt; direction: ltr; unicode-bidi: embed; vertical-align: baseline;"><span style="font-size:14.0pt;font-family:Verdana;color:#FF3300;language:zh-CN;font-weight:bold"> * </span><span style="font-size:14.0pt; font-family:Verdana;color:#FF3300;language: en-US;font-weight:bold">this.getClass</span><span style="font-size:14.0pt; font-family:Verdana;color:#FF3300;language: en-US;font-weight:bold">().</span><span style="font-size:14.0pt;font-family: Verdana;color:#FF3300;language:en-US;font-weight:bold">getResourceAsStream</span><span style="font-size:14.0pt;font-family:Verdana;color:#FF3300;language:en-US;font-weight:bold">("</span><span style="font-size:14.0pt;font-family:Verdana;color:#FF3300;language:en-US;font-weight:bold">testVariables.bpmn</span><span style="font-size:14.0pt;font-family:Verdana;color:#FF3300;language:en-US;font-weight:bold">")    </span></p> <p style="margin-top: 0pt; margin-bottom: 0pt; direction: ltr; unicode-bidi: embed; vertical-align: baseline;"><span style="font-size:14.0pt;font-family:Verdana;color:#FF3300;language:zh-CN;font-weight:bold">       从当前包下加载指定名U的文g</span></p> <p style="margin-top: 0pt; margin-bottom: 0pt; direction: ltr; unicode-bidi: embed; vertical-align: baseline;"><span style="font-size:14.0pt;font-family:Verdana;color:#FF3300;language:zh-CN;font-weight:bold"> * </span><span style="font-size:14.0pt; font-family:Verdana;color:#FF3300;language: en-US;font-weight:bold">this.getClass</span><span style="font-size:14.0pt; font-family:Verdana;color:#FF3300;language: en-US;font-weight:bold">().</span><span style="font-size:14.0pt;font-family: Verdana;color:#FF3300;language:en-US;font-weight:bold">getResourceAsStream</span><span style="font-size:14.0pt;font-family:Verdana;color:#FF3300;language:en-US;font-weight:bold">("/</span><span style="font-size:14.0pt;font-family:Verdana;color:#FF3300;language:en-US;font-weight:bold">testVariables.bpmn</span><span style="font-size:14.0pt;font-family:Verdana;color:#FF3300;language:en-US;font-weight:bold">")  </span></p> <p style="margin-top: 0pt; margin-bottom: 0pt; direction: ltr; unicode-bidi: embed; vertical-align: baseline;"><span style="font-size:14.0pt;font-family:Verdana;color:#FF3300;language:zh-CN;font-weight:bold">       ?/span><u><span style="font-size:14.0pt;font-family:Verdana;color:#FF3300;language:en-US;font-weight:bold">classpath</span></u><span style="font-size:14.0pt;font-family:宋体;color:#FF3300;language:zh-CN;font-weight:bold">根目录下加蝲指定名称的文?/span></p><img src ="http://www.aygfsteel.com/huamengxing/aggbug/432615.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/huamengxing/" target="_blank">华梦?/a> 2017-06-19 14:45 <a href="http://www.aygfsteel.com/huamengxing/archive/2017/06/19/432615.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>restfulhttp://www.aygfsteel.com/huamengxing/archive/2017/05/26/432551.html华梦?/dc:creator>华梦?/author>Fri, 26 May 2017 00:01:00 GMThttp://www.aygfsteel.com/huamengxing/archive/2017/05/26/432551.htmlhttp://www.aygfsteel.com/huamengxing/comments/432551.htmlhttp://www.aygfsteel.com/huamengxing/archive/2017/05/26/432551.html#Feedback0http://www.aygfsteel.com/huamengxing/comments/commentRss/432551.htmlhttp://www.aygfsteel.com/huamengxing/services/trackbacks/432551.html
package org.gdharley.activiti.integration.rest;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.activiti.engine.ActivitiException;
import org.activiti.engine.delegate.DelegateExecution;
import org.activiti.engine.delegate.Expression;
import org.activiti.engine.delegate.JavaDelegate;
import org.apache.commons.lang3.StringUtils;
import org.apache.http.HttpResponse;
import org.apache.http.NameValuePair;
import org.apache.http.client.methods.*;
import org.apache.http.client.utils.URIBuilder;
import org.apache.http.client.utils.URLEncodedUtils;
import org.apache.http.conn.ssl.SSLConnectionSocketFactory;
import org.apache.http.conn.ssl.SSLContextBuilder;
import org.apache.http.conn.ssl.TrustSelfSignedStrategy;
import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClientBuilder;
import org.apache.http.message.BasicNameValuePair;
import org.apache.http.protocol.HTTP;
import org.apache.http.util.EntityUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.http.HttpMethod;

import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.List;


/**
 * Created by gharley on 5/2/17.
 
*/
public class SimpleRestDelegate implements JavaDelegate {
    private static final Logger logger = LoggerFactory.getLogger(SimpleRestDelegate.class);

    protected Expression endpointUrl;
    protected Expression httpMethod;
    protected Expression isSecure;
    protected Expression payload;

//    一个Content-Type是application/json的请求,具体看v来是q样的:
//    POST /some-path HTTP/1.1
//    Content-Type: application/json
//
//    { "foo" : "bar", "name" : "John" }
//
//
//    { "foo" : "bar", "name" : "John" } 是q个h的payload



    protected Expression headers;
    protected Expression responseMapping;

    protected ObjectMapper objectMapper = new ObjectMapper();

    // Create a mixin to force the BasicNameValuePair constructor
    protected static abstract class BasicNameValuePairMixIn {
        private BasicNameValuePairMixIn(@JsonProperty("name") String name, @JsonProperty("value") String value) {
        }
    }

    public void execute(DelegateExecution execution) throws Exception {
        logger.info("Started Generic REST call delegate");

        if (endpointUrl == null || httpMethod == null) {
            throw new IllegalArgumentException("An endpoint URL and http method are required");
        }

        String restUrl = getExpressionAsString(endpointUrl, execution);
        String payloadStr = getExpressionAsString(payload, execution);
        String headersJSON = getExpressionAsString(headers, execution); // [{"name":"headerName", "value":"headerValue"}]
        String method = getExpressionAsString(httpMethod, execution);
        String rMapping = getExpressionAsString(responseMapping, execution);
        String secure = getExpressionAsString(isSecure, execution);
        String scheme = secure == "true" ? "https" : "http";

        // validate URI and create create request
        URI restEndpointURI = composeURI(restUrl, execution);

        logger.info("Using Generic REST URI " + restEndpointURI.toString());

        HttpRequestBase httpRequest = createHttpRequest(restEndpointURI, scheme, method, headersJSON, payloadStr, rMapping);

        // create http client
        CloseableHttpClient httpClient = createHttpClient(httpRequest, scheme, execution);

        // execute request
        HttpResponse response = executeHttpRequest(httpClient, httpRequest);

        // map response to process instance variables
        if (responseMapping != null) {
            mapResponse(response, rMapping, execution);
        }

        logger.info("Ended Generic REST call delegate");

    }

    protected URI composeURI(String restUrl, DelegateExecution execution)
            throws URISyntaxException {

        URIBuilder uriBuilder = null;
        uriBuilder = encodePath(restUrl, uriBuilder);
        return uriBuilder.build();
    }

    protected URIBuilder encodePath(String restUrl, URIBuilder uriBuilder) throws URISyntaxException {

        if (StringUtils.isNotEmpty(restUrl)) {

            // check if there are URL params
            if (restUrl.indexOf('?') > -1) {

                List<NameValuePair> params = URLEncodedUtils.parse(new URI(restUrl), "UTF-8");

                if (params != null && !params.isEmpty()) {
                    restUrl = restUrl.substring(0, restUrl.indexOf('?'));
                    uriBuilder = new URIBuilder(restUrl);
                    uriBuilder.addParameters(params);

                }
            } else {
                uriBuilder = new URIBuilder(restUrl);
            }
        }

        return uriBuilder;
    }

    protected HttpRequestBase createHttpRequest(URI restEndpointURI, String scheme, String httpMethod, String headers, String payload, String responseMapping) {

        if (StringUtils.isEmpty(httpMethod)) {
            throw new ActivitiException("no HTTP method provided");
        }
        if (restEndpointURI == null) {
            throw new ActivitiException("no REST endpoint URI provided");
        }

        HttpRequestBase httpRequest = null;
        HttpMethod parsedMethod = HttpMethod.valueOf(httpMethod.toUpperCase());
        StringEntity input;
        URIBuilder builder = new URIBuilder(restEndpointURI);

        switch (parsedMethod) {
            case GET:
                try {
                    httpRequest = new HttpGet(builder.build());
                    httpRequest = addHeadersToRequest(httpRequest, headers);
                } catch (URISyntaxException use) {
                    throw new ActivitiException("Error while building GET request", use);
                }
                break;
            case POST:
                try {
                    httpRequest = new HttpPost(builder.build());
                    input = new StringEntity(payload);
//                input.setContentType(new BasicHeader(HTTP.CONTENT_TYPE, "application/json"));
                    ((HttpPost) httpRequest).setEntity(input);
                    httpRequest = addHeadersToRequest(httpRequest, headers);
                    break;
                } catch (Exception e) {
                    throw new ActivitiException("Error while building POST request", e);
                }
            case PUT:
                try {
                    httpRequest = new HttpPut(builder.build());
                    input = new StringEntity(payload);
//                input.setContentType(new BasicHeader(HTTP.CONTENT_TYPE, "application/json"));
                    ((HttpPut) httpRequest).setEntity(input);
                    httpRequest = addHeadersToRequest(httpRequest, headers);
                    break;
                } catch (Exception e) {
                    throw new ActivitiException("Error while building PUT request", e);
                }
            case DELETE:
                try {
                    httpRequest = new HttpDelete(builder.build());
                    httpRequest = addHeadersToRequest(httpRequest, headers);
                } catch (URISyntaxException use) {
                    throw new ActivitiException("Error while building DELETE request", use);
                }
                break;
            default:
                throw new ActivitiException("unknown HTTP method provided");
        }

        return httpRequest;
    }


    protected CloseableHttpClient createHttpClient(HttpRequestBase request, String scheme, DelegateExecution execution) {

        SSLConnectionSocketFactory sslsf = null;

        // Allow self signed certificates and hostname mismatches.
        if (StringUtils.equalsIgnoreCase(scheme, "https")) {
            try {
                SSLContextBuilder builder = new SSLContextBuilder();
                builder.loadTrustMaterial(nullnew TrustSelfSignedStrategy());
                sslsf = new SSLConnectionSocketFactory(builder.build(), SSLConnectionSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER);
            } catch (Exception e) {
                logger.warn("Could not configure HTTP client to use SSL", e);
            }
        }

        HttpClientBuilder httpClientBuilder = HttpClientBuilder.create();

        if (sslsf != null) {
            httpClientBuilder.setSSLSocketFactory(sslsf);
        }

        return httpClientBuilder.build();
    }

    protected HttpResponse executeHttpRequest(CloseableHttpClient httpClient, HttpRequestBase httpRequest) {

        CloseableHttpResponse response = null;
        try {
            response = httpClient.execute(httpRequest);
        } catch (IOException e) {
            throw new ActivitiException("error while executing http request: " + httpRequest.getURI(), e);
        }

        if (response.getStatusLine().getStatusCode() >= 400) {
            throw new ActivitiException("error while executing http request " + httpRequest.getURI() + " with status code: "
                    + response.getStatusLine().getStatusCode());
        }

        return response;
    }

    protected void mapResponse(HttpResponse response, String responseMapping, DelegateExecution execution) {

        if (responseMapping == null || responseMapping.trim().length() == 0) {
            return;
        }

        JsonNode jsonNode = null;
        try {
            String jsonString = EntityUtils.toString(response.getEntity());
            jsonNode = objectMapper.readTree(jsonString);

        } catch (Exception e) {
            throw new ActivitiException("error while parsing response", e);
        }

        if (jsonNode == null) {
            throw new ActivitiException("didn't expect an empty response body");
        }
        execution.setVariable(responseMapping, jsonNode.toString());
    }

    protected HttpRequestBase addHeadersToRequest(HttpRequestBase httpRequest, String headerJSON) {
        Boolean contentTypeDetected = false;
        if (headerJSON != null) {
            // Convert JSON to array
            try {
                // configuration for Jackson/fasterxml
                objectMapper.addMixInAnnotations(BasicNameValuePair.class, BasicNameValuePairMixIn.class);
                NameValuePair[] headers = objectMapper.readValue(headerJSON, BasicNameValuePair[].class);
                for (NameValuePair header : headers) {
                    httpRequest.addHeader(header.getName(), header.getValue());
                    if (header.getName().equals(HTTP.CONTENT_TYPE)) {
                        contentTypeDetected = true;
                    }
                }
            } catch (Exception e) {
                throw new ActivitiException("Unable to parse JSON header array", e);
            }
        }
        // Now add content type if necessary
        if (!contentTypeDetected) {
            httpRequest.addHeader(HTTP.CONTENT_TYPE, "application/json");
        }
        return httpRequest;
    }

    /**
     * 
@return string value of expression.
     * 
@throws {@link IllegalArgumentException} when the expression resolves to a value which is not a string
     *                or if the value is null.
     
*/
    protected String getExpressionAsString(Expression expression, DelegateExecution execution) {
        if (expression == null) {
            return null;
        } else {
            Object value = expression.getValue(execution);
            if (value instanceof String) {
                return (String) value;
            } else {
                throw new IllegalArgumentException("Expression does not resolve to a string or is null: " + expression.getExpressionText());
            }
        }
    }
}


]]>
activitipȝ表结?/title><link>http://www.aygfsteel.com/huamengxing/archive/2017/05/16/432532.html</link><dc:creator>华梦?/dc:creator><author>华梦?/author><pubDate>Tue, 16 May 2017 08:31:00 GMT</pubDate><guid>http://www.aygfsteel.com/huamengxing/archive/2017/05/16/432532.html</guid><wfw:comment>http://www.aygfsteel.com/huamengxing/comments/432532.html</wfw:comment><comments>http://www.aygfsteel.com/huamengxing/archive/2017/05/16/432532.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/huamengxing/comments/commentRss/432532.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/huamengxing/services/trackbacks/432532.html</trackback:ping><description><![CDATA[<div><h2>1、概q?/h2><p>activitipȝ一共有23个表Q包括流E定义表、一般数据信息表、流E运行实例表、流E历史记录表、用LL表?/p><h2>2、Activiti 程定义?/h2><p>程定义表,程定义表也可以叫做是静态资源库Q静态资源包括图片、定义规则等。它有部|信息表、流E模型表、流E定义表</p><p>1、ACT_RE_DEPLOYMENTQ部|信息表Q?/p><p>包括Q部|流E名U、类型、部|时?/p><p>2、ACT_RE_MODELQ模型表Q?/p><p>名称,key、类型、创建时间、最后修Ҏ间、版本、数据源信息、部|ID、编辑源值ID、编辑源额外值IDQ外键ACT_GE_BYTEARRAY Q?/p><p>3、ACT_RE_PROCDEFQ流E定义表Q?nbsp;</p><p>包括程定义、类型、流E名U、流Ekey、版本号、部|ID、资源名U、图片资源名U、描qC息、是否从key启动、暂停状态?/p><h2>3、Activiti q行实例?/h2><p>q行实例表记录流E流转过E中产生的数据,一般数据分Z个部分流E数据、业务数据。流E数据是指activiti程引擎{q程中的数据Q包括流E执行实例数据接、Q务数据、执行Q务h员信息、变量信息。业务数据则是流E过E中保存的表单数据,例如Q如请假的请假单数据、报销单数据、审Ҏ见信息等Q此部分数据一般需要自己徏数据表进行保存,在之前的jbpm4中没有保存业务数据?/p><p>1、ACT_RU_EVENT_SUBSCRQ事件子脚本Q作用未?/p><p>事g名称QEVENT_NAME_Q、事件类?EVENT_TYPE_)、流E执行ID(EXECUTION_ID_)、流E实例ID(PROC_INST_ID_)、活动ID(ACTIVITY_ID_)、配|信?CONFIGURATION_)、创建时_CREATED_Q?/p><p>2、ACT_RU_EXECUTIONQ执行中程执行Q核心我的代办Q务查询表</p><p>程实例IDQPROC_INST_ID_Q,业务keyQBUSINESS_KEY_Q、父执行程QPARENT_ID_Q、流E定义IdQ外键PROC_DEF_ID_Q、实例idQACT_ID_Q、激zȝ态(IS_ACTIVE_Q、ƈ发状态(is_concurrentQ、is_scope、is_evnet_scope、暂停状态(suspension_stateQ、缓存结束状态(cached_end_stateQ?/p><p>3、ACT_RU_IDENTITYLINKQn份联p)</p><p>用户lテQ(GROUP_ID_Q、用Lcd(TYPE_)、用户ID(USER_ID_)、Q务IdQ外键:TASK_ID_Q、流E实例IDQ外键:PROC_INST_ID_Q、流E定义IdQ外?PROC_DEF_ID_Q?/p><p>4、ACT_RU_JOB(q行中的d)</p><p>5、ACT_RU_TASKQ执行中实时dQ代办Q务查询表</p><p>实例idQ外键EXECUTION_ID_Q、流E实例IDQ外键PROC_INST_ID_Q、流E定义IDQPROC_DEF_ID_Q、Q务名UͼNAME_Q、父节Q务IDQPARENT_TASK_ID_Q?/p><p>、Q务描qͼDESCRIPTION_Q、Q务定义keyQTASK_DEF_KEY_Q、所属hQOWNER_Q、代理h?(ASSIGNEE_)、代理团QDELEGATION_Q、优先权QPRIORITY_Q、创建时_CREATE_TIME_Q、执行时_DUE_DATE_Q、暂停状态(SUSPENSION_STATE_Q?/p><p>6、ACT_RU_VARIABLEQ实时变量)</p><p>变量名称QNAME_Q、编码类?TYPE_)、执行实例ID(EXECUTION_ID_)、流E实例Id(PROC_INST_ID_)、Q务id(TASK_ID_)、字节组IDQBYTEARRAY_ID_Q、DOUBLE_、LONG_、TEXT_、TEXT2_</p><h2>3、流E历史记?/h2><p>程历史信息表,activiti历史记录表包括节点信息表、附件信息表、历史审批记录表、理惌l信息表、历史n份信息表、流E实例历史表、Q务历史表、历史变量表。(节点信息表、附件信息表、历史审批记录表、理惌l信息表、历史n份信息表Q这些表目前q未知是如何用的。(程实例历史表、Q务历史表、历史变量)三个表可以查询我已完成Q务、Q务追t等?/p><p>1、ACT_HI_ACTINSTQ活动实例信息)</p><p>程定义IDQPROC_DEF_ID_Q、流E实例IDQPROC_INST_ID_Q、流E执行IDQEXECUTION_ID_Q、活动IDQACT_ID_Q、活动名UͼTASK_ID_Q、活动类型(ACT_TYPE_Q、Q务ID、(TASK_ID_Q、请求流E实例IDQCALL_PROC_INST_ID_Q、代理h员(ASSIGNEE_Q、开始时_START_TIME_Q、结束时?END_TIME_)、时长(DURATION_Q?/p><p>2、ACT_HI_ATTACHMENTQ附件信息)</p><p>用户idQUSER_ID_Q、名UͼNAME_Q、描qͼDESCRIPTION_Q、类型(TYPE_Q、Q务IdQTASK_ID_Q、流E实例IDQPROC_INST_ID_Q、连接(URL_Q、内容IdQCONTENT_ID_Q?/p><p>3、ACT_HI_COMMENTQ历史审批信息)</p><p>cdQTYPE_Q、时_TIME_Q、用户IdQUSER_ID_Q、Q务IdQTASK_ID_Q、流E实例IdQPROC_INST_ID_Q、活动(ACTION_Q、消息(MESSAGE_Q、全部消息(FULL_MSG_Q?/p><p>4、ACT_HI_DETAILQ历史详l信息)</p><p>数据cdQTYPE_Q、创建时?TIME_)、名U?NAME_)、流E实例IDQPROC_INST_ID_Q、执行实例Id(EXECUTION_ID_)、Q务Id(TASK_ID_)、活动实例Id(ACT_INST_ID_)、变量类?VAR_TYPE_)、字节数lId、DOUBLE_、LONG_、|TEXT_Q、?QTEXT2_Q?/p><p>5、ACT_HI_IDENTITYLINKQ历史n份信息)</p><p>dIdQTASK_ID_Q、流E实例IdQPROC_INST_ID_Q、userIdQUSER_ID_Q、用LcdTypeQTYPE_Q、用LIDQGROUP_ID_Q?/p><p>6、ACT_HI_PROCINSTQ历史流E实例信息)核心?/p><p>程实例IDQPROC_INST_ID_Q、业务KeyQBUSINESS_KEY_Q、流E定义IdQPROC_DEF_ID_Q、开始时_START_TIME_Q、结束时_END_TIME_Q、时长(DURATION_Q、发起h员IdQSTART_USER_ID_Q、开始节点(START_ACT_ID_Q、结束节点(END_ACT_ID_Q、超U流E实例IdQSUPER_PROCESS_INSTANCE_ID_Q、删除理由(DELETE_REASON_Q?/p><p>7、ACT_HI_TASKINSTQ历史Q务流E实例信息)核心?/p><p>程实例IDQPROC_INST_ID_Q、Q务定义KeyQBUSINESS_KEY_Q、流E定义IdQPROC_DEF_ID_Q、执行IDQEXECUTION_ID_Q、名UͼNAME_Q、父diDQPARENT_TASK_ID_Q、描qͼDESCRIPTION_Q、所属hQOWNER_Q、代理hQASSIGNEE_Q、开始时_START_TIME_Q、结束时_END_TIME_Q、时长(DURATION_Q、删除理由(DELETE_REASON__Q、优先QPRIORITY_Q、应完成旉QDUE_DATE_Q、表单keyQFORM_KEY_Q?/p><p>8、ACT_HI_VARINSTQ历史变量信息)</p><p>程实例IDQPROC_INST_ID_Q、执行IDQEXECUTION_ID_Q、Q务Id、名UͼNAME_Q、变量(TASK_ID_Q、类型(VAR_TYPE_Q、字节数lIDQBYTEARRAY_ID_Q、DOUBLE_、LONG_、TEXT_、TEXT2_</p><h2>4、一般数?/h2><p>1、ACT_GE_BYTEARRAYQ字节数据表Q?/p><p>名称QNAME_Q、部|IdQDEPLOYMENT_ID_Q、字节数据(BYTES_Q、发生的QGENERATED_Q?/p><p>2、ACT_GE_PROPERTYQ一般属性表Q?/p><p>名称QNAMe_Q、?VALUe_)</p><h2>5、用LL?/h2><p>Activit 的用LL表,包括用户信息、用L信息、用户与用户l间的关pR用户信息与用户之间的关pR在实际开发中未采用,用的实际pȝ中用戗?/p><p>1、ACT_ID_GROUPQ用L表)</p><p>名称QNAME_Q、类?TYPE_)</p><p>2、ACT_ID_USERQ用戯Q?/p><p>?FIRST_)、名U?LAST_)、邮?EMAIL_)、密?PWD_)、头像Id (PICTURE_ID_)</p><p>3、ACT_ID_INFOQ用户信息表Q?/p><p>用户Id(USER_ID_)、类?TYPE_)、formINPut名称(KEY_)、?VALUE_)、密?PASSWORD_)、父节点(PARENT_ID_)</p><p>4、ACT_ID_MEMBERSHIPQ用LL兌表)</p><p>用户Id(user_ID_)、用LIdQgroup_IdQ?/p><p>Activiti表结构分析完成,׃5个小Ӟq有很多问题不明白。后l慢慢开发过E中再理一ơ表之间关系吧,初步x在系l中需要扩Q把业务数据和流E数据分开?/p></div><img src ="http://www.aygfsteel.com/huamengxing/aggbug/432532.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/huamengxing/" target="_blank">华梦?/a> 2017-05-16 16:31 <a href="http://www.aygfsteel.com/huamengxing/archive/2017/05/16/432532.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Activiti工作引擎数据库表结?/title><link>http://www.aygfsteel.com/huamengxing/archive/2017/05/15/432529.html</link><dc:creator>华梦?/dc:creator><author>华梦?/author><pubDate>Mon, 15 May 2017 14:23:00 GMT</pubDate><guid>http://www.aygfsteel.com/huamengxing/archive/2017/05/15/432529.html</guid><wfw:comment>http://www.aygfsteel.com/huamengxing/comments/432529.html</wfw:comment><comments>http://www.aygfsteel.com/huamengxing/archive/2017/05/15/432529.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/huamengxing/comments/commentRss/432529.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/huamengxing/services/trackbacks/432529.html</trackback:ping><description><![CDATA[     摘要: Activiti工作引擎数据库表结?数据库表的命?Acitiviti数据库中表的命名都是以ACT_开头的。第二部分是一个两个字W用例表的标识。此用例大体与服务API是匹配的?l  ACT_RE_*:’RE’表示repository。带此前~的表包含的是静态信息,如,程定义Q流E的资源Q图片,规则{)?l  ACT_RU_*:̵...  <a href='http://www.aygfsteel.com/huamengxing/archive/2017/05/15/432529.html'>阅读全文</a><img src ="http://www.aygfsteel.com/huamengxing/aggbug/432529.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/huamengxing/" target="_blank">华梦?/a> 2017-05-15 22:23 <a href="http://www.aygfsteel.com/huamengxing/archive/2017/05/15/432529.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>jpa 字段不要映射http://www.aygfsteel.com/huamengxing/archive/2017/05/10/432515.html华梦?/dc:creator>华梦?/author>Wed, 10 May 2017 08:59:00 GMThttp://www.aygfsteel.com/huamengxing/archive/2017/05/10/432515.htmlhttp://www.aygfsteel.com/huamengxing/comments/432515.htmlhttp://www.aygfsteel.com/huamengxing/archive/2017/05/10/432515.html#Feedback0http://www.aygfsteel.com/huamengxing/comments/commentRss/432515.htmlhttp://www.aygfsteel.com/huamengxing/services/trackbacks/432515.html

]]>
SNMP 相关http://www.aygfsteel.com/huamengxing/archive/2017/03/22/432395.html华梦?/dc:creator>华梦?/author>Wed, 22 Mar 2017 07:28:00 GMThttp://www.aygfsteel.com/huamengxing/archive/2017/03/22/432395.htmlhttp://www.aygfsteel.com/huamengxing/comments/432395.htmlhttp://www.aygfsteel.com/huamengxing/archive/2017/03/22/432395.html#Feedback0http://www.aygfsteel.com/huamengxing/comments/commentRss/432395.htmlhttp://www.aygfsteel.com/huamengxing/services/trackbacks/432395.htmlSnmpwalk –v 2 –c public 192.168.20.114 1.3.6.1.2.1.2.2.1.3
snmpget -r:127.0.0.1 -o:.1.3.6.1.2.1.25.3.3.1.2
E:\>snmpget -r:127.0.0.1 -o:.1.3.6.1.2.1.1.1.0
SnmpGet v1.01 - Copyright (C) 2009 SnmpSoft Company
[ More useful network tools on http://www.snmpsoft.com ]
OID=.1.3.6.1.2.1.1.1.0
Type=OctetString
Value=Hardware: Intel64 Family 6 Model 60 Stepping 3 AT/AT COMPATIBLE - Software
: Windows Version 6.1 (Build 7601 Multiprocessor Free)
snmpwalk -v:2c -c:public -r:127.0.0.1


]]>
Druid 介绍http://www.aygfsteel.com/huamengxing/archive/2017/03/21/432392.html华梦?/dc:creator>华梦?/author>Mon, 20 Mar 2017 16:11:00 GMThttp://www.aygfsteel.com/huamengxing/archive/2017/03/21/432392.htmlhttp://www.aygfsteel.com/huamengxing/comments/432392.htmlhttp://www.aygfsteel.com/huamengxing/archive/2017/03/21/432392.html#Feedback0http://www.aygfsteel.com/huamengxing/comments/commentRss/432392.htmlhttp://www.aygfsteel.com/huamengxing/services/trackbacks/432392.htmlDruid是什么?

Druid是一个JDBClgQ它包括四个部分Q?/p>

http://download.csdn.net/download/feelnature/1580901
http://tomcat.apache.org/tomcat-8.5-doc/monitoring.html#Enabling_JMX_Remote

http://download.csdn.net/detail/qq_21163257/9695557

 

  • DruidDriver 代理DriverQ能够提供基于FilterQChain模式的插件体pR?/div>
  • DruidDataSource 高效可管理的数据库连接池?/div>
  • SQLParser
  • 扩展lg
  • Binary: http://code.alibabatech.com/mvn/releases/com/alibaba/druid/0.1.2/druid-0.1.2.jar
  • Source: http://code.alibabatech.com/mvn/releases/com/alibaba/druid/0.1.2/druid-0.1.2-sources.jar

Druid可以做什么?

  • 可以监控数据库访问性能QDruid内置提供了一个功能强大的StatFilter插gQ能够详l统计SQL的执行性能Q这对于U上分析数据库访问性能有帮助?/div>
  • 替换DBCP和C3P0。Druid提供了一个高效、功能强大、可扩展性好的数据库q接池?/div>
  • 数据库密码加密。直接把数据库密码写在配|文件中Q这是不好的行ؓQ容易导致安全问题。DruidDruiver和DruidDataSource都支持PasswordCallback?/div>
  • SQL执行日志QDruid提供了不同的LogFilterQ能够支持Common-Logging、Log4j和JdkLogQ你可以按需要选择相应的LogFilterQ监控你应用的数据库讉K情况?/div>
  • 扩展JDBCQ如果你要对JDBC层有~程的需求,可以通过Druid提供的Filter机制Q很方便~写JDBC层的扩展插g?/div>

DruidDriverQ是一个ProxyJdbcDriverQ它提供了Filter-Chain模式的扩展机Ӟ使得在Jdbc扩展~程特别方便?/p>

Druid提供了一些内|的扩展机制Q包?u>Stat?u>Log?u>Trace、HA{扩展?/p>


DruidDataSource是一个数据库q接池的实现Q它的设计目标是提供一个当前最好的数据库连接池Q在性能、扩展性等斚w取得最合适的qQ取代DBCP、C3P0{连接池?/p>

  • 高性能。测试数据表明,Druid比DBCP、C3P0、BoneCP的性能都好很多。具体请?u>试数据
  • 可管理性,DruidDataSource本n提供了很多监控属性,具体?u>q里。DruidDataSource支持StatFilterQ具体配|看 q里
  • 可扩展性,提供ZFilter-Chain模式的扩展机制。具体自定义扩展的例子看q里?/div>
  • 替换DBCPQ配|和DBCP兼容Q可以方便替换DBCP?/div>
  • 适合大规模应用。结合Alibaba使用数据库连接池的经验,避免一些已知问题,例如数据库不可用恢复之后产生的连接风暴问题等?/div>

设计

q是DruidDataSource的设计图C:
http://code.alibabatech.com/svn/druid/trunk/doc/druid-pool.txt
如果发现有ؕ码,请选择utf-8的编码方式查看?/p>

Druid提供一个手工编写的高性能的方便扩展的SQL Parser。将会支持MySQL、Oracle{流行关pL据库的SQL Parser?/p>

Parserlg包括如下几个部分Q?/p>

  • Lexer 词法解析
  • ParserQParser包括ExprParserQ各UStatementParser?/div>
  • AST, Abstract Syntax Tree。ParserParse出来的结果就是AST?/div>
  • Visitor。对AST做各U处理,比如FormatOutputQ遍历等{?/div>

?/h3>

 

Druid提供了强大的监控功能Q能够监控连接池行ؓ和SQL执行情况Q让你能够详l了解应用的数据库访问行为?/p>

监控对象

  • Druid的统计信息定义代码实现在com/alibaba/druid/stat下。所有的Stat都全局静态变量的方式保存Q这样做使得外部获取监控信息更容易?/div>
  • 获取Druid监控信息的入口是com.alibaba.druid.stat.JdbcStatManager
  • Druid的监控统计信息都是通过StatFilter来实现的Q如果你需要数据源q行监控Q那你需要启用StatFilter
 


]]>
spring 相关|站介绍http://www.aygfsteel.com/huamengxing/archive/2017/03/19/432385.html华梦?/dc:creator>华梦?/author>Sun, 19 Mar 2017 14:39:00 GMThttp://www.aygfsteel.com/huamengxing/archive/2017/03/19/432385.htmlhttp://www.aygfsteel.com/huamengxing/comments/432385.htmlhttp://www.aygfsteel.com/huamengxing/archive/2017/03/19/432385.html#Feedback0http://www.aygfsteel.com/huamengxing/comments/commentRss/432385.htmlhttp://www.aygfsteel.com/huamengxing/services/trackbacks/432385.html http://spring.io/tools/sts http://www.loveweir.com/posts/view/19
https://github.com/rahulyewale/springmvcjpa
http://download.csdn.net/download/jiuqiyuliang/8640621
http://blog.csdn.net/suzunshou/article/details/49949005
https://repo1.maven.org/maven2/org/mybatis/mybatis/
http://blog.csdn.net/jiuqiyuliang/article/details/45132493/
https://github.com/mybatis/generator/releases

]]>
mysql导入qhttp://www.aygfsteel.com/huamengxing/archive/2016/07/21/431269.html华梦?/dc:creator>华梦?/author>Thu, 21 Jul 2016 05:33:00 GMThttp://www.aygfsteel.com/huamengxing/archive/2016/07/21/431269.htmlhttp://www.aygfsteel.com/huamengxing/comments/431269.htmlhttp://www.aygfsteel.com/huamengxing/archive/2016/07/21/431269.html#Feedback0http://www.aygfsteel.com/huamengxing/comments/commentRss/431269.htmlhttp://www.aygfsteel.com/huamengxing/services/trackbacks/431269.html今天从windows上导Z个sql执行文gQ再倒入到unbutn中,l果出现qQ折?-8分钟Q?nbsp;
解决方式 
在导出mysql sql执行文g的时候,指定一下编码格式: 
复制代码 代码如下:
mysqldump -uroot -p --default-character-set=utf8 moQdbnameQ?> E://xxxx.sql 
导入的时候OK?nbsp;
执行如下 
复制代码 代码如下:
mysql -u root -p --default-character-set=utf8 
use dbname 
source /root/newsdata.sql 


]]>
yum 源更?/title><link>http://www.aygfsteel.com/huamengxing/archive/2016/06/27/431029.html</link><dc:creator>华梦?/dc:creator><author>华梦?/author><pubDate>Mon, 27 Jun 2016 09:42:00 GMT</pubDate><guid>http://www.aygfsteel.com/huamengxing/archive/2016/06/27/431029.html</guid><wfw:comment>http://www.aygfsteel.com/huamengxing/comments/431029.html</wfw:comment><comments>http://www.aygfsteel.com/huamengxing/archive/2016/06/27/431029.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/huamengxing/comments/commentRss/431029.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/huamengxing/services/trackbacks/431029.html</trackback:ping><description><![CDATA[<h1></h1><div></div><div>CentOS</div><div></div><div></div><div>1、备?/div><div></div><div>mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup </div><div></div><div>2、下载新的CentOS-Base.repo ?etc/yum.repos.d/</div><div></div><div></div><div></div><div>CentOS 5</div><div> wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repo  </div><div></div><div></div><div></div><div>CentOS 6</div><div> wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo  </div><div></div><div></div><div></div><div>CentOS 7</div><div> wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo  </div><div></div><div>3、之后运行yum makecache生成~存</div><div></div><div>相关链接</div><div>##官方主页: http://www.centos.org/</div><div>##邮g列表: http://www.centos.org/modules/tinycontent/index.php?id=16</div><div>##论坛: http://www.centos.org/modules/newbb/</div><div>##文档: http://www.centos.org/docs/</div><div>##Wiki: http://wiki.centos.org/</div><div></div><div><ul><li><a ></a></li></ul></div><img src ="http://www.aygfsteel.com/huamengxing/aggbug/431029.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/huamengxing/" target="_blank">华梦?/a> 2016-06-27 17:42 <a href="http://www.aygfsteel.com/huamengxing/archive/2016/06/27/431029.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>输入数据q行正态化http://www.aygfsteel.com/huamengxing/archive/2016/05/11/430448.html华梦?/dc:creator>华梦?/author>Wed, 11 May 2016 10:27:00 GMThttp://www.aygfsteel.com/huamengxing/archive/2016/05/11/430448.htmlhttp://www.aygfsteel.com/huamengxing/comments/430448.htmlhttp://www.aygfsteel.com/huamengxing/archive/2016/05/11/430448.html#Feedback0http://www.aygfsteel.com/huamengxing/comments/commentRss/430448.htmlhttp://www.aygfsteel.com/huamengxing/services/trackbacks/430448.html

对输入数据进行正态化

 

Z使神l网l有效,我们必须Ҏ据进行正态化。这是激zd数的正确计算所需要的。正态化是一U数学处理,数据{换ؓ 0..1 ?-1..1 的范围。正态化后的数据可以q行L态化Q即转换回原来的范围?br />

要将经|络输出解码Zhcdȝ形式Q需要对数据q行L态化。谢天谢圎ͼ负责标准化和L准化Q因此不需要实施它。如果您对它的工作原理感到好奇,您可以分析以下代码:  


public static double INPUT_LOW = -20;
    public static double INPUT_HIGH = 20;
    public static double OUTPUT_HIGH = 1;
    public static double OUTPUT_LOW = -1;
    public static double normalize(final double value) {
        return ((value - INPUT_LOW) / (INPUT_HIGH - INPUT_LOW))
                * (OUTPUT_HIGH - OUTPUT_LOW) + OUTPUT_LOW;
        // return ((10f + 20f) / (40f)) * (2f) + OUTPUT_LOW;
    }
    public static double deNormalize(final double data) {
        double result = ((INPUT_LOW - INPUT_HIGH) * data - OUTPUT_HIGH
                * INPUT_LOW + INPUT_HIGH * OUTPUT_LOW)
                / (OUTPUT_LOW - OUTPUT_HIGH);
        return result;
    }

x=-5:.01:5;
   plot(x,tanh(x)),grid on;


]]>
cron4j使用说明http://www.aygfsteel.com/huamengxing/archive/2016/05/07/430392.html华梦?/dc:creator>华梦?/author>Sat, 07 May 2016 07:39:00 GMThttp://www.aygfsteel.com/huamengxing/archive/2016/05/07/430392.htmlhttp://www.aygfsteel.com/huamengxing/comments/430392.htmlhttp://www.aygfsteel.com/huamengxing/archive/2016/05/07/430392.html#Feedback0http://www.aygfsteel.com/huamengxing/comments/commentRss/430392.htmlhttp://www.aygfsteel.com/huamengxing/services/trackbacks/430392.html1. Quickstart

The cron4j main entity is the scheduler. With a it.sauronsoftware.cron4j.Scheduler instance you can execute tasks at fixed moments, during all the year. A scheduler can execute a task once a minute, once every five minutes, Friday at 10:00, on February the 16th at 12:30 but only if it is Saturday, and so on.

The use of the cron4j scheduler is a four steps operation:

  1. Create your Scheduler instance.
  2. Schedule your actions. To schedule an action you have to tell the scheduler what it has to do and when. You can specify what using a java.lang.Runnable or a it.sauronsoftware.cron4j.Task instance, and you can specify when using a scheduling pattern, which can be represented with a string or with a it.sauronsoftware.cron4j.SchedulingPattern instance.
  3. Starts the scheduler.
  4. Stops the scheduler, when you don't need it anymore.

Consider this simple example:

import it.sauronsoftware.cron4j.Scheduler;  public class Quickstart {  	public static void main(String[] args) { 		// Creates a Scheduler instance. 		Scheduler s = new Scheduler(); 		// Schedule a once-a-minute task. 		s.schedule("* * * * *", new Runnable() { 			public void run() { 				System.out.println("Another minute ticked away..."); 			} 		}); 		// Starts the scheduler. 		s.start(); 		// Will run for ten minutes. 		try { 			Thread.sleep(1000L * 60L * 10L); 		} catch (InterruptedException e) { 			; 		} 		// Stops the scheduler. 		s.stop(); 	}  }

This example runs for ten minutes. At every minute change it will print the sad (but true) message "Another minute ticked away...".

Some other key concepts:

  • You can schedule how many tasks you want.
  • You can schedule a task when you want, also after the scheduler has been started.
  • You can change the scheduling pattern of an already scheduled task, also while the scheduler is running (reschedule operation).
  • You can remove a previously scheduled task, also while the scheduler is running (deschedule operation).
  • You can start and stop a scheduler how many times you want.
  • You can schedule from a file.
  • You can schedule from any source you want.
  • You can supply listeners to the scheduler in order to receive events about the executed task.
  • You can control any ongoing task.
  • You can manually launch a task, without using a scheduling pattern.
  • You can change the scheduler working Time Zone.
  • You can validate your scheduling patterns before using them with the scheduler.
  • You can predict when a scheduling pattern will cause a task execution.

Back to index

2. Scheduling patterns

A UNIX crontab-like pattern is a string split in five space separated parts. Each part is intended as:

  1. Minutes sub-pattern. During which minutes of the hour should the task been launched? The values range is from 0 to 59.
  2. Hours sub-pattern. During which hours of the day should the task been launched? The values range is from 0 to 23.
  3. Days of month sub-pattern. During which days of the month should the task been launched? The values range is from 1 to 31. The special value "L" can be used to recognize the last day of month.
  4. Months sub-pattern. During which months of the year should the task been launched? The values range is from 1 (January) to 12 (December), otherwise this sub-pattern allows the aliases "jan", "feb", "mar", "apr", "may", "jun", "jul", "aug", "sep", "oct", "nov" and "dec".
  5. Days of week sub-pattern. During which days of the week should the task been launched? The values range is from 0 (Sunday) to 6 (Saturday), otherwise this sub-pattern allows the aliases "sun", "mon", "tue", "wed", "thu", "fri" and "sat".

The star wildcard character is also admitted, indicating "every minute of the hour", "every hour of the day", "every day of the month", "every month of the year" and "every day of the week", according to the sub-pattern in which it is used.

Once the scheduler is started, a task will be launched when the five parts in its scheduling pattern will be true at the same time.

Scheduling patterns can be represented with it.sauronsoftware.cron4j.SchedulingPattern instances. Invalid scheduling patterns are cause of it.sauronsoftware.cron4j.InvalidPatternExceptions. The SchedulingPattern class offers also a static validate(String) method, that can be used to validate a string before using it as a scheduling pattern.

Some examples:

5 * * * *
This pattern causes a task to be launched once every hour, at the begin of the fifth minute (00:05, 01:05, 02:05 etc.).

* * * * *
This pattern causes a task to be launched every minute.

* 12 * * Mon
This pattern causes a task to be launched every minute during the 12th hour of Monday.

* 12 16 * Mon
This pattern causes a task to be launched every minute during the 12th hour of Monday, 16th, but only if the day is the 16th of the month.

Every sub-pattern can contain two or more comma separated values.

59 11 * * 1,2,3,4,5
This pattern causes a task to be launched at 11:59AM on Monday, Tuesday, Wednesday, Thursday and Friday.

Values intervals are admitted and defined using the minus character.

59 11 * * 1-5
This pattern is equivalent to the previous one.

The slash character can be used to identify step values within a range. It can be used both in the form */c and a-b/c. The subpattern is matched every c values of the range 0,maxvalue or a-b.

*/5 * * * *
This pattern causes a task to be launched every 5 minutes (0:00, 0:05, 0:10, 0:15 and so on).

3-18/5 * * * *
This pattern causes a task to be launched every 5 minutes starting from the third minute of the hour, up to the 18th (0:03, 0:08, 0:13, 0:18, 1:03, 1:08 and so on).

*/15 9-17 * * *
This pattern causes a task to be launched every 15 minutes between the 9th and 17th hour of the day (9:00, 9:15, 9:30, 9:45 and so on... note that the last execution will be at 17:45).

All the fresh described syntax rules can be used together.

* 12 10-16/2 * *
This pattern causes a task to be launched every minute during the 12th hour of the day, but only if the day is the 10th, the 12th, the 14th or the 16th of the month.

* 12 1-15,17,20-25 * *
This pattern causes a task to be launched every minute during the 12th hour of the day, but the day of the month must be between the 1st and the 15th, the 20th and the 25, or at least it must be the 17th.

Finally cron4j lets you combine more scheduling patterns into one, with the pipe character:

0 5 * * *|8 10 * * *|22 17 * * *
This pattern causes a task to be launched every day at 05:00, 10:08 and 17:22.

Back to index

3. How to schedule, reschedule and deschedule a task

The simplest manner to build a task is to implement the well-known java.lang.Runnable interface. Once the task is ready, it can be scheduled with the it.sauronsoftware.cron4j.Scheduler.schedule(String, Runnable) method. This method throws an it.sauronsoftware.cron4j.InvalidPatternException when the supplied string does not represent a valid scheduling pattern.

Another way to build a task is to extend the it.sauronsoftware.cron4j.Task abstract class, which is more powerful and let the developer access some other cron4j features. This is better discussed in the "Building your own task" paragraph. Task instances can be scheduled with the schedule(String, Task) and the schedule(SchedulingPattern, Task) methods.

Scheduling methods available in the scheduler always return an ID used to recognize and retrieve the scheduled operation. This ID can be used later to reschedule the task (changing its scheduling pattern) with the reschedule(String, String) or the reschedule(String, SchedulingPattern) methods, and to deschedule the task (remove the task from the scheduler) with the deschedule(String) method.

The same ID can also be used to retrieve the scheduling pattern associated with a scheduled task, with the getSchedulingPattern(String) method, or to retrieve the task itself, with the getTask(String) method.

Back to index

4. How to schedule a system process

System processes can be easily scheduled using the ProcessTask class:

ProcessTask task = new ProcessTask("C:\\Windows\\System32\\notepad.exe"); Scheduler scheduler = new Scheduler(); scheduler.schedule("* * * * *", task); scheduler.start(); // ... 

Arguments for the process can be supplied by using a string array instead of a single command string:

String[] command = { "C:\\Windows\\System32\\notepad.exe", "C:\\File.txt" }; ProcessTask task = new ProcessTask(command); // ...

Environment variables for the process can be supplied using a second string array, whose elements have to be in the NAME=VALUE form:

String[] command = { "C:\\tomcat\\bin\\catalina.bat", "start" }; String[] envs = { "CATALINA_HOME=C:\\tomcat", "JAVA_HOME=C:\\jdks\\jdk5" }; ProcessTask task = new ProcessTask(command, envs); // ...

The default working directory for the process can be changed using a third parameter in the constructor:

String[] command = { "C:\\tomcat\\bin\\catalina.bat", "start" }; String[] envs = { "CATALINA_HOME=C:\\tomcat", "JAVA_HOME=C:\\jdks\\jdk5" }; File directory = "C:\\MyDirectory"; ProcessTask task = new ProcessTask(command, envs, directory); // ...

If you want to change the default working directory but you have not any environment variable, the envs parameter of the constructor can be set to null:

ProcessTask task = new ProcessTask(command, null, directory);

When envs is null the process inherits every environment variable of the current JVM:

Environment variables and the working directory can also be set by calling the setEnvs(String[]) and setDirectory(java.io.File) methods.

The process standard output and standard error channels can be redirected to files by using the setStdoutFile(java.io.File) and setStderrFile(java.io.File) methods:

ProcessTask task = new ProcessTask(command, envs, directory); task.setStdoutFile(new File("out.txt")); task.setStderrFile(new File("err.txt"));

In a siminal manner, the standard input channel can be read from an existing file, calling the setStdinFile(java.io.File) method:

ProcessTask task = new ProcessTask(command, envs, directory); task.setStdinFile(new File("in.txt"));

5. How to schedule processes from a file

The cron4j scheduler can also schedule a set of processes from a file.

You have to prepare a file, very similar to the ones used by the UNIX crontab, and register it in the scheduler calling the scheduleFile(File) method. The file can be descheduled by calling the descheduleFile(File) method. Scheduled files can be retrieved by calling the getScheduledFiles() method.

Scheduled files are parsed every minute. The scheduler will launch every process declared in the file whose scheduling pattern matches the current system time.

Syntax rules for cron4j scheduling files are reported in the "Cron parser" paragraph.

Back to index

6. Building your own task

A java.lang.Runnable object is the simplest task ever possible, but to gain control you need to extend the it.sauronsoftware.cron4j.Task class. In the plainest form, implementing Runnable or extending Task are very similar operations: while the first requires a run() method, the latter requires the implementation of execute(TaskExecutionContext). The execute(TaskExecutionContext) method provides a it.sauronsoftware.cron4j.TaskExecutionContext instance, which the Runnable.run() method does not provide. The context can be used in the following ways:

A custom task can be scheduled, launched immediately or returned by a task collector.

Back to index

7. Building your own collector

You can build and plug within the scheduler your own task source, via the task collector API.

The cron4j scheduler supports the registration of one or more it.sauronsoftware.cron4j.TaskCollector instances, with the addTaskCollector(TaskCollector) method. Registered collectors can be retrieved with the scheduler getTaskCollectors() method. A previously registered collector can be removed from the scheduler with the removeTaskCollector(TaskCollector) method. Collectors can be added, queried or removed at every moment, also when the scheduler is started and it is running.

Each registered task collector is queried by the scheduler once a minute. The scheduler calls the collector getTasks() method. The implementation must return a it.sauronsoftware.cron4j.TaskTable instance. A TaskTable is a table that associates tasks and scheduling patterns. The scheduler, once the table has been retrieved, will examine the reported entries, and it will execute every task whose scheduling pattern matches the current system time.

A custom collector can be used to tie the scheduler with an external task source, i.e. a database or a XML file, which can be managed and changed in its contents also at run time.

Back to index

8. Building your own scheduler listener

The it.sauronsoftware.cron4j.SchedulerListener API can be used to listen to scheduler events.

The SchedulerListener interface requires the implementation of the following methods:

See the "

Once your SchedulerListener instance is ready, you can register it on a Scheduler object by calling its addSchedulerListener(SchedulerListener) method. Already registered listeners can be removed by calling the removeSchedulerListener(SchedulerListener) method. The scheduler can also give back any registered listener, with the getSchedulerListeners() method.

SchedulerListeners can be added and removed at every moment, also while the scheduler is running.

Back to index

9. Executors

The scheduler, once it has been started and it is running, can be queried to give back its executors. An executor is similar to a thread. Executors is used by the scheduler to execute tasks.

By calling the Scheduler.getExecutingTasks() method you can obtain the currently ongoing executors.

You can also obtain an executor through a SchedulerListener instance (see the "Building your own scheduler listener" paragraph).

Each executor, represented by a it.sauronsoftware.cron4j.TaskExecutor instance, performs a different task execution.

The task can be retrieved with the getTask() method.

The executor status can be checked with the isAlive() method: it returns true if the executor is currently running.

If the executor is running, the current thread can be paused until the execution will be completed, calling the join() method.

The supportsStatusTracking() method returns true if the currently executing task supports status tracking. It means that the task communicates to the executor its status, represented by a string. The current status message can be retrieved by calling the executor getStatusMessage() method.

The supportsCompletenessTracking() method returns true if the currently executing task supports completeness tracking. It means that the task communicates to the executor its own completeness level. The current completeness level can be retrieved by calling the executor getCompleteness() method. Returned values are between 0 (task just started and still nothing done) and 1 (task completed).

The canBePaused() method returns true if the currently executing task supports execution pausing. It means that the task execution can be paused by calling the executor pause() method. The pause status of the executor can be checked with the isPaused() method. A paused executor can be resumed by calling its resume() method.

The canBeStopped() method returns true if the currently executing task supports execution interruption. It means that the task execution can be stopped by calling the executor stop() method. The interruption status of the executor can be checked with the isStopped() method. Stopped executors cannot be resumed.

The getStartTime() method returns a time stamp reporting the start time of the executor, or a value less than 0 if the executor has not been yet started.

The getScheduler() method returns the scheduler which is the owner of the executor.

The getGuid() method returns a textual GUID for the executor.

Executors offer also an event-driven API, through the it.sauronsoftware.cron4j.TaskExecutorListener class. A TaskExecutorListener can be added to a TaskExecutor with its addTaskExecutorListener(TaskExecutorListener) method. Listeners can be removed with the removeTaskExecutorListener(TaskExecutorListener) method, and they can also be retrieved with the getTaskExecutorListeners() method. A TaskExecutorListener must implement the following methods:

  • executionPausing(TaskExecutor)
    Called when the executor is requested to pause the ongoing task. The given parameter represents the source TaskExecutor instance.

  • executionResuming(TaskExecutor)
    Called when the executor is requested to resume the execution of the previously paused task. The given parameter represents the source TaskExecutor instance.

  • executionStopping(TaskExecutor)
    Called when the executor is requested to stop the task execution. The given parameter represents the source TaskExecutor instance.

  • executionTerminated(TaskExecutor, Throwable)
    Called when the executor has completed the task execution. The first parameter represents the source TaskExecutor instance, while the second is the optional exception that has caused the task to be terminated. If the task has been completed successfully, the given value is null.

  • statusMessageChanged(TaskExecutor, String)
    Called every time the execution status message changes. The first parameter represents the source TaskExecutor instance, while the second is the new message issued by the task.

  • completenessValueChanged(TaskExecutor, double)
    Called every time the execution completeness value changes. The first parameter represents the source TaskExecutor instance, while the second is the new completeness value (between 0 and 1) issued by the task.

Back to index

10. Manual task launch

If the scheduler is started and running, it is possible to manually launch a task, without scheduling it with a pattern. The method is Scheduler.launch(Task). The task will be immediately launched, and a TaskExecutor instace is returned to the caller. The returned object can be used to control the task execution (see the "

Back to index

11. Working with Time Zones

Scheduler instances, by default, work with the system default Time Zone. I.e. a scheduling pattern whose value is 0 2 * * * will activate its task at 02:00 AM according to the default system Time Zone. The scheduler can be requested to work with a different Time Zone, which is not the system default one. Call Scheduler.setTimeZone(TimeZone) and Scheduler.getTimeZone() to control this feature.

Once the default Time Zone has been changed, system current time is adapted to the supplied zone before comparing it with registered scheduling patterns. The result is that any supplied scheduling pattern is treated according to the specified Time Zone. Suppose this situation:

  • System time: 10:00
  • System time zone: GMT+1
  • Scheduler time zone: GMT+3

The scheduler, before comparing system time with patterns, translates 10:00 from GMT+1 to GMT+3. It means that 10:00 becomes 12:00. The resulted time is then used by the scheduler to activate tasks. So, in the given configuration at the given moment, any task scheduled as 0 12 * * * will be executed, while any 0 10 * * * will not.

Back to index

12. Daemon threads

The Java Virtual Machine exits when the only threads running are all daemon threads. The cron4j scheduler can be configured to spawn only daemon threads. To control this feature call the Scheduler.setDaemon(boolean) method. This method must be called before the scheduler is started. Default value is false. To check the scheduler current daemon status call the Scheduler.isDaemon() method.

Back to index

13. Predictor

The it.sauronsoftware.cron4j.Predictor class is able to predict when a scheduling pattern will be matched.

Suppose you want to know when the scheduler will execute a task scheduled with the pattern 0 3 * jan-jun,sep-dec mon-fri. You can predict the next n execution of the task using a Predictor instance:

String pattern = "0 3 * jan-jun,sep-dec mon-fri"; Predictor p = new Predictor(pattern); for (int i = 0; i < n; i++) { 	System.out.println(p.nextMatchingDate()); }

Back to index

14. Cron parser

The it.sauronsoftware.cron4j.CronParser class can be used to parse crontab-like formatted file and character streams.

If you want to schedule a list of tasks declared in a crontab-like file you don't need the CronParser, since you can do it by adding the file to the scheduler, with the Scheduler.scheduleFile(File) method.

Consider to use the CronParser if the Scheduler.scheduleFile(File) method is not enough for you. In example, you may need to fetch the task list from a remote source which is not representable as a java.io.File object (a document on a remote server, a DBMS result set and so on). To solve the problem you can implement your own it.sauronsoftware.cron4j.TaskCollector, getting the advantage of the CronParser to easily parse any crontab-like content.

You can parse a whole file/stream, but you can also parse a single line.

A line can be empty, can contain a comment or it can be a scheduling line.

A line containing no characters or a line with only space characters is considered an empty line.

A line whose first non-space character is a number sign (#) is considered a comment.

Empty lines and comment lines are ignored by the parser.

Any other kind of line is parsed as a scheduling line.

A valid scheduling line respects the following structure:

scheduling-pattern [options] command [args]
  • scheduling-pattern is a valid scheduling pattern, according with the definition given by the it.sauronsoftware.cron4j.SchedulingPattern class.
  • options is a list of optional information used by cron4j to prepare the task execution environment. See below for a more detailed description.
  • command is a system valid command, such an executable call.
  • args is a list of optional arguments for the command.

After the scheduling pattern item, other tokens in each line are space separated or delimited with double quotation marks (").

Double quotation marks delimited items can take advantage of the following escape sequences:

  • \" - quotation mark
  • \\ - back slash
  • \/ - slash
  • \b - back space
  • \f - form feed
  • \n - new line
  • \r - carriage return
  • \t - horizontal tab
  • \ufour-hex-digits - the character at the given Unicode index

The options token collection can include one or more of the following elements:

  • IN:file-path - Redirects the command standard input channel to the specified file.
  • OUT:file-path - Redirects the command standard output channel to the specified file.
  • ERR:file-path - Redirects the command standard error channel to the specified file.
  • ENV:name=value - Defines an environment variable in the scope of the command.
  • DIR:directory-path - Sets the path of the working directory for the command. This feature is not supported if the executing JVM is less than 1.3.

It is also possible to schedule the invocation of a method of a Java class in the scope of the parser ClassLoader. The method has to be static and it must accept an array of strings as its sole argument. To invoke a method of this kind the syntax is:

scheduling-pattern java:className#methodName [args]

The #methodName part can be omitted: in this case the main(String[]) method will be assumed.

Please note that static methods are invoked within the scheduler same JVM, without spawning any external process. Thus IN, OUT, ERR, ENV and DIR options can't be applied.

Invalid scheduling lines are discarded without blocking the parsing procedure, but an error message is sent to the application standard error channel.

Valid examples:

0 5 * * * sol.exe 0,30 * * * * OUT:C:\ping.txt ping 10.9.43.55 0,30 4 * * * "OUT:C:\Documents and Settings\Carlo\ping.txt" ping 10.9.43.55 0 3 * * * ENV:JAVA_HOME=C:\jdks\1.4.2_15 DIR:C:\myproject OUT:C:\myproject\build.log C:\myproject\build.bat "Nightly Build" 0 4 * * * java:mypackage.MyClass#startApplication myOption1 myOption2


]]>
阉K云Linux安装软g镜像?/title><link>http://www.aygfsteel.com/huamengxing/archive/2016/04/30/430316.html</link><dc:creator>华梦?/dc:creator><author>华梦?/author><pubDate>Sat, 30 Apr 2016 13:11:00 GMT</pubDate><guid>http://www.aygfsteel.com/huamengxing/archive/2016/04/30/430316.html</guid><wfw:comment>http://www.aygfsteel.com/huamengxing/comments/430316.html</wfw:comment><comments>http://www.aygfsteel.com/huamengxing/archive/2016/04/30/430316.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/huamengxing/comments/commentRss/430316.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/huamengxing/services/trackbacks/430316.html</trackback:ping><description><![CDATA[<p style="padding: 0px; margin-top: 0px; margin-right: 0px; margin-left: 0px; border: 0px; text-align: justify; word-wrap: break-word; word-break: break-all; text-indent: 2em; color: #444444; font-family: 'Microsoft YaHei', 微Y雅黑, Helvetica, Arial, 'Lucida Grande', Tahoma, sans-serif; line-height: 22px; background-color: #ffffff;"><span style="padding: 0px; margin: 0px; text-indent: 2em;">阉K云Linux安装软g镜像?/span></p><p style="padding: 0px; margin-top: 0px; margin-right: 0px; margin-left: 0px; border: 0px; text-align: justify; word-wrap: break-word; word-break: break-all; text-indent: 2em; color: #444444; font-family: 'Microsoft YaHei', 微Y雅黑, Helvetica, Arial, 'Lucida Grande', Tahoma, sans-serif; line-height: 22px; background-color: #ffffff;">阉K云是最q新出的一个镜像源。得益与阉K云的高速发展,q么大的需求,肯定会推q镜像源?br style="padding: 0px; margin: 0px;" />阉K云Linux安装镜像源地址Qhttp://mirrors.aliyun.com/</p><p style="padding: 0px; margin-top: 0px; margin-right: 0px; margin-left: 0px; border: 0px; text-align: justify; word-wrap: break-word; word-break: break-all; text-indent: 2em; color: #444444; font-family: 'Microsoft YaHei', 微Y雅黑, Helvetica, Arial, 'Lucida Grande', Tahoma, sans-serif; line-height: 22px; background-color: #ffffff;">CentOSpȝ更换软g安装?br style="padding: 0px; margin: 0px;" />W一步:备䆾你的原镜像文Ӟ以免出错后可以恢复?/p><p style="padding: 0px; margin-top: 0px; margin-right: 0px; margin-left: 0px; border: 0px; text-align: justify; word-wrap: break-word; word-break: break-all; text-indent: 2em; color: #444444; font-family: 'Microsoft YaHei', 微Y雅黑, Helvetica, Arial, 'Lucida Grande', Tahoma, sans-serif; line-height: 22px; background-color: #ffffff;">mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup<br style="padding: 0px; margin: 0px;" />W二步:下蝲新的CentOS-Base.repo ?etc/yum.repos.d/<br style="padding: 0px; margin: 0px;" />CentOS 5</p><p style="padding: 0px; margin-top: 0px; margin-right: 0px; margin-left: 0px; border: 0px; text-align: justify; word-wrap: break-word; word-break: break-all; text-indent: 2em; color: #444444; font-family: 'Microsoft YaHei', 微Y雅黑, Helvetica, Arial, 'Lucida Grande', Tahoma, sans-serif; line-height: 22px; background-color: #ffffff;">wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repo<br style="padding: 0px; margin: 0px;" />CentOS 6</p><p style="padding: 0px; margin-top: 0px; margin-right: 0px; margin-left: 0px; border: 0px; text-align: justify; word-wrap: break-word; word-break: break-all; text-indent: 2em; color: #444444; font-family: 'Microsoft YaHei', 微Y雅黑, Helvetica, Arial, 'Lucida Grande', Tahoma, sans-serif; line-height: 22px; background-color: #ffffff;">wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo<br style="padding: 0px; margin: 0px;" />W三步:q行yum makecache生成~存</p><p style="padding: 0px; margin-top: 0px; margin-right: 0px; margin-left: 0px; border: 0px; text-align: justify; word-wrap: break-word; word-break: break-all; text-indent: 2em; color: #444444; font-family: 'Microsoft YaHei', 微Y雅黑, Helvetica, Arial, 'Lucida Grande', Tahoma, sans-serif; line-height: 22px; background-color: #ffffff;">yum clean all</p><p style="padding: 0px; margin-top: 0px; margin-right: 0px; margin-left: 0px; border: 0px; text-align: justify; word-wrap: break-word; word-break: break-all; text-indent: 2em; color: #444444; font-family: 'Microsoft YaHei', 微Y雅黑, Helvetica, Arial, 'Lucida Grande', Tahoma, sans-serif; line-height: 22px; background-color: #ffffff;">yum makecache</p><img src ="http://www.aygfsteel.com/huamengxing/aggbug/430316.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/huamengxing/" target="_blank">华梦?/a> 2016-04-30 21:11 <a href="http://www.aygfsteel.com/huamengxing/archive/2016/04/30/430316.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>服务器初始安?/title><link>http://www.aygfsteel.com/huamengxing/archive/2016/03/23/429781.html</link><dc:creator>华梦?/dc:creator><author>华梦?/author><pubDate>Wed, 23 Mar 2016 07:15:00 GMT</pubDate><guid>http://www.aygfsteel.com/huamengxing/archive/2016/03/23/429781.html</guid><wfw:comment>http://www.aygfsteel.com/huamengxing/comments/429781.html</wfw:comment><comments>http://www.aygfsteel.com/huamengxing/archive/2016/03/23/429781.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.aygfsteel.com/huamengxing/comments/commentRss/429781.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/huamengxing/services/trackbacks/429781.html</trackback:ping><description><![CDATA[<div> yum -y update</div><div></div><div></div><div></div><div></div><div>centos6 mysql5.5 yum安装</div><div></div><div>  </div><div></div><div> </div><div>默认使用centos yum安装的mysql不是5.5版本的,我们需要增加两个新的repo</div><div></div><div>rpm -Uvh http://mirror.steadfast.net/epel/6/i386/epel-release-6-8.noarch.rpm</div><div></div><div>rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm</div><div></div><div>centos6下php php-fpm的yum安装</div><div></div><div>查看一下是不是有mysql 5.5?/div><div></div><div>yum --enablerepo=remi,remi-test list mysql mysql-server</div><div></div><div>安装mysql5.5</div><div></div><div>yum --enablerepo=remi,remi-test install mysql mysql-server</div><div></div><div>启动mysql5.5</div><div></div><div>/etc/init.d/mysqld start</div><div></div><div>讄开机启?/div><div></div><div>chkconfig --levels 345 mysqld on</div><div></div><div>要启用MySQL 安全讄误入以下命?/div><div></div><div>/usr/bin/mysql_secure_installation<br /><br /><br /><p>CentOS/RHEL 7.x:</p><div><table><tbody><tr><td><pre>rpm <span style="color: #660033;">-Uvh</span> https:<span style="font-weight: bold;">//</span>dl.fedoraproject.org<span style="font-weight: bold;">/</span>pub<span style="font-weight: bold;">/</span>epel<span style="font-weight: bold;">/</span>epel-release-latest-7.noarch.rpm rpm <span style="color: #660033;">-Uvh</span> https:<span style="font-weight: bold;">//</span>mirror.webtatic.com<span style="font-weight: bold;">/</span>yum<span style="font-weight: bold;">/</span>el7<span style="font-weight: bold;">/</span>webtatic-release.rpm</pre></td></tr></tbody></table></div><p>CentOS/RHEL 6.x:</p><div><table><tbody><tr><td><pre>rpm <span style="color: #660033;">-Uvh</span> https:<span style="font-weight: bold;">//</span>dl.fedoraproject.org<span style="font-weight: bold;">/</span>pub<span style="font-weight: bold;">/</span>epel<span style="font-weight: bold;">/</span>epel-release-latest-6.noarch.rpm rpm <span style="color: #660033;">-Uvh</span> https:<span style="font-weight: bold;">//</span>mirror.webtatic.com<span style="font-weight: bold;">/</span>yum<span style="font-weight: bold;">/</span>el6<span style="font-weight: bold;">/</span>latest.rpm</pre></td></tr></tbody></table></div><p>CentOS/RHEL 5.x:</p><div><table><tbody><tr><td><pre>rpm <span style="color: #660033;">-Uvh</span> https:<span style="font-weight: bold;">//</span>dl.fedoraproject.org<span style="font-weight: bold;">/</span>pub<span style="font-weight: bold;">/</span>epel<span style="font-weight: bold;">/</span>epel-release-latest-5.noarch.rpm rpm <span style="color: #660033;">-Uvh</span> http:<span style="font-weight: bold;">//</span>mirror.webtatic.com<span style="font-weight: bold;">/</span>yum<span style="font-weight: bold;">/</span>el5<span style="font-weight: bold;">/</span>latest.rpm</pre></td></tr></tbody></table></div><p>Now you can install PHP 5.5’s mod_php SAPI (along with an opcode cache) by doing:</p><div><table><tbody><tr><td><pre><span style="color: #c20cb9; font-weight: bold;">yum install</span> php55w php55w-opcache</pre></td></tr></tbody></table></div><p>You can alternatively install PHP 5.5’s php-fpm SAPI (along with an opcode cache by doing:</p><br /><br /><br /><br /></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div>  rpm -Uvh http://mirror.webtatic.com/yum/el6/latest.rpm</div><div>  <br /><br /><div></div></div><div>rpm -Uvh https://mirror.webtatic.com/yum/el7/epel-release.rpm</div><div>rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm</div><div>如果惛_除上面安装的包,重新安装</div><div>rpm -qa | grep webstatic</div><div>rpm -e  上面搜烦到的包即?/div><div></div><div>3.q行yum install</div><div>  yum install php55w php55w-cli php55w-common php55w-gd php55w-ldap php55w-mbstring php55w-mcrypt php55w-mysql php55w-pdo php55w-xml</div><div></div><div>yum install php56w php56w-cli php56w-common php56w-gd php56w-ldap php56w-mbstring php56w-mcrypt php56w-mysql php56w-pdo php56w-xml<br /><br />php 另外一U方?br /> Remi官方|站Qhttp://rpms.famillecollet.com/<div></div><div>dRemi源,不管32位还?4位的pȝQ运行下面命令:</div><div></div><div>rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm</div><div></div><div> Remi源默认是没有启用的,我们来启用Remi源,修改 /etc/yum.repos.d/remi.repo 文gQ把文g内的 enabled=0 改ؓ enabled=1 Q注意:Ҏ件内??enabled=0 我们修改 [remi]下面的,不要修改[remi-test]下面的?/div><div></div><div> 到这里yum源的配置l束Q下面安装Y件就单了。安装时候有询问y/n的时候都是y</div><div></div><div>安装php,php-fpm以及php扩展Q?/div><div></div><div>yum install php php-fpm php-bcmatch php-gd php-mbstring php-mcrypt php-mysql php-pdo   php-dom<br /><br /><br />wget https://files.phpmyadmin.net/phpMyAdmin/4.0.10.15/phpMyAdmin-4.0.10.15-english.zip<br /></div></div><div> </div><img src ="http://www.aygfsteel.com/huamengxing/aggbug/429781.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/huamengxing/" target="_blank">华梦?/a> 2016-03-23 15:15 <a href="http://www.aygfsteel.com/huamengxing/archive/2016/03/23/429781.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss> <footer> <div class="friendship-link"> <a href="http://www.aygfsteel.com/" title="狠狠久久亚洲欧美专区_中文字幕亚洲综合久久202_国产精品亚洲第五区在线_日本免费网站视频">狠狠久久亚洲欧美专区_中文字幕亚洲综合久久202_国产精品亚洲第五区在线_日本免费网站视频</a> </div> </footer> վ֩ģ壺 <a href="http://" target="_blank">ո</a>| <a href="http://" target="_blank">ɫ</a>| <a href="http://" target="_blank">ɽ</a>| <a href="http://" target="_blank">ɽ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ʡ</a>| <a href="http://" target="_blank">ƽ</a>| <a href="http://" target="_blank">½</a>| <a href="http://" target="_blank">̩</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">԰</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ڽ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ɽ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ˮ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">·</a>| <a href="http://" target="_blank">̳</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">غ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ƽȪ</a>| <a href="http://" target="_blank">ľ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">Т</a>| <a href="http://" target="_blank">ʮ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ﴨ</a>| <a href="http://" target="_blank">齭</a>| <a href="http://" target="_blank">֯</a>| <script> (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script> </body>