{"id":311392,"date":"2024-05-20T22:14:04","date_gmt":"2024-05-20T14:14:04","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/311392.html"},"modified":"2024-05-20T22:14:15","modified_gmt":"2024-05-20T14:14:15","slug":"java-web-%e7%a8%8b%e5%ba%8f%e6%80%8e%e4%b9%88%e9%80%9a%e8%bf%87-bcrypt-%e5%8a%a0%e5%af%86","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/311392.html","title":{"rendered":"Java web \u7a0b\u5e8f\u600e\u4e48\u901a\u8fc7 BCrypt \u52a0\u5bc6"},"content":{"rendered":"<p style=\"text-align:center\"><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/26232102\/a13a56f2-f38f-4b1b-9b6a-a47c487e20e6.webp\" alt=\"Java web \u7a0b\u5e8f\u600e\u4e48\u901a\u8fc7 BCrypt \u52a0\u5bc6\" \/><\/p>\n<p><p>\u52a0\u5bc6\u7528\u6237\u6570\u636e\u5c24\u5176\u662f\u5bc6\u7801\uff0c\u662f\u4fdd\u62a4\u7528\u6237\u4fe1\u606f\u5b89\u5168\u7684\u5173\u952e\u4e00\u6b65\u3002\u5728Java Web\u7a0b\u5e8f\u4e2d\uff0c\u901a\u8fc7BCrypt\u7b97\u6cd5\u6765\u52a0\u5bc6\u7528\u6237\u5bc6\u7801\u53ef\u4ee5\u63d0\u4f9b\u5f3a\u6709\u529b\u7684\u5b89\u5168\u6027\u3002BCrypt\u662f\u4e00\u4e2a\u8de8\u5e73\u53f0\u7684\u5bc6\u7801\u54c8\u5e0c\u65b9\u6cd5\uff0c\u5b83\u4f7f\u7528Blowfish\u5bc6\u7801\u7b97\u6cd5\u7684\u8c03\u6574\u7248\u8fdb\u884c\u6563\u5217\uff0c\u5e76\u4e14\u6545\u610f\u8bbe\u8ba1\u6210\u8ba1\u7b97\u4e0a\u7684\u4ee3\u4ef7\u6602\u8d35\uff0c\u4ee5\u51cf\u7f13\u5bc6\u7801\u7834\u89e3\u901f\u5ea6\u3002<strong>\u5728Java Web\u7a0b\u5e8f\u4e2d\uff0c\u4f7f\u7528BCrypt\u52a0\u5bc6\u5bc6\u7801\u901a\u5e38\u5305\u542b\u4ee5\u4e0b\u5173\u952e\u6b65\u9aa4\uff1a\u5bfc\u5165BCrypt\u5e93\u3001\u751f\u6210Salt\u3001\u521b\u5efa\u5bc6\u7801hash\u3001\u9a8c\u8bc1\u5bc6\u7801hash<\/strong>\u3002\u7b2c\u4e00\u6b65\uff0c\u5bfc\u5165BCrypt\u5e93\u662f\u5b9e\u73b0BCrypt\u52a0\u5bc6\u7684\u524d\u63d0\uff0c\u5f00\u53d1\u8005\u53ef\u4ee5\u901a\u8fc7\u52a0\u5165\u76f8\u5173\u7684\u4f9d\u8d56\u5e93\u6765\u5728\u9879\u76ee\u4e2d\u5f15\u5165BCrypt\u3002\u5728\u5c55\u5f00\u8be6\u7ec6\u63cf\u8ff0\u4e4b\u524d\uff0c\u8ba9\u6211\u4eec\u9996\u5148\u7406\u89e3BCrypt\u7b97\u6cd5\u7684\u6838\u5fc3\u7279\u5f81\u3002<\/p>\n<\/p>\n<p><h4><strong>\u4e00\u3001\u5f15\u5165BCRYPT\u5e93<\/strong><\/h4>\n<\/p>\n<p><p>\u5728\u5f00\u59cb\u4f7f\u7528BCrypt\u4e4b\u524d\uff0c\u9996\u5148\u9700\u8981\u786e\u4fddJava Web\u5e94\u7528\u7a0b\u5e8f\u5df2\u7ecf\u5bfc\u5165\u4e86BCrypt\u652f\u6301\u7684\u5e93\u6587\u4ef6\u3002\u4f60\u53ef\u4ee5\u4f7f\u7528\u4e00\u4e2a\u540d\u4e3a<code>bcrypt<\/code>\u7684\u7b2c\u4e09\u65b9\u5e93\uff0c\u8be5\u5e93\u53ef\u4ee5\u901a\u8fc7Maven\u6216Gradle\u4f9d\u8d56\u7ba1\u7406\u5668\u96c6\u6210\u5230\u9879\u76ee\u4e2d\u3002<\/p>\n<\/p>\n<p><p><strong>Maven\u96c6\u6210\u65b9\u5f0f\u793a\u4f8b<\/strong>:<\/p>\n<\/p>\n<p><pre><code class=\"language-xml\">&lt;dependency&gt;<\/p>\n<p>    &lt;groupId&gt;org.springframework.security&lt;\/groupId&gt;<\/p>\n<p>    &lt;artifactId&gt;spring-security-crypto&lt;\/artifactId&gt;<\/p>\n<p>    &lt;version&gt;5.3.3.RELEASE&lt;\/version&gt;<\/p>\n<p>&lt;\/dependency&gt;<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p><strong>Gradle\u96c6\u6210\u65b9\u5f0f\u793a\u4f8b<\/strong>:<\/p>\n<\/p>\n<p><pre><code class=\"language-gradle\">implementation &#039;org.springframework.security:spring-security-crypto:5.3.3.RELEASE&#039;<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u96c6\u6210\u540e\uff0c\u9879\u76ee\u5c06\u53ef\u4ee5\u4f7f\u7528BCrypt\u5f3a\u54c8\u5e0c\u65b9\u6cd5\u8fdb\u884c\u5bc6\u7801\u52a0\u5bc6\u5de5\u4f5c\u3002<\/p>\n<\/p>\n<p><h4><strong>\u4e8c\u3001\u751f\u6210SALT<\/strong><\/h4>\n<\/p>\n<p><p>BCrypt\u7b97\u6cd5\u4f7f\u7528Salt\uff08\u76d0\uff09\u6765\u589e\u5f3a\u5bc6\u7801\u7684\u5b89\u5168\u6027\uff0c\u4f7f\u4e4b\u5373\u4f7f\u662f\u76f8\u540c\u7684\u5bc6\u7801\u4e5f\u4f1a\u56e0\u4e0d\u540c\u7684Salt\u800c\u4ea7\u751f\u4e0d\u540c\u7684hash\u3002\u5728Java\u4e2d\u751f\u6210Salt\u975e\u5e38\u7b80\u5355\uff0c\u901a\u8fc7\u4f7f\u7528<code>BCrypt.gensalt()<\/code>\u65b9\u6cd5\u5c31\u53ef\u4ee5\u5b9e\u73b0\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-java\">String salt = BCrypt.gensalt();<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u4e2a\u751f\u6210\u7684salt\u5c06\u5728\u4ea7\u751f\u5bc6\u7801hash\u65f6\u4f7f\u7528\uff0c\u786e\u4fdd\u52a0\u5bc6\u7684\u5f3a\u5ea6\u3002<\/p>\n<\/p>\n<p><h4><strong>\u4e09\u3001\u521b\u5efa\u5bc6\u7801HASH<\/strong><\/h4>\n<\/p>\n<p><p>\u751f\u6210\u4e86Salt\u4e4b\u540e\uff0c\u4e0b\u4e00\u6b65\u662f\u4f7f\u7528\u8fd9\u4e2aSalt\u6765\u521b\u5efa\u5bc6\u7801\u7684hash\u503c\u3002\u8fd9\u53ef\u4ee5\u901a\u8fc7\u8c03\u7528<code>BCrypt.hashpw()<\/code>\u65b9\u6cd5\u5b9e\u73b0\uff0c\u65b9\u6cd5\u9700\u8981\u660e\u6587\u5bc6\u7801\u548cSalt\u4f5c\u4e3a\u8f93\u5165\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-java\">String originalPassword = &quot;userPassword123&quot;;<\/p>\n<p>String salt = BCrypt.gensalt(12); \/\/ \u5f3a\u5ea6\u8bbe\u5b9a\u4e3a12<\/p>\n<p>String hashedPassword = BCrypt.hashpw(originalPassword, salt);<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\uff0c\u901a\u5e38\u4f1a\u5c06\u5bc6\u7801\u5f3a\u5ea6\u8bbe\u7f6e\u572810\u523012\u4e4b\u95f4\uff0c\u56e0\u4e3a\u8fd9\u63d0\u4f9b\u4e86\u8f83\u597d\u7684\u5e73\u8861\u70b9\uff0c\u65e2\u4fdd\u8bc1\u4e86\u5b89\u5168\u6027\u53c8\u6ca1\u6709\u4f7f\u8ba1\u7b97\u8fc7\u4e8e\u7e41\u91cd\u3002<\/p>\n<\/p>\n<p><h4><strong>\u56db\u3001\u9a8c\u8bc1\u5bc6\u7801HASH<\/strong><\/h4>\n<\/p>\n<p><p>\u9a8c\u8bc1\u9636\u6bb5\u662f\u68c0\u67e5\u7528\u6237\u8f93\u5165\u5bc6\u7801\u662f\u5426\u4e0e\u5b58\u50a8\u5728\u6570\u636e\u5e93\u4e2d\u7684hash\u503c\u76f8\u5339\u914d\u3002\u53ef\u4ee5\u901a\u8fc7\u8c03\u7528<code>BCrypt.checkpw()<\/code>\u65b9\u6cd5\u5b9e\u73b0\uff0c\u8fd9\u4e2a\u65b9\u6cd5\u5c06\u4f1a\u6bd4\u8f83\u539f\u59cb\u5bc6\u7801\u52a0\u5bc6\u540e\u7684hash\u503c\u548c\u5b58\u50a8\u7684hash\u503c\u662f\u5426\u4e00\u81f4\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-java\">boolean isPasswordMatched = BCrypt.checkpw(originalPassword, hashedPassword);<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5982\u679c\u5bc6\u7801\u9a8c\u8bc1\u6210\u529f\uff0c\u5219\u65b9\u6cd5\u4f1a\u8fd4\u56de<code>true<\/code>\uff0c\u5426\u5219\u8fd4\u56de<code>false<\/code>\u3002<\/p>\n<\/p>\n<p><h4><strong>\u4e94\u3001\u5b9e\u65bd\u5b89\u5168\u5b9e\u8df5<\/strong><\/h4>\n<\/p>\n<p><p>\u5728\u5c06\u5bc6\u7801\u54c8\u5e0c\u5b58\u50a8\u5230\u6570\u636e\u5e93\u4e4b\u524d\uff0c\u786e\u4fdd\u6570\u636e\u5e93\u8fde\u63a5\u4f7f\u7528\u5b89\u5168\u901a\u9053\uff08\u6bd4\u5982SSL\u8fde\u63a5\uff09\uff0c\u5e76\u4e14\u8bbf\u95ee\u6570\u636e\u5e93\u7684\u670d\u52a1\u672c\u8eab\u8981\u53d7\u5230\u5b89\u5168\u7b56\u7565\u7684\u4fdd\u62a4\uff0c\u6bd4\u5982\u7f51\u7edc\u9694\u79bb\u3001\u8eab\u4efd\u9a8c\u8bc1\u7b49\u3002\u6b64\u5916\uff0c\u5bc6\u7801\u590d\u6742\u5ea6\u548c\u66f4\u65b0\u7b56\u7565\u4e5f\u9700\u7ed3\u5408BCrypt\u52a0\u5bc6\u6b63\u786e\u5b9e\u65bd\u3002<\/p>\n<\/p>\n<p><h4><strong>\u516d\u3001\u7efc\u5408\u5e94\u7528\u793a\u4f8b<\/strong><\/h4>\n<\/p>\n<p><p>\u6700\u540e\uff0c\u901a\u8fc7\u4e00\u4e2a\u7b80\u5355\u7684\u6ce8\u518c\u548c\u767b\u5f55\u6a21\u62df\u6d41\u7a0b\uff0c\u6211\u4eec\u5c06\u4e0a\u8ff0\u6b65\u9aa4\u7efc\u5408\u8d77\u6765\u770b\u4e00\u4e0b\u5982\u4f55\u5728\u5b9e\u9645\u4e2d\u5e94\u7528BCrypt\u52a0\u5bc6\u3002<\/p>\n<\/p>\n<p><p><strong>\u6ce8\u518c\u6d41\u7a0b\u52a0\u5bc6\u5b58\u50a8<\/strong>:<\/p>\n<\/p>\n<p><pre><code class=\"language-java\">public String registerUser(String username, String password) {<\/p>\n<p>    \/\/ \u751f\u6210Salt<\/p>\n<p>    String salt = BCrypt.gensalt(12);<\/p>\n<p>    \/\/ \u6839\u636e\u5bc6\u7801\u548cSalt\u751f\u6210hash<\/p>\n<p>    String hashedPassword = BCrypt.hashpw(password, salt);<\/p>\n<p>    \/\/ \u5b58\u50a8\u7528\u6237\u540d\u548c\u5bc6\u7801hash\u5230\u6570\u636e\u5e93<\/p>\n<p>    \/\/ DB.save(username, hashedPassword);<\/p>\n<p>    \/\/ \u8fd4\u56de\u6ce8\u518c\u72b6\u6001<\/p>\n<p>    return &quot;User registered successfully&quot;;<\/p>\n<p>}<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p><strong>\u767b\u5f55\u6d41\u7a0b\u9a8c\u8bc1\u5bc6\u7801<\/strong>:<\/p>\n<\/p>\n<p><pre><code class=\"language-java\">public String loginUser(String username, String password) {<\/p>\n<p>    \/\/ \u4ece\u6570\u636e\u5e93\u4e2d\u83b7\u53d6\u7528\u6237\u540d\u5bf9\u5e94\u7684\u5bc6\u7801hash<\/p>\n<p>    \/\/ String storedHashedPassword = DB.getPasswordHash(username);<\/p>\n<p>    \/\/ \u9a8c\u8bc1\u8f93\u5165\u7684\u5bc6\u7801\u548c\u6570\u636e\u5e93\u4e2d\u7684hash\u503c<\/p>\n<p>    boolean isPasswordCorrect = BCrypt.checkpw(password, storedHashedPassword);<\/p>\n<p>    \/\/ \u767b\u5f55\u903b\u8f91<\/p>\n<p>    if (isPasswordCorrect) {<\/p>\n<p>        return &quot;Login successful&quot;;<\/p>\n<p>    } else {<\/p>\n<p>        return &quot;Login f<a href=\"https:\/\/docs.pingcode.com\/blog\/59162.html\" target=\"_blank\">AI<\/a>led&quot;;<\/p>\n<p>    }<\/p>\n<p>}<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4e0a\u8ff0\u6a21\u62df\u6d41\u7a0b\u5c55\u793a\u4e86\u5728\u7528\u6237\u6ce8\u518c\u65f6\u5982\u4f55\u52a0\u5bc6\u5e76\u5b58\u50a8\u5bc6\u7801\uff0c\u4ee5\u53ca\u5728\u7528\u6237\u767b\u5f55\u65f6\u5982\u4f55\u9a8c\u8bc1\u5bc6\u7801\u7684\u6b63\u786e\u6027\u3002\u901a\u8fc7\u8fd9\u4e9b\u6b65\u9aa4\uff0c\u53ef\u4ee5\u786e\u4fdd\u7528\u6237\u4fe1\u606f\u7684\u5b89\u5168\u548c\u5e94\u7528\u7a0b\u5e8f\u7684\u53ef\u9760\u6027\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p><strong>1. \u5982\u4f55\u4f7f\u7528BCrypt\u5728Java web\u7a0b\u5e8f\u4e2d\u8fdb\u884c\u5bc6\u7801\u52a0\u5bc6\uff1f<\/strong><\/p>\n<p>BCrypt\u662f\u4e00\u79cd\u5f3a\u5927\u7684\u5bc6\u7801\u54c8\u5e0c\u7b97\u6cd5\uff0c\u5b83\u53ef\u4ee5\u5728Java web\u7a0b\u5e8f\u4e2d\u7528\u4e8e\u5c06\u7528\u6237\u5bc6\u7801\u52a0\u5bc6\u3002\u60a8\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u6b65\u9aa4\u4f7f\u7528BCrypt\uff1a<\/p>\n<ul>\n<li>\n<p>\u5bfc\u5165BCrypt\u5e93\uff1a\u9996\u5148\u8981\u505a\u7684\u662f\u5c06BCrypt\u5e93\u6dfb\u52a0\u5230\u60a8\u7684\u9879\u76ee\u4e2d\u3002\u53ef\u4ee5\u901a\u8fc7\u5c06\u76f8\u5173\u7684\u4f9d\u8d56\u9879\u6dfb\u52a0\u5230\u60a8\u7684Maven\u6216Gradle\u6784\u5efa\u6587\u4ef6\u6765\u5b8c\u6210\u8fd9\u4e00\u6b65\u3002<\/p>\n<\/li>\n<li>\n<p>\u8c03\u7528BCrypt\u65b9\u6cd5\u8fdb\u884c\u52a0\u5bc6\uff1a\u5728\u7528\u6237\u6ce8\u518c\u6216\u66f4\u6539\u5bc6\u7801\u65f6\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528BCrypt\u63d0\u4f9b\u7684<code>hashpw<\/code>\u65b9\u6cd5\u6765\u5bf9\u5bc6\u7801\u8fdb\u884c\u52a0\u5bc6\u3002\u793a\u4f8b\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"language-java\">String plainPassword = &quot;userPassword&quot;;\nString hashedPassword = BCrypt.hashpw(plainPassword, BCrypt.gensalt());\n<\/code><\/pre>\n<ul>\n<li>\u4fdd\u5b58\u52a0\u5bc6\u540e\u7684\u5bc6\u7801\uff1a\u60a8\u53ef\u4ee5\u5c06\u52a0\u5bc6\u540e\u7684\u5bc6\u7801\u4e0e\u7528\u6237\u4fe1\u606f\u4e00\u8d77\u4fdd\u5b58\u5728\u6570\u636e\u5e93\u6216\u5176\u4ed6\u6301\u4e45\u5b58\u50a8\u4e2d\u3002\u8bf7\u6ce8\u610f\uff0c\u60a8\u65e0\u6cd5\u4ece\u52a0\u5bc6\u7684\u5bc6\u7801\u4e2d\u8fd8\u539f\u660e\u6587\u5bc6\u7801\u3002<\/li>\n<\/ul>\n<p><strong>2. BCrypt\u4e0e\u5176\u4ed6\u5bc6\u7801\u54c8\u5e0c\u7b97\u6cd5\u76f8\u6bd4\u6709\u4ec0\u4e48\u4f18\u52bf\uff1f<\/strong><\/p>\n<p>BCrypt\u76f8\u6bd4\u5176\u4ed6\u5bc6\u7801\u54c8\u5e0c\u7b97\u6cd5\u5177\u6709\u591a\u4e2a\u4f18\u52bf\uff0c\u8fd9\u4f7f\u5f97\u5b83\u6210\u4e3aJava web\u7a0b\u5e8f\u4e2d\u9996\u9009\u7684\u5bc6\u7801\u52a0\u5bc6\u7b97\u6cd5\u4e4b\u4e00\uff1a<\/p>\n<ul>\n<li>\n<p>\u5f3a\u5927\u7684\u5b89\u5168\u6027\uff1aBCrypt\u4f7f\u7528\u4e86\u4e00\u4e2a\u8c03\u6574\u7684\u7b97\u6cd5\uff0c\u53ef\u4ee5\u6839\u636e\u9700\u8981\u8fdb\u884c\u4f38\u7f29\uff0c\u4ee5\u589e\u52a0\u5b89\u5168\u6027\u3002\u8fd9\u610f\u5473\u7740\u5373\u4f7f\u653b\u51fb\u8005\u80fd\u591f\u83b7\u53d6\u5230\u52a0\u5bc6\u540e\u7684\u5bc6\u7801\uff0c\u4e5f\u5f88\u96be\u8fdb\u884c\u7834\u89e3\u3002<\/p>\n<\/li>\n<li>\n<p>\u5229\u7528\u76d0\u503c\uff1aBCrypt\u5c06\u76d0\u503c\u4e0e\u5bc6\u7801\u8fdb\u884c\u7ec4\u5408\uff0c\u7136\u540e\u518d\u8fdb\u884c\u54c8\u5e0c\u3002\u8fd9\u79cd\u7279\u6027\u53ef\u4ee5\u9632\u6b62\u5f69\u8679\u8868\u653b\u51fb\uff0c\u5373\u653b\u51fb\u8005\u4f7f\u7528\u9884\u5148\u8ba1\u7b97\u597d\u7684\u54c8\u5e0c\u503c\u4e0e\u5e38\u89c1\u5bc6\u7801\u8fdb\u884c\u5339\u914d\u3002<\/p>\n<\/li>\n<li>\n<p>\u6613\u4e8e\u4f7f\u7528\uff1aBCrypt\u5e93\u63d0\u4f9b\u4e86\u7b80\u6d01\u7684API\u63a5\u53e3\uff0c\u4f7f\u5f97\u5c06\u5bc6\u7801\u52a0\u5bc6\u4e0e\u89e3\u5bc6\u96c6\u6210\u5230Java web\u7a0b\u5e8f\u4e2d\u53d8\u5f97\u975e\u5e38\u5bb9\u6613\u3002<\/p>\n<\/li>\n<\/ul>\n<p><strong>3. \u5982\u4f55\u9a8c\u8bc1\u52a0\u5bc6\u540e\u7684BCrypt\u5bc6\u7801\uff1f<\/strong><\/p>\n<p>\u5728Java web\u7a0b\u5e8f\u4e2d\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528BCrypt\u63d0\u4f9b\u7684<code>checkpw<\/code>\u65b9\u6cd5\u6765\u9a8c\u8bc1\u7528\u6237\u8f93\u5165\u7684\u5bc6\u7801\u662f\u5426\u4e0e\u6570\u636e\u5e93\u4e2d\u5b58\u50a8\u7684\u52a0\u5bc6\u5bc6\u7801\u76f8\u5339\u914d\u3002\u793a\u4f8b\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n<pre><code class=\"language-java\">String plainPassword = &quot;userPassword&quot;;\nString hashedPassword = &quot;storedHashedPassword&quot;;\n\nif (BCrypt.checkpw(plainPassword, hashedPassword)) {\n    \/\/ \u5bc6\u7801\u5339\u914d\uff0c\u7ee7\u7eed\u540e\u7eed\u64cd\u4f5c\n} else {\n    \/\/ \u5bc6\u7801\u4e0d\u5339\u914d\uff0c\u663e\u793a\u9519\u8bef\u6d88\u606f\u6216\u5176\u4ed6\u64cd\u4f5c\n}\n<\/code><\/pre>\n<p>\u4f7f\u7528<code>checkpw<\/code>\u65b9\u6cd5\uff0c\u60a8\u53ef\u4ee5\u786e\u4fdd\u7528\u6237\u8f93\u5165\u7684\u5bc6\u7801\u662f\u5426\u6b63\u786e\uff0c\u800c\u65e0\u9700\u5c06\u5bc6\u7801\u7684\u660e\u6587\u5f62\u5f0f\u66b4\u9732\u5728\u4ee3\u7801\u4e2d \u6216\u5728\u6570\u636e\u5e93\u5b58\u50a8\u4e2d\u3002<\/p>\n<p>\u5e0c\u671b\u4ee5\u4e0a\u56de\u7b54\u80fd\u5bf9\u60a8\u6709\u6240\u5e2e\u52a9\u3002\u5982\u679c\u60a8\u8fd8\u6709\u5176\u4ed6\u95ee\u9898\uff0c\u8bf7\u968f\u65f6\u63d0\u95ee\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u52a0\u5bc6\u7528\u6237\u6570\u636e\u5c24\u5176\u662f\u5bc6\u7801\uff0c\u662f\u4fdd\u62a4\u7528\u6237\u4fe1\u606f\u5b89\u5168\u7684\u5173\u952e\u4e00\u6b65\u3002\u5728Java Web\u7a0b\u5e8f\u4e2d\uff0c\u901a\u8fc7BCrypt\u7b97\u6cd5\u6765\u52a0\u5bc6\u7528\u6237 [&hellip;]","protected":false},"author":3,"featured_media":311409,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[37],"tags":[],"acf":[],"_links":{"self":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/311392"}],"collection":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/comments?post=311392"}],"version-history":[{"count":0,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/311392\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/311409"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=311392"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=311392"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=311392"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}