锘??xml version="1.0" encoding="utf-8" standalone="yes"?>BlogJava-鎴戠殑Java璺笂閭簺浜嬪効http://www.5432034.com/hello-yun/蹇箰鎴愰暱zh-cnSat, 23 Mar 2019 13:21:29 GMTSat, 23 Mar 2019 13:21:29 GMT60鏀跺綍锛氫竴涓?#37804;兘杈冨?#30028;殑jvm鍙傛暟閰嶇疆浠?#37721;jvm?#27537;?#30045;浠?/title><link>http://www.5432034.com/hello-yun/archive/2015/07/19/426314.html</link><dc:creator>浜?#27996;?/dc:creator><author>浜?#27996;?/author><pubDate>Sun, 19 Jul 2015 14:57:00 GMT</pubDate><guid>http://www.5432034.com/hello-yun/archive/2015/07/19/426314.html</guid><wfw:comment>http://www.5432034.com/hello-yun/comments/426314.html</wfw:comment><comments>http://www.5432034.com/hello-yun/archive/2015/07/19/426314.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.5432034.com/hello-yun/comments/commentRss/426314.html</wfw:commentRss><trackback:ping>http://www.5432034.com/hello-yun/services/trackbacks/426314.html</trackback:ping><description><![CDATA[杞嚜锛歨ttp://blog.csdn.net/jeffreynicole/article/details/46953059 <br /><br /><br /><p style="margin: 0px; padding: 0px; color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;">?#31476;涓?#37804;兘杈冨?#30028;殑web鏈嶅姟鍣jvm鍙傛暟閰嶇疆锛?/p><p style="margin: 0px; padding: 0px; color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;"><br /></p><p style="margin: 0px; padding: 0px; color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;"></p><div bg_plain"="" style="width: 938.515625px; overflow: hidden; border-color: #cccccc; color: #555555; line-height: 35px;"><div><div><strong>[plain]</strong> <a href="http://blog.csdn.net/jeffreynicole/article/details/46953059#" title="view plain" style="padding: 1px; color: #0c89cf; display: inline-block; width: 16px; height: 16px; text-indent: -2000px; background-image: url(http://static.blog.csdn.net/scripts/SyntaxHighlighter/styles/images/default/ico_plain.gif); background-position: 0% 0%; background-repeat: no-repeat;">view plain</a><a href="http://blog.csdn.net/jeffreynicole/article/details/46953059#" title="copy" style="padding: 1px; color: #0c89cf; display: inline-block; width: 16px; height: 16px; text-indent: -2000px; background-image: url(http://static.blog.csdn.net/scripts/SyntaxHighlighter/styles/images/default/ico_copy.gif); background-position: 0% 0%; background-repeat: no-repeat;">copy</a><div style="position: absolute; left: 472px; top: 696px; width: 18px; height: 18px; z-index: 99;"></div></div></div><ol start="1"><li style="line-height: 18px;">-server //鏈嶅姟鍣?#22959;?#23534;?nbsp; </li><li style="line-height: 18px;">-Xmx2g //JVM鏈澶厑璁稿垎閰嶇殑鍫嗗唴瀛?#38171;?#37816;夐渶?#22414;閰?nbsp; </li><li style="line-height: 18px;">-Xms2g //JVM鍒濆?#23338;垎閰嶇殑鍫嗗唴瀛?#38171;屼竴鑸拰Xmx閰嶇疆鎴愪竴鏍?#28000;?#38316;垮厤姣忔gc鍚嶫VM閲嶆柊?#22414;閰嶅唴瀛?#37510;?nbsp; </li><li style="line-height: 18px;">-Xmn256m //骞?#26462;?#28000;唴瀛?#28598;?#28751;?#38171;?#37825;?#28051;JVM?#21812;瀛?骞?#26462;?#28000;?nbsp;+ 骞磋?#28000;?nbsp;+ 鎸佷箙浠?nbsp; </li><li style="line-height: 18px;">-XX:PermSize=128m //鎸佷箙浠唴瀛?#28598;?#28751;?nbsp; </li><li style="line-height: 18px;">-Xss256k //璁剧疆姣?#28051;?#32510;跨?#23340;殑鍫?#37837;?#28598;?#28751;?nbsp; </li><li style="line-height: 18px;">-XX:+DisableExplicitGC //蹇界暐鎵嬪姩璋冪敤GC, System.gc()?#27537;璋冪敤灏?#28028;?#37721;?#37812;愪竴涓?#32460;?#29835;冪敤锛屽?#23677;叏涓?#29785;?#37721;GC  </li><li style="line-height: 18px;">-XX:+UseConcMarkSweepGC //骞跺彂鏍?#29825;?#23059;呴櫎锛圕MS锛?#37824;?#38342;?#37731;?nbsp; </li><li style="line-height: 18px;">-XX:+CMSParallelRemarkEnabled //闄嶄綆鏍?#29825;?#37707;滈  </li><li style="line-height: 18px;">-XX:+UseCMSCompactAtFullCollection //鍦FULL GC?#27537;鏃跺欏骞磋?#28000;殑?#24071;缂?nbsp; </li><li style="line-height: 18px;">-XX:LargePageSizeInBytes=128m //?#21812;瀛?#26916;电殑澶?#28751;?nbsp; </li><li style="line-height: 18px;">-XX:+UseFastAccessorMethods //鍘熷绫诲瀷?#27537;蹇?#38315;?#28028;樺寲  </li><li style="line-height: 18px;">-XX:+UseCMSInitiatingOccupancyOnly //浣跨敤鎵嬪姩瀹氫箟鍒濆?#23338;寲瀹氫箟寮濮婥MS鏀?#38342;?nbsp; </li><li style="line-height: 18px;">-XX:CMSInitiatingOccupancyFraction=70 //浣跨敤cms浣?#28051;?#37736;冨溇鍥?#37824;?#28003;跨敤70锛呭悗寮濮婥MS鏀?#38342;?nbsp; </li></ol></div><br style="color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;" /><br style="color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;" /><p style="margin: 0px; padding: 0px; color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;"></p><span style="color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;">璇存槑锛?/span><br style="color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;" /><br style="color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;" /><p style="margin: 0px; padding: 0px; color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;">-Xmn?#25328;-Xmx涔?#23011;?#28598;?#22994;傛槸1:9锛屽?#20635;?#28356;妸?#26570;鐢?#28000;唴瀛?#29825;剧疆?#32241;澶?#28598;?#28028;氬鑷磞oung gc?#26882;?#26879;杈冮暱</p><p style="margin: 0px; padding: 0px; color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;">?#31476;涓?#28610;界殑Web绯荤?#29111;簲璇?#37828;?#23011;忔http璇锋眰鐢?#29831;峰唴瀛橀兘?#20824;鍦young gc鍥?#37824;?#37818;?#38171;full gc姘?#28051;?#37721;戠敓锛屽綋鐒惰繖鏄?#37832;鐞嗘兂?#27537;?#20751;鍐?/p><p style="margin: 0px; padding: 0px; color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;">xmn?#27537;鍊?#25652;?#29831;?#37828;?#28103;?#29831;?#28598;熺敤锛?#28598;http骞跺彂璇锋眰涔嬬敤锛夌殑鍓嶆彁涓?#29825;剧疆?#32241;灏?#38322;?#28751;?/p><p style="margin: 0px; padding: 0px; color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;">web鏈嶅姟鍣拰娓?#37812;?#37832;嶅姟鍣殑閰嶇疆鎬?#29882;?#28051;嶅?#31476;鏍?#38171;?#37832;閲嶈?#20346;殑鍖?#37714;?#37828;?#28725;?#23059;?#37812;?#37832;嶅姟鍣殑xmn鍗?#39582;?#26462;?#28000;?#29825;剧疆姣?#26440;冨锛屽拰Xmx澶?#22994;?:3?#27537;鍏?#32495;?#38171;屽洜涓?#23059;?#37812;?#37832;嶅姟鍣竴鑸?#37828;暱杩炴帴锛屽湪淇?#37816;佷竴瀹氱殑骞跺彂閲?#37722;庨渶瑕?#26440;冨?#27537;骞?#26462;?#28000;?#37739;嗗唴瀛?#38171;屽?#20635;灉璁剧疆?#32241;澶?#28751;?#27996;?#28028;氱?#24531;父寮?#37721;young gc</p><p style="margin: 0px; padding: 0px; color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;"><br /></p><p style="margin: 0px; padding: 0px; color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;"></p><ul style="color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;"><li>瀵笿VM?#27537;?#30045;浠?/li></ul><p style="margin: 0px; padding: 0px; color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;"></p><p style="margin: 0px; padding: 0px; color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;"><img src="http://img.blog.csdn.net/20150719105526584?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQv/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" alt="" style="border: none; max-width: 602px; height: auto;" /><br /></p><p style="margin: 0px; padding: 0px; color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;">鐢变笂鍥?#37721;?#28000;?#37930;嬪?#31744;vm鍫嗗唴瀛樼殑?#22414;绫绘儏鍐?#38171;孞VM?#21812;瀛樿?#22414;鎴?#28598;氫釜?#23277;绔嬬殑閮垎銆?br />骞挎硾鍦?#29831;?#38171;孞VM鍫嗗唴瀛樿?#22414;涓?#28051;?#38318;垎——骞?#26462;?#28000;?#38171;Young Generation锛夊拰鑰?#39582;?#28000;?#38171;Old Generation锛?#37510;?br /><br /><br /></p><ul style="color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;"><li><strong>骞?#26462;?#28000;?/strong></li></ul><span style="color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;">骞?#26462;?#28000;?#37828;?#37813;鏈夋柊瀵硅薄浜?#37922;熺殑鍦?#37826;?#37510;傚綋骞?#26462;?#28000;唴瀛樼闂磋?#25956;?#30060;?#26882;锛?#28751;?#28028;?#29785;?#37721;?#37736;冨溇鍥?#37824;?#37510;傝繖涓?#37736;冨溇鍥?#37824;跺彨鍋歁inor GC銆?#39582;?#26462;?#28000;?#29722;垎涓?涓?#38318;垎——Enden鍖哄拰涓?#28051;Survivor鍖?#37510;?/span><br style="color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;" /><br style="color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;" /><br style="color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;" /><strong style="color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;">骞?#26462;?#28000;?#32460;洪棿?#27537;瑕佺偣锛?/strong><br style="color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;" /><span style="color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;">澶?#28598;氭暟?#26570;寤虹殑瀵硅薄?#20824;浣?#27996;嶦den鍖?#37510;?/span><br style="color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;" /><span style="color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;">?#32139;Eden鍖?#29722;?#28725;硅薄濉弧?#26882;锛?#28751;?#28028;?#37813;?#29723;孧inor GC銆?#39582;舵妸鎵鏈?#28699;?#23090;?#28051;嬫潵?#27537;瀵硅薄杞?#32457;?#37714;?#37711;?#28051;竴涓猻urvivor鍖?#37510;?/span><br style="color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;" /><span style="color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;">Minor GC鍚?#37837;蜂細妫鏌?#28699;?#23090;?#28051;嬫潵?#27537;瀵硅薄锛?#39582;舵妸瀹?#28000;?#26462;?#32457;?#37714;?#37721;竴涓猻urvivor鍖?#37510;傝繖鏍?#37734;竴娈垫椂?#26879;?#21812;锛?#37804;?#28028;?#37832;変竴涓?#32460;虹殑survivor鍖?#37510;?/span><br style="color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;" /><span style="color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;">缁忚繃澶?#23046;GC鍛?#37832;?#37722;?#38171;?#28000;嶇?#36346;瓨娲?#28051;嬫潵?#27537;瀵硅薄浼?#29722;?#26462;?#32457;?#37714;?#39582;磋?#28000;唴瀛樼?#27946;棿銆?#38315;氬父?#32342;鏄?#37734;?#39582;?#26462;?#28000;?#37832;夎祫鏍兼彁鍗?#37714;?#39582;磋?#28000;?#37715;?#38315;氳繃璁?#28729;?#39582;撮緞闃堝?#37833;畬鎴愮殑銆?/span><br style="color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;" /><strong style="color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;"><br /></strong><p style="margin: 0px; padding: 0px; color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;"></p><p style="margin: 0px; padding: 0px; color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;"></p><ul style="color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;"><li><strong>骞磋?#28000;?/strong></li></ul><span style="color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;">骞磋?#28000;唴瀛?#38322;屽?#21613;惈浜嗛暱鏈?#28699;?#23090;荤殑瀵硅薄?#25328;缁忚繃澶?#23046;Minor GC鍚庝緷鐒跺瓨娲?#28051;嬫潵?#27537;瀵硅薄銆?#38315;氬父浼氬湪鑰?#39582;?#28000;唴瀛樿鍗犳弧?#26882;杩?#29723;屽?#20904;溇鍥?#37824;?#37510;?#38000;?#39582;?#28000;殑鍨冨溇鏀?#38342;?#37721;?#37707;歁ajor GC銆侻ajor GC浼氳姳璐规洿澶氱殑?#26882;?#26879;銆?/span><br style="color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;" /><br style="color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;" /><br style="color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;" /><strong style="color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;">Stop the World浜?#28000;?/strong><br style="color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;" /><span style="color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;">鎵鏈夌殑鍨冨溇鏀?#38342;嗛兘鏄?#8220;Stop the World”浜?#28000;?#38171;屽洜涓?#37813;鏈夌殑搴旂敤绾跨?#23342;兘浼氬仠涓嬫潵?#27967;鍒版?#23940;?#28355;畬鎴?#38171;?#37813;浠?#37721;?#8220;Stop the World”锛?#37510;?/span><br style="color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;" /><br style="color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;" /><span style="color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;">鍥?#28051;?#39582;?#26462;?#28000;?#38322;岀殑瀵硅薄?#20824;鏄竴?#31802;涓存椂锛坰hort-lived 锛夊?#30789;薄锛?#37813;?#29723;孧inor GC闈炲父蹇?#38171;?#37813;浠?#25652;旂敤涓?#28028;?#37721;?#37714;?#38171;?#8220;Stop the World”锛夊奖?#25655;銆?/span><br style="color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;" /><br style="color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;" /><span style="color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;">鐢?#27996;Major GC浼氭鏌?#37813;鏈?#28699;?#23090;荤殑瀵硅薄锛屽?#29363;浼氳姳璐规?#25774;暱?#27537;?#26882;?#26879;銆?#25652;?#29831;?#28751;?#38322;忓噺灏慚ajor GC銆?#37733;?#28051;篗ajor GC浼氬湪鍨冨溇鍥?#37824;?#37832;熼棿璁?#28003;犵殑搴旂敤鍙嶅?#26055;?#29116;锛?#37813;浠?#28641;傛灉浣?#37832;変竴涓渶瑕?#36423;?#38315;熷?#23941;簲?#27537;搴旂敤鍙戠敓澶?#23046;Major GC锛屼綘浼氱?#23338;?#25292;秴?#26882;?#25930;璇?#37510;?/span><br style="color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;" /><br style="color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;" /><span style="color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;">鍨冨溇鍥?#37824;舵椂?#26879;鍙?#37712;?#27996;?#37736;冨溇鍥?#37824;剁瓥?#26256;銆傝繖灏?#37828;?#28051;?#28000;涔?#37832;?#36423;?#29781;?#37720;荤洃鎺?#37736;冨溇鏀?#38342;嗗拰瀵?#37736;冨溇鏀?#38342;?#26473;?#29723;?#29835;?#28028;?#37510;?#28000;?#38000;?#38316;垮厤瑕佹眰蹇?#38315;熷?#23941;簲?#27537;搴旂敤鍑虹?#25292;秴?#26882;?#25930;璇?#37510;?/span><br style="color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;" /><br style="color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;" /><br style="color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;" /><ul style="color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;"><li><strong>姘镐箙浠?/strong></li></ul><span style="color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;">姘镐箙浠?#37812;?#38000;?#8220;Perm Gen”鍖呭惈浜咼VM?#28214;瑕佺殑搴旂敤鍏冩暟鎹?#38171;岃繖?#31802;鍏冩暟鎹?#37819;忚堪浜嗗湪搴旂敤閲屼?#36328;敤?#27537;绫诲拰鏂规硶銆傛敞鎰?#38171;?#23000;镐箙浠?#28051;嶆槸Java鍫嗗唴瀛樼殑?#31476;閮垎銆?/span><br style="color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;" /><span style="color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;">姘镐箙浠?#28699;?#37824;綣VM杩?#29723;屾椂浣跨敤?#27537;绫?#37510;傛?#38224;箙浠?#37722;?#37837;?#37718;呭惈浜咼ava SE搴撶殑绫诲拰鏂规硶銆傛?#38224;箙浠殑瀵硅薄鍦full GC?#26882;杩?#29723;屽?#20904;溇鏀?#38342;?#37510;?/span><br style="color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;" /><br style="color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;" /><br style="color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;" /><strong style="color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;">鏂规硶鍖?/strong><br style="color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;" /><span style="color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;">鏂规硶鍖?#37828;?#23000;镐箙浠?#32460;洪棿?#27537;?#31476;閮垎锛?#39582;剁敤鏉?#28699;樺偍绫诲瀷淇伅锛?#26473;?#29723;?#37827;跺父閲忓拰闈?#37804;?#37721;?#38322;?#38171;夊拰鏂规硶浠?#37934;佸拰鏋?#38315;?#37713;芥暟浠?#37934;?#37510;?/span><br style="color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;" /><br style="color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;" /><br style="color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;" /><strong style="color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;">?#21812;瀛樻睜</strong><br style="color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;" /><span style="color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;">濡傛灉JVM瀹炵幇鏀?#37816;?#38171;孞VM?#21812;瀛樼鐞?#28028;氫负鍒?#23524;哄唴瀛樻睜锛岀敤鏉?#28051;?#28051;?#37721;樺?#30789;薄鍒?#23524;?#28725;硅薄姹?#37510;?#28699;?#32471;?#28051;?#23033;?#28751;?#37828;唴瀛樻睜绫诲瀷?#27537;?#31476;涓?#23536;堝?#30028;殑渚嬪瓙銆傚唴瀛樻睜鍙?#28000;?#28766;?#27996;?#37739;?#37812;?#38000;?#23000;镐箙浠?#38171;岃繖鍙?#37712;?#27996;嶫VM?#21812;瀛樼鐞嗙殑瀹炵幇銆?/span><br style="color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;" /><br style="color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;" /><br style="color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;" /><strong style="color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;">杩?#29723;?#37827;跺父閲忔睜</strong><br style="color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;" /><span style="color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;">杩?#29723;?#37827;跺父閲忔睜鏄?#23011;?#28051;?#32491;诲父閲忔睜?#27537;杩?#29723;屾椂浠?#29723;?#37510;?#28729;冨?#21613;惈浜?#32491;荤殑杩?#29723;?#37827;跺父閲忓拰闈?#37804;?#37826;规硶銆傝繍琛?#37827;跺父閲忔睜鏄?#37826;规硶鍖虹殑?#31476;閮垎銆?/span><br style="color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;" /><br style="color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;" /><br style="color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;" /><strong style="color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;">Java鏍堝唴瀛?/strong><br style="color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;" /><span style="color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;">Java鏍堝唴瀛樼敤浜?#26473;?#29723;?#32510;跨銆?#28729;?#28000;?#37718;呭惈浜?#37826;规硶閲岀殑涓存椂?#26271;鎹?#37510;?#37739;嗛?#23677;?#36346;?#20904;?#30789;薄寮曠敤?#27537;鐗?#28729;氭暟鎹?#37510;?/span><br style="color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;" /><br style="color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;" /><strong style="color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;">Java鍨冨溇鍥?#37824;?/strong><br style="color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;" /><span style="color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;">Java鍨冨溇鍥?#37824;?#28028;?#37813;惧?#28888;病?#25956;?#27537;瀵硅薄锛屾妸瀹?#28000;庡唴瀛?#28051;?#32457;婚櫎骞?#38322;?#37824;惧?#21700;唴瀛?#32513;?#28000;?#37722;?#37714;?#23524;虹殑瀵硅薄浣跨敤銆侸ava绋嬪簭璇言涓殑?#31476;涓?#37832;澶?#28028;樼偣鏄嚜?#23017;鍨冨溇鍥?#37824;?#38171;?#28051;嶅鍏?#28000;栫殑绋嬪簭璇言閭?#37837;烽渶瑕?#37813;嬪姩?#22414;閰嶅拰閲?#37824;惧唴瀛?#38171;?#23011;?#28641;侰璇言銆?/span><br style="color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;" /><br style="color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;" /><span style="color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;">鍨冨溇鏀?#38342;?#37731;?#37828;竴涓?#37722;?#37721;拌繍琛岀?#23338;簭銆?#28729;冪鐞嗙潃?#21812;瀛?#28051;殑鎵鏈夊?#30789;薄骞?#37813;惧?#28888;病琚?#23534;曠敤?#27537;瀵硅薄銆傛墍鏈夌殑?#32342;?#31802;鏈?#23534;曠敤?#27537;瀵硅薄?#20824;浼?#29722;?#37714;犻櫎锛屽洖鏀跺畠浠殑绌洪棿骞跺垎閰嶇粰鍏?#28000;栧?#30789;薄銆?/span><br style="color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;" /><br style="color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;" /><span style="color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;">?#31476;涓熀鏈殑鍨冨溇鍥?#37824;惰繃绋嬫鍙?#28051;?#28051;?#23005;?#26976;?#38171;?/span><br style="color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;" /><span style="color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;">鏍?#29825;?#38171;氳繖鏄?#32471;竴姝?#37510;?#37734;繖?#31476;姝?#38171;屽?#20904;溇鏀?#38342;?#37731;?#28028;?#37813;惧?#21700;摢?#31802;瀵硅薄姝?#37734;?#28003;跨敤?#25328;鍝簺瀵硅薄涓嶅湪浣跨敤銆?/span><br style="color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;" /><span style="color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;">姝父娓呴櫎锛氬?#20904;溇鏀?#38342;?#37731;?#23059;?#28028;氶櫎涓嶅湪浣跨敤?#27537;瀵硅薄锛屽洖鏀跺畠浠殑绌洪棿?#22414;閰嶇粰鍏?#28000;栧?#30789;薄銆?/span><br style="color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;" /><span style="color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;">?#24071;缂?#23059;呴櫎锛氫负浜嗘彁鍗?#37804;兘锛屽帇缂?#23059;呴櫎浼氬湪鍒犻櫎?#30149;?#25956;?#27537;瀵硅薄鍚?#38171;屾妸鎵鏈?#28699;?#23090;荤殑瀵硅薄绉?#37714;颁竴璧?#37510;傝繖鏍?#37721;?#28000;?#37819;愰?#27194;垎閰嶆柊瀵硅薄?#27537;鏁?#37916;?#37510;?/span><br style="color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;" /><br style="color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;" /><br style="color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;" /><span style="color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;">?#30045;鍗?#37837;?#29825;板拰娓呴櫎鏂规硶瀛樺湪涓?#28051;?#38338;?#26864;?#38171;?/span><br style="color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;" /><span style="color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;">鏁?#37916;囧緢?#32134;銆?#37733;?#28051;?#28598;?#28598;氭暟?#26570;寤?#28725;硅薄?#20824;浼?#37812;?#28051;?#8220;?#30149;?#25956;瀵硅薄”銆?/span><br style="color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;" /><span style="color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;">缁忚繃澶?#23046;?#37736;冨溇鍥?#37824;跺懆鏈熺殑瀵硅薄?#32226;鏈?#37721;兘鍦?#28000;?#37722;庣殑鍛?#37832;熶篃浼?#28699;?#23090;?#28051;嬫潵銆?/span><br style="color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;" /><span style="color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;">?#31490;闈畝鍗?#23059;呴櫎鏂规硶?#27537;闂?#26864;樺湪浜嶫ava鍨冨溇鏀?#38342;嗙殑?#22414;浠?#37733;?#37824;剁殑锛?#38000;?#28051;?#37734;?#37739;嗗唴瀛?#38322;?#37832;?#39582;?#26462;?#28000;拰骞磋?#28000;?#28051;?#28051;?#37718;哄煙銆?/span><br style="color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;" /><br style="color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;" /><br style="color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;" /><ul style="color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;"><li><strong>Java鍨冨溇鍥?#37824;?#32491;诲瀷</strong></li></ul><span style="color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;">?#32342;閲?#37832;?#27996;?#32457;?#37721;?#28000;?#37734;?#25652;旂敤閲屼?#36328;敤?#27537;鍨冨溇鍥?#37824;?#32491;诲瀷銆?/span><p style="margin: 0px; padding: 0px; color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;"></p><p style="margin: 0px; padding: 0px; color: #555555; font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px; background-color: #ffffff;">浠呴渶瑕佷?#36328;敤JVM寮鍏?#28751;?#37721;?#28000;?#37734;?#37812;?#28000;殑搴旂敤閲?#37722;敤鍨冨溇鍥?#37824;剁瓥?#26256;銆?br /><br /><strong>Serial GC锛?XX:+UseSerialGC锛?/strong>锛歋erial GC浣跨敤?#30045;鍗曠殑鏍?#29825;?#37510;?#23059;呴櫎銆佸帇缂?#37826;规硶瀵?#39582;?#26462;?#28000;拰骞磋?#28000;?#26473;?#29723;屽?#20904;溇鍥?#37824;?#38171;屽嵆Minor GC?#25328;Major GC銆係erial GC鍦client妯?#23534;?#38171;堝鎴?#32468;?#22959;?#23534;?#38171;夊緢鏈夌敤锛?#23011;?#28641;?#37734;畝鍗曠殑?#23277;绔嬪簲?#25956;?#25328;CPU閰嶇疆杈冧綆?#27537;鏈?#37731;?#37510;傝繖涓?#22959;?#23534;?#28725;?#37719;?#37832;夊唴瀛?#26440;冨?#25120;殑搴旂敤?#32226;绠敤銆?br /><strong>Parallel GC锛?XX:+UseParallelGC锛?/strong>锛氶櫎浜?#28028;?#27996;?#37922;N涓?#32510;跨?#23339;潵杩?#29723;?#39582;?#26462;?#28000;殑鍨冨溇鏀?#38342;?#28598;?#38171;孭arallel GC?#25328;Serial GC鍑?#28052;庝竴鏍?#37510;傝繖閲岀殑N鏄?#32495;荤粺CPU?#27537;鏍告暟銆?#37812;?#28000;?#37721;?#28000;?#28003;跨敤 -XX:ParallelGCThreads=n ?#32342;涓JVM閫夐?#35268;潵鎺?#37714;?#32510;跨?#23339;暟閲?#37510;?#39582;惰?#23677;?#20904;溇鏀?#38342;?#37731;?#28052;?#37721;throughput鏀?#38342;?#37731;?#37510;?#37733;?#28051;?#28729;?#28003;跨敤浜?#28598;欳PU鍔?#36423;?#37736;冨溇鍥?#37824;?#37804;兘銆侾arallel GC鍦?#26473;?#29723;?#39582;磋?#28000;?#37736;冨溇鏀?#38342;嗘椂浣跨敤鍗?#32510;跨銆?br /><strong>Parallel Old GC锛?XX:+UseParallelOldGC锛?/strong>锛氬拰Parallel GC?#31476;鏍?#37510;?#28051;嶅?#23676;?#23338;锛孭arallel Old GC鍦?#39582;?#26462;?#28000;?#37736;冨溇鏀?#38342;嗗拰骞磋?#28000;?#37736;冨溇鍥?#37824;舵椂?#20824;浣跨敤澶?#32510;跨鏀?#38342;?#37510;?br /><strong>骞跺彂鏍?#29825;?#23059;呴櫎锛圕MS锛?#37824;?#38342;?#37731;?#38171;?XX:+UseConcMarkSweepGC)</strong>锛欳MS鏀?#38342;?#37731;?#28052;?#29722;?#32457;?#28051;虹煭鏆?#37707;滈?#22446;?#36346;彂鏀?#38342;?#37731;?#37510;?#28729;?#37828;?#28725;?#39582;磋?#28000;?#26473;?#29723;屽?#20904;溇鏀?#38342;嗙殑銆侰MS鏀?#38342;?#37731;?#38315;氳繃澶?#32510;跨?#23338;?#36346;彂杩?#29723;屽?#20904;溇鍥?#37824;?#38171;?#28751;?#38322;忓噺灏?#37736;冨溇鏀?#38342;嗛?#37812;愮殑鍋滈銆侰MS鏀?#38342;?#37731;?#28725;?#39582;?#26462;?#28000;?#26473;?#29723;屽?#20904;溇鍥?#37824;?#28003;跨敤?#27537;绠?#23049;曞拰Parallel鏀?#38342;?#37731;竴鏍?#37510;傝繖涓?#37736;冨溇鏀?#38342;?#37731;?#38315;傜敤浜?#28051;嶈兘蹇?#37721;楅暱?#26882;?#26879;鍋滈?#33007;?#20345;眰蹇?#38315;熷?#23941;簲?#27537;搴旂敤銆?#37721;?#28003;跨敤 -XX:ParallelCMSThreads=n JVM閫夐?#35268;潵闄?#37714;禖MS鏀?#38342;?#37731;殑绾跨?#23339;暟閲?#37510;?br /><strong>G1鍨冨溇鏀?#38342;?#37731;?#38171;?XX:+UseG1GC) G1锛圙arbage First锛?/strong>锛氬?#20904;溇鏀?#38342;?#37731;?#37828;?#37734;Java 7鍚?#37813;?#37721;?#28000;?#28003;跨敤?#27537;鐗?#37804;?#38171;屽?#20906;殑?#26289;杩?#37929;?#37837;囨椂浠?#37831;緾MS鏀?#38342;?#37731;?#37510;侴1鏀?#38342;?#37731;?#37828;竴涓?#39582;惰?#23680;殑銆?#39582;跺?#25120;殑?#25328;澧?#38322;?#23534;忓帇缂煭鏆?#37707;滈?#36328;殑鍨冨溇鏀?#38342;?#37731;?#37510;侴1鏀?#38342;?#37731;拰鍏?#28000;栫殑鏀?#38342;?#37731;?#26473;?#29723;?#37826;?#23534;?#28051;嶄竴鏍?#38171;?#28051;嶅尯?#22414;骞?#26462;?#28000;拰骞磋?#28000;?#32460;洪棿銆?#28729;冩妸鍫嗙?#27946;棿鍒掑垎涓?#28598;氫釜澶?#28751;?#37929;?#32475;夌殑鍖哄煙銆傚綋杩?#29723;屽?#20904;溇鏀?#38342;嗘椂锛屽畠浼氫?#27194;厛鏀?#38342;嗗瓨娲诲?#30789;薄杈冨?#25120;殑鍖哄煙锛屽?#29363;鍙?#8220;Garbage First”銆?/p><img src ="http://www.5432034.com/hello-yun/aggbug/426314.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.5432034.com/hello-yun/" target="_blank">浜?#27996;?/a> 2015-07-19 22:57 <a href="http://www.5432034.com/hello-yun/archive/2015/07/19/426314.html#Feedback" target="_blank" style="text-decoration:none;">鍙?#29723;?#29831;?#29825;?/a></div>]]></description></item><item><title>linux 绯?#37714;?/title><link>http://www.5432034.com/hello-yun/archive/2014/09/28/418366.html</link><dc:creator>浜?#27996;?/dc:creator><author>浜?#27996;?/author><pubDate>Sun, 28 Sep 2014 15:45:00 GMT</pubDate><guid>http://www.5432034.com/hello-yun/archive/2014/09/28/418366.html</guid><description><![CDATA[<div>http://www.5432034.com/fancydeepin/archive/2014/09/28/linux.html<br /><br /><a href="http://blog.csdn.net/lychie/article/details/39566159" target="_blank" style="color: #008080; text-decoration: none; font-family: 'Courier New', Consolas, 'Microsoft Yahei', Tahoma, Helvetica, SimSun, sans-serif; line-height: 27px; background-color: #ffffff;">17锛巙buntu 闃茬伀澧?/a><br style="font-family: 'Courier New', Consolas, 'Microsoft Yahei', Tahoma, Helvetica, SimSun, sans-serif; line-height: 27px; background-color: #ffffff;" /><a href="http://blog.csdn.net/lychie/article/details/39567395" target="_blank" style="color: #008080; text-decoration: none; font-family: 'Courier New', Consolas, 'Microsoft Yahei', Tahoma, Helvetica, SimSun, sans-serif; line-height: 27px; background-color: #ffffff;">16锛巙buntu 寮鍚?ssh 鏈嶅姟</a><br style="font-family: 'Courier New', Consolas, 'Microsoft Yahei', Tahoma, Helvetica, SimSun, sans-serif; line-height: 27px; background-color: #ffffff;" /><a href="http://blog.csdn.net/lychie/article/details/39568597" target="_blank" style="color: #008080; text-decoration: none; font-family: 'Courier New', Consolas, 'Microsoft Yahei', Tahoma, Helvetica, SimSun, sans-serif; line-height: 27px; background-color: #ffffff;">15锛巙buntu jdk 瀹夎涓?#38320;嶇疆</a><br style="font-family: 'Courier New', Consolas, 'Microsoft Yahei', Tahoma, Helvetica, SimSun, sans-serif; line-height: 27px; background-color: #ffffff;" /><a href="http://blog.csdn.net/lychie/article/details/39592077" target="_blank" style="color: #008080; text-decoration: none; font-family: 'Courier New', Consolas, 'Microsoft Yahei', Tahoma, Helvetica, SimSun, sans-serif; line-height: 27px; background-color: #ffffff;">14锛巙buntu tomcat 瀹夎涓?#38320;嶇疆</a><br style="font-family: 'Courier New', Consolas, 'Microsoft Yahei', Tahoma, Helvetica, SimSun, sans-serif; line-height: 27px; background-color: #ffffff;" /><a href="http://blog.csdn.net/lychie/article/details/39605771" target="_blank" style="color: #008080; text-decoration: none; font-family: 'Courier New', Consolas, 'Microsoft Yahei', Tahoma, Helvetica, SimSun, sans-serif; line-height: 27px; background-color: #ffffff;">13锛巙buntu mysql 瀹夎</a><br style="font-family: 'Courier New', Consolas, 'Microsoft Yahei', Tahoma, Helvetica, SimSun, sans-serif; line-height: 27px; background-color: #ffffff;" /><a href="http://blog.csdn.net/lychie/article/details/39565491" target="_blank" style="color: #008080; text-decoration: none; font-family: 'Courier New', Consolas, 'Microsoft Yahei', Tahoma, Helvetica, SimSun, sans-serif; line-height: 27px; background-color: #ffffff;">12锛巙buntu root ?#25328; user ?#25956;鎴?#37714;?#37817;?/a><br style="font-family: 'Courier New', Consolas, 'Microsoft Yahei', Tahoma, Helvetica, SimSun, sans-serif; line-height: 27px; background-color: #ffffff;" /><a href="http://blog.csdn.net/lychie/article/details/39555403" target="_blank" style="color: #008080; text-decoration: none; font-family: 'Courier New', Consolas, 'Microsoft Yahei', Tahoma, Helvetica, SimSun, sans-serif; line-height: 27px; background-color: #ffffff;">11锛巐inux more 鍛?#28000;?/a><br style="font-family: 'Courier New', Consolas, 'Microsoft Yahei', Tahoma, Helvetica, SimSun, sans-serif; line-height: 27px; background-color: #ffffff;" /><a href="http://blog.csdn.net/lychie/article/details/39560765" target="_blank" style="color: #008080; text-decoration: none; font-family: 'Courier New', Consolas, 'Microsoft Yahei', Tahoma, Helvetica, SimSun, sans-serif; line-height: 27px; background-color: #ffffff;">10锛巐inux tar 鍛?#28000;?/a><br style="font-family: 'Courier New', Consolas, 'Microsoft Yahei', Tahoma, Helvetica, SimSun, sans-serif; line-height: 27px; background-color: #ffffff;" /><a href="http://blog.csdn.net/lychie/article/details/39559513" target="_blank" style="color: #008080; text-decoration: none; font-family: 'Courier New', Consolas, 'Microsoft Yahei', Tahoma, Helvetica, SimSun, sans-serif; line-height: 27px; background-color: #ffffff;">09锛巐inux chmod 鍛?#28000;?/a><br style="font-family: 'Courier New', Consolas, 'Microsoft Yahei', Tahoma, Helvetica, SimSun, sans-serif; line-height: 27px; background-color: #ffffff;" /><a href="http://blog.csdn.net/lychie/article/details/39537439" target="_blank" style="color: #008080; text-decoration: none; font-family: 'Courier New', Consolas, 'Microsoft Yahei', Tahoma, Helvetica, SimSun, sans-serif; line-height: 27px; background-color: #ffffff;">08锛巐inux touch 鍛?#28000;?/a><br style="font-family: 'Courier New', Consolas, 'Microsoft Yahei', Tahoma, Helvetica, SimSun, sans-serif; line-height: 27px; background-color: #ffffff;" /><a href="http://blog.csdn.net/lychie/article/details/39538911" target="_blank" style="color: #008080; text-decoration: none; font-family: 'Courier New', Consolas, 'Microsoft Yahei', Tahoma, Helvetica, SimSun, sans-serif; line-height: 27px; background-color: #ffffff;">07锛巐inux cat 鍛?#28000;?/a><br style="font-family: 'Courier New', Consolas, 'Microsoft Yahei', Tahoma, Helvetica, SimSun, sans-serif; line-height: 27px; background-color: #ffffff;" /><a href="http://blog.csdn.net/lychie/article/details/39532097" target="_blank" style="color: #008080; text-decoration: none; font-family: 'Courier New', Consolas, 'Microsoft Yahei', Tahoma, Helvetica, SimSun, sans-serif; line-height: 27px; background-color: #ffffff;">06锛巐inux mv 鍛?#28000;?/a><br style="font-family: 'Courier New', Consolas, 'Microsoft Yahei', Tahoma, Helvetica, SimSun, sans-serif; line-height: 27px; background-color: #ffffff;" /><a href="http://blog.csdn.net/lychie/article/details/39526613" target="_blank" style="color: #008080; text-decoration: none; font-family: 'Courier New', Consolas, 'Microsoft Yahei', Tahoma, Helvetica, SimSun, sans-serif; line-height: 27px; background-color: #ffffff;">05锛巐inux rm 鍛?#28000;?/a><br style="font-family: 'Courier New', Consolas, 'Microsoft Yahei', Tahoma, Helvetica, SimSun, sans-serif; line-height: 27px; background-color: #ffffff;" /><a href="http://blog.csdn.net/lychie/article/details/39505437" target="_blank" style="color: #008080; text-decoration: none; font-family: 'Courier New', Consolas, 'Microsoft Yahei', Tahoma, Helvetica, SimSun, sans-serif; line-height: 27px; background-color: #ffffff;">04锛巐inux cp 鍛?#28000;?/a><br style="font-family: 'Courier New', Consolas, 'Microsoft Yahei', Tahoma, Helvetica, SimSun, sans-serif; line-height: 27px; background-color: #ffffff;" /><a href="http://blog.csdn.net/lychie/article/details/39501353" target="_blank" style="color: #008080; text-decoration: none; font-family: 'Courier New', Consolas, 'Microsoft Yahei', Tahoma, Helvetica, SimSun, sans-serif; line-height: 27px; background-color: #ffffff;">03锛巐inux mkdir 鍛?#28000;?/a><br style="font-family: 'Courier New', Consolas, 'Microsoft Yahei', Tahoma, Helvetica, SimSun, sans-serif; line-height: 27px; background-color: #ffffff;" /><a href="http://blog.csdn.net/lychie/article/details/39499353" target="_blank" style="color: #008080; text-decoration: none; font-family: 'Courier New', Consolas, 'Microsoft Yahei', Tahoma, Helvetica, SimSun, sans-serif; line-height: 27px; background-color: #ffffff;">02锛巐inux cd 鍛?#28000;?/a><br style="font-family: 'Courier New', Consolas, 'Microsoft Yahei', Tahoma, Helvetica, SimSun, sans-serif; line-height: 27px; background-color: #ffffff;" /><a href="http://blog.csdn.net/lychie/article/details/39533391" target="_blank" style="color: #008080; text-decoration: none; font-family: 'Courier New', Consolas, 'Microsoft Yahei', Tahoma, Helvetica, SimSun, sans-serif; line-height: 27px; background-color: #ffffff;">01锛巐inux ls 鍛?#28000;?/a></div><img src ="http://www.5432034.com/hello-yun/aggbug/418366.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.5432034.com/hello-yun/" target="_blank">浜?#27996;?/a> 2014-09-28 23:45 <a href="http://www.5432034.com/hello-yun/archive/2014/09/28/418366.html#Feedback" target="_blank" style="text-decoration:none;">鍙?#29723;?#29831;?#29825;?/a></div>]]></description></item><item><title>Java?#23017;鎬?#28000;?#37918;?#37832;?#37714;?#29831;?#29785;?#38171;JDK ?#25328;CGLIB锛孞avassist锛孉SM锛塠杞琞http://www.5432034.com/hello-yun/archive/2014/09/28/418365.html浜?#27996;?/dc:creator>浜?#27996;?/author>Sun, 28 Sep 2014 15:44:00 GMThttp://www.5432034.com/hello-yun/archive/2014/09/28/418365.html闃?#29831;?#37711;?#37826;?/a>

]]>
鍚?#37721;?xss 鎺?#37714;?/title><link>http://www.5432034.com/hello-yun/archive/2014/09/28/418353.html</link><dc:creator>浜?#27996;?/dc:creator><author>浜?#27996;?/author><pubDate>Sun, 28 Sep 2014 05:49:00 GMT</pubDate><guid>http://www.5432034.com/hello-yun/archive/2014/09/28/418353.html</guid><wfw:comment>http://www.5432034.com/hello-yun/comments/418353.html</wfw:comment><comments>http://www.5432034.com/hello-yun/archive/2014/09/28/418353.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.5432034.com/hello-yun/comments/commentRss/418353.html</wfw:commentRss><trackback:ping>http://www.5432034.com/hello-yun/services/trackbacks/418353.html</trackback:ping><description><![CDATA[<div> </div><div>package com.qiyi.appstore.util;</div><div></div><div>import java.lang.reflect.Field;</div><div>import java.lang.reflect.InvocationTargetException;</div><div></div><div>import org.apache.commons.beanutils.BeanUtils;</div><div>import org.apache.commons.lang.StringUtils;</div><div>import org.slf4j.Logger;</div><div>import org.slf4j.LoggerFactory;</div><div></div><div>import com.qiyi.appstore.exception.AppStoreException;</div><div>import com.qiyi.cloud.user.ApiCode;</div><div></div><div>public class XssUtils {</div><div><span style="white-space:pre"> </span>private static final Logger logger=LoggerFactory.getLogger(XssUtils.class);</div><div><span style="white-space:pre"> </span></div><div><span style="white-space:pre"> </span>public static String getSafeStringXSS(String s){</div><div><span style="white-space:pre"> </span>       if (StringUtils.isBlank(s)) {  </div><div><span style="white-space:pre"> </span>           return s;  </div><div><span style="white-space:pre"> </span>       }  </div><div><span style="white-space:pre"> </span>       StringBuilder sb = new StringBuilder(s.length() + 16);  </div><div><span style="white-space:pre"> </span>       for (int i = 0; i < s.length(); i++) {  </div><div><span style="white-space:pre"> </span>           char c = s.charAt(i);  </div><div><span style="white-space:pre"> </span>           switch (c) {  </div><div><span style="white-space:pre"> </span>           case '<':  </div><div><span style="white-space:pre"> </span>               sb.append("&lt;");  </div><div><span style="white-space:pre"> </span>               break; </div><div><span style="white-space:pre"> </span>           case '>':  </div><div><span style="white-space:pre"> </span>               sb.append("&gt;");  </div><div><span style="white-space:pre"> </span>               break;  </div><div><span style="white-space:pre"> </span>           case '\'':  </div><div><span style="white-space:pre"> </span>               sb.append("&prime;");// &acute;");  </div><div><span style="white-space:pre"> </span>               break;  </div><div><span style="white-space:pre"> </span>           case '′':  </div><div><span style="white-space:pre"> </span>               sb.append("&prime;");// &acute;");  </div><div><span style="white-space:pre"> </span>               break;  </div><div><span style="white-space:pre"> </span>           case '\"':  </div><div><span style="white-space:pre"> </span>               sb.append("&quot;");  </div><div><span style="white-space:pre"> </span>               break;  </div><div><span style="white-space:pre"> </span>           case '锛?:  </div><div><span style="white-space:pre"> </span>               sb.append("&quot;");  </div><div><span style="white-space:pre"> </span>               break;  </div><div><span style="white-space:pre"> </span>           case '&':  </div><div><span style="white-space:pre"> </span>               sb.append("锛?);  </div><div><span style="white-space:pre"> </span>               break;  </div><div><span style="white-space:pre"> </span>           case '#':  </div><div><span style="white-space:pre"> </span>               sb.append("锛?);  </div><div><span style="white-space:pre"> </span>               break;  </div><div><span style="white-space:pre"> </span>           case '\\':  </div><div><span style="white-space:pre"> </span>               sb.append('锟?);  </div><div><span style="white-space:pre"> </span>               break; </div><div><span style="white-space:pre"> </span>           case '=':  </div><div><span style="white-space:pre"> </span>               sb.append("=");  </div><div><span style="white-space:pre"> </span>               break;</div><div><span style="white-space:pre"> </span>           default:  </div><div><span style="white-space:pre"> </span>               sb.append(c);  </div><div><span style="white-space:pre"> </span>               break;  </div><div><span style="white-space:pre"> </span>           }  </div><div><span style="white-space:pre"> </span>       }  </div><div><span style="white-space:pre"> </span>       return sb.toString(); </div><div><span style="white-space:pre"> </span>   }</div><div><span style="white-space:pre"> </span></div><div><span style="white-space:pre"> </span>public static <T> void getXssSaftBean(Class<?> clz,T bean) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException{</div><div><span style="white-space:pre"> </span>String classname = clz.getSimpleName();</div><div><span style="white-space:pre"> </span>logger.info("map target class name is {} .",classname);</div><div><span style="white-space:pre"> </span>Field[] fields = clz.getDeclaredFields();</div><div><span style="white-space:pre"> </span>for(Field field : fields){</div><div><span style="white-space:pre"> </span></div><div><span style="white-space:pre"> </span>Class<?> type = field.getType();</div><div><span style="white-space:pre"> </span>if(type.equals(String.class)){</div><div><span style="white-space:pre"> </span>String fieldname = field.getName();</div><div><span style="white-space:pre"> </span>String value = BeanUtils.getProperty(bean, fieldname);</div><div><span style="white-space:pre"> </span>if(StringUtils.isNotBlank(value)){</div><div><span style="white-space:pre"> </span>BeanUtils.setProperty(bean, fieldname, getSafeStringXSS(value));</div><div><span style="white-space:pre"> </span>}</div><div><span style="white-space:pre"> </span>}</div><div><span style="white-space:pre"> </span></div><div><span style="white-space:pre"> </span>}</div><div><span style="white-space:pre"> </span>}</div><div>}</div><div></div><img src ="http://www.5432034.com/hello-yun/aggbug/418353.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.5432034.com/hello-yun/" target="_blank">浜?#27996;?/a> 2014-09-28 13:49 <a href="http://www.5432034.com/hello-yun/archive/2014/09/28/418353.html#Feedback" target="_blank" style="text-decoration:none;">鍙?#29723;?#29831;?#29825;?/a></div>]]></description></item><item><title>?#24385;鍗tomcat 鎬兘 apr鎵?#28766;libhttp://www.5432034.com/hello-yun/archive/2014/01/16/409026.html浜?#27996;?/dc:creator>浜?#27996;?/author>Thu, 16 Jan 2014 06:50:00 GMThttp://www.5432034.com/hello-yun/archive/2014/01/16/409026.htmlhttp://www.5432034.com/hello-yun/comments/409026.htmlhttp://www.5432034.com/hello-yun/archive/2014/01/16/409026.html#Feedback0http://www.5432034.com/hello-yun/comments/commentRss/409026.htmlhttp://www.5432034.com/hello-yun/services/trackbacks/409026.html?#24385;鍗tomcat 鎬兘 apr鎵?#28766;lib
浣跨敤apr绫诲簱 鍙?#28000;?#29825;tomcat?#27537;鎬兘?#24385;鍗?#37714;?鍒?鍊? 
鐩?#37715;?#26916;?#37929;?#28051;兘浣跨敤?#32342;鏍风殑閰嶇疆
<Connector port="8080" protocol="org.apache.coyote.http11.Http11AprProtocol" URIEncoding="UTF-8"
               enableLookups="false"
               acceptCount="300"
               connectionTimeout="20000"
               disableUploadTimeout="true" maxThreads="1000" maxSpareThreads="50" minSpareThreads="25"
               redirectPort="8443" />


