{"id":339847,"date":"2021-02-04T08:23:56","date_gmt":"2021-02-04T00:23:56","guid":{"rendered":"http:\/\/4563.org\/?p=339847"},"modified":"2021-02-04T08:23:56","modified_gmt":"2021-02-04T00:23:56","slug":"%e6%9c%80%e5%90%8e%e6%91%b8%e9%b1%bc-3-%e5%b0%8f%e6%97%b6%ef%bc%8c%e5%b9%b4%e5%89%8d%e5%86%8d%e6%9d%a5%e5%ae%a3%e4%bc%a0%e4%b8%8b%e6%88%91%e7%9a%84%e5%bc%80%e6%ba%90%e9%a1%b9%e7%9b%ae-%e6%af%94-shir","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=339847","title":{"rendered":"\u6700\u540e\u6478\u9c7c 3 \u5c0f\u65f6\uff0c\u5e74\u524d\u518d\u6765\u5ba3\u4f20\u4e0b\u6211\u7684\u5f00\u6e90\u9879\u76ee &#8211; \u6bd4 shiro,spring security \u5feb\u7684\u8ba4\u8bc1\u9274\u6743\u6846\u67b6"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  \u6700\u540e\u6478\u9c7c 3 \u5c0f\u65f6\uff0c\u5e74\u524d\u518d\u6765\u5ba3\u4f20\u4e0b\u6211\u7684\u5f00\u6e90\u9879\u76ee &#8211; \u6bd4 shiro,spring security \u5feb\u7684\u8ba4\u8bc1\u9274\u6743\u6846\u67b6               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : tomsun28 <\/span>  <span><i><\/i> 2<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<p>\u795d v \u53cb\u4eec\u65b0\u5e74\u5feb\u4e50\uff0c\u5e74\u540e\u66b4\u5bcc\uff01\uff01\uff01\uff01\uff01\uff01\uff01\uff01<\/p>\n<p><strong>\u4e3b\u9875: usthe.com\/sureness, \u5907\u7528\u7f51\u7ad9: su.usthe.com<\/strong> <\/p>\n<p>github: https:\/\/github.com\/tomsun28\/sureness \u6b22\u8fce star \u5f2f\u8170\u611f\u8c22<br \/> gitee: https:\/\/gitee.com\/tomsun28\/sureness <\/p>\n<h2>\u80cc\u666f<\/h2>\n<p>\u5728\u4e3b\u6d41\u7684\u524d\u540e\u7aef\u5206\u79bb\u67b6\u6784\u4e2d\uff0c\u5982\u4f55\u901a\u8fc7\u6709\u6548\u5feb\u901f\u7684\u8ba4\u8bc1\u9274\u6743\u6765\u4fdd\u62a4\u540e\u7aef\u63d0\u4f9b\u7684<code>restful api<\/code>\u53d8\u5f97\u5c24\u4e3a\u91cd\u8981\u3002\u5bf9\u73b0\u5b58\u6846\u67b6\uff0c\u4e0d\u539f\u751f\u652f\u6301<code>rest<\/code>\u7684<code>apache shiro<\/code>\uff0c \u8fd8\u662f\u6df1\u5ea6\u7ed1\u5b9a<code>spring<\/code>\uff0c\u8f83\u6162\u6027\u80fd\uff0c\u5b66\u4e60\u66f2\u7ebf\u9661\u5ced\u7684<code>spring security<\/code>\uff0c\u6216\u591a\u6216\u5c11\u90fd\u4e0d\u662f\u6211\u4eec\u7684\u7406\u60f3\u578b\u3002<br \/> \u4e8e\u662f\u4e4e<code>sureness<\/code>\u8bde\u751f\u4e86\uff0c\u6211\u4eec\u5e0c\u671b\u80fd\u89e3\u51b3\u8fd9\u4e9b\uff0c\u63d0\u4f9b\u4e00\u4e2a\u9762\u5411<strong>restful api<\/strong>\uff0c<strong>\u65e0\u6846\u67b6\u4f9d\u8d56<\/strong>\uff0c\u53ef\u4ee5<strong>\u52a8\u6001\u4fee\u6539\u6743\u9650<\/strong>\uff0c<strong>\u591a\u8ba4\u8bc1\u7b56\u7565<\/strong>\uff0c<strong>\u66f4\u5feb\u901f\u5ea6<\/strong>\uff0c<strong>\u6613\u7528\u6613\u6269\u5c55<\/strong>\u7684\u8ba4\u8bc1\u9274\u6743\u6846\u67b6\u3002 <\/p>\n<h2>\u4ecb\u7ecd<\/h2>\n<blockquote>\n<p><code>sureness<\/code> \u662f\u6211\u4eec\u5728\u6df1\u5ea6\u4f7f\u7528\u6743\u9650\u6846\u67b6 <code>apache shiro<\/code> \u4e4b\u540e,\u5438\u53d6\u5176\u4e00\u4e9b\u4f18\u70b9\u5168\u65b0\u8bbe\u8ba1\u5f00\u53d1\u7684\u4e00\u4e2a\u8ba4\u8bc1\u9274\u6743\u6846\u67b6<br \/> \u9762\u5411 <code>restful api<\/code> \u7684\u8ba4\u8bc1\u9274\u6743,\u57fa\u4e8e <code>rbac<\/code> (\u7528\u6237-\u89d2\u8272-\u8d44\u6e90)\u4e3b\u8981\u5173\u6ce8\u4e8e\u5bf9 <code>restful api<\/code> \u7684\u5b89\u5168\u4fdd\u62a4<br \/> \u65e0\u7279\u5b9a\u6846\u67b6\u4f9d\u8d56(\u672c\u8d28\u5c31\u662f\u8fc7\u6ee4\u5668\u5904\u62e6\u622a\u5224\u65ad,\u5df2\u6709<code>springboot,quarkus,javalin,ktor<\/code>\u7b49\u96c6\u6210\u6837\u4f8b)<br \/> \u652f\u6301\u52a8\u6001\u4fee\u6539\u6743\u9650\u914d\u7f6e(\u52a8\u6001\u4fee\u6539\u914d\u7f6e\u6bcf\u4e2a<code>rest api<\/code>\u8c01\u6709\u6743\u8bbf\u95ee)<br \/> \u652f\u6301\u4e3b\u6d41<code>http<\/code>\u5bb9\u5668 <code>servlet<\/code> \u548c <code>jax-rs<\/code><br \/> \u652f\u6301\u591a\u79cd\u8ba4\u8bc1\u7b56\u7565, <code>jwt, basic auth, digest auth<\/code> &#8230; \u53ef\u6269\u5c55\u81ea\u5b9a\u4e49\u652f\u6301\u7684\u8ba4\u8bc1\u65b9\u5f0f<br \/> \u57fa\u4e8e\u6539\u8fdb\u7684\u5b57\u5178\u5339\u914d\u6811\u62e5\u6709\u7684\u9ad8\u6027\u80fd<br \/> \u826f\u597d\u7684\u6269\u5c55\u63a5\u53e3, \u6837\u4f8b\u548c\u6587\u6863 <\/p>\n<\/blockquote>\n<blockquote>\n<p><code>sureness<\/code>\u7684\u4f4e\u914d\u7f6e\uff0c\u6613\u6269\u5c55\uff0c\u4e0d\u8026\u5408\u5176\u4ed6\u6846\u67b6\uff0c\u5e0c\u671b\u80fd\u5e2e\u52a9\u5f00\u53d1\u8005\u5bf9\u81ea\u5df1\u7684\u9879\u76ee\u591a\u573a\u666f\u5feb\u901f\u5b89\u5168\u7684\u8fdb\u884c\u4fdd\u62a4 <\/p>\n<\/blockquote>\n<h5>\u6846\u67b6\u5bf9\u6bd4<\/h5>\n<table>\n<thead>\n<tr>\n<th>~<\/th>\n<th>sureness<\/th>\n<th>shiro<\/th>\n<th>spring security<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><strong>\u591a\u6846\u67b6\u652f\u6301<\/strong><\/td>\n<td>\u652f\u6301<\/td>\n<td>\u9700\u6539\u52a8\u652f\u6301<\/td>\n<td>\u4e0d\u652f\u6301<\/td>\n<\/tr>\n<tr>\n<td><strong>restful api<\/strong><\/td>\n<td>\u652f\u6301<\/td>\n<td>\u9700\u6539\u52a8\u652f\u6301<\/td>\n<td>\u652f\u6301<\/td>\n<\/tr>\n<tr>\n<td><strong>\u8fc7\u6ee4\u94fe\u5339\u914d<\/strong><\/td>\n<td>\u4f18\u5316\u7684\u5b57\u5178\u5339\u914d\u6811<\/td>\n<td>ant \u5339\u914d<\/td>\n<td>ant \u5339\u914d<\/td>\n<\/tr>\n<tr>\n<td><strong>\u6ce8\u89e3\u652f\u6301<\/strong><\/td>\n<td>\u652f\u6301<\/td>\n<td>\u652f\u6301<\/td>\n<td>\u652f\u6301<\/td>\n<\/tr>\n<tr>\n<td><strong>servlet<\/strong><\/td>\n<td>\u652f\u6301<\/td>\n<td>\u652f\u6301<\/td>\n<td>\u652f\u6301<\/td>\n<\/tr>\n<tr>\n<td><strong>jax-rs<\/strong><\/td>\n<td>\u652f\u6301<\/td>\n<td>\u4e0d\u652f\u6301<\/td>\n<td>\u4e0d\u652f\u6301<\/td>\n<\/tr>\n<tr>\n<td><strong>\u6743\u9650\u52a8\u6001\u4fee\u6539<\/strong><\/td>\n<td>\u652f\u6301<\/td>\n<td>\u9700\u6539\u52a8\u652f\u6301<\/td>\n<td>\u9700\u6539\u52a8\u652f\u6301<\/td>\n<\/tr>\n<tr>\n<td><strong>\u6027\u80fd\u901f\u5ea6<\/strong><\/td>\n<td>\u6781\u5feb<\/td>\n<td>\u8f83\u5feb<\/td>\n<td>\u8f83\u6162<\/td>\n<\/tr>\n<tr>\n<td><strong>\u5b66\u4e60\u66f2\u7ebf<\/strong><\/td>\n<td>\u7b80\u5355<\/td>\n<td>\u7b80\u5355<\/td>\n<td>\u9661\u5ced<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h5>\u57fa\u51c6\u6027\u80fd\u6d4b\u8bd5<\/h5>\n<p><img decoding=\"async\" loading=\"lazy\" referrerpolicy=\"no-referrer\" rel=\"noreferrer\" src=\"http:\/\/4563.org\/wp-content\/uploads\/2021\/02\/20210218_602e8b0b6a452.png\" alt=\"\u6700\u540e\u6478\u9c7c 3 \u5c0f\u65f6\uff0c\u5e74\u524d\u518d\u6765\u5ba3\u4f20\u4e0b\u6211\u7684\u5f00\u6e90\u9879\u76ee - \u6bd4 shiro,spring security \u5feb\u7684\u8ba4\u8bc1\u9274\u6743\u6846\u67b6\" \/> <\/p>\n<p><strong>\u57fa\u51c6\u6d4b\u8bd5\u663e\u793a sureness \u5bf9\u6bd4\u65e0\u6743\u9650\u6846\u67b6\u5e94\u7528\u635f\u8017 0.026ms \u6027\u80fd\uff0cshiro \u635f\u8017 0.088ms,spring security \u635f\u8017 44.813ms\uff0c \u76f8\u6bd4\u4e4b\u4e0b sureness \u57fa\u672c\u4e0d\u6d88\u8017\u6027\u80fd\uff0c\u4e14\u6027\u80fd(\u53c2\u8003 TPS \u635f\u8017)\u662f shiro \u7684 3 \u500d\uff0cspring security \u7684 1700 \u500d<\/strong><br \/> <strong>\u6027\u80fd\u5dee\u8ddd\u4f1a\u968f\u7740 api \u5339\u914d\u94fe\u7684\u589e\u52a0\u800c\u8fdb\u4e00\u6b65\u62c9\u5927<\/strong><br \/> \u8be6\u89c1\u57fa\u51c6\u6d4b\u8bd5 <\/p>\n<h5>\u6846\u67b6\u652f\u6301\u6837\u4f8b<\/h5>\n<ul>\n<li>sureness \u96c6\u6210 springboot \u6837\u4f8b(\u914d\u7f6e\u6587\u4ef6\u65b9\u6848) sample-bootstrap <\/li>\n<li>sureness \u96c6\u6210 springboot \u6837\u4f8b(\u6570\u636e\u5e93\u65b9\u6848) sample-tom <\/li>\n<li>sureness \u96c6\u6210 quarkus \u6837\u4f8b sample-quarkus <\/li>\n<li>sureness \u96c6\u6210 javalin \u6837\u4f8b sample-javalin <\/li>\n<li>sureness \u96c6\u6210 ktor \u6837\u4f8b sample-ktor <\/li>\n<li>sureness \u96c6\u6210 spring webflux \u6837\u4f8b sample-spring-webflux <\/li>\n<li>more samples todo<\/li>\n<\/ul><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>0<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>\u6700\u540e\u6478\u9c7c 3 \u5c0f\u65f6\uff0c\u5e74\u524d\u518d\u6765\u5ba3\u4f20\u4e0b&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/339847"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=339847"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/339847\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=339847"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=339847"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=339847"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}