{"id":221,"date":"2022-03-30T09:34:18","date_gmt":"2022-03-30T01:34:18","guid":{"rendered":"https:\/\/blog.lijiajia.top\/?p=221"},"modified":"2026-06-19T21:29:10","modified_gmt":"2026-06-19T13:29:10","slug":"springsecurity%e6%a1%86%e6%9e%b6%e4%b8%80","status":"publish","type":"post","link":"https:\/\/blog.ttwow.top\/?p=221","title":{"rendered":"SpringSecurity\u6846\u67b6\u5b66\u4e60\uff1a\u4ecb\u7ecd(\u4e00)"},"content":{"rendered":"<p>\u7cfb\u5217\u77e5\u8bc6\u70b9\u6765\u6e90\u4e8e\u5c1a\u7845\u8c37\u6559\u7a0b\uff1a<\/p>\n<\/p>\n<h2>1.1 \u6982\u8981<\/h2>\n<p>Spring \u662f\u975e\u5e38\u6d41\u884c\u548c\u6210\u529f\u7684 Java \u5e94\u7528\u5f00\u53d1\u6846\u67b6\uff0cSpring Security \u6b63\u662f Spring \u5bb6\u65cf\u4e2d\u7684<br \/>\n\u6210\u5458\u3002Spring Security \u57fa\u4e8e Spring \u6846\u67b6\uff0c\u63d0\u4f9b\u4e86\u4e00\u5957 Web \u5e94\u7528\u5b89\u5168\u6027\u7684\u5b8c\u6574\u89e3\u51b3\u65b9<br \/>\n\u6848\u3002<br \/>\n\u6b63\u5982\u4f60\u53ef\u80fd\u77e5\u9053\u7684\u5173\u4e8e\u5b89\u5168\u65b9\u9762\u7684\u4e24\u4e2a\u4e3b\u8981\u533a\u57df\u662f\u201c<strong>\u8ba4\u8bc1<\/strong>\u201d\u548c\u201c<strong>\u6388\u6743<\/strong>\u201d\uff08\u6216\u8005\u8bbf\u95ee\u63a7<br \/>\n\u5236\uff09\uff0c\u4e00\u822c\u6765\u8bf4\uff0cWeb \u5e94\u7528\u7684\u5b89\u5168\u6027\u5305\u62ec\u7528\u6237\u8ba4\u8bc1\uff08Authentication\uff09\u548c\u7528\u6237\u6388\u6743<br \/>\n\uff08Authorization\uff09\u4e24\u4e2a\u90e8\u5206\uff0c\u8fd9\u4e24\u70b9\u4e5f\u662fSpring Security\u91cd\u8981\u6838\u5fc3\u529f\u80fd\u3002<br \/>\n\uff081\uff09\u7528\u6237\u8ba4\u8bc1\u6307\u7684\u662f\uff1a\u9a8c\u8bc1\u67d0\u4e2a\u7528\u6237\u662f\u5426\u4e3a\u7cfb\u7edf\u4e2d\u7684\u5408\u6cd5\u4e3b\u4f53\uff0c\u4e5f\u5c31\u662f\u8bf4\u7528\u6237\u80fd\u5426\u8bbf\u95ee<br \/>\n\u8be5\u7cfb\u7edf\u3002\u7528\u6237\u8ba4\u8bc1\u4e00\u822c\u8981\u6c42\u7528\u6237\u63d0\u4f9b\u7528\u6237\u540d\u548c\u5bc6\u7801\u3002\u7cfb\u7edf\u901a\u8fc7\u6821\u9a8c\u7528\u6237\u540d\u548c\u5bc6\u7801\u6765\u5b8c\u6210\u8ba4<br \/>\n\u8bc1\u8fc7\u7a0b\u3002\u901a\u4fd7\u70b9\u8bf4\u5c31\u662f\u7cfb\u7edf\u8ba4\u4e3a\u7528\u6237\u662f\u5426\u80fd\u767b\u5f55<br \/>\n\uff082\uff09\u7528\u6237\u6388\u6743\u6307\u7684\u662f\u9a8c\u8bc1\u67d0\u4e2a\u7528\u6237\u662f\u5426\u6709\u6743\u9650\u6267\u884c\u67d0\u4e2a\u64cd\u4f5c\u3002\u5728\u4e00\u4e2a\u7cfb\u7edf\u4e2d\uff0c\u4e0d\u540c\u7528\u6237<br \/>\n\u6240\u5177\u6709\u7684\u6743\u9650\u662f\u4e0d\u540c\u7684\u3002\u6bd4\u5982\u5bf9\u4e00\u4e2a\u6587\u4ef6\u6765\u8bf4\uff0c\u6709\u7684\u7528\u6237\u53ea\u80fd\u8fdb\u884c\u8bfb\u53d6\uff0c\u800c\u6709\u7684\u7528\u6237\u53ef\u4ee5<br \/>\n\u8fdb\u884c\u4fee\u6539\u3002\u4e00\u822c\u6765\u8bf4\uff0c\u7cfb\u7edf\u4f1a\u4e3a\u4e0d\u540c\u7684\u7528\u6237\u5206\u914d\u4e0d\u540c\u7684\u89d2\u8272\uff0c\u800c\u6bcf\u4e2a\u89d2\u8272\u5219\u5bf9\u5e94\u4e00\u7cfb\u5217\u7684<br \/>\n\u6743\u9650\u3002\u901a\u4fd7\u70b9\u8bb2\u5c31\u662f\u7cfb\u7edf\u5224\u65ad\u7528\u6237\u662f\u5426\u6709\u6743\u9650\u53bb\u505a\u67d0\u4e9b\u4e8b\u60c5\u3002<\/p>\n<h2>1.2 \u5386\u53f2<\/h2>\n<p>Spring Security \u5f00\u59cb\u4e8e 2003 \u5e74\u5e74\u5e95, \u201cspring \u7684 acegi \u5b89\u5168\u7cfb\u7edf\u201d\u3002 \u8d77\u56e0\u662f Spring\u5f00\u53d1\u8005\u90ae\u4ef6\u5217\u8868\u4e2d\u7684\u4e00\u4e2a\u95ee\u9898,\u6709\u4eba\u63d0\u95ee\u662f\u5426\u8003\u8651\u63d0\u4f9b\u4e00\u4e2a\u57fa\u4e8e spring \u7684\u5b89\u5168\u5b9e\u73b0\u3002<br \/>\nSpring Security \u4ee5\u201cThe Acegi Secutity System for Spring\u201d \u7684\u540d\u5b57\u59cb\u4e8e 2013 \u5e74\u665a\u4e9b\u65f6\u5019\u3002\u4e00\u4e2a\u95ee\u9898\u63d0\u4ea4\u5230 Spring \u5f00\u53d1\u8005\u7684\u90ae\u4ef6\u5217\u8868\uff0c\u8be2\u95ee\u662f\u5426\u5df2\u7ecf\u6709\u8003\u8651\u4e00\u4e2a\u673a\u9047 Spring\u7684\u5b89\u5168\u6027\u793e\u533a\u5b9e\u73b0\u3002\u90a3\u65f6\u5019 Spring \u7684\u793e\u533a\u76f8\u5bf9\u8f83\u5c0f\uff08\u76f8\u5bf9\u73b0\u5728\uff09\u3002\u5b9e\u9645\u4e0a Spring \u81ea\u5df1\u57282013\u5e74\u53ea\u662f\u4e00\u4e2a\u5b58\u5728\u4e8e ScourseForge \u7684\u9879\u76ee\uff0c\u8fd9\u4e2a\u95ee\u9898\u7684\u56de\u7b54\u662f\u4e00\u4e2a\u503c\u5f97\u7814\u7a76\u7684\u9886\u57df\uff0c\u867d\u7136\u76ee\u524d\u65f6\u95f4\u7684\u7f3a\u4e4f\u7ec4\u7ec7\u4e86\u6211\u4eec\u5bf9\u5b83\u7684\u63a2\u7d22\u3002<\/p>\n<p>\u8003\u8651\u5230\u8fd9\u4e00\u70b9\uff0c\u4e00\u4e2a\u7b80\u5355\u7684\u5b89\u5168\u5b9e\u73b0\u5efa\u6210\u4f46\u662f\u5e76\u6ca1\u6709\u53d1\u5e03\u3002\u51e0\u5468\u540e\uff0cSpring \u793e\u533a\u7684\u5176\u4ed6\u6210<br \/>\n\u5458\u8be2\u95ee\u4e86\u5b89\u5168\u6027\uff0c\u8fd9\u6b21\u8fd9\u4e2a\u4ee3\u7801\u88ab\u53d1\u9001\u7ed9\u4ed6\u4eec\u3002\u5176\u4ed6\u51e0\u4e2a\u8bf7\u6c42\u4e5f\u8ddf\u968f\u800c\u6765\u3002\u5230 2014 \u5e74\u4e00\u6708\u5927\u7ea6\u6709 20 \u4e07\u4eba\u4f7f\u7528\u4e86\u8fd9\u4e2a\u4ee3\u7801\u3002\u8fd9\u4e9b\u521b\u4e1a\u8005\u7684\u4eba\u63d0\u51fa\u4e00\u4e2a SourceForge \u9879\u76ee\u52a0\u5165\u662f\u4e3a\u4e86\uff0c\u8fd9\u662f\u5728 2004 \u4e09\u6708\u6b63\u5f0f\u6210\u7acb\u3002<\/p>\n<p>\u5728\u65e9\u4e9b\u65f6\u5019\uff0c\u8fd9\u4e2a\u9879\u76ee\u6ca1\u6709\u4efb\u4f55\u81ea\u5df1\u7684\u9a8c\u8bc1\u6a21\u5757\uff0c\u8eab\u4efd\u9a8c\u8bc1\u8fc7\u7a0b\u4f9d\u8d56\u4e8e\u5bb9\u5668\u7ba1\u7406\u7684\u5b89\u5168\u6027\u548c Acegi\u5b89\u5168\u6027\u3002\u800c\u4e0d\u662f\u4e13\u6ce8\u4e8e\u6388\u6743\u3002\u5f00\u59cb\u7684\u65f6\u5019\u8fd9\u5f88\u9002\u5408\uff0c\u4f46\u662f\u8d8a\u6765\u8d8a\u591a\u7684\u7528\u6237\u8bf7\u6c42\u989d\u5916\u7684\u5bb9\u5668\u652f\u6301\u3002\u5bb9\u5668\u7279\u5b9a\u7684\u8ba4\u8bc1\u9886\u57df\u63a5\u53e3\u7684\u57fa\u672c\u9650\u5236\u53d8\u5f97\u6e05\u6670\u3002\u8fd8\u6709\u4e00\u4e2a\u76f8\u5173\u7684\u95ee\u9898\u589e\u52a0\u65b0\u7684\u5bb9\u5668\u7684\u8def\u5f84\uff0c\u8fd9\u662f\u6700\u7ec8\u7528\u6237\u7684\u56f0\u60d1\u548c\u9519\u8bef\u914d\u7f6e\u7684\u5e38\u89c1\u95ee\u9898\u3002<\/p>\n<p>Acegi \u5b89\u5168\u7279\u5b9a\u7684\u8ba4\u8bc1\u670d\u52a1\u4ecb\u7ecd\u3002\u5927\u7ea6\u4e00\u5e74\u540e\uff0cAcegi \u5b89\u5168\u6b63\u5f0f\u6210\u4e3a\u4e86 Spring \u6846\u67b6\u7684\u5b50\u9879\u76ee\u30021.0.0 \u6700\u7ec8\u7248\u672c\u662f\u51fa\u7248\u4e8e 2006 -\u5728\u8d85\u8fc7\u4e24\u5e74\u534a\u7684\u5927\u91cf\u751f\u4ea7\u7684\u8f6f\u4ef6\u9879\u76ee\u548c\u6570\u4ee5\u767e\u8ba1\u7684\u6539\u8fdb\u548c\u79ef\u6781\u5229\u7528\u793e\u533a\u7684\u8d21\u732e\u3002<\/p>\n<p>Acegi\u5b89\u51682007\u5e74\u5e95\u6b63\u5f0f\u6210\u4e3a\u4e86Spring\u7ec4\u5408\u9879\u76ee\uff0c\u66f4\u540d\u4e3a&quot;Spring Security&quot;\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u7cfb\u5217\u77e5\u8bc6\u70b9\u6765\u6e90\u4e8e\u5c1a\u7845\u8c37\u6559\u7a0b\uff1a 1.1 \u6982\u8981 Spring \u662f\u975e\u5e38\u6d41\u884c\u548c\u6210\u529f\u7684 Java \u5e94\u7528\u5f00\u53d1\u6846\u67b6\uff0cSpri [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[125],"tags":[72],"class_list":["post-221","post","type-post","status-publish","format-standard","hentry","category-java-backend","tag-springsecurity"],"_links":{"self":[{"href":"https:\/\/blog.ttwow.top\/index.php?rest_route=\/wp\/v2\/posts\/221","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.ttwow.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.ttwow.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.ttwow.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.ttwow.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=221"}],"version-history":[{"count":1,"href":"https:\/\/blog.ttwow.top\/index.php?rest_route=\/wp\/v2\/posts\/221\/revisions"}],"predecessor-version":[{"id":2092,"href":"https:\/\/blog.ttwow.top\/index.php?rest_route=\/wp\/v2\/posts\/221\/revisions\/2092"}],"wp:attachment":[{"href":"https:\/\/blog.ttwow.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=221"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.ttwow.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=221"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.ttwow.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=221"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}