{"id":33200,"date":"2020-07-16T22:54:37","date_gmt":"2020-07-16T14:54:37","guid":{"rendered":"http:\/\/www.zhushiyao.com\/?p=33200"},"modified":"2020-07-16T22:56:00","modified_gmt":"2020-07-16T14:56:00","slug":"04e75e080f","status":"publish","type":"post","link":"http:\/\/www.zhushiyao.com\/?p=33200","title":{"rendered":"10\u5f20\u6d41\u7a0b\u56fe+\u90e8\u7f72\u56fe\uff0c\u8bb2\u900f\u5355\u70b9\u767b\u5f55\u539f\u7406\u4e0e\u7b80\u5355\u5b9e\u73b0\uff01"},"content":{"rendered":"<div class=\"bpp-post-content\">\n<section>\n<section>\n<p style=\"color: #3e3e3e; font-size: 16px; white-space: normal; background-color: #ffffff;\"><span style=\"color: #7b7f83; font-size: 14px;\">\u4f5c\u8005\uff1a\u51cc\u627f\u4e00<\/span><\/p>\n<p style=\"color: #3e3e3e; font-size: 16px; white-space: normal; background-color: #ffffff;\"><span style=\"font-size: 14px; color: #7b7f83;\">\u539f\u6587\uff1a<\/span><span style=\"font-size: 14px; color: #7b7f83;\">www.cnblogs.com\/ywlaker\/p\/6113927.html<\/span><\/p>\n<p>\u00a0<\/p>\n<p style=\"clear: both; min-height: 1em; color: #000000; font-size: 16px; text-align: center;\">\u00a0<\/p>\n<\/section>\n<\/section>\n<section style=\"font-size: 16px;\">\n<p style=\"text-align: left;\"><span style=\"font-family: \u5fae\u8f6f\u96c5\u9ed1, 'Microsoft YaHei'; text-align: justify; font-size: 20px;\">\u4e00\u3001\u5355\u7cfb\u7edf\u767b\u5f55\u673a\u5236<\/span><\/p>\n<p>\u00a0<\/p>\n<p><span style=\"font-size: 15px; font-family: \u5fae\u8f6f\u96c5\u9ed1, 'Microsoft YaHei';\">1\u3001http\u65e0\u72b6\u6001\u534f\u8bae<\/span><\/p>\n<p>\u00a0<\/p>\n<p><span style=\"font-size: 15px; font-family: \u5fae\u8f6f\u96c5\u9ed1, 'Microsoft YaHei';\">web\u5e94\u7528\u91c7\u7528browser\/server\u67b6\u6784\uff0chttp\u4f5c\u4e3a\u901a\u4fe1\u534f\u8bae\u3002http\u662f\u65e0\u72b6\u6001\u534f\u8bae\uff0c\u6d4f\u89c8\u5668\u7684\u6bcf\u4e00\u6b21\u8bf7\u6c42\uff0c\u670d\u52a1\u5668\u4f1a\u72ec\u7acb\u5904\u7406\uff0c\u4e0d\u4e0e\u4e4b\u524d\u6216\u4e4b\u540e\u7684\u8bf7\u6c42\u4ea7\u751f\u5173\u8054\uff0c\u8fd9\u4e2a\u8fc7\u7a0b\u7528\u4e0b\u56fe\u8bf4\u660e\uff0c\u4e09\u6b21\u8bf7\u6c42\/\u54cd\u5e94\u5bf9\u4e4b\u95f4\u6ca1\u6709\u4efb\u4f55\u8054\u7cfb<br style=\"max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;\" \/><\/span><\/p>\n<p>\u00a0<\/p>\n<p><img decoding=\"async\" title=\"10\u5f20\u6d41\u7a0b\u56fe+\u90e8\u7f72\u56fe\uff0c\u8bb2\u900f\u5355\u70b9\u767b\u5f55\u539f\u7406\u4e0e\u7b80\u5355\u5b9e\u73b0\uff01\" src=\"http:\/\/www.zhushiyao.com\/wp-content\/uploads\/2020\/07\/8-1594911277.png\" alt=\"10\u5f20\u6d41\u7a0b\u56fe+\u90e8\u7f72\u56fe\uff0c\u8bb2\u900f\u5355\u70b9\u767b\u5f55\u539f\u7406\u4e0e\u7b80\u5355\u5b9e\u73b0\uff01\" \/><\/p>\n<p>\u00a0<\/p>\n<p><span style=\"font-size: 15px; font-family: \u5fae\u8f6f\u96c5\u9ed1, 'Microsoft YaHei';\">\u4f46\u8fd9\u4e5f\u540c\u65f6\u610f\u5473\u7740\uff0c\u4efb\u4f55\u7528\u6237\u90fd\u80fd\u901a\u8fc7\u6d4f\u89c8\u5668\u8bbf\u95ee\u670d\u52a1\u5668\u8d44\u6e90\uff0c\u5982\u679c\u60f3\u4fdd\u62a4\u670d\u52a1\u5668\u7684\u67d0\u4e9b\u8d44\u6e90\uff0c\u5fc5\u987b\u9650\u5236\u6d4f\u89c8\u5668\u8bf7\u6c42\uff1b\u8981\u9650\u5236\u6d4f\u89c8\u5668\u8bf7\u6c42\uff0c\u5fc5\u987b\u9274\u522b\u6d4f\u89c8\u5668\u8bf7\u6c42\uff0c\u54cd\u5e94\u5408\u6cd5\u8bf7\u6c42\uff0c\u5ffd\u7565\u975e\u6cd5\u8bf7\u6c42\uff1b\u8981\u9274\u522b\u6d4f\u89c8\u5668\u8bf7\u6c42\uff0c\u5fc5\u987b\u6e05\u695a\u6d4f\u89c8\u5668\u8bf7\u6c42\u72b6\u6001\u3002\u65e2\u7136http\u534f\u8bae\u65e0\u72b6\u6001\uff0c\u90a3\u5c31\u8ba9\u670d\u52a1\u5668\u548c\u6d4f\u89c8\u5668\u5171\u540c\u7ef4\u62a4\u4e00\u4e2a\u72b6\u6001\u5427\uff01\u8fd9\u5c31\u662f\u4f1a\u8bdd\u673a\u5236<\/span><\/p>\n<p>\u00a0<\/p>\n<p><span style=\"font-size: 15px; font-family: \u5fae\u8f6f\u96c5\u9ed1, 'Microsoft YaHei';\">2\u3001\u4f1a\u8bdd\u673a\u5236<\/span><\/p>\n<p>\u00a0<\/p>\n<p><span style=\"font-size: 15px; font-family: \u5fae\u8f6f\u96c5\u9ed1, 'Microsoft YaHei';\">\u6d4f\u89c8\u5668\u7b2c\u4e00\u6b21\u8bf7\u6c42\u670d\u52a1\u5668\uff0c\u670d\u52a1\u5668\u521b\u5efa\u4e00\u4e2a\u4f1a\u8bdd\uff0c\u5e76\u5c06\u4f1a\u8bdd\u7684id\u4f5c\u4e3a\u54cd\u5e94\u7684\u4e00\u90e8\u5206\u53d1\u9001\u7ed9\u6d4f\u89c8\u5668\uff0c\u6d4f\u89c8\u5668\u5b58\u50a8\u4f1a\u8bddid\uff0c\u5e76\u5728\u540e\u7eed\u7b2c\u4e8c\u6b21\u548c\u7b2c\u4e09\u6b21\u8bf7\u6c42\u4e2d\u5e26\u4e0a\u4f1a\u8bddid\uff0c\u670d\u52a1\u5668\u53d6\u5f97\u8bf7\u6c42\u4e2d\u7684\u4f1a\u8bddid\u5c31\u77e5\u9053\u662f\u4e0d\u662f\u540c\u4e00\u4e2a\u7528\u6237\u4e86\uff0c\u8fd9\u4e2a\u8fc7\u7a0b\u7528\u4e0b\u56fe\u8bf4\u660e\uff0c\u540e\u7eed\u8bf7\u6c42\u4e0e\u7b2c\u4e00\u6b21\u8bf7\u6c42\u4ea7\u751f\u4e86\u5173\u8054<br style=\"max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;\" \/><\/span><\/p>\n<p>\u00a0<\/p>\n<p><img decoding=\"async\" title=\"10\u5f20\u6d41\u7a0b\u56fe+\u90e8\u7f72\u56fe\uff0c\u8bb2\u900f\u5355\u70b9\u767b\u5f55\u539f\u7406\u4e0e\u7b80\u5355\u5b9e\u73b0\uff01\" src=\"http:\/\/www.zhushiyao.com\/wp-content\/uploads\/2020\/07\/1-1594911277.png\" alt=\"10\u5f20\u6d41\u7a0b\u56fe+\u90e8\u7f72\u56fe\uff0c\u8bb2\u900f\u5355\u70b9\u767b\u5f55\u539f\u7406\u4e0e\u7b80\u5355\u5b9e\u73b0\uff01\" \/><\/p>\n<p>\u00a0<\/p>\n<p><span style=\"font-size: 15px; font-family: \u5fae\u8f6f\u96c5\u9ed1, 'Microsoft YaHei';\">\u670d\u52a1\u5668\u5728\u5185\u5b58\u4e2d\u4fdd\u5b58\u4f1a\u8bdd\u5bf9\u8c61\uff0c\u6d4f\u89c8\u5668\u600e\u4e48\u4fdd\u5b58\u4f1a\u8bddid\u5462\uff1f\u4f60\u53ef\u80fd\u4f1a\u60f3\u5230\u4e24\u79cd\u65b9\u5f0f<\/span><\/p>\n<p>\u00a0<\/p>\n<section>\n<ol class=\"list-paddingleft-2\">\n<li>\n<p><span style=\"font-size: 15px; font-family: \u5fae\u8f6f\u96c5\u9ed1, 'Microsoft YaHei';\">\u8bf7\u6c42\u53c2\u6570<\/span><\/p>\n<\/li>\n<li>\n<p><span style=\"font-size: 15px; font-family: \u5fae\u8f6f\u96c5\u9ed1, 'Microsoft YaHei';\">cookie<\/span><\/p>\n<\/li>\n<\/ol>\n<\/section>\n<p>\u00a0<\/p>\n<p><span style=\"font-size: 15px; font-family: \u5fae\u8f6f\u96c5\u9ed1, 'Microsoft YaHei';\">\u5c06\u4f1a\u8bddid\u4f5c\u4e3a\u6bcf\u4e00\u4e2a\u8bf7\u6c42\u7684\u53c2\u6570\uff0c\u670d\u52a1\u5668\u63a5\u6536\u8bf7\u6c42\u81ea\u7136\u80fd\u89e3\u6790\u53c2\u6570\u83b7\u5f97\u4f1a\u8bddid\uff0c\u5e76\u501f\u6b64\u5224\u65ad\u662f\u5426\u6765\u81ea\u540c\u4e00\u4f1a\u8bdd\uff0c\u5f88\u660e\u663e\uff0c\u8fd9\u79cd\u65b9\u5f0f\u4e0d\u9760\u8c31\u3002\u90a3\u5c31\u6d4f\u89c8\u5668\u81ea\u5df1\u6765\u7ef4\u62a4\u8fd9\u4e2a\u4f1a\u8bddid\u5427\uff0c\u6bcf\u6b21\u53d1\u9001http\u8bf7\u6c42\u65f6\u6d4f\u89c8\u5668\u81ea\u52a8\u53d1\u9001\u4f1a\u8bddid\uff0ccookie\u673a\u5236\u6b63\u597d\u7528\u6765\u505a\u8fd9\u4ef6\u4e8b\u3002<\/span><\/p>\n<p>\u00a0<\/p>\n<p><span style=\"font-size: 15px; font-family: \u5fae\u8f6f\u96c5\u9ed1, 'Microsoft YaHei';\">cookie\u662f\u6d4f\u89c8\u5668\u7528\u6765\u5b58\u50a8\u5c11\u91cf\u6570\u636e\u7684\u4e00\u79cd\u673a\u5236\uff0c\u6570\u636e\u4ee5\u201dkey\/value\u201c\u5f62\u5f0f\u5b58\u50a8\uff0c\u6d4f\u89c8\u5668\u53d1\u9001http\u8bf7\u6c42\u65f6\u81ea\u52a8\u9644\u5e26cookie\u4fe1\u606f<br style=\"max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;\" \/><\/span><\/p>\n<p>\u00a0<\/p>\n<p><span style=\"font-size: 15px; font-family: \u5fae\u8f6f\u96c5\u9ed1, 'Microsoft YaHei';\">tomcat\u4f1a\u8bdd\u673a\u5236\u5f53\u7136\u4e5f\u5b9e\u73b0\u4e86cookie\uff0c\u8bbf\u95eetomcat\u670d\u52a1\u5668\u65f6\uff0c\u6d4f\u89c8\u5668\u4e2d\u53ef\u4ee5\u770b\u5230\u4e00\u4e2a\u540d\u4e3a\u201cJSESSIONID\u201d\u7684cookie\uff0c\u8fd9\u5c31\u662ftomcat\u4f1a\u8bdd\u673a\u5236\u7ef4\u62a4\u7684\u4f1a\u8bddid\uff0c\u4f7f\u7528\u4e86cookie\u7684\u8bf7\u6c42\u54cd\u5e94\u8fc7\u7a0b\u5982\u4e0b\u56fe<br style=\"max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;\" \/><\/span><\/p>\n<p>\u00a0<\/p>\n<p><img decoding=\"async\" title=\"10\u5f20\u6d41\u7a0b\u56fe+\u90e8\u7f72\u56fe\uff0c\u8bb2\u900f\u5355\u70b9\u767b\u5f55\u539f\u7406\u4e0e\u7b80\u5355\u5b9e\u73b0\uff01\" src=\"http:\/\/www.zhushiyao.com\/wp-content\/uploads\/2020\/07\/1-1594911277-1.png\" alt=\"10\u5f20\u6d41\u7a0b\u56fe+\u90e8\u7f72\u56fe\uff0c\u8bb2\u900f\u5355\u70b9\u767b\u5f55\u539f\u7406\u4e0e\u7b80\u5355\u5b9e\u73b0\uff01\" \/><\/p>\n<p>\u00a0<\/p>\n<p><span style=\"font-size: 15px; font-family: \u5fae\u8f6f\u96c5\u9ed1, 'Microsoft YaHei';\">3\u3001\u767b\u5f55\u72b6\u6001<\/span><\/p>\n<p>\u00a0<\/p>\n<p><span style=\"font-size: 15px; font-family: \u5fae\u8f6f\u96c5\u9ed1, 'Microsoft YaHei';\">\u6709\u4e86\u4f1a\u8bdd\u673a\u5236\uff0c\u767b\u5f55\u72b6\u6001\u5c31\u597d\u660e\u767d\u4e86\uff0c\u6211\u4eec\u5047\u8bbe\u6d4f\u89c8\u5668\u7b2c\u4e00\u6b21\u8bf7\u6c42\u670d\u52a1\u5668\u9700\u8981\u8f93\u5165\u7528\u6237\u540d\u4e0e\u5bc6\u7801\u9a8c\u8bc1\u8eab\u4efd\uff0c\u670d\u52a1\u5668\u62ff\u5230\u7528\u6237\u540d\u5bc6\u7801\u53bb\u6570\u636e\u5e93\u6bd4\u5bf9\uff0c\u6b63\u786e\u7684\u8bdd\u8bf4\u660e\u5f53\u524d\u6301\u6709\u8fd9\u4e2a\u4f1a\u8bdd\u7684\u7528\u6237\u662f\u5408\u6cd5\u7528\u6237\uff0c\u5e94\u8be5\u5c06\u8fd9\u4e2a\u4f1a\u8bdd\u6807\u8bb0\u4e3a\u201c\u5df2\u6388\u6743\u201d\u6216\u8005\u201c\u5df2\u767b\u5f55\u201d\u7b49\u7b49\u4e4b\u7c7b\u7684\u72b6\u6001\uff0c\u65e2\u7136\u662f\u4f1a\u8bdd\u7684\u72b6\u6001\uff0c\u81ea\u7136\u8981\u4fdd\u5b58\u5728\u4f1a\u8bdd\u5bf9\u8c61\u4e2d\uff0ctomcat\u5728\u4f1a\u8bdd\u5bf9\u8c61\u4e2d\u8bbe\u7f6e\u767b\u5f55\u72b6\u6001\u5982\u4e0b<\/span><\/p>\n<p style=\"max-width: 100%; min-height: 1em; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\u00a0<\/p>\n<pre style=\"max-width: 100%; overflow-x: auto; box-sizing: border-box !important; overflow-wrap: break-word !important;\"><code style=\"margin-right: 0.15em; margin-left: 0.15em; padding: 0.5em; max-width: 100%; font-size: 0.85em; overflow: auto; color: #abb2bf; text-size-adjust: none; min-width: 400px; background: none 0% 0% \/ auto repeat scroll padding-box border-box #282c34; font-family: Consolas, Menlo, Courier, monospace; box-sizing: border-box !important; word-wrap: break-word !important; display: block !important;\">HttpSession session = request.getSession();<br style=\"max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;\" \/>session.setAttribute(<span style=\"max-width: 100%; color: #98c379; box-sizing: border-box !important; word-wrap: break-word !important;\">\"isLogin\"<\/span>, <span style=\"max-width: 100%; color: #56b6c2; box-sizing: border-box !important; word-wrap: break-word !important;\">true<\/span>);<\/code><\/pre>\n<p style=\"max-width: 100%; min-height: 1em; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\u00a0<\/p>\n<p><span style=\"font-size: 15px; font-family: \u5fae\u8f6f\u96c5\u9ed1, 'Microsoft YaHei';\">\u7528\u6237\u518d\u6b21\u8bbf\u95ee\u65f6\uff0ctomcat\u5728\u4f1a\u8bdd\u5bf9\u8c61\u4e2d\u67e5\u770b\u767b\u5f55\u72b6\u6001<\/span><\/p>\n<p style=\"max-width: 100%; min-height: 1em; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\u00a0<\/p>\n<pre style=\"max-width: 100%; overflow-x: auto; box-sizing: border-box !important; overflow-wrap: break-word !important;\"><code style=\"margin-right: 0.15em; margin-left: 0.15em; padding: 0.5em; max-width: 100%; font-size: 0.85em; overflow: auto; color: #abb2bf; text-size-adjust: none; min-width: 400px; background: none 0% 0% \/ auto repeat scroll padding-box border-box #282c34; font-family: Consolas, Menlo, Courier, monospace; box-sizing: border-box !important; word-wrap: break-word !important; display: block !important;\">HttpSession session = request.getSession();<br style=\"max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;\" \/>session.getAttribute(<span style=\"max-width: 100%; color: #98c379; box-sizing: border-box !important; word-wrap: break-word !important;\">\"isLogin\"<\/span>);<\/code><\/pre>\n<p style=\"max-width: 100%; min-height: 1em; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\u00a0<\/p>\n<p><span style=\"font-size: 15px; font-family: \u5fae\u8f6f\u96c5\u9ed1, 'Microsoft YaHei';\">\u5b9e\u73b0\u4e86\u767b\u5f55\u72b6\u6001\u7684\u6d4f\u89c8\u5668\u8bf7\u6c42\u670d\u52a1\u5668\u6a21\u578b\u5982\u4e0b\u56fe\u63cf\u8ff0<\/span><\/p>\n<p>\u00a0<\/p>\n<p><img decoding=\"async\" title=\"10\u5f20\u6d41\u7a0b\u56fe+\u90e8\u7f72\u56fe\uff0c\u8bb2\u900f\u5355\u70b9\u767b\u5f55\u539f\u7406\u4e0e\u7b80\u5355\u5b9e\u73b0\uff01\" src=\"http:\/\/www.zhushiyao.com\/wp-content\/uploads\/2020\/07\/9-1594911277.png\" alt=\"10\u5f20\u6d41\u7a0b\u56fe+\u90e8\u7f72\u56fe\uff0c\u8bb2\u900f\u5355\u70b9\u767b\u5f55\u539f\u7406\u4e0e\u7b80\u5355\u5b9e\u73b0\uff01\" \/><\/p>\n<p>\u00a0<\/p>\n<p><span style=\"font-size: 15px; font-family: \u5fae\u8f6f\u96c5\u9ed1, 'Microsoft YaHei';\">\u6bcf\u6b21\u8bf7\u6c42\u53d7\u4fdd\u62a4\u8d44\u6e90\u65f6\u90fd\u4f1a\u68c0\u67e5\u4f1a\u8bdd\u5bf9\u8c61\u4e2d\u7684\u767b\u5f55\u72b6\u6001\uff0c\u53ea\u6709 isLogin=true \u7684\u4f1a\u8bdd\u624d\u80fd\u8bbf\u95ee\uff0c\u767b\u5f55\u673a\u5236\u56e0\u6b64\u800c\u5b9e\u73b0\u3002<\/span><\/p>\n<p>\u00a0<\/p>\n<p><span style=\"font-family: \u5fae\u8f6f\u96c5\u9ed1, 'Microsoft YaHei'; font-size: 20px;\">\u4e8c\u3001\u591a\u7cfb\u7edf\u7684\u590d\u6742\u6027<\/span><\/p>\n<p>\u00a0<\/p>\n<p><span style=\"font-size: 15px; font-family: \u5fae\u8f6f\u96c5\u9ed1, 'Microsoft YaHei';\">web\u7cfb\u7edf\u65e9\u5df2\u4ece\u4e45\u8fdc\u7684\u5355\u7cfb\u7edf\u53d1\u5c55\u6210\u4e3a\u5982\u4eca\u7531\u591a\u7cfb\u7edf\u7ec4\u6210\u7684\u5e94\u7528\u7fa4\uff0c\u9762\u5bf9\u5982\u6b64\u4f17\u591a\u7684\u7cfb\u7edf\uff0c\u7528\u6237\u96be\u9053\u8981\u4e00\u4e2a\u4e00\u4e2a\u767b\u5f55\u3001\u7136\u540e\u4e00\u4e2a\u4e00\u4e2a\u6ce8\u9500\u5417\uff1f\u5c31\u50cf\u4e0b\u56fe\u63cf\u8ff0\u7684\u8fd9\u6837<\/span><\/p>\n<p>\u00a0<\/p>\n<p><img decoding=\"async\" title=\"10\u5f20\u6d41\u7a0b\u56fe+\u90e8\u7f72\u56fe\uff0c\u8bb2\u900f\u5355\u70b9\u767b\u5f55\u539f\u7406\u4e0e\u7b80\u5355\u5b9e\u73b0\uff01\" src=\"http:\/\/www.zhushiyao.com\/wp-content\/uploads\/2020\/07\/9-1594911277-1.png\" alt=\"10\u5f20\u6d41\u7a0b\u56fe+\u90e8\u7f72\u56fe\uff0c\u8bb2\u900f\u5355\u70b9\u767b\u5f55\u539f\u7406\u4e0e\u7b80\u5355\u5b9e\u73b0\uff01\" \/><\/p>\n<p>\u00a0<\/p>\n<p><span style=\"font-size: 15px; font-family: \u5fae\u8f6f\u96c5\u9ed1, 'Microsoft YaHei';\">web\u7cfb\u7edf\u7531\u5355\u7cfb\u7edf\u53d1\u5c55\u6210\u591a\u7cfb\u7edf\u7ec4\u6210\u7684\u5e94\u7528\u7fa4\uff0c\u590d\u6742\u6027\u5e94\u8be5\u7531\u7cfb\u7edf\u5185\u90e8\u627f\u62c5\uff0c\u800c\u4e0d\u662f\u7528\u6237\u3002\u65e0\u8bbaweb\u7cfb\u7edf\u5185\u90e8\u591a\u4e48\u590d\u6742\uff0c\u5bf9\u7528\u6237\u800c\u8a00\uff0c\u90fd\u662f\u4e00\u4e2a\u7edf\u4e00\u7684\u6574\u4f53\uff0c\u4e5f\u5c31\u662f\u8bf4\uff0c\u7528\u6237\u8bbf\u95eeweb\u7cfb\u7edf\u7684\u6574\u4e2a\u5e94\u7528\u7fa4\u4e0e\u8bbf\u95ee\u5355\u4e2a\u7cfb\u7edf\u4e00\u6837\uff0c\u767b\u5f55\/\u6ce8\u9500\u53ea\u8981\u4e00\u6b21\u5c31\u591f\u4e86<\/span><\/p>\n<p>\u00a0<\/p>\n<p><img decoding=\"async\" class=\"rich_pages\" style=\"font-size: 17px; letter-spacing: 0.544px; text-align: center; background-color: #ffffff; width: 100%; font-family: -apple-system-font, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif; box-sizing: border-box !important; word-wrap: break-word !important; visibility: visible !important;\" title=\"10\u5f20\u6d41\u7a0b\u56fe+\u90e8\u7f72\u56fe\uff0c\u8bb2\u900f\u5355\u70b9\u767b\u5f55\u539f\u7406\u4e0e\u7b80\u5355\u5b9e\u73b0\uff01\" src=\"http:\/\/www.zhushiyao.com\/wp-content\/uploads\/2020\/07\/6-1594911277.png\" alt=\"10\u5f20\u6d41\u7a0b\u56fe+\u90e8\u7f72\u56fe\uff0c\u8bb2\u900f\u5355\u70b9\u767b\u5f55\u539f\u7406\u4e0e\u7b80\u5355\u5b9e\u73b0\uff01\" \/><\/p>\n<p>\u00a0<\/p>\n<p><span style=\"font-size: 15px; font-family: \u5fae\u8f6f\u96c5\u9ed1, 'Microsoft YaHei';\">\u867d\u7136\u5355\u7cfb\u7edf\u7684\u767b\u5f55\u89e3\u51b3\u65b9\u6848\u5f88\u5b8c\u7f8e\uff0c\u4f46\u5bf9\u4e8e\u591a\u7cfb\u7edf\u5e94\u7528\u7fa4\u5df2\u7ecf\u4e0d\u518d\u9002\u7528\u4e86\uff0c\u4e3a\u4ec0\u4e48\u5462\uff1f<\/span><\/p>\n<p>\u00a0<\/p>\n<p><span style=\"font-size: 15px; font-family: \u5fae\u8f6f\u96c5\u9ed1, 'Microsoft YaHei';\">\u5355\u7cfb\u7edf\u767b\u5f55\u89e3\u51b3\u65b9\u6848\u7684\u6838\u5fc3\u662fcookie\uff0ccookie\u643a\u5e26\u4f1a\u8bddid\u5728\u6d4f\u89c8\u5668\u4e0e\u670d\u52a1\u5668\u4e4b\u95f4\u7ef4\u62a4\u4f1a\u8bdd\u72b6\u6001\u3002\u4f46cookie\u662f\u6709\u9650\u5236\u7684\uff0c\u8fd9\u4e2a\u9650\u5236\u5c31\u662fcookie\u7684\u57df\uff08\u901a\u5e38\u5bf9\u5e94\u7f51\u7ad9\u7684\u57df\u540d\uff09\uff0c\u6d4f\u89c8\u5668\u53d1\u9001http\u8bf7\u6c42\u65f6\u4f1a\u81ea\u52a8\u643a\u5e26\u4e0e\u8be5\u57df\u5339\u914d\u7684cookie\uff0c\u800c\u4e0d\u662f\u6240\u6709cookie<br style=\"max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;\" \/><\/span><\/p>\n<p>\u00a0<\/p>\n<p><img decoding=\"async\" title=\"10\u5f20\u6d41\u7a0b\u56fe+\u90e8\u7f72\u56fe\uff0c\u8bb2\u900f\u5355\u70b9\u767b\u5f55\u539f\u7406\u4e0e\u7b80\u5355\u5b9e\u73b0\uff01\" src=\"http:\/\/www.zhushiyao.com\/wp-content\/uploads\/2020\/07\/3-1594911277.png\" alt=\"10\u5f20\u6d41\u7a0b\u56fe+\u90e8\u7f72\u56fe\uff0c\u8bb2\u900f\u5355\u70b9\u767b\u5f55\u539f\u7406\u4e0e\u7b80\u5355\u5b9e\u73b0\uff01\" \/><\/p>\n<p>\u00a0<\/p>\n<p><span style=\"font-size: 15px; font-family: \u5fae\u8f6f\u96c5\u9ed1, 'Microsoft YaHei';\">\u65e2\u7136\u8fd9\u6837\uff0c\u4e3a\u4ec0\u4e48\u4e0d\u5c06web\u5e94\u7528\u7fa4\u4e2d\u6240\u6709\u5b50\u7cfb\u7edf\u7684\u57df\u540d\u7edf\u4e00\u5728\u4e00\u4e2a\u9876\u7ea7\u57df\u540d\u4e0b\uff0c\u4f8b\u5982\u201c*.baidu.com\u201d\uff0c\u7136\u540e\u5c06\u5b83\u4eec\u7684cookie\u57df\u8bbe\u7f6e\u4e3a\u201cbaidu.com\u201d\uff0c\u8fd9\u79cd\u505a\u6cd5\u7406\u8bba\u4e0a\u662f\u53ef\u4ee5\u7684\uff0c\u751a\u81f3\u65e9\u671f\u5f88\u591a\u591a\u7cfb\u7edf\u767b\u5f55\u5c31\u91c7\u7528\u8fd9\u79cd\u540c\u57df\u540d\u5171\u4eabcookie\u7684\u65b9\u5f0f\u3002<\/span><\/p>\n<p>\u00a0<\/p>\n<p><span style=\"font-size: 15px; font-family: \u5fae\u8f6f\u96c5\u9ed1, 'Microsoft YaHei';\">\u7136\u800c\uff0c\u53ef\u884c\u5e76\u4e0d\u4ee3\u8868\u597d\uff0c\u5171\u4eabcookie\u7684\u65b9\u5f0f\u5b58\u5728\u4f17\u591a\u5c40\u9650\u3002\u9996\u5148\uff0c\u5e94\u7528\u7fa4\u57df\u540d\u5f97\u7edf\u4e00\uff1b\u5176\u6b21\uff0c\u5e94\u7528\u7fa4\u5404\u7cfb\u7edf\u4f7f\u7528\u7684\u6280\u672f\uff08\u81f3\u5c11\u662fweb\u670d\u52a1\u5668\uff09\u8981\u76f8\u540c\uff0c\u4e0d\u7136cookie\u7684key\u503c\uff08tomcat\u4e3aJSESSIONID\uff09\u4e0d\u540c\uff0c\u65e0\u6cd5\u7ef4\u6301\u4f1a\u8bdd\uff0c\u5171\u4eabcookie\u7684\u65b9\u5f0f\u662f\u65e0\u6cd5\u5b9e\u73b0\u8de8\u8bed\u8a00\u6280\u672f\u5e73\u53f0\u767b\u5f55\u7684\uff0c\u6bd4\u5982java\u3001php\u3001.net\u7cfb\u7edf\u4e4b\u95f4\uff1b\u7b2c\u4e09\uff0ccookie\u672c\u8eab\u4e0d\u5b89\u5168\u3002<br style=\"max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;\" \/><\/span><\/p>\n<p>\u00a0<\/p>\n<p><span style=\"font-size: 15px; font-family: \u5fae\u8f6f\u96c5\u9ed1, 'Microsoft YaHei';\">\u56e0\u6b64\uff0c\u6211\u4eec\u9700\u8981\u4e00\u79cd\u5168\u65b0\u7684\u767b\u5f55\u65b9\u5f0f\u6765\u5b9e\u73b0\u591a\u7cfb\u7edf\u5e94\u7528\u7fa4\u7684\u767b\u5f55\uff0c\u8fd9\u5c31\u662f\u5355\u70b9\u767b\u5f55<\/span><\/p>\n<p>\u00a0<\/p>\n<p><span style=\"font-family: \u5fae\u8f6f\u96c5\u9ed1, 'Microsoft YaHei'; font-size: 20px;\">\u4e09\u3001\u5355\u70b9\u767b\u5f55<\/span><\/p>\n<p>\u00a0<\/p>\n<p><span style=\"font-size: 15px; font-family: \u5fae\u8f6f\u96c5\u9ed1, 'Microsoft YaHei';\">\u4ec0\u4e48\u662f\u5355\u70b9\u767b\u5f55\uff1f\u5355\u70b9\u767b\u5f55\u5168\u79f0Single Sign On\uff08\u4ee5\u4e0b\u7b80\u79f0SSO\uff09\uff0c\u662f\u6307\u5728\u591a\u7cfb\u7edf\u5e94\u7528\u7fa4\u4e2d\u767b\u5f55\u4e00\u4e2a\u7cfb\u7edf\uff0c\u4fbf\u53ef\u5728\u5176\u4ed6\u6240\u6709\u7cfb\u7edf\u4e2d\u5f97\u5230\u6388\u6743\u800c\u65e0\u9700\u518d\u6b21\u767b\u5f55\uff0c\u5305\u62ec\u5355\u70b9\u767b\u5f55\u4e0e\u5355\u70b9\u6ce8\u9500\u4e24\u90e8\u5206<\/span><\/p>\n<p>\u00a0<\/p>\n<p><span style=\"font-size: 15px; font-family: \u5fae\u8f6f\u96c5\u9ed1, 'Microsoft YaHei';\">1\u3001\u767b\u5f55<\/span><\/p>\n<p>\u00a0<\/p>\n<p><span style=\"font-size: 15px; font-family: \u5fae\u8f6f\u96c5\u9ed1, 'Microsoft YaHei';\">\u76f8\u6bd4\u4e8e\u5355\u7cfb\u7edf\u767b\u5f55\uff0csso\u9700\u8981\u4e00\u4e2a\u72ec\u7acb\u7684\u8ba4\u8bc1\u4e2d\u5fc3\uff0c\u53ea\u6709\u8ba4\u8bc1\u4e2d\u5fc3\u80fd\u63a5\u53d7\u7528\u6237\u7684\u7528\u6237\u540d\u5bc6\u7801\u7b49\u5b89\u5168\u4fe1\u606f\uff0c\u5176\u4ed6\u7cfb\u7edf\u4e0d\u63d0\u4f9b\u767b\u5f55\u5165\u53e3\uff0c\u53ea\u63a5\u53d7\u8ba4\u8bc1\u4e2d\u5fc3\u7684\u95f4\u63a5\u6388\u6743\u3002<\/span><\/p>\n<p>\u00a0<\/p>\n<p><span style=\"font-size: 15px; font-family: \u5fae\u8f6f\u96c5\u9ed1, 'Microsoft YaHei';\">\u95f4\u63a5\u6388\u6743\u901a\u8fc7\u4ee4\u724c\u5b9e\u73b0\uff0csso\u8ba4\u8bc1\u4e2d\u5fc3\u9a8c\u8bc1\u7528\u6237\u7684\u7528\u6237\u540d\u5bc6\u7801\u6ca1\u95ee\u9898\uff0c\u521b\u5efa\u6388\u6743\u4ee4\u724c\uff0c\u5728\u63a5\u4e0b\u6765\u7684\u8df3\u8f6c\u8fc7\u7a0b\u4e2d\uff0c\u6388\u6743\u4ee4\u724c\u4f5c\u4e3a\u53c2\u6570\u53d1\u9001\u7ed9\u5404\u4e2a\u5b50\u7cfb\u7edf\uff0c\u5b50\u7cfb\u7edf\u62ff\u5230\u4ee4\u724c\uff0c\u5373\u5f97\u5230\u4e86\u6388\u6743\uff0c\u53ef\u4ee5\u501f\u6b64\u521b\u5efa\u5c40\u90e8\u4f1a\u8bdd\uff0c\u5c40\u90e8\u4f1a\u8bdd\u767b\u5f55\u65b9\u5f0f\u4e0e\u5355\u7cfb\u7edf\u7684\u767b\u5f55\u65b9\u5f0f\u76f8\u540c\u3002\u8fd9\u4e2a\u8fc7\u7a0b\uff0c\u4e5f\u5c31\u662f\u5355\u70b9\u767b\u5f55\u7684\u539f\u7406\uff0c\u7528\u4e0b\u56fe\u8bf4\u660e<br style=\"max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;\" \/><\/span><\/p>\n<p>\u00a0<\/p>\n<p><img decoding=\"async\" title=\"10\u5f20\u6d41\u7a0b\u56fe+\u90e8\u7f72\u56fe\uff0c\u8bb2\u900f\u5355\u70b9\u767b\u5f55\u539f\u7406\u4e0e\u7b80\u5355\u5b9e\u73b0\uff01\" src=\"http:\/\/www.zhushiyao.com\/wp-content\/uploads\/2020\/07\/0-1594911277.jpg\" alt=\"10\u5f20\u6d41\u7a0b\u56fe+\u90e8\u7f72\u56fe\uff0c\u8bb2\u900f\u5355\u70b9\u767b\u5f55\u539f\u7406\u4e0e\u7b80\u5355\u5b9e\u73b0\uff01\" \/><\/p>\n<p>\u00a0<\/p>\n<p><span style=\"font-size: 15px; font-family: \u5fae\u8f6f\u96c5\u9ed1, 'Microsoft YaHei';\">\u4e0b\u9762\u5bf9\u4e0a\u56fe\u7b80\u8981\u63cf\u8ff0<\/span><\/p>\n<p>\u00a0<\/p>\n<section>\n<ol class=\"list-paddingleft-2\">\n<li>\n<p><span style=\"font-size: 15px; font-family: \u5fae\u8f6f\u96c5\u9ed1, 'Microsoft YaHei';\">\u7528\u6237\u8bbf\u95ee\u7cfb\u7edf1\u7684\u53d7\u4fdd\u62a4\u8d44\u6e90\uff0c\u7cfb\u7edf1\u53d1\u73b0\u7528\u6237\u672a\u767b\u5f55\uff0c\u8df3\u8f6c\u81f3sso\u8ba4\u8bc1\u4e2d\u5fc3\uff0c\u5e76\u5c06\u81ea\u5df1\u7684\u5730\u5740\u4f5c\u4e3a\u53c2\u6570<\/span><\/p>\n<\/li>\n<li>\n<p><span style=\"font-size: 15px; font-family: \u5fae\u8f6f\u96c5\u9ed1, 'Microsoft YaHei';\">sso\u8ba4\u8bc1\u4e2d\u5fc3\u53d1\u73b0\u7528\u6237\u672a\u767b\u5f55\uff0c\u5c06\u7528\u6237\u5f15\u5bfc\u81f3\u767b\u5f55\u9875\u9762<\/span><\/p>\n<\/li>\n<li>\n<p><span style=\"font-size: 15px; font-family: \u5fae\u8f6f\u96c5\u9ed1, 'Microsoft YaHei';\">\u7528\u6237\u8f93\u5165\u7528\u6237\u540d\u5bc6\u7801\u63d0\u4ea4\u767b\u5f55\u7533\u8bf7<\/span><\/p>\n<\/li>\n<li>\n<p><span style=\"font-size: 15px; font-family: \u5fae\u8f6f\u96c5\u9ed1, 'Microsoft YaHei';\">sso\u8ba4\u8bc1\u4e2d\u5fc3\u6821\u9a8c\u7528\u6237\u4fe1\u606f\uff0c\u521b\u5efa\u7528\u6237\u4e0esso\u8ba4\u8bc1\u4e2d\u5fc3\u4e4b\u95f4\u7684\u4f1a\u8bdd\uff0c\u79f0\u4e3a\u5168\u5c40\u4f1a\u8bdd\uff0c\u540c\u65f6\u521b\u5efa\u6388\u6743\u4ee4\u724c<\/span><\/p>\n<\/li>\n<li>\n<p><span style=\"font-size: 15px; font-family: \u5fae\u8f6f\u96c5\u9ed1, 'Microsoft YaHei';\">sso\u8ba4\u8bc1\u4e2d\u5fc3\u5e26\u7740\u4ee4\u724c\u8df3\u8f6c\u4f1a\u6700\u521d\u7684\u8bf7\u6c42\u5730\u5740\uff08\u7cfb\u7edf1\uff09<\/span><\/p>\n<\/li>\n<li>\n<p><span style=\"font-size: 15px; font-family: \u5fae\u8f6f\u96c5\u9ed1, 'Microsoft YaHei';\">\u7cfb\u7edf1\u62ff\u5230\u4ee4\u724c\uff0c\u53bbsso\u8ba4\u8bc1\u4e2d\u5fc3\u6821\u9a8c\u4ee4\u724c\u662f\u5426\u6709\u6548<\/span><\/p>\n<\/li>\n<li>\n<p><span style=\"font-size: 15px; font-family: \u5fae\u8f6f\u96c5\u9ed1, 'Microsoft YaHei';\">sso\u8ba4\u8bc1\u4e2d\u5fc3\u6821\u9a8c\u4ee4\u724c\uff0c\u8fd4\u56de\u6709\u6548\uff0c\u6ce8\u518c\u7cfb\u7edf1<\/span><\/p>\n<\/li>\n<li>\n<p><span style=\"font-size: 15px; font-family: \u5fae\u8f6f\u96c5\u9ed1, 'Microsoft YaHei';\">\u7cfb\u7edf1\u4f7f\u7528\u8be5\u4ee4\u724c\u521b\u5efa\u4e0e\u7528\u6237\u7684\u4f1a\u8bdd\uff0c\u79f0\u4e3a\u5c40\u90e8\u4f1a\u8bdd\uff0c\u8fd4\u56de\u53d7\u4fdd\u62a4\u8d44\u6e90<\/span><\/p>\n<\/li>\n<li>\n<p><span style=\"font-size: 15px; font-family: \u5fae\u8f6f\u96c5\u9ed1, 'Microsoft YaHei';\">\u7528\u6237\u8bbf\u95ee\u7cfb\u7edf2\u7684\u53d7\u4fdd\u62a4\u8d44\u6e90<\/span><\/p>\n<\/li>\n<li>\n<p><span style=\"font-size: 15px; font-family: \u5fae\u8f6f\u96c5\u9ed1, 'Microsoft YaHei';\">\u7cfb\u7edf2\u53d1\u73b0\u7528\u6237\u672a\u767b\u5f55\uff0c\u8df3\u8f6c\u81f3sso\u8ba4\u8bc1\u4e2d\u5fc3\uff0c\u5e76\u5c06\u81ea\u5df1\u7684\u5730\u5740\u4f5c\u4e3a\u53c2\u6570<\/span><\/p>\n<\/li>\n<li>\n<p><span style=\"font-size: 15px; font-family: \u5fae\u8f6f\u96c5\u9ed1, 'Microsoft YaHei';\">sso\u8ba4\u8bc1\u4e2d\u5fc3\u53d1\u73b0\u7528\u6237\u5df2\u767b\u5f55\uff0c\u8df3\u8f6c\u56de\u7cfb\u7edf2\u7684\u5730\u5740\uff0c\u5e76\u9644\u4e0a\u4ee4\u724c<\/span><\/p>\n<\/li>\n<li>\n<p><span style=\"font-size: 15px; font-family: \u5fae\u8f6f\u96c5\u9ed1, 'Microsoft YaHei';\">\u7cfb\u7edf2\u62ff\u5230\u4ee4\u724c\uff0c\u53bbsso\u8ba4\u8bc1\u4e2d\u5fc3\u6821\u9a8c\u4ee4\u724c\u662f\u5426\u6709\u6548<\/span><\/p>\n<\/li>\n<li>\n<p><span style=\"font-size: 15px; font-family: \u5fae\u8f6f\u96c5\u9ed1, 'Microsoft YaHei';\">sso\u8ba4\u8bc1\u4e2d\u5fc3\u6821\u9a8c\u4ee4\u724c\uff0c\u8fd4\u56de\u6709\u6548\uff0c\u6ce8\u518c\u7cfb\u7edf2<\/span><\/p>\n<\/li>\n<li>\n<p><span style=\"font-size: 15px; font-family: \u5fae\u8f6f\u96c5\u9ed1, 'Microsoft YaHei';\">\u7cfb\u7edf2\u4f7f\u7528\u8be5\u4ee4\u724c\u521b\u5efa\u4e0e\u7528\u6237\u7684\u5c40\u90e8\u4f1a\u8bdd\uff0c\u8fd4\u56de\u53d7\u4fdd\u62a4\u8d44\u6e90<\/span><\/p>\n<\/li>\n<\/ol>\n<\/section>\n<p>\u00a0<\/p>\n<p><span style=\"font-size: 15px; font-family: \u5fae\u8f6f\u96c5\u9ed1, 'Microsoft YaHei';\">\u7528\u6237\u767b\u5f55\u6210\u529f\u4e4b\u540e\uff0c\u4f1a\u4e0esso\u8ba4\u8bc1\u4e2d\u5fc3\u53ca\u5404\u4e2a\u5b50\u7cfb\u7edf\u5efa\u7acb\u4f1a\u8bdd\uff0c\u7528\u6237\u4e0esso\u8ba4\u8bc1\u4e2d\u5fc3\u5efa\u7acb\u7684\u4f1a\u8bdd\u79f0\u4e3a\u5168\u5c40\u4f1a\u8bdd\uff0c\u7528\u6237\u4e0e\u5404\u4e2a\u5b50\u7cfb\u7edf\u5efa\u7acb\u7684\u4f1a\u8bdd\u79f0\u4e3a\u5c40\u90e8\u4f1a\u8bdd\uff0c\u5c40\u90e8\u4f1a\u8bdd\u5efa\u7acb\u4e4b\u540e\uff0c\u7528\u6237\u8bbf\u95ee\u5b50\u7cfb\u7edf\u53d7\u4fdd\u62a4\u8d44\u6e90\u5c06\u4e0d\u518d\u901a\u8fc7sso\u8ba4\u8bc1\u4e2d\u5fc3\uff0c\u5168\u5c40\u4f1a\u8bdd\u4e0e\u5c40\u90e8\u4f1a\u8bdd\u6709\u5982\u4e0b\u7ea6\u675f\u5173\u7cfb<\/span><\/p>\n<p>\u00a0<\/p>\n<section>\n<ol class=\"list-paddingleft-2\">\n<li>\n<p><span style=\"font-size: 15px; font-family: \u5fae\u8f6f\u96c5\u9ed1, 'Microsoft YaHei';\">\u5c40\u90e8\u4f1a\u8bdd\u5b58\u5728\uff0c\u5168\u5c40\u4f1a\u8bdd\u4e00\u5b9a\u5b58\u5728<\/span><\/p>\n<\/li>\n<li>\n<p><span style=\"font-size: 15px; font-family: \u5fae\u8f6f\u96c5\u9ed1, 'Microsoft YaHei';\">\u5168\u5c40\u4f1a\u8bdd\u5b58\u5728\uff0c\u5c40\u90e8\u4f1a\u8bdd\u4e0d\u4e00\u5b9a\u5b58\u5728<\/span><\/p>\n<\/li>\n<li>\n<p><span style=\"font-size: 15px; font-family: \u5fae\u8f6f\u96c5\u9ed1, 'Microsoft YaHei';\">\u5168\u5c40\u4f1a\u8bdd\u9500\u6bc1\uff0c\u5c40\u90e8\u4f1a\u8bdd\u5fc5\u987b\u9500\u6bc1<\/span><\/p>\n<\/li>\n<\/ol>\n<\/section>\n<p>\u00a0<\/p>\n<p><span style=\"font-size: 15px; font-family: \u5fae\u8f6f\u96c5\u9ed1, 'Microsoft YaHei';\">\u4f60\u53ef\u4ee5\u901a\u8fc7\u535a\u5ba2\u56ed\u3001\u767e\u5ea6\u3001csdn\u3001\u6dd8\u5b9d\u7b49\u7f51\u7ad9\u7684\u767b\u5f55\u8fc7\u7a0b\u52a0\u6df1\u5bf9\u5355\u70b9\u767b\u5f55\u7684\u7406\u89e3\uff0c\u6ce8\u610f\u89c2\u5bdf\u767b\u5f55\u8fc7\u7a0b\u4e2d\u7684\u8df3\u8f6curl\u4e0e\u53c2\u6570<\/span><\/p>\n<p>\u00a0<\/p>\n<p><span style=\"font-size: 15px; font-family: \u5fae\u8f6f\u96c5\u9ed1, 'Microsoft YaHei';\">2\u3001\u6ce8\u9500<\/span><\/p>\n<p>\u00a0<\/p>\n<p><span style=\"font-size: 15px; font-family: \u5fae\u8f6f\u96c5\u9ed1, 'Microsoft YaHei';\">\u5355\u70b9\u767b\u5f55\u81ea\u7136\u4e5f\u8981\u5355\u70b9\u6ce8\u9500\uff0c\u5728\u4e00\u4e2a\u5b50\u7cfb\u7edf\u4e2d\u6ce8\u9500\uff0c\u6240\u6709\u5b50\u7cfb\u7edf\u7684\u4f1a\u8bdd\u90fd\u5c06\u88ab\u9500\u6bc1\uff0c\u7528\u4e0b\u9762\u7684\u56fe\u6765\u8bf4\u660e<br style=\"max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;\" \/><\/span><\/p>\n<p>\u00a0<\/p>\n<p><img decoding=\"async\" class=\"rich_pages\" style=\"font-size: 17px; letter-spacing: 0.544px; text-align: center; background-color: #ffffff; width: 100%; font-family: -apple-system-font, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif; box-sizing: border-box !important; word-wrap: break-word !important; visibility: visible !important;\" title=\"10\u5f20\u6d41\u7a0b\u56fe+\u90e8\u7f72\u56fe\uff0c\u8bb2\u900f\u5355\u70b9\u767b\u5f55\u539f\u7406\u4e0e\u7b80\u5355\u5b9e\u73b0\uff01\" src=\"http:\/\/www.zhushiyao.com\/wp-content\/uploads\/2020\/07\/7-1594911277.png\" alt=\"10\u5f20\u6d41\u7a0b\u56fe+\u90e8\u7f72\u56fe\uff0c\u8bb2\u900f\u5355\u70b9\u767b\u5f55\u539f\u7406\u4e0e\u7b80\u5355\u5b9e\u73b0\uff01\" \/><\/p>\n<p>\u00a0<\/p>\n<p><span style=\"font-size: 15px; font-family: \u5fae\u8f6f\u96c5\u9ed1, 'Microsoft YaHei';\">so\u8ba4\u8bc1\u4e2d\u5fc3\u4e00\u76f4\u76d1\u542c\u5168\u5c40\u4f1a\u8bdd\u7684\u72b6\u6001\uff0c\u4e00\u65e6\u5168\u5c40\u4f1a\u8bdd\u9500\u6bc1\uff0c\u76d1\u542c\u5668\u5c06\u901a\u77e5\u6240\u6709\u6ce8\u518c\u7cfb\u7edf\u6267\u884c\u6ce8\u9500\u64cd\u4f5c<\/span><\/p>\n<p>\u00a0<\/p>\n<p><span style=\"font-size: 15px; font-family: \u5fae\u8f6f\u96c5\u9ed1, 'Microsoft YaHei';\">\u4e0b\u9762\u5bf9\u4e0a\u56fe\u7b80\u8981\u8bf4\u660e<\/span><\/p>\n<p>\u00a0<\/p>\n<section>\n<ol class=\"list-paddingleft-2\">\n<li>\n<p><span style=\"font-size: 15px; font-family: \u5fae\u8f6f\u96c5\u9ed1, 'Microsoft YaHei';\">\u7528\u6237\u5411\u7cfb\u7edf1\u53d1\u8d77\u6ce8\u9500\u8bf7\u6c42<\/span><\/p>\n<\/li>\n<li>\n<p><span style=\"font-size: 15px; font-family: \u5fae\u8f6f\u96c5\u9ed1, 'Microsoft YaHei';\">\u7cfb\u7edf1\u6839\u636e\u7528\u6237\u4e0e\u7cfb\u7edf1\u5efa\u7acb\u7684\u4f1a\u8bddid\u62ff\u5230\u4ee4\u724c\uff0c\u5411sso\u8ba4\u8bc1\u4e2d\u5fc3\u53d1\u8d77\u6ce8\u9500\u8bf7\u6c42<\/span><\/p>\n<\/li>\n<li>\n<p><span style=\"font-size: 15px; font-family: \u5fae\u8f6f\u96c5\u9ed1, 'Microsoft YaHei';\">sso\u8ba4\u8bc1\u4e2d\u5fc3\u6821\u9a8c\u4ee4\u724c\u6709\u6548\uff0c\u9500\u6bc1\u5168\u5c40\u4f1a\u8bdd\uff0c\u540c\u65f6\u53d6\u51fa\u6240\u6709\u7528\u6b64\u4ee4\u724c\u6ce8\u518c\u7684\u7cfb\u7edf\u5730\u5740<\/span><\/p>\n<\/li>\n<li>\n<p><span style=\"font-size: 15px; font-family: \u5fae\u8f6f\u96c5\u9ed1, 'Microsoft YaHei';\">sso\u8ba4\u8bc1\u4e2d\u5fc3\u5411\u6240\u6709\u6ce8\u518c\u7cfb\u7edf\u53d1\u8d77\u6ce8\u9500\u8bf7\u6c42<\/span><\/p>\n<\/li>\n<li>\n<p><span style=\"font-size: 15px; font-family: \u5fae\u8f6f\u96c5\u9ed1, 'Microsoft YaHei';\">\u5404\u6ce8\u518c\u7cfb\u7edf\u63a5\u6536sso\u8ba4\u8bc1\u4e2d\u5fc3\u7684\u6ce8\u9500\u8bf7\u6c42\uff0c\u9500\u6bc1\u5c40\u90e8\u4f1a\u8bdd<\/span><\/p>\n<\/li>\n<li>\n<p><span style=\"font-size: 15px; font-family: \u5fae\u8f6f\u96c5\u9ed1, 'Microsoft YaHei';\">sso\u8ba4\u8bc1\u4e2d\u5fc3\u5f15\u5bfc\u7528\u6237\u81f3\u767b\u5f55\u9875\u9762<\/span><\/p>\n<\/li>\n<\/ol>\n<\/section>\n<p>\u00a0<\/p>\n<p><span style=\"font-family: \u5fae\u8f6f\u96c5\u9ed1, 'Microsoft YaHei'; font-size: 20px;\">\u56db\u3001\u90e8\u7f72\u56fe<\/span><\/p>\n<p>\u00a0<\/p>\n<p><span style=\"font-size: 15px; font-family: \u5fae\u8f6f\u96c5\u9ed1, 'Microsoft YaHei';\">\u5355\u70b9\u767b\u5f55\u6d89\u53casso\u8ba4\u8bc1\u4e2d\u5fc3\u4e0e\u4f17\u5b50\u7cfb\u7edf\uff0c\u5b50\u7cfb\u7edf\u4e0esso\u8ba4\u8bc1\u4e2d\u5fc3\u9700\u8981\u901a\u4fe1\u4ee5\u4ea4\u6362\u4ee4\u724c\u3001\u6821\u9a8c\u4ee4\u724c\u53ca\u53d1\u8d77\u6ce8\u9500\u8bf7\u6c42\uff0c\u56e0\u800c\u5b50\u7cfb\u7edf\u5fc5\u987b\u96c6\u6210sso\u7684\u5ba2\u6237\u7aef\uff0csso\u8ba4\u8bc1\u4e2d\u5fc3\u5219\u662fsso\u670d\u52a1\u7aef\uff0c\u6574\u4e2a\u5355\u70b9\u767b\u5f55\u8fc7\u7a0b\u5b9e\u8d28\u662fsso\u5ba2\u6237\u7aef\u4e0e\u670d\u52a1\u7aef\u901a\u4fe1\u7684\u8fc7\u7a0b\uff0c\u7528\u4e0b\u56fe\u63cf\u8ff0<br style=\"max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;\" \/><\/span><\/p>\n<p>\u00a0<\/p>\n<p><img decoding=\"async\" title=\"10\u5f20\u6d41\u7a0b\u56fe+\u90e8\u7f72\u56fe\uff0c\u8bb2\u900f\u5355\u70b9\u767b\u5f55\u539f\u7406\u4e0e\u7b80\u5355\u5b9e\u73b0\uff01\" src=\"http:\/\/www.zhushiyao.com\/wp-content\/uploads\/2020\/07\/2-1594911278.jpg\" alt=\"10\u5f20\u6d41\u7a0b\u56fe+\u90e8\u7f72\u56fe\uff0c\u8bb2\u900f\u5355\u70b9\u767b\u5f55\u539f\u7406\u4e0e\u7b80\u5355\u5b9e\u73b0\uff01\" \/><\/p>\n<p>\u00a0<\/p>\n<p><span style=\"font-size: 15px; font-family: \u5fae\u8f6f\u96c5\u9ed1, 'Microsoft YaHei';\">sso\u8ba4\u8bc1\u4e2d\u5fc3\u4e0esso\u5ba2\u6237\u7aef\u901a\u4fe1\u65b9\u5f0f\u6709\u591a\u79cd\uff0c\u8fd9\u91cc\u4ee5\u7b80\u5355\u597d\u7528\u7684httpClient\u4e3a\u4f8b\uff0cweb service\u3001rpc\u3001restful api\u90fd\u53ef\u4ee5<\/span><\/p>\n<p>\u00a0<\/p>\n<p><span style=\"font-family: \u5fae\u8f6f\u96c5\u9ed1, 'Microsoft YaHei'; font-size: 20px;\">\u4e94\u3001\u5b9e\u73b0<\/span><\/p>\n<p>\u00a0<\/p>\n<p><span style=\"font-size: 15px; font-family: \u5fae\u8f6f\u96c5\u9ed1, 'Microsoft YaHei';\">\u53ea\u662f\u7b80\u8981\u4ecb\u7ecd\u4e0b\u57fa\u4e8ejava\u7684\u5b9e\u73b0\u8fc7\u7a0b\uff0c\u4e0d\u63d0\u4f9b\u5b8c\u6574\u6e90\u7801\uff0c\u660e\u767d\u4e86\u539f\u7406\uff0c\u6211\u76f8\u4fe1\u4f60\u4eec\u53ef\u4ee5\u81ea\u5df1\u5b9e\u73b0\u3002sso\u91c7\u7528\u5ba2\u6237\u7aef\/\u670d\u52a1\u7aef\u67b6\u6784\uff0c\u6211\u4eec\u5148\u770bsso-client\u4e0esso-server\u8981\u5b9e\u73b0\u7684\u529f\u80fd\uff08\u4e0b\u9762\uff1asso\u8ba4\u8bc1\u4e2d\u5fc3=sso-server\uff09<br style=\"max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;\" \/><\/span><\/p>\n<p>\u00a0<\/p>\n<p><span style=\"font-size: 15px; font-family: \u5fae\u8f6f\u96c5\u9ed1, 'Microsoft YaHei';\">sso-client<\/span><\/p>\n<p>\u00a0<\/p>\n<section>\n<ol class=\"list-paddingleft-2\">\n<li>\n<p><span style=\"font-size: 15px; font-family: \u5fae\u8f6f\u96c5\u9ed1, 'Microsoft YaHei';\">\u62e6\u622a\u5b50\u7cfb\u7edf\u672a\u767b\u5f55\u7528\u6237\u8bf7\u6c42\uff0c\u8df3\u8f6c\u81f3sso\u8ba4\u8bc1\u4e2d\u5fc3<\/span><\/p>\n<\/li>\n<li>\n<p><span style=\"font-size: 15px; font-family: \u5fae\u8f6f\u96c5\u9ed1, 'Microsoft YaHei';\">\u63a5\u6536\u5e76\u5b58\u50a8sso\u8ba4\u8bc1\u4e2d\u5fc3\u53d1\u9001\u7684\u4ee4\u724c<\/span><\/p>\n<\/li>\n<li>\n<p><span style=\"font-size: 15px; font-family: \u5fae\u8f6f\u96c5\u9ed1, 'Microsoft YaHei';\">\u4e0esso-server\u901a\u4fe1\uff0c\u6821\u9a8c\u4ee4\u724c\u7684\u6709\u6548\u6027<\/span><\/p>\n<\/li>\n<li>\n<p><span style=\"font-size: 15px; font-family: \u5fae\u8f6f\u96c5\u9ed1, 'Microsoft YaHei';\">\u5efa\u7acb\u5c40\u90e8\u4f1a\u8bdd<\/span><\/p>\n<\/li>\n<li>\n<p><span style=\"font-size: 15px; font-family: \u5fae\u8f6f\u96c5\u9ed1, 'Microsoft YaHei';\">\u62e6\u622a\u7528\u6237\u6ce8\u9500\u8bf7\u6c42\uff0c\u5411sso\u8ba4\u8bc1\u4e2d\u5fc3\u53d1\u9001\u6ce8\u9500\u8bf7\u6c42<\/span><\/p>\n<\/li>\n<li>\n<p><span style=\"font-size: 15px; font-family: \u5fae\u8f6f\u96c5\u9ed1, 'Microsoft YaHei';\">\u63a5\u6536sso\u8ba4\u8bc1\u4e2d\u5fc3\u53d1\u51fa\u7684\u6ce8\u9500\u8bf7\u6c42\uff0c\u9500\u6bc1\u5c40\u90e8\u4f1a\u8bdd<\/span><\/p>\n<\/li>\n<\/ol>\n<\/section>\n<p>\u00a0<\/p>\n<p><span style=\"font-size: 15px; font-family: \u5fae\u8f6f\u96c5\u9ed1, 'Microsoft YaHei';\">sso-server<br style=\"max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;\" \/><\/span><\/p>\n<p>\u00a0<\/p>\n<section>\n<ol class=\"list-paddingleft-2\">\n<li>\n<p><span style=\"font-size: 15px; font-family: \u5fae\u8f6f\u96c5\u9ed1, 'Microsoft YaHei';\">\u9a8c\u8bc1\u7528\u6237\u7684\u767b\u5f55\u4fe1\u606f<\/span><\/p>\n<\/li>\n<li>\n<p><span style=\"font-size: 15px; font-family: \u5fae\u8f6f\u96c5\u9ed1, 'Microsoft YaHei';\">\u521b\u5efa\u5168\u5c40\u4f1a\u8bdd<\/span><\/p>\n<\/li>\n<li>\n<p><span style=\"font-size: 15px; font-family: \u5fae\u8f6f\u96c5\u9ed1, 'Microsoft YaHei';\">\u521b\u5efa\u6388\u6743\u4ee4\u724c<\/span><\/p>\n<\/li>\n<li>\n<p><span style=\"font-size: 15px; font-family: \u5fae\u8f6f\u96c5\u9ed1, 'Microsoft YaHei';\">\u4e0esso-client\u901a\u4fe1\u53d1\u9001\u4ee4\u724c<\/span><\/p>\n<\/li>\n<li>\n<p><span style=\"font-size: 15px; font-family: \u5fae\u8f6f\u96c5\u9ed1, 'Microsoft YaHei';\">\u6821\u9a8csso-client\u4ee4\u724c\u6709\u6548\u6027<\/span><\/p>\n<\/li>\n<li>\n<p><span style=\"font-size: 15px; font-family: \u5fae\u8f6f\u96c5\u9ed1, 'Microsoft YaHei';\">\u7cfb\u7edf\u6ce8\u518c<\/span><\/p>\n<\/li>\n<li>\n<p><span style=\"font-size: 15px; font-family: \u5fae\u8f6f\u96c5\u9ed1, 'Microsoft YaHei';\">\u63a5\u6536sso-client\u6ce8\u9500\u8bf7\u6c42\uff0c\u6ce8\u9500\u6240\u6709\u4f1a\u8bdd<\/span><\/p>\n<\/li>\n<\/ol>\n<\/section>\n<p>\u00a0<\/p>\n<p><span style=\"font-size: 15px; font-family: \u5fae\u8f6f\u96c5\u9ed1, 'Microsoft YaHei';\">\u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u6309\u7167\u539f\u7406\u6765\u4e00\u6b65\u6b65\u5b9e\u73b0sso\u5427\uff01<\/span><\/p>\n<p>\u00a0<\/p>\n<p><span style=\"font-size: 15px; font-family: \u5fae\u8f6f\u96c5\u9ed1, 'Microsoft YaHei';\">1\u3001sso-client\u62e6\u622a\u672a\u767b\u5f55\u8bf7\u6c42<\/span><\/p>\n<p>\u00a0<\/p>\n<p><span style=\"font-size: 15px; font-family: \u5fae\u8f6f\u96c5\u9ed1, 'Microsoft YaHei';\">java\u62e6\u622a\u8bf7\u6c42\u7684\u65b9\u5f0f\u6709servlet\u3001filter\u3001listener\u4e09\u79cd\u65b9\u5f0f\uff0c\u6211\u4eec\u91c7\u7528filter\u3002\u5728sso-client\u4e2d\u65b0\u5efaLoginFilter.java\u7c7b\u5e76\u5b9e\u73b0Filter\u63a5\u53e3\uff0c\u5728doFilter()\u65b9\u6cd5\u4e2d\u52a0\u5165\u5bf9\u672a\u767b\u5f55\u7528\u6237\u7684\u62e6\u622a<br style=\"max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;\" \/><\/span><\/p>\n<p style=\"max-width: 100%; min-height: 1em; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\u00a0<\/p>\n<pre style=\"max-width: 100%; overflow-x: auto; box-sizing: border-box !important; overflow-wrap: break-word !important;\"><code style=\"margin-right: 0.15em; margin-left: 0.15em; padding: 0.5em; max-width: 100%; font-size: 0.85em; overflow: auto; color: #abb2bf; text-size-adjust: none; min-width: 400px; background: none 0% 0% \/ auto repeat scroll padding-box border-box #282c34; font-family: Consolas, Menlo, Courier, monospace; box-sizing: border-box !important; word-wrap: break-word !important; display: block !important;\"><span style=\"max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;\"><span style=\"max-width: 100%; color: #c678dd;\">public<\/span> <span style=\"max-width: 100%; color: #c678dd;\">void<\/span> <span style=\"max-width: 100%; color: #61aeee;\">doFilter<\/span><span style=\"max-width: 100%;\">(ServletRequest request, ServletResponse response, FilterChain chain)<\/span> throws IOException, ServletException <\/span>{<br style=\"max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;\" \/> \u00a0 \u00a0HttpServletRequest req = (HttpServletRequest) request;<br style=\"max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;\" \/> \u00a0 \u00a0HttpServletResponse res = (HttpServletResponse) response;<br style=\"max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;\" \/> \u00a0 \u00a0HttpSession session = req.getSession();<br style=\"max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;\" \/> \u00a0 \u00a0<br style=\"max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;\" \/> \u00a0 \u00a0<span style=\"max-width: 100%; color: #c678dd; box-sizing: border-box !important; word-wrap: break-word !important;\">if<\/span> (session.getAttribute(<span style=\"max-width: 100%; color: #98c379; box-sizing: border-box !important; word-wrap: break-word !important;\">\"isLogin\"<\/span>)) {<br style=\"max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;\" \/> \u00a0 \u00a0 \u00a0 \u00a0chain.doFilter(request, response);<br style=\"max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;\" \/> \u00a0 \u00a0 \u00a0 \u00a0<span style=\"max-width: 100%; color: #c678dd; box-sizing: border-box !important; word-wrap: break-word !important;\">return<\/span>;<br style=\"max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;\" \/> \u00a0 \u00a0}<br style=\"max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;\" \/> \u00a0 \u00a0<span style=\"max-width: 100%; color: #5c6370; font-style: italic; box-sizing: border-box !important; word-wrap: break-word !important;\">\/\/\u8df3\u8f6c\u81f3sso\u8ba4\u8bc1\u4e2d\u5fc3<\/span><br style=\"max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;\" \/> \u00a0 \u00a0res.sendRedirect(<span style=\"max-width: 100%; color: #98c379; box-sizing: border-box !important; word-wrap: break-word !important;\">\"sso-server-url-with-system-url\"<\/span>);<br style=\"max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;\" \/>}<\/code><\/pre>\n<p style=\"max-width: 100%; min-height: 1em; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\u00a0<\/p>\n<p><span style=\"font-size: 15px; font-family: \u5fae\u8f6f\u96c5\u9ed1, 'Microsoft YaHei';\">2\u3001sso-server\u62e6\u622a\u672a\u767b\u5f55\u8bf7\u6c42<\/span><\/p>\n<p>\u00a0<\/p>\n<p><span style=\"font-size: 15px; font-family: \u5fae\u8f6f\u96c5\u9ed1, 'Microsoft YaHei';\">\u62e6\u622a\u4ecesso-client\u8df3\u8f6c\u81f3sso\u8ba4\u8bc1\u4e2d\u5fc3\u7684\u672a\u767b\u5f55\u8bf7\u6c42\uff0c\u8df3\u8f6c\u81f3\u767b\u5f55\u9875\u9762\uff0c\u8fd9\u4e2a\u8fc7\u7a0b\u4e0esso-client\u5b8c\u5168\u4e00\u6837<\/span><\/p>\n<p>\u00a0<\/p>\n<p><span style=\"font-size: 15px; font-family: \u5fae\u8f6f\u96c5\u9ed1, 'Microsoft YaHei';\">3\u3001sso-server\u9a8c\u8bc1\u7528\u6237\u767b\u5f55\u4fe1\u606f<\/span><\/p>\n<p>\u00a0<\/p>\n<p><span style=\"font-size: 15px; font-family: \u5fae\u8f6f\u96c5\u9ed1, 'Microsoft YaHei';\">\u7528\u6237\u5728\u767b\u5f55\u9875\u9762\u8f93\u5165\u7528\u6237\u540d\u5bc6\u7801\uff0c\u8bf7\u6c42\u767b\u5f55\uff0csso\u8ba4\u8bc1\u4e2d\u5fc3\u6821\u9a8c\u7528\u6237\u4fe1\u606f\uff0c\u6821\u9a8c\u6210\u529f\uff0c\u5c06\u4f1a\u8bdd\u72b6\u6001\u6807\u8bb0\u4e3a\u201c\u5df2\u767b\u5f55\u201d<\/span><\/p>\n<p>\u00a0<\/p>\n<pre style=\"max-width: 100%; overflow-x: auto; box-sizing: border-box !important; overflow-wrap: break-word !important;\"><code style=\"margin-right: 0.15em; margin-left: 0.15em; padding: 0.5em; max-width: 100%; font-size: 0.85em; overflow: auto; color: #abb2bf; text-size-adjust: none; min-width: 400px; background: none 0% 0% \/ auto repeat scroll padding-box border-box #282c34; font-family: Consolas, Menlo, Courier, monospace; box-sizing: border-box !important; word-wrap: break-word !important; display: block !important;\">@RequestMapping(<span style=\"max-width: 100%; color: #98c379; box-sizing: border-box !important; word-wrap: break-word !important;\">\"\/login\"<\/span>)<br style=\"max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;\" \/><span style=\"max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;\"><span style=\"max-width: 100%; color: #c678dd;\">public<\/span> String <span style=\"max-width: 100%; color: #61aeee;\">login<\/span><span style=\"max-width: 100%;\">(String username, String password, HttpServletRequest req)<\/span> <\/span>{<br style=\"max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;\" \/> \u00a0 \u00a0<span style=\"max-width: 100%; color: #c678dd; box-sizing: border-box !important; word-wrap: break-word !important;\">this<\/span>.checkLoginInfo(username, password);<br style=\"max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;\" \/> \u00a0 \u00a0req.getSession().setAttribute(<span style=\"max-width: 100%; color: #98c379; box-sizing: border-box !important; word-wrap: break-word !important;\">\"isLogin\"<\/span>, <span style=\"max-width: 100%; color: #56b6c2; box-sizing: border-box !important; word-wrap: break-word !important;\">true<\/span>);<br style=\"max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;\" \/> \u00a0 \u00a0<span style=\"max-width: 100%; color: #c678dd; box-sizing: border-box !important; word-wrap: break-word !important;\">return<\/span> <span style=\"max-width: 100%; color: #98c379; box-sizing: border-box !important; word-wrap: break-word !important;\">\"success\"<\/span>;<br style=\"max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;\" \/>}<\/code><\/pre>\n<p>\u00a0<\/p>\n<p><span style=\"font-size: 15px; font-family: \u5fae\u8f6f\u96c5\u9ed1, 'Microsoft YaHei';\">4\u3001sso-server\u521b\u5efa\u6388\u6743\u4ee4\u724c<\/span><\/p>\n<p>\u00a0<\/p>\n<p><span style=\"font-size: 15px; font-family: \u5fae\u8f6f\u96c5\u9ed1, 'Microsoft YaHei';\">\u6388\u6743\u4ee4\u724c\u662f\u4e00\u4e32\u968f\u673a\u5b57\u7b26\uff0c\u4ee5\u4ec0\u4e48\u6837\u7684\u65b9\u5f0f\u751f\u6210\u90fd\u6ca1\u6709\u5173\u7cfb\uff0c\u53ea\u8981\u4e0d\u91cd\u590d\u3001\u4e0d\u6613\u4f2a\u9020\u5373\u53ef\uff0c\u4e0b\u9762\u662f\u4e00\u4e2a\u4f8b\u5b50<\/span><\/p>\n<p style=\"max-width: 100%; min-height: 1em; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\u00a0<\/p>\n<pre style=\"max-width: 100%; overflow-x: auto; box-sizing: border-box !important; overflow-wrap: break-word !important;\"><code style=\"margin-right: 0.15em; margin-left: 0.15em; padding: 0.5em; max-width: 100%; font-size: 0.85em; overflow: auto; color: #abb2bf; text-size-adjust: none; min-width: 400px; background: none 0% 0% \/ auto repeat scroll padding-box border-box #282c34; font-family: Consolas, Menlo, Courier, monospace; box-sizing: border-box !important; word-wrap: break-word !important; display: block !important;\">String token = UUID.randomUUID().toString();<\/code><\/pre>\n<p>\u00a0<\/p>\n<p><span style=\"font-size: 15px;\">5\u3001sso-client\u53d6\u5f97\u4ee4\u724c\u5e76\u6821\u9a8c<\/span><\/p>\n<p>\u00a0<\/p>\n<p><span style=\"font-size: 15px;\">sso\u8ba4\u8bc1\u4e2d\u5fc3\u767b\u5f55\u540e\uff0c\u8df3\u8f6c\u56de\u5b50\u7cfb\u7edf\u5e76\u9644\u4e0a\u4ee4\u724c\uff0c\u5b50\u7cfb\u7edf\uff08sso-client\uff09\u53d6\u5f97\u4ee4\u724c\uff0c\u7136\u540e\u53bbsso\u8ba4\u8bc1\u4e2d\u5fc3\u6821\u9a8c\uff0c\u5728LoginFilter.java\u7684doFilter()\u4e2d\u6dfb\u52a0\u51e0\u884c<\/span><\/p>\n<p>\u00a0<\/p>\n<pre style=\"max-width: 100%; overflow-x: auto; box-sizing: border-box !important; overflow-wrap: break-word !important;\"><code style=\"margin-right: 0.15em; margin-left: 0.15em; padding: 0.5em; max-width: 100%; font-size: 0.85em; overflow: auto; color: #abb2bf; text-size-adjust: none; min-width: 400px; background: none 0% 0% \/ auto repeat scroll padding-box border-box #282c34; font-family: Consolas, Menlo, Courier, monospace; box-sizing: border-box !important; word-wrap: break-word !important; display: block !important;\"><span style=\"max-width: 100%; color: #5c6370; font-style: italic; box-sizing: border-box !important; word-wrap: break-word !important;\">\/\/ \u8bf7\u6c42\u9644\u5e26token\u53c2\u6570<\/span><br style=\"max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;\" \/>String token = req.getParameter(<span style=\"max-width: 100%; color: #98c379; box-sizing: border-box !important; word-wrap: break-word !important;\">\"token\"<\/span>);<br style=\"max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;\" \/><span style=\"max-width: 100%; color: #c678dd; box-sizing: border-box !important; word-wrap: break-word !important;\">if<\/span> (token != null) {<br style=\"max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;\" \/> \u00a0 \u00a0<span style=\"max-width: 100%; color: #5c6370; font-style: italic; box-sizing: border-box !important; word-wrap: break-word !important;\">\/\/ \u53bbsso\u8ba4\u8bc1\u4e2d\u5fc3\u6821\u9a8ctoken<\/span><br style=\"max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;\" \/> \u00a0 \u00a0boolean verifyResult = <span style=\"max-width: 100%; color: #c678dd; box-sizing: border-box !important; word-wrap: break-word !important;\">this<\/span>.verify(<span style=\"max-width: 100%; color: #98c379; box-sizing: border-box !important; word-wrap: break-word !important;\">\"sso-server-verify-url\"<\/span>, token);<br style=\"max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;\" \/> \u00a0 \u00a0<span style=\"max-width: 100%; color: #c678dd; box-sizing: border-box !important; word-wrap: break-word !important;\">if<\/span> (!verifyResult) {<br style=\"max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;\" \/> \u00a0 \u00a0 \u00a0 \u00a0res.sendRedirect(<span style=\"max-width: 100%; color: #98c379; box-sizing: border-box !important; word-wrap: break-word !important;\">\"sso-server-url\"<\/span>);<br style=\"max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;\" \/> \u00a0 \u00a0 \u00a0 \u00a0<span style=\"max-width: 100%; color: #c678dd; box-sizing: border-box !important; word-wrap: break-word !important;\">return<\/span>;<br style=\"max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;\" \/> \u00a0 \u00a0}<br style=\"max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;\" \/> \u00a0 \u00a0chain.doFilter(request, response);<br style=\"max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;\" \/>}<\/code><\/pre>\n<p>\u00a0<\/p>\n<p><span style=\"font-size: 15px;\">verify()\u65b9\u6cd5\u4f7f\u7528httpClient\u5b9e\u73b0\uff0c\u8fd9\u91cc\u4ec5\u7b80\u7565\u4ecb\u7ecd\uff0chttpClient\u8be6\u7ec6\u4f7f\u7528\u65b9\u6cd5\u8bf7\u53c2\u8003\u5b98\u65b9\u6587\u6863<\/span><\/p>\n<p style=\"max-width: 100%; min-height: 1em; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\u00a0<\/p>\n<pre style=\"max-width: 100%; overflow-x: auto; box-sizing: border-box !important; overflow-wrap: break-word !important;\"><code style=\"margin-right: 0.15em; margin-left: 0.15em; padding: 0.5em; max-width: 100%; font-size: 0.85em; overflow: auto; color: #abb2bf; text-size-adjust: none; min-width: 400px; background: none 0% 0% \/ auto repeat scroll padding-box border-box #282c34; font-family: Consolas, Menlo, Courier, monospace; box-sizing: border-box !important; word-wrap: break-word !important; display: block !important;\">HttpPost httpPost = <span style=\"max-width: 100%; color: #c678dd; box-sizing: border-box !important; word-wrap: break-word !important;\">new<\/span> HttpPost(<span style=\"max-width: 100%; color: #98c379; box-sizing: border-box !important; word-wrap: break-word !important;\">\"sso-server-verify-url-with-token\"<\/span>);<br style=\"max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;\" \/>HttpResponse httpResponse = httpClient.execute(httpPost);<\/code><\/pre>\n<p style=\"max-width: 100%; min-height: 1em; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\u00a0<\/p>\n<p><span style=\"font-size: 15px; font-family: \u5fae\u8f6f\u96c5\u9ed1, 'Microsoft YaHei';\">6\u3001sso-server\u63a5\u6536\u5e76\u5904\u7406\u6821\u9a8c\u4ee4\u724c\u8bf7\u6c42<\/span><\/p>\n<p>\u00a0<\/p>\n<p><span style=\"font-size: 15px; font-family: \u5fae\u8f6f\u96c5\u9ed1, 'Microsoft YaHei';\">\u7528\u6237\u5728sso\u8ba4\u8bc1\u4e2d\u5fc3\u767b\u5f55\u6210\u529f\u540e\uff0csso-server\u521b\u5efa\u6388\u6743\u4ee4\u724c\u5e76\u5b58\u50a8\u8be5\u4ee4\u724c\uff0c\u6240\u4ee5\uff0csso-server\u5bf9\u4ee4\u724c\u7684\u6821\u9a8c\u5c31\u662f\u53bb\u67e5\u627e\u8fd9\u4e2a\u4ee4\u724c\u662f\u5426\u5b58\u5728\u4ee5\u53ca\u662f\u5426\u8fc7\u671f\uff0c\u4ee4\u724c\u6821\u9a8c\u6210\u529f\u540esso-server\u5c06\u53d1\u9001\u6821\u9a8c\u8bf7\u6c42\u7684\u7cfb\u7edf\u6ce8\u518c\u5230sso\u8ba4\u8bc1\u4e2d\u5fc3\uff08\u5c31\u662f\u5b58\u50a8\u8d77\u6765\u7684\u610f\u601d\uff09<br style=\"max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;\" \/><\/span><\/p>\n<p>\u00a0<\/p>\n<p><span style=\"font-size: 15px; font-family: \u5fae\u8f6f\u96c5\u9ed1, 'Microsoft YaHei';\">\u4ee4\u724c\u4e0e\u6ce8\u518c\u7cfb\u7edf\u5730\u5740\u901a\u5e38\u5b58\u50a8\u5728key-value\u6570\u636e\u5e93\uff08\u5982redis\uff09\u4e2d\uff0credis\u53ef\u4ee5\u4e3akey\u8bbe\u7f6e\u6709\u6548\u65f6\u95f4\u4e5f\u5c31\u662f\u4ee4\u724c\u7684\u6709\u6548\u671f\u3002redis\u8fd0\u884c\u5728\u5185\u5b58\u4e2d\uff0c\u901f\u5ea6\u975e\u5e38\u5feb\uff0c\u6b63\u597dsso-server\u4e0d\u9700\u8981\u6301\u4e45\u5316\u4efb\u4f55\u6570\u636e\u3002<br style=\"max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;\" \/><\/span><\/p>\n<p>\u00a0<\/p>\n<p><span style=\"font-size: 15px; font-family: \u5fae\u8f6f\u96c5\u9ed1, 'Microsoft YaHei';\">\u4ee4\u724c\u4e0e\u6ce8\u518c\u7cfb\u7edf\u5730\u5740\u53ef\u4ee5\u7528\u4e0b\u56fe\u63cf\u8ff0\u7684\u7ed3\u6784\u5b58\u50a8\u5728redis\u4e2d\uff0c\u53ef\u80fd\u4f60\u4f1a\u95ee\uff0c\u4e3a\u4ec0\u4e48\u8981\u5b58\u50a8\u8fd9\u4e9b\u7cfb\u7edf\u7684\u5730\u5740\uff1f<\/span><\/p>\n<p>\u00a0<\/p>\n<p><span style=\"font-size: 15px; font-family: \u5fae\u8f6f\u96c5\u9ed1, 'Microsoft YaHei';\">\u5982\u679c\u4e0d\u5b58\u50a8\uff0c\u6ce8\u9500\u7684\u65f6\u5019\u5c31\u9ebb\u70e6\u4e86\uff0c\u7528\u6237\u5411sso\u8ba4\u8bc1\u4e2d\u5fc3\u63d0\u4ea4\u6ce8\u9500\u8bf7\u6c42\uff0csso\u8ba4\u8bc1\u4e2d\u5fc3\u6ce8\u9500\u5168\u5c40\u4f1a\u8bdd\uff0c\u4f46\u4e0d\u77e5\u9053\u54ea\u4e9b\u7cfb\u7edf\u7528\u6b64\u5168\u5c40\u4f1a\u8bdd\u5efa\u7acb\u4e86\u81ea\u5df1\u7684\u5c40\u90e8\u4f1a\u8bdd\uff0c\u4e5f\u4e0d\u77e5\u9053\u8981\u5411\u54ea\u4e9b\u5b50\u7cfb\u7edf\u53d1\u9001\u6ce8\u9500\u8bf7\u6c42\u6ce8\u9500\u5c40\u90e8\u4f1a\u8bdd<br style=\"max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;\" \/><\/span><\/p>\n<p>\u00a0<\/p>\n<p><img decoding=\"async\" title=\"10\u5f20\u6d41\u7a0b\u56fe+\u90e8\u7f72\u56fe\uff0c\u8bb2\u900f\u5355\u70b9\u767b\u5f55\u539f\u7406\u4e0e\u7b80\u5355\u5b9e\u73b0\uff01\" src=\"http:\/\/www.zhushiyao.com\/wp-content\/uploads\/2020\/07\/0-1594911278.png\" alt=\"10\u5f20\u6d41\u7a0b\u56fe+\u90e8\u7f72\u56fe\uff0c\u8bb2\u900f\u5355\u70b9\u767b\u5f55\u539f\u7406\u4e0e\u7b80\u5355\u5b9e\u73b0\uff01\" \/><\/p>\n<p>\u00a0<\/p>\n<p><span style=\"font-size: 15px; font-family: \u5fae\u8f6f\u96c5\u9ed1, 'Microsoft YaHei';\">7\u3001sso-client\u6821\u9a8c\u4ee4\u724c\u6210\u529f\u521b\u5efa\u5c40\u90e8\u4f1a\u8bdd<\/span><\/p>\n<p>\u00a0<\/p>\n<p><span style=\"font-size: 15px; font-family: \u5fae\u8f6f\u96c5\u9ed1, 'Microsoft YaHei';\">\u4ee4\u724c\u6821\u9a8c\u6210\u529f\u540e\uff0csso-client\u5c06\u5f53\u524d\u5c40\u90e8\u4f1a\u8bdd\u6807\u8bb0\u4e3a\u201c\u5df2\u767b\u5f55\u201d\uff0c\u4fee\u6539LoginFilter.java\uff0c\u6dfb\u52a0\u51e0\u884c<\/span><\/p>\n<p style=\"max-width: 100%; min-height: 1em; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\u00a0<\/p>\n<pre style=\"max-width: 100%; overflow-x: auto; box-sizing: border-box !important; overflow-wrap: break-word !important;\"><code style=\"margin-right: 0.15em; margin-left: 0.15em; padding: 0.5em; max-width: 100%; font-size: 0.85em; overflow: auto; color: #abb2bf; text-size-adjust: none; min-width: 400px; background: none 0% 0% \/ auto repeat scroll padding-box border-box #282c34; font-family: Consolas, Menlo, Courier, monospace; box-sizing: border-box !important; word-wrap: break-word !important; display: block !important;\"><span style=\"max-width: 100%; color: #c678dd; box-sizing: border-box !important; word-wrap: break-word !important;\">if<\/span> (verifyResult) {<br style=\"max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;\" \/> \u00a0 \u00a0session.setAttribute(<span style=\"max-width: 100%; color: #98c379; box-sizing: border-box !important; word-wrap: break-word !important;\">\"isLogin\"<\/span>, <span style=\"max-width: 100%; color: #56b6c2; box-sizing: border-box !important; word-wrap: break-word !important;\">true<\/span>);<br style=\"max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;\" \/>}<\/code><\/pre>\n<p>\u00a0<\/p>\n<p><span style=\"font-size: 15px; font-family: \u5fae\u8f6f\u96c5\u9ed1, 'Microsoft YaHei';\">sso-client\u8fd8\u9700\u5c06\u5f53\u524d\u4f1a\u8bddid\u4e0e\u4ee4\u724c\u7ed1\u5b9a\uff0c\u8868\u793a\u8fd9\u4e2a\u4f1a\u8bdd\u7684\u767b\u5f55\u72b6\u6001\u4e0e\u4ee4\u724c\u76f8\u5173\uff0c\u6b64\u5173\u7cfb\u53ef\u4ee5\u7528java\u7684hashmap\u4fdd\u5b58\uff0c\u4fdd\u5b58\u7684\u6570\u636e\u7528\u6765\u5904\u7406sso\u8ba4\u8bc1\u4e2d\u5fc3\u53d1\u6765\u7684\u6ce8\u9500\u8bf7\u6c42<\/span><\/p>\n<p>\u00a0<\/p>\n<p><span style=\"font-size: 15px; font-family: \u5fae\u8f6f\u96c5\u9ed1, 'Microsoft YaHei';\">8\u3001\u6ce8\u9500\u8fc7\u7a0b<\/span><\/p>\n<p>\u00a0<\/p>\n<p><span style=\"font-size: 15px; font-family: \u5fae\u8f6f\u96c5\u9ed1, 'Microsoft YaHei';\">\u7528\u6237\u5411\u5b50\u7cfb\u7edf\u53d1\u9001\u5e26\u6709\u201clogout\u201d\u53c2\u6570\u7684\u8bf7\u6c42\uff08\u6ce8\u9500\u8bf7\u6c42\uff09\uff0csso-client\u62e6\u622a\u5668\u62e6\u622a\u8be5\u8bf7\u6c42\uff0c\u5411sso\u8ba4\u8bc1\u4e2d\u5fc3\u53d1\u8d77\u6ce8\u9500\u8bf7\u6c42<br style=\"max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;\" \/><\/span><\/p>\n<p>\u00a0<\/p>\n<pre style=\"max-width: 100%; overflow-x: auto; box-sizing: border-box !important; overflow-wrap: break-word !important;\"><code style=\"margin-right: 0.15em; margin-left: 0.15em; padding: 0.5em; max-width: 100%; font-size: 0.85em; overflow: auto; color: #abb2bf; text-size-adjust: none; min-width: 400px; background: none 0% 0% \/ auto repeat scroll padding-box border-box #282c34; font-family: Consolas, Menlo, Courier, monospace; box-sizing: border-box !important; word-wrap: break-word !important; display: block !important;\">String logout = req.getParameter(<span style=\"max-width: 100%; color: #98c379; box-sizing: border-box !important; word-wrap: break-word !important;\">\"logout\"<\/span>);<br style=\"max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;\" \/><span style=\"max-width: 100%; color: #c678dd; box-sizing: border-box !important; word-wrap: break-word !important;\">if<\/span> (logout != null) {<br style=\"max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;\" \/> \u00a0 \u00a0<span style=\"max-width: 100%; color: #c678dd; box-sizing: border-box !important; word-wrap: break-word !important;\">this<\/span>.ssoServer.logout(token);<br style=\"max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;\" \/>}<\/code><\/pre>\n<p>\u00a0<\/p>\n<p><span style=\"font-size: 15px; font-family: \u5fae\u8f6f\u96c5\u9ed1, 'Microsoft YaHei';\">sso\u8ba4\u8bc1\u4e2d\u5fc3\u4e5f\u7528\u540c\u6837\u7684\u65b9\u5f0f\u8bc6\u522b\u51fasso-client\u7684\u8bf7\u6c42\u662f\u6ce8\u9500\u8bf7\u6c42\uff08\u5e26\u6709\u201clogout\u201d\u53c2\u6570\uff09\uff0csso\u8ba4\u8bc1\u4e2d\u5fc3\u6ce8\u9500\u5168\u5c40\u4f1a\u8bdd<\/span><\/p>\n<p style=\"max-width: 100%; min-height: 1em; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\u00a0<\/p>\n<pre style=\"max-width: 100%; overflow-x: auto; box-sizing: border-box !important; overflow-wrap: break-word !important;\"><code style=\"margin-right: 0.15em; margin-left: 0.15em; padding: 0.5em; max-width: 100%; font-size: 0.85em; overflow: auto; color: #abb2bf; text-size-adjust: none; min-width: 400px; background: none 0% 0% \/ auto repeat scroll padding-box border-box #282c34; font-family: Consolas, Menlo, Courier, monospace; box-sizing: border-box !important; word-wrap: break-word !important; display: block !important;\">@RequestMapping(<span style=\"max-width: 100%; color: #98c379; box-sizing: border-box !important; word-wrap: break-word !important;\">\"\/logout\"<\/span>)<br style=\"max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;\" \/><span style=\"max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;\"><span style=\"max-width: 100%; color: #c678dd;\">public<\/span> String <span style=\"max-width: 100%; color: #61aeee;\">logout<\/span><span style=\"max-width: 100%;\">(HttpServletRequest req)<\/span> <\/span>{<br style=\"max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;\" \/> \u00a0 \u00a0HttpSession session = req.getSession();<br style=\"max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;\" \/> \u00a0 \u00a0<span style=\"max-width: 100%; color: #c678dd; box-sizing: border-box !important; word-wrap: break-word !important;\">if<\/span> (session != null) {<br style=\"max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;\" \/> \u00a0 \u00a0 \u00a0 \u00a0session.invalidate();<span style=\"max-width: 100%; color: #5c6370; font-style: italic; box-sizing: border-box !important; word-wrap: break-word !important;\">\/\/\u89e6\u53d1LogoutListener<\/span><br style=\"max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;\" \/> \u00a0 \u00a0}<br style=\"max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;\" \/> \u00a0 \u00a0<span style=\"max-width: 100%; color: #c678dd; box-sizing: border-box !important; word-wrap: break-word !important;\">return<\/span> <span style=\"max-width: 100%; color: #98c379; box-sizing: border-box !important; word-wrap: break-word !important;\">\"redirect:\/\"<\/span>;<br style=\"max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;\" \/>}<\/code><\/pre>\n<p>\u00a0<\/p>\n<p><span style=\"font-size: 15px;\">sso\u8ba4\u8bc1\u4e2d\u5fc3\u6709\u4e00\u4e2a\u5168\u5c40\u4f1a\u8bdd\u7684\u76d1\u542c\u5668\uff0c\u4e00\u65e6\u5168\u5c40\u4f1a\u8bdd\u6ce8\u9500\uff0c\u5c06\u901a\u77e5\u6240\u6709\u6ce8\u518c\u7cfb\u7edf\u6ce8\u9500<\/span><\/p>\n<p>\u00a0<\/p>\n<pre style=\"max-width: 100%; overflow-x: auto; box-sizing: border-box !important; overflow-wrap: break-word !important;\"><code style=\"margin-right: 0.15em; margin-left: 0.15em; padding: 0.5em; max-width: 100%; letter-spacing: 0.544px; font-size: 0.85em; overflow: auto; color: #abb2bf; text-size-adjust: none; min-width: 400px; background: none 0% 0% \/ auto repeat scroll padding-box border-box #282c34; font-family: Consolas, Menlo, Courier, monospace; box-sizing: border-box !important; word-wrap: break-word !important; display: block !important;\"><span style=\"max-width: 100%; color: #c678dd; box-sizing: border-box !important; word-wrap: break-word !important;\">public<\/span> <span style=\"max-width: 100%; color: #c678dd; box-sizing: border-box !important; word-wrap: break-word !important;\">class<\/span> LogoutListener implements HttpSessionListener {<br style=\"max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;\" \/> \u00a0 \u00a0@<span style=\"max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;\">Override<br style=\"max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;\" \/> \u00a0 \u00a0<span style=\"max-width: 100%; color: #c678dd;\">public<\/span> <span style=\"max-width: 100%; color: #c678dd;\">void<\/span> <span style=\"max-width: 100%; color: #61aeee;\">sessionCreated<\/span><span style=\"max-width: 100%;\">(HttpSessionEvent event)<\/span> <\/span>{}<br style=\"max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;\" \/> \u00a0 \u00a0@<span style=\"max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;\">Override<br style=\"max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;\" \/> \u00a0 \u00a0<span style=\"max-width: 100%; color: #c678dd;\">public<\/span> <span style=\"max-width: 100%; color: #c678dd;\">void<\/span> <span style=\"max-width: 100%; color: #61aeee;\">sessionDestroyed<\/span><span style=\"max-width: 100%;\">(HttpSessionEvent event)<\/span> <\/span>{<br style=\"max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;\" \/> \u00a0 \u00a0 \u00a0 \u00a0<span style=\"max-width: 100%; color: #5c6370; font-style: italic; box-sizing: border-box !important; word-wrap: break-word !important;\">\/\/\u901a\u8fc7httpClient\u5411\u6240\u6709\u6ce8\u518c\u7cfb\u7edf\u53d1\u9001\u6ce8\u9500\u8bf7\u6c42<\/span><br style=\"max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;\" \/> \u00a0 \u00a0}<br style=\"max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;\" \/>}<\/code><\/pre>\n<p>\u00a0<\/p>\n<p style=\"margin-top: 25px; margin-right: 14px; margin-bottom: 25px; white-space: normal; max-width: 100%; min-height: 1em; font-family: -apple-system-font, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif; letter-spacing: 0.544px; background: #ffffff; line-height: 2em; text-align: center; box-sizing: border-box !important; overflow-wrap: break-word !important;\"><strong style=\"color: #3e3e3e; font-family: \u5fae\u8f6f\u96c5\u9ed1; max-width: 100%; font-size: 16.3636px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\u00b7END\u00b7<\/strong><\/p>\n<section style=\"white-space: normal; max-width: 100%; color: #3e3e3e; font-size: 16px; line-height: 25.6px; background-color: #ffffff; font-family: \u5fae\u8f6f\u96c5\u9ed1; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\n<section style=\"max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\n<section style=\"max-width: 100%; line-height: 25.6px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\n<section style=\"max-width: 100%; line-height: 25.6px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\n<section style=\"max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\n<section style=\"max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\n<section style=\"max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\n<section style=\"max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\"><\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/div>\n\n\n<p>\u8f6c\u81ea\uff1ahttps:\/\/mp.weixin.qq.com\/s\/WV6dhQ34wWUAeiTaipisIA<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4f5c\u8005\uff1a\u51cc\u627f\u4e00 \u539f\u6587\uff1awww.cnblogs.com\/ywlaker\/p\/6113927.html \u00a0 \u00a0 \u4e00\u3001 &hellip; <a href=\"http:\/\/www.zhushiyao.com\/?p=33200\" class=\"more-link\">\u7ee7\u7eed\u9605\u8bfb<span class=\"screen-reader-text\">\u201c10\u5f20\u6d41\u7a0b\u56fe+\u90e8\u7f72\u56fe\uff0c\u8bb2\u900f\u5355\u70b9\u767b\u5f55\u539f\u7406\u4e0e\u7b80\u5355\u5b9e\u73b0\uff01\u201d<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[2],"tags":[754,755],"_links":{"self":[{"href":"http:\/\/www.zhushiyao.com\/index.php?rest_route=\/wp\/v2\/posts\/33200"}],"collection":[{"href":"http:\/\/www.zhushiyao.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.zhushiyao.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.zhushiyao.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.zhushiyao.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=33200"}],"version-history":[{"count":2,"href":"http:\/\/www.zhushiyao.com\/index.php?rest_route=\/wp\/v2\/posts\/33200\/revisions"}],"predecessor-version":[{"id":33215,"href":"http:\/\/www.zhushiyao.com\/index.php?rest_route=\/wp\/v2\/posts\/33200\/revisions\/33215"}],"wp:attachment":[{"href":"http:\/\/www.zhushiyao.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=33200"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.zhushiyao.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=33200"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.zhushiyao.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=33200"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}