catalia.sh 
CATALINA_OPTS="$CATALINA_OPTS -Djava.library.path=/usr/local/apr/lib"


浜?#27996;?/a> 2014-01-16 14:50 鍙?#29723;?#29831;?#29825;?/a>
]]>redis 璁剧疆?#22414;甯冨紡閿?http://www.5432034.com/hello-yun/archive/2014/01/15/408988.html浜?#27996;?/dc:creator>浜?#27996;?/author>Wed, 15 Jan 2014 11:00:00 GMThttp://www.5432034.com/hello-yun/archive/2014/01/15/408988.htmlhttp://www.5432034.com/hello-yun/comments/408988.htmlhttp://www.5432034.com/hello-yun/archive/2014/01/15/408988.html#Feedback1http://www.5432034.com/hello-yun/comments/commentRss/408988.htmlhttp://www.5432034.com/hello-yun/services/trackbacks/408988.html闃?#29831;?#37711;?#37826;?/a>

浜?#27996;?/a> 2014-01-15 19:00 鍙?#29723;?#29831;?#29825;?/a>
]]>Eclipse鑳屾櫙棰滆壊?#25328;瀛?#28003;?#38320;嶇疆http://www.5432034.com/hello-yun/archive/2014/01/09/408739.html浜?#27996;?/dc:creator>浜?#27996;?/author>Thu, 09 Jan 2014 08:41:00 GMThttp://www.5432034.com/hello-yun/archive/2014/01/09/408739.htmlhttp://www.5432034.com/hello-yun/comments/408739.htmlhttp://www.5432034.com/hello-yun/archive/2014/01/09/408739.html#Feedback0http://www.5432034.com/hello-yun/comments/commentRss/408739.htmlhttp://www.5432034.com/hello-yun/services/trackbacks/408739.html瀵筫clipse?#27537;?#31919;璁?#38320;嶇疆?#32226;涓嶇埥锛岄?#25123;壊瀛?#28003;撶?#20511;壊搴曞鍒虹溂锛?#38000;?#28051;?#28699;?#28003;?#28052;?#37807;敤Courier New
鏀?#37721;樿?#23678;櫙棰滆壊锛?/div>
windows->Preferences->General->Editor->Text Editors
鍙?#26440;?#38315;夋嫨Appearance color options 
閫塀ackground color 閫夋嫨鑳屾櫙棰滆壊
涓?#27996;?#23011;?#26440;?#38008;?#37832;嶇殑璞嗘矙缁胯壊?#25328;榛戣壊鑳屾櫙锛屼?#21979;?#25123;壊鑳屾櫙杩樿?#20345;妸鍏?#28000;栫殑瀛?#28003;?#26864;滆壊涔?#37824;?#27996;?#37813;嶅?#30028;湅锛?#38000;?#28051;旇?#21976;矙缁胯壊璺熼粯璁殑瀛?#28003;?#26864;滆壊鎼?#38320;嶇殑寰堝銆?/div>
璞嗘矙缁胯壊锛堣壊璋?#38171;?5   楗卞拰搴?#38171;?23   浜?#25652;?#38171;?05 锛?/div>
鎹?#29831;磋繖涓壊璋?#37828;?#37930;?#32457;?#28051;?#28729;?#38320;嶇殑锛?鍥?#37711;堕?#28358;壊姣?#26440;?#37836;斿拰锛屾嵁璇撮槄璇荤殑鏃跺欑敤?#32342;绉嶉?#28358;壊鍋氳?#23678;櫙鏈?#37714;?#27996;?#28103;?#37814;?#37930;?#37931;?#38171;?word搴曡壊灏?#29825;?#28598;?#27996;?#29825;剧疆鎴?#29854;嗘矙缁胯壊銆?/div>
xml?#27537;瀛?#28003;?#29835;?#37825;?#38171;?nbsp;
window--preferences--General--appearance--colors and fonts--Basic-- "Text font "  
鐒跺悗?#20579;change,鍙?#28000;?#29825;剧疆瀛?#28003;?#38171;?#37812;戝?#28356;Courier New
Java?#27537;瀛?#28003;?#29835;?#37825;?#38171;?nbsp;
window--preferences--General--appearance--colors and fonts--java 


]]>鍒犻櫎鏂?#28000;剁殑svn淇伅 瑙?#37712;?#28000;?#37711;跺畠璺?#23536;勬嫹?#32323;鏉殑鏂?#28000;跺甫鏈?#29882;緞淇伅 鏃犳硶?#24385;浜殑闂?#26864;?/title><link>http://www.5432034.com/hello-yun/archive/2013/12/05/407259.html</link><dc:creator>浜?#27996;?/dc:creator><author>浜?#27996;?/author><pubDate>Thu, 05 Dec 2013 09:17:00 GMT</pubDate><guid>http://www.5432034.com/hello-yun/archive/2013/12/05/407259.html</guid><wfw:comment>http://www.5432034.com/hello-yun/comments/407259.html</wfw:comment><comments>http://www.5432034.com/hello-yun/archive/2013/12/05/407259.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.5432034.com/hello-yun/comments/commentRss/407259.html</wfw:commentRss><trackback:ping>http://www.5432034.com/hello-yun/services/trackbacks/407259.html</trackback:ping><description><![CDATA[<p align="left">鏈夋?#36346;?#37734;?#26916;?#37929;?#28051;?浼?#37721;樺寲璺緞 ?#22968;鍘?#37832;?#29882;?#23536;勭殑鏂?#28000;舵嫹鍒版柊?#27537;璺緞涓?#38344;?br />鍐嶅垹?#27342;鍘?#37833;?#28051;嶆兂?#27537;璺?#23536;勫?#23942;彁浜竴娆??#32342;鏍?#28000;?#37833;?鍘?#37833;殑璺?#23536;勭瀹?#28051;嶅瓨鍦?#27996;?br />浣?#37828;嫹?#32323;鏉殑鏂?#28000;跺甫鏈?#37720;?#37833;?#29882;?#23536;勭殑svn淇伅 ?#32342;鏍?#28000;?#37833;?鍦彁浜殑鏃跺?灏?#37827;犳硶?#24385;浜?br />鎯宠鏂?#28000;?#37816;夌収?#27537;璺?#23536;勬彁浜?浣嗗?#23340;?#22384;vn杩?#37828;?#37712;嶅線浠?#37715;嶇殑璺?#23536;勬彁浜?骞舵彁绀?#28003;?#29882;緞涓嶅瓨鍦?br />鍦?#32515;戜笂鎼?#27996;?#28051;?濡備綍鍒犻櫎鏂?#28000;惰嚜甯殑svn璺緞淇伅 <br />鎸夌収涓?#38344;殑鏂?#23534;忔潵鎿嶄綔鍗?#37721;?/p> <p style="text-align: left; padding-bottom: 0px; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; margin: 0px 0px 10px; padding-left: 0px; padding-right: 0px; font: 16px/28px 'Hiragino Sans GB W3', 'Hiragino Sans GB', Arial, Helvetica, simsun, u5b8bu4f53; white-space: normal; letter-spacing: normal; color: rgb(13,13,13); word-spacing: 0px; padding-top: 0px; -webkit-text-stroke-width: 0px">Windows Registry Editor Version 5.00<br style="line-height: 28px" />[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\DeleteSVN]<span class="Apple-converted-space"> </span><br style="line-height: 28px" />@="鍒犻櫎璇?#37929;綍涓?#38344;?svn鏂?#28000;?<br style="line-height: 28px" />[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\DeleteSVN\command]<span class="Apple-converted-space"> </span><br style="line-height: 28px" />@="cmd.exe /c \"TITLE Removing SVN Folders in %1 && COLOR 9A && FOR /r \"%1\" %%f IN (.svn) DO RD /s /q \"%%f\" \""</p> <p style="text-align: left; padding-bottom: 0px; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; margin: 0px 0px 10px; padding-left: 0px; padding-right: 0px; font: 16px/28px 'Hiragino Sans GB W3', 'Hiragino Sans GB', Arial, Helvetica, simsun, u5b8bu4f53; white-space: normal; letter-spacing: normal; color: rgb(13,13,13); word-spacing: 0px; padding-top: 0px; -webkit-text-stroke-width: 0px"><br style="line-height: 28px" />?#22968;?#31490;闈繖娈?#37826;?#28699;?#28103;?#28699;?#38338;竴涓狣one.reg鏂?#28000;?br style="line-height: 28px" />鐒跺悗鎵?#29723;?瀵?#37711;?#37714;版敞鍐?#29723;?br style="line-height: 28px" />灏?#28028;氬湪浣?#37721;?#38335;竴涓?#37826;?#28000;跺?#22317;殑鏃跺?#28598;氬嚭鏉竴涓彍鍗?鍒犻櫎璇?#37929;綍涓?#38344;?svn鏂?#28000;?<br style="line-height: 28px" />鎵?#29723;?#29831;?#37723;?#28000;?#37719;?#37721;?/p> <p align="left"> </p><img src ="http://www.5432034.com/hello-yun/aggbug/407259.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.5432034.com/hello-yun/" target="_blank">浜?#27996;?/a> 2013-12-05 17:17 <a href="http://www.5432034.com/hello-yun/archive/2013/12/05/407259.html#Feedback" target="_blank" style="text-decoration:none;">鍙?#29723;?#29831;?#29825;?/a></div>]]></description></item><item><title>mybatis No enum const class org.apache.ibatis.type.JdbcType.Date 鍧戠?#22317;殑閰嶇疆http://www.5432034.com/hello-yun/archive/2013/11/26/406862.html浜?#27996;?/dc:creator>浜?#27996;?/author>Tue, 26 Nov 2013 13:02:00 GMThttp://www.5432034.com/hello-yun/archive/2013/11/26/406862.htmlhttp://www.5432034.com/hello-yun/comments/406862.htmlhttp://www.5432034.com/hello-yun/archive/2013/11/26/406862.html#Feedback1http://www.5432034.com/hello-yun/comments/commentRss/406862.htmlhttp://www.5432034.com/hello-yun/services/trackbacks/406862.html濡?br />insert into testTable
   (ID,
   NAME,
   DESCRIPTION,
   IMAGEURL,
   LINKURL,
   ISALWAYS,
   ISDISPLAYINDEX,
   DISPLAYWEIGHT,
   STARTTIME,
   ENDTIME,
   CREATOR,
   CREATTIME,
   MODIFYTIME)
  values
   (SEQ_ACTIVITY_TABLE.NEXTVAL,
   #{name},
   #{desc,jdbcType=VARCHAR},
   #{imageUrl,jdbcType=VARCHAR},
   #{linkUrl,jdbcType=VARCHAR},
   #{isAlways,jdbcType=CHAR},
   #{isDisplayIndex,jdbcType=CHAR},
   #{displayWeight,jdbcType=VARCHAR},
   #{startTime,jdbcType=DATE},
   #{endTime,jdbcType=DATE},
   #{creator,jdbcType=VARCHAR},
   sysdate,
   sysdate
   )
 </insert>

?#32342;?#31802;璁剧疆涔嬪锛?#28598;?#37905;?#27996;?#38171;?#37832;璁?#27996;虹儲?#27537;鏄?nbsp; jdbcType = DATE锛?#32491;诲瀷杩?#36423;呴澶?#37712;?#38171;?#28051;嶈兘灏?#37712;?#37510;?br />濡?#28051;?#38344;殑渚嬪瓙锛?#28751;DATE 鏀?#37812;?Date 銆?#32513;?#37835;?#29825;?#27996;哄緢鎶撶?#20634;锛?#38171;?#38171;?br />insert into testTable
   (ID,
   NAME,
   DESCRIPTION,
   IMAGEURL,
   LINKURL,
   ISALWAYS,
   ISDISPLAYINDEX,
   DISPLAYWEIGHT,
   STARTTIME,
   ENDTIME,
   CREATOR,
   CREATTIME,
   MODIFYTIME)
  values
   (SEQ_ACTIVITY_TABLE.NEXTVAL,
   #{name},
   #{desc,jdbcType=VARCHAR},
   #{imageUrl,jdbcType=VARCHAR},
   #{linkUrl,jdbcType=VARCHAR},
   #{isAlways,jdbcType=CHAR},
   #{isDisplayIndex,jdbcType=CHAR},
   #{displayWeight,jdbcType=VARCHAR},
   #{startTime,jdbcType=Date},
   #{endTime,jdbcType=DATE},
   #{creator,jdbcType=VARCHAR},
   sysdate,
   sysdate
   )
 </insert>
org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.builder.BuilderException: Error resolving JdbcType. Cause: java.lang.IllegalArgumentException: No enum const class org.apache.ibatis.type.JdbcType.Date
	org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:75)
	org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:368)
鏇村?#25120;?#22317;殑鍦?#37722;?#38344;?#38171;屼笂闈insert?#26882;?#27537;鏃跺欑敤#{endTime,jdbcType=DATE},鍙?#28000;?#28751;嗘椂闂存彃鍏?#37812;?#37716;?#38171;?#28051;?#37721;?#28000;?#21095;鍒?#37827;跺垎绉?br />浣嗗?#20635;灉鍦update璇?#37721;?#28051;?#28052;熻繖鏍蜂?#36328;敤锛?#38317;?#28003;犲緱鍒扮殑鍙?#28028;?#37832;夋棩鏈?#38171;岃繖澶熷?#25120;?#22317;殑浜嗗 锛?#28751;?#37916;?nbsp; 姣旇捣ibatis鏂?#28186;?#28052;嬪?#21227;杩?#27996;?br />瑕佹兂鍦update璇?#37721;?#28051;?灏嗘椂?#26879;鏍?#23534;?#37718;?#37812;?#37827;跺垎绉?涓嶅緱涓嶅?#23941;?#29361;竴涓?#32491;诲瀷 濡?#28051;?#38344;?#38171;?br />startTime = #{startTime,javaType=DATE, jdbcType=VARCHAR}















]]>璧拌繃璺繃 涓嶈?#20352;敊?#32323;?#27537;濂?#37826;?#32468;?CSRF 闃?#23536;?#37826;规硶閫夋嫨涔?#38316;?/title><link>http://www.5432034.com/hello-yun/archive/2013/11/05/406028.html</link><dc:creator>浜?#27996;?/dc:creator><author>浜?#27996;?/author><pubDate>Tue, 05 Nov 2013 12:53:00 GMT</pubDate><guid>http://www.5432034.com/hello-yun/archive/2013/11/05/406028.html</guid><wfw:comment>http://www.5432034.com/hello-yun/comments/406028.html</wfw:comment><comments>http://www.5432034.com/hello-yun/archive/2013/11/05/406028.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.5432034.com/hello-yun/comments/commentRss/406028.html</wfw:commentRss><trackback:ping>http://www.5432034.com/hello-yun/services/trackbacks/406028.html</trackback:ping><description><![CDATA[<p><strong>CSRF 鑳屾櫙涓?#28000;嬬粛</strong></p> <p>CSRF锛圕ross Site Request Forgery, 璺?#32468;欏煙璇锋眰浼?#38315;?#38171;夋槸?#31476;绉嶇?#25120;?#28357;殑鏀诲嚮鏂?#23534;?#38171;屽?#20904;湪 2007 骞存浘琚?#37714;?#28051;?#27996;?#38001;?#32515;?20 澶?#28729;?#37711;?#38341;愭偅涔嬩竴銆?#37711;?#28000;?#28729;?#37711;?#38341;愭偅锛?#23011;?#28641;?SQL 鑴?#37832;?#23049;?#37711;?#38171;?#29882;?#32468;欏煙鑴?#37832;?#37824;诲?#33636;瓑鍦?#26473;?#39582;存潵宸?#32513;?#38315;?#23059;?#28051;?#28028;?#27996;虹?#29114;煡锛屽緢澶?#32515;戠珯涔熼兘閽堝浠?#28000;?#26473;?#29723;?#27996;嗛槻寰?#37510;?#37906;惰?#38171;屽浜?#28598;?#28598;氭暟浜?#37833;?#29831;?#38171;孋SRF 鍗翠緷鐒?#37828;竴涓?#38340;?#37922;熺殑姒?#36423;?#37510;?#37719;?#28186;?#37828;?#28598;?#37722;嶉?#24232;紟?#27537; Gmail, 鍦?2007 骞?#25652;?#28052;?#28699;樺湪鐫 CSRF 婕忔礊锛?#28000;?#38000;?#29722;粦瀹?#37824;诲嚮鑰屼娇 Gmail ?#27537;?#25956;鎴?#38315;?#37812;愬法澶殑鎹?#28598;?#37510;?/p> <p><strong>CSRF 鏀诲?#35826;疄渚?/strong></p> <p>CSRF 鏀诲嚮鍙?#28000;?#37734;?#37721;?#28729;宠?#23011;?#28051;嶇煡?#20751;?#27537;?#20751;鍐?#28051;?#28000;?#37721;?#28729;宠呭?#23940;箟浼?#38315;?#29831;锋眰鍙?#38315;?#32513;?#37721;?#37824;诲?#33636;?#27409;偣锛?#28000;?#38000;屽湪骞?#37832;?#37818;?#37833;冪殑?#20751;鍐?#28051;?#37813;?#29723;屽湪鏉?#38340;愪繚鎶?#28052;?#28051;嬬殑鎿嶄綔銆傛瘮濡?#29831;?#38171;?#37721;?#28729;宠?Bob 鍦?#38334;惰鏈変竴绗?#28699;?#23046;?#38171;?#38315;氳繃瀵归?#24816;?#23680;殑缃戠珯鍙?#38315;?#29831;锋眰 http://bank.example/withdraw?account=bob&amount=1000000&for=bob2 鍙?#28000;?#28003;?Bob ?#22968; 1000000 ?#27537;瀛?#23046;?#26462;?#37714;?bob2 ?#27537;璐?#37721;?#28051;?#37510;?#38315;氬?#21578;儏鍐?#28051;?#38171;?#29831;?#29831;锋眰鍙?#38315;?#37714;扮?#25120;珯鍚?#38171;?#37832;嶅姟鍣?#28028;氬厛?#29529;璇?#29831;?#29831;锋?#20635;槸鍚?#37833;嚜?#31476;涓?#37722;堟硶?#27537; session锛?#39582;?#28051;?#29831;?session ?#27537;?#25956;鎴?Bob 宸?#32513;?#37812;?#37716;熺櫥闄?#37510;傞粦瀹?Mallory ?#22172;宸?#37734;?#29831;?#38334;惰?#23676;篃鏈夎处鎴?#38171;?#28000;栫煡閬笂鏂?#28051;殑 URL 鍙?#28000;妸閽?#26473;?#29723;?#26462;?#29999;?#37823;嶄綔銆侻allory 鍙?#28000;嚜宸?#37721;?#38315;佷竴涓?#29831;锋眰缁欓?#24816;锛歨ttp://bank.example/withdraw?account=bob&amount=1000000&for=Mallory銆?#28003;?#37828;繖涓?#29831;锋?#20635;潵?#22172; Mallory 鑰?#38344;?Bob锛?#28000;?#28051;嶈兘閫氳繃瀹?#37711;?#29825;?#29831;?#38171;屽?#29363;璇?#29831;锋眰涓?#28028;氳?#34562;綔?#25956;銆傝繖?#26882;锛孧allory ?#20802;鍒?#28003;跨敤 CSRF ?#27537;鏀诲嚮鏂?#23534;?#38171;?#28000;?#37711;堣嚜宸?#37707;氫竴涓?#32515;戠珯锛屽湪缃戠珯涓?#37824;?#37711;?#28641;?#28051;?#28000;?#37934;?#38171;?src=”http://bank.example/withdraw?account=bob&amount=1000000&for=Mallory ”锛?#39582;?#28051;?#38315;氳繃骞垮憡绛?#29831;?#28003;?Bob 鏉?#29825;?#38338;?#28000;栫殑缃戠珯銆傚綋 Bob 璁?#38338;?#29831;?#32515;戠?#27408;椂锛屼笂杩?url 灏?#28028;氫粠 Bob ?#27537;?#31099;瑙?#37731;?#37721;?#37722;戦?#24816;锛?#38000;岃繖涓?#29831;锋眰浼?#38340;勫甫 Bob ?#31099;瑙?#37731;?#28051;殑 cookie ?#31476;璧?#37721;?#37722;戦?#24816;鏈嶅姟鍣?#37510;?#28598;?#28598;氭暟?#20751;鍐?#28051;?#38171;?#29831;?#29831;锋眰浼?#28598;?#29840;?#38171;屽洜涓?#28000;?#29781;佹眰 Bob ?#27537;璁?#29831;佷俊?#20229;銆?#28003;?#37828;?#38171;屽?#20635;灉 Bob ?#32139;?#26882;鎭板阀鍒?#29825;?#38338;?#28000;栫殑閾惰鍚?#28051;嶄箙锛?#28000;栫殑?#31099;瑙?#37731;?#28051;庨?#24816;缃戠珯涔嬮棿?#27537; session 灏?#37832;繃鏈?#38171;屾祻瑙?#37731;殑 cookie 涔?#28051;?#37722;?#37832;?Bob ?#27537;璁?#29831;佷俊?#20229;銆傝繖?#26882;锛屾鍓?#37721;戠敓浜?#38171;岃繖涓?url 璇锋眰灏?#28028;氬緱鍒板?#23941;簲锛?#38333;?#28751;?#28000;?Bob ?#27537;璐?#37721;?#26462;?#32457;?#37714;?Mallory ?#27537;璐?#37721;?#38171;?#38000;?Bob ?#32139;?#26882;姣?#28051;嶇煡?#20751;銆傜瓑浠?#37722;?Bob 鍙戠?#25292;处鎴?#38333;?#28751;?#27996;?#38171;屽嵆浣?#28000;?#37720;婚?#24816;?#23678;煡璇?#37827;?#36423;?#38171;?#28000;?#28052;?#37721;兘鍙戠?#25198;瀹?#37832;変竴涓?#37833;嚜浜?#28000;?#37832;?#27996;虹殑鍚堟硶璇锋眰杞?#32457;?#27996;嗚祫閲?#38171;屾病鏈?#28000;讳綍琚?#37824;诲?#33636;殑鐥?#26473;?#37510;?#38000;?Mallory 鍒?#37721;?#28000;?#37815;?#37714;?#38333;?#37722;?#38315;?#38316;?#23049;?#28598;?#37510;?/p> <p><strong>CSRF 鏀诲?#33636;殑瀵硅薄</strong></p> <p>鍦?#29825;?#29825;哄?#20633;綍鎶?#23536;?CSRF 涔嬪墠锛屽厛瑕佹槑纭?CSRF 鏀诲?#33636;殑瀵硅薄锛屼篃灏?#37828;?#29781;佷繚鎶殑瀵硅薄銆?#28000;?#28000;笂?#27537;渚嬪瓙鍙?#37933;?#38171;孋SRF 鏀诲嚮鏄粦瀹?#37706;熷姪鍙?#28729;宠呯殑 cookie 楠?#37721;?#37832;嶅姟鍣殑淇?#28000;?#38171;屼絾鏄粦瀹?#39582;?#28051;嶈兘鎷?#37714;?cookie锛屼?#29114;湅涓嶅埌 cookie ?#27537;?#21812;瀹?#37510;?#37721;?#28598;?#38171;屽浜?#37832;嶅姟鍣?#26473;?#37733;炵殑缁?#37835;?#38171;?#37922;?#27996;庢祻瑙?#37731;?#37722;屾簮?#29925;?#26256;?#27537;闄?#37714;?#38171;岄粦瀹?#28052;?#37827;犳硶杩?#29723;?#29785;?#37835;?#37510;?#37733;犳锛岄粦瀹?#37827;犳硶浠?#26473;?#37733;炵殑缁?#37835;?#28051;緱鍒?#28000;讳綍涓滆锛?#28000;?#37813;?#20824;鍋氱殑灏?#37828;?#32513;?#37832;嶅姟鍣?#37721;?#38315;?#29831;锋眰锛?#28000;?#37813;?#29723;?#29831;锋眰涓?#37813;鎻忚?#25198;殑鍛?#28000;?#38171;屽湪鏈嶅姟鍣?#32468;?#37929;存帴鏀?#37721;樻暟鎹殑鍊?#38171;?#38000;?#38344;炵?#20904;彇鏈嶅姟鍣?#28051;殑?#26271;鎹?#37510;傛墍浠?#38171;?#37812;?#28000;?#29781;佷繚鎶殑瀵硅薄鏄?#38317;簺鍙?#28000;?#37929;存帴浜?#37922;熸暟鎹?#37824;?#37721;樼殑鏈嶅姟锛?#38000;屽浜?#29831;?#37721;栨暟鎹殑鏈嶅姟锛?#37714;?#28051;嶉渶瑕佽繘琛?CSRF ?#27537;淇?#37814;?#37510;傛瘮濡傞?#24816;绯荤粺涓?#26462;?#29840;殑璇锋眰浼氱?#23384;帴鏀?#37721;樿处鎴风殑閲?#26864;?#38171;屼細閬?#37714;?CSRF 鏀诲嚮锛岄渶瑕佷繚鎶?#37510;?#38000;屾煡璇?#28003;欓鏄?#28725;?#38322;?#26864;濈殑璇?#37721;?#37823;嶄綔锛?#28051;?#28028;?#37824;?#37721;樻暟鎹?#38171;孋SRF 鏀诲嚮鏃犳硶瑙?#37835;?#37832;嶅姟鍣?#26473;?#37733;炵殑缁?#37835;?#38171;?#37827;犻渶淇?#37814;?#37510;?/p> <p><strong>?#32139;鍓嶉槻寰?CSRF ?#27537;鍑?#32457;嶇瓥?#26256;</strong></p> <p>鍦?#28051;氱?#23680;洰鍓嶉槻寰?CSRF 鏀诲嚮涓?#29781;?#37832;?#28051;夌?#23943;瓥?#26256;锛氶獙璇?HTTP Referer 瀛?#23048;?#38171;?#37734;?#29831;锋眰鍦板潃涓?#23075;诲姞 token 骞堕獙璇?#38171;?#37734;?HTTP 澶?#28051;嚜瀹氫箟灞炴?#39582;堕獙璇?#37510;?#28051;?#38344;?#28751;卞垎鍒?#28725;硅繖涓夌?#23943;瓥?#26256;杩?#29723;?#29831;?#32513;?#28000;嬬粛銆?/p> <p><em><strong>?#29529;璇?HTTP Referer 瀛?#23048;?/strong></em></p> <p>鏍规嵁 HTTP 鍗?#29825;?#38171;屽湪 HTTP 澶?#28051;?#37832;変竴涓?#28699;?#23048;?#37721;?Referer锛屽畠璁板綍浜?#29831;?HTTP 璇锋眰?#27537;鏉簮鍦板潃銆?#37734;?#38315;氬?#21578;儏鍐?#28051;?#38171;?#29825;?#38338;竴涓?#28729;?#37711;?#37721;?#38340;愰闈殑璇锋?#20635;潵?#22172;浜?#37722;屼竴涓?#32515;戠珯锛?#23011;?#28641;傞渶瑕?#29825;?#38338;?http://bank.example/withdraw?account=bob&amount=1000000&for=Mallory锛岀敤鎴?#36423;呴鍏堢櫥闄?bank.example锛?#37906;跺悗閫氳繃?#20579;鍑?#26916;?#38344;笂?#27537;鎸夐挳鏉?#29785;?#37721;?#26462;?#29840;?#27996;?#28000;?#37510;傝繖?#26882;锛?#29831;?#26462;?#29999;?#29831;锋眰?#27537; Referer 鍊?#28751;?#28028;?#37828;?#26462;?#29840;?#37816;夐挳鎵鍦殑椤?#38344;殑 URL锛?#38315;氬父鏄?#28000;?bank.example ?#29017;鍚嶅紑澶寸殑鍦板潃銆?#38000;屽?#20635;?#28360;粦瀹?#29781;?#28725;归?#24816;缃戠?#27407;?#28852; CSRF 鏀诲嚮锛?#28000;?#37721;兘鍦?#28000;栬嚜宸辩殑缃戠珯鏋?#38315;?#29831;锋眰锛屽綋?#25956;鎴?#38315;氳繃?#31910;瀹殑缃戠珯鍙?#38315;?#29831;锋眰鍒伴?#24816;?#23678;椂锛?#29831;?#29831;锋眰?#27537; Referer 鏄?#37816;?#37722;戦粦瀹嚜宸辩殑缃戠珯銆?#37733;犳锛?#29781;?#38339;?#23536;?CSRF 鏀诲嚮锛岄?#24816;缃戠珯鍙渶瑕?#28725;?#27996;?#23011;忎竴涓?#26462;?#29840;?#29831;锋眰?#29529;璇?#37711;?Referer 鍊?#38171;屽?#20635;灉鏄?#28000;?bank.example 寮澶寸殑?#29017;鍚?#38171;?#37714;?#29831;存槑璇?#29831;锋?#20635;槸鏉嚜閾惰缃戠?#27410;嚜宸辩殑璇锋眰锛?#37828;?#37722;堟硶?#27537;銆傚?#20635;灉 Referer 鏄?#37711;?#28000;?#32515;戠?#27409;殑璇?#38171;?#37714;?#37832;?#37721;兘鏄粦瀹殑 CSRF 鏀诲嚮锛屾嫆缁?#29831;?#29831;锋眰銆?/p> <p>?#32342;绉嶆?#35268;硶?#27537;鏄?#38000;?#37828;?#29785;佺殑濂?#28598;勫氨鏄畝鍗?#37828;?#29723;?#38171;?#32515;戠?#27409;殑鏅?#38315;?#23534;鍙?#27996;哄憳涓嶉渶瑕佹搷蹇?CSRF ?#27537;婕忔礊锛?#37721;渶瑕?#37734;?#37832;鍚?#32513;?#37813;鏈?#28729;?#37711;?#37825;忔?#29114;殑璇锋眰缁熶竴澧?#37716;犱竴涓?#37815;?#37812;?#37731;?#37833;?#22955;鏌?Referer ?#27537;鍊?#28751;?#37721;?#28000;?#37510;?#37911;?#37714;?#37828;?#28725;?#27996;庡綋鍓嶇幇鏈夌殑绯荤粺锛?#28051;嶉渶瑕?#37824;?#37721;樺綋鍓嶇?#33636;粺?#27537;浠讳綍宸?#37832;?#28000;?#37934;佸拰閫?#26440;?#38171;屾病鏈夐闄?#38171;?#38344;炲?#38224;?#25358;嵎銆?/p> <p>鐒惰?#38171;岃繖绉嶆?#35268;硶骞堕潪涓?#37827;犱竴澶?#37510;俁eferer ?#27537;鍊?#37828;?#37922;辨祻瑙?#37731;?#37819;愪緵?#27537;锛岃?#30028;劧 HTTP 鍗?#29825;笂鏈夋槑纭殑瑕佹眰锛屼絾鏄?#23011;?#28051;祻瑙?#37731;?#28725;?#27996;?Referer ?#27537;鍏蜂綋瀹炵幇鍙兘鏈夊鍒?#38171;?#39582;?#28051;嶈兘淇?#29831;佹祻瑙?#37731;嚜韬病鏈?#28729;?#37711;?#23125;忔礊銆?#28003;跨敤?#29529;璇?Referer 鍊肩殑鏂规硶锛?#28751;?#37828;妸瀹?#37711;?#37804;兘渚濊禆浜?#32471;?#28051;夋柟锛堝嵆?#31099;瑙?#37731;?#38171;夋潵淇?#38341;?#38171;?#28000;?#37918;?#29825;轰笂鏉?#29825;?#38171;岃繖鏍?#39582;?#28051;嶅畨鍏?#37510;?#27996;嬪?#28848;笂锛屽浜?#37836;愪簺?#31099;瑙?#37731;?#38171;?#23011;?#28641;?IE6 鎴?FF2锛岀洰鍓嶅凡缁?#37832;変竴?#31802;鏂规硶鍙?#28000;?#32481;?#37824;?Referer 鍊?#37510;傚?#20635;灉 bank.example 缃戠珯鏀?#37816;?IE6 ?#31099;瑙?#37731;?#38171;岄粦瀹?#28729;屽叏鍙?#28000;妸?#25956;鎴锋祻瑙?#37731;殑 Referer 鍊?#29825;?#28051;?#28000;?bank.example ?#29017;鍚嶅紑澶寸殑鍦板潃锛岃繖鏍?#28751;?#37721;?#28000;?#38315;氳繃?#29529;璇?#38171;?#28000;?#38000;?#26473;?#29723;?CSRF 鏀诲嚮銆?/p> <p>鍗?#28186;?#37828;?#28003;跨敤鏈?#26570;?#27537;?#31099;瑙?#37731;?#38171;岄粦瀹?#37827;犳硶绡?#37824;?Referer 鍊?#38171;岃繖绉嶆?#35268;硶浠嶇劧鏈夐棶棰?#37510;?#37733;?#28051;?Referer 鍊?#28028;?#29825;板綍涓嬬敤鎴风殑璁?#38338;?#37833;簮锛?#37832;変簺?#25956;鎴?#29825;?#28051;鸿繖鏍蜂?#27691;?#30005;姱鍒?#28000;?#28000;嚜宸辩殑?#27555;绉?#37833;?#38171;岀壒鍒?#37828;?#37832;変簺缁勭?#22248;媴蹇?Referer 鍊?#28028;氭妸缁勭?#22247;唴缃?#28051;殑鏌愪簺淇伅娉?#38343;?#37714;?#28598;?#32515;?#28051;?#37510;?#37733;犳锛岀敤鎴疯嚜宸?#37721;?#28000;?#29825;剧疆?#31099;瑙?#37731;?#28003;垮?#36346;湪鍙?#38315;?#29831;锋?#20635;椂涓嶅?#23942;?#24874;緵 Referer銆傚綋浠?#28000;?#23005;父璁?#38338;?#38334;惰缃戠?#27408;椂锛?#32515;戠珯浼氬洜涓?#29831;锋?#20635;病鏈?Referer 鍊?#38000;?#29825;?#28051;?#37828;?CSRF 鏀诲嚮锛屾嫆缁濆?#22559;硶?#25956;鎴风殑璁?#38338;?#37510;?/p> <p><em><strong>鍦?#29831;锋眰鍦板潃涓?#23075;诲姞 token 骞堕獙璇?/strong></em></p> <p>CSRF 鏀诲嚮涔?#37813;浠兘澶?#37812;?#37716;?#38171;?#37828;?#37733;?#28051;洪粦瀹?#37721;?#28000;?#28729;屽叏浼?#38315;犵敤鎴风殑璇锋眰锛?#29831;?#29831;锋眰涓?#37813;鏈夌殑?#25956;鎴烽獙璇佷俊?#20229;?#20824;鏄?#28699;樺湪浜?cookie 涓?#38171;屽?#29363;?#31910;瀹?#37721;?#28000;?#37734;?#28051;嶇煡閬撹繖?#31802;?#29529;璇佷俊?#20229;?#27537;?#20751;鍐?#28051;嬬?#23384;帴鍒敤?#25956;鎴疯嚜宸辩殑 cookie 鏉?#38315;氳繃瀹?#37711;獙璇?#37510;?#29781;?#37814;?#23536;?CSRF锛屽叧閿?#37734;?#27996;?#37734;?#29831;锋眰涓?#37824;?#37711;粦瀹?#37813;涓嶈兘浼?#38315;犵殑淇伅锛?#39582;?#28051;?#29831;?#28103;伅涓嶅瓨鍦?#27996;?cookie 涔?#28051;?#37510;?#37721;?#28000;?#37734;?HTTP 璇锋眰涓?#28000;?#37721;傛暟?#27537;褰?#23534;?#37716;?#37711;竴涓?#38341;?#37832;?#27996;?#37922;熺殑 token锛?#39582;跺湪鏈嶅姟鍣?#32468;?#23524;?#32468;嬩竴涓?#37815;?#37812;?#37731;?#37833;獙璇佽繖涓?token锛屽?#20635;灉璇锋眰涓病鏈?token 鎴?#38000;?token ?#21812;瀹?#28051;嶆纭?#38171;?#37714;?#29825;?#28051;?#37721;兘鏄?CSRF 鏀诲嚮鑰屾嫆缁?#29831;?#29831;锋眰銆?/p> <p>?#32342;绉嶆?#35268;硶瑕?#23011;?#22955;鏌?Referer 瑕?#28729;?#37711;竴?#31802;锛宼oken 鍙?#28000;?#37734;敤鎴风櫥闄嗗悗浜?#37922;?#39582;?#37824;?#27996;?session 涔?#28051;?#38171;?#37906;跺悗鍦?#23011;忔璇锋?#20635;椂?#22968; token 浠?session 涓?#37815;垮嚭锛?#28051;?#29831;锋眰涓殑 token 杩?#29723;?#23011;?#28725;?#38171;屼?#21978;繖绉嶆?#35268;硶?#27537;闅剧偣鍦?#27996;庡?#20633;綍?#22968; token 浠?#37721;傛暟?#27537;褰?#23534;?#37716;?#37711;?#29831;锋眰銆?#28725;?#27996;?GET 璇锋眰锛宼oken 灏嗛?#21227;湪璇锋眰鍦板潃涔嬪悗锛岃繖鏍?URL 灏?#37721;?#37812;?http://url?csrftoken=tokenvalue銆?鑰屽浜?POST 璇锋?#20635;潵璇?#38171;?#29781;?#37734;?form ?#27537;鏈鍚?#37716;犱笂 <input type=”hidden” name=”csrftoken” value=”tokenvalue”/>锛岃繖鏍?#28751;辨妸 token 浠?#37721;傛暟?#27537;褰?#23534;?#37716;?#37711;?#29831;锋眰浜?#37510;?#28003;?#37828;?#38171;屽湪?#31476;涓?#32515;戠珯涓?#38171;?#37721;?#28000;?#37818;?#37721;?#29831;锋眰?#27537;鍦?#37826;?#38344;炲父澶?#38171;?#29781;?#28725;?#27996;?#23011;忎竴涓?#29831;锋眰?#20824;鍔犱笂 token 鏄緢楹荤儲?#27537;锛?#39582;?#28051;?#23536;堝鏄?#23125;忔锛?#38315;氬父浣跨敤?#27537;鏂规硶灏?#37828;?#37734;?#23011;忔椤?#38344;?#37716;?#26462;芥椂锛屼?#36328;敤 javascript 閬嶅巻鏁?#28051;?dom 鏍?#38171;屽浜?dom 涓?#37813;鏈夌殑 a ?#25328; form 鏍囩鍚?#37716;?#37711;?token銆傝繖鏍?#37721;?#28000;?#29785;?#37712;?#28598;?#38318;垎?#27537;璇锋眰锛屼絾鏄?#28725;?#27996;?#37734;?#26916;?#38344;?#37716;?#26462;?#28052;嬪悗?#23017;鎬?#37922;?#37812;愮殑 html 浠?#37934;?#38171;岃繖绉嶆?#35268;硶灏辨病鏈?#28003;滅敤锛?#26473;橀渶瑕佺?#23338;?#24531;?#27194;湪缂?#37934;佹椂鎵嬪姩娣诲姞 token銆?/p> <p>璇?#37826;规硶杩?#37832;変竴涓?#32514;虹偣鏄?#38341;?#28000;?#28103;?#29831;?token 鏈?#38892;殑瀹?#37711;?#37510;?#37911;?#37714;?#37828;?#37734;竴?#31802;璁哄潧涔?#32491;?#37824;?#37816;佺敤鎴疯嚜宸?#37721;?#29723;唴瀹圭殑缃戠珯锛岄粦瀹?#37721;?#28000;?#37734;笂闈?#37721;?#29999;冭嚜宸?#28051;?#27996;?#32515;戠?#27409;殑鍦板潃銆?#37922;?#27996;?#32495;荤?#29110;篃浼氬湪?#32342;涓?#37734;板潃鍚?#38344;?#37716;犱笂 token锛岄粦瀹?#37721;?#28000;?#37734;嚜宸辩殑缃戠?#27406;笂?#32241;鍒拌繖涓?token锛?#39582;堕?#31490;灏?#37721;?#28000;?#37721;戝姩 CSRF 鏀诲嚮銆?#28051;?#27996;嗛?#22446;厤?#32342;?#31476;?#20579;锛?#32495;荤粺鍙?#28000;?#37734;?#23075;诲姞 token ?#27537;鏃跺欏鍔犱竴涓?#37714;?#37826;?#38171;屽?#20635;?#28358;繖涓?#38334;?#37818;?#37828;?#38334;?#37714;拌嚜宸?#37832;?#32468;欑殑锛?#28751;?#37734;?#37722;?#38344;?#23075;诲姞 token锛屽?#20635;灉鏄?#38315;?#37722;?#28598;?#32515;?#37714;?#28051;嶅姞銆?#28051;嶈繃锛屽嵆浣胯繖涓?csrftoken 涓?#28000;?#37721;傛暟?#27537;褰?#23534;?#38340;勫姞鍦?#29831;锋眰涔?#28051;?#38171;岄粦瀹殑缃戠珯涔?#37722;?#37837;?#37721;?#28000;?#38315;氳繃 Referer 鏉緱鍒拌繖涓?token 鍊?#28000;?#37721;戝姩 CSRF 鏀诲嚮銆傝繖涔?#37828;竴?#31802;?#25956;鎴峰?#28356;鎵嬪姩鍏?#38338;祻瑙?#37731;?Referer 鍔熻兘?#27537;鍘熷洜銆?/p> <p><em><strong>鍦?HTTP 澶?#28051;嚜瀹氫箟灞炴?#39582;堕獙璇?/strong></em></p> <p>?#32342;绉嶆?#35268;硶涔?#37828;?#28003;跨敤 token 骞惰繘琛岄獙璇?#38171;屽?#23676;笂?#31476;绉嶆?#35268;硶涓嶅?#23680;殑鏄?#38171;岃繖閲?#39582;?#28051;嶆槸?#22968; token 浠?#37721;傛暟?#27537;褰?#23534;忕疆浜?HTTP 璇锋眰涔?#28051;?#38171;?#38000;?#37828;妸瀹?#37824;?#37714;?HTTP 澶?#28051;嚜瀹氫箟?#27537;灞炴?#38322;?#37510;?#38315;氳繃 XMLHttpRequest ?#32342;涓?#32491;?#38171;?#37721;?#28000;竴娆?#37804;?#32513;?#37813;鏈?#29831;?#32491;?#29831;锋眰鍔犱笂 csrftoken ?#32342;涓?HTTP 澶村?#28852;?#38171;?#39582;舵妸 token 鍊?#37824;?#37711;?#37711;?#28051;?#37510;傝繖鏍?#29785;?#37712;?#27996;嗕笂绉嶆?#35268;硶鍦?#29831;锋眰涓?#37716;?#37711;?token ?#27537;涓嶄究锛?#37722;屾椂锛?#38315;氳繃 XMLHttpRequest 璇锋眰?#27537;鍦板潃涓?#28028;?#29722;?#29825;板綍鍒版祻瑙?#37731;殑鍦板潃鏍?#38171;屼篃涓嶇敤鎷?#36423;?token 浼?#38315;忚繃 Referer 娉?#38343;?#37714;?#37711;?#28000;?#32515;戠珯涓?#37720;?#37510;?/p> <p>鐒惰岃繖绉嶆?#35268;硶?#27537;灞闄?#37804;?#38344;炲父澶?#37510;俋MLHttpRequest 璇锋眰閫氬父?#25956;浜?Ajax 鏂规硶涓?#28725;?#27996;?#26916;?#38344;?#28766;閮殑寮傛鍒锋柊锛?#39582;堕潪鎵鏈夌殑璇锋眰?#20824;閫?#37722;堢敤?#32342;涓?#32491;?#37833;?#37721;?#29863;?#38171;?#38000;?#28051;?#38315;?#26473;囪绫?#29831;锋眰?#32241;鍒扮殑椤?#38344;?#28051;嶈兘琚祻瑙?#37731;?#37813;璁板綍涓?#38171;?#28000;?#38000;?#26473;?#29723;屽?#23944;繘锛?#37722;?#38315;锛?#37714;锋柊锛?#37824;惰?#24533;?#22795;?#23940;綔锛?#32513;欑敤鎴峰甫鏉?#28051;嶄究銆?#37721;?#28598;?#38171;屽浜庢病鏈?#26473;?#29723;?CSRF 闃?#37814;殑閬?#37923;?#32495;荤粺鏉?#29831;?#38171;?#29781;?#38322;囩敤?#32342;绉嶆?#35268;硶鏉?#26473;?#29723;?#38339;?#37814;?#38171;?#29781;佹妸鎵鏈?#29831;锋眰?#20824;鏀?#28051;?XMLHttpRequest 璇锋眰锛岃繖鏍?#37713;?#28052;?#37828;?#29781;?#38322;嶅啓鏁?#28051;?#32515;戠珯锛岃繖浠?#28000;?#37827;犵鏄?#28051;嶈兘鎺?#37721;殑銆?/p> <p><strong>Java 浠?#37934;佺?#36720;緥</strong></p> <p>涓嬫枃灏?#28000;?Java 涓轰緥锛屽?#36891;笂杩?#28051;夌?#23942;?#35268;?#26334;垎鍒敤浠?#37934;佽繘琛岀?#36720;緥銆傛棤璁?#28003;跨敤?#32141;绉嶆?#35268;硶锛屽湪鏈嶅姟鍣?#32468;殑鎷?#37812;?#37731;?#36423;?#28051;?#37721;?#28751;?#38171;屽?#20904;皢璐?#29840;?#22955;鏌?#37714;版潵?#27537;璇锋?#20635;槸鍚?#32471;?#37722;?#29781;佹眰锛?#37906;跺悗瑙?#32513;?#37835;滆?#37712;?#28729;?#37828;?#37722;?#32513;?#32513;?#29831;锋眰鎴?#38000;?#28051;?#23534;?#37510;?#37734;?Java 涓?#38171;屾嫤鎴?#37731;?#37828;?#37922;?Filter 鏉?#28729;炵?#25198;殑銆?#37812;?#28000;?#37721;?#28000;?#32514;?#37712;欎竴涓?Filter锛?#39582;跺湪 web.xml 涓?#28725;?#37711;惰繘琛?#38320;嶇疆锛屼?#22446;?#36346;浜?#29825;?#38338;?#37813;鏈夐渶瑕?CSRF 淇?#37814;殑璧勬簮?#27537;璇锋眰杩?#29723;屾嫤鎴?#37510;?/p> <p>鍦?filter 涓?#28725;?#29831;锋眰?#27537; Referer ?#29529;璇?#28000;?#37934;佸涓?br /><em><strong>娓呭崟 1. 鍦?Filter 涓獙璇?Referer</strong></em></p> <div> <div id="highlighter_616709" class="syntaxhighlighter notranslate java ie "> <table border="0" cellspacing="0" cellpadding="0"> <tbody> <tr> <td class="gutter"> <div class="line number1 index0 alt2">1</div> <div class="line number2 index1 alt1">2</div> <div class="line number3 index2 alt2">3</div> <div class="line number4 index3 alt1">4</div> <div class="line number5 index4 alt2">5</div> <div class="line number6 index5 alt1">6</div> <div class="line number7 index6 alt2">7</div> <div class="line number8 index7 alt1">8</div></td> <td class="code"> <div class="container"> <div class="line number1 index0 alt2"><code class="java comments">// 浠?HTTP 澶?#28051;?#37721;栧緱 Referer 鍊?</code></div> <div class="line number2 index1 alt1"><code class="java spaces"> </code><code class="java plain">String referer=request.getHeader(</code><code class="java string">"Referer"</code><code class="java plain">);  </code></div> <div class="line number3 index2 alt2"><code class="java spaces"> </code><code class="java comments">// 鍒?#37826;?Referer 鏄?#37722;?#28000;?bank.example 寮澶?</code></div> <div class="line number4 index3 alt1"><code class="java spaces"> </code><code class="java keyword">if</code><code class="java plain">((referer!=</code><code class="java keyword">null</code><code class="java plain">) &&(referer.trim().startsWith(“bank.example”))){  </code></div> <div class="line number5 index4 alt2"><code class="java spaces">    </code><code class="java plain">chain.doFilter(request, response);  </code></div> <div class="line number6 index5 alt1"><code class="java spaces"> </code><code class="java plain">}</code><code class="java keyword">else</code><code class="java plain">{  </code></div> <div class="line number7 index6 alt2"><code class="java spaces">    </code><code class="java plain">request.getRequestDispatcher(“error.jsp”).forward(request,response);  </code></div> <div class="line number8 index7 alt1"><code class="java spaces"> </code><code class="java plain">}</code></div></div></td></tr></tbody></table></div></div> <p>浠笂浠?#37934;?#37711;?#37721;栧緱 Referer 鍊?#38171;?#37906;跺悗杩?#29723;?#37714;?#37826;?#38171;屽綋鍏堕潪绌?#39582;?#28000;?bank.example 寮澶存椂锛?#37714;?#32513;?#32513;?#29831;锋眰锛?#37722;?#37714;欑殑璇?#37721;兘鏄?CSRF 鏀诲嚮锛?#26462;?#37714;?error.jsp 椤?#38344;?#37510;?/p> <p>濡傛灉瑕佽繘?#31476;姝獙璇?#29831;锋眰涓殑 token 鍊?#38171;?#28000;?#37934;佸涓?/p> <div> <div id="highlighter_899998" class="syntaxhighlighter notranslate java ie"> <table border="0" cellspacing="0" cellpadding="0"> <tbody> <tr> <td class="gutter"> <div class="line number1 index0 alt2">1</div></td> <td class="code"> <div class="container"> <div class="line number1 index0 alt2"><code class="java plain"><em><strong>娓呭崟 </code><code class="java value">2</code><code class="java plain">. 鍦?filter 涓獙璇?#29831;锋眰涓殑</strong></em> token</code></div></div></td></tr></tbody></table></div></div> <div> <div id="highlighter_309527" class="syntaxhighlighter notranslate java ie"> <table border="0" cellspacing="0" cellpadding="0"> <tbody> <tr> <td class="gutter"> <div class="line number1 index0 alt2">1</div> <div class="line number2 index1 alt1">2</div> <div class="line number3 index2 alt2">3</div> <div class="line number4 index3 alt1">4</div> <div class="line number5 index4 alt2">5</div> <div class="line number6 index5 alt1">6</div> <div class="line number7 index6 alt2">7</div> <div class="line number8 index7 alt1">8</div> <div class="line number9 index8 alt2">9</div> <div class="line number10 index9 alt1">10</div> <div class="line number11 index10 alt2">11</div> <div class="line number12 index11 alt1">12</div> <div class="line number13 index12 alt2">13</div> <div class="line number14 index13 alt1">14</div> <div class="line number15 index14 alt2">15</div> <div class="line number16 index15 alt1">16</div> <div class="line number17 index16 alt2">17</div> <div class="line number18 index17 alt1">18</div> <div class="line number19 index18 alt2">19</div> <div class="line number20 index19 alt1">20</div> <div class="line number21 index20 alt2">21</div> <div class="line number22 index21 alt1">22</div> <div class="line number23 index22 alt2">23</div> <div class="line number24 index23 alt1">24</div> <div class="line number25 index24 alt2">25</div> <div class="line number26 index25 alt1">26</div></td> <td class="code"> <div class="container"> <div class="line number1 index0 alt2"><code class="java plain">HttpServletRequest req = (HttpServletRequest)request;  </code></div> <div class="line number2 index1 alt1"><code class="java spaces"> </code><code class="java plain">HttpSession s = req.getSession();  </code></div> <div class="line number3 index2 alt2"><code class="java spaces"> </code> </div> <div class="line number4 index3 alt1"><code class="java spaces"> </code><code class="java comments">// 浠?session 涓緱鍒?csrftoken 灞炴?</code></div> <div class="line number5 index4 alt2"><code class="java spaces"> </code><code class="java plain">String sToken = (String)s.getAttribute(“csrftoken”);  </code></div> <div class="line number6 index5 alt1"><code class="java spaces"> </code><code class="java keyword">if</code><code class="java plain">(sToken == </code><code class="java keyword">null</code><code class="java plain">){  </code></div> <div class="line number7 index6 alt2"><code class="java spaces"> </code> </div> <div class="line number8 index7 alt1"><code class="java spaces">    </code><code class="java comments">// 浜?#37922;熸柊?#27537; token 鏀?#37711;?session 涓?</code></div> <div class="line number9 index8 alt2"><code class="java spaces">    </code><code class="java plain">sToken = generateToken();  </code></div> <div class="line number10 index9 alt1"><code class="java spaces">    </code><code class="java plain">s.setAttribute(“csrftoken”,sToken);  </code></div> <div class="line number11 index10 alt2"><code class="java spaces">    </code><code class="java plain">chain.doFilter(request, response);  </code></div> <div class="line number12 index11 alt1"><code class="java spaces"> </code><code class="java plain">} </code><code class="java keyword">else</code><code class="java plain">{  </code></div> <div class="line number13 index12 alt2"><code class="java spaces"> </code> </div> <div class="line number14 index13 alt1"><code class="java spaces">    </code><code class="java comments">// 浠?HTTP 澶?#28051;?#37721;栧緱 csrftoken  </code></div> <div class="line number15 index14 alt2"><code class="java spaces">    </code><code class="java plain">String xhrToken = req.getHeader(“csrftoken”);  </code></div> <div class="line number16 index15 alt1"><code class="java spaces"> </code> </div> <div class="line number17 index16 alt2"><code class="java spaces">    </code><code class="java comments">// 浠?#29831;锋眰鍙傛暟涓?#37721;栧緱 csrftoken  </code></div> <div class="line number18 index17 alt1"><code class="java spaces">    </code><code class="java plain">String pToken = req.getParameter(“csrftoken”);  </code></div> <div class="line number19 index18 alt2"><code class="java spaces">    </code><code class="java keyword">if</code><code class="java plain">(sToken != </code><code class="java keyword">null</code> <code class="java plain">&& xhrToken != </code><code class="java keyword">null</code> <code class="java plain">&& sToken.equals(xhrToken)){  </code></div> <div class="line number20 index19 alt1"><code class="java spaces">        </code><code class="java plain">chain.doFilter(request, response);  </code></div> <div class="line number21 index20 alt2"><code class="java spaces">    </code><code class="java plain">}</code><code class="java keyword">else</code> <code class="java keyword">if</code><code class="java plain">(sToken != </code><code class="java keyword">null</code> <code class="java plain">&& pToken != </code><code class="java keyword">null</code> <code class="java plain">&& sToken.equals(pToken)){  </code></div> <div class="line number22 index21 alt1"><code class="java spaces">        </code><code class="java plain">chain.doFilter(request, response);  </code></div> <div class="line number23 index22 alt2"><code class="java spaces">    </code><code class="java plain">}</code><code class="java keyword">else</code><code class="java plain">{  </code></div> <div class="line number24 index23 alt1"><code class="java spaces">        </code><code class="java plain">request.getRequestDispatcher(“error.jsp”).forward(request,response);  </code></div> <div class="line number25 index24 alt2"><code class="java spaces">    </code><code class="java plain">}  </code></div> <div class="line number26 index25 alt1"><code class="java spaces"> </code><code class="java plain">}</code></div></div></td></tr></tbody></table></div></div> <p>棣?#37711;?#37714;?#37826;?session 涓?#37832;夋病鏈?csrftoken锛屽?#20635;?#28356;病鏈?#38171;?#37714;?#29825;?#28051;?#37828;?#32471;竴娆?#29825;?#38338;?#38171;session 鏄柊寤?#32468;嬬殑锛岃繖?#26882;鐢?#37812;愪竴涓柊?#27537; token锛?#37824;?#27996;?session 涔?#28051;?#38171;?#39582;?#32513;?#32513;?#37813;?#29723;?#29831;锋眰銆傚?#20635;灉 session 涓?#23480;?#32513;?#37832;?csrftoken锛?#37714;?#29831;存槑?#25956;鎴峰凡缁?#28051;?#37832;嶅姟鍣?#28052;嬮棿寤?#32468;?#27996;嗕竴涓?#23090;?#29882;冪殑 session锛岃繖?#26882;瑕佺?#23341;繖涓?#29831;锋眰涓?#37832;夋病鏈?#37722;屾椂闄勫甫?#32342;涓?token锛?#37922;?#27996;?#29831;锋眰鍙兘鏉嚜浜庡父瑙勭殑璁?#38338;?#37812;?#37828;?XMLHttpRequest 寮傛璁?#38338;?#38171;?#37812;?#28000;垎鍒?#28751;?#29831;?#28000;?#29831;锋眰涓?#38014;?#37721;?csrftoken 鍙傛暟浠?#37721;?#28000;?HTTP 澶?#28051;?#38014;?#37721;?csrftoken ?#22172;瀹氫箟灞炴?#39582;?#28051;?session 涓殑鍊?#26473;?#29723;?#23011;?#26440;?#38171;?#37721;?#29781;?#37832;変竴涓?#37734;?#37826;瑰甫鏈?#37832;?#37825;?token锛?#28751;?#37714;?#28729;?#29831;锋眰鍚堟硶锛?#37721;?#28000;?#32513;?#32513;?#37813;?#29723;?#38171;?#37722;?#37714;?#28751;?#26462;?#37714;伴敊璇?#26916;?#38344;?#37510;?#37922;?#37812;?token 鏈夊緢澶氱?#23942;?#35268;硶锛?#28000;讳綍?#27537;闅?#37832;虹娉曢兘鍙?#28000;?#28003;跨敤锛孞ava ?#27537; UUID 绫?#28052;?#37828;竴涓?#28051;嶉敊?#27537;閫夋嫨銆?/p> <p>?#27342;浜嗗湪鏈嶅姟鍣?#32468;?#37714;敤 filter 鏉獙璇?token ?#27537;鍊?#28000;?#28598;?#38171;?#37812;?#28000;?#26473;橀渶瑕?#37734;?#28729;?#37812;?#32468;?#32513;?#23011;?#28051;?#29831;锋眰闄勫?#29361;笂?#32342;涓?token锛岃繖鏄?#37714;敤 js 鏉?#32513;?html 涓殑閾?#37818;拰琛?#37719;?#29831;锋眰鍦板潃闄勫姞 csrftoken 浠?#37934;?#38171;屽叾涓?#23480;?#28729;氫箟 token 涓?#37711;?#28766;鍙?#38322;?#38171;屽?#36346;?#37721;?#28000;?#28000;?session 涓緱鍒?#37510;?/p> <div> <div id="highlighter_42521" class="syntaxhighlighter notranslate java ie"> <table border="0" cellspacing="0" cellpadding="0"> <tbody> <tr> <td class="gutter"> <div class="line number1 index0 alt2">1</div></td> <td class="code"> <div class="container"> <div class="line number1 index0 alt2"><code class="java plain"><em><strong>娓呭崟 </code><code class="java value">3</code><code class="java plain">. 鍦?#28729;?#37812;?#32468;?#28725;?#27996;?#29831;锋眰闄勫姞</strong> </em>token</code></div></div></td></tr></tbody></table></div></div> <div> <div id="highlighter_372784" class="syntaxhighlighter notranslate java ie"> <table border="0" cellspacing="0" cellpadding="0"> <tbody> <tr> <td class="gutter"> <div class="line number1 index0 alt2">1</div> <div class="line number2 index1 alt1">2</div> <div class="line number3 index2 alt2">3</div> <div class="line number4 index3 alt1">4</div> <div class="line number5 index4 alt2">5</div> <div class="line number6 index5 alt1">6</div> <div class="line number7 index6 alt2">7</div> <div class="line number8 index7 alt1">8</div> <div class="line number9 index8 alt2">9</div> <div class="line number10 index9 alt1">10</div> <div class="line number11 index10 alt2">11</div> <div class="line number12 index11 alt1">12</div> <div class="line number13 index12 alt2">13</div> <div class="line number14 index13 alt1">14</div> <div class="line number15 index14 alt2">15</div> <div class="line number16 index15 alt1">16</div> <div class="line number17 index16 alt2">17</div> <div class="line number18 index17 alt1">18</div> <div class="line number19 index18 alt2">19</div> <div class="line number20 index19 alt1">20</div> <div class="line number21 index20 alt2">21</div> <div class="line number22 index21 alt1">22</div> <div class="line number23 index22 alt2">23</div> <div class="line number24 index23 alt1">24</div> <div class="line number25 index24 alt2">25</div> <div class="line number26 index25 alt1">26</div> <div class="line number27 index26 alt2">27</div> <div class="line number28 index27 alt1">28</div> <div class="line number29 index28 alt2">29</div> <div class="line number30 index29 alt1">30</div> <div class="line number31 index30 alt2">31</div> <div class="line number32 index31 alt1">32</div> <div class="line number33 index32 alt2">33</div> <div class="line number34 index33 alt1">34</div> <div class="line number35 index34 alt2">35</div> <div class="line number36 index35 alt1">36</div> <div class="line number37 index36 alt2">37</div> <div class="line number38 index37 alt1">38</div> <div class="line number39 index38 alt2">39</div> <div class="line number40 index39 alt1">40</div> <div class="line number41 index40 alt2">41</div> <div class="line number42 index41 alt1">42</div> <div class="line number43 index42 alt2">43</div> <div class="line number44 index43 alt1">44</div> <div class="line number45 index44 alt2">45</div> <div class="line number46 index45 alt1">46</div> <div class="line number47 index46 alt2">47</div> <div class="line number48 index47 alt1">48</div> <div class="line number49 index48 alt2">49</div> <div class="line number50 index49 alt1">50</div> <div class="line number51 index50 alt2">51</div> <div class="line number52 index51 alt1">52</div> <div class="line number53 index52 alt2">53</div> <div class="line number54 index53 alt1">54</div> <div class="line number55 index54 alt2">55</div> <div class="line number56 index55 alt1">56</div> <div class="line number57 index56 alt2">57</div> <div class="line number58 index57 alt1">58</div> <div class="line number59 index58 alt2">59</div> <div class="line number60 index59 alt1">60</div> <div class="line number61 index60 alt2">61</div> <div class="line number62 index61 alt1">62</div></td> <td class="code"> <div class="container"> <div class="line number1 index0 alt2"><code class="java plain">function appendToken(){  </code></div> <div class="line number2 index1 alt1"><code class="java spaces">    </code><code class="java plain">updateForms();  </code></div> <div class="line number3 index2 alt2"><code class="java spaces">    </code><code class="java plain">updateTags();  </code></div> <div class="line number4 index3 alt1"><code class="java spaces"> </code><code class="java plain">}  </code></div> <div class="line number5 index4 alt2"><code class="java spaces"> </code> </div> <div class="line number6 index5 alt1"><code class="java spaces"> </code><code class="java plain">function updateForms() {  </code></div> <div class="line number7 index6 alt2"><code class="java spaces">    </code><code class="java comments">// ?#32241;鍒?#26916;?#38344;?#28051;?#37813;鏈夌殑 form 鍏冪礌 </code></div> <div class="line number8 index7 alt1"><code class="java spaces">    </code><code class="java plain">var forms = document.getElementsByTagName(</code><code class="java string">'form'</code><code class="java plain">);  </code></div> <div class="line number9 index8 alt2"><code class="java spaces">    </code><code class="java keyword">for</code><code class="java plain">(i=</code><code class="java value">0</code><code class="java plain">; i<forms.length; i++) {  </code></div> <div class="line number10 index9 alt1"><code class="java spaces">        </code><code class="java plain">var url = forms[i].action;  </code></div> <div class="line number11 index10 alt2"><code class="java spaces"> </code> </div> <div class="line number12 index11 alt1"><code class="java spaces">        </code><code class="java comments">// 濡傛?#28358;繖涓?form ?#27537; action 鍊?#28051;虹锛?#37714;?#28051;?#38340;勫姞 csrftoken  </code></div> <div class="line number13 index12 alt2"><code class="java spaces">        </code><code class="java keyword">if</code><code class="java plain">(url == </code><code class="java keyword">null</code> <code class="java plain">|| url == </code><code class="java string">""</code> <code class="java plain">) </code><code class="java keyword">continue</code><code class="java plain">;  </code></div> <div class="line number14 index13 alt1"><code class="java spaces"> </code> </div> <div class="line number15 index14 alt2"><code class="java spaces">        </code><code class="java comments">// ?#23017;鎬?#37922;?#37812;?input 鍏冪礌锛屽姞鍏?#37714;?form 涔嬪悗 </code></div> <div class="line number16 index15 alt1"><code class="java spaces">        </code><code class="java plain">var e = document.createElement(</code><code class="java string">"input"</code><code class="java plain">);  </code></div> <div class="line number17 index16 alt2"><code class="java spaces">        </code><code class="java plain">e.name = </code><code class="java string">"csrftoken"</code><code class="java plain">;  </code></div> <div class="line number18 index17 alt1"><code class="java spaces">        </code><code class="java plain">e.value = token;  </code></div> <div class="line number19 index18 alt2"><code class="java spaces">        </code><code class="java plain">e.type=</code><code class="java string">"hidden"</code><code class="java plain">;  </code></div> <div class="line number20 index19 alt1"><code class="java spaces">        </code><code class="java plain">forms[i].appendChild(e);  </code></div> <div class="line number21 index20 alt2"><code class="java spaces">    </code><code class="java plain">}  </code></div> <div class="line number22 index21 alt1"><code class="java spaces"> </code><code class="java plain">}  </code></div> <div class="line number23 index22 alt2"><code class="java spaces"> </code> </div> <div class="line number24 index23 alt1"><code class="java spaces"> </code><code class="java plain">function updateTags() {  </code></div> <div class="line number25 index24 alt2"><code class="java spaces">    </code><code class="java plain">var all = document.getElementsByTagName(</code><code class="java string">'a'</code><code class="java plain">);  </code></div> <div class="line number26 index25 alt1"><code class="java spaces">    </code><code class="java plain">var len = all.length;  </code></div> <div class="line number27 index26 alt2"><code class="java spaces"> </code> </div> <div class="line number28 index27 alt1"><code class="java spaces">    </code><code class="java comments">// 閬嶅巻鎵鏈?a 鍏冪礌 </code></div> <div class="line number29 index28 alt2"><code class="java spaces">    </code><code class="java keyword">for</code><code class="java plain">(var i=</code><code class="java value">0</code><code class="java plain">; i<len; i++) {  </code></div> <div class="line number30 index29 alt1"><code class="java spaces">        </code><code class="java plain">var e = all[i];  </code></div> <div class="line number31 index30 alt2"><code class="java spaces">        </code><code class="java plain">updateTag(e, </code><code class="java string">'href'</code><code class="java plain">, token);  </code></div> <div class="line number32 index31 alt1"><code class="java spaces">    </code><code class="java plain">}  </code></div> <div class="line number33 index32 alt2"><code class="java spaces"> </code><code class="java plain">}  </code></div> <div class="line number34 index33 alt1"><code class="java spaces"> </code> </div> <div class="line number35 index34 alt2"><code class="java spaces"> </code><code class="java plain">function updateTag(element, attr, token) {  </code></div> <div class="line number36 index35 alt1"><code class="java spaces">    </code><code class="java plain">var location = element.getAttribute(attr);  </code></div> <div class="line number37 index36 alt2"><code class="java spaces">    </code><code class="java keyword">if</code><code class="java plain">(location != </code><code class="java keyword">null</code> <code class="java plain">&& location != </code><code class="java string">''</code> <code class="java string">''</code> <code class="java plain">) {  </code></div> <div class="line number38 index37 alt1"><code class="java spaces">        </code><code class="java plain">var fragmentIndex = location.indexOf(</code><code class="java string">'#'</code><code class="java plain">);  </code></div> <div class="line number39 index38 alt2"><code class="java spaces">        </code><code class="java plain">var fragment = </code><code class="java keyword">null</code><code class="java plain">;  </code></div> <div class="line number40 index39 alt1"><code class="java spaces">        </code><code class="java keyword">if</code><code class="java plain">(fragmentIndex != -</code><code class="java value">1</code><code class="java plain">){  </code></div> <div class="line number41 index40 alt2"><code class="java spaces"> </code> </div> <div class="line number42 index41 alt1"><code class="java spaces">            </code><code class="java comments">//url 涓?#37722;?#37832;?#37721;?#37929;稿綋椤电殑閿?#37837;?#29825;?</code></div> <div class="line number43 index42 alt2"><code class="java spaces">            </code><code class="java plain">fragment = location.substring(fragmentIndex);  </code></div> <div class="line number44 index43 alt1"><code class="java spaces">            </code><code class="java plain">location = location.substring(</code><code class="java value">0</code><code class="java plain">,fragmentIndex);  </code></div> <div class="line number45 index44 alt2"><code class="java spaces">        </code><code class="java plain">}  </code></div> <div class="line number46 index45 alt1"><code class="java spaces"> </code> </div> <div class="line number47 index46 alt2"><code class="java spaces">        </code><code class="java plain">var index = location.indexOf(</code><code class="java string">'?'</code><code class="java plain">);  </code></div> <div class="line number48 index47 alt1"><code class="java spaces"> </code> </div> <div class="line number49 index48 alt2"><code class="java spaces">        </code><code class="java keyword">if</code><code class="java plain">(index != -</code><code class="java value">1</code><code class="java plain">) {  </code></div> <div class="line number50 index49 alt1"><code class="java spaces">            </code><code class="java comments">//url 涓?#23480;?#37722;?#37832;?#37711;?#28000;?#37721;傛暟 </code></div> <div class="line number51 index50 alt2"><code class="java spaces">            </code><code class="java plain">location = location + </code><code class="java string">'&csrftoken='</code> <code class="java plain">+ token;  </code></div> <div class="line number52 index51 alt1"><code class="java spaces">        </code><code class="java plain">} </code><code class="java keyword">else</code> <code class="java plain">{  </code></div> <div class="line number53 index52 alt2"><code class="java spaces">            </code><code class="java comments">//url 涓病鏈?#37711;?#28000;?#37721;傛暟 </code></div> <div class="line number54 index53 alt1"><code class="java spaces">            </code><code class="java plain">location = location + </code><code class="java string">'?csrftoken='</code> <code class="java plain">+ token;  </code></div> <div class="line number55 index54 alt2"><code class="java spaces">        </code><code class="java plain">}  </code></div> <div class="line number56 index55 alt1"><code class="java spaces">        </code><code class="java keyword">if</code><code class="java plain">(fragment != </code><code class="java keyword">null</code><code class="java plain">){  </code></div> <div class="line number57 index56 alt2"><code class="java spaces">            </code><code class="java plain">location += fragment;  </code></div> <div class="line number58 index57 alt1"><code class="java spaces">        </code><code class="java plain">}  </code></div> <div class="line number59 index58 alt2"><code class="java spaces"> </code> </div> <div class="line number60 index59 alt1"><code class="java spaces">        </code><code class="java plain">element.setAttribute(attr, location);  </code></div> <div class="line number61 index60 alt2"><code class="java spaces">    </code><code class="java plain">}  </code></div> <div class="line number62 index61 alt1"><code class="java spaces"> </code><code class="java plain">}</code></div></div></td></tr></tbody></table></div></div> <p>鍦?#28729;?#37812;?#32468;?html 涓?#38171;?#28051;?#29781;?#37828;?#37832;?#28051;?#28051;?#37734;?#37826;归渶瑕?#37716;犱笂 token锛屼竴涓?#37828;?#29723;?#37719;?form锛?#37721;竴涓?#28751;?#37828;?#38334;?#37818;?a銆傝繖娈?#28000;?#37934;侀鍏?#38316;嶅巻鎵鏈夌殑 form锛屽湪 form 鏈鍚庢?#35826;?#29361;竴闅愯棌瀛?#23048;?#38171;屾妸 csrftoken 鏀?#37711;?#37711;?#28051;?#37510;?#37906;跺悗锛?#28000;?#37934;?#38316;嶅巻鎵鏈夌殑閾?#37818;?#37837;?#29825;?a锛屽湪鍏?href 灞炴?#28051;?#37716;?#37711;?csrftoken 鍙傛暟銆傛敞鎰?#28725;?#27996;?a.href 鏉?#29831;?#38171;?#37721;兘璇?#28766;炴?#23480;?#32513;?#37832;?#37721;傛暟锛?#37812;?#38000;?#37832;夐敋鏍?#29825;?#37510;?#37733;犳?#28214;瑕佸垎?#20751;鍐?#29825;?#29825;?#38171;?#28000;?#28051;嶅?#23680;殑鏍?#23534;忔妸 csrftoken 鍔?#37711;?#37711;?#28051;?#37510;?/p> <p>濡傛灉浣犵殑缃戠珯浣跨敤 XMLHttpRequest锛?#38317;?#28052;?#26473;橀渶瑕?#37734;?HTTP 澶?#28051;嚜瀹氫箟 csrftoken 灞炴?#38171;?#37714;敤 dojo.xhr 缁?XMLHttpRequest 鍔犱笂?#22172;瀹氫箟灞炴?#28000;?#37934;佸涓?#38171;?/p> <div> <div id="highlighter_72509" class="syntaxhighlighter notranslate java ie"> <table border="0" cellspacing="0" cellpadding="0"> <tbody> <tr> <td class="gutter"> <div class="line number1 index0 alt2">1</div></td> <td class="code"> <div class="container"> <div class="line number1 index0 alt2"><code class="java plain"><strong><em>娓呭崟 </code><code class="java value">4</code><code class="java plain">. 鍦?HTTP 澶?#28051;嚜瀹氫箟灞炴?lt;/em></strong></code></div></div></td></tr></tbody></table></div></div> <div> <div id="highlighter_87778" class="syntaxhighlighter notranslate java ie"> <table border="0" cellspacing="0" cellpadding="0"> <tbody> <tr> <td class="gutter"> <div class="line number1 index0 alt2">1</div> <div class="line number2 index1 alt1">2</div> <div class="line number3 index2 alt2">3</div> <div class="line number4 index3 alt1">4</div> <div class="line number5 index4 alt2">5</div> <div class="line number6 index5 alt1">6</div> <div class="line number7 index6 alt2">7</div> <div class="line number8 index7 alt1">8</div> <div class="line number9 index8 alt2">9</div> <div class="line number10 index9 alt1">10</div> <div class="line number11 index10 alt2">11</div> <div class="line number12 index11 alt1">12</div> <div class="line number13 index12 alt2">13</div> <div class="line number14 index13 alt1">14</div> <div class="line number15 index14 alt2">15</div></td> <td class="code"> <div class="container"> <div class="line number1 index0 alt2"><code class="java spaces">                </code> </div> <div class="line number2 index1 alt1"><code class="java plain">var plainXhr = dojo.xhr;  </code></div> <div class="line number3 index2 alt2"> </div> <div class="line number4 index3 alt1"><code class="java comments">// 閲嶅啓 dojo.xhr 鏂规硶 </code></div> <div class="line number5 index4 alt2"><code class="java plain">dojo.xhr = function(method,args,hasBody) {  </code></div> <div class="line number6 index5 alt1"><code class="java spaces">   </code><code class="java comments">// 纭?#28103;?header 瀵硅薄瀛樺湪 </code></div> <div class="line number7 index6 alt2"><code class="java spaces">   </code><code class="java plain">args.headers = args.header || {};  </code></div> <div class="line number8 index7 alt1"> </div> <div class="line number9 index8 alt2"><code class="java spaces">   </code><code class="java plain">tokenValue = </code><code class="java string">'<%=request.getSession(false).getAttribute("csrftoken")%>'</code><code class="java plain">;  </code></div> <div class="line number10 index9 alt1"><code class="java spaces">   </code><code class="java plain">var token = dojo.getObject(</code><code class="java string">"tokenValue"</code><code class="java plain">);  </code></div> <div class="line number11 index10 alt2"> </div> <div class="line number12 index11 alt1"><code class="java spaces">   </code><code class="java comments">// ?#22968; csrftoken 灞炴?#37824;?#37714;?#28598;?#28051;?</code></div> <div class="line number13 index12 alt2"><code class="java spaces">   </code><code class="java plain">args.headers[</code><code class="java string">"csrftoken"</code><code class="java plain">] = (token) ? token : </code><code class="java string">"  "</code><code class="java plain">;  </code></div> <div class="line number14 index13 alt1"><code class="java spaces">   </code><code class="java keyword">return</code> <code class="java plain">plainXhr(method,args,hasBody);  </code></div> <div class="line number15 index14 alt2"><code class="java plain">};</code></div></div></td></tr></tbody></table></div></div> <p>?#32342;閲?#37824;?#37712;?#27996;?dojo.xhr ?#27537;鏂规硶锛岄鍏堢淇?dojo.xhr 涓?#28699;樺湪 HTTP 澶?#38171;?#37906;跺悗鍦?args.headers 涓?#23075;诲姞 csrftoken 瀛?#23048;?#38171;?#39582;舵妸 token 鍊?#28000;?session 閲屾?#22446;嚭鏀?#37711;?#28699;?#23048;?#28051;?#37510;?/p> <p><strong>CSRF 闃?#23536;?#37826;规硶閫夋嫨涔?#38316;?/strong></p> <p>閫氳繃?#31490;鏂?#29825;?#29825;?#37721;?#37933;?#38171;岀洰鍓?#28051;氱?#23677;簲瀵?CSRF 鏀诲嚮鏈変竴?#31802;鍏嬪埗鏂规硶锛屼絾鏄?#23011;?#32457;嶆?#35268;硶?#20824;鏈?#37714;?#23534;?#38171;屾病鏈変竴绉嶆?#35268;硶鏄畬缇庣殑銆傚?#20633;綍閫夋嫨鍚?#38315;傜殑鏂规硶闈炲父閲嶈銆傚?#20635;灉缃戠珯鏄竴涓幇鏈?#32495;荤粺锛?#37807;宠鍦?#37832;?#29037;?#26882;?#26879;?#21812;鑾峰緱?#31476;瀹氱?#23338;害?#27537; CSRF ?#27537;淇?#37814;?#38171;?#38317;?#28052;堥獙璇?Referer ?#27537;鏂规硶鏄?#37832;鏂?#28186;跨殑锛?#29781;佹兂澧?#37716;?#28729;?#37711;?#37804;殑璇?#38171;?#37721;?#28000;?#38315;夋嫨涓?#37824;?#37816;佷綆鐗?#37832;祻瑙?#37731;?#38171;?#23011;?#32468;?#28751;?#37929;?#37715;嶆潵璇?#38171;IE7+, FF3+ ?#32342;绫?#26946;樼増鏈祻瑙?#37731;殑 Referer 鍊?#26473;?#37827;犳硶琚?#32481;?#37824;?#37510;?/p> <p>濡傛灉绯荤粺蹇呴鏀?#37816;?IE6锛?#39582;?#28051;?#28000;嶇?#22549;渶瑕?#26946;樺畨鍏?#37804;?#37510;?#38317;?#28052;?#28751;?#29781;佷?#36328;敤 token 鏉?#26473;?#29723;岄獙璇?#38171;屽湪澶?#38318;垎?#20751;鍐?#28051;?#38171;屼?#36328;敤 XmlHttpRequest 骞?#28051;嶅悎閫?#38171;宼oken 鍙兘浠?#37721;傛暟?#27537;褰?#23534;?#37824;?#27996;?#29831;锋眰涔?#28051;?#38171;岃嫢浣犵殑绯荤粺涓?#37824;?#37816;佺敤鎴疯嚜宸?#37721;?#29999;?#28103;伅锛?#38317;繖绉嶇?#23338;害?#27537;闃?#37814;?#23480;?#32513;忚澶?#38171;?#37722;?#37714;欑殑璇?#38171;屼綘浠嶇?#22549;毦浠?#38339;茶寖 token 琚粦瀹?#32464;冨彇骞跺彂?#23017;鏀诲嚮銆?#37734;繖绉嶆儏鍐?#28051;?#38171;屼綘?#28214;瑕?#28751;?#36423;?#29785;?#37714;?#28003;?#32515;戠?#27408;?#24874;緵?#27537;鍚勭鏈嶅姟锛?#28000;?#28051;棿鎵惧嚭閭簺?#21393;璁哥敤鎴疯嚜宸?#37721;?#29999;?#28103;伅?#27537;閮垎锛屾妸瀹?#28000;?#28051;?#37711;?#28000;?#37832;嶅姟?#22414;寮锛屼?#36328;敤涓嶅?#23680;殑 token 杩?#29723;屼繚鎶?#38171;岃繖鏍?#37721;?#28000;?#37832;?#37825;?#37814;?#23536;粦瀹?#28725;?#27996;?#28003;?#37711;?#38335;?#37832;嶅姟?#27537;鏀诲嚮锛屾妸鍗?#28729;?#38340;嶅埌鏈?#32134;銆傛瘯绔?#38171;?#37714;犻櫎鍒?#27996;轰竴涓?#29999;?#28699;?#23011;旂?#23384;帴浠?#37714;?#27996;鸿处鍙?#28051;?#26462;?#29863;?#28598;?#32471;?#28699;?#23046;?#28051;?#38322;嶇?#23338;害瑕?#26462;荤殑澶?#37510;?/p> <p>濡傛灉鏄?#23534;鍙戜竴涓?#37711;柊?#27537;绯荤粺锛?#37714;?#37814;?#23536;?CSRF ?#27537;閫夋嫨瑕?#28598;緱澶?#37510;?#32471;旇呭缓璁?#28725;?#27996;?#38322;嶈?#20346;殑鏈嶅姟锛?#37721;?#28000;?#28751;?#38322;忎?#36328;敤 XMLHttpRequest 鏉?#29825;?#38338;?#38171;岃繖鏍峰鍔?token 瑕?#28729;?#37828;撳緢澶?#37510;?#37721;?#28598;?#28751;?#38322;?#38316;垮?#23941;湪 js 浠?#37934;?#28051;?#28003;跨敤澶嶆閫?#26440;?#37833;?#37835;?#38315;犲父瑙勭殑鍚屾璇锋?#20635;潵璁?#38338;渶瑕?CSRF 淇?#37814;殑璧勬簮锛?#23011;?#28641;?window.location ?#25328; document.createElement(“a”) 涔?#32491;?#38171;岃繖鏍蜂篃鍙?#28000;噺灏?#37734;?#38340;勫姞 token ?#26882;浜?#37922;熺殑涓?#36423;?#29781;佺殑楹荤儲銆?/p> <p>鏈鍚?#38171;?#29781;?#29825;?#28003;?CSRF 涓嶆槸?#31910;瀹敮?#31476;?#27537;鏀诲嚮鎵嬫锛?#37827;?#29825;?#28003;?CSRF 闃茶寖鏈?#28598;氫箞涓?#28725;?#38171;屽?#20635;灉浣?#32495;荤粺鏈?#37711;?#28000;?#28729;?#37711;?#23125;忔礊锛?#23011;?#28641;?#29882;?#32468;欏煙鑴?#37832;?#37824;诲嚮 XSS锛?#38317;?#28052;堥粦瀹?#28751;?#37721;?#28000;?#32513;曡繃浣犵殑瀹?#37711;?#38339;?#37814;?#38171;屽睍寮鍖呮嫭 CSRF 鍦唴?#27537;鍚勭鏀诲嚮锛屼綘?#27537;闃?#32510;垮?#21975;鍚岃櫄璁?#37510;?/p> <p><strong>鎬荤粨涓庡睍鏈?/strong></p> <p>鍙?#29785;?#38171;孋SRF 鏄竴绉嶅嵄瀹?#38344;炲父澶殑鏀诲嚮锛?#37721;堝緢闅?#28000;?#38339;茶寖銆傜洰鍓嶅嚑绉嶉槻寰瓥?#26256;铏界?#36346;彲浠緢澶?#32459;嬪害?#31490;鎶?#23536;?CSRF ?#27537;鏀诲嚮锛屼?#21975;苟?#30149;鏈変竴绉嶅畬缇庣殑瑙?#37712;?#37826;规銆備竴?#31802;?#26570;?#27537;鏂规姝?#37734;?#37934;?#32460;?#28052;?#28051;?#38171;?#23011;?#28641;?#28725;?#27996;?#23011;忔璇锋眰?#20824;浣跨敤涓嶅?#23680;殑?#23017;鎬?#37721;?#28000;?#38171;屾妸 Referer ?#25328; token 鏂规缁?#37722;堣?#38155;潵锛?#37922;?#38007;?#28751;?#29831;?#28103;?#37824;?HTTP 瑙勮寖锛屼絾鏄繖?#31802;?#26570;?#27537;鏂规灏氫笉鎴愮啛锛?#29781;?#23005;?#23534;忔姇鍏?#28003;跨敤骞惰涓氱骞?#28051;?#37818;?#37721;?#26473;橀渶?#26882;鏃?#37510;?#37734;繖涔嬪墠锛?#37812;?#28000;?#37721;?#37832;?#37711;呭垎閲?#29785;?CSRF锛?#37837;规嵁绯荤粺?#27537;瀹?#38340;呮儏鍐?#38315;夋嫨鏈鍚?#38315;傜殑?#29925;?#26256;锛岃繖鏍?#37813;嶈兘?#22968; CSRF ?#27537;鍗?#28729;?#38340;嶅埌鏈?#32134;銆?/p><img src ="http://www.5432034.com/hello-yun/aggbug/406028.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.5432034.com/hello-yun/" target="_blank">浜?#27996;?/a> 2013-11-05 20:53 <a href="http://www.5432034.com/hello-yun/archive/2013/11/05/406028.html#Feedback" target="_blank" style="text-decoration:none;">鍙?#29723;?#29831;?#29825;?/a></div>]]></description></item></channel></rss> <a href="http://www.5432034.com/"><span class="STYLE1">11ѡ5ʱʱ</span></a> <div style="position:fixed;left:-9000px;top:-9000px;"><span id="ghavm"></span><font id="ghavm"><menu id="ghavm"><mark id="ghavm"><samp id="ghavm"></samp></mark></menu></font><object id="ghavm"></object><output id="ghavm"><s id="ghavm"><ol id="ghavm"></ol></s></output><rp id="ghavm"></rp><u id="ghavm"><span id="ghavm"><progress id="ghavm"><mark id="ghavm"></mark></progress></span></u><div id="ghavm"></div><option id="ghavm"></option><wbr id="ghavm"></wbr><sub id="ghavm"></sub><rp id="ghavm"></rp><li id="ghavm"><table id="ghavm"><menu id="ghavm"><sup id="ghavm"></sup></menu></table></li><samp id="ghavm"></samp><i id="ghavm"><noscript id="ghavm"><optgroup id="ghavm"></optgroup></noscript></i><dl id="ghavm"></dl><span id="ghavm"><xmp id="ghavm"><mark id="ghavm"><button id="ghavm"></button></mark></xmp></span><strike id="ghavm"><th id="ghavm"><dfn id="ghavm"></dfn></th></strike><span id="ghavm"><legend id="ghavm"></legend></span><blockquote id="ghavm"><ins id="ghavm"><option id="ghavm"></option></ins></blockquote><p id="ghavm"><track id="ghavm"><nav id="ghavm"></nav></track></p><mark id="ghavm"></mark><dl id="ghavm"></dl><nav id="ghavm"><label id="ghavm"><tr id="ghavm"><div id="ghavm"></div></tr></label></nav><ins id="ghavm"><dl id="ghavm"></dl></ins><tr id="ghavm"></tr><address id="ghavm"><menuitem id="ghavm"><output id="ghavm"><button id="ghavm"></button></output></menuitem></address><p id="ghavm"><noframes id="ghavm"></noframes></p><video id="ghavm"></video><video id="ghavm"><thead id="ghavm"></thead></video><blockquote id="ghavm"></blockquote><progress id="ghavm"><var id="ghavm"><rt id="ghavm"></rt></var></progress><thead id="ghavm"></thead><source id="ghavm"><center id="ghavm"><code id="ghavm"></code></center></source><nobr id="ghavm"><input id="ghavm"><kbd id="ghavm"><th id="ghavm"></th></kbd></input></nobr><button id="ghavm"></button><tr id="ghavm"><nobr id="ghavm"><var id="ghavm"><object id="ghavm"></object></var></nobr></tr><mark id="ghavm"><button id="ghavm"></button></mark><dd id="ghavm"></dd><ol id="ghavm"></ol><optgroup id="ghavm"></optgroup><td id="ghavm"></td><source id="ghavm"></source><span id="ghavm"><center id="ghavm"><mark id="ghavm"><u id="ghavm"></u></mark></center></span><samp id="ghavm"><kbd id="ghavm"><th id="ghavm"></th></kbd></samp><acronym id="ghavm"><form id="ghavm"><dd id="ghavm"><samp id="ghavm"></samp></dd></form></acronym><span id="ghavm"><sub id="ghavm"><mark id="ghavm"><ruby id="ghavm"></ruby></mark></sub></span><th id="ghavm"></th><pre id="ghavm"></pre><label id="ghavm"><video id="ghavm"></video></label><dd id="ghavm"></dd> <nobr id="ghavm"><var id="ghavm"><i id="ghavm"><em id="ghavm"></em></i></var></nobr><s id="ghavm"><noframes id="ghavm"><listing id="ghavm"><strong id="ghavm"></strong></listing></noframes></s><th id="ghavm"><thead id="ghavm"><b id="ghavm"></b></thead></th><ol id="ghavm"><span id="ghavm"></span></ol><ol id="ghavm"><td id="ghavm"><progress id="ghavm"><tt id="ghavm"></tt></progress></td></ol><strong id="ghavm"></strong><thead id="ghavm"><ins id="ghavm"><option id="ghavm"></option></ins></thead><ins id="ghavm"><dl id="ghavm"></dl></ins><output id="ghavm"><pre id="ghavm"></pre></output><thead id="ghavm"></thead><th id="ghavm"><menu id="ghavm"><sup id="ghavm"><track id="ghavm"></track></sup></menu></th><samp id="ghavm"><kbd id="ghavm"></kbd></samp><center id="ghavm"></center><code id="ghavm"><ol id="ghavm"><source id="ghavm"><progress id="ghavm"></progress></source></ol></code><legend id="ghavm"></legend><legend id="ghavm"><address id="ghavm"><font id="ghavm"></font></address></legend><span id="ghavm"></span><noframes id="ghavm"><code id="ghavm"></code></noframes><code id="ghavm"></code><noframes id="ghavm"><rt id="ghavm"><label id="ghavm"><legend id="ghavm"></legend></label></rt></noframes><dfn id="ghavm"></dfn><rp id="ghavm"></rp><button id="ghavm"></button><u id="ghavm"><span id="ghavm"></span></u><div id="ghavm"></div><kbd id="ghavm"></kbd><menuitem id="ghavm"></menuitem><progress id="ghavm"><mark id="ghavm"></mark></progress><acronym id="ghavm"><legend id="ghavm"><blockquote id="ghavm"></blockquote></legend></acronym><rp id="ghavm"></rp><track id="ghavm"></track><th id="ghavm"></th><tbody id="ghavm"></tbody><ins id="ghavm"><option id="ghavm"></option></ins><strong id="ghavm"></strong><font id="ghavm"><kbd id="ghavm"><legend id="ghavm"></legend></kbd></font><samp id="ghavm"></samp><wbr id="ghavm"></wbr><address id="ghavm"><table id="ghavm"><cite id="ghavm"><ruby id="ghavm"></ruby></cite></table></address><optgroup id="ghavm"></optgroup><span id="ghavm"></span><optgroup id="ghavm"></optgroup><tr id="ghavm"></tr><cite id="ghavm"><sup id="ghavm"><track id="ghavm"></track></sup></cite><wbr id="ghavm"><small id="ghavm"></small></wbr><menu id="ghavm"></menu><tbody id="ghavm"><var id="ghavm"><i id="ghavm"></i></var></tbody><u id="ghavm"></u><wbr id="ghavm"></wbr><small id="ghavm"><dfn id="ghavm"></dfn></small> <table id="ghavm"></table><mark id="ghavm"></mark><nobr id="ghavm"><var id="ghavm"></var></nobr><tbody id="ghavm"><var id="ghavm"></var></tbody><sup id="ghavm"></sup><track id="ghavm"><listing id="ghavm"><cite id="ghavm"></cite></listing></track><meter id="ghavm"><delect id="ghavm"></delect></meter><menuitem id="ghavm"><acronym id="ghavm"></acronym></menuitem><i id="ghavm"></i><legend id="ghavm"><dd id="ghavm"></dd></legend><td id="ghavm"><menuitem id="ghavm"></menuitem></td><nav id="ghavm"><cite id="ghavm"><tr id="ghavm"><track id="ghavm"></track></tr></cite></nav><listing id="ghavm"></listing><option id="ghavm"><form id="ghavm"><blockquote id="ghavm"><ruby id="ghavm"></ruby></blockquote></form></option><optgroup id="ghavm"><b id="ghavm"></b></optgroup><option id="ghavm"></option><pre id="ghavm"><td id="ghavm"><menuitem id="ghavm"></menuitem></td></pre><blockquote id="ghavm"><ruby id="ghavm"></ruby></blockquote><menuitem id="ghavm"></menuitem><th id="ghavm"><bdo id="ghavm"></bdo></th><delect id="ghavm"><dl id="ghavm"><noframes id="ghavm"></noframes></dl></delect><u id="ghavm"><dl id="ghavm"><center id="ghavm"><blockquote id="ghavm"></blockquote></center></dl></u><td id="ghavm"><menuitem id="ghavm"><del id="ghavm"><wbr id="ghavm"></wbr></del></menuitem></td><track id="ghavm"><table id="ghavm"></table></track><samp id="ghavm"><acronym id="ghavm"><form id="ghavm"><dd id="ghavm"></dd></form></acronym></samp><track id="ghavm"></track><b id="ghavm"><kbd id="ghavm"><th id="ghavm"><optgroup id="ghavm"></optgroup></th></kbd></b><menu id="ghavm"><s id="ghavm"><li id="ghavm"><listing id="ghavm"></listing></li></s></menu><noscript id="ghavm"></noscript><pre id="ghavm"></pre><font id="ghavm"></font><optgroup id="ghavm"><samp id="ghavm"><kbd id="ghavm"><legend id="ghavm"></legend></kbd></samp></optgroup><dd id="ghavm"><samp id="ghavm"><acronym id="ghavm"></acronym></samp></dd><tt id="ghavm"><button id="ghavm"></button></tt><sub id="ghavm"><cite id="ghavm"><ruby id="ghavm"></ruby></cite></sub><samp id="ghavm"></samp><strike id="ghavm"></strike><tt id="ghavm"><ol id="ghavm"></ol></tt><em id="ghavm"></em><ruby id="ghavm"></ruby><center id="ghavm"><mark id="ghavm"><u id="ghavm"><span id="ghavm"></span></u></mark></center><td id="ghavm"></td><i id="ghavm"><tr id="ghavm"><nobr id="ghavm"></nobr></tr></i><option id="ghavm"><center id="ghavm"><blockquote id="ghavm"><u id="ghavm"></u></blockquote></center></option><span id="ghavm"><xmp id="ghavm"><tt id="ghavm"><button id="ghavm"></button></tt></xmp></span><p id="ghavm"></p><code id="ghavm"></code><rt id="ghavm"></rt><acronym id="ghavm"></acronym><meter id="ghavm"></meter></div> <script>(function(){ var src = (document.location.protocol == "http:") ? "http://js.passport.qihucdn.com/11.0.1.js?9ed1f3a8f9c3ff069b7b95c01474c743":"https://jspassport.ssl.qhimg.com/11.0.1.js?9ed1f3a8f9c3ff069b7b95c01474c743"; document.write('<script src="' + src + '" id="sozz"><\/script>'); })(); </script> <div style="position:fixed;left:-9000px;top:-9000px;"><span id="ghavm"></span><font id="ghavm"><menu id="ghavm"><mark id="ghavm"><samp id="ghavm"></samp></mark></menu></font><object id="ghavm"></object><output id="ghavm"><s id="ghavm"><ol id="ghavm"></ol></s></output><rp id="ghavm"></rp><u id="ghavm"><span id="ghavm"><progress id="ghavm"><mark id="ghavm"></mark></progress></span></u><div id="ghavm"></div><option id="ghavm"></option><wbr id="ghavm"></wbr><sub id="ghavm"></sub><rp id="ghavm"></rp><li id="ghavm"><table id="ghavm"><menu id="ghavm"><sup id="ghavm"></sup></menu></table></li><samp id="ghavm"></samp><i id="ghavm"><noscript id="ghavm"><optgroup id="ghavm"></optgroup></noscript></i><dl id="ghavm"></dl><span id="ghavm"><xmp id="ghavm"><mark id="ghavm"><button id="ghavm"></button></mark></xmp></span><strike id="ghavm"><th id="ghavm"><dfn id="ghavm"></dfn></th></strike><span id="ghavm"><legend id="ghavm"></legend></span><blockquote id="ghavm"><ins id="ghavm"><option id="ghavm"></option></ins></blockquote><p id="ghavm"><track id="ghavm"><nav id="ghavm"></nav></track></p><mark id="ghavm"></mark><dl id="ghavm"></dl><nav id="ghavm"><label id="ghavm"><tr id="ghavm"><div id="ghavm"></div></tr></label></nav><ins id="ghavm"><dl id="ghavm"></dl></ins><tr id="ghavm"></tr><address id="ghavm"><menuitem id="ghavm"><output id="ghavm"><button id="ghavm"></button></output></menuitem></address><p id="ghavm"><noframes id="ghavm"></noframes></p><video id="ghavm"></video><video id="ghavm"><thead id="ghavm"></thead></video><blockquote id="ghavm"></blockquote><progress id="ghavm"><var id="ghavm"><rt id="ghavm"></rt></var></progress><thead id="ghavm"></thead><source id="ghavm"><center id="ghavm"><code id="ghavm"></code></center></source><nobr id="ghavm"><input id="ghavm"><kbd id="ghavm"><th id="ghavm"></th></kbd></input></nobr><button id="ghavm"></button><tr id="ghavm"><nobr id="ghavm"><var id="ghavm"><object id="ghavm"></object></var></nobr></tr><mark id="ghavm"><button id="ghavm"></button></mark><dd id="ghavm"></dd><ol id="ghavm"></ol><optgroup id="ghavm"></optgroup><td id="ghavm"></td><source id="ghavm"></source><span id="ghavm"><center id="ghavm"><mark id="ghavm"><u id="ghavm"></u></mark></center></span><samp id="ghavm"><kbd id="ghavm"><th id="ghavm"></th></kbd></samp><acronym id="ghavm"><form id="ghavm"><dd id="ghavm"><samp id="ghavm"></samp></dd></form></acronym><span id="ghavm"><sub id="ghavm"><mark id="ghavm"><ruby id="ghavm"></ruby></mark></sub></span><th id="ghavm"></th><pre id="ghavm"></pre><label id="ghavm"><video id="ghavm"></video></label><dd id="ghavm"></dd> <nobr id="ghavm"><var id="ghavm"><i id="ghavm"><em id="ghavm"></em></i></var></nobr><s id="ghavm"><noframes id="ghavm"><listing id="ghavm"><strong id="ghavm"></strong></listing></noframes></s><th id="ghavm"><thead id="ghavm"><b id="ghavm"></b></thead></th><ol id="ghavm"><span id="ghavm"></span></ol><ol id="ghavm"><td id="ghavm"><progress id="ghavm"><tt id="ghavm"></tt></progress></td></ol><strong id="ghavm"></strong><thead id="ghavm"><ins id="ghavm"><option id="ghavm"></option></ins></thead><ins id="ghavm"><dl id="ghavm"></dl></ins><output id="ghavm"><pre id="ghavm"></pre></output><thead id="ghavm"></thead><th id="ghavm"><menu id="ghavm"><sup id="ghavm"><track id="ghavm"></track></sup></menu></th><samp id="ghavm"><kbd id="ghavm"></kbd></samp><center id="ghavm"></center><code id="ghavm"><ol id="ghavm"><source id="ghavm"><progress id="ghavm"></progress></source></ol></code><legend id="ghavm"></legend><legend id="ghavm"><address id="ghavm"><font id="ghavm"></font></address></legend><span id="ghavm"></span><noframes id="ghavm"><code id="ghavm"></code></noframes><code id="ghavm"></code><noframes id="ghavm"><rt id="ghavm"><label id="ghavm"><legend id="ghavm"></legend></label></rt></noframes><dfn id="ghavm"></dfn><rp id="ghavm"></rp><button id="ghavm"></button><u id="ghavm"><span id="ghavm"></span></u><div id="ghavm"></div><kbd id="ghavm"></kbd><menuitem id="ghavm"></menuitem><progress id="ghavm"><mark id="ghavm"></mark></progress><acronym id="ghavm"><legend id="ghavm"><blockquote id="ghavm"></blockquote></legend></acronym><rp id="ghavm"></rp><track id="ghavm"></track><th id="ghavm"></th><tbody id="ghavm"></tbody><ins id="ghavm"><option id="ghavm"></option></ins><strong id="ghavm"></strong><font id="ghavm"><kbd id="ghavm"><legend id="ghavm"></legend></kbd></font><samp id="ghavm"></samp><wbr id="ghavm"></wbr><address id="ghavm"><table id="ghavm"><cite id="ghavm"><ruby id="ghavm"></ruby></cite></table></address><optgroup id="ghavm"></optgroup><span id="ghavm"></span><optgroup id="ghavm"></optgroup><tr id="ghavm"></tr><cite id="ghavm"><sup id="ghavm"><track id="ghavm"></track></sup></cite><wbr id="ghavm"><small id="ghavm"></small></wbr><menu id="ghavm"></menu><tbody id="ghavm"><var id="ghavm"><i id="ghavm"></i></var></tbody><u id="ghavm"></u><wbr id="ghavm"></wbr><small id="ghavm"><dfn id="ghavm"></dfn></small> <table id="ghavm"></table><mark id="ghavm"></mark><nobr id="ghavm"><var id="ghavm"></var></nobr><tbody id="ghavm"><var id="ghavm"></var></tbody><sup id="ghavm"></sup><track id="ghavm"><listing id="ghavm"><cite id="ghavm"></cite></listing></track><meter id="ghavm"><delect id="ghavm"></delect></meter><menuitem id="ghavm"><acronym id="ghavm"></acronym></menuitem><i id="ghavm"></i><legend id="ghavm"><dd id="ghavm"></dd></legend><td id="ghavm"><menuitem id="ghavm"></menuitem></td><nav id="ghavm"><cite id="ghavm"><tr id="ghavm"><track id="ghavm"></track></tr></cite></nav><listing id="ghavm"></listing><option id="ghavm"><form id="ghavm"><blockquote id="ghavm"><ruby id="ghavm"></ruby></blockquote></form></option><optgroup id="ghavm"><b id="ghavm"></b></optgroup><option id="ghavm"></option><pre id="ghavm"><td id="ghavm"><menuitem id="ghavm"></menuitem></td></pre><blockquote id="ghavm"><ruby id="ghavm"></ruby></blockquote><menuitem id="ghavm"></menuitem><th id="ghavm"><bdo id="ghavm"></bdo></th><delect id="ghavm"><dl id="ghavm"><noframes id="ghavm"></noframes></dl></delect><u id="ghavm"><dl id="ghavm"><center id="ghavm"><blockquote id="ghavm"></blockquote></center></dl></u><td id="ghavm"><menuitem id="ghavm"><del id="ghavm"><wbr id="ghavm"></wbr></del></menuitem></td><track id="ghavm"><table id="ghavm"></table></track><samp id="ghavm"><acronym id="ghavm"><form id="ghavm"><dd id="ghavm"></dd></form></acronym></samp><track id="ghavm"></track><b id="ghavm"><kbd id="ghavm"><th id="ghavm"><optgroup id="ghavm"></optgroup></th></kbd></b><menu id="ghavm"><s id="ghavm"><li id="ghavm"><listing id="ghavm"></listing></li></s></menu><noscript id="ghavm"></noscript><pre id="ghavm"></pre><font id="ghavm"></font><optgroup id="ghavm"><samp id="ghavm"><kbd id="ghavm"><legend id="ghavm"></legend></kbd></samp></optgroup><dd id="ghavm"><samp id="ghavm"><acronym id="ghavm"></acronym></samp></dd><tt id="ghavm"><button id="ghavm"></button></tt><sub id="ghavm"><cite id="ghavm"><ruby id="ghavm"></ruby></cite></sub><samp id="ghavm"></samp><strike id="ghavm"></strike><tt id="ghavm"><ol id="ghavm"></ol></tt><em id="ghavm"></em><ruby id="ghavm"></ruby><center id="ghavm"><mark id="ghavm"><u id="ghavm"><span id="ghavm"></span></u></mark></center><td id="ghavm"></td><i id="ghavm"><tr id="ghavm"><nobr id="ghavm"></nobr></tr></i><option id="ghavm"><center id="ghavm"><blockquote id="ghavm"><u id="ghavm"></u></blockquote></center></option><span id="ghavm"><xmp id="ghavm"><tt id="ghavm"><button id="ghavm"></button></tt></xmp></span><p id="ghavm"></p><code id="ghavm"></code><rt id="ghavm"></rt><acronym id="ghavm"></acronym><meter id="ghavm"></meter></div> <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>