diff --git a/404.html b/404.html index 38da0eb2..0279563d 100644 --- a/404.html +++ b/404.html @@ -23,11 +23,11 @@ } shAilene - +

404

There's nothing here.
Take me home
- + diff --git "a/Design-patterns/design-patterns-1/\350\256\276\350\256\241\346\250\241\345\274\2171.html" "b/Design-patterns/design-patterns-1/\350\256\276\350\256\241\346\250\241\345\274\2171.html" index 046f474d..862ff4b6 100644 --- "a/Design-patterns/design-patterns-1/\350\256\276\350\256\241\346\250\241\345\274\2171.html" +++ "b/Design-patterns/design-patterns-1/\350\256\276\350\256\241\346\250\241\345\274\2171.html" @@ -23,7 +23,7 @@ } 设计模式 | shAilene - + @@ -226,6 +226,6 @@ MessageSender messageSender = new MessageSender(); Notification notification = new Notification(messageSender);

依赖注入框架

在如上例子的代码中,虽然我们不需要用类似 hard code 的方式,在类内部通过 new 来创建 MessageSender 对象,但是,这个创建对象、组装(或注入)对象的工作仅仅是被移动到了更上层代码而已,还是需要我们程序员自己来实现。

在实际的软件开发中,一些项目可能会涉及几十、上百、甚至几百个类,类对象的创建和依赖注入会变得非常复杂。如果这部分工作都是靠程序员自己写代码来完成,容易出错且开发成本也比较高。而对象创建和依赖注入的工作,本身跟具体的业务无关,我们完全可以抽象成框架来自动完成。

4.4 依赖反转原则

高层模块(high-level modules)不要依赖低层模块(low-level)。高层模块和低层模块应该通过抽象(abstractions)来互相依赖。除此之外,抽象(abstractions)不要依赖具体实现细节(details),具体实现细节(details)依赖抽象(abstractions)。

4.5 高内聚低耦合

高内聚”用来指导类本身的设计,“松耦合”用来指导类与类之间依赖关系的设计。不过,这两者并非完全独立不相干。高内聚有助于松耦合,松耦合又需要高内聚的支持。

所谓高内聚,就是指相近的功能应该放到同一个类中,不相近的功能不要放到同一类中。相近的功能往往会被同时修改,放到同一个类中,修改会比较集中。所谓松耦合指的是,在代码中,类与类之间的依赖关系简单清晰。即使两个类有依赖关系,一个类的代码改动也不会或者很少导致依赖类的代码改动。

如何理解迪米特法则?

不该有直接依赖关系的类之间,不要有依赖;有依赖关系的类之间,尽量只依赖必要的接口。迪米特法则是希望减少类之间的耦合,让类越独立越好。每个类都应该少了解系统的其他部分。一旦发生变化,需要了解这一变化的类就会比较少。

上下层系统之间的调用倾向于通过同步接口,同层之间的调用倾向于异步消息调用。

合理地划分模块也可以做到模块层面的高内聚、低耦合,架构整洁清晰。在面向对象设计中,类设计好之后,我们需要设计类之间的交互关系。类比到系统设计,系统职责划分好之后,接下来就是设计系统之间的交互了。

- + diff --git "a/Design-patterns/design-patterns-2/\350\256\276\350\256\241\346\250\241\345\274\2172.html" "b/Design-patterns/design-patterns-2/\350\256\276\350\256\241\346\250\241\345\274\2172.html" index 7e171137..a57df0a4 100644 --- "a/Design-patterns/design-patterns-2/\350\256\276\350\256\241\346\250\241\345\274\2172.html" +++ "b/Design-patterns/design-patterns-2/\350\256\276\350\256\241\346\250\241\345\274\2172.html" @@ -23,7 +23,7 @@ } 设计模式 | shAilene - + @@ -616,6 +616,6 @@ } } - + diff --git a/Design-patterns/index.html b/Design-patterns/index.html index 4c925637..8edcfc0e 100644 --- a/Design-patterns/index.html +++ b/Design-patterns/index.html @@ -23,11 +23,11 @@ } shAilene - +
Last Updated:
Contributors: shailene
- + diff --git a/assets/404.f91eaeb1.js b/assets/404.11fc05c0.js similarity index 90% rename from assets/404.f91eaeb1.js rename to assets/404.11fc05c0.js index 31716532..683d5600 100644 --- a/assets/404.f91eaeb1.js +++ b/assets/404.11fc05c0.js @@ -1 +1 @@ -import{_ as d,f as i,u as f,g as p,r as v,o as k,c as L,a as o,t as c,b as g,w as x,h as l,d as B}from"./app.0d029894.js";const N={class:"theme-container"},T={class:"theme-default-content"},b=o("h1",null,"404",-1),C=i({name:"404",setup(M){var a,s,n;const r=f(),e=p(),t=(a=e.value.notFound)!=null?a:["Not Found"],u=()=>t[Math.floor(Math.random()*t.length)],_=(s=e.value.home)!=null?s:r.value,m=(n=e.value.backToHome)!=null?n:"Back to home";return(R,V)=>{const h=v("RouterLink");return k(),L("div",N,[o("div",T,[b,o("blockquote",null,c(u()),1),g(h,{to:l(_)},{default:x(()=>[B(c(l(m)),1)]),_:1},8,["to"])])])}}});var D=d(C,[["__file","404.vue"]]);export{D as default}; +import{_ as d,f as i,u as f,g as p,r as v,o as k,c as L,a as o,t as c,b as g,w as x,h as l,d as B}from"./app.f8791b52.js";const N={class:"theme-container"},T={class:"theme-default-content"},b=o("h1",null,"404",-1),C=i({name:"404",setup(M){var a,s,n;const r=f(),e=p(),t=(a=e.value.notFound)!=null?a:["Not Found"],u=()=>t[Math.floor(Math.random()*t.length)],_=(s=e.value.home)!=null?s:r.value,m=(n=e.value.backToHome)!=null?n:"Back to home";return(R,V)=>{const h=v("RouterLink");return k(),L("div",N,[o("div",T,[b,o("blockquote",null,c(u()),1),g(h,{to:l(_)},{default:x(()=>[B(c(l(m)),1)]),_:1},8,["to"])])])}}});var D=d(C,[["__file","404.vue"]]);export{D as default}; diff --git a/assets/404.html.071da894.js b/assets/404.html.95128ecc.js similarity index 56% rename from assets/404.html.071da894.js rename to assets/404.html.95128ecc.js index c821a23c..be54fb25 100644 --- a/assets/404.html.071da894.js +++ b/assets/404.html.95128ecc.js @@ -1 +1 @@ -import{_}from"./app.0d029894.js";const e={};function r(t,c){return null}var f=_(e,[["render",r],["__file","404.html.vue"]]);export{f as default}; +import{_}from"./app.f8791b52.js";const e={};function r(t,c){return null}var f=_(e,[["render",r],["__file","404.html.vue"]]);export{f as default}; diff --git a/assets/ES.html.07e17114.js b/assets/ES.html.630ab9f5.js similarity index 99% rename from assets/ES.html.07e17114.js rename to assets/ES.html.630ab9f5.js index 8890c8bf..485896cd 100644 --- a/assets/ES.html.07e17114.js +++ b/assets/ES.html.630ab9f5.js @@ -1,4 +1,4 @@ -import{_ as n,e as s}from"./app.0d029894.js";const a={},t=s(`

Elastic Search

\u4E00\u3001\u6982\u8FF0

es

  1. elastic search\u662F\u7528\u4E8E\u5B58\u50A8\u3001\u641C\u7D22\u7684\u9879\u76EE

    kibana\u662F\u5C55\u793A\u6570\u636E\u7684\u9879\u76EE

    kibana\u7ED3\u5408es\u53EF\u4EE5\u5B9E\u65F6\u5730\u5BF9\u6570\u636E\u8FDB\u884C\u641C\u7D22\u3001\u5206\u6790\u548C\u53EF\u89C6\u5316\u3002

  2. es\u662F\u4E00\u4E2A\u5F00\u6E90\u7684\u9AD8\u6269\u5C55\u7684\u5206\u5E03\u5F0F\u5168\u6587\u641C\u7D22\u5F15\u64CE\uFF0C\u662F\u6574\u4E2Aelastic stack\u6280\u672F\u6808\u7684\u6838\u5FC3\u3002

    \u5B83\u53EF\u4EE5\u8FD1\u4E4E\u5B9E\u65F6\u5730\u5B58\u50A8\u3001\u68C0\u7D22\u6570\u636E\u3002

  3. es\u7684\u5168\u6587\u641C\u7D22\u7684\u539F\u7406\u662F\u5012\u6392\u7D22\u5F15\u3002

  4. Lucene\u662FApache\u8F6F\u4EF6\u57FA\u91D1\u4F1AJakarta\u9879\u76EE\u7EC4\u7684\u4E00\u4E2A\u5B50\u9879\u76EE\uFF0C\u63D0\u4F9B\u4E86\u4E00\u4E2A\u7B80\u5355\u5374\u5F3A\u5927\u7684\u5E94\u7528\u7A0B\u5F0F\u63A5\u53E3\uFF0C\u80FD\u591F\u505A\u5168\u6587\u7D22\u5F15\u548C\u641C\u5BFB\u3002

    \u4F46Lucene\u53EA\u662F\u4E00\u4E2A\u63D0\u4F9B\u5168\u6587\u641C\u7D22\u529F\u80FD\u7C7B\u5E93\u7684\u6838\u5FC3\u5DE5\u5177\u5305\uFF0C\u800C\u771F\u6B63\u4F7F\u7528\u5B83\u8FD8\u9700\u8981\u4E00\u4E2A\u5B8C\u5584\u7684\u670D\u52A1\u6846\u67B6\u642D\u5EFA\u8D77\u6765\u8FDB\u884C\u5E94\u7528\u3002

    \u8FD9\u91CC\u7684\u5B8C\u5584\u7684\u670D\u52A1\u6846\u67B6\u4FBF\u662F\u8BF4\u7684es\u548Csolr\u3002

  5. es\u662F\u57FA\u4E8EJava\u5F00\u53D1\u7684\u3002

\u5168\u6587\u641C\u7D22

  1. Google\uFF0C\u767E\u5EA6\u7C7B\u7684\u7F51\u7AD9\u641C\u7D22\uFF0C\u5B83\u4EEC\u90FD\u662F\u6839\u636E\u7F51\u9875\u4E2D\u7684\u5173\u952E\u5B57\u751F\u6210\u7D22\u5F15\uFF0C\u6211\u4EEC\u5728\u641C\u7D22\u7684\u65F6\u5019\u8F93\u5165\u5173\u952E\u5B57\uFF0C\u5B83\u4EEC\u4F1A\u5C06\u8BE5\u5173\u952E\u5B57\u5373\u7D22\u5F15\u5339\u914D\u5230\u7684\u6240\u6709\u7F51\u9875\u8FD4\u56DE\uFF1B\u8FD8\u6709\u5E38\u89C1\u7684\u9879\u76EE\u4E2D\u5E94\u7528\u65E5\u5FD7\u7684\u641C\u7D22\u7B49\u7B49\u3002\u5BF9\u4E8E\u8FD9\u4E9B\u975E\u7ED3\u6784\u5316\u7684\u6570\u636E\u6587\u672C\uFF0C\u5173\u7CFB\u578B\u6570\u636E\u5E93\u641C\u7D22\u4E0D\u662F\u80FD\u5F88\u597D\u7684\u652F\u6301\u3002

  2. \u4E00\u822C\u7684\u4F20\u7EDF\u5173\u7CFB\u578B\u6570\u636E\u5E93\uFF0C\u90FD\u4E0D\u4F1A\u7528\u6765\u8FDB\u884C\u5168\u6587\u68C0\u7D22\uFF0C\u4E00\u822C\u4E5F\u6CA1\u6709\u4EBA\u7528\u5173\u7CFB\u578B\u6570\u636E\u5E93\u5B58\u50A8\u6587\u672C\u5B57\u6BB5\u3002\u8FDB\u884C\u5168\u6587\u68C0\u7D22\u9700\u8981\u626B\u63CF\u6574\u4E2A\u8868\uFF0C\u5982\u679C\u6570\u636E\u91CF\u5927\u7684\u8BDD\u5373\u4F7F\u5BF9SQL\u8BED\u6CD5\u8FDB\u884C\u4F18\u5316\uFF0C\u4E5F\u6536\u6548\u751A\u5FAE\u3002

  3. \u4F7F\u7528ES\u6216Solr\u8FD9\u79CD\u5168\u6587\u68C0\u7D22\u5F15\u64CE\uFF1A

  4. \u5168\u6587\u68C0\u7D22\u7684\u5DE5\u4F5C\u539F\u7406

\u4E8C\u3001\u5165\u95E8

\u5B89\u88C5

  1. windows\u7248\u7684es\u538B\u7F29\u5305\uFF0C\u89E3\u538B\u5373\u5B89\u88C5\u5B8C\u6210\u3002

  2. \u76EE\u5F55\uFF1A

    \u76EE\u5F55\u542B\u4E49
    bin\u53EF\u6267\u884C\u6587\u4EF6\u76EE\u5F55
    config\u914D\u7F6E\u76EE\u5F55
    jdk\u5185\u7F6Ejdk
    lib\u7C7B\u5E93
    logs\u65E5\u5FD7\u76EE\u5F55
    modules\u6A21\u5757\u76EE\u5F55
    plugins\u63D2\u4EF6\u76EE\u5F55
  3. bin\u76EE\u5F55\u4E0B\u7684elasticsearch.bat\u5373\u662Fwindows\u7248\u672C\u7684es\u670D\u52A1\u542F\u52A8\u6587\u4EF6\u3002

  4. 9300\u7AEF\u53E3\u4E3Aelasticsearch\u96C6\u7FA4\u95F4\u7EC4\u4EF6\u7684\u901A\u4FE1\u7AEF\u53E3\uFF0C9200\u7AEF\u53E3\u4E3A\u6D4F\u89C8\u5668\u8BBF\u95EE\u7684http\u534F\u8BAE\u7684restful\u7AEF\u53E3\u3002

  5. \u8DEF\u5F84\u662F\u5BF9\u8D44\u6E90\u7684\u5B9A\u4F4D\uFF0C\u65B9\u6CD5\u662F\u5BF9\u8D44\u6E90\u7684\u64CD\u4F5C\u3002

RESTful

  1. ES\u7684\u5BF9\u6570\u636E\u7684\u64CD\u4F5C\u662F\u7B26\u5408RESTful\u98CE\u683C\u7684API

    ES\u7684\u8BF7\u6C42\u548C\u54CD\u5E94\u90FD\u662FJSON\u5B57\u7B26\u4E32\u3002

  2. \u5BF9RESTful\u7684\u7B80\u5355\u7406\u89E3\uFF1A

    \u5982\u679C\u60F3\u8981\u8BBF\u95EE\u4E92\u8054\u7F51\u4E0A\u7684\u8D44\u6E90\uFF0C\u5C31\u5FC5\u987B\u5411\u8D44\u6E90\u6240\u5728\u7684\u670D\u52A1\u5668\u53D1\u51FA\u8BF7\u6C42\uFF0C\u8BF7\u6C42\u4F53\u4E2D\u5FC5\u987B\u5305\u542B\u8D44\u6E90\u7684\u7F51\u7EDC\u8DEF\u5F84\uFF0C\u4EE5\u53CA\u5BF9\u8D44\u6E90\u7684\u64CD\u4F5C\u3002

    REST\u6837\u5F0F\u7684API\u7684\u54CD\u5E94\u5927\u591A\u662FJSON\u683C\u5F0F\u7684\u5B57\u7B26\u4E32\u3002\u7F51\u7EDC\u4E2D\u662F\u4F20\u4E0D\u4E86\u5BF9\u8C61\u7684\uFF0C\u5FC5\u987B\u8981\u8FDB\u884C\u5E8F\u5217\u5316\u3002

  3. HTTP 1.1\u6807\u51C6\u4E2D\u6CA1\u6709\u89C4\u5B9AGET\u65B9\u6CD5\u662F\u5426\u53EF\u4EE5\u6709\u8BF7\u6C42\u4F53\uFF0C\u56E0\u6B64GET\u65B9\u6CD5\u4E5F\u53EF\u4EE5\u5E26\u6709\u8BF7\u6C42\u4F53\uFF0C\u5B8C\u5168\u7B26\u5408\u6807\u51C6\u3002ES\u4E2D\u5C31\u662F\u7528GET\u65B9\u6CD5\u7684\u8BF7\u6C42\u4F53\u4F20\u9012\u641C\u7D22\u6761\u4EF6\uFF0C\u4E3A\u4E86\u517C\u5BB9\u6027\u8003\u8651\uFF0CES\u4E5F\u63A5\u6536POST\u65B9\u6CD5+\u8BF7\u6C42\u4F53\u7684\u641C\u7D22\u65B9\u5F0F\u3002

\u6570\u636E\u683C\u5F0F

  1. ElasticSearch\u662F\u9762\u5411\u6587\u6863\u578B\u6570\u636E\u5E93\uFF0C\u4E00\u6761\u6570\u636E\u5728\u8FD9\u91CC\u5C31\u662F\u4E00\u4E2A\u6587\u6863\u3002

  2. \u4E0EMySQL\u5BF9\u6BD4\u7684\u8BDD\uFF0C\u5982\u4E0B

    index    type  document fields
    +import{_ as n,e as s}from"./app.f8791b52.js";const a={},t=s(`

    Elastic Search

    \u4E00\u3001\u6982\u8FF0

    es

    1. elastic search\u662F\u7528\u4E8E\u5B58\u50A8\u3001\u641C\u7D22\u7684\u9879\u76EE

      kibana\u662F\u5C55\u793A\u6570\u636E\u7684\u9879\u76EE

      kibana\u7ED3\u5408es\u53EF\u4EE5\u5B9E\u65F6\u5730\u5BF9\u6570\u636E\u8FDB\u884C\u641C\u7D22\u3001\u5206\u6790\u548C\u53EF\u89C6\u5316\u3002

    2. es\u662F\u4E00\u4E2A\u5F00\u6E90\u7684\u9AD8\u6269\u5C55\u7684\u5206\u5E03\u5F0F\u5168\u6587\u641C\u7D22\u5F15\u64CE\uFF0C\u662F\u6574\u4E2Aelastic stack\u6280\u672F\u6808\u7684\u6838\u5FC3\u3002

      \u5B83\u53EF\u4EE5\u8FD1\u4E4E\u5B9E\u65F6\u5730\u5B58\u50A8\u3001\u68C0\u7D22\u6570\u636E\u3002

    3. es\u7684\u5168\u6587\u641C\u7D22\u7684\u539F\u7406\u662F\u5012\u6392\u7D22\u5F15\u3002

    4. Lucene\u662FApache\u8F6F\u4EF6\u57FA\u91D1\u4F1AJakarta\u9879\u76EE\u7EC4\u7684\u4E00\u4E2A\u5B50\u9879\u76EE\uFF0C\u63D0\u4F9B\u4E86\u4E00\u4E2A\u7B80\u5355\u5374\u5F3A\u5927\u7684\u5E94\u7528\u7A0B\u5F0F\u63A5\u53E3\uFF0C\u80FD\u591F\u505A\u5168\u6587\u7D22\u5F15\u548C\u641C\u5BFB\u3002

      \u4F46Lucene\u53EA\u662F\u4E00\u4E2A\u63D0\u4F9B\u5168\u6587\u641C\u7D22\u529F\u80FD\u7C7B\u5E93\u7684\u6838\u5FC3\u5DE5\u5177\u5305\uFF0C\u800C\u771F\u6B63\u4F7F\u7528\u5B83\u8FD8\u9700\u8981\u4E00\u4E2A\u5B8C\u5584\u7684\u670D\u52A1\u6846\u67B6\u642D\u5EFA\u8D77\u6765\u8FDB\u884C\u5E94\u7528\u3002

      \u8FD9\u91CC\u7684\u5B8C\u5584\u7684\u670D\u52A1\u6846\u67B6\u4FBF\u662F\u8BF4\u7684es\u548Csolr\u3002

    5. es\u662F\u57FA\u4E8EJava\u5F00\u53D1\u7684\u3002

    \u5168\u6587\u641C\u7D22

    1. Google\uFF0C\u767E\u5EA6\u7C7B\u7684\u7F51\u7AD9\u641C\u7D22\uFF0C\u5B83\u4EEC\u90FD\u662F\u6839\u636E\u7F51\u9875\u4E2D\u7684\u5173\u952E\u5B57\u751F\u6210\u7D22\u5F15\uFF0C\u6211\u4EEC\u5728\u641C\u7D22\u7684\u65F6\u5019\u8F93\u5165\u5173\u952E\u5B57\uFF0C\u5B83\u4EEC\u4F1A\u5C06\u8BE5\u5173\u952E\u5B57\u5373\u7D22\u5F15\u5339\u914D\u5230\u7684\u6240\u6709\u7F51\u9875\u8FD4\u56DE\uFF1B\u8FD8\u6709\u5E38\u89C1\u7684\u9879\u76EE\u4E2D\u5E94\u7528\u65E5\u5FD7\u7684\u641C\u7D22\u7B49\u7B49\u3002\u5BF9\u4E8E\u8FD9\u4E9B\u975E\u7ED3\u6784\u5316\u7684\u6570\u636E\u6587\u672C\uFF0C\u5173\u7CFB\u578B\u6570\u636E\u5E93\u641C\u7D22\u4E0D\u662F\u80FD\u5F88\u597D\u7684\u652F\u6301\u3002

    2. \u4E00\u822C\u7684\u4F20\u7EDF\u5173\u7CFB\u578B\u6570\u636E\u5E93\uFF0C\u90FD\u4E0D\u4F1A\u7528\u6765\u8FDB\u884C\u5168\u6587\u68C0\u7D22\uFF0C\u4E00\u822C\u4E5F\u6CA1\u6709\u4EBA\u7528\u5173\u7CFB\u578B\u6570\u636E\u5E93\u5B58\u50A8\u6587\u672C\u5B57\u6BB5\u3002\u8FDB\u884C\u5168\u6587\u68C0\u7D22\u9700\u8981\u626B\u63CF\u6574\u4E2A\u8868\uFF0C\u5982\u679C\u6570\u636E\u91CF\u5927\u7684\u8BDD\u5373\u4F7F\u5BF9SQL\u8BED\u6CD5\u8FDB\u884C\u4F18\u5316\uFF0C\u4E5F\u6536\u6548\u751A\u5FAE\u3002

    3. \u4F7F\u7528ES\u6216Solr\u8FD9\u79CD\u5168\u6587\u68C0\u7D22\u5F15\u64CE\uFF1A

      • \u641C\u7D22\u7684\u6570\u636E\u5BF9\u8C61\u662F\u5927\u91CF\u7684\u975E\u7ED3\u6784\u5316\u7684\u6587\u672C\u6570\u636E\u3002
      • \u6587\u4EF6\u8BB0\u5F55\u91CF\u8FBE\u5230\u6570\u5341\u4E07\u6216\u6570\u767E\u4E07\u751A\u81F3\u66F4\u591A
      • \u5BF9\u9AD8\u5EA6\u76F8\u5173\u7684\u641C\u7D22\u7ED3\u679C\u7684\u6709\u7279\u6B8A\u9700\u6C42\uFF0C\u4F46\u662F\u6CA1\u6709\u53EF\u7528\u7684\u5173\u7CFB\u6570\u636E\u5E93\u53EF\u4EE5\u6EE1\u8DB3\u3002
    4. \u5168\u6587\u68C0\u7D22\u7684\u5DE5\u4F5C\u539F\u7406

      • \u5206\u8BCD

      • \u5BF9\u8BCD\u8FDB\u884C\u5904\u7406\uFF0C\u7F29\u51CF\u4E3A\u8BCD\u6839\u7B49\u7B49

      • \u6839\u636ETF-IDF\u7B97\u6CD5\u5BF9\u6BCF\u4E00\u4E2A\u8BCD\u8BA1\u7B97\u9891\u7387\uFF0C\u5206\u522B\u662F\u8FD9\u4E2A\u8BCD\u5728\u5F53\u524D\u6587\u6863\u4E2D\u51FA\u73B0\u7684\u6B21\u6570\uFF0C\u4EE5\u53CA\u8FD9\u4E2A\u8BCD\u5728\u6574\u4E2A\u6570\u636E\u96C6\u4E2D\u5728\u54EA\u4E9B\u6587\u6863\u4E2D\u51FA\u73B0\u4E86

      • \u6839\u636E\u4E0A\u4E00\u6B65\u8BA1\u7B97\u51FA\u7684\u4E24\u4E2A\u6307\u6807\uFF0C\u5BF9\u8BCD\u8FDB\u884C\u6392\u5E8F\uFF0C\u8FD9\u4E2A\u5C31\u662F\u6784\u5EFA\u5012\u6392\u7D22\u5F15

        TF-IDF\u7B97\u6CD5\u662F\u6839\u636E\u8BCD\u5728\u5355\u4E2A\u6587\u6863\u4E2D\u51FA\u73B0\u7684\u6B21\u6570\u548C\u5728\u5168\u90E8\u6587\u6863\u4E2D\u51FA\u73B0\u7684\u6B21\u6570\u3002

      • \u68C0\u7D22\u7A0B\u5E8F\u5C31\u6839\u636E\u4E8B\u5148\u5EFA\u7ACB\u7684\u7D22\u5F15\u8FDB\u884C\u67E5\u627E

    \u4E8C\u3001\u5165\u95E8

    \u5B89\u88C5

    1. windows\u7248\u7684es\u538B\u7F29\u5305\uFF0C\u89E3\u538B\u5373\u5B89\u88C5\u5B8C\u6210\u3002

    2. \u76EE\u5F55\uFF1A

      \u76EE\u5F55\u542B\u4E49
      bin\u53EF\u6267\u884C\u6587\u4EF6\u76EE\u5F55
      config\u914D\u7F6E\u76EE\u5F55
      jdk\u5185\u7F6Ejdk
      lib\u7C7B\u5E93
      logs\u65E5\u5FD7\u76EE\u5F55
      modules\u6A21\u5757\u76EE\u5F55
      plugins\u63D2\u4EF6\u76EE\u5F55
    3. bin\u76EE\u5F55\u4E0B\u7684elasticsearch.bat\u5373\u662Fwindows\u7248\u672C\u7684es\u670D\u52A1\u542F\u52A8\u6587\u4EF6\u3002

    4. 9300\u7AEF\u53E3\u4E3Aelasticsearch\u96C6\u7FA4\u95F4\u7EC4\u4EF6\u7684\u901A\u4FE1\u7AEF\u53E3\uFF0C9200\u7AEF\u53E3\u4E3A\u6D4F\u89C8\u5668\u8BBF\u95EE\u7684http\u534F\u8BAE\u7684restful\u7AEF\u53E3\u3002

    5. \u8DEF\u5F84\u662F\u5BF9\u8D44\u6E90\u7684\u5B9A\u4F4D\uFF0C\u65B9\u6CD5\u662F\u5BF9\u8D44\u6E90\u7684\u64CD\u4F5C\u3002

    RESTful

    1. ES\u7684\u5BF9\u6570\u636E\u7684\u64CD\u4F5C\u662F\u7B26\u5408RESTful\u98CE\u683C\u7684API

      ES\u7684\u8BF7\u6C42\u548C\u54CD\u5E94\u90FD\u662FJSON\u5B57\u7B26\u4E32\u3002

    2. \u5BF9RESTful\u7684\u7B80\u5355\u7406\u89E3\uFF1A

      \u5982\u679C\u60F3\u8981\u8BBF\u95EE\u4E92\u8054\u7F51\u4E0A\u7684\u8D44\u6E90\uFF0C\u5C31\u5FC5\u987B\u5411\u8D44\u6E90\u6240\u5728\u7684\u670D\u52A1\u5668\u53D1\u51FA\u8BF7\u6C42\uFF0C\u8BF7\u6C42\u4F53\u4E2D\u5FC5\u987B\u5305\u542B\u8D44\u6E90\u7684\u7F51\u7EDC\u8DEF\u5F84\uFF0C\u4EE5\u53CA\u5BF9\u8D44\u6E90\u7684\u64CD\u4F5C\u3002

      REST\u6837\u5F0F\u7684API\u7684\u54CD\u5E94\u5927\u591A\u662FJSON\u683C\u5F0F\u7684\u5B57\u7B26\u4E32\u3002\u7F51\u7EDC\u4E2D\u662F\u4F20\u4E0D\u4E86\u5BF9\u8C61\u7684\uFF0C\u5FC5\u987B\u8981\u8FDB\u884C\u5E8F\u5217\u5316\u3002

    3. HTTP 1.1\u6807\u51C6\u4E2D\u6CA1\u6709\u89C4\u5B9AGET\u65B9\u6CD5\u662F\u5426\u53EF\u4EE5\u6709\u8BF7\u6C42\u4F53\uFF0C\u56E0\u6B64GET\u65B9\u6CD5\u4E5F\u53EF\u4EE5\u5E26\u6709\u8BF7\u6C42\u4F53\uFF0C\u5B8C\u5168\u7B26\u5408\u6807\u51C6\u3002ES\u4E2D\u5C31\u662F\u7528GET\u65B9\u6CD5\u7684\u8BF7\u6C42\u4F53\u4F20\u9012\u641C\u7D22\u6761\u4EF6\uFF0C\u4E3A\u4E86\u517C\u5BB9\u6027\u8003\u8651\uFF0CES\u4E5F\u63A5\u6536POST\u65B9\u6CD5+\u8BF7\u6C42\u4F53\u7684\u641C\u7D22\u65B9\u5F0F\u3002

    \u6570\u636E\u683C\u5F0F

    1. ElasticSearch\u662F\u9762\u5411\u6587\u6863\u578B\u6570\u636E\u5E93\uFF0C\u4E00\u6761\u6570\u636E\u5728\u8FD9\u91CC\u5C31\u662F\u4E00\u4E2A\u6587\u6863\u3002

    2. \u4E0EMySQL\u5BF9\u6BD4\u7684\u8BDD\uFF0C\u5982\u4E0B

      index    type  document fields
       database table row      column
       

      \u8FD9\u91CCtype\u7684\u6982\u5FF5\u88AB\u5F31\u5316\uFF0CES6.X\u4E2D\uFF0C\u4E00\u4E2Aindex\u4E0B\u5DF2\u7ECF\u53EA\u80FD\u5305\u542B\u4E00\u4E2AType\uFF0C\u800C\u4E0D\u662F\u50CFMySQL\u4E00\u6837\uFF0C\u4E00\u4E2A\u6570\u636E\u91CC\u6709\u591A\u5F20\u6570\u636E\u8868\u3002\u800C\u5230ES7.X\u4E2D\uFF0CType\u7684\u6982\u5FF5\u5DF2\u7ECF\u88AB\u5220\u9664\u4E86\u3002

    3. \u5168\u6587\u641C\u7D22\u5F15\u64CE\uFF0C\u4E0D\u7BA1\u662FES\u8FD8\u662Fsolr\u90FD\u4F1A\u8FDB\u884C\u5206\u8BCD\uFF1B\u5BF9\u8BCD\u8FDB\u884C\u8BED\u6CD5\u4F18\u5316\uFF1B\u6839\u636ETF-IDF\u7B97\u6CD5\uFF0C\u4E3A\u8BCD\u5EFA\u7ACB\u5012\u6392\u7D22\u5F15

      \u8FD9\u91CC\u5E76\u6CA1\u6709\u8868\u7684\u6982\u5FF5\u3002

    \u4E09\u3001\u57FA\u672C\u4F7F\u7528

    \u7D22\u5F15\u64CD\u4F5C

    \u521B\u5EFA\u7D22\u5F15

    1. \u5BF9\u6BD4\u5173\u7CFB\u578B\u6570\u636E\u5E93\uFF0C\u521B\u5EFA\u7D22\u5F15\u5C31\u7B49\u540C\u4E8E\u521B\u5EFA\u6570\u636E\u5E93\u3002

      \u5728postman\u4E2D\uFF0C\u5411ES\u670D\u52A1\u53D1\u9001PUT\u8BF7\u6C42\uFF1Ahttp://localhost:9200/shopping

    2. PUT localhost:9200/shopping

      response:

      {
           "acknowledged": true,
      diff --git a/assets/ES.html.6ce7153c.js b/assets/ES.html.fda018d9.js
      similarity index 99%
      rename from assets/ES.html.6ce7153c.js
      rename to assets/ES.html.fda018d9.js
      index 8fa5f386..8876bed3 100644
      --- a/assets/ES.html.6ce7153c.js
      +++ b/assets/ES.html.fda018d9.js
      @@ -1 +1 @@
      -const l={key:"v-3201b6ed",path:"/mw/elasticsearch/ES.html",title:"elastic search\u7B80\u4ECB",lang:"zh-CN",frontmatter:{title:"elastic search\u7B80\u4ECB"},excerpt:"",headers:[{level:2,title:"\u4E00\u3001\u6982\u8FF0",slug:"\u4E00\u3001\u6982\u8FF0",children:[{level:3,title:"es",slug:"es",children:[]},{level:3,title:"\u5168\u6587\u641C\u7D22",slug:"\u5168\u6587\u641C\u7D22",children:[]}]},{level:2,title:"\u4E8C\u3001\u5165\u95E8",slug:"\u4E8C\u3001\u5165\u95E8",children:[{level:3,title:"\u5B89\u88C5",slug:"\u5B89\u88C5",children:[]},{level:3,title:"RESTful",slug:"restful",children:[]},{level:3,title:"\u6570\u636E\u683C\u5F0F",slug:"\u6570\u636E\u683C\u5F0F",children:[]}]},{level:2,title:"\u4E09\u3001\u57FA\u672C\u4F7F\u7528",slug:"\u4E09\u3001\u57FA\u672C\u4F7F\u7528",children:[{level:3,title:"\u7D22\u5F15\u64CD\u4F5C",slug:"\u7D22\u5F15\u64CD\u4F5C",children:[{level:4,title:"\u521B\u5EFA\u7D22\u5F15",slug:"\u521B\u5EFA\u7D22\u5F15",children:[]},{level:4,title:"\u83B7\u53D6\u7D22\u5F15\u4FE1\u606F",slug:"\u83B7\u53D6\u7D22\u5F15\u4FE1\u606F",children:[]},{level:4,title:"\u5220\u9664\u7D22\u5F15",slug:"\u5220\u9664\u7D22\u5F15",children:[]}]},{level:3,title:"\u6587\u6863\u64CD\u4F5C",slug:"\u6587\u6863\u64CD\u4F5C",children:[{level:4,title:"\u521B\u5EFA\u6587\u6863",slug:"\u521B\u5EFA\u6587\u6863",children:[]},{level:4,title:"\u67E5\u8BE2\u6587\u6863",slug:"\u67E5\u8BE2\u6587\u6863",children:[]},{level:4,title:"\u4FEE\u6539\u6587\u6863",slug:"\u4FEE\u6539\u6587\u6863",children:[]},{level:4,title:"\u5220\u9664\u6587\u6863",slug:"\u5220\u9664\u6587\u6863",children:[]}]},{level:3,title:"\u67E5\u8BE2\u64CD\u4F5C",slug:"\u67E5\u8BE2\u64CD\u4F5C",children:[{level:4,title:"\u6761\u4EF6\u67E5\u8BE2",slug:"\u6761\u4EF6\u67E5\u8BE2",children:[]},{level:4,title:"\u5168\u67E5\u8BE2",slug:"\u5168\u67E5\u8BE2",children:[]},{level:4,title:"\u5206\u9875\u67E5\u8BE2",slug:"\u5206\u9875\u67E5\u8BE2",children:[]},{level:4,title:"\u8FD4\u56DE\u6307\u5B9A\u5B57\u6BB5",slug:"\u8FD4\u56DE\u6307\u5B9A\u5B57\u6BB5",children:[]},{level:4,title:"\u6307\u5B9A\u5B57\u6BB5\u6392\u5E8F",slug:"\u6307\u5B9A\u5B57\u6BB5\u6392\u5E8F",children:[]},{level:4,title:"\u591A\u6761\u4EF6\u67E5\u8BE2",slug:"\u591A\u6761\u4EF6\u67E5\u8BE2",children:[]},{level:4,title:"\u8303\u56F4\u67E5\u8BE2",slug:"\u8303\u56F4\u67E5\u8BE2",children:[]},{level:4,title:"\u5168\u6587\u68C0\u7D22",slug:"\u5168\u6587\u68C0\u7D22",children:[]},{level:4,title:"\u9AD8\u4EAE",slug:"\u9AD8\u4EAE",children:[]},{level:4,title:"\u805A\u5408\u64CD\u4F5C",slug:"\u805A\u5408\u64CD\u4F5C",children:[]}]},{level:3,title:"\u6620\u5C04",slug:"\u6620\u5C04",children:[{level:4,title:"\u6982\u8FF0",slug:"\u6982\u8FF0",children:[]},{level:4,title:"\u521B\u5EFAmapping",slug:"\u521B\u5EFAmapping",children:[]},{level:4,title:"\u67E5\u8BE2mapping\u4FE1\u606F",slug:"\u67E5\u8BE2mapping\u4FE1\u606F",children:[]}]}]},{level:2,title:"\u56DB\u3001JavaAPI",slug:"\u56DB\u3001javaapi",children:[{level:3,title:"\u73AF\u5883\u51C6\u5907",slug:"\u73AF\u5883\u51C6\u5907",children:[]},{level:3,title:"\u5BA2\u6237\u7AEF\u914D\u7F6E",slug:"\u5BA2\u6237\u7AEF\u914D\u7F6E",children:[]},{level:3,title:"\u7D22\u5F15\u64CD\u4F5C",slug:"\u7D22\u5F15\u64CD\u4F5C-1",children:[{level:4,title:"\u521B\u5EFA\u7D22\u5F15",slug:"\u521B\u5EFA\u7D22\u5F15-1",children:[]},{level:4,title:"\u67E5\u8BE2\u7D22\u5F15",slug:"\u67E5\u8BE2\u7D22\u5F15",children:[]},{level:4,title:"\u5220\u9664\u7D22\u5F15",slug:"\u5220\u9664\u7D22\u5F15-1",children:[]}]},{level:3,title:"\u6587\u6863\u64CD\u4F5C",slug:"\u6587\u6863\u64CD\u4F5C-1",children:[{level:4,title:"\u6DFB\u52A0\u6587\u6863",slug:"\u6DFB\u52A0\u6587\u6863",children:[]},{level:4,title:"\u4FEE\u6539\u6570\u636E",slug:"\u4FEE\u6539\u6570\u636E",children:[]},{level:4,title:"\u67E5\u8BE2\u6570\u636E",slug:"\u67E5\u8BE2\u6570\u636E",children:[]},{level:4,title:"\u5220\u9664\u6570\u636E",slug:"\u5220\u9664\u6570\u636E",children:[]}]},{level:3,title:"\u6279\u91CF\u6587\u6863\u64CD\u4F5C",slug:"\u6279\u91CF\u6587\u6863\u64CD\u4F5C",children:[{level:4,title:"\u6279\u91CF\u63D2\u5165",slug:"\u6279\u91CF\u63D2\u5165",children:[]},{level:4,title:"\u6279\u91CF\u5220\u9664",slug:"\u6279\u91CF\u5220\u9664",children:[]}]},{level:3,title:"\u6761\u4EF6\u67E5\u8BE2",slug:"\u6761\u4EF6\u67E5\u8BE2-1",children:[{level:4,title:"\u67E5\u8BE2\u6240\u6709\u6570\u636E",slug:"\u67E5\u8BE2\u6240\u6709\u6570\u636E",children:[]},{level:4,title:"\u6307\u5B9A\u5B57\u6BB5\u67E5\u8BE2",slug:"\u6307\u5B9A\u5B57\u6BB5\u67E5\u8BE2",children:[]},{level:4,title:"\u5206\u9875\u67E5\u8BE2",slug:"\u5206\u9875\u67E5\u8BE2-1",children:[]},{level:4,title:"\u67E5\u8BE2\u7ED3\u679C\u6392\u5E8F",slug:"\u67E5\u8BE2\u7ED3\u679C\u6392\u5E8F",children:[]},{level:4,title:"\u8FD4\u56DE\u6307\u5B9A\u5B57\u6BB5",slug:"\u8FD4\u56DE\u6307\u5B9A\u5B57\u6BB5-1",children:[]}]},{level:3,title:"\u9AD8\u7EA7\u67E5\u8BE2",slug:"\u9AD8\u7EA7\u67E5\u8BE2",children:[{level:4,title:"\u7EC4\u5408\u67E5\u8BE2",slug:"\u7EC4\u5408\u67E5\u8BE2",children:[]},{level:4,title:"\u8303\u56F4\u67E5\u8BE2",slug:"\u8303\u56F4\u67E5\u8BE2-1",children:[]},{level:4,title:"\u6A21\u7CCA\u67E5\u8BE2",slug:"\u6A21\u7CCA\u67E5\u8BE2",children:[]},{level:4,title:"\u9AD8\u4EAE\u67E5\u8BE2",slug:"\u9AD8\u4EAE\u67E5\u8BE2",children:[]},{level:4,title:"\u805A\u5408\u67E5\u8BE2",slug:"\u805A\u5408\u67E5\u8BE2",children:[]},{level:4,title:"\u5206\u7EC4\u67E5\u8BE2",slug:"\u5206\u7EC4\u67E5\u8BE2",children:[]}]}]},{level:2,title:"\u4E94\u3001ES\u73AF\u5883",slug:"\u4E94\u3001es\u73AF\u5883",children:[{level:3,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-1",children:[]},{level:3,title:"\u8282\u70B9",slug:"\u8282\u70B9",children:[]},{level:3,title:"WIN\u96C6\u7FA4\u90E8\u7F72",slug:"win\u96C6\u7FA4\u90E8\u7F72",children:[{level:4,title:"\u4FEE\u6539\u914D\u7F6E",slug:"\u4FEE\u6539\u914D\u7F6E",children:[]},{level:4,title:"\u67E5\u8BE2\u8282\u70B9\u72B6\u6001",slug:"\u67E5\u8BE2\u8282\u70B9\u72B6\u6001",children:[]}]},{level:3,title:"Linux\u5355\u70B9\u90E8\u7F72",slug:"linux\u5355\u70B9\u90E8\u7F72",children:[{level:4,title:"\u4FEE\u6539\u914D\u7F6E",slug:"\u4FEE\u6539\u914D\u7F6E-1",children:[]}]},{level:3,title:"Linux\u96C6\u7FA4\u90E8\u7F72",slug:"linux\u96C6\u7FA4\u90E8\u7F72",children:[{level:4,title:"\u4FEE\u6539\u914D\u7F6E",slug:"\u4FEE\u6539\u914D\u7F6E-2",children:[]}]}]},{level:2,title:"\u516D\u3001ES\u8FDB\u9636",slug:"\u516D\u3001es\u8FDB\u9636",children:[{level:3,title:"\u6838\u5FC3\u6982\u5FF5",slug:"\u6838\u5FC3\u6982\u5FF5",children:[]}]}],git:{updatedTime:1710173765e3,contributors:[{name:"shailene",email:"64005626+shaileneF@users.noreply.github.com",commits:1}]},filePathRelative:"mw/elasticsearch/ES.md"};export{l as data};
      +const l={key:"v-3201b6ed",path:"/mw/elasticsearch/ES.html",title:"elastic search\u7B80\u4ECB",lang:"zh-CN",frontmatter:{title:"elastic search\u7B80\u4ECB"},excerpt:"",headers:[{level:2,title:"\u4E00\u3001\u6982\u8FF0",slug:"\u4E00\u3001\u6982\u8FF0",children:[{level:3,title:"es",slug:"es",children:[]},{level:3,title:"\u5168\u6587\u641C\u7D22",slug:"\u5168\u6587\u641C\u7D22",children:[]}]},{level:2,title:"\u4E8C\u3001\u5165\u95E8",slug:"\u4E8C\u3001\u5165\u95E8",children:[{level:3,title:"\u5B89\u88C5",slug:"\u5B89\u88C5",children:[]},{level:3,title:"RESTful",slug:"restful",children:[]},{level:3,title:"\u6570\u636E\u683C\u5F0F",slug:"\u6570\u636E\u683C\u5F0F",children:[]}]},{level:2,title:"\u4E09\u3001\u57FA\u672C\u4F7F\u7528",slug:"\u4E09\u3001\u57FA\u672C\u4F7F\u7528",children:[{level:3,title:"\u7D22\u5F15\u64CD\u4F5C",slug:"\u7D22\u5F15\u64CD\u4F5C",children:[{level:4,title:"\u521B\u5EFA\u7D22\u5F15",slug:"\u521B\u5EFA\u7D22\u5F15",children:[]},{level:4,title:"\u83B7\u53D6\u7D22\u5F15\u4FE1\u606F",slug:"\u83B7\u53D6\u7D22\u5F15\u4FE1\u606F",children:[]},{level:4,title:"\u5220\u9664\u7D22\u5F15",slug:"\u5220\u9664\u7D22\u5F15",children:[]}]},{level:3,title:"\u6587\u6863\u64CD\u4F5C",slug:"\u6587\u6863\u64CD\u4F5C",children:[{level:4,title:"\u521B\u5EFA\u6587\u6863",slug:"\u521B\u5EFA\u6587\u6863",children:[]},{level:4,title:"\u67E5\u8BE2\u6587\u6863",slug:"\u67E5\u8BE2\u6587\u6863",children:[]},{level:4,title:"\u4FEE\u6539\u6587\u6863",slug:"\u4FEE\u6539\u6587\u6863",children:[]},{level:4,title:"\u5220\u9664\u6587\u6863",slug:"\u5220\u9664\u6587\u6863",children:[]}]},{level:3,title:"\u67E5\u8BE2\u64CD\u4F5C",slug:"\u67E5\u8BE2\u64CD\u4F5C",children:[{level:4,title:"\u6761\u4EF6\u67E5\u8BE2",slug:"\u6761\u4EF6\u67E5\u8BE2",children:[]},{level:4,title:"\u5168\u67E5\u8BE2",slug:"\u5168\u67E5\u8BE2",children:[]},{level:4,title:"\u5206\u9875\u67E5\u8BE2",slug:"\u5206\u9875\u67E5\u8BE2",children:[]},{level:4,title:"\u8FD4\u56DE\u6307\u5B9A\u5B57\u6BB5",slug:"\u8FD4\u56DE\u6307\u5B9A\u5B57\u6BB5",children:[]},{level:4,title:"\u6307\u5B9A\u5B57\u6BB5\u6392\u5E8F",slug:"\u6307\u5B9A\u5B57\u6BB5\u6392\u5E8F",children:[]},{level:4,title:"\u591A\u6761\u4EF6\u67E5\u8BE2",slug:"\u591A\u6761\u4EF6\u67E5\u8BE2",children:[]},{level:4,title:"\u8303\u56F4\u67E5\u8BE2",slug:"\u8303\u56F4\u67E5\u8BE2",children:[]},{level:4,title:"\u5168\u6587\u68C0\u7D22",slug:"\u5168\u6587\u68C0\u7D22",children:[]},{level:4,title:"\u9AD8\u4EAE",slug:"\u9AD8\u4EAE",children:[]},{level:4,title:"\u805A\u5408\u64CD\u4F5C",slug:"\u805A\u5408\u64CD\u4F5C",children:[]}]},{level:3,title:"\u6620\u5C04",slug:"\u6620\u5C04",children:[{level:4,title:"\u6982\u8FF0",slug:"\u6982\u8FF0",children:[]},{level:4,title:"\u521B\u5EFAmapping",slug:"\u521B\u5EFAmapping",children:[]},{level:4,title:"\u67E5\u8BE2mapping\u4FE1\u606F",slug:"\u67E5\u8BE2mapping\u4FE1\u606F",children:[]}]}]},{level:2,title:"\u56DB\u3001JavaAPI",slug:"\u56DB\u3001javaapi",children:[{level:3,title:"\u73AF\u5883\u51C6\u5907",slug:"\u73AF\u5883\u51C6\u5907",children:[]},{level:3,title:"\u5BA2\u6237\u7AEF\u914D\u7F6E",slug:"\u5BA2\u6237\u7AEF\u914D\u7F6E",children:[]},{level:3,title:"\u7D22\u5F15\u64CD\u4F5C",slug:"\u7D22\u5F15\u64CD\u4F5C-1",children:[{level:4,title:"\u521B\u5EFA\u7D22\u5F15",slug:"\u521B\u5EFA\u7D22\u5F15-1",children:[]},{level:4,title:"\u67E5\u8BE2\u7D22\u5F15",slug:"\u67E5\u8BE2\u7D22\u5F15",children:[]},{level:4,title:"\u5220\u9664\u7D22\u5F15",slug:"\u5220\u9664\u7D22\u5F15-1",children:[]}]},{level:3,title:"\u6587\u6863\u64CD\u4F5C",slug:"\u6587\u6863\u64CD\u4F5C-1",children:[{level:4,title:"\u6DFB\u52A0\u6587\u6863",slug:"\u6DFB\u52A0\u6587\u6863",children:[]},{level:4,title:"\u4FEE\u6539\u6570\u636E",slug:"\u4FEE\u6539\u6570\u636E",children:[]},{level:4,title:"\u67E5\u8BE2\u6570\u636E",slug:"\u67E5\u8BE2\u6570\u636E",children:[]},{level:4,title:"\u5220\u9664\u6570\u636E",slug:"\u5220\u9664\u6570\u636E",children:[]}]},{level:3,title:"\u6279\u91CF\u6587\u6863\u64CD\u4F5C",slug:"\u6279\u91CF\u6587\u6863\u64CD\u4F5C",children:[{level:4,title:"\u6279\u91CF\u63D2\u5165",slug:"\u6279\u91CF\u63D2\u5165",children:[]},{level:4,title:"\u6279\u91CF\u5220\u9664",slug:"\u6279\u91CF\u5220\u9664",children:[]}]},{level:3,title:"\u6761\u4EF6\u67E5\u8BE2",slug:"\u6761\u4EF6\u67E5\u8BE2-1",children:[{level:4,title:"\u67E5\u8BE2\u6240\u6709\u6570\u636E",slug:"\u67E5\u8BE2\u6240\u6709\u6570\u636E",children:[]},{level:4,title:"\u6307\u5B9A\u5B57\u6BB5\u67E5\u8BE2",slug:"\u6307\u5B9A\u5B57\u6BB5\u67E5\u8BE2",children:[]},{level:4,title:"\u5206\u9875\u67E5\u8BE2",slug:"\u5206\u9875\u67E5\u8BE2-1",children:[]},{level:4,title:"\u67E5\u8BE2\u7ED3\u679C\u6392\u5E8F",slug:"\u67E5\u8BE2\u7ED3\u679C\u6392\u5E8F",children:[]},{level:4,title:"\u8FD4\u56DE\u6307\u5B9A\u5B57\u6BB5",slug:"\u8FD4\u56DE\u6307\u5B9A\u5B57\u6BB5-1",children:[]}]},{level:3,title:"\u9AD8\u7EA7\u67E5\u8BE2",slug:"\u9AD8\u7EA7\u67E5\u8BE2",children:[{level:4,title:"\u7EC4\u5408\u67E5\u8BE2",slug:"\u7EC4\u5408\u67E5\u8BE2",children:[]},{level:4,title:"\u8303\u56F4\u67E5\u8BE2",slug:"\u8303\u56F4\u67E5\u8BE2-1",children:[]},{level:4,title:"\u6A21\u7CCA\u67E5\u8BE2",slug:"\u6A21\u7CCA\u67E5\u8BE2",children:[]},{level:4,title:"\u9AD8\u4EAE\u67E5\u8BE2",slug:"\u9AD8\u4EAE\u67E5\u8BE2",children:[]},{level:4,title:"\u805A\u5408\u67E5\u8BE2",slug:"\u805A\u5408\u67E5\u8BE2",children:[]},{level:4,title:"\u5206\u7EC4\u67E5\u8BE2",slug:"\u5206\u7EC4\u67E5\u8BE2",children:[]}]}]},{level:2,title:"\u4E94\u3001ES\u73AF\u5883",slug:"\u4E94\u3001es\u73AF\u5883",children:[{level:3,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-1",children:[]},{level:3,title:"\u8282\u70B9",slug:"\u8282\u70B9",children:[]},{level:3,title:"WIN\u96C6\u7FA4\u90E8\u7F72",slug:"win\u96C6\u7FA4\u90E8\u7F72",children:[{level:4,title:"\u4FEE\u6539\u914D\u7F6E",slug:"\u4FEE\u6539\u914D\u7F6E",children:[]},{level:4,title:"\u67E5\u8BE2\u8282\u70B9\u72B6\u6001",slug:"\u67E5\u8BE2\u8282\u70B9\u72B6\u6001",children:[]}]},{level:3,title:"Linux\u5355\u70B9\u90E8\u7F72",slug:"linux\u5355\u70B9\u90E8\u7F72",children:[{level:4,title:"\u4FEE\u6539\u914D\u7F6E",slug:"\u4FEE\u6539\u914D\u7F6E-1",children:[]}]},{level:3,title:"Linux\u96C6\u7FA4\u90E8\u7F72",slug:"linux\u96C6\u7FA4\u90E8\u7F72",children:[{level:4,title:"\u4FEE\u6539\u914D\u7F6E",slug:"\u4FEE\u6539\u914D\u7F6E-2",children:[]}]}]},{level:2,title:"\u516D\u3001ES\u8FDB\u9636",slug:"\u516D\u3001es\u8FDB\u9636",children:[{level:3,title:"\u6838\u5FC3\u6982\u5FF5",slug:"\u6838\u5FC3\u6982\u5FF5",children:[]}]}],git:{updatedTime:1710173784e3,contributors:[{name:"shailene",email:"64005626+shaileneF@users.noreply.github.com",commits:1}]},filePathRelative:"mw/elasticsearch/ES.md"};export{l as data};
      diff --git a/assets/Javaweb.html.42f83f44.js b/assets/Javaweb.html.020e7587.js
      similarity index 98%
      rename from assets/Javaweb.html.42f83f44.js
      rename to assets/Javaweb.html.020e7587.js
      index 25187d42..0da1d5c2 100644
      --- a/assets/Javaweb.html.42f83f44.js
      +++ b/assets/Javaweb.html.020e7587.js
      @@ -1 +1 @@
      -const e={key:"v-b6ec6710",path:"/java/JavaWeb/Javaweb.html",title:"Java Web",lang:"zh-CN",frontmatter:{},excerpt:"",headers:[{level:2,title:"\u4E00\u3001HTML",slug:"\u4E00\u3001html",children:[]},{level:2,title:"\u4E8C\u3001CSS",slug:"\u4E8C\u3001css",children:[]},{level:2,title:"\u4E09\u3001JavaScript",slug:"\u4E09\u3001javascript",children:[]},{level:2,title:"\u56DB\u3001jQuery\uFF08\u5177\u4F53\u64CD\u4F5C\u770B\u83DC\u9E1F\u6559\u7A0B\u67E5\u8BE2\uFF09",slug:"\u56DB\u3001jquery-\u5177\u4F53\u64CD\u4F5C\u770B\u83DC\u9E1F\u6559\u7A0B\u67E5\u8BE2",children:[]},{level:2,title:"\u4E94\u3001XML",slug:"\u4E94\u3001xml",children:[]},{level:2,title:"\u516D\u3001Tomcat",slug:"\u516D\u3001tomcat",children:[{level:3,title:"Javaweb\u6982\u8FF0",slug:"javaweb\u6982\u8FF0",children:[]},{level:3,title:"Tomcat\u76EE\u5F55\u4ECB\u7ECD",slug:"tomcat\u76EE\u5F55\u4ECB\u7ECD",children:[]},{level:3,title:"\u5173\u4E8ETomcat\u670D\u52A1\u5668\u7684\u542F\u505C",slug:"\u5173\u4E8Etomcat\u670D\u52A1\u5668\u7684\u542F\u505C",children:[]},{level:3,title:"\u5982\u4F55\u90E8\u7F72web\u5DE5\u7A0B\u5230Tomcat\u4E2D",slug:"\u5982\u4F55\u90E8\u7F72web\u5DE5\u7A0B\u5230tomcat\u4E2D",children:[]},{level:3,title:"Javaweb\u5DE5\u7A0B\u76EE\u5F55\u4ECB\u7ECD",slug:"javaweb\u5DE5\u7A0B\u76EE\u5F55\u4ECB\u7ECD",children:[]}]},{level:2,title:"\u4E03\u3001Servlet",slug:"\u4E03\u3001servlet",children:[{level:3,title:"\u4EC0\u4E48\u662FServlet",slug:"\u4EC0\u4E48\u662Fservlet",children:[]},{level:3,title:"Servlet\u7684\u4F5C\u7528\uFF1A",slug:"servlet\u7684\u4F5C\u7528",children:[]},{level:3,title:"\u600E\u4E48\u5B9E\u73B0Servlet\u7A0B\u5E8F",slug:"\u600E\u4E48\u5B9E\u73B0servlet\u7A0B\u5E8F",children:[{level:4,title:"\u65B9\u5F0F\u4E00\uFF1A",slug:"\u65B9\u5F0F\u4E00",children:[]},{level:4,title:"\u65B9\u5F0F\u4E8C\uFF1A",slug:"\u65B9\u5F0F\u4E8C",children:[]},{level:4,title:"\u6CE8\u610F\uFF1A",slug:"\u6CE8\u610F",children:[]}]},{level:3,title:"\u8F93\u5165URL\u5230\u8BBF\u95EE\u5230\u9875\u9762\u7684\u539F\u7406\uFF1A",slug:"\u8F93\u5165url\u5230\u8BBF\u95EE\u5230\u9875\u9762\u7684\u539F\u7406",children:[]},{level:3,title:"servlet\u7A0B\u5E8F\u7684\u751F\u547D\u5468\u671F",slug:"servlet\u7A0B\u5E8F\u7684\u751F\u547D\u5468\u671F",children:[]},{level:3,title:"GET\u8BF7\u6C42\u548CPOST\u8BF7\u6C42\u7684\u5206\u53D1\u5904\u7406",slug:"get\u8BF7\u6C42\u548Cpost\u8BF7\u6C42\u7684\u5206\u53D1\u5904\u7406",children:[]},{level:3,title:"\u901A\u8FC7\u7EE7\u627FHttpServlet\u5B9E\u73B0Servlet\u7A0B\u5E8F",slug:"\u901A\u8FC7\u7EE7\u627Fhttpservlet\u5B9E\u73B0servlet\u7A0B\u5E8F",children:[]},{level:3,title:"ServletConfig\u7C7B",slug:"servletconfig\u7C7B",children:[]},{level:3,title:"ServletContext\u7C7B",slug:"servletcontext\u7C7B",children:[]},{level:3,title:"HttpServletRequest\u7C7B",slug:"httpservletrequest\u7C7B",children:[]},{level:3,title:"\u8BF7\u6C42\u8F6C\u53D1",slug:"\u8BF7\u6C42\u8F6C\u53D1",children:[]},{level:3,title:"HttpServletResponse\u7C7B",slug:"httpservletresponse\u7C7B",children:[]}]},{level:2,title:"\u516B\u3001HTTP\u534F\u8BAE",slug:"\u516B\u3001http\u534F\u8BAE",children:[{level:3,title:"\u4EC0\u4E48\u662FHTTP\u534F\u8BAE",slug:"\u4EC0\u4E48\u662Fhttp\u534F\u8BAE",children:[]},{level:3,title:"GET\u8BF7\u6C42\uFF08\u4E24\u4E2A\u90E8\u5206--\u8BF7\u6C42\u884C\u3001\u8BF7\u6C42\u5934\uFF09",slug:"get\u8BF7\u6C42-\u4E24\u4E2A\u90E8\u5206-\u8BF7\u6C42\u884C\u3001\u8BF7\u6C42\u5934",children:[]},{level:3,title:"POST\u8BF7\u6C42\uFF08\u4E09\u4E2A\u90E8\u5206---\u8BF7\u6C42\u884C\u3001\u8BF7\u6C42\u5934\u3001\u8BF7\u6C42\u4F53\uFF09",slug:"post\u8BF7\u6C42-\u4E09\u4E2A\u90E8\u5206-\u8BF7\u6C42\u884C\u3001\u8BF7\u6C42\u5934\u3001\u8BF7\u6C42\u4F53",children:[]},{level:3,title:"\u54CD\u5E94\u7684HTTP\u534F\u8BAE\u683C\u5F0F",slug:"\u54CD\u5E94\u7684http\u534F\u8BAE\u683C\u5F0F",children:[]},{level:3,title:"MIME \u7C7B\u578B\u8BF4\u660E",slug:"mime-\u7C7B\u578B\u8BF4\u660E",children:[]}]},{level:2,title:"\u4E5D\u3001JavaEE \u4E09\u5C42\u67B6\u6784",slug:"\u4E5D\u3001javaee-\u4E09\u5C42\u67B6\u6784",children:[]},{level:2,title:"\u5341\u3001JSP",slug:"\u5341\u3001jsp",children:[]},{level:2,title:"\u5341\u4E00\u3001Listener\u76D1\u542C\u5668",slug:"\u5341\u4E00\u3001listener\u76D1\u542C\u5668",children:[]},{level:2,title:"\u5341\u4E8C\u3001EL\u8868\u8FBE\u5F0F",slug:"\u5341\u4E8C\u3001el\u8868\u8FBE\u5F0F",children:[]},{level:2,title:"\u5341\u4E09\u3001\u6587\u4EF6\u7684\u4E0A\u4F20\u548C\u4E0B\u8F7D",slug:"\u5341\u4E09\u3001\u6587\u4EF6\u7684\u4E0A\u4F20\u548C\u4E0B\u8F7D",children:[]}],git:{updatedTime:1710173765e3,contributors:[{name:"shailene",email:"64005626+shaileneF@users.noreply.github.com",commits:1}]},filePathRelative:"java/JavaWeb/Javaweb.md"};export{e as data};
      +const e={key:"v-b6ec6710",path:"/java/JavaWeb/Javaweb.html",title:"Java Web",lang:"zh-CN",frontmatter:{},excerpt:"",headers:[{level:2,title:"\u4E00\u3001HTML",slug:"\u4E00\u3001html",children:[]},{level:2,title:"\u4E8C\u3001CSS",slug:"\u4E8C\u3001css",children:[]},{level:2,title:"\u4E09\u3001JavaScript",slug:"\u4E09\u3001javascript",children:[]},{level:2,title:"\u56DB\u3001jQuery\uFF08\u5177\u4F53\u64CD\u4F5C\u770B\u83DC\u9E1F\u6559\u7A0B\u67E5\u8BE2\uFF09",slug:"\u56DB\u3001jquery-\u5177\u4F53\u64CD\u4F5C\u770B\u83DC\u9E1F\u6559\u7A0B\u67E5\u8BE2",children:[]},{level:2,title:"\u4E94\u3001XML",slug:"\u4E94\u3001xml",children:[]},{level:2,title:"\u516D\u3001Tomcat",slug:"\u516D\u3001tomcat",children:[{level:3,title:"Javaweb\u6982\u8FF0",slug:"javaweb\u6982\u8FF0",children:[]},{level:3,title:"Tomcat\u76EE\u5F55\u4ECB\u7ECD",slug:"tomcat\u76EE\u5F55\u4ECB\u7ECD",children:[]},{level:3,title:"\u5173\u4E8ETomcat\u670D\u52A1\u5668\u7684\u542F\u505C",slug:"\u5173\u4E8Etomcat\u670D\u52A1\u5668\u7684\u542F\u505C",children:[]},{level:3,title:"\u5982\u4F55\u90E8\u7F72web\u5DE5\u7A0B\u5230Tomcat\u4E2D",slug:"\u5982\u4F55\u90E8\u7F72web\u5DE5\u7A0B\u5230tomcat\u4E2D",children:[]},{level:3,title:"Javaweb\u5DE5\u7A0B\u76EE\u5F55\u4ECB\u7ECD",slug:"javaweb\u5DE5\u7A0B\u76EE\u5F55\u4ECB\u7ECD",children:[]}]},{level:2,title:"\u4E03\u3001Servlet",slug:"\u4E03\u3001servlet",children:[{level:3,title:"\u4EC0\u4E48\u662FServlet",slug:"\u4EC0\u4E48\u662Fservlet",children:[]},{level:3,title:"Servlet\u7684\u4F5C\u7528\uFF1A",slug:"servlet\u7684\u4F5C\u7528",children:[]},{level:3,title:"\u600E\u4E48\u5B9E\u73B0Servlet\u7A0B\u5E8F",slug:"\u600E\u4E48\u5B9E\u73B0servlet\u7A0B\u5E8F",children:[{level:4,title:"\u65B9\u5F0F\u4E00\uFF1A",slug:"\u65B9\u5F0F\u4E00",children:[]},{level:4,title:"\u65B9\u5F0F\u4E8C\uFF1A",slug:"\u65B9\u5F0F\u4E8C",children:[]},{level:4,title:"\u6CE8\u610F\uFF1A",slug:"\u6CE8\u610F",children:[]}]},{level:3,title:"\u8F93\u5165URL\u5230\u8BBF\u95EE\u5230\u9875\u9762\u7684\u539F\u7406\uFF1A",slug:"\u8F93\u5165url\u5230\u8BBF\u95EE\u5230\u9875\u9762\u7684\u539F\u7406",children:[]},{level:3,title:"servlet\u7A0B\u5E8F\u7684\u751F\u547D\u5468\u671F",slug:"servlet\u7A0B\u5E8F\u7684\u751F\u547D\u5468\u671F",children:[]},{level:3,title:"GET\u8BF7\u6C42\u548CPOST\u8BF7\u6C42\u7684\u5206\u53D1\u5904\u7406",slug:"get\u8BF7\u6C42\u548Cpost\u8BF7\u6C42\u7684\u5206\u53D1\u5904\u7406",children:[]},{level:3,title:"\u901A\u8FC7\u7EE7\u627FHttpServlet\u5B9E\u73B0Servlet\u7A0B\u5E8F",slug:"\u901A\u8FC7\u7EE7\u627Fhttpservlet\u5B9E\u73B0servlet\u7A0B\u5E8F",children:[]},{level:3,title:"ServletConfig\u7C7B",slug:"servletconfig\u7C7B",children:[]},{level:3,title:"ServletContext\u7C7B",slug:"servletcontext\u7C7B",children:[]},{level:3,title:"HttpServletRequest\u7C7B",slug:"httpservletrequest\u7C7B",children:[]},{level:3,title:"\u8BF7\u6C42\u8F6C\u53D1",slug:"\u8BF7\u6C42\u8F6C\u53D1",children:[]},{level:3,title:"HttpServletResponse\u7C7B",slug:"httpservletresponse\u7C7B",children:[]}]},{level:2,title:"\u516B\u3001HTTP\u534F\u8BAE",slug:"\u516B\u3001http\u534F\u8BAE",children:[{level:3,title:"\u4EC0\u4E48\u662FHTTP\u534F\u8BAE",slug:"\u4EC0\u4E48\u662Fhttp\u534F\u8BAE",children:[]},{level:3,title:"GET\u8BF7\u6C42\uFF08\u4E24\u4E2A\u90E8\u5206--\u8BF7\u6C42\u884C\u3001\u8BF7\u6C42\u5934\uFF09",slug:"get\u8BF7\u6C42-\u4E24\u4E2A\u90E8\u5206-\u8BF7\u6C42\u884C\u3001\u8BF7\u6C42\u5934",children:[]},{level:3,title:"POST\u8BF7\u6C42\uFF08\u4E09\u4E2A\u90E8\u5206---\u8BF7\u6C42\u884C\u3001\u8BF7\u6C42\u5934\u3001\u8BF7\u6C42\u4F53\uFF09",slug:"post\u8BF7\u6C42-\u4E09\u4E2A\u90E8\u5206-\u8BF7\u6C42\u884C\u3001\u8BF7\u6C42\u5934\u3001\u8BF7\u6C42\u4F53",children:[]},{level:3,title:"\u54CD\u5E94\u7684HTTP\u534F\u8BAE\u683C\u5F0F",slug:"\u54CD\u5E94\u7684http\u534F\u8BAE\u683C\u5F0F",children:[]},{level:3,title:"MIME \u7C7B\u578B\u8BF4\u660E",slug:"mime-\u7C7B\u578B\u8BF4\u660E",children:[]}]},{level:2,title:"\u4E5D\u3001JavaEE \u4E09\u5C42\u67B6\u6784",slug:"\u4E5D\u3001javaee-\u4E09\u5C42\u67B6\u6784",children:[]},{level:2,title:"\u5341\u3001JSP",slug:"\u5341\u3001jsp",children:[]},{level:2,title:"\u5341\u4E00\u3001Listener\u76D1\u542C\u5668",slug:"\u5341\u4E00\u3001listener\u76D1\u542C\u5668",children:[]},{level:2,title:"\u5341\u4E8C\u3001EL\u8868\u8FBE\u5F0F",slug:"\u5341\u4E8C\u3001el\u8868\u8FBE\u5F0F",children:[]},{level:2,title:"\u5341\u4E09\u3001\u6587\u4EF6\u7684\u4E0A\u4F20\u548C\u4E0B\u8F7D",slug:"\u5341\u4E09\u3001\u6587\u4EF6\u7684\u4E0A\u4F20\u548C\u4E0B\u8F7D",children:[]}],git:{updatedTime:1710173784e3,contributors:[{name:"shailene",email:"64005626+shaileneF@users.noreply.github.com",commits:1}]},filePathRelative:"java/JavaWeb/Javaweb.md"};export{e as data};
      diff --git a/assets/Javaweb.html.5aa574b2.js b/assets/Javaweb.html.3fb4d015.js
      similarity index 99%
      rename from assets/Javaweb.html.5aa574b2.js
      rename to assets/Javaweb.html.3fb4d015.js
      index f6f0cf2c..30853969 100644
      --- a/assets/Javaweb.html.5aa574b2.js
      +++ b/assets/Javaweb.html.3fb4d015.js
      @@ -1,4 +1,4 @@
      -import{_ as n,e as s}from"./app.0d029894.js";var a="/study/assets/image-20210726165959530.f6a2d47f.png",t="/study/assets/image-20210726171156543.587579f1.png",p="/study/assets/image-20210726172113345.352b8e60.png",e="/study/assets/image-20210726172137960.de5e28a5.png",o="/study/assets/image-20210726172714345.03a91a28.png",l="/study/assets/image-20210726173042911.840c9a3f.png",c="/study/assets/image-20210726214413168.873bb652.png",i="/study/assets/image-20210726220454876.af738f5c.png",u="/study/assets/image-20210727130111824.800a627f.png",r="/study/assets/image-20210727210700299-1627391221225.4bf1963d.png",k="/study/assets/image-20210729104053021.ed016972.png",d="/study/assets/image-20210729104342390.51a4c890.png",g="/study/assets/image-20210729104616921.c88caf5d.png",m="/study/assets/image-20210729115007648.e0554ab2.png",v="/study/assets/image-20210729163445013.1daa01a8.png",h="/study/assets/image-20210729210500539.148e5c90.png",y="/study/assets/image-20210729215824037.0326da4c.png",q="/study/assets/image-20210729215921017.666d9826.png",w="/study/assets/image-20210729222137279.e3f8b0a9.png",f="/study/assets/image-20210729224800844.e4195678.png",S="/study/assets/image-20210729225817966.8a1d9330.png",b="/study/assets/image-20210729192303634.22be71ab.png",j="/study/assets/image-20210729193907622.c63b6941.png",T="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAUwAAABPCAYAAACAjfxFAAAOrUlEQVR4nO3dXUxb5xkH8H+nqtIuKsEIhQss5fCRTEZDgthJ5a6RPVU2DRfTlOCsQoQG1yRKqoigqkJUm6xFOAxNDE1L1CYjG0EoDSSqVskU0FSsbrPW2hApU9H4MI4EagAT4evceBfH5/gc25gXAjEk/5+EGp+P9zw+xzx+nvecNK/E4/E4iIhoUz/KdQBERPsFEyYRkSAmTCIiQa8Gpx7mOgYion3h1bzXf5zrGIiI9gW25EREgpgwiYgEMWESEQliwiQiEsSESUQkiAmTiEgQEyYRkSAmTCIiQUyYRESCmDCJiAS9uuMjhn3wDATTl5fUofUDM/J2/IBbF/u2D71fLWZYY0BdqwvmvRDkHmR3nEDTmUY0NLyX61Bybn19Had/3YC7nw8iPz8/1+HQc7LzCXNfW4Sv1wOfuQmeOkl4r4jPg/4gYG70oK5sF8PLsfGxkVyHQJRTu5gwzWjy1EE87eSAruqNwOfpRxAAgv3w/VQ0+UUwnaGgJqIXT9aE+eWXX+KHH37YcH1BQQHq6+u3ftRYEH29PiSbYn0rrLbMJXVo+tlD9H+1CHOjB2+tJZe32lbRq7T+5iZ46vIR/EsvfEuJRVuu9iTUeZqARNIM/i+CujIpQ6zK8dLXBQc8CCpfFBmmJgzvtsJ1bO/2+z09vSgqKtK13JFIBOfOX8T42Ah6enphrDSi1mFX11++/BG+n54GANQ67Ghra1X30barg4N3sLKygra2VgDZW1rt/qd/3aAu/+zTa5Ck5Few9tiVRiP++Mc/6N6LsdKIsdFxfD89re5rd5xQt9FOLyjxKNraWnXvM3W9t/OK8HmlF0fWmz42mw2vvfZa1vVbFvbBk5qAlFY4nLLtkg/9meYal3zJZAkAwX54PMlkCQDBAR8iWw5OgtGc+OPjNcQA4Mkq0iII9qPv21jWkWJry2nLFr/qTX+Pe8jx428jFJrULQsE/oOmM40Zt798+SM4au0YHxtR2/XBwTuQJAmVRiPC4QV121BoEqNj4+rrcHgBtQ571vm/3/2uUx3b23kF585fxPr6ujpeQ8N76nqDoQSDg3d0+/f09OLSJTnZS5KEy5c/grfzirpPwYECAMlk+Nmn19R1PT296rlQ1mv3TT0WvRyyVpivv/46TCYTAoFA2jqTyYQDBw5k2TuIfk8yqcnVFRCc0FaFEoCYWhkGJ4J4q8ysG0VbKcbW1NESFammjVbaa7WyW8ZaDJCetaArq4PHU6e+VKrfxf/OIXbMDJfngBqDrqo95oLnWHIYZZ5TrVz3IJPpCDo++Q0ikYhayfXfHsBnn15L2zYUmoTBUKKrwn71q1/i3PmLaGh4DybTEczMzMJkOoJIJAKDoQQGQ4k69szMLIyVxqzx/Pa3n+hiq3XY8e13QdQ67DCZjui2PX78bXzzzT91y5rONOoq0u+np1FQ8BP1tRL7yMgo2tpaddu2tbXim2/+CZPpCEZGRtF0plF3zEuXLuLc+YtZ46cXz6ZzmFVVVXj06JGuNS8oKIDJZNrG4daxugQABtS9pXw482C2meEbCAJLq1gHoNYcJXV4K1NbXVKFijwAyMcbJQCWAMPPKuS5yII3YADSq8Jt0yTlrcjUyu8DTWcaEQj8B5IkIRSaRKXRqEskirUnTzA6Nq6rGrUOHz6EwcE7aGh4DzOzc2pynJmdU8e+dCl7wkmtPouKivBk7Yn6OhSaRMcnv1FfVxr1CVipIBVtba04d/6iOnWgWFlZQf/tAfT09Oq2VxLqysoKjh9/W7cuL2/vTq3Q7hG66WOz2TA8PIynT5+qrzeX4aZPbA7pjeoeEgvi60RmlBNwDMG/KMlSfj/5Gz6SpBWBT0mWicp3PVFh7nUWy5v405+uyYluZhaOWvuG22Z7xEipVtfX1zH9/TTOnm1CLBbDF1/8HceOyl1EpkS8GSUJ9vT0YnFxSZ0KCIUmN22Tax121Drs6Onphd1xQjdP6e28kla1EqUSenBdac0BwGKxbNKKZ5FXgaoSAFiE79/KDGNM06Ybc3hXXZPkYEDV4TzoKuJWOfmvrwnUjLG1xBeDGU0fmJGHGNYe71bcO0tJYpFIBP23B9TklupAQUHafGeqWocd4fACFheXkJ+fD0mSMDo2jnB4QSg5KfOVilBoEgcK5IQ5Ojaua9nXnjyBqLa2Vng7r6gVZVFREWZmZjfcPtN67fwsvTyEHyuqqqrC06dPUVVV9QyH07TfwX54dBWXtk1/TpZ86PX40habG1MfXk/clMo4SHJaQL1L3vpGYp1+Hne/MJmO4Isv/p71poxSQSptNyAnOGWOEQCMlUYMDt7RJcdah123TzZ//Wu/2jorrb92LCXxrq+vo6enN60lT5V6XGV7i+VNnDt/EYcPH1LHD4UmUVDwE0iSpK63WN5Uv1C0UwH08tjSc5jbm7dMUVYHTyNSHrnZI89spv1tJAl1jWYENY8vtR74OqUlz4P5VB0eaucr88w4+e5DdTvDu634xVrvvmjJgWQC2ezRmfGxEdgdJ9B/e0BddvfzQfXPhw9VqHeqFcZKI0bHxlFWVrppHMePv617DEj74Ly384qatCqNRng7r2zakvffHtDFqownSRI++/Sa7iaO9jElSZLUu/Ta96l9zIheDq/Mzs7Gcx0EkZb22U+ivYT/8w0iIkFMmEREgtiSExEJYoVJRCSICZOISBATJhGRICZMIiJBTJhERIKYMImIBDFhEhEJeiUej/M5TCIiAawwiYgEMWESEQliwiQiEsSESUQkiAmTiEgQEyYRkSAmTCIiQUyYRESCXp6EuTyM5tIKNN+L5uDgD+AtrYCU+NnVGEJdkEor4A1tZ2d9nNsbg+jF9WIkzOVhNJe6cXc514FspBodC3OILATQZc11LBuJ4m6zE/PdAUQW5hAZcuGmswtTuQ6LNhS954bUPIxclAAvqy39M7v7WnE9bi3U5zqK3WdqR2Shfdu7lx8s3MFgiF4se6DCjOJuc7INlDJViol2OrlNovJRlls6MAE/2i2Z2l6Rdli/jTq+Jj5vSB/nzrer2WJIxiGVpvx0Pch4jtLiC3XJ1UiiZZdKK1Kqk0JUHAJuXh9GFA/gdfbB1u1CTcrxdecvU2WvHT/tGOlxpl6PqS55WfSeO8M2gtciNQblHCn731Ni6MKUsq0uzpRzvdUqbnkYzaVdmNJd05TruWGMio0/D8q5OfqxH/B34Gi23x3aWfEcWx2+Gv/8cfL15NXy+MGzQ/FVZcHjofhZqTzeGcwyyOOh+FnpA904GY4U//xsefzs8GrK8ql4p6Rfvjr8QfygdDU+qdnvoCYG/fpEzFKGn6tTOxRD+nmZvJpp/ORYaecreFWOSR0j/ZjKsoMZz3eG2FPP+2bXIe1apsegnkslTt2Ym1+LeHwq3qk9L7pjKvtfjU8q7/XsUHw10zE0Y+jPffIcpf6o7ytxTO0y3fUKXo0f1J2n1GNu/nlQl2l/V2jX5bzCLDzVjtPFydc177gAfxiLiddTf+vARMsQOky7FEBoDDfhwoenkq1o4akLcKMPo5rKxdYdUGMo/LkdNoQxl/g2r2mfk+f9Un/aq3cohijmZgH3hXooW9S84wJm57c4f+XC/VvKGNWobQEm5pfkVcvDaC51Yr7FBRuA+UdRKFXO1qppP8b+lTmq6L/GU65lNdzdVkyM+PXvw+rFd0qcxeUohx/hpeTqbNcCqEaH9rwXW+GwKu9H2T9ZObsv1KOwuBzlysplP8b8LtzXjFHzvhc2/zi+Xk6Mn+laL8ylfUbdQ8llhnKrer2m/tEHtFzQfO4LcfqCC7gxJleRgp9Jev5yP4e5PIxmSwcmdAtdif/KicJ2omTXDh99FAasdhh0S0tQZgXGHkUBgUQ91VWBkzcyrGgZEkqam8cgt8vt14fhvlWPQkRx93ofcGgIOzXjqHwxRdqrgXcAyWmB9+AQACvKRE9/cT1uBYBmiwXSx/IibdJYnPcDN/yQUs+V1a5/fahc877kBLWl95LhethOCO68FMYE+jBR2pcaJBwA5C8RJ25m2FX7XlPPW+Gpm4icAoAovs70mS4pgw3jmFsGDAKfB8qNHCfMB/BaOoDuACLKt2moC5JTWZ9IFPNLwI6lBr3Cg2VqRZs8whLCfqD8QiEgUMPVtM8hsv37LAIxJPg7cLS0Q/6z1YvvRCtYQbbyxC+xqR33W/pw0umUj1OcfT8d7c21UBckpxtlgZs4XZyoslouiFfe2xC958bJGy7cX2hPVJFR3G22YEx0gJIy2ODCh+r+qeQE3rHtCDf4TC+FMYEyfFi8hc8DPXe5bcmX5zEP7Z1Z+WaDVs07LuCGM3tbmGjbNmoFszI54EYf/qy5+TDV5cRNqxfu3ZoG2HIMDzB6w4qugKYFvFW/o18hhnIrJj7uU28s1LzvhU23hfyLrrbwiS87fWeQoqRMN0bhz+2wbXYtn9HivB+wlqnVWfReB9r9Wxig2AqHtQ8n027C7Bz5M31dc4Mm5Sab4GdSTqzKVAE9D7mtMIvr8fvucRx1ViRaHCu6hrywOcPJbUztiAwBkroNAGgrCACoRseQC5Iz2QraugO4daowUeVokrA/sY3aLlejI+DVtZG6ObSd8MwxVMPdDRy1VEBfyCbPQ/SeW75rqkicL/U8bKLw1E3cn6/ASbUVtaIrMIRyixNHS8Pycd73wmZxJlpqeb3bcn3j9wm5TVXn6tSWvQKSZhvRGEXUtA/BXepMVuItQ7jf4sefhUcoxGk5SEilmsU7+ZkwteO7brfueurPgeBn0tSO+y0VOKmOY0VXopqn3cF/omI/WB5Gs2UcDt0vg9xqth8SmyclomeX87vkJGApnKH1lee01HlHItp1rDD3ibSWGzvbyhLR5pgwiYgEsSUnIhLEhElEJIgJk4hIEBMmEZEgJkwiIkFMmEREgpgwiYgEMWESEQliwiQiEsSESUQk6NXg1MNcx0BEtC/w75ITEQliS05EJIgJk4hIEBMmEZEgJkwiIkFMmEREgpgwiYgE/R926HRUZ3ENvwAAAABJRU5ErkJggg==",x="/study/assets/image-20210729195544910.7157b9c6.png",E="/study/assets/image-20210729195242181.18c28528.png",C="/study/assets/image-20210729200753344.c867528a.png",R="/study/assets/image-20210731152320329.9771e134.png",J="/study/assets/image-20210802143857708.8d0d8a13.png",A="/study/assets/image-20210802145624691.4d840979.png",H="/study/assets/image-20210802150524464.fef16d4d.png",L="/study/assets/image-20210803165520939.5f475cbe.png",I="/study/assets/image-20210803165914949.435c9de8.png",O="/study/assets/image-20210803165944816.f4219449.png",M="/study/assets/image-20210803170041477.e44a30a1.png",P="/study/assets/image-20210803170251077.a26ff6ce.png",U="/study/assets/image-20210803171725508.5f694d3a.png",Q="/study/assets/image-20210803172002078.d460235e.png",F="/study/assets/image-20210803205337269.ac6ecbfc.png",D="/study/assets/image-20210803210026808.f27c3815.png";const B={},N=s(`

      Java Web

      \u4E00\u3001HTML

      1. \u4E00\u4E9B\u6982\u5FF5\u7684\u7B80\u5355\u63CF\u8FF0

        1. HTML--\u7ED3\u6784\uFF0C\u4E3B\u8981\u8D1F\u8D23\u524D\u7AEF\u7684\u7ED3\u6784\uFF0C\u524D\u7AEF\u7684\u5C55\u793A\u3002

          CSS---\u7F8E\u5316

          JavaScript---\u63A7\u5236\u884C\u4E3A

        2. XML --- \u53EF\u6269\u5C55\u7684\u6807\u8BB0\u578B\u8BED\u8A00\uFF0C\u53EF\u4EE5\u81EA\u5B9A\u4E49\u6807\u7B7E\uFF0C\u4E3B\u8981\u4F5C\u7528\u7528\u6765\u5199\u914D\u7F6E\u6587\u4EF6\u3002\u50CFsolr\u7684\u914D\u7F6E\u6587\u4EF6\u5C31\u662F\u7528\u8FD9\u4E2A\u5199\u7684\u3002\u4E3B\u8981\u8D1F\u8D23\u540E\u53F0\u914D\u7F6E\u7684\u4E8B\u3002\uFF08\u79FB\u52A8\u7AEF\u4E5F\u7528\u4E8E\u524D\u7AEF\uFF09

        3. Tomcat\u4E09\u4E2A\u6838\u5FC3\u7EC4\u4EF6\uFF0C\u4EE5\u4E0B\u4E09\u4E2A\u7EDF\u79F0\u4E3A\u670D\u52A1\u5668\u7AEF\u7EC4\u4EF6

          Tomcat\u662F\u670D\u52A1\u5668\uFF0C\u6574\u4E2Aweb\u670D\u52A1\u4EE5Tomcat\u670D\u52A1\u5668\u4E3A\u8F7D\u4F53\uFF0Cspringboot\u96C6\u6210\u4E86Tomcat\u670D\u52A1\u5668

          • servlet\u4F5C\u7528

            • \u83B7\u53D6\u6D4F\u89C8\u5668\u53D1\u9001\u7684\u8BF7\u6C42

            • \u5904\u7406\u8BF7\u6C42

            • \u54CD\u5E94\u8BF7\u6C42\u3002

          servlet\u662FTomcat\u91CC\u6700\u91CD\u8981\u7684\u7EC4\u4EF6

          • Filter \u8FC7\u6EE4\u6570\u636E\u7684

          • Listener\u76D1\u542C\u7528\u6237\u76F8\u5E94\u7684\u64CD\u4F5C

        4. HTTP\u534F\u8BAE\uFF1A\u8D85\u6587\u672C\u4F20\u8F93\u534F\u8BAE

          \u6D4F\u89C8\u5668\u4E0E\u670D\u52A1\u7AEF\u4EA4\u4E92\u7684\u8FC7\u7A0B\u9700\u8981\u9075\u5FAA\u76F8\u5E94\u7684\u534F\u8BAE\uFF0C\u5C31\u662FHTTP\u534F\u8BAE\u3002HTTP\u534F\u8BAE\u5C5E\u4E8E\u5E94\u7528\u5C42\u534F\u8BAE

          \u8981\u6C42\u4F20\u8F93\u7684\u6570\u636E\u6EE1\u8DB3\u4E00\u4E9B\u89C4\u5219\uFF0C\u6BD4\u5982\u8981\u6C42\u4F20\u8F93\u7684\u6570\u636E\u6709\u8BF7\u6C42\u5934\u3001\u8BF7\u6C42\u884C\u3001\u8BF7\u6C42\u4F53\u3002\u54CD\u5E94\u7684\u65F6\u5019\u6709\u54CD\u5E94\u5934\u3001\u54CD\u5E94\u884C\u3001\u54CD\u5E94\u4F53\uFF08\u54CD\u5E94\u884C\u91CC\u9762\u6709\u54CD\u5E94\u7801\uFF0C404\u3001200\u3001302\u3001500\uFF09

          TCP\u3001UDP\u534F\u8BAE\u5C5E\u4E8E\u4F20\u8F93\u5C42\u534F\u8BAE

          IP\u5C5E\u4E8E\u7F51\u7EDC\u5C42\u534F\u8BAE\u3002

          TCP/IP\u6A21\u578B\u5206\u4E3A\u7269\u7406+\u6570\u636E\u94FE\u8DEF\u5C42\u3001\u7F51\u7EDC\u5C42\u3001\u4F20\u8F93\u5C42\u3001\u5E94\u7528\u5C42\u3002

        5. JSP---Java\u670D\u52A1\u5668\u7AEF\u7684\u9875\u9762

          servlet\u80FD\u7ED9\u6211\u4EEC\u54CD\u5E94\u6570\u636E\uFF0Cservlet\u4E0D\u9002\u5408\u5C55\u793A\u6570\u636E\uFF0Cservlet\u662F\u5904\u7406\u4E1A\u52A1\u903B\u8F91\uFF01\u8BA9servlet\u8D1F\u8D23\u663E\u793A\u7684\u5DE5\u4F5C\uFF0C\u505A\u4E0D\u597D\u3002

          \u4F7F\u7528JSP\u53EF\u4EE5\u5B9E\u73B0\u4E00\u4E2A\u52A8\u6001\u7684\u9875\u9762\u7684\u5C55\u793A\u3002

        6. \u4F1A\u8BDD\u63A7\u5236

          Cookie

          Session

          \u670D\u52A1\u5668\u7AEF\u4F1A\u4E0D\u65AD\u5730\u83B7\u53D6\u5230\u8BF7\u6C42\uFF0C\u670D\u52A1\u5668\u7AEF\u600E\u4E48\u5224\u65AD\u8FD9\u51E0\u4E2A\u8BF7\u6C42\u662F\u5426\u662F\u6765\u81EA\u540C\u4E00\u4E2A\u6D4F\u89C8\u5668\uFF08\u5BA2\u6237\u7AEF\uFF09\u5462\uFF0C\u670D\u52A1\u5668\u4E0D\u77E5\u9053\uFF0C\u4E3A\u4E86\u8BA9\u670D\u52A1\u5668\u7AEF\u8BC6\u522B\u51FA\u6765\u591A\u6B21\u8BF7\u6C42\u662F\u540C\u4E00\u4E2A\u6D4F\u89C8\u5668\uFF0C\u5C31\u5F15\u5165\u4E86cookie\u548Csession\uFF0C\u670D\u52A1\u7AEF\u53EBsession\uFF0C\u5BA2\u6237\u7AEF\u53EBcookie

        7. Ajax

          \u96C6\u6210\u5728JavaScript\u4E2D\u3002\u6BD4\u5982\u767B\u5F55\u7F51\u7AD9\u7684\u65F6\u5019\uFF0C\u5199\u4E86\u7528\u6237\u540D\uFF0C\u5149\u6807\u79FB\u5411\u53E6\u4E00\u4E2A\u6846\u7684\u65F6\u5019\uFF0C\u901A\u5E38\u7528\u6237\u540D\u6846\u540E\u9762\u4F1A\u6709\u63D0\u793A\uFF0C\u8FD9\u662F\u56E0\u4E3A\u6B64\u65F6\u6D4F\u89C8\u5668\u5DF2\u7ECF\u53D1\u9001\u4E86\u4E00\u4E2A\u8BF7\u6C42\u5230\u670D\u52A1\u5668\uFF0C\u518D\u901A\u8FC7\u670D\u52A1\u5668\uFF08\u8FD9\u91CC\u53EF\u4EE5\u7406\u89E3\u4E3A\u540E\u7AEF\uFF09\u5230\u6570\u636E\u5E93\u4E2D\u53BB\u8FDB\u884C\u7528\u6237\u540D\u7684\u6821\u9A8C\uFF0C\u6211\u4EEC\u8FD8\u6CA1\u6709\u70B9\u63D0\u4EA4\u6216\u8005\u8BF4\u6CE8\u518C\u6309\u94AE\uFF0C\u5C31\u5DF2\u7ECF\u53D1\u9001\u8BF7\u6C42\u4E86\u3002Ajax\u7528\u6765\u5B9E\u73B0\u5F02\u6B65\u8BF7\u6C42\uFF0C\u8FD9\u79CD\u573A\u666F\u5C31\u662F\u5F02\u6B65\u8BF7\u6C42\u3002

          \u540C\u6B65\u5F02\u6B65\u662F\u4EC0\u4E48\u610F\u601D\u5462\uFF1F

          \u6BD4\u5982\u540C\u6B65\u5C31\u662F\u4E00\u6BB5\u65F6\u95F4\u5185\uFF0C\u53EA\u80FD\u6709\u4E00\u4E2A\u7EBF\u7A0B\u6267\u884C\u64CD\u4F5C\uFF0C\u5176\u4F59\u7684\u7EBF\u7A0B\u5C31\u53EA\u6709\u7B49\u5F85\uFF0C\u6240\u4EE5\u6211\u4EEC\u4E5F\u6709\u540C\u6B65\u4EE3\u7801\u5757\u548C\u540C\u6B65\u65B9\u6CD5\u7684\u65B9\u5F0F\u6765\u4FDD\u8BC1\u7EBF\u7A0B\u7684\u5B89\u5168\u3002\u5F02\u6B65\u5C31\u662F\u5927\u5BB6\u4E00\u8D77\u6267\u884C\uFF0C\u867D\u7136\u6211\u4EEC\u6CA1\u6709\u70B9\u51FB\u6CE8\u518C\u6309\u94AE\uFF0C\u4F46\u662F\u4E0D\u5F71\u54CD\u8F93\u5165\u7528\u6237\u540D\u4E4B\u540E\u6D4F\u89C8\u5668\u53D1\u9001\u8BF7\u6C42\u7ED9\u670D\u52A1\u5668\uFF0C\u8FD9\u5C31\u662F\u4E00\u4E2A\u5F02\u6B65\u7684\u573A\u666F\u3002

          \u6BD4\u5982\u5728\u767E\u5EA6\u91CC\u641C\u7D22\u6570\u636E\uFF0C\u521A\u5199\u4E86\u51E0\u4E2A\u6C49\u5B57\uFF0C\u4E0B\u9762\u5C31\u4F1A\u51FA\u73B0\u63D0\u793A\uFF0C\u4E5F\u5C31\u662F\u6D4F\u89C8\u5668\u5F02\u6B65\u5411\u670D\u52A1\u5668\u53D1\u9001\u4E86\u8BF7\u6C42\u3002

        8. JSON

          \u6D4F\u89C8\u5668\u548C\u670D\u52A1\u5668\u4EA4\u4E92\uFF0C\u4F20\u8F93\u6570\u636E\u7684\u65F6\u5019\uFF0C\u4E3B\u6D41\u90FD\u7528JSON\u4F20\u8F93\u6570\u636E\u3002\u4EE5\u524D\u662F\u4F7F\u7528XML\uFF0C\u73B0\u5728\u90FD\u662F\u4F7F\u7528json\u683C\u5F0F\u3002

        9. URL

          \u7EDF\u4E00\u8D44\u6E90\u5B9A\u4F4D\u7B26\u3002\u6D4F\u89C8\u5668\u4E2D\u8F93\u5165\u7684\u7F51\u5740\uFF0C\u5730\u5740\u5C31\u662FURL\uFF0CURL\u4E2D\u6709\u57DF\u540D\uFF0C\u57DF\u540D\u7ECF\u8FC7\u89E3\u6790\u540E\u4F1A\u89E3\u6790\u6210IP\uFF0CIP\u53EF\u4EE5\u5B9A\u4F4D\u4E92\u8054\u7F51\u4E0A\u552F\u4E00\u4E00\u53F0\u4E3B\u673A\u3002URL\u53EF\u4EE5\u5B9A\u4F4D\u5230\u670D\u52A1\u5668\u4E2D\u7684\u8D44\u6E90

        10. Scanner scan = new Scanner(System.in);
          +import{_ as n,e as s}from"./app.f8791b52.js";var a="/study/assets/image-20210726165959530.f6a2d47f.png",t="/study/assets/image-20210726171156543.587579f1.png",p="/study/assets/image-20210726172113345.352b8e60.png",e="/study/assets/image-20210726172137960.de5e28a5.png",o="/study/assets/image-20210726172714345.03a91a28.png",l="/study/assets/image-20210726173042911.840c9a3f.png",c="/study/assets/image-20210726214413168.873bb652.png",i="/study/assets/image-20210726220454876.af738f5c.png",u="/study/assets/image-20210727130111824.800a627f.png",r="/study/assets/image-20210727210700299-1627391221225.4bf1963d.png",k="/study/assets/image-20210729104053021.ed016972.png",d="/study/assets/image-20210729104342390.51a4c890.png",g="/study/assets/image-20210729104616921.c88caf5d.png",m="/study/assets/image-20210729115007648.e0554ab2.png",v="/study/assets/image-20210729163445013.1daa01a8.png",h="/study/assets/image-20210729210500539.148e5c90.png",y="/study/assets/image-20210729215824037.0326da4c.png",q="/study/assets/image-20210729215921017.666d9826.png",w="/study/assets/image-20210729222137279.e3f8b0a9.png",f="/study/assets/image-20210729224800844.e4195678.png",S="/study/assets/image-20210729225817966.8a1d9330.png",b="/study/assets/image-20210729192303634.22be71ab.png",j="/study/assets/image-20210729193907622.c63b6941.png",T="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAUwAAABPCAYAAACAjfxFAAAOrUlEQVR4nO3dXUxb5xkH8H+nqtIuKsEIhQss5fCRTEZDgthJ5a6RPVU2DRfTlOCsQoQG1yRKqoigqkJUm6xFOAxNDE1L1CYjG0EoDSSqVskU0FSsbrPW2hApU9H4MI4EagAT4evceBfH5/gc25gXAjEk/5+EGp+P9zw+xzx+nvecNK/E4/E4iIhoUz/KdQBERPsFEyYRkSAmTCIiQa8Gpx7mOgYion3h1bzXf5zrGIiI9gW25EREgpgwiYgEMWESEQliwiQiEsSESUQkiAmTiEgQEyYRkSAmTCIiQUyYRESCmDCJiAS9uuMjhn3wDATTl5fUofUDM/J2/IBbF/u2D71fLWZYY0BdqwvmvRDkHmR3nEDTmUY0NLyX61Bybn19Had/3YC7nw8iPz8/1+HQc7LzCXNfW4Sv1wOfuQmeOkl4r4jPg/4gYG70oK5sF8PLsfGxkVyHQJRTu5gwzWjy1EE87eSAruqNwOfpRxAAgv3w/VQ0+UUwnaGgJqIXT9aE+eWXX+KHH37YcH1BQQHq6+u3ftRYEH29PiSbYn0rrLbMJXVo+tlD9H+1CHOjB2+tJZe32lbRq7T+5iZ46vIR/EsvfEuJRVuu9iTUeZqARNIM/i+CujIpQ6zK8dLXBQc8CCpfFBmmJgzvtsJ1bO/2+z09vSgqKtK13JFIBOfOX8T42Ah6enphrDSi1mFX11++/BG+n54GANQ67Ghra1X30barg4N3sLKygra2VgDZW1rt/qd/3aAu/+zTa5Ck5Few9tiVRiP++Mc/6N6LsdKIsdFxfD89re5rd5xQt9FOLyjxKNraWnXvM3W9t/OK8HmlF0fWmz42mw2vvfZa1vVbFvbBk5qAlFY4nLLtkg/9meYal3zJZAkAwX54PMlkCQDBAR8iWw5OgtGc+OPjNcQA4Mkq0iII9qPv21jWkWJry2nLFr/qTX+Pe8jx428jFJrULQsE/oOmM40Zt798+SM4au0YHxtR2/XBwTuQJAmVRiPC4QV121BoEqNj4+rrcHgBtQ571vm/3/2uUx3b23kF585fxPr6ujpeQ8N76nqDoQSDg3d0+/f09OLSJTnZS5KEy5c/grfzirpPwYECAMlk+Nmn19R1PT296rlQ1mv3TT0WvRyyVpivv/46TCYTAoFA2jqTyYQDBw5k2TuIfk8yqcnVFRCc0FaFEoCYWhkGJ4J4q8ysG0VbKcbW1NESFammjVbaa7WyW8ZaDJCetaArq4PHU6e+VKrfxf/OIXbMDJfngBqDrqo95oLnWHIYZZ5TrVz3IJPpCDo++Q0ikYhayfXfHsBnn15L2zYUmoTBUKKrwn71q1/i3PmLaGh4DybTEczMzMJkOoJIJAKDoQQGQ4k69szMLIyVxqzx/Pa3n+hiq3XY8e13QdQ67DCZjui2PX78bXzzzT91y5rONOoq0u+np1FQ8BP1tRL7yMgo2tpaddu2tbXim2/+CZPpCEZGRtF0plF3zEuXLuLc+YtZ46cXz6ZzmFVVVXj06JGuNS8oKIDJZNrG4daxugQABtS9pXw482C2meEbCAJLq1gHoNYcJXV4K1NbXVKFijwAyMcbJQCWAMPPKuS5yII3YADSq8Jt0yTlrcjUyu8DTWcaEQj8B5IkIRSaRKXRqEskirUnTzA6Nq6rGrUOHz6EwcE7aGh4DzOzc2pynJmdU8e+dCl7wkmtPouKivBk7Yn6OhSaRMcnv1FfVxr1CVipIBVtba04d/6iOnWgWFlZQf/tAfT09Oq2VxLqysoKjh9/W7cuL2/vTq3Q7hG66WOz2TA8PIynT5+qrzeX4aZPbA7pjeoeEgvi60RmlBNwDMG/KMlSfj/5Gz6SpBWBT0mWicp3PVFh7nUWy5v405+uyYluZhaOWvuG22Z7xEipVtfX1zH9/TTOnm1CLBbDF1/8HceOyl1EpkS8GSUJ9vT0YnFxSZ0KCIUmN22Tax121Drs6Onphd1xQjdP6e28kla1EqUSenBdac0BwGKxbNKKZ5FXgaoSAFiE79/KDGNM06Ybc3hXXZPkYEDV4TzoKuJWOfmvrwnUjLG1xBeDGU0fmJGHGNYe71bcO0tJYpFIBP23B9TklupAQUHafGeqWocd4fACFheXkJ+fD0mSMDo2jnB4QSg5KfOVilBoEgcK5IQ5Ojaua9nXnjyBqLa2Vng7r6gVZVFREWZmZjfcPtN67fwsvTyEHyuqqqrC06dPUVVV9QyH07TfwX54dBWXtk1/TpZ86PX40habG1MfXk/clMo4SHJaQL1L3vpGYp1+Hne/MJmO4Isv/p71poxSQSptNyAnOGWOEQCMlUYMDt7RJcdah123TzZ//Wu/2jorrb92LCXxrq+vo6enN60lT5V6XGV7i+VNnDt/EYcPH1LHD4UmUVDwE0iSpK63WN5Uv1C0UwH08tjSc5jbm7dMUVYHTyNSHrnZI89spv1tJAl1jWYENY8vtR74OqUlz4P5VB0eaucr88w4+e5DdTvDu634xVrvvmjJgWQC2ezRmfGxEdgdJ9B/e0BddvfzQfXPhw9VqHeqFcZKI0bHxlFWVrppHMePv617DEj74Ly384qatCqNRng7r2zakvffHtDFqownSRI++/Sa7iaO9jElSZLUu/Ta96l9zIheDq/Mzs7Gcx0EkZb22U+ivYT/8w0iIkFMmEREgtiSExEJYoVJRCSICZOISBATJhGRICZMIiJBTJhERIKYMImIBDFhEhEJeiUej/M5TCIiAawwiYgEMWESEQliwiQiEsSESUQkiAmTiEgQEyYRkSAmTCIiQUyYRESCXp6EuTyM5tIKNN+L5uDgD+AtrYCU+NnVGEJdkEor4A1tZ2d9nNsbg+jF9WIkzOVhNJe6cXc514FspBodC3OILATQZc11LBuJ4m6zE/PdAUQW5hAZcuGmswtTuQ6LNhS954bUPIxclAAvqy39M7v7WnE9bi3U5zqK3WdqR2Shfdu7lx8s3MFgiF4se6DCjOJuc7INlDJViol2OrlNovJRlls6MAE/2i2Z2l6Rdli/jTq+Jj5vSB/nzrer2WJIxiGVpvx0Pch4jtLiC3XJ1UiiZZdKK1Kqk0JUHAJuXh9GFA/gdfbB1u1CTcrxdecvU2WvHT/tGOlxpl6PqS55WfSeO8M2gtciNQblHCn731Ni6MKUsq0uzpRzvdUqbnkYzaVdmNJd05TruWGMio0/D8q5OfqxH/B34Gi23x3aWfEcWx2+Gv/8cfL15NXy+MGzQ/FVZcHjofhZqTzeGcwyyOOh+FnpA904GY4U//xsefzs8GrK8ql4p6Rfvjr8QfygdDU+qdnvoCYG/fpEzFKGn6tTOxRD+nmZvJpp/ORYaecreFWOSR0j/ZjKsoMZz3eG2FPP+2bXIe1apsegnkslTt2Ym1+LeHwq3qk9L7pjKvtfjU8q7/XsUHw10zE0Y+jPffIcpf6o7ytxTO0y3fUKXo0f1J2n1GNu/nlQl2l/V2jX5bzCLDzVjtPFydc177gAfxiLiddTf+vARMsQOky7FEBoDDfhwoenkq1o4akLcKMPo5rKxdYdUGMo/LkdNoQxl/g2r2mfk+f9Un/aq3cohijmZgH3hXooW9S84wJm57c4f+XC/VvKGNWobQEm5pfkVcvDaC51Yr7FBRuA+UdRKFXO1qppP8b+lTmq6L/GU65lNdzdVkyM+PXvw+rFd0qcxeUohx/hpeTqbNcCqEaH9rwXW+GwKu9H2T9ZObsv1KOwuBzlysplP8b8LtzXjFHzvhc2/zi+Xk6Mn+laL8ylfUbdQ8llhnKrer2m/tEHtFzQfO4LcfqCC7gxJleRgp9Jev5yP4e5PIxmSwcmdAtdif/KicJ2omTXDh99FAasdhh0S0tQZgXGHkUBgUQ91VWBkzcyrGgZEkqam8cgt8vt14fhvlWPQkRx93ofcGgIOzXjqHwxRdqrgXcAyWmB9+AQACvKRE9/cT1uBYBmiwXSx/IibdJYnPcDN/yQUs+V1a5/fahc877kBLWl95LhethOCO68FMYE+jBR2pcaJBwA5C8RJ25m2FX7XlPPW+Gpm4icAoAovs70mS4pgw3jmFsGDAKfB8qNHCfMB/BaOoDuACLKt2moC5JTWZ9IFPNLwI6lBr3Cg2VqRZs8whLCfqD8QiEgUMPVtM8hsv37LAIxJPg7cLS0Q/6z1YvvRCtYQbbyxC+xqR33W/pw0umUj1OcfT8d7c21UBckpxtlgZs4XZyoslouiFfe2xC958bJGy7cX2hPVJFR3G22YEx0gJIy2ODCh+r+qeQE3rHtCDf4TC+FMYEyfFi8hc8DPXe5bcmX5zEP7Z1Z+WaDVs07LuCGM3tbmGjbNmoFszI54EYf/qy5+TDV5cRNqxfu3ZoG2HIMDzB6w4qugKYFvFW/o18hhnIrJj7uU28s1LzvhU23hfyLrrbwiS87fWeQoqRMN0bhz+2wbXYtn9HivB+wlqnVWfReB9r9Wxig2AqHtQ8n027C7Bz5M31dc4Mm5Sab4GdSTqzKVAE9D7mtMIvr8fvucRx1ViRaHCu6hrywOcPJbUztiAwBkroNAGgrCACoRseQC5Iz2QraugO4daowUeVokrA/sY3aLlejI+DVtZG6ObSd8MwxVMPdDRy1VEBfyCbPQ/SeW75rqkicL/U8bKLw1E3cn6/ASbUVtaIrMIRyixNHS8Pycd73wmZxJlpqeb3bcn3j9wm5TVXn6tSWvQKSZhvRGEXUtA/BXepMVuItQ7jf4sefhUcoxGk5SEilmsU7+ZkwteO7brfueurPgeBn0tSO+y0VOKmOY0VXopqn3cF/omI/WB5Gs2UcDt0vg9xqth8SmyclomeX87vkJGApnKH1lee01HlHItp1rDD3ibSWGzvbyhLR5pgwiYgEsSUnIhLEhElEJIgJk4hIEBMmEZEgJkwiIkFMmEREgpgwiYgEMWESEQliwiQiEsSESUQk6NXg1MNcx0BEtC/w75ITEQliS05EJIgJk4hIEBMmEZEgJkwiIkFMmEREgpgwiYgE/R926HRUZ3ENvwAAAABJRU5ErkJggg==",x="/study/assets/image-20210729195544910.7157b9c6.png",E="/study/assets/image-20210729195242181.18c28528.png",C="/study/assets/image-20210729200753344.c867528a.png",R="/study/assets/image-20210731152320329.9771e134.png",J="/study/assets/image-20210802143857708.8d0d8a13.png",A="/study/assets/image-20210802145624691.4d840979.png",H="/study/assets/image-20210802150524464.fef16d4d.png",L="/study/assets/image-20210803165520939.5f475cbe.png",I="/study/assets/image-20210803165914949.435c9de8.png",O="/study/assets/image-20210803165944816.f4219449.png",M="/study/assets/image-20210803170041477.e44a30a1.png",P="/study/assets/image-20210803170251077.a26ff6ce.png",U="/study/assets/image-20210803171725508.5f694d3a.png",Q="/study/assets/image-20210803172002078.d460235e.png",F="/study/assets/image-20210803205337269.ac6ecbfc.png",D="/study/assets/image-20210803210026808.f27c3815.png";const B={},N=s(`

          Java Web

          \u4E00\u3001HTML

          1. \u4E00\u4E9B\u6982\u5FF5\u7684\u7B80\u5355\u63CF\u8FF0

            1. HTML--\u7ED3\u6784\uFF0C\u4E3B\u8981\u8D1F\u8D23\u524D\u7AEF\u7684\u7ED3\u6784\uFF0C\u524D\u7AEF\u7684\u5C55\u793A\u3002

              CSS---\u7F8E\u5316

              JavaScript---\u63A7\u5236\u884C\u4E3A

            2. XML --- \u53EF\u6269\u5C55\u7684\u6807\u8BB0\u578B\u8BED\u8A00\uFF0C\u53EF\u4EE5\u81EA\u5B9A\u4E49\u6807\u7B7E\uFF0C\u4E3B\u8981\u4F5C\u7528\u7528\u6765\u5199\u914D\u7F6E\u6587\u4EF6\u3002\u50CFsolr\u7684\u914D\u7F6E\u6587\u4EF6\u5C31\u662F\u7528\u8FD9\u4E2A\u5199\u7684\u3002\u4E3B\u8981\u8D1F\u8D23\u540E\u53F0\u914D\u7F6E\u7684\u4E8B\u3002\uFF08\u79FB\u52A8\u7AEF\u4E5F\u7528\u4E8E\u524D\u7AEF\uFF09

            3. Tomcat\u4E09\u4E2A\u6838\u5FC3\u7EC4\u4EF6\uFF0C\u4EE5\u4E0B\u4E09\u4E2A\u7EDF\u79F0\u4E3A\u670D\u52A1\u5668\u7AEF\u7EC4\u4EF6

              Tomcat\u662F\u670D\u52A1\u5668\uFF0C\u6574\u4E2Aweb\u670D\u52A1\u4EE5Tomcat\u670D\u52A1\u5668\u4E3A\u8F7D\u4F53\uFF0Cspringboot\u96C6\u6210\u4E86Tomcat\u670D\u52A1\u5668

              • servlet\u4F5C\u7528

                • \u83B7\u53D6\u6D4F\u89C8\u5668\u53D1\u9001\u7684\u8BF7\u6C42

                • \u5904\u7406\u8BF7\u6C42

                • \u54CD\u5E94\u8BF7\u6C42\u3002

              servlet\u662FTomcat\u91CC\u6700\u91CD\u8981\u7684\u7EC4\u4EF6

              • Filter \u8FC7\u6EE4\u6570\u636E\u7684

              • Listener\u76D1\u542C\u7528\u6237\u76F8\u5E94\u7684\u64CD\u4F5C

            4. HTTP\u534F\u8BAE\uFF1A\u8D85\u6587\u672C\u4F20\u8F93\u534F\u8BAE

              \u6D4F\u89C8\u5668\u4E0E\u670D\u52A1\u7AEF\u4EA4\u4E92\u7684\u8FC7\u7A0B\u9700\u8981\u9075\u5FAA\u76F8\u5E94\u7684\u534F\u8BAE\uFF0C\u5C31\u662FHTTP\u534F\u8BAE\u3002HTTP\u534F\u8BAE\u5C5E\u4E8E\u5E94\u7528\u5C42\u534F\u8BAE

              \u8981\u6C42\u4F20\u8F93\u7684\u6570\u636E\u6EE1\u8DB3\u4E00\u4E9B\u89C4\u5219\uFF0C\u6BD4\u5982\u8981\u6C42\u4F20\u8F93\u7684\u6570\u636E\u6709\u8BF7\u6C42\u5934\u3001\u8BF7\u6C42\u884C\u3001\u8BF7\u6C42\u4F53\u3002\u54CD\u5E94\u7684\u65F6\u5019\u6709\u54CD\u5E94\u5934\u3001\u54CD\u5E94\u884C\u3001\u54CD\u5E94\u4F53\uFF08\u54CD\u5E94\u884C\u91CC\u9762\u6709\u54CD\u5E94\u7801\uFF0C404\u3001200\u3001302\u3001500\uFF09

              TCP\u3001UDP\u534F\u8BAE\u5C5E\u4E8E\u4F20\u8F93\u5C42\u534F\u8BAE

              IP\u5C5E\u4E8E\u7F51\u7EDC\u5C42\u534F\u8BAE\u3002

              TCP/IP\u6A21\u578B\u5206\u4E3A\u7269\u7406+\u6570\u636E\u94FE\u8DEF\u5C42\u3001\u7F51\u7EDC\u5C42\u3001\u4F20\u8F93\u5C42\u3001\u5E94\u7528\u5C42\u3002

            5. JSP---Java\u670D\u52A1\u5668\u7AEF\u7684\u9875\u9762

              servlet\u80FD\u7ED9\u6211\u4EEC\u54CD\u5E94\u6570\u636E\uFF0Cservlet\u4E0D\u9002\u5408\u5C55\u793A\u6570\u636E\uFF0Cservlet\u662F\u5904\u7406\u4E1A\u52A1\u903B\u8F91\uFF01\u8BA9servlet\u8D1F\u8D23\u663E\u793A\u7684\u5DE5\u4F5C\uFF0C\u505A\u4E0D\u597D\u3002

              \u4F7F\u7528JSP\u53EF\u4EE5\u5B9E\u73B0\u4E00\u4E2A\u52A8\u6001\u7684\u9875\u9762\u7684\u5C55\u793A\u3002

            6. \u4F1A\u8BDD\u63A7\u5236

              Cookie

              Session

              \u670D\u52A1\u5668\u7AEF\u4F1A\u4E0D\u65AD\u5730\u83B7\u53D6\u5230\u8BF7\u6C42\uFF0C\u670D\u52A1\u5668\u7AEF\u600E\u4E48\u5224\u65AD\u8FD9\u51E0\u4E2A\u8BF7\u6C42\u662F\u5426\u662F\u6765\u81EA\u540C\u4E00\u4E2A\u6D4F\u89C8\u5668\uFF08\u5BA2\u6237\u7AEF\uFF09\u5462\uFF0C\u670D\u52A1\u5668\u4E0D\u77E5\u9053\uFF0C\u4E3A\u4E86\u8BA9\u670D\u52A1\u5668\u7AEF\u8BC6\u522B\u51FA\u6765\u591A\u6B21\u8BF7\u6C42\u662F\u540C\u4E00\u4E2A\u6D4F\u89C8\u5668\uFF0C\u5C31\u5F15\u5165\u4E86cookie\u548Csession\uFF0C\u670D\u52A1\u7AEF\u53EBsession\uFF0C\u5BA2\u6237\u7AEF\u53EBcookie

            7. Ajax

              \u96C6\u6210\u5728JavaScript\u4E2D\u3002\u6BD4\u5982\u767B\u5F55\u7F51\u7AD9\u7684\u65F6\u5019\uFF0C\u5199\u4E86\u7528\u6237\u540D\uFF0C\u5149\u6807\u79FB\u5411\u53E6\u4E00\u4E2A\u6846\u7684\u65F6\u5019\uFF0C\u901A\u5E38\u7528\u6237\u540D\u6846\u540E\u9762\u4F1A\u6709\u63D0\u793A\uFF0C\u8FD9\u662F\u56E0\u4E3A\u6B64\u65F6\u6D4F\u89C8\u5668\u5DF2\u7ECF\u53D1\u9001\u4E86\u4E00\u4E2A\u8BF7\u6C42\u5230\u670D\u52A1\u5668\uFF0C\u518D\u901A\u8FC7\u670D\u52A1\u5668\uFF08\u8FD9\u91CC\u53EF\u4EE5\u7406\u89E3\u4E3A\u540E\u7AEF\uFF09\u5230\u6570\u636E\u5E93\u4E2D\u53BB\u8FDB\u884C\u7528\u6237\u540D\u7684\u6821\u9A8C\uFF0C\u6211\u4EEC\u8FD8\u6CA1\u6709\u70B9\u63D0\u4EA4\u6216\u8005\u8BF4\u6CE8\u518C\u6309\u94AE\uFF0C\u5C31\u5DF2\u7ECF\u53D1\u9001\u8BF7\u6C42\u4E86\u3002Ajax\u7528\u6765\u5B9E\u73B0\u5F02\u6B65\u8BF7\u6C42\uFF0C\u8FD9\u79CD\u573A\u666F\u5C31\u662F\u5F02\u6B65\u8BF7\u6C42\u3002

              \u540C\u6B65\u5F02\u6B65\u662F\u4EC0\u4E48\u610F\u601D\u5462\uFF1F

              \u6BD4\u5982\u540C\u6B65\u5C31\u662F\u4E00\u6BB5\u65F6\u95F4\u5185\uFF0C\u53EA\u80FD\u6709\u4E00\u4E2A\u7EBF\u7A0B\u6267\u884C\u64CD\u4F5C\uFF0C\u5176\u4F59\u7684\u7EBF\u7A0B\u5C31\u53EA\u6709\u7B49\u5F85\uFF0C\u6240\u4EE5\u6211\u4EEC\u4E5F\u6709\u540C\u6B65\u4EE3\u7801\u5757\u548C\u540C\u6B65\u65B9\u6CD5\u7684\u65B9\u5F0F\u6765\u4FDD\u8BC1\u7EBF\u7A0B\u7684\u5B89\u5168\u3002\u5F02\u6B65\u5C31\u662F\u5927\u5BB6\u4E00\u8D77\u6267\u884C\uFF0C\u867D\u7136\u6211\u4EEC\u6CA1\u6709\u70B9\u51FB\u6CE8\u518C\u6309\u94AE\uFF0C\u4F46\u662F\u4E0D\u5F71\u54CD\u8F93\u5165\u7528\u6237\u540D\u4E4B\u540E\u6D4F\u89C8\u5668\u53D1\u9001\u8BF7\u6C42\u7ED9\u670D\u52A1\u5668\uFF0C\u8FD9\u5C31\u662F\u4E00\u4E2A\u5F02\u6B65\u7684\u573A\u666F\u3002

              \u6BD4\u5982\u5728\u767E\u5EA6\u91CC\u641C\u7D22\u6570\u636E\uFF0C\u521A\u5199\u4E86\u51E0\u4E2A\u6C49\u5B57\uFF0C\u4E0B\u9762\u5C31\u4F1A\u51FA\u73B0\u63D0\u793A\uFF0C\u4E5F\u5C31\u662F\u6D4F\u89C8\u5668\u5F02\u6B65\u5411\u670D\u52A1\u5668\u53D1\u9001\u4E86\u8BF7\u6C42\u3002

            8. JSON

              \u6D4F\u89C8\u5668\u548C\u670D\u52A1\u5668\u4EA4\u4E92\uFF0C\u4F20\u8F93\u6570\u636E\u7684\u65F6\u5019\uFF0C\u4E3B\u6D41\u90FD\u7528JSON\u4F20\u8F93\u6570\u636E\u3002\u4EE5\u524D\u662F\u4F7F\u7528XML\uFF0C\u73B0\u5728\u90FD\u662F\u4F7F\u7528json\u683C\u5F0F\u3002

            9. URL

              \u7EDF\u4E00\u8D44\u6E90\u5B9A\u4F4D\u7B26\u3002\u6D4F\u89C8\u5668\u4E2D\u8F93\u5165\u7684\u7F51\u5740\uFF0C\u5730\u5740\u5C31\u662FURL\uFF0CURL\u4E2D\u6709\u57DF\u540D\uFF0C\u57DF\u540D\u7ECF\u8FC7\u89E3\u6790\u540E\u4F1A\u89E3\u6790\u6210IP\uFF0CIP\u53EF\u4EE5\u5B9A\u4F4D\u4E92\u8054\u7F51\u4E0A\u552F\u4E00\u4E00\u53F0\u4E3B\u673A\u3002URL\u53EF\u4EE5\u5B9A\u4F4D\u5230\u670D\u52A1\u5668\u4E2D\u7684\u8D44\u6E90

            10. Scanner scan = new Scanner(System.in);
               scan.next(); // \u6709\u6362\u884C\u6216\u8005\u6709\u7A7A\u683C\u7684\u65F6\u5019\u5C31\u8BA4\u4E3A\u8F93\u5165\u7ED3\u675F\u4E86\uFF01
               scan.nextLine(); // \u53EA\u6709\u6362\u884C\u7684\u65F6\u5019\u624D\u8BA4\u4E3A\u8F93\u5165\u7ED3\u675F
               
          2. \uFF08\u5177\u4F53\u89C1\u524D\u7AEF\u7B14\u8BB0\uFF0C\u6B64\u7B14\u8BB0\u4E3Ajavaweb\uFF0C\u6240\u4EE5\u5185\u5BB9\u5C11\u4E00\u4E9B\uFF09

          3. \u6CA1\u6709\u4E86CSS\u4EE5\u540E\uFF0C\u6574\u4E2A\u9875\u9762\u7684\u6548\u679C\u3001\u5E03\u5C40\u3001\u6837\u5F0F\u90FD\u53D8\u4E86\uFF0C\u6CA1\u6709\u4E86CSS\u4EE5\u540E\u7684\u5185\u5BB9\u5C31\u662FHTML\uFF0CCSS\u662F\u51B3\u5B9A\u9875\u9762\u7684\u5E03\u5C40\u3001\u6837\u5F0F\u3001\u6548\u679C\u7684\uFF0C\u5269\u4E0B\u7684\u5185\u5BB9\u5C31\u662FHTML

          4. \u9875\u9762\u7531\u4E09\u90E8\u5206\u7EC4\u6210

            \u5185\u5BB9\u3001\u8868\u73B0\u3001\u884C\u4E3A

            • \u5185\u5BB9\uFF1AHTML
            • \u8868\u73B0\uFF1ACSS
            • \u884C\u4E3A\uFF1AJavaScript\u6765\u5B9E\u73B0
          5. HTML

            Hyper Text Markup Language\uFF0C\u8D85\u6587\u672C\u6807\u8BB0\u8BED\u8A00

            \u901A\u8FC7\u6807\u7B7E\u6765\u6807\u8BB0\u8981\u663E\u793A\u5728\u7F51\u9875\u4E2D\u7684\u5404\u4E2A\u90E8\u5206\uFF0C\u7F51\u9875\u6587\u4EF6\u672C\u8EAB\u662F\u4E00\u4E2A\u6587\u672C\u6587\u4EF6\uFF0C\u901A\u8FC7\u5728\u6587\u672C\u6587\u4EF6\u4E2D\u6DFB\u52A0\u6807\u8BB0\u7B26\uFF0C\u544A\u8BC9\u6D4F\u89C8\u5668\u600E\u4E48\u663E\u793A\u6587\u4EF6\u4E2D\u7684\u5185\u5BB9

          6. <!DOCTYPE html> <!-- \u7EA6\u675F\u3001\u58F0\u660E -->
            diff --git "a/assets/Java\347\254\224\350\256\260.html.eea0351f.js" "b/assets/Java\347\254\224\350\256\260.html.64b81d20.js"
            similarity index 99%
            rename from "assets/Java\347\254\224\350\256\260.html.eea0351f.js"
            rename to "assets/Java\347\254\224\350\256\260.html.64b81d20.js"
            index 710ad6f2..ab7cbeeb 100644
            --- "a/assets/Java\347\254\224\350\256\260.html.eea0351f.js"
            +++ "b/assets/Java\347\254\224\350\256\260.html.64b81d20.js"
            @@ -1,4 +1,4 @@
            -import{_ as n,e as s}from"./app.0d029894.js";var a="/study/assets/image-20210705150107351.24b00824.png",p="/study/assets/image-20210705185333142.f5591c24.png",t="/study/assets/image-20210705191015822.a3fe2f91.png",o="/study/assets/image-20210706163646906.d3157181.png",e="/study/assets/image-20210706163944406.e4e8fcc7.png",c="/study/assets/image-20210706173952736.34b0244b.png",l="/study/assets/image-20210706175524927.f71a64fb.png",i="/study/assets/image-20210706182234844.5a12e42d.png",u="/study/assets/image-20210706205208343.f44541e5.png",k="/study/assets/image-20210708205449559.8c32fae7.png",r="/study/assets/image-20210708210601029.3471adbb.png",d="/study/assets/image-20210710134346723.9d19c390.png",m="/study/assets/image-20210710154640263.e094f1ff.png",g="/study/assets/image-20210710214528413.16fe5e44.png",y="/study/assets/image-20210712140750512.52ad93b5.png",h="/study/assets/image-20210712163640427.c2c40864.png",w="/study/assets/image-20210712171022023.22439f25.png",v="/study/assets/image-20210712173716536.b44b3976.png",f="/study/assets/image-20210712180747114.813b1e7f.png",b="/study/assets/image-20210712181207646.ce830eb9.png",S="/study/assets/image-20210712214426017-1626097468270.0ec4f3a7.png",j="/study/assets/image-20210713154402326.21f35fbe.png",T="/study/assets/image-20210713181847053.9b10f81c.png",x="/study/assets/image-20210713183450520.5f1b1335.png",q="/study/assets/image-20210713190412188.3b6c8750.png",I="/study/assets/image-20210713204102095.fbc1e2d0.png",C="/study/assets/image-20210713205619985.c10a0b5c.png",O="/study/assets/image-20210713214555294.c86b66b4.png",P="/study/assets/image-20210714221952532.b1728cc4.png",_="/study/assets/image-20210715144611902.a41ab2ea.png",M="/study/assets/image-20210715144808840.c15ed60e.png",A="/study/assets/image-20210715154422971.816d4534.png",J="/study/assets/image-20210715155611478.cd1ad5f7.png",E="/study/assets/image-20210715211156147.d6509594.png",L="/study/assets/image-20210715211721326-1626355043072.ec3cfc76.png",N="/study/assets/image-20210715223142406.eab7a568.png",H="/study/assets/image-20210716160144370.09a52354.png",D="/study/assets/image-20210716201006455.ba567b28.png",F="/study/assets/image-20210716203614266.39f42055.png",R="/study/assets/image-20210718090849119.6eb4092b.png",B="/study/assets/image-20210718130728187.97193115.png",U="/study/assets/image-20210718144458652.299959d6.png",V="/study/assets/image-20210718150640135-1626592000999.a881344f.png",z="/study/assets/image-20210718151110970.32198098.png",W="/study/assets/image-20210718200500051.3f9ceee3.png",G="/study/assets/image-20210718201238288.aa7327e0.png",K="/study/assets/image-20210718201455932.ba2aba96.png",X="/study/assets/image-20210719110437166.abad2b71.png",Y="/study/assets/image-20210719171718885.0b4677ef.png",Q="/study/assets/image-20210719172636356.8753a14e.png",Z="/study/assets/image-20210719212658589.1bd833dc.png",$="/study/assets/image-20210719215303993.5a922f77.png",nn="/study/assets/image-20210720103235552.4e33519e.png",sn="/study/assets/image-20210720103616931.7dd3dbc5.png",an="/study/assets/image-20210720110511758.4e0da4ce.png",pn="/study/assets/image-20210720112013584.4c8445a8.png",tn="/study/assets/image-20210720112810464.8186d809.png",on="/study/assets/image-20210720140212952.114f669b.png",en="/study/assets/image-20210720151401774.e4e78118.png",cn="/study/assets/image-20210720162211196.1aca72c4.png",ln="/study/assets/image-20210720162451951.936611c0.png",un="/study/assets/image-20210720173542722.c8457769.png",kn="/study/assets/image-20210720184426986.18dadee4.png",rn="/study/assets/image-20210720184519531.bc2393d6.png",dn="/study/assets/image-20210720191934093.5f40a423.png",mn="/study/assets/image-20210811173003995.8506b4b4.png";const gn={},yn=s('

            Java\u7B14\u8BB0

            \u4E00\u3001\u5165\u95E8\u6982\u8FF0

            1. \u4E09\u4E2A\u5C42\u6B21

              • \u57FA\u672C\u8BED\u6CD5
              • \u9762\u5411\u5BF9\u8C61
              • \u9AD8\u7EA7\u5E94\u7528
            2. \u8BA1\u7B97\u673A\u5305\u542B\u786C\u4EF6\u548C\u8F6F\u4EF6\u4E24\u90E8\u5206\uFF0C\u8F6F\u4EF6\u63D0\u4F9B\u770B\u4E0D\u89C1\u7684\u6307\u4EE4\uFF0C\u6307\u4EE4\u63A7\u5236\u786C\u4EF6\uFF0C\u5E76\u4E14\u4F7F\u5F97\u786C\u4EF6\u5B8C\u6210\u7279\u5B9A\u7684\u4EFB\u52A1

              \u6211\u4EEC\u5199\u7A0B\u5E8F\u5C31\u662F\u7ED9\u673A\u5668\u3001\u7ED9\u786C\u4EF6\u53D1\u6307\u4EE4\u3002

            3. \u521B\u5EFA\u6216\u5F00\u53D1\u8F6F\u4EF6\u5C31\u53EB\u7A0B\u5E8F\u8BBE\u8BA1

            4. \u5728\u4E2A\u4EBA\u8BA1\u7B97\u673A\u4E0A\uFF0C\u603B\u7EBF\u642D\u5EFA\u5728\u4E3B\u677F\u4E0A\uFF0C\u4E3B\u677F\u662F\u4E00\u4E2A\u8FDE\u63A5\u8BA1\u7B97\u673A\u5404\u4E2A\u90E8\u5206\u7684\u7EBF\u8DEF\u677F

            5. CPU\u662F\u8BA1\u7B97\u673A\u7684\u5927\u8111\uFF0C\u5B83\u4ECE\u5185\u5B58\u4E2D\u83B7\u53D6\u6307\u4EE4\uFF0C\u7136\u540E\u6267\u884C\u8FD9\u4E9B\u6307\u4EE4\u3002

            6. CPU\u5305\u62EC\u63A7\u5236\u5355\u5143\u548C\u7B97\u672F/\u903B\u8F91\u5355\u5143

              • \u63A7\u5236\u5355\u5143\u7528\u4E8E\u63A7\u5236\u548C\u534F\u8C03\u5176\u5B83\u7EC4\u4EF6\u7684\u52A8\u4F5C
              • \u7B97\u672F/\u903B\u8F91\u5355\u5143\u7528\u4E8E\u5B8C\u6210\u6570\u503C\u8FD0\u7B97\u548C\u903B\u8F91\u8FD0\u7B97
            7. \u6BCF\u53F0\u8BA1\u7B97\u673A\u5185\u90E8\u6709\u4E00\u4E2A\u5185\u90E8\u65F6\u949F\uFF0C\u8BE5\u65F6\u949F\u4EE5\u56FA\u5B9A\u901F\u5EA6\u53D1\u9001\u7535\u5B50\u8109\u51B2\uFF0C\u65F6\u949F\u901F\u5EA6\u8D8A\u5FEB\uFF0C\u5728\u7ED9\u5B9A\u65F6\u95F4\u6BB5\u5185\u6267\u884C\u7684\u6307\u4EE4\u5C31\u8D8A\u591A\u3002\u901F\u5EA6\u7684\u8BA1\u91CF\u5355\u4F4D\u662F\u8D6B\u5179\uFF0C1hz\u76F8\u5F53\u4E8E\u6BCF\u79D21\u4E2A\u8109\u51B2\u3002

              \u8D85\u9891\u964D\u9891\u90FD\u662F\u6307\u7684\u8FD9\u4E2Ahz\uFF0C\u8D6B\u5179\u9AD8\u4E86\uFF0C\u81EA\u7136\u6BCF\u79D2\u949Fcpu\u6267\u884C\u7684\u6307\u4EE4\u5C31\u591A\uFF0C\u7535\u8111\u5C31\u5FEB\u3002

              hz\u4F4E\u4E86\uFF0C\u90A3\u6BCF\u79D2\u949F\u6267\u884C\u7684\u6307\u4EE4\u5C31\u5C11\u4E86\uFF0C\u81EA\u7136\u611F\u89C9\u5C31\u5361\u4E86\uFF08\u964D\u9891\u95E8\u4E8B\u4EF6\uFF09

            8. \u5185\u5B58\uFF08RAM\uFF09\u548C\u78C1\u76D8\u7684\u533A\u522B

              \u5185\u5B58\u4E2D\u7684\u4FE1\u606F\u5728\u65AD\u7535\u65F6\u4F1A\u4E22\u5931\uFF0C\u5F53\u8BA1\u7B97\u673A\u9700\u8981\u8FD9\u4E9B\u6570\u636E\u65F6\uFF0C\u518D\u79FB\u5165\u5185\u5B58\uFF0C\u56E0\u6B64\u4ECE\u5185\u5B58\u4E2D\u8BFB\u53D6\u6570\u636E\u6BD4\u4ECE\u5B58\u50A8\u8BBE\u5907\u8BFB\u53D6\u8981\u5FEB\u5F97\u591A\u3002

            9. \u6BD4\u7279\uFF08bit\uFF09\u548C\u5B57\u8282\uFF08byte\uFF09

              \u8BA1\u7B97\u673A\u5C31\u662F\u4E00\u7CFB\u5217\u7684\u7535\u8DEF\u5F00\u5173\uFF0C\u5982\u679C\u7535\u8DEF\u662F\u5F00\u7684\uFF0C\u503C\u662F1\uFF0C\u5982\u679C\u7535\u8DEF\u662F\u5173\u7684\uFF0C\u503C\u662F0

              \u4E00\u4E2A0\u6216\u80051\u5B58\u50A8\u4E3A1\u4E2Abit\uFF0C\u53731\u4F4D\uFF0C8\u4F4D\u4E3A\u4E00\u4E2A\u5B57\u8282\uFF0C\u4E00\u4E2A\u4E2D\u6587\u6C49\u5B57\u4E00\u822C\u4E3A2\u4E2A\u5B57\u8282\uFF0C2bytes\uFF0C\u537316\u4F4D\u3002

              \u8BA1\u7B97\u673A\u4E2D\u7684\u6570\u636E\u5B58\u50A8\u662F\u4E8C\u8FDB\u5236\u7684\u65B9\u5F0F\uFF0C\u5C31\u662F\u5BF9\u5E94\u4E8E\u7535\u8DEF\u7684\u5F00\u5173\u72B6\u6001\uFF0Cbit\u662F\u8BA1\u7B97\u673A\u7684\u6700\u5C0F\u5B58\u50A8\u5355\u4F4D\u3002

              \u8BA1\u7B97\u673A\u4E2D\u6700\u57FA\u672C\u7684\u5B58\u50A8\u5355\u5143\u662F\u5B57\u8282\uFF0C\u6BCF\u4E2A\u5B57\u8282\u75318\u4E2Abit\u6784\u6210\u3002

              \u8BA1\u7B97\u673A\u7684\u5B58\u50A8\u80FD\u529B\u662F\u4EE5\u5B57\u8282\u548C\u591A\u5B57\u8282\u6765\u8861\u91CF\u7684\u3002

            10. \u5185\u5B58

              • \u5185\u5B58\uFF08RAM\uFF09\u662F\u7531\u4E00\u4E2A\u6709\u5E8F\u7684\u5B57\u8282\u5E8F\u5217\u7EC4\u6210\uFF0C\u7528\u4E8E\u5B58\u50A8\u7A0B\u5E8F\u53CA\u7A0B\u5E8F\u9700\u8981\u7684\u6570\u636E

              • \u4E00\u4E2A\u7A0B\u5E8F\u548C\u5B83\u7684\u6570\u636E\u5728\u88ABCPU\u6267\u884C\u524D\u5FC5\u987B\u79FB\u5230\u8BA1\u7B97\u673A\u7684\u5185\u5B58\u4E2D\u3002

              • CPU\u662F\u6267\u884C\u5404\u79CD\u8BA1\u7B97\u673A\u6307\u4EE4\u7684\uFF0C\u76F8\u5F53\u4E8E\u662F\u8F6F\u4EF6\u53D1\u51FA\u6307\u4EE4\uFF08\u6240\u4EE5\u8F6F\u4EF6\u4F1A\u5360\u7528\u5185\u5B58\uFF09\uFF0CCPU\u6267\u884C\u6307\u4EE4\u6765\u8C03\u7528\u786C\u4EF6\u7684\u8FD0\u884C\u3002

              • CPU\u662F\u4ECE\u5185\u5B58\u4E2D\u6765\u83B7\u53D6\u6307\u4EE4\u7684

              • \u5185\u5B58\u89E3\u51B3\u4E86\u4E00\u90E8\u5206CPU\u8FD0\u884C\u8FC7\u5FEB\uFF0C\u800C\u786C\u76D8\u6570\u636E\u5B58\u53D6\u592A\u6162\u7684\u95EE\u9898\u3002

              • \u4F46\u5185\u5B58\u662F\u5E26\u7535\u5B58\u50A8\u7684\uFF0C\u4E00\u65E6\u65AD\u7535\u6570\u636E\u5C31\u4F1A\u6D88\u5931\uFF0C\u800C\u4E14\u5BB9\u91CF\u6709\u9650\uFF0C\u6240\u4EE5\u8981\u957F\u65F6\u95F4\u50A8\u5B58\u7A0B\u5E8F\u5C31\u9700\u8981\u5B58\u50A8\u5230\u786C\u76D8\u4E2D

              • \u6BCF\u4E2A\u5B57\u8282\u5728\u5185\u5B58\uFF08RAM\uFF09\u4E2D\u90FD\u6709\u4E00\u4E2A\u552F\u4E00\u7684\u5730\u5740

              • ROM\u548C\u786C\u76D8\u5BF9\u5E94

            11. \u8F6F\u4EF6\u5C42\u9762\u6700\u5148\u548C\u786C\u4EF6\u6253\u4EA4\u9053\u7684\u5C31\u662F\u64CD\u4F5C\u7CFB\u7EDF

              \u7528\u6237 -> \u5E94\u7528\u7A0B\u5E8F -> \u64CD\u4F5C\u7CFB\u7EDF -> \u786C\u4EF6

              image-20210705150107351

            12. web\u5F00\u53D1\uFF0C\u5BA2\u6237\u7AEF\uFF08\u6D4F\u89C8\u5668)\u8BBF\u95EE\u6D4F\u89C8\u670D\u52A1\u5668\u63D0\u4F9B\u7684\u9875\u9762\u3002

            13. \u4E07\u7EF4\u7F51\uFF08www\uFF09\u53EF\u4EE5\u8BA4\u4E3A\u662F\u4E00\u4E2A\u7531\u8BB8\u591A\u4E92\u76F8\u94FE\u63A5\u7684\u8D85\u6587\u672C\u7EC4\u6210\u7684\u7CFB\u7EDF\u3002

              \u6BCF\u4E2A\u6709\u7528\u7684\u4E8B\u7269\uFF0C\u79F0\u4E3A\u4E00\u6837\u8D44\u6E90\uFF0C\u8FD9\u4E9B\u8D44\u6E90\u901A\u8FC7\u8D85\u6587\u672C\u4F20\u8F93\u534F\u8BAE\uFF08HTTP\uFF09\u4F20\u9001\u7ED9\u7528\u6237

              HTTP\u5C31\u662F\u5BA2\u6237\u7AEF\uFF08\u6D4F\u89C8\u5668\uFF09\u548C\u670D\u52A1\u5668\u4E4B\u95F4\u901A\u4FE1\u7684\u534F\u8BAE\uFF01

            14. \u4E07\u7EF4\u7F51\u662F\u7531\u65E0\u6570\u4E2A\u7F51\u7EDC\u7AD9\u70B9\u548C\u7F51\u9875\u6784\u6210\u7684\u96C6\u5408\uFF0C\u4ED6\u4EEC\u5728\u4E00\u8D77\u6784\u6210\u4E86\u56E0\u7279\u7F51\u6700\u4E3B\u8981\u7684\u90E8\u5206\u3002

              \u4E07\u7EF4\u7F51\u5B9E\u9645\u662F\u591A\u5A92\u4F53\u7684\u96C6\u5408\uFF0C\u662F\u7531\u8D85\u7EA7\u94FE\u63A5\u8FDE\u63A5\u800C\u6210\u7684\u3002\u6211\u4EEC\u901A\u5E38\u901A\u8FC7\u7F51\u7EDC\u6D4F\u89C8\u5668\u4E0A\u7F51\u89C2\u770B\u7684\uFF0C\u5C31\u662F\u4E07\u7EF4\u7F51\u7684\u5185\u5BB9\u3002

            15. JVM\u662Fjava virtual machine\uFF0C java\u865A\u62DF\u673A\uFF0C\u6211\u4EEC\u6574\u4E2Ajava\u7A0B\u5E8F\u60F3\u8FD0\u884C\uFF0C\u90FD\u5FC5\u987B\u4F9D\u8D56java\u865A\u62DF\u673A\u3002

            16. \u6846\u67B6\u53EF\u4EE5\u7406\u89E3\u4E3A\u5BF9\u73B0\u6709\u7684\u4E00\u4E9B\u57FA\u672C\u7EC4\u4EF6\u7684\u7EC4\u5408\u548C\u5C01\u88C5\uFF0C\u5982\u679C\u4F7F\u7528\u57FA\u672C\u7684\u7EC4\u4EF6\u53BB\u5F00\u53D1\u7684\u8BDD\uFF0C\u6548\u7387\u5F88\u4F4E\uFF0C\u5728\u5B9E\u9645\u573A\u666F\u4E2D\uFF0C\u5982\u679C\u4EC0\u4E48\u7EC4\u4EF6\u90FD\u81EA\u5DF1\u4EB2\u5386\u4EB2\u4E3A\u53BB\u5199\uFF0C\u6548\u7387\u4F4E\u800C\u4E14\u53EF\u80FD\u5305\u62EC\u4E0D\u5168\u3002

              • \u73B0\u5728\u5F88\u591A\u516C\u53F8\u90FD\u57FA\u4E8E\u5FAE\u670D\u52A1\u505A\u5F00\u53D1
            17. \u8F6F\u4EF6\u6709\u7CFB\u7EDF\u8F6F\u4EF6\u548C\u5E94\u7528\u8F6F\u4EF6\u4E4B\u5206

              \u7CFB\u7EDF\u8F6F\u4EF6\u5C31\u662F\u64CD\u4F5C\u7CFB\u7EDF

            18. \u56FE\u5F62\u5316\u754C\u9762\uFF08Graphical User Interface\uFF09

              \u547D\u4EE4\u884C\u65B9\u5F0F\uFF08Command Line Interface\uFF09

            19. \u5B89\u5353\u548CIOS\u90FD\u662F\u7528\u7684linux\u5185\u6838

            \u4E8C\u3001Java\u8BED\u8A00\u6982\u8FF0

            \u6982\u8FF0

            1. \u867D\u7136C\u548CC++\u7684\u5F00\u53D1\u6548\u7387\u4E0D\u9AD8\uFF0C\u4F46\u662F\u8FD0\u884C\u6548\u7387\u5F88\u9AD8\u3002\u5F00\u53D1\u5F97\u6162\uFF0C\u8FD0\u884C\u5F97\u5FEB

              \u6240\u4EE5\u51E1\u662F\u548C\u64CD\u4F5C\u7CFB\u7EDF\u8FD9\u79CD\u5E95\u5C42\u4EA4\u4E92\u7684\uFF0C\u90FD\u7528C\u548CC++\u7F16\u5199\u3002

            2. python\u6BD4java\u5F00\u53D1\u6548\u7387\u66F4\u5FEB\uFF0C\u6267\u884C\u6548\u7387\u66F4\u5DEE\u3002\u76F8\u5F53\u4E8E\u662F\u7F16\u5199\u8FC7\u7A0B\u4E2D\u66F4\u590D\u6742\u7684\u8BED\u8A00\uFF0C\u6267\u884C\u6548\u7387\u66F4\u5FEB\uFF0C\u56E0\u4E3A\u5199\u5F97\u590D\u6742\u5C31\u76F8\u5F53\u4E8E\u5199\u5F97\u6E05\u695A\uFF0C\u7F16\u8BD1\u8FC7\u7A0B\u82B1\u7684\u65F6\u95F4\u5C11\uFF0C\u673A\u5668\u66F4\u5BB9\u6613\u7406\u89E3\uFF0C\u90A3\u4E48\u6267\u884C\u6548\u7387\u5C31\u66F4\u5FEB\u3002\u800CPython\u8FD9\u79CD\u7F16\u5199\u5F88\u5BB9\u6613\uFF0C\u9605\u8BFB\u5F88\u5BB9\u6613\uFF0C\u4F46\u662F\u8BA9\u673A\u5668\u7406\u89E3\u5C31\u9700\u8981\u82B1\u8D39\u66F4\u591A\u65F6\u95F4\uFF0C\u4E5F\u5C31\u662F\u7F16\u8BD1\u9700\u8981\u66F4\u591A\u65F6\u95F4\uFF0C\u4E5F\u5C31\u662F\u6240\u8C13\u7684\u5F00\u53D1\u6548\u7387\u9AD8\uFF0C\u6267\u884C\u6548\u7387\u4F4E\u3002\u6211\u4EEC\u53EF\u4EE5\u8FD9\u4E48\u6765\u7406\u89E3\u3002

            3. python\u548Cjava\u90FD\u53EF\u4EE5\u505Aweb\u5F00\u53D1\uFF0C python\u53EF\u4EE5\u7528flask\u6846\u67B6\u6765\u5B9E\u73B0\u3002web\u5F00\u53D1\u8981\u5B66\u4F1A\u7528postman\u6216\u8005swagger\u6765\u8FDB\u884C\u8C03\u8BD5\u3002

            4. python\u548CJavaScript\u90FD\u53EF\u4EE5\u770B\u4F5C\u8F7B\u578B\u7684\u8BED\u8A00\uFF0C\u5B83\u4EEC\u90FD\u662F\u811A\u672C\u8BED\u8A00\uFF0C\u6CA1\u6709\u592A\u4E25\u683C\u7684\u8BED\u6CD5\u3002

              \u800Cjava\u3001C\u90FD\u662F\u91CD\u578B\u7684\u8BED\u8A00\uFF0C\u6709\u4E25\u683C\u7684\u8BED\u6CD5\u548C\u4E30\u5BCC\u7684\u7C7B\u5E93

            5. \u968F\u7740java\u6280\u672F\u5728web\u65B9\u9762\u7684\u4E0D\u65AD\u6210\u719F\uFF0C\u5DF2\u7ECF\u6210\u4E3Aweb\u5E94\u7528\u7A0B\u5E8F\u7684\u9996\u9009\u5F00\u53D1\u8BED\u8A00

            6. java\u53EA\u652F\u6301\u7C7B\u4E4B\u95F4\u7684\u5355\u7EE7\u627F\uFF0C\u4F46\u652F\u6301\u63A5\u53E3\u4E4B\u95F4\u7684\u591A\u7EE7\u627F\u3002

            7. java\u8BED\u8A00\u7684\u4E09\u4E2A\u7279\u70B9\uFF1A

              • \u9762\u5411\u5BF9\u8C61

                • \u4E24\u4E2A\u57FA\u672C\u6982\u5FF5\uFF1A\u7C7B\u3001\u5BF9\u8C61
                • \u4E09\u5927\u7279\u6027\uFF1A\u5C01\u88C5\u3001\u7EE7\u627F\u3001\u591A\u6001
              • \u5065\u58EE\u6027

                \u53BB\u6389\u4E86\u6307\u9488\uFF0C\u6709\u5783\u573E\u56DE\u6536\u673A\u5236\u7B49

              • \u8DE8\u5E73\u53F0\u6027

                \u901A\u8FC7java\u8BED\u8A00\u5199\u7684\u5E94\u7528\u7A0B\u5E8F\u5728\u4E0D\u540C\u7684\u7CFB\u7EDF\u5E73\u53F0\u4E0A\u90FD\u53EF\u4EE5\u8FD0\u884C

                \u539F\u7406\uFF1A\u53EA\u9700\u8981\u5728\u9700\u8981\u8FD0\u884CJava\u7A0B\u5E8F\u7684\u64CD\u4F5C\u7CFB\u7EDF\u4E0A\uFF0C\u5148\u5B89\u88C5\u4E00\u4E2AJava\u865A\u62DF\u673A\uFF08JVM\uFF09\u5373\u53EF\uFF0C\u7531JVM\u6765\u8D1F\u8D23java\u7A0B\u5E8F\u5728\u8BE5\u7CFB\u7EDF\u4E2D\u7684\u8FD0\u884C\u3002

                image-20210705185333142

                \u9488\u5BF9\u4E0D\u540C\u7684\u64CD\u4F5C\u7CFB\u7EDF\uFF0C\u63D0\u4F9B\u7684JVM\u662F\u4E0D\u4E00\u6837\u7684

            8. Java\u4E24\u79CD\u6838\u5FC3\u673A\u5236

              • JVM---\u8DE8\u5E73\u53F0
              • \u5783\u573E\u56DE\u6536\u673A\u5236
            9. Java\u7A0B\u5E8F\u5728JVM\u4E0A\u8DD1\uFF0CJVM\u662F\u8DD1\u5728\u64CD\u4F5C\u7CFB\u7EDF\u4E0A\u7684\u3002\u64CD\u4F5C\u7CFB\u7EDF\u4F9D\u8D56\u4E8E\u786C\u4EF6\u3001CPU\u53BB\u5E2E\u6211\u4EEC\u8FD0\u7B97

            10. \u5783\u573E\u56DE\u6536\u673A\u5236

              \u5783\u573E\u56DE\u6536\u5728C\u3001C++\u8BED\u8A00\u4E2D\uFF0C\u662F\u7531\u7A0B\u5E8F\u5458\u56DE\u6536\u65E0\u7528\u5185\u5B58

              Java\u63D0\u4F9B\u4E00\u79CD\u7CFB\u7EDF\u7EA7\u7EBF\u7A0B\u8DDF\u8E2A\u5B58\u50A8\u7A7A\u95F4\u7684\u5206\u914D\u60C5\u51B5\uFF0C\u5E76\u5728JVM\u7A7A\u95F2\u65F6\uFF0C\u68C0\u67E5\u5E76\u91CA\u653E\u90A3\u4E9B\u53EF\u88AB\u91CA\u653E\u7684\u5B58\u50A8\u7A7A\u95F4

              \u5783\u573E\u56DE\u6536\u5728Java\u7A0B\u5E8F\u8FD0\u884C\u8FC7\u7A0B\u4E2D\u81EA\u52A8\u8FDB\u884C\uFF0C\u7A0B\u5E8F\u5458\u65E0\u6CD5\u7CBE\u786E\u63A7\u5236\u548C\u5E72\u9884

            11. \u4F46\u662FJava\u7A0B\u5E8F\u4ECD\u7136\u4F1A\u51FA\u73B0\u5185\u5B58\u6CC4\u6F0F\u548C\u5185\u5B58\u6EA2\u51FA\u95EE\u9898

            12. JDK

              Java\u5F00\u53D1\u5DE5\u5177\u5305\uFF0C\u4F46\u662F\u9664\u4E86\u5F00\u53D1\u5DE5\u5177\u5305\u4EE5\u5916\uFF0C\u4E5F\u5305\u62EC\u4E86JRE\uFF0C\u6240\u4EE5\u5B89\u88C5\u4E86JDK\u4E4B\u540E\uFF0C\u5C31\u4E0D\u7528\u518D\u5355\u72EC\u5B89\u88C5JRE\u4E86\uFF0C\u6240\u4EE5\u53EF\u80FD\u4F1A\u8BA4\u4E3AJDK\u662FJava\u8FD0\u884C\u73AF\u5883\uFF0C\u4F46\u662F\u5B9E\u9645\u4E0AJRE\u624D\u662FJava\u8FD0\u884C\u73AF\u5883\uFF0C\u53EA\u4E0D\u8FC7\u5B89\u88C5JDK\u7684\u540C\u65F6\u5B89\u88C5\u4E86JRE

              JRE

              java runtime environment \u5305\u62ECJVM\u548CJava\u7A0B\u5E8F\u6240\u9700\u8981\u7684\u6838\u5FC3\u7C7B\u5E93\u7B49

              \u6240\u4EE5\u5982\u679C\u60F3\u8FD0\u884C\u4E00\u4E2A\u5F00\u53D1\u597D\u7684java\u7A0B\u5E8F\uFF0C\u8BA1\u7B97\u673A\u4E2D\u53EA\u9700\u8981\u5B89\u88C5JRE\u5373\u53EF

              image-20210705191015822

            13. \u8FD0\u884Cjava\u6587\u4EF6\u662F\u5148\u8981\u628A.java\u6E90\u6587\u4EF6\u7F16\u8BD1\u6210.class\u6587\u4EF6\uFF0C.class\u6587\u4EF6\u662F\u5B57\u8282\u7801\u6587\u4EF6\uFF0CCPU\u662F\u4ECE\u5185\u5B58\u4E2D\u53D6\u51FA\u6307\u4EE4\u6267\u884C\uFF0Chz\u6570\u8D8A\u9AD8\uFF0C\u5728\u4E00\u5B9A\u65F6\u95F4\u5185\u6267\u884C\u7684\u6307\u4EE4\u5C31\u8D8A\u591A\u3002\u6700\u5E95\u5C42\u7684\u6307\u4EE4\u90FD\u662F\u4E8C\u8FDB\u5236\u7684\uFF0C\u56E0\u4E3ACPU\u4E0A\u6709\u65E0\u6570\u4E2A\u7535\u8DEF\u5F00\u5173\uFF0C\u4EE50 1\u6765\u63A7\u5236\u3002python\u662F\u811A\u672C\u8BED\u8A00\uFF0C\u7F16\u5199\u4F1A\u5F88\u5BB9\u6613\uFF0C\u4F46\u662F\u8BA1\u7B97\u673A\u5C06\u5176\u8F6C\u6362\u4E3A\u5B57\u8282\u7801\u6587\u4EF6\u5C31\u4F1A\u9700\u8981\u66F4\u591A\u65F6\u95F4\uFF0C\u4E5F\u5C31\u662F\u6267\u884C\u6548\u7387\u4E0D\u9AD8\u3002

              \u6700\u7EC8\u4EE3\u7801\u90FD\u662F\u8981\u8F6C\u6362\u6210\u4E8C\u8FDB\u5236\u5E8F\u5217\u624D\u80FD\u591F\u8BA9\u673A\u5668\u6267\u884C\uFF0C\u8FD9\u662F\u8BA1\u7B97\u673A\u7684\u672C\u8D28

            14. \u5B57\u8282\u7801\u6587\u4EF6\u7684\u540D\u5B57\u662F\u6E90\u6587\u4EF6.java\u4E2D\u7684\u7C7B\u540D

            15. java\u8DEF\u5F84\u662F\u533A\u5206\u5927\u5C0F\u5199\u7684\uFF0C\u4F46\u662Fwindows\u4E0D\u533A\u5206

            16. \u7F16\u8BD1\u7684\u65F6\u5019\u4E0D\u5199main\u51FD\u6570\u6CA1\u5173\u7CFB\uFF0C\u4F46\u662F\u8FD0\u884C\u7684\u65F6\u5019\u5982\u679C\u6CA1\u6709main\u51FD\u6570\u5C31\u4F1A\u62A5\u9519\uFF0C\u8FD9\u5176\u5B9E\u662F\u7A0B\u5E8F\u8FD0\u884C\u7684\u5165\u53E3

            17. main()\u65B9\u6CD5\u7684\u683C\u5F0F\u662F\u56FA\u5B9A\u7684

            18. \u4E3A\u4EC0\u4E48\u8981\u914D\u7F6Epath\u73AF\u5883\u53D8\u91CF\uFF0C\u6211\u4EEC\u5E0C\u671B\u5728\u4EFB\u4F55\u8DEF\u5F84\u4E0B\u90FD\u80FD\u6267\u884Cjava\u5F00\u53D1\u5DE5\u5177

            \u6CE8\u91CA

            1. \u6CE8\u91CA\u548C\u6CE8\u89E3\u4E0D\u4E00\u6837\uFF0C\u6CE8\u91CA\u662Fcomment\u3001\u6CE8\u89E3\u53EBannotation

            2. \u6CE8\u91CA\u4ECE\u5B57\u9762\u610F\u601D\u6765\u8BF4\u5C31\u662F\u5BF9\u6211\u4EEC\u5199\u7684\u4EE3\u7801\u8FDB\u884C\u89E3\u91CA\u4F5C\u7528\u7684

            3. java\u89C4\u5B9A\u4E86\u4E09\u79CD\u6CE8\u91CA\uFF1A

              • \u5355\u884C\u6CE8\u91CA // \u5355\u884C\u6CE8\u91CA\uFF0C\u5355\u884C\u6CE8\u91CA\u4E0D\u53C2\u4E0E\u7F16\u8BD1

              • \u591A\u884C\u6CE8\u91CA

                /*
                +import{_ as n,e as s}from"./app.f8791b52.js";var a="/study/assets/image-20210705150107351.24b00824.png",p="/study/assets/image-20210705185333142.f5591c24.png",t="/study/assets/image-20210705191015822.a3fe2f91.png",o="/study/assets/image-20210706163646906.d3157181.png",e="/study/assets/image-20210706163944406.e4e8fcc7.png",c="/study/assets/image-20210706173952736.34b0244b.png",l="/study/assets/image-20210706175524927.f71a64fb.png",i="/study/assets/image-20210706182234844.5a12e42d.png",u="/study/assets/image-20210706205208343.f44541e5.png",k="/study/assets/image-20210708205449559.8c32fae7.png",r="/study/assets/image-20210708210601029.3471adbb.png",d="/study/assets/image-20210710134346723.9d19c390.png",m="/study/assets/image-20210710154640263.e094f1ff.png",g="/study/assets/image-20210710214528413.16fe5e44.png",y="/study/assets/image-20210712140750512.52ad93b5.png",h="/study/assets/image-20210712163640427.c2c40864.png",w="/study/assets/image-20210712171022023.22439f25.png",v="/study/assets/image-20210712173716536.b44b3976.png",f="/study/assets/image-20210712180747114.813b1e7f.png",b="/study/assets/image-20210712181207646.ce830eb9.png",S="/study/assets/image-20210712214426017-1626097468270.0ec4f3a7.png",j="/study/assets/image-20210713154402326.21f35fbe.png",T="/study/assets/image-20210713181847053.9b10f81c.png",x="/study/assets/image-20210713183450520.5f1b1335.png",q="/study/assets/image-20210713190412188.3b6c8750.png",I="/study/assets/image-20210713204102095.fbc1e2d0.png",C="/study/assets/image-20210713205619985.c10a0b5c.png",O="/study/assets/image-20210713214555294.c86b66b4.png",P="/study/assets/image-20210714221952532.b1728cc4.png",_="/study/assets/image-20210715144611902.a41ab2ea.png",M="/study/assets/image-20210715144808840.c15ed60e.png",A="/study/assets/image-20210715154422971.816d4534.png",J="/study/assets/image-20210715155611478.cd1ad5f7.png",E="/study/assets/image-20210715211156147.d6509594.png",L="/study/assets/image-20210715211721326-1626355043072.ec3cfc76.png",N="/study/assets/image-20210715223142406.eab7a568.png",H="/study/assets/image-20210716160144370.09a52354.png",D="/study/assets/image-20210716201006455.ba567b28.png",F="/study/assets/image-20210716203614266.39f42055.png",R="/study/assets/image-20210718090849119.6eb4092b.png",B="/study/assets/image-20210718130728187.97193115.png",U="/study/assets/image-20210718144458652.299959d6.png",V="/study/assets/image-20210718150640135-1626592000999.a881344f.png",z="/study/assets/image-20210718151110970.32198098.png",W="/study/assets/image-20210718200500051.3f9ceee3.png",G="/study/assets/image-20210718201238288.aa7327e0.png",K="/study/assets/image-20210718201455932.ba2aba96.png",X="/study/assets/image-20210719110437166.abad2b71.png",Y="/study/assets/image-20210719171718885.0b4677ef.png",Q="/study/assets/image-20210719172636356.8753a14e.png",Z="/study/assets/image-20210719212658589.1bd833dc.png",$="/study/assets/image-20210719215303993.5a922f77.png",nn="/study/assets/image-20210720103235552.4e33519e.png",sn="/study/assets/image-20210720103616931.7dd3dbc5.png",an="/study/assets/image-20210720110511758.4e0da4ce.png",pn="/study/assets/image-20210720112013584.4c8445a8.png",tn="/study/assets/image-20210720112810464.8186d809.png",on="/study/assets/image-20210720140212952.114f669b.png",en="/study/assets/image-20210720151401774.e4e78118.png",cn="/study/assets/image-20210720162211196.1aca72c4.png",ln="/study/assets/image-20210720162451951.936611c0.png",un="/study/assets/image-20210720173542722.c8457769.png",kn="/study/assets/image-20210720184426986.18dadee4.png",rn="/study/assets/image-20210720184519531.bc2393d6.png",dn="/study/assets/image-20210720191934093.5f40a423.png",mn="/study/assets/image-20210811173003995.8506b4b4.png";const gn={},yn=s('

                Java\u7B14\u8BB0

                \u4E00\u3001\u5165\u95E8\u6982\u8FF0

                1. \u4E09\u4E2A\u5C42\u6B21

                  • \u57FA\u672C\u8BED\u6CD5
                  • \u9762\u5411\u5BF9\u8C61
                  • \u9AD8\u7EA7\u5E94\u7528
                2. \u8BA1\u7B97\u673A\u5305\u542B\u786C\u4EF6\u548C\u8F6F\u4EF6\u4E24\u90E8\u5206\uFF0C\u8F6F\u4EF6\u63D0\u4F9B\u770B\u4E0D\u89C1\u7684\u6307\u4EE4\uFF0C\u6307\u4EE4\u63A7\u5236\u786C\u4EF6\uFF0C\u5E76\u4E14\u4F7F\u5F97\u786C\u4EF6\u5B8C\u6210\u7279\u5B9A\u7684\u4EFB\u52A1

                  \u6211\u4EEC\u5199\u7A0B\u5E8F\u5C31\u662F\u7ED9\u673A\u5668\u3001\u7ED9\u786C\u4EF6\u53D1\u6307\u4EE4\u3002

                3. \u521B\u5EFA\u6216\u5F00\u53D1\u8F6F\u4EF6\u5C31\u53EB\u7A0B\u5E8F\u8BBE\u8BA1

                4. \u5728\u4E2A\u4EBA\u8BA1\u7B97\u673A\u4E0A\uFF0C\u603B\u7EBF\u642D\u5EFA\u5728\u4E3B\u677F\u4E0A\uFF0C\u4E3B\u677F\u662F\u4E00\u4E2A\u8FDE\u63A5\u8BA1\u7B97\u673A\u5404\u4E2A\u90E8\u5206\u7684\u7EBF\u8DEF\u677F

                5. CPU\u662F\u8BA1\u7B97\u673A\u7684\u5927\u8111\uFF0C\u5B83\u4ECE\u5185\u5B58\u4E2D\u83B7\u53D6\u6307\u4EE4\uFF0C\u7136\u540E\u6267\u884C\u8FD9\u4E9B\u6307\u4EE4\u3002

                6. CPU\u5305\u62EC\u63A7\u5236\u5355\u5143\u548C\u7B97\u672F/\u903B\u8F91\u5355\u5143

                  • \u63A7\u5236\u5355\u5143\u7528\u4E8E\u63A7\u5236\u548C\u534F\u8C03\u5176\u5B83\u7EC4\u4EF6\u7684\u52A8\u4F5C
                  • \u7B97\u672F/\u903B\u8F91\u5355\u5143\u7528\u4E8E\u5B8C\u6210\u6570\u503C\u8FD0\u7B97\u548C\u903B\u8F91\u8FD0\u7B97
                7. \u6BCF\u53F0\u8BA1\u7B97\u673A\u5185\u90E8\u6709\u4E00\u4E2A\u5185\u90E8\u65F6\u949F\uFF0C\u8BE5\u65F6\u949F\u4EE5\u56FA\u5B9A\u901F\u5EA6\u53D1\u9001\u7535\u5B50\u8109\u51B2\uFF0C\u65F6\u949F\u901F\u5EA6\u8D8A\u5FEB\uFF0C\u5728\u7ED9\u5B9A\u65F6\u95F4\u6BB5\u5185\u6267\u884C\u7684\u6307\u4EE4\u5C31\u8D8A\u591A\u3002\u901F\u5EA6\u7684\u8BA1\u91CF\u5355\u4F4D\u662F\u8D6B\u5179\uFF0C1hz\u76F8\u5F53\u4E8E\u6BCF\u79D21\u4E2A\u8109\u51B2\u3002

                  \u8D85\u9891\u964D\u9891\u90FD\u662F\u6307\u7684\u8FD9\u4E2Ahz\uFF0C\u8D6B\u5179\u9AD8\u4E86\uFF0C\u81EA\u7136\u6BCF\u79D2\u949Fcpu\u6267\u884C\u7684\u6307\u4EE4\u5C31\u591A\uFF0C\u7535\u8111\u5C31\u5FEB\u3002

                  hz\u4F4E\u4E86\uFF0C\u90A3\u6BCF\u79D2\u949F\u6267\u884C\u7684\u6307\u4EE4\u5C31\u5C11\u4E86\uFF0C\u81EA\u7136\u611F\u89C9\u5C31\u5361\u4E86\uFF08\u964D\u9891\u95E8\u4E8B\u4EF6\uFF09

                8. \u5185\u5B58\uFF08RAM\uFF09\u548C\u78C1\u76D8\u7684\u533A\u522B

                  \u5185\u5B58\u4E2D\u7684\u4FE1\u606F\u5728\u65AD\u7535\u65F6\u4F1A\u4E22\u5931\uFF0C\u5F53\u8BA1\u7B97\u673A\u9700\u8981\u8FD9\u4E9B\u6570\u636E\u65F6\uFF0C\u518D\u79FB\u5165\u5185\u5B58\uFF0C\u56E0\u6B64\u4ECE\u5185\u5B58\u4E2D\u8BFB\u53D6\u6570\u636E\u6BD4\u4ECE\u5B58\u50A8\u8BBE\u5907\u8BFB\u53D6\u8981\u5FEB\u5F97\u591A\u3002

                9. \u6BD4\u7279\uFF08bit\uFF09\u548C\u5B57\u8282\uFF08byte\uFF09

                  \u8BA1\u7B97\u673A\u5C31\u662F\u4E00\u7CFB\u5217\u7684\u7535\u8DEF\u5F00\u5173\uFF0C\u5982\u679C\u7535\u8DEF\u662F\u5F00\u7684\uFF0C\u503C\u662F1\uFF0C\u5982\u679C\u7535\u8DEF\u662F\u5173\u7684\uFF0C\u503C\u662F0

                  \u4E00\u4E2A0\u6216\u80051\u5B58\u50A8\u4E3A1\u4E2Abit\uFF0C\u53731\u4F4D\uFF0C8\u4F4D\u4E3A\u4E00\u4E2A\u5B57\u8282\uFF0C\u4E00\u4E2A\u4E2D\u6587\u6C49\u5B57\u4E00\u822C\u4E3A2\u4E2A\u5B57\u8282\uFF0C2bytes\uFF0C\u537316\u4F4D\u3002

                  \u8BA1\u7B97\u673A\u4E2D\u7684\u6570\u636E\u5B58\u50A8\u662F\u4E8C\u8FDB\u5236\u7684\u65B9\u5F0F\uFF0C\u5C31\u662F\u5BF9\u5E94\u4E8E\u7535\u8DEF\u7684\u5F00\u5173\u72B6\u6001\uFF0Cbit\u662F\u8BA1\u7B97\u673A\u7684\u6700\u5C0F\u5B58\u50A8\u5355\u4F4D\u3002

                  \u8BA1\u7B97\u673A\u4E2D\u6700\u57FA\u672C\u7684\u5B58\u50A8\u5355\u5143\u662F\u5B57\u8282\uFF0C\u6BCF\u4E2A\u5B57\u8282\u75318\u4E2Abit\u6784\u6210\u3002

                  \u8BA1\u7B97\u673A\u7684\u5B58\u50A8\u80FD\u529B\u662F\u4EE5\u5B57\u8282\u548C\u591A\u5B57\u8282\u6765\u8861\u91CF\u7684\u3002

                10. \u5185\u5B58

                  • \u5185\u5B58\uFF08RAM\uFF09\u662F\u7531\u4E00\u4E2A\u6709\u5E8F\u7684\u5B57\u8282\u5E8F\u5217\u7EC4\u6210\uFF0C\u7528\u4E8E\u5B58\u50A8\u7A0B\u5E8F\u53CA\u7A0B\u5E8F\u9700\u8981\u7684\u6570\u636E

                  • \u4E00\u4E2A\u7A0B\u5E8F\u548C\u5B83\u7684\u6570\u636E\u5728\u88ABCPU\u6267\u884C\u524D\u5FC5\u987B\u79FB\u5230\u8BA1\u7B97\u673A\u7684\u5185\u5B58\u4E2D\u3002

                  • CPU\u662F\u6267\u884C\u5404\u79CD\u8BA1\u7B97\u673A\u6307\u4EE4\u7684\uFF0C\u76F8\u5F53\u4E8E\u662F\u8F6F\u4EF6\u53D1\u51FA\u6307\u4EE4\uFF08\u6240\u4EE5\u8F6F\u4EF6\u4F1A\u5360\u7528\u5185\u5B58\uFF09\uFF0CCPU\u6267\u884C\u6307\u4EE4\u6765\u8C03\u7528\u786C\u4EF6\u7684\u8FD0\u884C\u3002

                  • CPU\u662F\u4ECE\u5185\u5B58\u4E2D\u6765\u83B7\u53D6\u6307\u4EE4\u7684

                  • \u5185\u5B58\u89E3\u51B3\u4E86\u4E00\u90E8\u5206CPU\u8FD0\u884C\u8FC7\u5FEB\uFF0C\u800C\u786C\u76D8\u6570\u636E\u5B58\u53D6\u592A\u6162\u7684\u95EE\u9898\u3002

                  • \u4F46\u5185\u5B58\u662F\u5E26\u7535\u5B58\u50A8\u7684\uFF0C\u4E00\u65E6\u65AD\u7535\u6570\u636E\u5C31\u4F1A\u6D88\u5931\uFF0C\u800C\u4E14\u5BB9\u91CF\u6709\u9650\uFF0C\u6240\u4EE5\u8981\u957F\u65F6\u95F4\u50A8\u5B58\u7A0B\u5E8F\u5C31\u9700\u8981\u5B58\u50A8\u5230\u786C\u76D8\u4E2D

                  • \u6BCF\u4E2A\u5B57\u8282\u5728\u5185\u5B58\uFF08RAM\uFF09\u4E2D\u90FD\u6709\u4E00\u4E2A\u552F\u4E00\u7684\u5730\u5740

                  • ROM\u548C\u786C\u76D8\u5BF9\u5E94

                11. \u8F6F\u4EF6\u5C42\u9762\u6700\u5148\u548C\u786C\u4EF6\u6253\u4EA4\u9053\u7684\u5C31\u662F\u64CD\u4F5C\u7CFB\u7EDF

                  \u7528\u6237 -> \u5E94\u7528\u7A0B\u5E8F -> \u64CD\u4F5C\u7CFB\u7EDF -> \u786C\u4EF6

                  image-20210705150107351

                12. web\u5F00\u53D1\uFF0C\u5BA2\u6237\u7AEF\uFF08\u6D4F\u89C8\u5668)\u8BBF\u95EE\u6D4F\u89C8\u670D\u52A1\u5668\u63D0\u4F9B\u7684\u9875\u9762\u3002

                13. \u4E07\u7EF4\u7F51\uFF08www\uFF09\u53EF\u4EE5\u8BA4\u4E3A\u662F\u4E00\u4E2A\u7531\u8BB8\u591A\u4E92\u76F8\u94FE\u63A5\u7684\u8D85\u6587\u672C\u7EC4\u6210\u7684\u7CFB\u7EDF\u3002

                  \u6BCF\u4E2A\u6709\u7528\u7684\u4E8B\u7269\uFF0C\u79F0\u4E3A\u4E00\u6837\u8D44\u6E90\uFF0C\u8FD9\u4E9B\u8D44\u6E90\u901A\u8FC7\u8D85\u6587\u672C\u4F20\u8F93\u534F\u8BAE\uFF08HTTP\uFF09\u4F20\u9001\u7ED9\u7528\u6237

                  HTTP\u5C31\u662F\u5BA2\u6237\u7AEF\uFF08\u6D4F\u89C8\u5668\uFF09\u548C\u670D\u52A1\u5668\u4E4B\u95F4\u901A\u4FE1\u7684\u534F\u8BAE\uFF01

                14. \u4E07\u7EF4\u7F51\u662F\u7531\u65E0\u6570\u4E2A\u7F51\u7EDC\u7AD9\u70B9\u548C\u7F51\u9875\u6784\u6210\u7684\u96C6\u5408\uFF0C\u4ED6\u4EEC\u5728\u4E00\u8D77\u6784\u6210\u4E86\u56E0\u7279\u7F51\u6700\u4E3B\u8981\u7684\u90E8\u5206\u3002

                  \u4E07\u7EF4\u7F51\u5B9E\u9645\u662F\u591A\u5A92\u4F53\u7684\u96C6\u5408\uFF0C\u662F\u7531\u8D85\u7EA7\u94FE\u63A5\u8FDE\u63A5\u800C\u6210\u7684\u3002\u6211\u4EEC\u901A\u5E38\u901A\u8FC7\u7F51\u7EDC\u6D4F\u89C8\u5668\u4E0A\u7F51\u89C2\u770B\u7684\uFF0C\u5C31\u662F\u4E07\u7EF4\u7F51\u7684\u5185\u5BB9\u3002

                15. JVM\u662Fjava virtual machine\uFF0C java\u865A\u62DF\u673A\uFF0C\u6211\u4EEC\u6574\u4E2Ajava\u7A0B\u5E8F\u60F3\u8FD0\u884C\uFF0C\u90FD\u5FC5\u987B\u4F9D\u8D56java\u865A\u62DF\u673A\u3002

                16. \u6846\u67B6\u53EF\u4EE5\u7406\u89E3\u4E3A\u5BF9\u73B0\u6709\u7684\u4E00\u4E9B\u57FA\u672C\u7EC4\u4EF6\u7684\u7EC4\u5408\u548C\u5C01\u88C5\uFF0C\u5982\u679C\u4F7F\u7528\u57FA\u672C\u7684\u7EC4\u4EF6\u53BB\u5F00\u53D1\u7684\u8BDD\uFF0C\u6548\u7387\u5F88\u4F4E\uFF0C\u5728\u5B9E\u9645\u573A\u666F\u4E2D\uFF0C\u5982\u679C\u4EC0\u4E48\u7EC4\u4EF6\u90FD\u81EA\u5DF1\u4EB2\u5386\u4EB2\u4E3A\u53BB\u5199\uFF0C\u6548\u7387\u4F4E\u800C\u4E14\u53EF\u80FD\u5305\u62EC\u4E0D\u5168\u3002

                  • \u73B0\u5728\u5F88\u591A\u516C\u53F8\u90FD\u57FA\u4E8E\u5FAE\u670D\u52A1\u505A\u5F00\u53D1
                17. \u8F6F\u4EF6\u6709\u7CFB\u7EDF\u8F6F\u4EF6\u548C\u5E94\u7528\u8F6F\u4EF6\u4E4B\u5206

                  \u7CFB\u7EDF\u8F6F\u4EF6\u5C31\u662F\u64CD\u4F5C\u7CFB\u7EDF

                18. \u56FE\u5F62\u5316\u754C\u9762\uFF08Graphical User Interface\uFF09

                  \u547D\u4EE4\u884C\u65B9\u5F0F\uFF08Command Line Interface\uFF09

                19. \u5B89\u5353\u548CIOS\u90FD\u662F\u7528\u7684linux\u5185\u6838

                \u4E8C\u3001Java\u8BED\u8A00\u6982\u8FF0

                \u6982\u8FF0

                1. \u867D\u7136C\u548CC++\u7684\u5F00\u53D1\u6548\u7387\u4E0D\u9AD8\uFF0C\u4F46\u662F\u8FD0\u884C\u6548\u7387\u5F88\u9AD8\u3002\u5F00\u53D1\u5F97\u6162\uFF0C\u8FD0\u884C\u5F97\u5FEB

                  \u6240\u4EE5\u51E1\u662F\u548C\u64CD\u4F5C\u7CFB\u7EDF\u8FD9\u79CD\u5E95\u5C42\u4EA4\u4E92\u7684\uFF0C\u90FD\u7528C\u548CC++\u7F16\u5199\u3002

                2. python\u6BD4java\u5F00\u53D1\u6548\u7387\u66F4\u5FEB\uFF0C\u6267\u884C\u6548\u7387\u66F4\u5DEE\u3002\u76F8\u5F53\u4E8E\u662F\u7F16\u5199\u8FC7\u7A0B\u4E2D\u66F4\u590D\u6742\u7684\u8BED\u8A00\uFF0C\u6267\u884C\u6548\u7387\u66F4\u5FEB\uFF0C\u56E0\u4E3A\u5199\u5F97\u590D\u6742\u5C31\u76F8\u5F53\u4E8E\u5199\u5F97\u6E05\u695A\uFF0C\u7F16\u8BD1\u8FC7\u7A0B\u82B1\u7684\u65F6\u95F4\u5C11\uFF0C\u673A\u5668\u66F4\u5BB9\u6613\u7406\u89E3\uFF0C\u90A3\u4E48\u6267\u884C\u6548\u7387\u5C31\u66F4\u5FEB\u3002\u800CPython\u8FD9\u79CD\u7F16\u5199\u5F88\u5BB9\u6613\uFF0C\u9605\u8BFB\u5F88\u5BB9\u6613\uFF0C\u4F46\u662F\u8BA9\u673A\u5668\u7406\u89E3\u5C31\u9700\u8981\u82B1\u8D39\u66F4\u591A\u65F6\u95F4\uFF0C\u4E5F\u5C31\u662F\u7F16\u8BD1\u9700\u8981\u66F4\u591A\u65F6\u95F4\uFF0C\u4E5F\u5C31\u662F\u6240\u8C13\u7684\u5F00\u53D1\u6548\u7387\u9AD8\uFF0C\u6267\u884C\u6548\u7387\u4F4E\u3002\u6211\u4EEC\u53EF\u4EE5\u8FD9\u4E48\u6765\u7406\u89E3\u3002

                3. python\u548Cjava\u90FD\u53EF\u4EE5\u505Aweb\u5F00\u53D1\uFF0C python\u53EF\u4EE5\u7528flask\u6846\u67B6\u6765\u5B9E\u73B0\u3002web\u5F00\u53D1\u8981\u5B66\u4F1A\u7528postman\u6216\u8005swagger\u6765\u8FDB\u884C\u8C03\u8BD5\u3002

                4. python\u548CJavaScript\u90FD\u53EF\u4EE5\u770B\u4F5C\u8F7B\u578B\u7684\u8BED\u8A00\uFF0C\u5B83\u4EEC\u90FD\u662F\u811A\u672C\u8BED\u8A00\uFF0C\u6CA1\u6709\u592A\u4E25\u683C\u7684\u8BED\u6CD5\u3002

                  \u800Cjava\u3001C\u90FD\u662F\u91CD\u578B\u7684\u8BED\u8A00\uFF0C\u6709\u4E25\u683C\u7684\u8BED\u6CD5\u548C\u4E30\u5BCC\u7684\u7C7B\u5E93

                5. \u968F\u7740java\u6280\u672F\u5728web\u65B9\u9762\u7684\u4E0D\u65AD\u6210\u719F\uFF0C\u5DF2\u7ECF\u6210\u4E3Aweb\u5E94\u7528\u7A0B\u5E8F\u7684\u9996\u9009\u5F00\u53D1\u8BED\u8A00

                6. java\u53EA\u652F\u6301\u7C7B\u4E4B\u95F4\u7684\u5355\u7EE7\u627F\uFF0C\u4F46\u652F\u6301\u63A5\u53E3\u4E4B\u95F4\u7684\u591A\u7EE7\u627F\u3002

                7. java\u8BED\u8A00\u7684\u4E09\u4E2A\u7279\u70B9\uFF1A

                  • \u9762\u5411\u5BF9\u8C61

                    • \u4E24\u4E2A\u57FA\u672C\u6982\u5FF5\uFF1A\u7C7B\u3001\u5BF9\u8C61
                    • \u4E09\u5927\u7279\u6027\uFF1A\u5C01\u88C5\u3001\u7EE7\u627F\u3001\u591A\u6001
                  • \u5065\u58EE\u6027

                    \u53BB\u6389\u4E86\u6307\u9488\uFF0C\u6709\u5783\u573E\u56DE\u6536\u673A\u5236\u7B49

                  • \u8DE8\u5E73\u53F0\u6027

                    \u901A\u8FC7java\u8BED\u8A00\u5199\u7684\u5E94\u7528\u7A0B\u5E8F\u5728\u4E0D\u540C\u7684\u7CFB\u7EDF\u5E73\u53F0\u4E0A\u90FD\u53EF\u4EE5\u8FD0\u884C

                    \u539F\u7406\uFF1A\u53EA\u9700\u8981\u5728\u9700\u8981\u8FD0\u884CJava\u7A0B\u5E8F\u7684\u64CD\u4F5C\u7CFB\u7EDF\u4E0A\uFF0C\u5148\u5B89\u88C5\u4E00\u4E2AJava\u865A\u62DF\u673A\uFF08JVM\uFF09\u5373\u53EF\uFF0C\u7531JVM\u6765\u8D1F\u8D23java\u7A0B\u5E8F\u5728\u8BE5\u7CFB\u7EDF\u4E2D\u7684\u8FD0\u884C\u3002

                    image-20210705185333142

                    \u9488\u5BF9\u4E0D\u540C\u7684\u64CD\u4F5C\u7CFB\u7EDF\uFF0C\u63D0\u4F9B\u7684JVM\u662F\u4E0D\u4E00\u6837\u7684

                8. Java\u4E24\u79CD\u6838\u5FC3\u673A\u5236

                  • JVM---\u8DE8\u5E73\u53F0
                  • \u5783\u573E\u56DE\u6536\u673A\u5236
                9. Java\u7A0B\u5E8F\u5728JVM\u4E0A\u8DD1\uFF0CJVM\u662F\u8DD1\u5728\u64CD\u4F5C\u7CFB\u7EDF\u4E0A\u7684\u3002\u64CD\u4F5C\u7CFB\u7EDF\u4F9D\u8D56\u4E8E\u786C\u4EF6\u3001CPU\u53BB\u5E2E\u6211\u4EEC\u8FD0\u7B97

                10. \u5783\u573E\u56DE\u6536\u673A\u5236

                  \u5783\u573E\u56DE\u6536\u5728C\u3001C++\u8BED\u8A00\u4E2D\uFF0C\u662F\u7531\u7A0B\u5E8F\u5458\u56DE\u6536\u65E0\u7528\u5185\u5B58

                  Java\u63D0\u4F9B\u4E00\u79CD\u7CFB\u7EDF\u7EA7\u7EBF\u7A0B\u8DDF\u8E2A\u5B58\u50A8\u7A7A\u95F4\u7684\u5206\u914D\u60C5\u51B5\uFF0C\u5E76\u5728JVM\u7A7A\u95F2\u65F6\uFF0C\u68C0\u67E5\u5E76\u91CA\u653E\u90A3\u4E9B\u53EF\u88AB\u91CA\u653E\u7684\u5B58\u50A8\u7A7A\u95F4

                  \u5783\u573E\u56DE\u6536\u5728Java\u7A0B\u5E8F\u8FD0\u884C\u8FC7\u7A0B\u4E2D\u81EA\u52A8\u8FDB\u884C\uFF0C\u7A0B\u5E8F\u5458\u65E0\u6CD5\u7CBE\u786E\u63A7\u5236\u548C\u5E72\u9884

                11. \u4F46\u662FJava\u7A0B\u5E8F\u4ECD\u7136\u4F1A\u51FA\u73B0\u5185\u5B58\u6CC4\u6F0F\u548C\u5185\u5B58\u6EA2\u51FA\u95EE\u9898

                12. JDK

                  Java\u5F00\u53D1\u5DE5\u5177\u5305\uFF0C\u4F46\u662F\u9664\u4E86\u5F00\u53D1\u5DE5\u5177\u5305\u4EE5\u5916\uFF0C\u4E5F\u5305\u62EC\u4E86JRE\uFF0C\u6240\u4EE5\u5B89\u88C5\u4E86JDK\u4E4B\u540E\uFF0C\u5C31\u4E0D\u7528\u518D\u5355\u72EC\u5B89\u88C5JRE\u4E86\uFF0C\u6240\u4EE5\u53EF\u80FD\u4F1A\u8BA4\u4E3AJDK\u662FJava\u8FD0\u884C\u73AF\u5883\uFF0C\u4F46\u662F\u5B9E\u9645\u4E0AJRE\u624D\u662FJava\u8FD0\u884C\u73AF\u5883\uFF0C\u53EA\u4E0D\u8FC7\u5B89\u88C5JDK\u7684\u540C\u65F6\u5B89\u88C5\u4E86JRE

                  JRE

                  java runtime environment \u5305\u62ECJVM\u548CJava\u7A0B\u5E8F\u6240\u9700\u8981\u7684\u6838\u5FC3\u7C7B\u5E93\u7B49

                  \u6240\u4EE5\u5982\u679C\u60F3\u8FD0\u884C\u4E00\u4E2A\u5F00\u53D1\u597D\u7684java\u7A0B\u5E8F\uFF0C\u8BA1\u7B97\u673A\u4E2D\u53EA\u9700\u8981\u5B89\u88C5JRE\u5373\u53EF

                  image-20210705191015822

                13. \u8FD0\u884Cjava\u6587\u4EF6\u662F\u5148\u8981\u628A.java\u6E90\u6587\u4EF6\u7F16\u8BD1\u6210.class\u6587\u4EF6\uFF0C.class\u6587\u4EF6\u662F\u5B57\u8282\u7801\u6587\u4EF6\uFF0CCPU\u662F\u4ECE\u5185\u5B58\u4E2D\u53D6\u51FA\u6307\u4EE4\u6267\u884C\uFF0Chz\u6570\u8D8A\u9AD8\uFF0C\u5728\u4E00\u5B9A\u65F6\u95F4\u5185\u6267\u884C\u7684\u6307\u4EE4\u5C31\u8D8A\u591A\u3002\u6700\u5E95\u5C42\u7684\u6307\u4EE4\u90FD\u662F\u4E8C\u8FDB\u5236\u7684\uFF0C\u56E0\u4E3ACPU\u4E0A\u6709\u65E0\u6570\u4E2A\u7535\u8DEF\u5F00\u5173\uFF0C\u4EE50 1\u6765\u63A7\u5236\u3002python\u662F\u811A\u672C\u8BED\u8A00\uFF0C\u7F16\u5199\u4F1A\u5F88\u5BB9\u6613\uFF0C\u4F46\u662F\u8BA1\u7B97\u673A\u5C06\u5176\u8F6C\u6362\u4E3A\u5B57\u8282\u7801\u6587\u4EF6\u5C31\u4F1A\u9700\u8981\u66F4\u591A\u65F6\u95F4\uFF0C\u4E5F\u5C31\u662F\u6267\u884C\u6548\u7387\u4E0D\u9AD8\u3002

                  \u6700\u7EC8\u4EE3\u7801\u90FD\u662F\u8981\u8F6C\u6362\u6210\u4E8C\u8FDB\u5236\u5E8F\u5217\u624D\u80FD\u591F\u8BA9\u673A\u5668\u6267\u884C\uFF0C\u8FD9\u662F\u8BA1\u7B97\u673A\u7684\u672C\u8D28

                14. \u5B57\u8282\u7801\u6587\u4EF6\u7684\u540D\u5B57\u662F\u6E90\u6587\u4EF6.java\u4E2D\u7684\u7C7B\u540D

                15. java\u8DEF\u5F84\u662F\u533A\u5206\u5927\u5C0F\u5199\u7684\uFF0C\u4F46\u662Fwindows\u4E0D\u533A\u5206

                16. \u7F16\u8BD1\u7684\u65F6\u5019\u4E0D\u5199main\u51FD\u6570\u6CA1\u5173\u7CFB\uFF0C\u4F46\u662F\u8FD0\u884C\u7684\u65F6\u5019\u5982\u679C\u6CA1\u6709main\u51FD\u6570\u5C31\u4F1A\u62A5\u9519\uFF0C\u8FD9\u5176\u5B9E\u662F\u7A0B\u5E8F\u8FD0\u884C\u7684\u5165\u53E3

                17. main()\u65B9\u6CD5\u7684\u683C\u5F0F\u662F\u56FA\u5B9A\u7684

                18. \u4E3A\u4EC0\u4E48\u8981\u914D\u7F6Epath\u73AF\u5883\u53D8\u91CF\uFF0C\u6211\u4EEC\u5E0C\u671B\u5728\u4EFB\u4F55\u8DEF\u5F84\u4E0B\u90FD\u80FD\u6267\u884Cjava\u5F00\u53D1\u5DE5\u5177

                \u6CE8\u91CA

                1. \u6CE8\u91CA\u548C\u6CE8\u89E3\u4E0D\u4E00\u6837\uFF0C\u6CE8\u91CA\u662Fcomment\u3001\u6CE8\u89E3\u53EBannotation

                2. \u6CE8\u91CA\u4ECE\u5B57\u9762\u610F\u601D\u6765\u8BF4\u5C31\u662F\u5BF9\u6211\u4EEC\u5199\u7684\u4EE3\u7801\u8FDB\u884C\u89E3\u91CA\u4F5C\u7528\u7684

                3. java\u89C4\u5B9A\u4E86\u4E09\u79CD\u6CE8\u91CA\uFF1A

                  • \u5355\u884C\u6CE8\u91CA // \u5355\u884C\u6CE8\u91CA\uFF0C\u5355\u884C\u6CE8\u91CA\u4E0D\u53C2\u4E0E\u7F16\u8BD1

                  • \u591A\u884C\u6CE8\u91CA

                    /*
                     \u591A\u884C\u6CE8\u91CA
                     main()\u65B9\u6CD5\u662F\u7A0B\u5E8F\u7684\u5165\u53E3
                     */
                    diff --git "a/assets/Java\347\254\224\350\256\260.html.bbeb4465.js" "b/assets/Java\347\254\224\350\256\260.html.c673c7f2.js"
                    similarity index 99%
                    rename from "assets/Java\347\254\224\350\256\260.html.bbeb4465.js"
                    rename to "assets/Java\347\254\224\350\256\260.html.c673c7f2.js"
                    index 3a63dae0..f977c55c 100644
                    --- "a/assets/Java\347\254\224\350\256\260.html.bbeb4465.js"
                    +++ "b/assets/Java\347\254\224\350\256\260.html.c673c7f2.js"
                    @@ -1 +1 @@
                    -const l={key:"v-1cbd166b",path:"/java/Java%E5%9F%BA%E7%A1%80/Java%E7%AC%94%E8%AE%B0/Java%E7%AC%94%E8%AE%B0.html",title:"Java\u7B14\u8BB0",lang:"zh-CN",frontmatter:{},excerpt:"",headers:[{level:2,title:"\u4E00\u3001\u5165\u95E8\u6982\u8FF0",slug:"\u4E00\u3001\u5165\u95E8\u6982\u8FF0",children:[]},{level:2,title:"\u4E8C\u3001Java\u8BED\u8A00\u6982\u8FF0",slug:"\u4E8C\u3001java\u8BED\u8A00\u6982\u8FF0",children:[{level:3,title:"\u6982\u8FF0",slug:"\u6982\u8FF0",children:[]},{level:3,title:"\u6CE8\u91CA",slug:"\u6CE8\u91CA",children:[]},{level:3,title:"JavaAPI\u6587\u6863",slug:"javaapi\u6587\u6863",children:[]}]},{level:2,title:"\u4E09\u3001Java\u57FA\u672C\u8BED\u6CD5",slug:"\u4E09\u3001java\u57FA\u672C\u8BED\u6CD5",children:[{level:3,title:"\u4E00\u3001\u53D8\u91CF\u4E0E\u8FD0\u7B97\u7B26",slug:"\u4E00\u3001\u53D8\u91CF\u4E0E\u8FD0\u7B97\u7B26",children:[]},{level:3,title:"\u4E8C\u3001\u81EA\u52A8\u7C7B\u578B\u8F6C\u6362\u548C\u5F3A\u5236\u7C7B\u578B\u8F6C\u6362",slug:"\u4E8C\u3001\u81EA\u52A8\u7C7B\u578B\u8F6C\u6362\u548C\u5F3A\u5236\u7C7B\u578B\u8F6C\u6362",children:[]},{level:3,title:"\u4E09\u3001\u5173\u4E8E\u8FDB\u5236",slug:"\u4E09\u3001\u5173\u4E8E\u8FDB\u5236",children:[]},{level:3,title:"\u56DB\u3001\u8FD0\u7B97\u7B26",slug:"\u56DB\u3001\u8FD0\u7B97\u7B26",children:[]},{level:3,title:"\u4E94\u3001\u7A0B\u5E8F\u6D41\u7A0B\u63A7\u5236",slug:"\u4E94\u3001\u7A0B\u5E8F\u6D41\u7A0B\u63A7\u5236",children:[]},{level:3,title:"\u516D\u3001\u5FAA\u73AF\u7ED3\u6784",slug:"\u516D\u3001\u5FAA\u73AF\u7ED3\u6784",children:[]}]},{level:2,title:"\u56DB\u3001\u6570\u7EC4",slug:"\u56DB\u3001\u6570\u7EC4",children:[{level:3,title:"\u4E00\u3001\u6982\u8FF0",slug:"\u4E00\u3001\u6982\u8FF0",children:[]},{level:3,title:"\u4E8C\u3001\u4E00\u7EF4\u6570\u7EC4\u7684\u4F7F\u7528",slug:"\u4E8C\u3001\u4E00\u7EF4\u6570\u7EC4\u7684\u4F7F\u7528",children:[]},{level:3,title:"\u4E09\u3001\u4E8C\u7EF4\u6570\u7EC4",slug:"\u4E09\u3001\u4E8C\u7EF4\u6570\u7EC4",children:[]}]},{level:2,title:"\u4E94\u3001\u9762\u5411\u5BF9\u8C61",slug:"\u4E94\u3001\u9762\u5411\u5BF9\u8C61",children:[{level:3,title:"\u4E00\u3001Java\u7C7B\u53CA\u7C7B\u7684\u6210\u5458",slug:"\u4E00\u3001java\u7C7B\u53CA\u7C7B\u7684\u6210\u5458",children:[{level:4,title:"\u65B9\u6CD5\u7684\u91CD\u8F7D",slug:"\u65B9\u6CD5\u7684\u91CD\u8F7D",children:[]},{level:4,title:"\u53EF\u53D8\u4E2A\u6570\u5F62\u53C2\u7684\u65B9\u6CD5",slug:"\u53EF\u53D8\u4E2A\u6570\u5F62\u53C2\u7684\u65B9\u6CD5",children:[]},{level:4,title:"\u65B9\u6CD5\u53C2\u6570\u7684\u503C\u4F20\u9012\u673A\u5236",slug:"\u65B9\u6CD5\u53C2\u6570\u7684\u503C\u4F20\u9012\u673A\u5236",children:[]},{level:4,title:"\u9012\u5F52\u65B9\u6CD5",slug:"\u9012\u5F52\u65B9\u6CD5",children:[]}]},{level:3,title:"\u4E8C\u3001\u9762\u5411\u5BF9\u8C61\u7684\u4E09\u5927\u7279\u5F81",slug:"\u4E8C\u3001\u9762\u5411\u5BF9\u8C61\u7684\u4E09\u5927\u7279\u5F81",children:[{level:4,title:"\u4E00\u3001\u5C01\u88C5\u6027",slug:"\u4E00\u3001\u5C01\u88C5\u6027",children:[]},{level:4,title:"\u4E8C\u3001\u7EE7\u627F",slug:"\u4E8C\u3001\u7EE7\u627F",children:[]},{level:4,title:"\u4E09\u3001\u591A\u6001\u6027",slug:"\u4E09\u3001\u591A\u6001\u6027",children:[]}]},{level:3,title:"\u4E09\u3001\u5176\u5B83\u5173\u952E\u5B57",slug:"\u4E09\u3001\u5176\u5B83\u5173\u952E\u5B57",children:[{level:4,title:"this",slug:"this",children:[]},{level:4,title:"package\u3001import",slug:"package\u3001import",children:[]},{level:4,title:"final",slug:"final",children:[]}]},{level:3,title:"\u56DB\u3001Object\u7C7B\u7684\u4F7F\u7528",slug:"\u56DB\u3001object\u7C7B\u7684\u4F7F\u7528",children:[]},{level:3,title:"\u4E94\u3001\u5305\u88C5\u7C7B\u7684\u4F7F\u7528",slug:"\u4E94\u3001\u5305\u88C5\u7C7B\u7684\u4F7F\u7528",children:[]},{level:3,title:"\u516D\u3001static",slug:"\u516D\u3001static",children:[]},{level:3,title:"\u4E03\u3001\u4EE3\u7801\u5757",slug:"\u4E03\u3001\u4EE3\u7801\u5757",children:[]},{level:3,title:"\u516B\u3001\u62BD\u8C61\u7C7B\u4E0E\u62BD\u8C61\u65B9\u6CD5",slug:"\u516B\u3001\u62BD\u8C61\u7C7B\u4E0E\u62BD\u8C61\u65B9\u6CD5",children:[]},{level:3,title:"\u4E5D\u3001\u63A5\u53E3",slug:"\u4E5D\u3001\u63A5\u53E3",children:[]},{level:3,title:"\u5341\u3001\u5185\u90E8\u7C7B",slug:"\u5341\u3001\u5185\u90E8\u7C7B",children:[]}]},{level:2,title:"\u516D\u3001\u5F02\u5E38",slug:"\u516D\u3001\u5F02\u5E38",children:[]},{level:2,title:"\u4E03\u3001\u591A\u7EBF\u7A0B",slug:"\u4E03\u3001\u591A\u7EBF\u7A0B",children:[]},{level:2,title:"\u516B\u3001\u5E38\u7528\u7C7B",slug:"\u516B\u3001\u5E38\u7528\u7C7B",children:[{level:3,title:"String\u3001StringBuffer\u3001StringBuilder",slug:"string\u3001stringbuffer\u3001stringbuilder",children:[]},{level:3,title:"\u65E5\u671F\u3001\u65F6\u95F4",slug:"\u65E5\u671F\u3001\u65F6\u95F4",children:[]},{level:3,title:"Java\u6BD4\u8F83\u5668",slug:"java\u6BD4\u8F83\u5668",children:[]}]},{level:2,title:"\u4E5D\u3001\u679A\u4E3E\u7C7B\u4E0E\u6CE8\u89E3",slug:"\u4E5D\u3001\u679A\u4E3E\u7C7B\u4E0E\u6CE8\u89E3",children:[{level:3,title:"\u679A\u4E3E\u7C7B\u7684\u4F7F\u7528",slug:"\u679A\u4E3E\u7C7B\u7684\u4F7F\u7528",children:[]},{level:3,title:"\u6CE8\u89E3(Annotation)",slug:"\u6CE8\u89E3-annotation",children:[]}]},{level:2,title:"\u5341\u3001\u96C6\u5408",slug:"\u5341\u3001\u96C6\u5408",children:[{level:3,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-1",children:[]},{level:3,title:"\u96C6\u5408\u6846\u67B6",slug:"\u96C6\u5408\u6846\u67B6",children:[]},{level:3,title:"Collection\u63A5\u53E3\u4E2D\u7684\u65B9\u6CD5\u7684\u4F7F\u7528",slug:"collection\u63A5\u53E3\u4E2D\u7684\u65B9\u6CD5\u7684\u4F7F\u7528",children:[]},{level:3,title:"Collection\u63A5\u53E3\u7684\u5B50\u63A5\u53E3--List\u63A5\u53E3",slug:"collection\u63A5\u53E3\u7684\u5B50\u63A5\u53E3-list\u63A5\u53E3",children:[]},{level:3,title:"Collection\u7684\u5B50\u63A5\u53E3\u4E4B\u4E8C\uFF1ASet\u63A5\u53E3",slug:"collection\u7684\u5B50\u63A5\u53E3\u4E4B\u4E8C-set\u63A5\u53E3",children:[]},{level:3,title:"Map\u63A5\u53E3",slug:"map\u63A5\u53E3",children:[]},{level:3,title:"Collections\u5DE5\u5177\u7C7B",slug:"collections\u5DE5\u5177\u7C7B",children:[]},{level:3,title:"java\u6570\u636E\u7ED3\u6784",slug:"java\u6570\u636E\u7ED3\u6784",children:[]}]},{level:2,title:"\u5341\u4E00\u3001\u6CDB\u578B",slug:"\u5341\u4E00\u3001\u6CDB\u578B",children:[]},{level:2,title:"\u5341\u4E8C\u3001IO\u6D41",slug:"\u5341\u4E8C\u3001io\u6D41",children:[{level:3,title:"File\u7C7B\u7684\u4F7F\u7528",slug:"file\u7C7B\u7684\u4F7F\u7528",children:[]},{level:3,title:"IO\u6D41\u539F\u7406\u53CA\u6D41\u7684\u5206\u7C7B",slug:"io\u6D41\u539F\u7406\u53CA\u6D41\u7684\u5206\u7C7B",children:[]}]},{level:2,title:"\u5341\u4E09\u3001\u7F51\u7EDC\u7F16\u7A0B",slug:"\u5341\u4E09\u3001\u7F51\u7EDC\u7F16\u7A0B",children:[{level:3,title:"\u7F51\u7EDC\u7F16\u7A0B\u6982\u8FF0",slug:"\u7F51\u7EDC\u7F16\u7A0B\u6982\u8FF0",children:[]},{level:3,title:"IP\u548C\u7AEF\u53E3\u53F7",slug:"ip\u548C\u7AEF\u53E3\u53F7",children:[]},{level:3,title:"\u7F51\u7EDC\u534F\u8BAE",slug:"\u7F51\u7EDC\u534F\u8BAE",children:[]},{level:3,title:"TCP\u7F51\u7EDC\u7F16\u7A0B",slug:"tcp\u7F51\u7EDC\u7F16\u7A0B",children:[]},{level:3,title:"UDP\u7F51\u7EDC\u7F16\u7A0B",slug:"udp\u7F51\u7EDC\u7F16\u7A0B",children:[]},{level:3,title:"URL\u7F16\u7A0B",slug:"url\u7F16\u7A0B",children:[]}]},{level:2,title:"\u5341\u56DB\u3001\u53CD\u5C04",slug:"\u5341\u56DB\u3001\u53CD\u5C04",children:[{level:3,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-2",children:[]},{level:3,title:"\u521B\u5EFA\u8FD0\u884C\u65F6\u7C7B\u7684\u5BF9\u8C61",slug:"\u521B\u5EFA\u8FD0\u884C\u65F6\u7C7B\u7684\u5BF9\u8C61",children:[]},{level:3,title:"\u52A8\u6001\u4EE3\u7406",slug:"\u52A8\u6001\u4EE3\u7406",children:[]}]},{level:2,title:"\u6CE8\u610F",slug:"\u6CE8\u610F",children:[]}],git:{updatedTime:1710173765e3,contributors:[{name:"shailene",email:"64005626+shaileneF@users.noreply.github.com",commits:1}]},filePathRelative:"java/Java\u57FA\u7840/Java\u7B14\u8BB0/Java\u7B14\u8BB0.md"};export{l as data};
                    +const l={key:"v-1cbd166b",path:"/java/Java%E5%9F%BA%E7%A1%80/Java%E7%AC%94%E8%AE%B0/Java%E7%AC%94%E8%AE%B0.html",title:"Java\u7B14\u8BB0",lang:"zh-CN",frontmatter:{},excerpt:"",headers:[{level:2,title:"\u4E00\u3001\u5165\u95E8\u6982\u8FF0",slug:"\u4E00\u3001\u5165\u95E8\u6982\u8FF0",children:[]},{level:2,title:"\u4E8C\u3001Java\u8BED\u8A00\u6982\u8FF0",slug:"\u4E8C\u3001java\u8BED\u8A00\u6982\u8FF0",children:[{level:3,title:"\u6982\u8FF0",slug:"\u6982\u8FF0",children:[]},{level:3,title:"\u6CE8\u91CA",slug:"\u6CE8\u91CA",children:[]},{level:3,title:"JavaAPI\u6587\u6863",slug:"javaapi\u6587\u6863",children:[]}]},{level:2,title:"\u4E09\u3001Java\u57FA\u672C\u8BED\u6CD5",slug:"\u4E09\u3001java\u57FA\u672C\u8BED\u6CD5",children:[{level:3,title:"\u4E00\u3001\u53D8\u91CF\u4E0E\u8FD0\u7B97\u7B26",slug:"\u4E00\u3001\u53D8\u91CF\u4E0E\u8FD0\u7B97\u7B26",children:[]},{level:3,title:"\u4E8C\u3001\u81EA\u52A8\u7C7B\u578B\u8F6C\u6362\u548C\u5F3A\u5236\u7C7B\u578B\u8F6C\u6362",slug:"\u4E8C\u3001\u81EA\u52A8\u7C7B\u578B\u8F6C\u6362\u548C\u5F3A\u5236\u7C7B\u578B\u8F6C\u6362",children:[]},{level:3,title:"\u4E09\u3001\u5173\u4E8E\u8FDB\u5236",slug:"\u4E09\u3001\u5173\u4E8E\u8FDB\u5236",children:[]},{level:3,title:"\u56DB\u3001\u8FD0\u7B97\u7B26",slug:"\u56DB\u3001\u8FD0\u7B97\u7B26",children:[]},{level:3,title:"\u4E94\u3001\u7A0B\u5E8F\u6D41\u7A0B\u63A7\u5236",slug:"\u4E94\u3001\u7A0B\u5E8F\u6D41\u7A0B\u63A7\u5236",children:[]},{level:3,title:"\u516D\u3001\u5FAA\u73AF\u7ED3\u6784",slug:"\u516D\u3001\u5FAA\u73AF\u7ED3\u6784",children:[]}]},{level:2,title:"\u56DB\u3001\u6570\u7EC4",slug:"\u56DB\u3001\u6570\u7EC4",children:[{level:3,title:"\u4E00\u3001\u6982\u8FF0",slug:"\u4E00\u3001\u6982\u8FF0",children:[]},{level:3,title:"\u4E8C\u3001\u4E00\u7EF4\u6570\u7EC4\u7684\u4F7F\u7528",slug:"\u4E8C\u3001\u4E00\u7EF4\u6570\u7EC4\u7684\u4F7F\u7528",children:[]},{level:3,title:"\u4E09\u3001\u4E8C\u7EF4\u6570\u7EC4",slug:"\u4E09\u3001\u4E8C\u7EF4\u6570\u7EC4",children:[]}]},{level:2,title:"\u4E94\u3001\u9762\u5411\u5BF9\u8C61",slug:"\u4E94\u3001\u9762\u5411\u5BF9\u8C61",children:[{level:3,title:"\u4E00\u3001Java\u7C7B\u53CA\u7C7B\u7684\u6210\u5458",slug:"\u4E00\u3001java\u7C7B\u53CA\u7C7B\u7684\u6210\u5458",children:[{level:4,title:"\u65B9\u6CD5\u7684\u91CD\u8F7D",slug:"\u65B9\u6CD5\u7684\u91CD\u8F7D",children:[]},{level:4,title:"\u53EF\u53D8\u4E2A\u6570\u5F62\u53C2\u7684\u65B9\u6CD5",slug:"\u53EF\u53D8\u4E2A\u6570\u5F62\u53C2\u7684\u65B9\u6CD5",children:[]},{level:4,title:"\u65B9\u6CD5\u53C2\u6570\u7684\u503C\u4F20\u9012\u673A\u5236",slug:"\u65B9\u6CD5\u53C2\u6570\u7684\u503C\u4F20\u9012\u673A\u5236",children:[]},{level:4,title:"\u9012\u5F52\u65B9\u6CD5",slug:"\u9012\u5F52\u65B9\u6CD5",children:[]}]},{level:3,title:"\u4E8C\u3001\u9762\u5411\u5BF9\u8C61\u7684\u4E09\u5927\u7279\u5F81",slug:"\u4E8C\u3001\u9762\u5411\u5BF9\u8C61\u7684\u4E09\u5927\u7279\u5F81",children:[{level:4,title:"\u4E00\u3001\u5C01\u88C5\u6027",slug:"\u4E00\u3001\u5C01\u88C5\u6027",children:[]},{level:4,title:"\u4E8C\u3001\u7EE7\u627F",slug:"\u4E8C\u3001\u7EE7\u627F",children:[]},{level:4,title:"\u4E09\u3001\u591A\u6001\u6027",slug:"\u4E09\u3001\u591A\u6001\u6027",children:[]}]},{level:3,title:"\u4E09\u3001\u5176\u5B83\u5173\u952E\u5B57",slug:"\u4E09\u3001\u5176\u5B83\u5173\u952E\u5B57",children:[{level:4,title:"this",slug:"this",children:[]},{level:4,title:"package\u3001import",slug:"package\u3001import",children:[]},{level:4,title:"final",slug:"final",children:[]}]},{level:3,title:"\u56DB\u3001Object\u7C7B\u7684\u4F7F\u7528",slug:"\u56DB\u3001object\u7C7B\u7684\u4F7F\u7528",children:[]},{level:3,title:"\u4E94\u3001\u5305\u88C5\u7C7B\u7684\u4F7F\u7528",slug:"\u4E94\u3001\u5305\u88C5\u7C7B\u7684\u4F7F\u7528",children:[]},{level:3,title:"\u516D\u3001static",slug:"\u516D\u3001static",children:[]},{level:3,title:"\u4E03\u3001\u4EE3\u7801\u5757",slug:"\u4E03\u3001\u4EE3\u7801\u5757",children:[]},{level:3,title:"\u516B\u3001\u62BD\u8C61\u7C7B\u4E0E\u62BD\u8C61\u65B9\u6CD5",slug:"\u516B\u3001\u62BD\u8C61\u7C7B\u4E0E\u62BD\u8C61\u65B9\u6CD5",children:[]},{level:3,title:"\u4E5D\u3001\u63A5\u53E3",slug:"\u4E5D\u3001\u63A5\u53E3",children:[]},{level:3,title:"\u5341\u3001\u5185\u90E8\u7C7B",slug:"\u5341\u3001\u5185\u90E8\u7C7B",children:[]}]},{level:2,title:"\u516D\u3001\u5F02\u5E38",slug:"\u516D\u3001\u5F02\u5E38",children:[]},{level:2,title:"\u4E03\u3001\u591A\u7EBF\u7A0B",slug:"\u4E03\u3001\u591A\u7EBF\u7A0B",children:[]},{level:2,title:"\u516B\u3001\u5E38\u7528\u7C7B",slug:"\u516B\u3001\u5E38\u7528\u7C7B",children:[{level:3,title:"String\u3001StringBuffer\u3001StringBuilder",slug:"string\u3001stringbuffer\u3001stringbuilder",children:[]},{level:3,title:"\u65E5\u671F\u3001\u65F6\u95F4",slug:"\u65E5\u671F\u3001\u65F6\u95F4",children:[]},{level:3,title:"Java\u6BD4\u8F83\u5668",slug:"java\u6BD4\u8F83\u5668",children:[]}]},{level:2,title:"\u4E5D\u3001\u679A\u4E3E\u7C7B\u4E0E\u6CE8\u89E3",slug:"\u4E5D\u3001\u679A\u4E3E\u7C7B\u4E0E\u6CE8\u89E3",children:[{level:3,title:"\u679A\u4E3E\u7C7B\u7684\u4F7F\u7528",slug:"\u679A\u4E3E\u7C7B\u7684\u4F7F\u7528",children:[]},{level:3,title:"\u6CE8\u89E3(Annotation)",slug:"\u6CE8\u89E3-annotation",children:[]}]},{level:2,title:"\u5341\u3001\u96C6\u5408",slug:"\u5341\u3001\u96C6\u5408",children:[{level:3,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-1",children:[]},{level:3,title:"\u96C6\u5408\u6846\u67B6",slug:"\u96C6\u5408\u6846\u67B6",children:[]},{level:3,title:"Collection\u63A5\u53E3\u4E2D\u7684\u65B9\u6CD5\u7684\u4F7F\u7528",slug:"collection\u63A5\u53E3\u4E2D\u7684\u65B9\u6CD5\u7684\u4F7F\u7528",children:[]},{level:3,title:"Collection\u63A5\u53E3\u7684\u5B50\u63A5\u53E3--List\u63A5\u53E3",slug:"collection\u63A5\u53E3\u7684\u5B50\u63A5\u53E3-list\u63A5\u53E3",children:[]},{level:3,title:"Collection\u7684\u5B50\u63A5\u53E3\u4E4B\u4E8C\uFF1ASet\u63A5\u53E3",slug:"collection\u7684\u5B50\u63A5\u53E3\u4E4B\u4E8C-set\u63A5\u53E3",children:[]},{level:3,title:"Map\u63A5\u53E3",slug:"map\u63A5\u53E3",children:[]},{level:3,title:"Collections\u5DE5\u5177\u7C7B",slug:"collections\u5DE5\u5177\u7C7B",children:[]},{level:3,title:"java\u6570\u636E\u7ED3\u6784",slug:"java\u6570\u636E\u7ED3\u6784",children:[]}]},{level:2,title:"\u5341\u4E00\u3001\u6CDB\u578B",slug:"\u5341\u4E00\u3001\u6CDB\u578B",children:[]},{level:2,title:"\u5341\u4E8C\u3001IO\u6D41",slug:"\u5341\u4E8C\u3001io\u6D41",children:[{level:3,title:"File\u7C7B\u7684\u4F7F\u7528",slug:"file\u7C7B\u7684\u4F7F\u7528",children:[]},{level:3,title:"IO\u6D41\u539F\u7406\u53CA\u6D41\u7684\u5206\u7C7B",slug:"io\u6D41\u539F\u7406\u53CA\u6D41\u7684\u5206\u7C7B",children:[]}]},{level:2,title:"\u5341\u4E09\u3001\u7F51\u7EDC\u7F16\u7A0B",slug:"\u5341\u4E09\u3001\u7F51\u7EDC\u7F16\u7A0B",children:[{level:3,title:"\u7F51\u7EDC\u7F16\u7A0B\u6982\u8FF0",slug:"\u7F51\u7EDC\u7F16\u7A0B\u6982\u8FF0",children:[]},{level:3,title:"IP\u548C\u7AEF\u53E3\u53F7",slug:"ip\u548C\u7AEF\u53E3\u53F7",children:[]},{level:3,title:"\u7F51\u7EDC\u534F\u8BAE",slug:"\u7F51\u7EDC\u534F\u8BAE",children:[]},{level:3,title:"TCP\u7F51\u7EDC\u7F16\u7A0B",slug:"tcp\u7F51\u7EDC\u7F16\u7A0B",children:[]},{level:3,title:"UDP\u7F51\u7EDC\u7F16\u7A0B",slug:"udp\u7F51\u7EDC\u7F16\u7A0B",children:[]},{level:3,title:"URL\u7F16\u7A0B",slug:"url\u7F16\u7A0B",children:[]}]},{level:2,title:"\u5341\u56DB\u3001\u53CD\u5C04",slug:"\u5341\u56DB\u3001\u53CD\u5C04",children:[{level:3,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-2",children:[]},{level:3,title:"\u521B\u5EFA\u8FD0\u884C\u65F6\u7C7B\u7684\u5BF9\u8C61",slug:"\u521B\u5EFA\u8FD0\u884C\u65F6\u7C7B\u7684\u5BF9\u8C61",children:[]},{level:3,title:"\u52A8\u6001\u4EE3\u7406",slug:"\u52A8\u6001\u4EE3\u7406",children:[]}]},{level:2,title:"\u6CE8\u610F",slug:"\u6CE8\u610F",children:[]}],git:{updatedTime:1710173784e3,contributors:[{name:"shailene",email:"64005626+shaileneF@users.noreply.github.com",commits:1}]},filePathRelative:"java/Java\u57FA\u7840/Java\u7B14\u8BB0/Java\u7B14\u8BB0.md"};export{l as data};
                    diff --git a/assets/Layout.9eb27800.js b/assets/Layout.179ef6b3.js
                    similarity index 99%
                    rename from assets/Layout.9eb27800.js
                    rename to assets/Layout.179ef6b3.js
                    index 3b6b2c0f..afb9482f 100644
                    --- a/assets/Layout.9eb27800.js
                    +++ b/assets/Layout.179ef6b3.js
                    @@ -1 +1 @@
                    -var De=Object.defineProperty,Ie=Object.defineProperties;var He=Object.getOwnPropertyDescriptors;var de=Object.getOwnPropertySymbols;var Me=Object.prototype.hasOwnProperty,Pe=Object.prototype.propertyIsEnumerable;var pe=(l,t,e)=>t in l?De(l,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):l[t]=e,Y=(l,t)=>{for(var e in t||(t={}))Me.call(t,e)&&pe(l,e,t[e]);if(de)for(var e of de(t))Pe.call(t,e)&&pe(l,e,t[e]);return l},J=(l,t)=>Ie(l,He(t));import{_ as S,r as R,o as r,c,b as $,f as C,i as P,j as h,k as me,h as a,F as I,l as A,m as w,a as g,t as x,n as z,p as Q,q as T,w as N,s as he,v as y,d as j,x as X,y as Ee,z as Re,A as Ae,B as Z,C as ee,D as K,E as fe,G as be,H as E,u as ge,g as D,T as ke,I as O,J as $e,K as q,L as G,M as Fe,N as Oe,O as te,P as Le,Q as ye,e as ze,R as we,S as We,U,V as ae,W as Ve,X as Ue,Y as je,Z as Ke}from"./app.0d029894.js";const qe={},Ge={class:"theme-default-content custom"};function Xe(l,t){const e=R("Content");return r(),c("div",Ge,[$(e)])}var Ye=S(qe,[["render",Xe],["__file","HomeContent.vue"]]);const Je={key:0,class:"features"},Qe=C({name:"HomeFeatures",setup(l){const t=P(),e=h(()=>me(t.value.features)?t.value.features:[]);return(i,o)=>a(e).length?(r(),c("div",Je,[(r(!0),c(I,null,A(a(e),d=>(r(),c("div",{key:d.title,class:"feature"},[g("h2",null,x(d.title),1),g("p",null,x(d.details),1)]))),128))])):w("",!0)}});var Ze=S(Qe,[["__file","HomeFeatures.vue"]]);const et=["innerHTML"],tt=["textContent"],at=C({name:"HomeFooter",setup(l){const t=P(),e=h(()=>t.value.footer),i=h(()=>t.value.footerHtml);return(o,d)=>a(e)?(r(),c(I,{key:0},[a(i)?(r(),c("div",{key:0,class:"footer",innerHTML:a(e)},null,8,et)):(r(),c("div",{key:1,class:"footer",textContent:x(a(e))},null,8,tt))],64)):w("",!0)}});var nt=S(at,[["__file","HomeFooter.vue"]]);const rt=["href","rel","target","aria-label"],ot=C({inheritAttrs:!1}),st=C(J(Y({},ot),{name:"AutoLink",props:{item:{type:Object,required:!0}},setup(l){const t=l,e=z(),i=Ae(),{item:o}=Q(t),d=h(()=>X(o.value.link)),m=h(()=>Ee(o.value.link)||Re(o.value.link)),_=h(()=>{if(!m.value){if(o.value.target)return o.value.target;if(d.value)return"_blank"}}),n=h(()=>_.value==="_blank"),s=h(()=>!d.value&&!m.value&&!n.value),u=h(()=>{if(!m.value){if(o.value.rel)return o.value.rel;if(n.value)return"noopener noreferrer"}}),v=h(()=>o.value.ariaLabel||o.value.text),p=h(()=>{const L=Object.keys(i.value.locales);return L.length?!L.some(f=>f===o.value.link):o.value.link!=="/"}),b=h(()=>p.value?e.path.startsWith(o.value.link):!1),k=h(()=>s.value?o.value.activeMatch?new RegExp(o.value.activeMatch).test(e.path):b.value:!1);return(L,f)=>{const B=R("RouterLink"),H=R("AutoLinkExternalIcon");return a(s)?(r(),T(B,he({key:0,class:{"router-link-active":a(k)},to:a(o).link,"aria-label":a(v)},L.$attrs),{default:N(()=>[y(L.$slots,"before"),j(" "+x(a(o).text)+" ",1),y(L.$slots,"after")]),_:3},16,["class","to","aria-label"])):(r(),c("a",he({key:1,class:"external-link",href:a(o).link,rel:a(u),target:a(_),"aria-label":a(v)},L.$attrs),[y(L.$slots,"before"),j(" "+x(a(o).text)+" ",1),a(n)?(r(),T(H,{key:0})):w("",!0),y(L.$slots,"after")],16,rt))}}}));var M=S(st,[["__file","AutoLink.vue"]]);const lt={class:"hero"},ut={key:0,id:"main-title"},it={key:1,class:"description"},ct={key:2,class:"actions"},vt=C({name:"HomeHero",setup(l){const t=P(),e=Z(),i=ee(),o=h(()=>i.value&&t.value.heroImageDark!==void 0?t.value.heroImageDark:t.value.heroImage),d=h(()=>t.value.heroText===null?null:t.value.heroText||e.value.title||"Hello"),m=h(()=>t.value.heroAlt||d.value||"hero"),_=h(()=>t.value.tagline===null?null:t.value.tagline||e.value.description||"Welcome to your VuePress site"),n=h(()=>me(t.value.actions)?t.value.actions.map(({text:u,link:v,type:p="primary"})=>({text:u,link:v,type:p})):[]),s=()=>{if(!o.value)return null;const u=K("img",{src:fe(o.value),alt:m.value});return t.value.heroImageDark===void 0?u:K(be,()=>u)};return(u,v)=>(r(),c("header",lt,[$(s),a(d)?(r(),c("h1",ut,x(a(d)),1)):w("",!0),a(_)?(r(),c("p",it,x(a(_)),1)):w("",!0),a(n).length?(r(),c("p",ct,[(r(!0),c(I,null,A(a(n),p=>(r(),T(M,{key:p.text,class:E(["action-button",[p.type]]),item:p},null,8,["class","item"]))),128))])):w("",!0)]))}});var dt=S(vt,[["__file","HomeHero.vue"]]);const pt={class:"home"},ht=C({name:"Home",setup(l){return(t,e)=>(r(),c("main",pt,[$(dt),$(Ze),$(Ye),$(nt)]))}});var _t=S(ht,[["__file","Home.vue"]]);const mt=C({name:"NavbarBrand",setup(l){const t=ge(),e=Z(),i=D(),o=ee(),d=h(()=>i.value.home||t.value),m=h(()=>e.value.title),_=h(()=>o.value&&i.value.logoDark!==void 0?i.value.logoDark:i.value.logo),n=()=>{if(!_.value)return null;const s=K("img",{class:"logo",src:fe(_.value),alt:m.value});return i.value.logoDark===void 0?s:K(be,()=>s)};return(s,u)=>{const v=R("RouterLink");return r(),T(v,{to:a(d)},{default:N(()=>[$(n),a(m)?(r(),c("span",{key:0,class:E(["site-name",{"can-hide":a(_)}])},x(a(m)),3)):w("",!0)]),_:1},8,["to"])}}});var ft=S(mt,[["__file","NavbarBrand.vue"]]);const bt=C({name:"DropdownTransition",setup(l){const t=i=>{i.style.height=i.scrollHeight+"px"},e=i=>{i.style.height=""};return(i,o)=>(r(),T(ke,{name:"dropdown",onEnter:t,onAfterEnter:e,onBeforeLeave:t},{default:N(()=>[y(i.$slots,"default")]),_:3}))}});var Se=S(bt,[["__file","DropdownTransition.vue"]]);const gt=["aria-label"],kt={class:"title"},$t=g("span",{class:"arrow down"},null,-1),Lt=["aria-label"],yt={class:"title"},wt={class:"navbar-dropdown"},St={class:"navbar-dropdown-subtitle"},Ct={key:1},Tt={class:"navbar-dropdown-subitem-wrapper"},xt=C({name:"NavbarDropdown",props:{item:{type:Object,required:!0}},setup(l){const t=l,{item:e}=Q(t),i=h(()=>e.value.ariaLabel||e.value.text),o=O(!1),d=z();$e(()=>d.path,()=>{o.value=!1});const m=n=>{n.detail===0?o.value=!o.value:o.value=!1},_=(n,s)=>s[s.length-1]===n;return(n,s)=>(r(),c("div",{class:E(["navbar-dropdown-wrapper",{open:o.value}])},[g("button",{class:"navbar-dropdown-title",type:"button","aria-label":a(i),onClick:m},[g("span",kt,x(a(e).text),1),$t],8,gt),g("button",{class:"navbar-dropdown-title-mobile",type:"button","aria-label":a(i),onClick:s[0]||(s[0]=u=>o.value=!o.value)},[g("span",yt,x(a(e).text),1),g("span",{class:E(["arrow",o.value?"down":"right"])},null,2)],8,Lt),$(Se,null,{default:N(()=>[q(g("ul",wt,[(r(!0),c(I,null,A(a(e).children,u=>(r(),c("li",{key:u.text,class:"navbar-dropdown-item"},[u.children?(r(),c(I,{key:0},[g("h4",St,[u.link?(r(),T(M,{key:0,item:u,onFocusout:v=>_(u,a(e).children)&&u.children.length===0&&(o.value=!1)},null,8,["item","onFocusout"])):(r(),c("span",Ct,x(u.text),1))]),g("ul",Tt,[(r(!0),c(I,null,A(u.children,v=>(r(),c("li",{key:v.link,class:"navbar-dropdown-subitem"},[$(M,{item:v,onFocusout:p=>_(v,u.children)&&_(u,a(e).children)&&(o.value=!1)},null,8,["item","onFocusout"])]))),128))])],64)):(r(),T(M,{key:1,item:u,onFocusout:v=>_(u,a(e).children)&&(o.value=!1)},null,8,["item","onFocusout"]))]))),128))],512),[[G,o.value]])]),_:1})],2))}});var Bt=S(xt,[["__file","NavbarDropdown.vue"]]);const _e=l=>decodeURI(l).replace(/#.*$/,"").replace(/(index)?\.(md|html)$/,""),Nt=(l,t)=>{if(t.hash===l)return!0;const e=_e(t.path),i=_e(l);return e===i},Ce=(l,t)=>l.link&&Nt(l.link,t)?!0:l.children?l.children.some(e=>Ce(e,t)):!1,Te=l=>!X(l)||/github\.com/.test(l)?"GitHub":/bitbucket\.org/.test(l)?"Bitbucket":/gitlab\.com/.test(l)?"GitLab":/gitee\.com/.test(l)?"Gitee":null,Dt={GitHub:":repo/edit/:branch/:path",GitLab:":repo/-/edit/:branch/:path",Gitee:":repo/edit/:branch/:path",Bitbucket:":repo/src/:branch/:path?mode=edit&spa=0&at=:branch&fileviewer=file-view-default"},It=({docsRepo:l,editLinkPattern:t})=>{if(t)return t;const e=Te(l);return e!==null?Dt[e]:null},Ht=({docsRepo:l,docsBranch:t,docsDir:e,filePathRelative:i,editLinkPattern:o})=>{if(!i)return null;const d=It({docsRepo:l,editLinkPattern:o});return d?d.replace(/:repo/,X(l)?l:`https://github.com/${l}`).replace(/:branch/,t).replace(/:path/,Fe(`${Oe(e)}/${i}`)):null},Mt={key:0,class:"navbar-items"},Pt=C({name:"NavbarItems",setup(l){const t=()=>{const s=te(),u=ge(),v=Z(),p=D();return h(()=>{var B,H;const b=Object.keys(v.value.locales);if(b.length<2)return[];const k=s.currentRoute.value.path,L=s.currentRoute.value.fullPath;return[{text:(B=p.value.selectLanguageText)!=null?B:"unknown language",ariaLabel:(H=p.value.selectLanguageAriaLabel)!=null?H:"unkown language",children:b.map(F=>{var oe,se,le,ue,ie,ce;const W=(se=(oe=v.value.locales)==null?void 0:oe[F])!=null?se:{},ne=(ue=(le=p.value.locales)==null?void 0:le[F])!=null?ue:{},re=`${W.lang}`,Be=(ie=ne.selectLanguageName)!=null?ie:re;let V;if(re===v.value.lang)V=L;else{const ve=k.replace(u.value,F);s.getRoutes().some(Ne=>Ne.path===ve)?V=ve:V=(ce=ne.home)!=null?ce:F}return{text:Be,link:V}})}]})},e=()=>{const s=D(),u=h(()=>s.value.repo),v=h(()=>u.value?Te(u.value):null),p=h(()=>u.value&&!X(u.value)?`https://github.com/${u.value}`:u.value),b=h(()=>p.value?s.value.repoLabel?s.value.repoLabel:v.value===null?"Source":v.value:null);return h(()=>!p.value||!b.value?[]:[{text:b.value,link:p.value}])},i=s=>Le(s)?ye(s):s.children?J(Y({},s),{children:s.children.map(i)}):s,d=(()=>{const s=D();return h(()=>(s.value.navbar||[]).map(i))})(),m=t(),_=e(),n=h(()=>[...d.value,...m.value,..._.value]);return(s,u)=>a(n).length?(r(),c("nav",Mt,[(r(!0),c(I,null,A(a(n),v=>(r(),c("div",{key:v.text,class:"navbar-item"},[v.children?(r(),T(Bt,{key:0,item:v},null,8,["item"])):(r(),T(M,{key:1,item:v},null,8,["item"]))]))),128))])):w("",!0)}});var xe=S(Pt,[["__file","NavbarItems.vue"]]);const Et=["title"],Rt={class:"icon",focusable:"false",viewBox:"0 0 32 32"},At=ze('',9),Ft=[At],Ot={class:"icon",focusable:"false",viewBox:"0 0 32 32"},zt=g("path",{d:"M13.502 5.414a15.075 15.075 0 0 0 11.594 18.194a11.113 11.113 0 0 1-7.975 3.39c-.138 0-.278.005-.418 0a11.094 11.094 0 0 1-3.2-21.584M14.98 3a1.002 1.002 0 0 0-.175.016a13.096 13.096 0 0 0 1.825 25.981c.164.006.328 0 .49 0a13.072 13.072 0 0 0 10.703-5.555a1.01 1.01 0 0 0-.783-1.565A13.08 13.08 0 0 1 15.89 4.38A1.015 1.015 0 0 0 14.98 3z",fill:"currentColor"},null,-1),Wt=[zt],Vt=C({name:"ToggleDarkModeButton",setup(l){const t=D(),e=ee(),i=()=>{e.value=!e.value};return(o,d)=>(r(),c("button",{class:"toggle-dark-button",title:a(t).toggleDarkMode,onClick:i},[q((r(),c("svg",Rt,Ft,512)),[[G,!a(e)]]),q((r(),c("svg",Ot,Wt,512)),[[G,a(e)]])],8,Et))}});var Ut=S(Vt,[["__file","ToggleDarkModeButton.vue"]]);const jt=["title"],Kt=g("div",{class:"icon","aria-hidden":"true"},[g("span"),g("span"),g("span")],-1),qt=[Kt],Gt=C({name:"ToggleSidebarButton",emits:["toggle"],setup(l){const t=D();return(e,i)=>(r(),c("div",{class:"toggle-sidebar-button",title:a(t).toggleSidebar,"aria-expanded":"false",role:"button",tabindex:"0",onClick:i[0]||(i[0]=o=>e.$emit("toggle"))},qt,8,jt))}});var Xt=S(Gt,[["__file","ToggleSidebarButton.vue"]]);const Yt=C({name:"Navbar",emits:["toggle-sidebar"],setup(l){const t=D(),e=O(null),i=O(null),o=O(0),d=h(()=>o.value?{maxWidth:o.value+"px"}:{}),m=h(()=>t.value.darkMode);we(()=>{const s=_(e.value,"paddingLeft")+_(e.value,"paddingRight"),u=()=>{var v;window.innerWidth<=719?o.value=0:o.value=e.value.offsetWidth-s-(((v=i.value)==null?void 0:v.offsetWidth)||0)};u(),window.addEventListener("resize",u,!1),window.addEventListener("orientationchange",u,!1)});function _(n,s){var p,b,k;const u=(k=(b=(p=n==null?void 0:n.ownerDocument)==null?void 0:p.defaultView)==null?void 0:b.getComputedStyle(n,null))==null?void 0:k[s],v=Number.parseInt(u,10);return Number.isNaN(v)?0:v}return(n,s)=>{const u=R("NavbarSearch");return r(),c("header",{ref_key:"navbar",ref:e,class:"navbar"},[$(Xt,{onToggle:s[0]||(s[0]=v=>n.$emit("toggle-sidebar"))}),g("span",{ref_key:"navbarBrand",ref:i},[$(ft)],512),g("div",{class:"navbar-items-wrapper",style:We(a(d))},[y(n.$slots,"before"),$(xe,{class:"can-hide"}),y(n.$slots,"after"),a(m)?(r(),T(Ut,{key:0})):w("",!0),$(u)],4)],512)}}});var Jt=S(Yt,[["__file","Navbar.vue"]]);const Qt={class:"page-meta"},Zt={key:0,class:"meta-item edit-link"},ea={key:1,class:"meta-item last-updated"},ta={class:"meta-item-label"},aa={class:"meta-item-info"},na={key:2,class:"meta-item contributors"},ra={class:"meta-item-label"},oa={class:"meta-item-info"},sa=["title"],la=j(", "),ua=C({name:"PageMeta",setup(l){const t=()=>{const n=D(),s=U(),u=P();return h(()=>{var H,F,W;if(!((F=(H=u.value.editLink)!=null?H:n.value.editLink)!=null?F:!0))return null;const{repo:p,docsRepo:b=p,docsBranch:k="main",docsDir:L="",editLinkText:f}=n.value;if(!b)return null;const B=Ht({docsRepo:b,docsBranch:k,docsDir:L,filePathRelative:s.value.filePathRelative,editLinkPattern:(W=u.value.editLinkPattern)!=null?W:n.value.editLinkPattern});return B?{text:f!=null?f:"Edit this page",link:B}:null})},e=()=>{const n=D(),s=U(),u=P();return h(()=>{var b,k,L,f;return!((k=(b=u.value.lastUpdated)!=null?b:n.value.lastUpdated)!=null?k:!0)||!((L=s.value.git)!=null&&L.updatedTime)?null:new Date((f=s.value.git)==null?void 0:f.updatedTime).toLocaleString()})},i=()=>{const n=D(),s=U(),u=P();return h(()=>{var p,b,k,L;return((b=(p=u.value.contributors)!=null?p:n.value.contributors)!=null?b:!0)&&(L=(k=s.value.git)==null?void 0:k.contributors)!=null?L:null})},o=D(),d=t(),m=e(),_=i();return(n,s)=>{const u=R("ClientOnly");return r(),c("footer",Qt,[a(d)?(r(),c("div",Zt,[$(M,{class:"meta-item-label",item:a(d)},null,8,["item"])])):w("",!0),a(m)?(r(),c("div",ea,[g("span",ta,x(a(o).lastUpdatedText)+": ",1),$(u,null,{default:N(()=>[g("span",aa,x(a(m)),1)]),_:1})])):w("",!0),a(_)&&a(_).length?(r(),c("div",na,[g("span",ra,x(a(o).contributorsText)+": ",1),g("span",oa,[(r(!0),c(I,null,A(a(_),(v,p)=>(r(),c(I,{key:p},[g("span",{class:"contributor",title:`email: ${v.email}`},x(v.name),9,sa),p!==a(_).length-1?(r(),c(I,{key:0},[la],64)):w("",!0)],64))),128))])])):w("",!0)])}}});var ia=S(ua,[["__file","PageMeta.vue"]]);const ca={key:0,class:"page-nav"},va={class:"inner"},da={key:0,class:"prev"},pa={key:1,class:"next"},ha=C({name:"PageNav",setup(l){const t=n=>n===!1?null:Le(n)?ye(n):Ve(n)?n:!1,e=(n,s,u)=>{const v=n.findIndex(p=>p.link===s);if(v!==-1){const p=n[v+u];return p!=null&&p.link?p:null}for(const p of n)if(p.children){const b=e(p.children,s,u);if(b)return b}return null},i=P(),o=ae(),d=z(),m=h(()=>{const n=t(i.value.prev);return n!==!1?n:e(o.value,d.path,-1)}),_=h(()=>{const n=t(i.value.next);return n!==!1?n:e(o.value,d.path,1)});return(n,s)=>a(m)||a(_)?(r(),c("nav",ca,[g("p",va,[a(m)?(r(),c("span",da,[$(M,{item:a(m)},null,8,["item"])])):w("",!0),a(_)?(r(),c("span",pa,[$(M,{item:a(_)},null,8,["item"])])):w("",!0)])])):w("",!0)}});var _a=S(ha,[["__file","PageNav.vue"]]);const ma={class:"page"},fa={class:"theme-default-content"},ba=C({name:"Page",setup(l){return(t,e)=>{const i=R("Content");return r(),c("main",ma,[y(t.$slots,"top"),g("div",fa,[$(i)]),$(ia),$(_a),y(t.$slots,"bottom")])}}});var ga=S(ba,[["__file","Page.vue"]]);const ka={class:"sidebar-item-children"},$a=C({name:"SidebarItem",props:{item:{type:Object,required:!0},depth:{type:Number,required:!1,default:0}},setup(l){const t=l,{item:e,depth:i}=Q(t),o=z(),d=te(),m=h(()=>Ce(e.value,o)),_=h(()=>({"sidebar-item":!0,"sidebar-heading":i.value===0,active:m.value,collapsible:e.value.collapsible})),n=O(!0),s=O(void 0);return e.value.collapsible&&(n.value=m.value,s.value=()=>{n.value=!n.value},d.afterEach(()=>{n.value=m.value})),(u,v)=>{var b;const p=R("SidebarItem",!0);return r(),c("li",null,[a(e).link?(r(),T(M,{key:0,class:E(a(_)),item:a(e)},null,8,["class","item"])):(r(),c("p",{key:1,tabindex:"0",class:E(a(_)),onClick:v[0]||(v[0]=(...k)=>s.value&&s.value(...k)),onKeydown:v[1]||(v[1]=Ue((...k)=>s.value&&s.value(...k),["enter"]))},[j(x(a(e).text)+" ",1),a(e).collapsible?(r(),c("span",{key:0,class:E(["arrow",n.value?"down":"right"])},null,2)):w("",!0)],34)),(b=a(e).children)!=null&&b.length?(r(),T(Se,{key:2},{default:N(()=>[q(g("ul",ka,[(r(!0),c(I,null,A(a(e).children,k=>(r(),T(p,{key:`${a(i)}${k.text}${k.link}`,item:k,depth:a(i)+1},null,8,["item","depth"]))),128))],512),[[G,n.value]])]),_:1})):w("",!0)])}}});var La=S($a,[["__file","SidebarItem.vue"]]);const ya={key:0,class:"sidebar-items"},wa=C({name:"SidebarItems",setup(l){const t=z(),e=ae();return $e(()=>t.hash,i=>{const o=document.querySelector(".sidebar");if(!o)return;const d=document.querySelector(`.sidebar a.sidebar-item[href="${t.path}${i}"]`);if(!d)return;const m=o.getBoundingClientRect().top,_=o.getBoundingClientRect().height,n=d.getBoundingClientRect().top,s=d.getBoundingClientRect().height;nm+_&&d.scrollIntoView(!1)}),(i,o)=>a(e).length?(r(),c("ul",ya,[(r(!0),c(I,null,A(a(e),d=>(r(),T(La,{key:d.link||d.text,item:d},null,8,["item"]))),128))])):w("",!0)}});var Sa=S(wa,[["__file","SidebarItems.vue"]]);const Ca={class:"sidebar"},Ta=C({name:"Sidebar",setup(l){return(t,e)=>(r(),c("aside",Ca,[$(xe),y(t.$slots,"top"),$(Sa),y(t.$slots,"bottom")]))}});var xa=S(Ta,[["__file","Sidebar.vue"]]);const Ba=C({name:"Layout",setup(l){const t=U(),e=P(),i=D(),o=h(()=>e.value.navbar!==!1&&i.value.navbar!==!1),d=ae(),m=O(!1),_=f=>{m.value=typeof f=="boolean"?f:!m.value},n={x:0,y:0},s=f=>{n.x=f.changedTouches[0].clientX,n.y=f.changedTouches[0].clientY},u=f=>{const B=f.changedTouches[0].clientX-n.x,H=f.changedTouches[0].clientY-n.y;Math.abs(B)>Math.abs(H)&&Math.abs(B)>40&&(B>0&&n.x<=80?_(!0):_(!1))},v=h(()=>[{"no-navbar":!o.value,"no-sidebar":!d.value.length,"sidebar-open":m.value},e.value.pageClass]);let p;we(()=>{p=te().afterEach(()=>{_(!1)})}),je(()=>{p()});const b=Ke(),k=b.resolve,L=b.pending;return(f,B)=>(r(),c("div",{class:E(["theme-container",a(v)]),onTouchstart:s,onTouchend:u},[y(f.$slots,"navbar",{},()=>[a(o)?(r(),T(Jt,{key:0,onToggleSidebar:_},{before:N(()=>[y(f.$slots,"navbar-before")]),after:N(()=>[y(f.$slots,"navbar-after")]),_:3})):w("",!0)]),g("div",{class:"sidebar-mask",onClick:B[0]||(B[0]=H=>_(!1))}),y(f.$slots,"sidebar",{},()=>[$(xa,null,{top:N(()=>[y(f.$slots,"sidebar-top")]),bottom:N(()=>[y(f.$slots,"sidebar-bottom")]),_:3})]),y(f.$slots,"page",{},()=>[a(e).home?(r(),T(_t,{key:0})):(r(),T(ke,{key:1,name:"fade-slide-y",mode:"out-in",onBeforeEnter:a(k),onBeforeLeave:a(L)},{default:N(()=>[(r(),T(ga,{key:a(t).path},{top:N(()=>[y(f.$slots,"page-top")]),bottom:N(()=>[y(f.$slots,"page-bottom")]),_:3}))]),_:3},8,["onBeforeEnter","onBeforeLeave"]))])],34))}});var Ia=S(Ba,[["__file","Layout.vue"]]);export{Ia as default};
                    +var De=Object.defineProperty,Ie=Object.defineProperties;var He=Object.getOwnPropertyDescriptors;var de=Object.getOwnPropertySymbols;var Me=Object.prototype.hasOwnProperty,Pe=Object.prototype.propertyIsEnumerable;var pe=(l,t,e)=>t in l?De(l,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):l[t]=e,Y=(l,t)=>{for(var e in t||(t={}))Me.call(t,e)&&pe(l,e,t[e]);if(de)for(var e of de(t))Pe.call(t,e)&&pe(l,e,t[e]);return l},J=(l,t)=>Ie(l,He(t));import{_ as S,r as R,o as r,c,b as $,f as C,i as P,j as h,k as me,h as a,F as I,l as A,m as w,a as g,t as x,n as z,p as Q,q as T,w as N,s as he,v as y,d as j,x as X,y as Ee,z as Re,A as Ae,B as Z,C as ee,D as K,E as fe,G as be,H as E,u as ge,g as D,T as ke,I as O,J as $e,K as q,L as G,M as Fe,N as Oe,O as te,P as Le,Q as ye,e as ze,R as we,S as We,U,V as ae,W as Ve,X as Ue,Y as je,Z as Ke}from"./app.f8791b52.js";const qe={},Ge={class:"theme-default-content custom"};function Xe(l,t){const e=R("Content");return r(),c("div",Ge,[$(e)])}var Ye=S(qe,[["render",Xe],["__file","HomeContent.vue"]]);const Je={key:0,class:"features"},Qe=C({name:"HomeFeatures",setup(l){const t=P(),e=h(()=>me(t.value.features)?t.value.features:[]);return(i,o)=>a(e).length?(r(),c("div",Je,[(r(!0),c(I,null,A(a(e),d=>(r(),c("div",{key:d.title,class:"feature"},[g("h2",null,x(d.title),1),g("p",null,x(d.details),1)]))),128))])):w("",!0)}});var Ze=S(Qe,[["__file","HomeFeatures.vue"]]);const et=["innerHTML"],tt=["textContent"],at=C({name:"HomeFooter",setup(l){const t=P(),e=h(()=>t.value.footer),i=h(()=>t.value.footerHtml);return(o,d)=>a(e)?(r(),c(I,{key:0},[a(i)?(r(),c("div",{key:0,class:"footer",innerHTML:a(e)},null,8,et)):(r(),c("div",{key:1,class:"footer",textContent:x(a(e))},null,8,tt))],64)):w("",!0)}});var nt=S(at,[["__file","HomeFooter.vue"]]);const rt=["href","rel","target","aria-label"],ot=C({inheritAttrs:!1}),st=C(J(Y({},ot),{name:"AutoLink",props:{item:{type:Object,required:!0}},setup(l){const t=l,e=z(),i=Ae(),{item:o}=Q(t),d=h(()=>X(o.value.link)),m=h(()=>Ee(o.value.link)||Re(o.value.link)),_=h(()=>{if(!m.value){if(o.value.target)return o.value.target;if(d.value)return"_blank"}}),n=h(()=>_.value==="_blank"),s=h(()=>!d.value&&!m.value&&!n.value),u=h(()=>{if(!m.value){if(o.value.rel)return o.value.rel;if(n.value)return"noopener noreferrer"}}),v=h(()=>o.value.ariaLabel||o.value.text),p=h(()=>{const L=Object.keys(i.value.locales);return L.length?!L.some(f=>f===o.value.link):o.value.link!=="/"}),b=h(()=>p.value?e.path.startsWith(o.value.link):!1),k=h(()=>s.value?o.value.activeMatch?new RegExp(o.value.activeMatch).test(e.path):b.value:!1);return(L,f)=>{const B=R("RouterLink"),H=R("AutoLinkExternalIcon");return a(s)?(r(),T(B,he({key:0,class:{"router-link-active":a(k)},to:a(o).link,"aria-label":a(v)},L.$attrs),{default:N(()=>[y(L.$slots,"before"),j(" "+x(a(o).text)+" ",1),y(L.$slots,"after")]),_:3},16,["class","to","aria-label"])):(r(),c("a",he({key:1,class:"external-link",href:a(o).link,rel:a(u),target:a(_),"aria-label":a(v)},L.$attrs),[y(L.$slots,"before"),j(" "+x(a(o).text)+" ",1),a(n)?(r(),T(H,{key:0})):w("",!0),y(L.$slots,"after")],16,rt))}}}));var M=S(st,[["__file","AutoLink.vue"]]);const lt={class:"hero"},ut={key:0,id:"main-title"},it={key:1,class:"description"},ct={key:2,class:"actions"},vt=C({name:"HomeHero",setup(l){const t=P(),e=Z(),i=ee(),o=h(()=>i.value&&t.value.heroImageDark!==void 0?t.value.heroImageDark:t.value.heroImage),d=h(()=>t.value.heroText===null?null:t.value.heroText||e.value.title||"Hello"),m=h(()=>t.value.heroAlt||d.value||"hero"),_=h(()=>t.value.tagline===null?null:t.value.tagline||e.value.description||"Welcome to your VuePress site"),n=h(()=>me(t.value.actions)?t.value.actions.map(({text:u,link:v,type:p="primary"})=>({text:u,link:v,type:p})):[]),s=()=>{if(!o.value)return null;const u=K("img",{src:fe(o.value),alt:m.value});return t.value.heroImageDark===void 0?u:K(be,()=>u)};return(u,v)=>(r(),c("header",lt,[$(s),a(d)?(r(),c("h1",ut,x(a(d)),1)):w("",!0),a(_)?(r(),c("p",it,x(a(_)),1)):w("",!0),a(n).length?(r(),c("p",ct,[(r(!0),c(I,null,A(a(n),p=>(r(),T(M,{key:p.text,class:E(["action-button",[p.type]]),item:p},null,8,["class","item"]))),128))])):w("",!0)]))}});var dt=S(vt,[["__file","HomeHero.vue"]]);const pt={class:"home"},ht=C({name:"Home",setup(l){return(t,e)=>(r(),c("main",pt,[$(dt),$(Ze),$(Ye),$(nt)]))}});var _t=S(ht,[["__file","Home.vue"]]);const mt=C({name:"NavbarBrand",setup(l){const t=ge(),e=Z(),i=D(),o=ee(),d=h(()=>i.value.home||t.value),m=h(()=>e.value.title),_=h(()=>o.value&&i.value.logoDark!==void 0?i.value.logoDark:i.value.logo),n=()=>{if(!_.value)return null;const s=K("img",{class:"logo",src:fe(_.value),alt:m.value});return i.value.logoDark===void 0?s:K(be,()=>s)};return(s,u)=>{const v=R("RouterLink");return r(),T(v,{to:a(d)},{default:N(()=>[$(n),a(m)?(r(),c("span",{key:0,class:E(["site-name",{"can-hide":a(_)}])},x(a(m)),3)):w("",!0)]),_:1},8,["to"])}}});var ft=S(mt,[["__file","NavbarBrand.vue"]]);const bt=C({name:"DropdownTransition",setup(l){const t=i=>{i.style.height=i.scrollHeight+"px"},e=i=>{i.style.height=""};return(i,o)=>(r(),T(ke,{name:"dropdown",onEnter:t,onAfterEnter:e,onBeforeLeave:t},{default:N(()=>[y(i.$slots,"default")]),_:3}))}});var Se=S(bt,[["__file","DropdownTransition.vue"]]);const gt=["aria-label"],kt={class:"title"},$t=g("span",{class:"arrow down"},null,-1),Lt=["aria-label"],yt={class:"title"},wt={class:"navbar-dropdown"},St={class:"navbar-dropdown-subtitle"},Ct={key:1},Tt={class:"navbar-dropdown-subitem-wrapper"},xt=C({name:"NavbarDropdown",props:{item:{type:Object,required:!0}},setup(l){const t=l,{item:e}=Q(t),i=h(()=>e.value.ariaLabel||e.value.text),o=O(!1),d=z();$e(()=>d.path,()=>{o.value=!1});const m=n=>{n.detail===0?o.value=!o.value:o.value=!1},_=(n,s)=>s[s.length-1]===n;return(n,s)=>(r(),c("div",{class:E(["navbar-dropdown-wrapper",{open:o.value}])},[g("button",{class:"navbar-dropdown-title",type:"button","aria-label":a(i),onClick:m},[g("span",kt,x(a(e).text),1),$t],8,gt),g("button",{class:"navbar-dropdown-title-mobile",type:"button","aria-label":a(i),onClick:s[0]||(s[0]=u=>o.value=!o.value)},[g("span",yt,x(a(e).text),1),g("span",{class:E(["arrow",o.value?"down":"right"])},null,2)],8,Lt),$(Se,null,{default:N(()=>[q(g("ul",wt,[(r(!0),c(I,null,A(a(e).children,u=>(r(),c("li",{key:u.text,class:"navbar-dropdown-item"},[u.children?(r(),c(I,{key:0},[g("h4",St,[u.link?(r(),T(M,{key:0,item:u,onFocusout:v=>_(u,a(e).children)&&u.children.length===0&&(o.value=!1)},null,8,["item","onFocusout"])):(r(),c("span",Ct,x(u.text),1))]),g("ul",Tt,[(r(!0),c(I,null,A(u.children,v=>(r(),c("li",{key:v.link,class:"navbar-dropdown-subitem"},[$(M,{item:v,onFocusout:p=>_(v,u.children)&&_(u,a(e).children)&&(o.value=!1)},null,8,["item","onFocusout"])]))),128))])],64)):(r(),T(M,{key:1,item:u,onFocusout:v=>_(u,a(e).children)&&(o.value=!1)},null,8,["item","onFocusout"]))]))),128))],512),[[G,o.value]])]),_:1})],2))}});var Bt=S(xt,[["__file","NavbarDropdown.vue"]]);const _e=l=>decodeURI(l).replace(/#.*$/,"").replace(/(index)?\.(md|html)$/,""),Nt=(l,t)=>{if(t.hash===l)return!0;const e=_e(t.path),i=_e(l);return e===i},Ce=(l,t)=>l.link&&Nt(l.link,t)?!0:l.children?l.children.some(e=>Ce(e,t)):!1,Te=l=>!X(l)||/github\.com/.test(l)?"GitHub":/bitbucket\.org/.test(l)?"Bitbucket":/gitlab\.com/.test(l)?"GitLab":/gitee\.com/.test(l)?"Gitee":null,Dt={GitHub:":repo/edit/:branch/:path",GitLab:":repo/-/edit/:branch/:path",Gitee:":repo/edit/:branch/:path",Bitbucket:":repo/src/:branch/:path?mode=edit&spa=0&at=:branch&fileviewer=file-view-default"},It=({docsRepo:l,editLinkPattern:t})=>{if(t)return t;const e=Te(l);return e!==null?Dt[e]:null},Ht=({docsRepo:l,docsBranch:t,docsDir:e,filePathRelative:i,editLinkPattern:o})=>{if(!i)return null;const d=It({docsRepo:l,editLinkPattern:o});return d?d.replace(/:repo/,X(l)?l:`https://github.com/${l}`).replace(/:branch/,t).replace(/:path/,Fe(`${Oe(e)}/${i}`)):null},Mt={key:0,class:"navbar-items"},Pt=C({name:"NavbarItems",setup(l){const t=()=>{const s=te(),u=ge(),v=Z(),p=D();return h(()=>{var B,H;const b=Object.keys(v.value.locales);if(b.length<2)return[];const k=s.currentRoute.value.path,L=s.currentRoute.value.fullPath;return[{text:(B=p.value.selectLanguageText)!=null?B:"unknown language",ariaLabel:(H=p.value.selectLanguageAriaLabel)!=null?H:"unkown language",children:b.map(F=>{var oe,se,le,ue,ie,ce;const W=(se=(oe=v.value.locales)==null?void 0:oe[F])!=null?se:{},ne=(ue=(le=p.value.locales)==null?void 0:le[F])!=null?ue:{},re=`${W.lang}`,Be=(ie=ne.selectLanguageName)!=null?ie:re;let V;if(re===v.value.lang)V=L;else{const ve=k.replace(u.value,F);s.getRoutes().some(Ne=>Ne.path===ve)?V=ve:V=(ce=ne.home)!=null?ce:F}return{text:Be,link:V}})}]})},e=()=>{const s=D(),u=h(()=>s.value.repo),v=h(()=>u.value?Te(u.value):null),p=h(()=>u.value&&!X(u.value)?`https://github.com/${u.value}`:u.value),b=h(()=>p.value?s.value.repoLabel?s.value.repoLabel:v.value===null?"Source":v.value:null);return h(()=>!p.value||!b.value?[]:[{text:b.value,link:p.value}])},i=s=>Le(s)?ye(s):s.children?J(Y({},s),{children:s.children.map(i)}):s,d=(()=>{const s=D();return h(()=>(s.value.navbar||[]).map(i))})(),m=t(),_=e(),n=h(()=>[...d.value,...m.value,..._.value]);return(s,u)=>a(n).length?(r(),c("nav",Mt,[(r(!0),c(I,null,A(a(n),v=>(r(),c("div",{key:v.text,class:"navbar-item"},[v.children?(r(),T(Bt,{key:0,item:v},null,8,["item"])):(r(),T(M,{key:1,item:v},null,8,["item"]))]))),128))])):w("",!0)}});var xe=S(Pt,[["__file","NavbarItems.vue"]]);const Et=["title"],Rt={class:"icon",focusable:"false",viewBox:"0 0 32 32"},At=ze('',9),Ft=[At],Ot={class:"icon",focusable:"false",viewBox:"0 0 32 32"},zt=g("path",{d:"M13.502 5.414a15.075 15.075 0 0 0 11.594 18.194a11.113 11.113 0 0 1-7.975 3.39c-.138 0-.278.005-.418 0a11.094 11.094 0 0 1-3.2-21.584M14.98 3a1.002 1.002 0 0 0-.175.016a13.096 13.096 0 0 0 1.825 25.981c.164.006.328 0 .49 0a13.072 13.072 0 0 0 10.703-5.555a1.01 1.01 0 0 0-.783-1.565A13.08 13.08 0 0 1 15.89 4.38A1.015 1.015 0 0 0 14.98 3z",fill:"currentColor"},null,-1),Wt=[zt],Vt=C({name:"ToggleDarkModeButton",setup(l){const t=D(),e=ee(),i=()=>{e.value=!e.value};return(o,d)=>(r(),c("button",{class:"toggle-dark-button",title:a(t).toggleDarkMode,onClick:i},[q((r(),c("svg",Rt,Ft,512)),[[G,!a(e)]]),q((r(),c("svg",Ot,Wt,512)),[[G,a(e)]])],8,Et))}});var Ut=S(Vt,[["__file","ToggleDarkModeButton.vue"]]);const jt=["title"],Kt=g("div",{class:"icon","aria-hidden":"true"},[g("span"),g("span"),g("span")],-1),qt=[Kt],Gt=C({name:"ToggleSidebarButton",emits:["toggle"],setup(l){const t=D();return(e,i)=>(r(),c("div",{class:"toggle-sidebar-button",title:a(t).toggleSidebar,"aria-expanded":"false",role:"button",tabindex:"0",onClick:i[0]||(i[0]=o=>e.$emit("toggle"))},qt,8,jt))}});var Xt=S(Gt,[["__file","ToggleSidebarButton.vue"]]);const Yt=C({name:"Navbar",emits:["toggle-sidebar"],setup(l){const t=D(),e=O(null),i=O(null),o=O(0),d=h(()=>o.value?{maxWidth:o.value+"px"}:{}),m=h(()=>t.value.darkMode);we(()=>{const s=_(e.value,"paddingLeft")+_(e.value,"paddingRight"),u=()=>{var v;window.innerWidth<=719?o.value=0:o.value=e.value.offsetWidth-s-(((v=i.value)==null?void 0:v.offsetWidth)||0)};u(),window.addEventListener("resize",u,!1),window.addEventListener("orientationchange",u,!1)});function _(n,s){var p,b,k;const u=(k=(b=(p=n==null?void 0:n.ownerDocument)==null?void 0:p.defaultView)==null?void 0:b.getComputedStyle(n,null))==null?void 0:k[s],v=Number.parseInt(u,10);return Number.isNaN(v)?0:v}return(n,s)=>{const u=R("NavbarSearch");return r(),c("header",{ref_key:"navbar",ref:e,class:"navbar"},[$(Xt,{onToggle:s[0]||(s[0]=v=>n.$emit("toggle-sidebar"))}),g("span",{ref_key:"navbarBrand",ref:i},[$(ft)],512),g("div",{class:"navbar-items-wrapper",style:We(a(d))},[y(n.$slots,"before"),$(xe,{class:"can-hide"}),y(n.$slots,"after"),a(m)?(r(),T(Ut,{key:0})):w("",!0),$(u)],4)],512)}}});var Jt=S(Yt,[["__file","Navbar.vue"]]);const Qt={class:"page-meta"},Zt={key:0,class:"meta-item edit-link"},ea={key:1,class:"meta-item last-updated"},ta={class:"meta-item-label"},aa={class:"meta-item-info"},na={key:2,class:"meta-item contributors"},ra={class:"meta-item-label"},oa={class:"meta-item-info"},sa=["title"],la=j(", "),ua=C({name:"PageMeta",setup(l){const t=()=>{const n=D(),s=U(),u=P();return h(()=>{var H,F,W;if(!((F=(H=u.value.editLink)!=null?H:n.value.editLink)!=null?F:!0))return null;const{repo:p,docsRepo:b=p,docsBranch:k="main",docsDir:L="",editLinkText:f}=n.value;if(!b)return null;const B=Ht({docsRepo:b,docsBranch:k,docsDir:L,filePathRelative:s.value.filePathRelative,editLinkPattern:(W=u.value.editLinkPattern)!=null?W:n.value.editLinkPattern});return B?{text:f!=null?f:"Edit this page",link:B}:null})},e=()=>{const n=D(),s=U(),u=P();return h(()=>{var b,k,L,f;return!((k=(b=u.value.lastUpdated)!=null?b:n.value.lastUpdated)!=null?k:!0)||!((L=s.value.git)!=null&&L.updatedTime)?null:new Date((f=s.value.git)==null?void 0:f.updatedTime).toLocaleString()})},i=()=>{const n=D(),s=U(),u=P();return h(()=>{var p,b,k,L;return((b=(p=u.value.contributors)!=null?p:n.value.contributors)!=null?b:!0)&&(L=(k=s.value.git)==null?void 0:k.contributors)!=null?L:null})},o=D(),d=t(),m=e(),_=i();return(n,s)=>{const u=R("ClientOnly");return r(),c("footer",Qt,[a(d)?(r(),c("div",Zt,[$(M,{class:"meta-item-label",item:a(d)},null,8,["item"])])):w("",!0),a(m)?(r(),c("div",ea,[g("span",ta,x(a(o).lastUpdatedText)+": ",1),$(u,null,{default:N(()=>[g("span",aa,x(a(m)),1)]),_:1})])):w("",!0),a(_)&&a(_).length?(r(),c("div",na,[g("span",ra,x(a(o).contributorsText)+": ",1),g("span",oa,[(r(!0),c(I,null,A(a(_),(v,p)=>(r(),c(I,{key:p},[g("span",{class:"contributor",title:`email: ${v.email}`},x(v.name),9,sa),p!==a(_).length-1?(r(),c(I,{key:0},[la],64)):w("",!0)],64))),128))])])):w("",!0)])}}});var ia=S(ua,[["__file","PageMeta.vue"]]);const ca={key:0,class:"page-nav"},va={class:"inner"},da={key:0,class:"prev"},pa={key:1,class:"next"},ha=C({name:"PageNav",setup(l){const t=n=>n===!1?null:Le(n)?ye(n):Ve(n)?n:!1,e=(n,s,u)=>{const v=n.findIndex(p=>p.link===s);if(v!==-1){const p=n[v+u];return p!=null&&p.link?p:null}for(const p of n)if(p.children){const b=e(p.children,s,u);if(b)return b}return null},i=P(),o=ae(),d=z(),m=h(()=>{const n=t(i.value.prev);return n!==!1?n:e(o.value,d.path,-1)}),_=h(()=>{const n=t(i.value.next);return n!==!1?n:e(o.value,d.path,1)});return(n,s)=>a(m)||a(_)?(r(),c("nav",ca,[g("p",va,[a(m)?(r(),c("span",da,[$(M,{item:a(m)},null,8,["item"])])):w("",!0),a(_)?(r(),c("span",pa,[$(M,{item:a(_)},null,8,["item"])])):w("",!0)])])):w("",!0)}});var _a=S(ha,[["__file","PageNav.vue"]]);const ma={class:"page"},fa={class:"theme-default-content"},ba=C({name:"Page",setup(l){return(t,e)=>{const i=R("Content");return r(),c("main",ma,[y(t.$slots,"top"),g("div",fa,[$(i)]),$(ia),$(_a),y(t.$slots,"bottom")])}}});var ga=S(ba,[["__file","Page.vue"]]);const ka={class:"sidebar-item-children"},$a=C({name:"SidebarItem",props:{item:{type:Object,required:!0},depth:{type:Number,required:!1,default:0}},setup(l){const t=l,{item:e,depth:i}=Q(t),o=z(),d=te(),m=h(()=>Ce(e.value,o)),_=h(()=>({"sidebar-item":!0,"sidebar-heading":i.value===0,active:m.value,collapsible:e.value.collapsible})),n=O(!0),s=O(void 0);return e.value.collapsible&&(n.value=m.value,s.value=()=>{n.value=!n.value},d.afterEach(()=>{n.value=m.value})),(u,v)=>{var b;const p=R("SidebarItem",!0);return r(),c("li",null,[a(e).link?(r(),T(M,{key:0,class:E(a(_)),item:a(e)},null,8,["class","item"])):(r(),c("p",{key:1,tabindex:"0",class:E(a(_)),onClick:v[0]||(v[0]=(...k)=>s.value&&s.value(...k)),onKeydown:v[1]||(v[1]=Ue((...k)=>s.value&&s.value(...k),["enter"]))},[j(x(a(e).text)+" ",1),a(e).collapsible?(r(),c("span",{key:0,class:E(["arrow",n.value?"down":"right"])},null,2)):w("",!0)],34)),(b=a(e).children)!=null&&b.length?(r(),T(Se,{key:2},{default:N(()=>[q(g("ul",ka,[(r(!0),c(I,null,A(a(e).children,k=>(r(),T(p,{key:`${a(i)}${k.text}${k.link}`,item:k,depth:a(i)+1},null,8,["item","depth"]))),128))],512),[[G,n.value]])]),_:1})):w("",!0)])}}});var La=S($a,[["__file","SidebarItem.vue"]]);const ya={key:0,class:"sidebar-items"},wa=C({name:"SidebarItems",setup(l){const t=z(),e=ae();return $e(()=>t.hash,i=>{const o=document.querySelector(".sidebar");if(!o)return;const d=document.querySelector(`.sidebar a.sidebar-item[href="${t.path}${i}"]`);if(!d)return;const m=o.getBoundingClientRect().top,_=o.getBoundingClientRect().height,n=d.getBoundingClientRect().top,s=d.getBoundingClientRect().height;nm+_&&d.scrollIntoView(!1)}),(i,o)=>a(e).length?(r(),c("ul",ya,[(r(!0),c(I,null,A(a(e),d=>(r(),T(La,{key:d.link||d.text,item:d},null,8,["item"]))),128))])):w("",!0)}});var Sa=S(wa,[["__file","SidebarItems.vue"]]);const Ca={class:"sidebar"},Ta=C({name:"Sidebar",setup(l){return(t,e)=>(r(),c("aside",Ca,[$(xe),y(t.$slots,"top"),$(Sa),y(t.$slots,"bottom")]))}});var xa=S(Ta,[["__file","Sidebar.vue"]]);const Ba=C({name:"Layout",setup(l){const t=U(),e=P(),i=D(),o=h(()=>e.value.navbar!==!1&&i.value.navbar!==!1),d=ae(),m=O(!1),_=f=>{m.value=typeof f=="boolean"?f:!m.value},n={x:0,y:0},s=f=>{n.x=f.changedTouches[0].clientX,n.y=f.changedTouches[0].clientY},u=f=>{const B=f.changedTouches[0].clientX-n.x,H=f.changedTouches[0].clientY-n.y;Math.abs(B)>Math.abs(H)&&Math.abs(B)>40&&(B>0&&n.x<=80?_(!0):_(!1))},v=h(()=>[{"no-navbar":!o.value,"no-sidebar":!d.value.length,"sidebar-open":m.value},e.value.pageClass]);let p;we(()=>{p=te().afterEach(()=>{_(!1)})}),je(()=>{p()});const b=Ke(),k=b.resolve,L=b.pending;return(f,B)=>(r(),c("div",{class:E(["theme-container",a(v)]),onTouchstart:s,onTouchend:u},[y(f.$slots,"navbar",{},()=>[a(o)?(r(),T(Jt,{key:0,onToggleSidebar:_},{before:N(()=>[y(f.$slots,"navbar-before")]),after:N(()=>[y(f.$slots,"navbar-after")]),_:3})):w("",!0)]),g("div",{class:"sidebar-mask",onClick:B[0]||(B[0]=H=>_(!1))}),y(f.$slots,"sidebar",{},()=>[$(xa,null,{top:N(()=>[y(f.$slots,"sidebar-top")]),bottom:N(()=>[y(f.$slots,"sidebar-bottom")]),_:3})]),y(f.$slots,"page",{},()=>[a(e).home?(r(),T(_t,{key:0})):(r(),T(ke,{key:1,name:"fade-slide-y",mode:"out-in",onBeforeEnter:a(k),onBeforeLeave:a(L)},{default:N(()=>[(r(),T(ga,{key:a(t).path},{top:N(()=>[y(f.$slots,"page-top")]),bottom:N(()=>[y(f.$slots,"page-bottom")]),_:3}))]),_:3},8,["onBeforeEnter","onBeforeLeave"]))])],34))}});var Ia=S(Ba,[["__file","Layout.vue"]]);export{Ia as default};
                    diff --git "a/assets/MySQL\346\225\260\346\215\256\345\272\223\347\254\224\350\256\260-\347\254\254\344\270\200\351\203\250\345\210\206.html.7d7d9671.js" "b/assets/MySQL\346\225\260\346\215\256\345\272\223\347\254\224\350\256\260-\347\254\254\344\270\200\351\203\250\345\210\206.html.17c02c61.js"
                    similarity index 99%
                    rename from "assets/MySQL\346\225\260\346\215\256\345\272\223\347\254\224\350\256\260-\347\254\254\344\270\200\351\203\250\345\210\206.html.7d7d9671.js"
                    rename to "assets/MySQL\346\225\260\346\215\256\345\272\223\347\254\224\350\256\260-\347\254\254\344\270\200\351\203\250\345\210\206.html.17c02c61.js"
                    index 87c05145..e9cc68fb 100644
                    --- "a/assets/MySQL\346\225\260\346\215\256\345\272\223\347\254\224\350\256\260-\347\254\254\344\270\200\351\203\250\345\210\206.html.7d7d9671.js"
                    +++ "b/assets/MySQL\346\225\260\346\215\256\345\272\223\347\254\224\350\256\260-\347\254\254\344\270\200\351\203\250\345\210\206.html.17c02c61.js"
                    @@ -1 +1 @@
                    -const l={key:"v-791cd9a5",path:"/java/%E6%95%B0%E6%8D%AE%E5%BA%93/mysql/%E5%9F%BA%E7%A1%80%E7%AF%87/MySQL%E6%95%B0%E6%8D%AE%E5%BA%93%E7%AC%94%E8%AE%B0-%E7%AC%AC%E4%B8%80%E9%83%A8%E5%88%86.html",title:"\u7B2C\u4E00\u90E8\u5206 MySQL\u57FA\u7840\u7BC7",lang:"zh-CN",frontmatter:{},excerpt:"",headers:[{level:2,title:"\u7B2C01\u7AE0 \u6570\u636E\u5E93\u6982\u8FF0",slug:"\u7B2C01\u7AE0-\u6570\u636E\u5E93\u6982\u8FF0",children:[{level:3,title:"1. \u4E3A\u4EC0\u4E48\u8981\u4F7F\u7528\u6570\u636E\u5E93",slug:"_1-\u4E3A\u4EC0\u4E48\u8981\u4F7F\u7528\u6570\u636E\u5E93",children:[]},{level:3,title:"2. \u6570\u636E\u5E93\u4E0E\u6570\u636E\u5E93\u7BA1\u7406\u7CFB\u7EDF",slug:"_2-\u6570\u636E\u5E93\u4E0E\u6570\u636E\u5E93\u7BA1\u7406\u7CFB\u7EDF",children:[{level:4,title:"2.1 \u6570\u636E\u5E93\u7684\u76F8\u5173\u6982\u5FF5",slug:"_2-1-\u6570\u636E\u5E93\u7684\u76F8\u5173\u6982\u5FF5",children:[]},{level:4,title:"2.2. \u6570\u636E\u5E93\u4E0E\u6570\u636E\u5E93\u7BA1\u7406\u7CFB\u7EDF\u4E4B\u95F4\u7684\u5173\u7CFB",slug:"_2-2-\u6570\u636E\u5E93\u4E0E\u6570\u636E\u5E93\u7BA1\u7406\u7CFB\u7EDF\u4E4B\u95F4\u7684\u5173\u7CFB",children:[]}]},{level:3,title:"3. RDBMS\u4E0E\u975ERDBMS",slug:"_3-rdbms\u4E0E\u975Erdbms",children:[{level:4,title:"3.1 \u5173\u7CFB\u578B\u6570\u636E\u5E93(RDBMS)",slug:"_3-1-\u5173\u7CFB\u578B\u6570\u636E\u5E93-rdbms",children:[{level:5,title:"3.1.1 \u5B9E\u8D28",slug:"_3-1-1-\u5B9E\u8D28",children:[]},{level:5,title:"3.1.2 \u4F18\u52BF",slug:"_3-1-2-\u4F18\u52BF",children:[]}]},{level:4,title:"3.2 \u975E\u5173\u7CFB\u578B\u6570\u636E\u5E93(\u975ERDBMS)",slug:"_3-2-\u975E\u5173\u7CFB\u578B\u6570\u636E\u5E93-\u975Erdbms",children:[{level:5,title:"3.2.1 \u4ECB\u7ECD",slug:"_3-2-1-\u4ECB\u7ECD",children:[]}]}]},{level:3,title:"4. \u5173\u7CFB\u578B\u6570\u636E\u5E93\u8BBE\u8BA1\u89C4\u5219",slug:"_4-\u5173\u7CFB\u578B\u6570\u636E\u5E93\u8BBE\u8BA1\u89C4\u5219",children:[{level:4,title:"4.1 \u8868\u3001\u8BB0\u5F55\u3001\u5B57\u6BB5",slug:"_4-1-\u8868\u3001\u8BB0\u5F55\u3001\u5B57\u6BB5",children:[]},{level:4,title:"4.2 \u8868\u7684\u5173\u8054\u5173\u7CFB",slug:"_4-2-\u8868\u7684\u5173\u8054\u5173\u7CFB",children:[{level:5,title:"4.2.1 \u4E00\u5BF9\u4E00\u5173\u8054",slug:"_4-2-1-\u4E00\u5BF9\u4E00\u5173\u8054",children:[]},{level:5,title:"4.2.1 \u4E00\u5BF9\u591A\u5173\u7CFB",slug:"_4-2-1-\u4E00\u5BF9\u591A\u5173\u7CFB",children:[]},{level:5,title:"4.2.3 \u591A\u5BF9\u591A\u5173\u7CFB",slug:"_4-2-3-\u591A\u5BF9\u591A\u5173\u7CFB",children:[]},{level:5,title:"4.2.4 \u81EA\u6211\u5F15\u7528",slug:"_4-2-4-\u81EA\u6211\u5F15\u7528",children:[]}]}]}]},{level:2,title:"\u7B2C02\u7AE0 MySQL\u73AF\u5883\u642D\u5EFA\uFF08\u7565\uFF09",slug:"\u7B2C02\u7AE0-mysql\u73AF\u5883\u642D\u5EFA-\u7565",children:[{level:3,title:"1. MySQL\u6F14\u793A\u4F7F\u7528",slug:"_1-mysql\u6F14\u793A\u4F7F\u7528",children:[{level:4,title:"1.1 MySQL\u4F7F\u7528\u6F14\u793A",slug:"_1-1-mysql\u4F7F\u7528\u6F14\u793A",children:[]},{level:4,title:"1.2 MySQL\u7684\u7F16\u7801\u8BBE\u7F6E",slug:"_1-2-mysql\u7684\u7F16\u7801\u8BBE\u7F6E",children:[]}]},{level:3,title:"\u95EE\u98981\uFF1Aroot\u7528\u6237\u5BC6\u7801\u5FD8\u8BB0\uFF0C\u91CD\u7F6E\u7684\u64CD\u4F5C",slug:"\u95EE\u98981-root\u7528\u6237\u5BC6\u7801\u5FD8\u8BB0-\u91CD\u7F6E\u7684\u64CD\u4F5C",children:[]},{level:3,title:"\u95EE\u98982\uFF1Amysql\u547D\u4EE4\u62A5\u201C\u4E0D\u662F\u5185\u90E8\u6216\u5916\u90E8\u547D\u4EE4\u201D",slug:"\u95EE\u98982-mysql\u547D\u4EE4\u62A5-\u4E0D\u662F\u5185\u90E8\u6216\u5916\u90E8\u547D\u4EE4",children:[]},{level:3,title:"\u95EE\u98983\uFF1A No database selected",slug:"\u95EE\u98983-no-database-selected",children:[]},{level:3,title:"\u95EE\u98984\uFF1A\u547D\u4EE4\u884C\u5BA2\u6237\u7AEF\u7684\u5B57\u7B26\u96C6\u95EE\u9898",slug:"\u95EE\u98984-\u547D\u4EE4\u884C\u5BA2\u6237\u7AEF\u7684\u5B57\u7B26\u96C6\u95EE\u9898",children:[]},{level:3,title:"\u95EE\u98985\uFF1A\u4FEE\u6539\u6570\u636E\u5E93\u548C\u8868\u7684\u5B57\u7B26\u7F16\u7801",slug:"\u95EE\u98985-\u4FEE\u6539\u6570\u636E\u5E93\u548C\u8868\u7684\u5B57\u7B26\u7F16\u7801",children:[]}]},{level:2,title:"\u7B2C03\u7AE0 \u57FA\u672C\u7684SELECT\u8BED\u53E5",slug:"\u7B2C03\u7AE0-\u57FA\u672C\u7684select\u8BED\u53E5",children:[{level:3,title:"1. SQL\u6982\u8FF0",slug:"_1-sql\u6982\u8FF0",children:[{level:4,title:"1.1 SQL\u5206\u7C7B",slug:"_1-1-sql\u5206\u7C7B",children:[]}]},{level:3,title:"2. SQL\u8BED\u8A00\u7684\u89C4\u5219\u4E0E\u89C4\u8303",slug:"_2-sql\u8BED\u8A00\u7684\u89C4\u5219\u4E0E\u89C4\u8303",children:[{level:4,title:"2.1 \u57FA\u672C\u89C4\u5219",slug:"_2-1-\u57FA\u672C\u89C4\u5219",children:[]},{level:4,title:"2.2 SQL\u5927\u5C0F\u5199\u89C4\u8303 \uFF08\u5EFA\u8BAE\u9075\u5B88\uFF09",slug:"_2-2-sql\u5927\u5C0F\u5199\u89C4\u8303-\u5EFA\u8BAE\u9075\u5B88",children:[]},{level:4,title:"2.3 \u6CE8 \u91CA",slug:"_2-3-\u6CE8-\u91CA",children:[]},{level:4,title:"2.4 \u547D\u540D\u89C4\u5219\uFF08\u6682\u65F6\u4E86\u89E3\uFF09",slug:"_2-4-\u547D\u540D\u89C4\u5219-\u6682\u65F6\u4E86\u89E3",children:[]},{level:4,title:"2.5 \u6570\u636E\u5BFC\u5165\u6307\u4EE4",slug:"_2-5-\u6570\u636E\u5BFC\u5165\u6307\u4EE4",children:[]}]},{level:3,title:"3. \u57FA\u672C\u7684SELECT\u8BED\u53E5",slug:"_3-\u57FA\u672C\u7684select\u8BED\u53E5",children:[{level:4,title:"3.0 SELECT...",slug:"_3-0-select",children:[]},{level:4,title:"3.1 SELECT ... FROM",slug:"_3-1-select-from",children:[]},{level:4,title:"3.2 \u5217\u7684\u522B\u540D",slug:"_3-2-\u5217\u7684\u522B\u540D",children:[]},{level:4,title:"3.3 \u53BB\u9664\u91CD\u590D\u884C",slug:"_3-3-\u53BB\u9664\u91CD\u590D\u884C",children:[]},{level:4,title:"3.4 \u7A7A\u503C\u53C2\u4E0E\u8FD0\u7B97",slug:"_3-4-\u7A7A\u503C\u53C2\u4E0E\u8FD0\u7B97",children:[]},{level:4,title:"3.5 \u7740\u91CD\u53F7",slug:"_3-5-\u7740\u91CD\u53F7",children:[]},{level:4,title:"3.6 \u67E5\u8BE2\u5E38\u6570",slug:"_3-6-\u67E5\u8BE2\u5E38\u6570",children:[]}]},{level:3,title:"4. \u663E\u793A\u8868\u7ED3\u6784",slug:"_4-\u663E\u793A\u8868\u7ED3\u6784",children:[]},{level:3,title:"5. \u8FC7\u6EE4\u6570\u636E",slug:"_5-\u8FC7\u6EE4\u6570\u636E",children:[]}]},{level:2,title:"\u7B2C04\u7AE0 \u8FD0\u7B97\u7B26",slug:"\u7B2C04\u7AE0-\u8FD0\u7B97\u7B26",children:[{level:3,title:"1. \u7B97\u672F\u8FD0\u7B97\u7B26",slug:"_1-\u7B97\u672F\u8FD0\u7B97\u7B26",children:[]},{level:3,title:"2. \u6BD4\u8F83\u8FD0\u7B97\u7B26",slug:"_2-\u6BD4\u8F83\u8FD0\u7B97\u7B26",children:[]},{level:3,title:"3. \u903B\u8F91\u8FD0\u7B97\u7B26",slug:"_3-\u903B\u8F91\u8FD0\u7B97\u7B26",children:[]},{level:3,title:"4. \u4F4D\u8FD0\u7B97\u7B26",slug:"_4-\u4F4D\u8FD0\u7B97\u7B26",children:[]}]},{level:2,title:"\u7B2C05\u7AE0 \u6392\u5E8F\u4E0E\u5206\u9875",slug:"\u7B2C05\u7AE0-\u6392\u5E8F\u4E0E\u5206\u9875",children:[{level:3,title:"1. \u6392\u5E8F\u6570\u636E",slug:"_1-\u6392\u5E8F\u6570\u636E",children:[{level:4,title:"1.1 \u6392\u5E8F\u89C4\u5219",slug:"_1-1-\u6392\u5E8F\u89C4\u5219",children:[]}]},{level:3,title:"2. \u5206\u9875",slug:"_2-\u5206\u9875",children:[{level:4,title:"2.1 \u5B9E\u73B0\u89C4\u5219",slug:"_2-1-\u5B9E\u73B0\u89C4\u5219",children:[]}]}]},{level:2,title:"\u7B2C06\u7AE0 \u591A\u8868\u67E5\u8BE2",slug:"\u7B2C06\u7AE0-\u591A\u8868\u67E5\u8BE2",children:[{level:3,title:"1. \u4E00\u4E2A\u6848\u4F8B\u5F15\u53D1\u7684\u591A\u8868\u8FDE\u63A5",slug:"_1-\u4E00\u4E2A\u6848\u4F8B\u5F15\u53D1\u7684\u591A\u8868\u8FDE\u63A5",children:[{level:4,title:"1.1 \u7B1B\u5361\u5C14\u79EF\uFF08\u6216\u4EA4\u53C9\u8FDE\u63A5\uFF09\u7684\u7406\u89E3",slug:"_1-1-\u7B1B\u5361\u5C14\u79EF-\u6216\u4EA4\u53C9\u8FDE\u63A5-\u7684\u7406\u89E3",children:[]},{level:4,title:"1.2 \u6CE8\u610F",slug:"_1-2-\u6CE8\u610F",children:[]}]},{level:3,title:"2. \u591A\u8868\u67E5\u8BE2\u5206\u7C7B\u8BB2\u89E3",slug:"_2-\u591A\u8868\u67E5\u8BE2\u5206\u7C7B\u8BB2\u89E3",children:[{level:4,title:"\u5206\u7C7B1\uFF1A\u7B49\u503C\u8FDE\u63A5 vs \u975E\u7B49\u503C\u8FDE\u63A5",slug:"\u5206\u7C7B1-\u7B49\u503C\u8FDE\u63A5-vs-\u975E\u7B49\u503C\u8FDE\u63A5",children:[]},{level:4,title:"\u5206\u7C7B2\uFF1A\u81EA\u8FDE\u63A5 vs \u975E\u81EA\u8FDE\u63A5",slug:"\u5206\u7C7B2-\u81EA\u8FDE\u63A5-vs-\u975E\u81EA\u8FDE\u63A5",children:[]},{level:4,title:"\u5206\u7C7B3\uFF1A\u5185\u8FDE\u63A5  vs  \u5916\u8FDE\u63A5",slug:"\u5206\u7C7B3-\u5185\u8FDE\u63A5-vs-\u5916\u8FDE\u63A5",children:[]}]},{level:3,title:"3. SQL99\u8BED\u6CD5\u5B9E\u73B0\u591A\u8868\u67E5\u8BE2",slug:"_3-sql99\u8BED\u6CD5\u5B9E\u73B0\u591A\u8868\u67E5\u8BE2",children:[{level:4,title:"3.1 \u57FA\u672C\u8BED\u6CD5",slug:"_3-1-\u57FA\u672C\u8BED\u6CD5",children:[]},{level:4,title:"3.2 \u5185\u8FDE\u63A5(INNER JOIN)\u7684\u5B9E\u73B0",slug:"_3-2-\u5185\u8FDE\u63A5-inner-join-\u7684\u5B9E\u73B0",children:[]},{level:4,title:"3.3 \u5916\u8FDE\u63A5(OUTER JOIN)\u7684\u5B9E\u73B0",slug:"_3-3-\u5916\u8FDE\u63A5-outer-join-\u7684\u5B9E\u73B0",children:[{level:5,title:"3.3.1 \u5DE6\u5916\u8FDE\u63A5(LEFT OUTER JOIN)",slug:"_3-3-1-\u5DE6\u5916\u8FDE\u63A5-left-outer-join",children:[]},{level:5,title:"3.3.2 \u53F3\u5916\u8FDE\u63A5(RIGHT OUTER JOIN)",slug:"_3-3-2-\u53F3\u5916\u8FDE\u63A5-right-outer-join",children:[]}]}]},{level:3,title:"4. UNION\u7684\u4F7F\u7528",slug:"_4-union\u7684\u4F7F\u7528",children:[]},{level:3,title:"5. 7\u79CDSQL JOINS\u7684\u5B9E\u73B0",slug:"_5-7\u79CDsql-joins\u7684\u5B9E\u73B0",children:[{level:4,title:"5.1 \u4E3E\u4F8B",slug:"_5-1-\u4E3E\u4F8B",children:[]},{level:4,title:"5.2 \u8BED\u6CD5\u683C\u5F0F\u5C0F\u7ED3",slug:"_5-2-\u8BED\u6CD5\u683C\u5F0F\u5C0F\u7ED3",children:[]}]},{level:3,title:"6. SQL99\u8BED\u6CD5\u65B0\u7279\u6027",slug:"_6-sql99\u8BED\u6CD5\u65B0\u7279\u6027",children:[{level:4,title:"6.1 \u81EA\u7136\u8FDE\u63A5",slug:"_6-1-\u81EA\u7136\u8FDE\u63A5",children:[]},{level:4,title:"6.2 USING\u8FDE\u63A5",slug:"_6-2-using\u8FDE\u63A5",children:[]}]}]},{level:2,title:"\u7B2C07\u7AE0 \u5355\u884C\u51FD\u6570",slug:"\u7B2C07\u7AE0-\u5355\u884C\u51FD\u6570",children:[{level:3,title:"1. \u6570\u503C\u51FD\u6570",slug:"_1-\u6570\u503C\u51FD\u6570",children:[{level:4,title:"1.1 \u57FA\u672C\u51FD\u6570",slug:"_1-1-\u57FA\u672C\u51FD\u6570",children:[]},{level:4,title:"1.2 \u89D2\u5EA6\u4E0E\u5F27\u5EA6",slug:"_1-2-\u89D2\u5EA6\u4E0E\u5F27\u5EA6",children:[]},{level:4,title:"1.3 \u4E09\u89D2\u51FD\u6570",slug:"_1-3-\u4E09\u89D2\u51FD\u6570",children:[]},{level:4,title:"1.4 \u6307\u6570\u4E0E\u5BF9\u6570",slug:"_1-4-\u6307\u6570\u4E0E\u5BF9\u6570",children:[]},{level:4,title:"1.5 \u8FDB\u5236\u95F4\u7684\u8F6C\u6362",slug:"_1-5-\u8FDB\u5236\u95F4\u7684\u8F6C\u6362",children:[]}]},{level:3,title:"2. \u5B57\u7B26\u4E32\u51FD\u6570",slug:"_2-\u5B57\u7B26\u4E32\u51FD\u6570",children:[]},{level:3,title:"3. \u65E5\u671F\u548C\u65F6\u95F4\u51FD\u6570",slug:"_3-\u65E5\u671F\u548C\u65F6\u95F4\u51FD\u6570",children:[{level:4,title:"3.1 \u83B7\u53D6\u65E5\u671F\u3001\u65F6\u95F4",slug:"_3-1-\u83B7\u53D6\u65E5\u671F\u3001\u65F6\u95F4",children:[]},{level:4,title:"3.2 \u65E5\u671F\u4E0E\u65F6\u95F4\u6233\u7684\u8F6C\u6362",slug:"_3-2-\u65E5\u671F\u4E0E\u65F6\u95F4\u6233\u7684\u8F6C\u6362",children:[]},{level:4,title:"3.3 \u83B7\u53D6\u6708\u4EFD\u3001\u661F\u671F\u3001\u661F\u671F\u6570\u3001\u5929\u6570\u7B49\u51FD\u6570",slug:"_3-3-\u83B7\u53D6\u6708\u4EFD\u3001\u661F\u671F\u3001\u661F\u671F\u6570\u3001\u5929\u6570\u7B49\u51FD\u6570",children:[]},{level:4,title:"3.4 \u65E5\u671F\u7684\u64CD\u4F5C\u51FD\u6570",slug:"_3-4-\u65E5\u671F\u7684\u64CD\u4F5C\u51FD\u6570",children:[]},{level:4,title:"3.5 \u65F6\u95F4\u548C\u79D2\u949F\u8F6C\u6362\u7684\u51FD\u6570",slug:"_3-5-\u65F6\u95F4\u548C\u79D2\u949F\u8F6C\u6362\u7684\u51FD\u6570",children:[]},{level:4,title:"3.6 \u8BA1\u7B97\u65E5\u671F\u548C\u65F6\u95F4\u7684\u51FD\u6570",slug:"_3-6-\u8BA1\u7B97\u65E5\u671F\u548C\u65F6\u95F4\u7684\u51FD\u6570",children:[]},{level:4,title:"3.7 \u65E5\u671F\u7684\u683C\u5F0F\u5316\u4E0E\u89E3\u6790",slug:"_3-7-\u65E5\u671F\u7684\u683C\u5F0F\u5316\u4E0E\u89E3\u6790",children:[]}]},{level:3,title:"4. \u6D41\u7A0B\u63A7\u5236\u51FD\u6570",slug:"_4-\u6D41\u7A0B\u63A7\u5236\u51FD\u6570",children:[]},{level:3,title:"5. \u52A0\u5BC6\u4E0E\u89E3\u5BC6\u51FD\u6570",slug:"_5-\u52A0\u5BC6\u4E0E\u89E3\u5BC6\u51FD\u6570",children:[]},{level:3,title:"6. MySQL\u4FE1\u606F\u51FD\u6570",slug:"_6-mysql\u4FE1\u606F\u51FD\u6570",children:[]},{level:3,title:"7. \u5176\u4ED6\u51FD\u6570",slug:"_7-\u5176\u4ED6\u51FD\u6570",children:[]}]},{level:2,title:"\u7B2C08\u7AE0 \u805A\u5408\u51FD\u6570",slug:"\u7B2C08\u7AE0-\u805A\u5408\u51FD\u6570",children:[{level:3,title:"1. \u805A\u5408\u51FD\u6570\u4ECB\u7ECD",slug:"_1-\u805A\u5408\u51FD\u6570\u4ECB\u7ECD",children:[{level:4,title:"\u6982\u8FF0",slug:"\u6982\u8FF0",children:[]},{level:4,title:"1.1 AVG\u548CSUM\u51FD\u6570",slug:"_1-1-avg\u548Csum\u51FD\u6570",children:[]},{level:4,title:"1.2 MIN\u548CMAX\u51FD\u6570",slug:"_1-2-min\u548Cmax\u51FD\u6570",children:[]},{level:4,title:"1.3 COUNT\u51FD\u6570",slug:"_1-3-count\u51FD\u6570",children:[]}]},{level:3,title:"2. GROUP BY",slug:"_2-group-by",children:[{level:4,title:"2.1 \u57FA\u672C\u4F7F\u7528",slug:"_2-1-\u57FA\u672C\u4F7F\u7528",children:[]},{level:4,title:"2.2 \u4F7F\u7528\u591A\u4E2A\u5217\u5206\u7EC4",slug:"_2-2-\u4F7F\u7528\u591A\u4E2A\u5217\u5206\u7EC4",children:[]},{level:4,title:"2.3 GROUP BY\u4E2D\u4F7F\u7528WITH ROLLUP",slug:"_2-3-group-by\u4E2D\u4F7F\u7528with-rollup",children:[]}]},{level:3,title:"3. HAVING",slug:"_3-having",children:[{level:4,title:"3.1 \u57FA\u672C\u4F7F\u7528",slug:"_3-1-\u57FA\u672C\u4F7F\u7528",children:[]},{level:4,title:"3.2 WHERE\u548CHAVING\u7684\u5BF9\u6BD4",slug:"_3-2-where\u548Chaving\u7684\u5BF9\u6BD4",children:[]}]},{level:3,title:"4. SELECT\u7684\u6267\u884C\u8FC7\u7A0B",slug:"_4-select\u7684\u6267\u884C\u8FC7\u7A0B",children:[{level:4,title:"4.1 \u67E5\u8BE2\u7684\u7ED3\u6784",slug:"_4-1-\u67E5\u8BE2\u7684\u7ED3\u6784",children:[]},{level:4,title:"4.2 SELECT\u6267\u884C\u987A\u5E8F",slug:"_4-2-select\u6267\u884C\u987A\u5E8F",children:[]},{level:4,title:"4.3 SQL \u7684\u6267\u884C\u539F\u7406",slug:"_4-3-sql-\u7684\u6267\u884C\u539F\u7406",children:[]}]}]},{level:2,title:"\u7B2C09\u7AE0 \u5B50\u67E5\u8BE2",slug:"\u7B2C09\u7AE0-\u5B50\u67E5\u8BE2",children:[{level:3,title:"1. \u9700\u6C42\u5206\u6790\u4E0E\u95EE\u9898\u89E3\u51B3",slug:"_1-\u9700\u6C42\u5206\u6790\u4E0E\u95EE\u9898\u89E3\u51B3",children:[{level:4,title:"1.1 \u5B9E\u9645\u95EE\u9898",slug:"_1-1-\u5B9E\u9645\u95EE\u9898",children:[]},{level:4,title:"1.2 \u5B50\u67E5\u8BE2\u7684\u57FA\u672C\u4F7F\u7528",slug:"_1-2-\u5B50\u67E5\u8BE2\u7684\u57FA\u672C\u4F7F\u7528",children:[]},{level:4,title:"1.3 \u5B50\u67E5\u8BE2\u7684\u5206\u7C7B",slug:"_1-3-\u5B50\u67E5\u8BE2\u7684\u5206\u7C7B",children:[]}]},{level:3,title:"2. \u5355\u884C\u5B50\u67E5\u8BE2",slug:"_2-\u5355\u884C\u5B50\u67E5\u8BE2",children:[{level:4,title:"2.1 \u5355\u884C\u6BD4\u8F83\u64CD\u4F5C\u7B26",slug:"_2-1-\u5355\u884C\u6BD4\u8F83\u64CD\u4F5C\u7B26",children:[]},{level:4,title:"2.2 \u4EE3\u7801\u793A\u4F8B",slug:"_2-2-\u4EE3\u7801\u793A\u4F8B",children:[]},{level:4,title:"2.3 HAVING \u4E2D\u7684\u5B50\u67E5\u8BE2",slug:"_2-3-having-\u4E2D\u7684\u5B50\u67E5\u8BE2",children:[]},{level:4,title:"2.4 CASE\u4E2D\u7684\u5B50\u67E5\u8BE2",slug:"_2-4-case\u4E2D\u7684\u5B50\u67E5\u8BE2",children:[]},{level:4,title:"2.5 \u5B50\u67E5\u8BE2\u4E2D\u7684\u7A7A\u503C\u95EE\u9898",slug:"_2-5-\u5B50\u67E5\u8BE2\u4E2D\u7684\u7A7A\u503C\u95EE\u9898",children:[]},{level:4,title:"2.6 \u975E\u6CD5\u4F7F\u7528\u5B50\u67E5\u8BE2",slug:"_2-6-\u975E\u6CD5\u4F7F\u7528\u5B50\u67E5\u8BE2",children:[]}]},{level:3,title:"3. \u591A\u884C\u5B50\u67E5\u8BE2",slug:"_3-\u591A\u884C\u5B50\u67E5\u8BE2",children:[{level:4,title:"3.1 \u591A\u884C\u6BD4\u8F83\u64CD\u4F5C\u7B26",slug:"_3-1-\u591A\u884C\u6BD4\u8F83\u64CD\u4F5C\u7B26",children:[]},{level:4,title:"3.2 \u4EE3\u7801\u793A\u4F8B",slug:"_3-2-\u4EE3\u7801\u793A\u4F8B",children:[]},{level:4,title:"3.3 \u7A7A\u503C\u95EE\u9898",slug:"_3-3-\u7A7A\u503C\u95EE\u9898",children:[]}]},{level:3,title:"4. \u76F8\u5173\u5B50\u67E5\u8BE2",slug:"_4-\u76F8\u5173\u5B50\u67E5\u8BE2",children:[{level:4,title:"4.1 \u76F8\u5173\u5B50\u67E5\u8BE2\u6267\u884C\u6D41\u7A0B",slug:"_4-1-\u76F8\u5173\u5B50\u67E5\u8BE2\u6267\u884C\u6D41\u7A0B",children:[]},{level:4,title:"4.2 \u4EE3\u7801\u793A\u4F8B",slug:"_4-2-\u4EE3\u7801\u793A\u4F8B",children:[]},{level:4,title:"4.3 EXISTS\u4E0ENOT EXISTS\u5173\u952E\u5B57",slug:"_4-3-exists\u4E0Enot-exists\u5173\u952E\u5B57",children:[]}]}]},{level:2,title:"\u7B2C10\u7AE0 \u521B\u5EFA\u548C\u7BA1\u7406\u8868",slug:"\u7B2C10\u7AE0-\u521B\u5EFA\u548C\u7BA1\u7406\u8868",children:[{level:3,title:"1. \u57FA\u7840\u77E5\u8BC6",slug:"_1-\u57FA\u7840\u77E5\u8BC6",children:[{level:4,title:"1.1 \u6807\u8BC6\u7B26\u547D\u540D\u89C4\u5219",slug:"_1-1-\u6807\u8BC6\u7B26\u547D\u540D\u89C4\u5219",children:[]}]},{level:3,title:"2. \u521B\u5EFA\u548C\u7BA1\u7406\u6570\u636E\u5E93",slug:"_2-\u521B\u5EFA\u548C\u7BA1\u7406\u6570\u636E\u5E93",children:[{level:4,title:"2.1 \u521B\u5EFA\u6570\u636E\u5E93",slug:"_2-1-\u521B\u5EFA\u6570\u636E\u5E93",children:[]},{level:4,title:"2.2 \u4F7F\u7528\u6570\u636E\u5E93",slug:"_2-2-\u4F7F\u7528\u6570\u636E\u5E93",children:[]},{level:4,title:"2.3 \u4FEE\u6539\u6570\u636E\u5E93",slug:"_2-3-\u4FEE\u6539\u6570\u636E\u5E93",children:[]},{level:4,title:"2.4 \u5220\u9664\u6570\u636E\u5E93",slug:"_2-4-\u5220\u9664\u6570\u636E\u5E93",children:[]}]},{level:3,title:"3. \u521B\u5EFA\u8868",slug:"_3-\u521B\u5EFA\u8868",children:[{level:4,title:"3.1 \u521B\u5EFA\u65B9\u5F0F1",slug:"_3-1-\u521B\u5EFA\u65B9\u5F0F1",children:[]},{level:4,title:"3.2 \u521B\u5EFA\u65B9\u5F0F2",slug:"_3-2-\u521B\u5EFA\u65B9\u5F0F2",children:[]},{level:4,title:"3.3 \u67E5\u770B\u6570\u636E\u8868\u7ED3\u6784",slug:"_3-3-\u67E5\u770B\u6570\u636E\u8868\u7ED3\u6784",children:[]}]},{level:3,title:"4. \u4FEE\u6539\u8868",slug:"_4-\u4FEE\u6539\u8868",children:[{level:4,title:"4.1 \u8FFD\u52A0\u4E00\u4E2A\u5217",slug:"_4-1-\u8FFD\u52A0\u4E00\u4E2A\u5217",children:[]},{level:4,title:"4.2 \u4FEE\u6539\u4E00\u4E2A\u5217",slug:"_4-2-\u4FEE\u6539\u4E00\u4E2A\u5217",children:[]},{level:4,title:"4.3 \u91CD\u547D\u540D\u4E00\u4E2A\u5217",slug:"_4-3-\u91CD\u547D\u540D\u4E00\u4E2A\u5217",children:[]},{level:4,title:"4.4 \u5220\u9664\u4E00\u4E2A\u5217",slug:"_4-4-\u5220\u9664\u4E00\u4E2A\u5217",children:[]}]},{level:3,title:"5. \u91CD\u547D\u540D\u8868",slug:"_5-\u91CD\u547D\u540D\u8868",children:[]},{level:3,title:"6. \u5220\u9664\u8868",slug:"_6-\u5220\u9664\u8868",children:[]},{level:3,title:"7. \u6E05\u7A7A\u8868",slug:"_7-\u6E05\u7A7A\u8868",children:[]},{level:3,title:"8. \u5185\u5BB9\u62D3\u5C55",slug:"_8-\u5185\u5BB9\u62D3\u5C55",children:[]}]},{level:2,title:"\u7B2C11\u7AE0 \u6570\u636E\u5904\u7406\u4E4B\u589E\u5220\u6539",slug:"\u7B2C11\u7AE0-\u6570\u636E\u5904\u7406\u4E4B\u589E\u5220\u6539",children:[{level:3,title:"1. \u63D2\u5165\u6570\u636E",slug:"_1-\u63D2\u5165\u6570\u636E",children:[{level:4,title:"1.1 \u65B9\u5F0F1\uFF1AVALUES\u7684\u65B9\u5F0F\u6DFB\u52A0",slug:"_1-1-\u65B9\u5F0F1-values\u7684\u65B9\u5F0F\u6DFB\u52A0",children:[]},{level:4,title:"1.2 \u65B9\u5F0F2\uFF1A\u5C06\u67E5\u8BE2\u7ED3\u679C\u63D2\u5165\u5230\u8868\u4E2D",slug:"_1-2-\u65B9\u5F0F2-\u5C06\u67E5\u8BE2\u7ED3\u679C\u63D2\u5165\u5230\u8868\u4E2D",children:[]}]},{level:3,title:"2. \u66F4\u65B0\u6570\u636E",slug:"_2-\u66F4\u65B0\u6570\u636E",children:[]},{level:3,title:"3. \u5220\u9664\u6570\u636E",slug:"_3-\u5220\u9664\u6570\u636E",children:[]},{level:3,title:"4. MySQL8\u65B0\u7279\u6027\uFF1A\u8BA1\u7B97\u5217",slug:"_4-mysql8\u65B0\u7279\u6027-\u8BA1\u7B97\u5217",children:[]}]},{level:2,title:"\u7B2C12\u7AE0 MySQL\u6570\u636E\u7C7B\u578B\u7CBE\u8BB2",slug:"\u7B2C12\u7AE0-mysql\u6570\u636E\u7C7B\u578B\u7CBE\u8BB2",children:[{level:3,title:"1. MySQL\u4E2D\u7684\u6570\u636E\u7C7B\u578B",slug:"_1-mysql\u4E2D\u7684\u6570\u636E\u7C7B\u578B",children:[]},{level:3,title:"2. \u6574\u6570\u7C7B\u578B",slug:"_2-\u6574\u6570\u7C7B\u578B",children:[{level:4,title:"2.1 \u7C7B\u578B\u4ECB\u7ECD",slug:"_2-1-\u7C7B\u578B\u4ECB\u7ECD",children:[]},{level:4,title:"2.2 \u53EF\u9009\u5C5E\u6027",slug:"_2-2-\u53EF\u9009\u5C5E\u6027",children:[{level:5,title:"2.2.1 M",slug:"_2-2-1-m",children:[]},{level:5,title:"2.2.2 UNSIGNED",slug:"_2-2-2-unsigned",children:[]},{level:5,title:"2.2.3 ZEROFILL",slug:"_2-2-3-zerofill",children:[]}]},{level:4,title:"2.3 \u9002\u7528\u573A\u666F",slug:"_2-3-\u9002\u7528\u573A\u666F",children:[]},{level:4,title:"2.4 \u5982\u4F55\u9009\u62E9\uFF1F",slug:"_2-4-\u5982\u4F55\u9009\u62E9",children:[]}]},{level:3,title:"3. \u6D6E\u70B9\u7C7B\u578B",slug:"_3-\u6D6E\u70B9\u7C7B\u578B",children:[{level:4,title:"3.1 \u7C7B\u578B\u4ECB\u7ECD",slug:"_3-1-\u7C7B\u578B\u4ECB\u7ECD",children:[]},{level:4,title:"3.2 \u6570\u636E\u7CBE\u5EA6\u8BF4\u660E",slug:"_3-2-\u6570\u636E\u7CBE\u5EA6\u8BF4\u660E",children:[]}]},{level:3,title:"4. \u5B9A\u70B9\u6570\u7C7B\u578B",slug:"_4-\u5B9A\u70B9\u6570\u7C7B\u578B",children:[{level:4,title:"4.1 \u7C7B\u578B\u4ECB\u7ECD",slug:"_4-1-\u7C7B\u578B\u4ECB\u7ECD",children:[]},{level:4,title:"4.2 \u5F00\u53D1\u4E2D\u7ECF\u9A8C",slug:"_4-2-\u5F00\u53D1\u4E2D\u7ECF\u9A8C",children:[]}]},{level:3,title:"5. \u4F4D\u7C7B\u578B\uFF1ABIT",slug:"_5-\u4F4D\u7C7B\u578B-bit",children:[]},{level:3,title:"6. \u65E5\u671F\u4E0E\u65F6\u95F4\u7C7B\u578B",slug:"_6-\u65E5\u671F\u4E0E\u65F6\u95F4\u7C7B\u578B",children:[{level:4,title:"6.1 YEAR\u7C7B\u578B",slug:"_6-1-year\u7C7B\u578B",children:[]},{level:4,title:"6.2 DATE\u7C7B\u578B",slug:"_6-2-date\u7C7B\u578B",children:[]},{level:4,title:"6.3 TIME\u7C7B\u578B",slug:"_6-3-time\u7C7B\u578B",children:[]},{level:4,title:"6.4 DATETIME\u7C7B\u578B",slug:"_6-4-datetime\u7C7B\u578B",children:[]},{level:4,title:"6.5 TIMESTAMP\u7C7B\u578B",slug:"_6-5-timestamp\u7C7B\u578B",children:[]},{level:4,title:"6.6 \u5F00\u53D1\u4E2D\u7ECF\u9A8C",slug:"_6-6-\u5F00\u53D1\u4E2D\u7ECF\u9A8C",children:[]}]},{level:3,title:"7. \u6587\u672C\u5B57\u7B26\u4E32\u7C7B\u578B",slug:"_7-\u6587\u672C\u5B57\u7B26\u4E32\u7C7B\u578B",children:[{level:4,title:"7.1 CHAR\u4E0EVARCHAR\u7C7B\u578B",slug:"_7-1-char\u4E0Evarchar\u7C7B\u578B",children:[]},{level:4,title:"7.2 TEXT\u7C7B\u578B",slug:"_7-2-text\u7C7B\u578B",children:[]}]},{level:3,title:"8. ENUM\u7C7B\u578B",slug:"_8-enum\u7C7B\u578B",children:[]},{level:3,title:"9. SET\u7C7B\u578B",slug:"_9-set\u7C7B\u578B",children:[]},{level:3,title:"10. \u4E8C\u8FDB\u5236\u5B57\u7B26\u4E32\u7C7B\u578B",slug:"_10-\u4E8C\u8FDB\u5236\u5B57\u7B26\u4E32\u7C7B\u578B",children:[]},{level:3,title:"11. JSON \u7C7B\u578B",slug:"_11-json-\u7C7B\u578B",children:[]},{level:3,title:"12. \u7A7A\u95F4\u7C7B\u578B",slug:"_12-\u7A7A\u95F4\u7C7B\u578B",children:[]},{level:3,title:"13. \u5C0F\u7ED3\u53CA\u9009\u62E9\u5EFA\u8BAE",slug:"_13-\u5C0F\u7ED3\u53CA\u9009\u62E9\u5EFA\u8BAE",children:[]}]},{level:2,title:"\u7B2C13\u7AE0 \u7EA6\u675F",slug:"\u7B2C13\u7AE0-\u7EA6\u675F",children:[{level:3,title:"1. \u7EA6\u675F(constraint)\u6982\u8FF0",slug:"_1-\u7EA6\u675F-constraint-\u6982\u8FF0",children:[{level:4,title:"1.1 \u4E3A\u4EC0\u4E48\u9700\u8981\u7EA6\u675F",slug:"_1-1-\u4E3A\u4EC0\u4E48\u9700\u8981\u7EA6\u675F",children:[]},{level:4,title:"1.2 \u4EC0\u4E48\u662F\u7EA6\u675F",slug:"_1-2-\u4EC0\u4E48\u662F\u7EA6\u675F",children:[]},{level:4,title:"1.3 \u7EA6\u675F\u7684\u5206\u7C7B",slug:"_1-3-\u7EA6\u675F\u7684\u5206\u7C7B",children:[]}]},{level:3,title:"2. \u975E\u7A7A\u7EA6\u675F",slug:"_2-\u975E\u7A7A\u7EA6\u675F",children:[{level:4,title:"2.1 \u4F5C\u7528",slug:"_2-1-\u4F5C\u7528",children:[]},{level:4,title:"2.2 \u5173\u952E\u5B57",slug:"_2-2-\u5173\u952E\u5B57",children:[]},{level:4,title:"2.3 \u7279\u70B9",slug:"_2-3-\u7279\u70B9",children:[]},{level:4,title:"2.4 \u6DFB\u52A0\u975E\u7A7A\u7EA6\u675F",slug:"_2-4-\u6DFB\u52A0\u975E\u7A7A\u7EA6\u675F",children:[]},{level:4,title:"2.5 \u5220\u9664\u975E\u7A7A\u7EA6\u675F",slug:"_2-5-\u5220\u9664\u975E\u7A7A\u7EA6\u675F",children:[]}]},{level:3,title:"3. \u552F\u4E00\u6027\u7EA6\u675F",slug:"_3-\u552F\u4E00\u6027\u7EA6\u675F",children:[{level:4,title:"3.1 \u4F5C\u7528",slug:"_3-1-\u4F5C\u7528",children:[]},{level:4,title:"3.2 \u5173\u952E\u5B57",slug:"_3-2-\u5173\u952E\u5B57",children:[]},{level:4,title:"3.3 \u7279\u70B9",slug:"_3-3-\u7279\u70B9",children:[]},{level:4,title:"3.4 \u6DFB\u52A0\uFF08\u590D\u5408\uFF09\u552F\u4E00\u7EA6\u675F",slug:"_3-4-\u6DFB\u52A0-\u590D\u5408-\u552F\u4E00\u7EA6\u675F",children:[]},{level:4,title:"3.5 \u5220\u9664\u552F\u4E00\u7EA6\u675F",slug:"_3-5-\u5220\u9664\u552F\u4E00\u7EA6\u675F",children:[]}]},{level:3,title:"4. PRIMARY KEY \u7EA6\u675F",slug:"_4-primary-key-\u7EA6\u675F",children:[{level:4,title:"4.1 \u4F5C\u7528",slug:"_4-1-\u4F5C\u7528",children:[]},{level:4,title:"4.2 \u5173\u952E\u5B57",slug:"_4-2-\u5173\u952E\u5B57",children:[]},{level:4,title:"4.3 \u7279\u70B9",slug:"_4-3-\u7279\u70B9",children:[]},{level:4,title:"4.4 \u6DFB\u52A0\uFF08\u590D\u5408\uFF09\u4E3B\u952E\u7EA6\u675F",slug:"_4-4-\u6DFB\u52A0-\u590D\u5408-\u4E3B\u952E\u7EA6\u675F",children:[]},{level:4,title:"4.5 \u5220\u9664\u4E3B\u952E\u7EA6\u675F",slug:"_4-5-\u5220\u9664\u4E3B\u952E\u7EA6\u675F",children:[]}]},{level:3,title:"5. \u81EA\u589E\u5217\uFF1AAUTO_INCREMENT",slug:"_5-\u81EA\u589E\u5217-auto-increment",children:[{level:4,title:"5.1 \u4F5C\u7528",slug:"_5-1-\u4F5C\u7528",children:[]},{level:4,title:"5.2 \u5173\u952E\u5B57",slug:"_5-2-\u5173\u952E\u5B57",children:[]},{level:4,title:"5.3 \u7279\u70B9\u548C\u8981\u6C42",slug:"_5-3-\u7279\u70B9\u548C\u8981\u6C42",children:[]},{level:4,title:"5.4 \u5982\u4F55\u6307\u5B9A\u81EA\u589E\u7EA6\u675F",slug:"_5-4-\u5982\u4F55\u6307\u5B9A\u81EA\u589E\u7EA6\u675F",children:[]},{level:4,title:"5.5 \u5982\u4F55\u5220\u9664\u81EA\u589E\u7EA6\u675F",slug:"_5-5-\u5982\u4F55\u5220\u9664\u81EA\u589E\u7EA6\u675F",children:[]},{level:4,title:"5.6 MySQL 8.0\u65B0\u7279\u6027\u2014\u81EA\u589E\u53D8\u91CF\u7684\u6301\u4E45\u5316",slug:"_5-6-mysql-8-0\u65B0\u7279\u6027\u2014\u81EA\u589E\u53D8\u91CF\u7684\u6301\u4E45\u5316",children:[]}]},{level:3,title:"6. FOREIGN KEY \u7EA6\u675F",slug:"_6-foreign-key-\u7EA6\u675F",children:[{level:4,title:"6.1 \u4F5C\u7528",slug:"_6-1-\u4F5C\u7528",children:[]},{level:4,title:"6.2 \u5173\u952E\u5B57",slug:"_6-2-\u5173\u952E\u5B57",children:[]},{level:4,title:"6.3 \u4E3B\u8868\u548C\u4ECE\u8868/\u7236\u8868\u548C\u5B50\u8868",slug:"_6-3-\u4E3B\u8868\u548C\u4ECE\u8868-\u7236\u8868\u548C\u5B50\u8868",children:[]},{level:4,title:"6.4 \u7279\u70B9",slug:"_6-4-\u7279\u70B9",children:[]},{level:4,title:"6.5 \u6DFB\u52A0\u5916\u952E\u7EA6\u675F",slug:"_6-5-\u6DFB\u52A0\u5916\u952E\u7EA6\u675F",children:[]},{level:4,title:"6.6 \u7EA6\u675F\u7B49\u7EA7",slug:"_6-6-\u7EA6\u675F\u7B49\u7EA7",children:[]},{level:4,title:"6.7 \u5220\u9664\u5916\u952E\u7EA6\u675F",slug:"_6-7-\u5220\u9664\u5916\u952E\u7EA6\u675F",children:[]},{level:4,title:"6.8 \u5F00\u53D1\u573A\u666F",slug:"_6-8-\u5F00\u53D1\u573A\u666F",children:[]},{level:4,title:"6.9 \u963F\u91CC\u5F00\u53D1\u89C4\u8303",slug:"_6-9-\u963F\u91CC\u5F00\u53D1\u89C4\u8303",children:[]}]},{level:3,title:"7. CHECK \u7EA6\u675F",slug:"_7-check-\u7EA6\u675F",children:[{level:4,title:"7.1 \u4F5C\u7528",slug:"_7-1-\u4F5C\u7528",children:[]},{level:4,title:"7.2 \u5173\u952E\u5B57",slug:"_7-2-\u5173\u952E\u5B57",children:[]},{level:4,title:"7.3 \u8BF4\u660E\uFF1AMySQL 5.7 \u4E0D\u652F\u6301",slug:"_7-3-\u8BF4\u660E-mysql-5-7-\u4E0D\u652F\u6301",children:[]}]},{level:3,title:"8. DEFAULT\u7EA6\u675F",slug:"_8-default\u7EA6\u675F",children:[{level:4,title:"8.1 \u4F5C\u7528",slug:"_8-1-\u4F5C\u7528",children:[]},{level:4,title:"8.2 \u5173\u952E\u5B57",slug:"_8-2-\u5173\u952E\u5B57",children:[]},{level:4,title:"8.3 \u5982\u4F55\u7ED9\u5B57\u6BB5\u52A0\u9ED8\u8BA4\u503C",slug:"_8-3-\u5982\u4F55\u7ED9\u5B57\u6BB5\u52A0\u9ED8\u8BA4\u503C",children:[]},{level:4,title:"8.4 \u5982\u4F55\u5220\u9664\u9ED8\u8BA4\u503C\u7EA6\u675F",slug:"_8-4-\u5982\u4F55\u5220\u9664\u9ED8\u8BA4\u503C\u7EA6\u675F",children:[]}]},{level:3,title:"9. \u9762\u8BD5",slug:"_9-\u9762\u8BD5",children:[]}]},{level:2,title:"\u7B2C14\u7AE0 \u89C6\u56FE",slug:"\u7B2C14\u7AE0-\u89C6\u56FE",children:[{level:3,title:"1. \u5E38\u89C1\u7684\u6570\u636E\u5E93\u5BF9\u8C61",slug:"_1-\u5E38\u89C1\u7684\u6570\u636E\u5E93\u5BF9\u8C61",children:[]},{level:3,title:"2. \u89C6\u56FE\u6982\u8FF0",slug:"_2-\u89C6\u56FE\u6982\u8FF0",children:[{level:4,title:"2.1 \u4E3A\u4EC0\u4E48\u4F7F\u7528\u89C6\u56FE\uFF1F",slug:"_2-1-\u4E3A\u4EC0\u4E48\u4F7F\u7528\u89C6\u56FE",children:[]},{level:4,title:"2.2 \u89C6\u56FE\u7684\u7406\u89E3",slug:"_2-2-\u89C6\u56FE\u7684\u7406\u89E3",children:[]}]},{level:3,title:"3. \u521B\u5EFA\u89C6\u56FE",slug:"_3-\u521B\u5EFA\u89C6\u56FE",children:[]},{level:3,title:"4. \u67E5\u770B\u89C6\u56FE",slug:"_4-\u67E5\u770B\u89C6\u56FE",children:[]},{level:3,title:"5. \u66F4\u65B0\u89C6\u56FE\u7684\u6570\u636E",slug:"_5-\u66F4\u65B0\u89C6\u56FE\u7684\u6570\u636E",children:[{level:4,title:"5.1 \u4E00\u822C\u60C5\u51B5",slug:"_5-1-\u4E00\u822C\u60C5\u51B5",children:[]},{level:4,title:"5.2 \u4E0D\u53EF\u66F4\u65B0\u7684\u89C6\u56FE",slug:"_5-2-\u4E0D\u53EF\u66F4\u65B0\u7684\u89C6\u56FE",children:[]}]},{level:3,title:"6. \u4FEE\u6539\u3001\u5220\u9664\u89C6\u56FE",slug:"_6-\u4FEE\u6539\u3001\u5220\u9664\u89C6\u56FE",children:[{level:4,title:"6.1 \u4FEE\u6539\u89C6\u56FE",slug:"_6-1-\u4FEE\u6539\u89C6\u56FE",children:[]},{level:4,title:"6.2 \u5220\u9664\u89C6\u56FE",slug:"_6-2-\u5220\u9664\u89C6\u56FE",children:[]}]},{level:3,title:"7. \u603B\u7ED3",slug:"_7-\u603B\u7ED3",children:[{level:4,title:"7.1 \u89C6\u56FE\u4F18\u70B9",slug:"_7-1-\u89C6\u56FE\u4F18\u70B9",children:[]},{level:4,title:"7.2 \u89C6\u56FE\u4E0D\u8DB3",slug:"_7-2-\u89C6\u56FE\u4E0D\u8DB3",children:[]}]}]},{level:2,title:"\u7B2C15\u7AE0 \u5B58\u50A8\u8FC7\u7A0B\u4E0E\u51FD\u6570",slug:"\u7B2C15\u7AE0-\u5B58\u50A8\u8FC7\u7A0B\u4E0E\u51FD\u6570",children:[{level:3,title:"1. \u5B58\u50A8\u8FC7\u7A0B\u6982\u8FF0",slug:"_1-\u5B58\u50A8\u8FC7\u7A0B\u6982\u8FF0",children:[{level:5,title:"1.1 \u7406\u89E3",slug:"_1-1-\u7406\u89E3",children:[]}]},{level:3,title:"2. \u521B\u5EFA\u5B58\u50A8\u8FC7\u7A0B",slug:"_2-\u521B\u5EFA\u5B58\u50A8\u8FC7\u7A0B",children:[{level:4,title:"2.1 \u8BED\u6CD5\u5206\u6790",slug:"_2-1-\u8BED\u6CD5\u5206\u6790",children:[]},{level:4,title:"2.2 \u4EE3\u7801\u4E3E\u4F8B",slug:"_2-2-\u4EE3\u7801\u4E3E\u4F8B",children:[]}]},{level:3,title:"3. \u8C03\u7528\u5B58\u50A8\u8FC7\u7A0B",slug:"_3-\u8C03\u7528\u5B58\u50A8\u8FC7\u7A0B",children:[{level:4,title:"3.1 \u8C03\u7528\u683C\u5F0F",slug:"_3-1-\u8C03\u7528\u683C\u5F0F",children:[]}]},{level:3,title:"4. \u5B58\u50A8\u51FD\u6570\u7684\u4F7F\u7528",slug:"_4-\u5B58\u50A8\u51FD\u6570\u7684\u4F7F\u7528",children:[{level:4,title:"4.1 \u8BED\u6CD5\u5206\u6790",slug:"_4-1-\u8BED\u6CD5\u5206\u6790",children:[]},{level:4,title:"4.2 \u8C03\u7528\u5B58\u50A8\u51FD\u6570",slug:"_4-2-\u8C03\u7528\u5B58\u50A8\u51FD\u6570",children:[]},{level:4,title:"4.3 \u4EE3\u7801\u4E3E\u4F8B",slug:"_4-3-\u4EE3\u7801\u4E3E\u4F8B",children:[]},{level:4,title:"4.4 \u5BF9\u6BD4\u5B58\u50A8\u51FD\u6570\u548C\u5B58\u50A8\u8FC7\u7A0B",slug:"_4-4-\u5BF9\u6BD4\u5B58\u50A8\u51FD\u6570\u548C\u5B58\u50A8\u8FC7\u7A0B",children:[]}]},{level:3,title:"5. \u5B58\u50A8\u8FC7\u7A0B\u548C\u51FD\u6570\u7684\u67E5\u770B\u3001\u4FEE\u6539\u3001\u5220\u9664",slug:"_5-\u5B58\u50A8\u8FC7\u7A0B\u548C\u51FD\u6570\u7684\u67E5\u770B\u3001\u4FEE\u6539\u3001\u5220\u9664",children:[{level:4,title:"5.1 \u67E5\u770B",slug:"_5-1-\u67E5\u770B",children:[]},{level:4,title:"5.2 \u4FEE\u6539",slug:"_5-2-\u4FEE\u6539",children:[]},{level:4,title:"5.3 \u5220\u9664",slug:"_5-3-\u5220\u9664",children:[]}]},{level:3,title:"6. \u5173\u4E8E\u5B58\u50A8\u8FC7\u7A0B\u4F7F\u7528\u7684\u4E89\u8BAE",slug:"_6-\u5173\u4E8E\u5B58\u50A8\u8FC7\u7A0B\u4F7F\u7528\u7684\u4E89\u8BAE",children:[{level:4,title:"6.1 \u4F18\u70B9",slug:"_6-1-\u4F18\u70B9",children:[]},{level:4,title:"6.2 \u7F3A\u70B9",slug:"_6-2-\u7F3A\u70B9",children:[]}]}]},{level:2,title:"\u7B2C16\u7AE0 \u53D8\u91CF\u3001\u6D41\u7A0B\u63A7\u5236\u4E0E\u6E38\u6807",slug:"\u7B2C16\u7AE0-\u53D8\u91CF\u3001\u6D41\u7A0B\u63A7\u5236\u4E0E\u6E38\u6807",children:[{level:3,title:"1. \u53D8\u91CF",slug:"_1-\u53D8\u91CF",children:[{level:4,title:"1.1 \u7CFB\u7EDF\u53D8\u91CF",slug:"_1-1-\u7CFB\u7EDF\u53D8\u91CF",children:[{level:5,title:"1.1.1 \u7CFB\u7EDF\u53D8\u91CF\u5206\u7C7B",slug:"_1-1-1-\u7CFB\u7EDF\u53D8\u91CF\u5206\u7C7B",children:[]},{level:5,title:"1.1.2 \u67E5\u770B\u7CFB\u7EDF\u53D8\u91CF",slug:"_1-1-2-\u67E5\u770B\u7CFB\u7EDF\u53D8\u91CF",children:[]}]},{level:4,title:"1.2 \u7528\u6237\u53D8\u91CF",slug:"_1-2-\u7528\u6237\u53D8\u91CF",children:[{level:5,title:"1.2.1 \u7528\u6237\u53D8\u91CF\u5206\u7C7B",slug:"_1-2-1-\u7528\u6237\u53D8\u91CF\u5206\u7C7B",children:[]},{level:5,title:"1.2.2 \u4F1A\u8BDD\u7528\u6237\u53D8\u91CF",slug:"_1-2-2-\u4F1A\u8BDD\u7528\u6237\u53D8\u91CF",children:[]},{level:5,title:"1.2.3 \u5C40\u90E8\u53D8\u91CF",slug:"_1-2-3-\u5C40\u90E8\u53D8\u91CF",children:[]},{level:5,title:"1.2.4 \u5BF9\u6BD4\u4F1A\u8BDD\u7528\u6237\u53D8\u91CF\u4E0E\u5C40\u90E8\u53D8\u91CF",slug:"_1-2-4-\u5BF9\u6BD4\u4F1A\u8BDD\u7528\u6237\u53D8\u91CF\u4E0E\u5C40\u90E8\u53D8\u91CF",children:[]}]}]},{level:3,title:"2. \u5B9A\u4E49\u6761\u4EF6\u4E0E\u5904\u7406\u7A0B\u5E8F",slug:"_2-\u5B9A\u4E49\u6761\u4EF6\u4E0E\u5904\u7406\u7A0B\u5E8F",children:[{level:4,title:"2.1 \u5B9A\u4E49\u6761\u4EF6",slug:"_2-1-\u5B9A\u4E49\u6761\u4EF6",children:[]},{level:4,title:"2.2 \u5B9A\u4E49\u5904\u7406\u7A0B\u5E8F",slug:"_2-2-\u5B9A\u4E49\u5904\u7406\u7A0B\u5E8F",children:[]}]},{level:3,title:"3. \u6D41\u7A0B\u63A7\u5236",slug:"_3-\u6D41\u7A0B\u63A7\u5236",children:[{level:4,title:"3.1 \u5206\u652F\u7ED3\u6784\u4E4B IF",slug:"_3-1-\u5206\u652F\u7ED3\u6784\u4E4B-if",children:[]},{level:4,title:"3.2 \u5206\u652F\u7ED3\u6784\u4E4B CASE",slug:"_3-2-\u5206\u652F\u7ED3\u6784\u4E4B-case",children:[]},{level:4,title:"3.3 \u5FAA\u73AF\u7ED3\u6784\u4E4BLOOP",slug:"_3-3-\u5FAA\u73AF\u7ED3\u6784\u4E4Bloop",children:[]},{level:4,title:"3.4 \u5FAA\u73AF\u7ED3\u6784\u4E4BWHILE",slug:"_3-4-\u5FAA\u73AF\u7ED3\u6784\u4E4Bwhile",children:[]},{level:4,title:"3.5 \u5FAA\u73AF\u7ED3\u6784\u4E4BREPEAT",slug:"_3-5-\u5FAA\u73AF\u7ED3\u6784\u4E4Brepeat",children:[]},{level:4,title:"3.6 \u8DF3\u8F6C\u8BED\u53E5\u4E4BLEAVE\u8BED\u53E5",slug:"_3-6-\u8DF3\u8F6C\u8BED\u53E5\u4E4Bleave\u8BED\u53E5",children:[]},{level:4,title:"3.7 \u8DF3\u8F6C\u8BED\u53E5\u4E4BITERATE\u8BED\u53E5",slug:"_3-7-\u8DF3\u8F6C\u8BED\u53E5\u4E4Biterate\u8BED\u53E5",children:[]}]},{level:3,title:"4. \u6E38\u6807",slug:"_4-\u6E38\u6807",children:[{level:4,title:"4.1 \u4EC0\u4E48\u662F\u6E38\u6807\uFF08\u6216\u5149\u6807\uFF09",slug:"_4-1-\u4EC0\u4E48\u662F\u6E38\u6807-\u6216\u5149\u6807",children:[]},{level:4,title:"4.2 \u4F7F\u7528\u6E38\u6807\u6B65\u9AA4",slug:"_4-2-\u4F7F\u7528\u6E38\u6807\u6B65\u9AA4",children:[]},{level:4,title:"4.3 \u5C0F\u7ED3",slug:"_4-3-\u5C0F\u7ED3",children:[]},{level:4,title:"\u8865\u5145\uFF1AMySQL 8.0\u7684\u65B0\u7279\u6027\u2014\u5168\u5C40\u53D8\u91CF\u7684\u6301\u4E45\u5316",slug:"\u8865\u5145-mysql-8-0\u7684\u65B0\u7279\u6027\u2014\u5168\u5C40\u53D8\u91CF\u7684\u6301\u4E45\u5316",children:[]}]}]},{level:2,title:"\u7B2C17\u7AE0 \u89E6\u53D1\u5668",slug:"\u7B2C17\u7AE0-\u89E6\u53D1\u5668",children:[{level:3,title:"1. \u89E6\u53D1\u5668\u6982\u8FF0",slug:"_1-\u89E6\u53D1\u5668\u6982\u8FF0",children:[]},{level:3,title:"2. \u89E6\u53D1\u5668\u7684\u521B\u5EFA",slug:"_2-\u89E6\u53D1\u5668\u7684\u521B\u5EFA",children:[{level:4,title:"2.1 \u521B\u5EFA\u89E6\u53D1\u5668\u8BED\u6CD5",slug:"_2-1-\u521B\u5EFA\u89E6\u53D1\u5668\u8BED\u6CD5",children:[]}]},{level:3,title:"3. \u67E5\u770B\u3001\u5220\u9664\u89E6\u53D1\u5668",slug:"_3-\u67E5\u770B\u3001\u5220\u9664\u89E6\u53D1\u5668",children:[{level:4,title:"3.1 \u67E5\u770B\u89E6\u53D1\u5668",slug:"_3-1-\u67E5\u770B\u89E6\u53D1\u5668",children:[]},{level:4,title:"3.2 \u5220\u9664\u89E6\u53D1\u5668",slug:"_3-2-\u5220\u9664\u89E6\u53D1\u5668",children:[]}]},{level:3,title:"4. \u89E6\u53D1\u5668\u7684\u4F18\u7F3A\u70B9",slug:"_4-\u89E6\u53D1\u5668\u7684\u4F18\u7F3A\u70B9",children:[{level:4,title:"4.1 \u4F18\u70B9",slug:"_4-1-\u4F18\u70B9",children:[]},{level:4,title:"4.2 \u7F3A\u70B9",slug:"_4-2-\u7F3A\u70B9",children:[]},{level:4,title:"4.3 \u6CE8\u610F\u70B9",slug:"_4-3-\u6CE8\u610F\u70B9",children:[]}]}]},{level:2,title:"\u7B2C18\u7AE0 MySQL8\u5176\u5B83\u65B0\u7279\u6027",slug:"\u7B2C18\u7AE0-mysql8\u5176\u5B83\u65B0\u7279\u6027",children:[{level:3,title:"1. \u65B0\u7279\u60271\uFF1A\u7A97\u53E3\u51FD\u6570",slug:"_1-\u65B0\u7279\u60271-\u7A97\u53E3\u51FD\u6570",children:[{level:4,title:"1.1 \u7A97\u53E3\u51FD\u6570\u5206\u7C7B",slug:"_1-1-\u7A97\u53E3\u51FD\u6570\u5206\u7C7B",children:[]},{level:4,title:"1.2 \u8BED\u6CD5\u7ED3\u6784",slug:"_1-2-\u8BED\u6CD5\u7ED3\u6784",children:[]},{level:4,title:"1.3 \u5C0F \u7ED3",slug:"_1-3-\u5C0F-\u7ED3",children:[]}]},{level:3,title:"2. \u65B0\u7279\u60272\uFF1A\u516C\u7528\u8868\u8868\u8FBE\u5F0F",slug:"_2-\u65B0\u7279\u60272-\u516C\u7528\u8868\u8868\u8FBE\u5F0F",children:[{level:4,title:"2.1 \u666E\u901A\u516C\u7528\u8868\u8868\u8FBE\u5F0F",slug:"_2-1-\u666E\u901A\u516C\u7528\u8868\u8868\u8FBE\u5F0F",children:[]},{level:4,title:"2.2 \u9012\u5F52\u516C\u7528\u8868\u8868\u8FBE\u5F0F",slug:"_2-2-\u9012\u5F52\u516C\u7528\u8868\u8868\u8FBE\u5F0F",children:[]},{level:4,title:"2.3 \u5C0F \u7ED3",slug:"_2-3-\u5C0F-\u7ED3",children:[]}]}]}],git:{updatedTime:1710173765e3,contributors:[{name:"shailene",email:"64005626+shaileneF@users.noreply.github.com",commits:1}]},filePathRelative:"java/\u6570\u636E\u5E93/mysql/\u57FA\u7840\u7BC7/MySQL\u6570\u636E\u5E93\u7B14\u8BB0-\u7B2C\u4E00\u90E8\u5206.md"};export{l as data};
                    +const l={key:"v-791cd9a5",path:"/java/%E6%95%B0%E6%8D%AE%E5%BA%93/mysql/%E5%9F%BA%E7%A1%80%E7%AF%87/MySQL%E6%95%B0%E6%8D%AE%E5%BA%93%E7%AC%94%E8%AE%B0-%E7%AC%AC%E4%B8%80%E9%83%A8%E5%88%86.html",title:"\u7B2C\u4E00\u90E8\u5206 MySQL\u57FA\u7840\u7BC7",lang:"zh-CN",frontmatter:{},excerpt:"",headers:[{level:2,title:"\u7B2C01\u7AE0 \u6570\u636E\u5E93\u6982\u8FF0",slug:"\u7B2C01\u7AE0-\u6570\u636E\u5E93\u6982\u8FF0",children:[{level:3,title:"1. \u4E3A\u4EC0\u4E48\u8981\u4F7F\u7528\u6570\u636E\u5E93",slug:"_1-\u4E3A\u4EC0\u4E48\u8981\u4F7F\u7528\u6570\u636E\u5E93",children:[]},{level:3,title:"2. \u6570\u636E\u5E93\u4E0E\u6570\u636E\u5E93\u7BA1\u7406\u7CFB\u7EDF",slug:"_2-\u6570\u636E\u5E93\u4E0E\u6570\u636E\u5E93\u7BA1\u7406\u7CFB\u7EDF",children:[{level:4,title:"2.1 \u6570\u636E\u5E93\u7684\u76F8\u5173\u6982\u5FF5",slug:"_2-1-\u6570\u636E\u5E93\u7684\u76F8\u5173\u6982\u5FF5",children:[]},{level:4,title:"2.2. \u6570\u636E\u5E93\u4E0E\u6570\u636E\u5E93\u7BA1\u7406\u7CFB\u7EDF\u4E4B\u95F4\u7684\u5173\u7CFB",slug:"_2-2-\u6570\u636E\u5E93\u4E0E\u6570\u636E\u5E93\u7BA1\u7406\u7CFB\u7EDF\u4E4B\u95F4\u7684\u5173\u7CFB",children:[]}]},{level:3,title:"3. RDBMS\u4E0E\u975ERDBMS",slug:"_3-rdbms\u4E0E\u975Erdbms",children:[{level:4,title:"3.1 \u5173\u7CFB\u578B\u6570\u636E\u5E93(RDBMS)",slug:"_3-1-\u5173\u7CFB\u578B\u6570\u636E\u5E93-rdbms",children:[{level:5,title:"3.1.1 \u5B9E\u8D28",slug:"_3-1-1-\u5B9E\u8D28",children:[]},{level:5,title:"3.1.2 \u4F18\u52BF",slug:"_3-1-2-\u4F18\u52BF",children:[]}]},{level:4,title:"3.2 \u975E\u5173\u7CFB\u578B\u6570\u636E\u5E93(\u975ERDBMS)",slug:"_3-2-\u975E\u5173\u7CFB\u578B\u6570\u636E\u5E93-\u975Erdbms",children:[{level:5,title:"3.2.1 \u4ECB\u7ECD",slug:"_3-2-1-\u4ECB\u7ECD",children:[]}]}]},{level:3,title:"4. \u5173\u7CFB\u578B\u6570\u636E\u5E93\u8BBE\u8BA1\u89C4\u5219",slug:"_4-\u5173\u7CFB\u578B\u6570\u636E\u5E93\u8BBE\u8BA1\u89C4\u5219",children:[{level:4,title:"4.1 \u8868\u3001\u8BB0\u5F55\u3001\u5B57\u6BB5",slug:"_4-1-\u8868\u3001\u8BB0\u5F55\u3001\u5B57\u6BB5",children:[]},{level:4,title:"4.2 \u8868\u7684\u5173\u8054\u5173\u7CFB",slug:"_4-2-\u8868\u7684\u5173\u8054\u5173\u7CFB",children:[{level:5,title:"4.2.1 \u4E00\u5BF9\u4E00\u5173\u8054",slug:"_4-2-1-\u4E00\u5BF9\u4E00\u5173\u8054",children:[]},{level:5,title:"4.2.1 \u4E00\u5BF9\u591A\u5173\u7CFB",slug:"_4-2-1-\u4E00\u5BF9\u591A\u5173\u7CFB",children:[]},{level:5,title:"4.2.3 \u591A\u5BF9\u591A\u5173\u7CFB",slug:"_4-2-3-\u591A\u5BF9\u591A\u5173\u7CFB",children:[]},{level:5,title:"4.2.4 \u81EA\u6211\u5F15\u7528",slug:"_4-2-4-\u81EA\u6211\u5F15\u7528",children:[]}]}]}]},{level:2,title:"\u7B2C02\u7AE0 MySQL\u73AF\u5883\u642D\u5EFA\uFF08\u7565\uFF09",slug:"\u7B2C02\u7AE0-mysql\u73AF\u5883\u642D\u5EFA-\u7565",children:[{level:3,title:"1. MySQL\u6F14\u793A\u4F7F\u7528",slug:"_1-mysql\u6F14\u793A\u4F7F\u7528",children:[{level:4,title:"1.1 MySQL\u4F7F\u7528\u6F14\u793A",slug:"_1-1-mysql\u4F7F\u7528\u6F14\u793A",children:[]},{level:4,title:"1.2 MySQL\u7684\u7F16\u7801\u8BBE\u7F6E",slug:"_1-2-mysql\u7684\u7F16\u7801\u8BBE\u7F6E",children:[]}]},{level:3,title:"\u95EE\u98981\uFF1Aroot\u7528\u6237\u5BC6\u7801\u5FD8\u8BB0\uFF0C\u91CD\u7F6E\u7684\u64CD\u4F5C",slug:"\u95EE\u98981-root\u7528\u6237\u5BC6\u7801\u5FD8\u8BB0-\u91CD\u7F6E\u7684\u64CD\u4F5C",children:[]},{level:3,title:"\u95EE\u98982\uFF1Amysql\u547D\u4EE4\u62A5\u201C\u4E0D\u662F\u5185\u90E8\u6216\u5916\u90E8\u547D\u4EE4\u201D",slug:"\u95EE\u98982-mysql\u547D\u4EE4\u62A5-\u4E0D\u662F\u5185\u90E8\u6216\u5916\u90E8\u547D\u4EE4",children:[]},{level:3,title:"\u95EE\u98983\uFF1A No database selected",slug:"\u95EE\u98983-no-database-selected",children:[]},{level:3,title:"\u95EE\u98984\uFF1A\u547D\u4EE4\u884C\u5BA2\u6237\u7AEF\u7684\u5B57\u7B26\u96C6\u95EE\u9898",slug:"\u95EE\u98984-\u547D\u4EE4\u884C\u5BA2\u6237\u7AEF\u7684\u5B57\u7B26\u96C6\u95EE\u9898",children:[]},{level:3,title:"\u95EE\u98985\uFF1A\u4FEE\u6539\u6570\u636E\u5E93\u548C\u8868\u7684\u5B57\u7B26\u7F16\u7801",slug:"\u95EE\u98985-\u4FEE\u6539\u6570\u636E\u5E93\u548C\u8868\u7684\u5B57\u7B26\u7F16\u7801",children:[]}]},{level:2,title:"\u7B2C03\u7AE0 \u57FA\u672C\u7684SELECT\u8BED\u53E5",slug:"\u7B2C03\u7AE0-\u57FA\u672C\u7684select\u8BED\u53E5",children:[{level:3,title:"1. SQL\u6982\u8FF0",slug:"_1-sql\u6982\u8FF0",children:[{level:4,title:"1.1 SQL\u5206\u7C7B",slug:"_1-1-sql\u5206\u7C7B",children:[]}]},{level:3,title:"2. SQL\u8BED\u8A00\u7684\u89C4\u5219\u4E0E\u89C4\u8303",slug:"_2-sql\u8BED\u8A00\u7684\u89C4\u5219\u4E0E\u89C4\u8303",children:[{level:4,title:"2.1 \u57FA\u672C\u89C4\u5219",slug:"_2-1-\u57FA\u672C\u89C4\u5219",children:[]},{level:4,title:"2.2 SQL\u5927\u5C0F\u5199\u89C4\u8303 \uFF08\u5EFA\u8BAE\u9075\u5B88\uFF09",slug:"_2-2-sql\u5927\u5C0F\u5199\u89C4\u8303-\u5EFA\u8BAE\u9075\u5B88",children:[]},{level:4,title:"2.3 \u6CE8 \u91CA",slug:"_2-3-\u6CE8-\u91CA",children:[]},{level:4,title:"2.4 \u547D\u540D\u89C4\u5219\uFF08\u6682\u65F6\u4E86\u89E3\uFF09",slug:"_2-4-\u547D\u540D\u89C4\u5219-\u6682\u65F6\u4E86\u89E3",children:[]},{level:4,title:"2.5 \u6570\u636E\u5BFC\u5165\u6307\u4EE4",slug:"_2-5-\u6570\u636E\u5BFC\u5165\u6307\u4EE4",children:[]}]},{level:3,title:"3. \u57FA\u672C\u7684SELECT\u8BED\u53E5",slug:"_3-\u57FA\u672C\u7684select\u8BED\u53E5",children:[{level:4,title:"3.0 SELECT...",slug:"_3-0-select",children:[]},{level:4,title:"3.1 SELECT ... FROM",slug:"_3-1-select-from",children:[]},{level:4,title:"3.2 \u5217\u7684\u522B\u540D",slug:"_3-2-\u5217\u7684\u522B\u540D",children:[]},{level:4,title:"3.3 \u53BB\u9664\u91CD\u590D\u884C",slug:"_3-3-\u53BB\u9664\u91CD\u590D\u884C",children:[]},{level:4,title:"3.4 \u7A7A\u503C\u53C2\u4E0E\u8FD0\u7B97",slug:"_3-4-\u7A7A\u503C\u53C2\u4E0E\u8FD0\u7B97",children:[]},{level:4,title:"3.5 \u7740\u91CD\u53F7",slug:"_3-5-\u7740\u91CD\u53F7",children:[]},{level:4,title:"3.6 \u67E5\u8BE2\u5E38\u6570",slug:"_3-6-\u67E5\u8BE2\u5E38\u6570",children:[]}]},{level:3,title:"4. \u663E\u793A\u8868\u7ED3\u6784",slug:"_4-\u663E\u793A\u8868\u7ED3\u6784",children:[]},{level:3,title:"5. \u8FC7\u6EE4\u6570\u636E",slug:"_5-\u8FC7\u6EE4\u6570\u636E",children:[]}]},{level:2,title:"\u7B2C04\u7AE0 \u8FD0\u7B97\u7B26",slug:"\u7B2C04\u7AE0-\u8FD0\u7B97\u7B26",children:[{level:3,title:"1. \u7B97\u672F\u8FD0\u7B97\u7B26",slug:"_1-\u7B97\u672F\u8FD0\u7B97\u7B26",children:[]},{level:3,title:"2. \u6BD4\u8F83\u8FD0\u7B97\u7B26",slug:"_2-\u6BD4\u8F83\u8FD0\u7B97\u7B26",children:[]},{level:3,title:"3. \u903B\u8F91\u8FD0\u7B97\u7B26",slug:"_3-\u903B\u8F91\u8FD0\u7B97\u7B26",children:[]},{level:3,title:"4. \u4F4D\u8FD0\u7B97\u7B26",slug:"_4-\u4F4D\u8FD0\u7B97\u7B26",children:[]}]},{level:2,title:"\u7B2C05\u7AE0 \u6392\u5E8F\u4E0E\u5206\u9875",slug:"\u7B2C05\u7AE0-\u6392\u5E8F\u4E0E\u5206\u9875",children:[{level:3,title:"1. \u6392\u5E8F\u6570\u636E",slug:"_1-\u6392\u5E8F\u6570\u636E",children:[{level:4,title:"1.1 \u6392\u5E8F\u89C4\u5219",slug:"_1-1-\u6392\u5E8F\u89C4\u5219",children:[]}]},{level:3,title:"2. \u5206\u9875",slug:"_2-\u5206\u9875",children:[{level:4,title:"2.1 \u5B9E\u73B0\u89C4\u5219",slug:"_2-1-\u5B9E\u73B0\u89C4\u5219",children:[]}]}]},{level:2,title:"\u7B2C06\u7AE0 \u591A\u8868\u67E5\u8BE2",slug:"\u7B2C06\u7AE0-\u591A\u8868\u67E5\u8BE2",children:[{level:3,title:"1. \u4E00\u4E2A\u6848\u4F8B\u5F15\u53D1\u7684\u591A\u8868\u8FDE\u63A5",slug:"_1-\u4E00\u4E2A\u6848\u4F8B\u5F15\u53D1\u7684\u591A\u8868\u8FDE\u63A5",children:[{level:4,title:"1.1 \u7B1B\u5361\u5C14\u79EF\uFF08\u6216\u4EA4\u53C9\u8FDE\u63A5\uFF09\u7684\u7406\u89E3",slug:"_1-1-\u7B1B\u5361\u5C14\u79EF-\u6216\u4EA4\u53C9\u8FDE\u63A5-\u7684\u7406\u89E3",children:[]},{level:4,title:"1.2 \u6CE8\u610F",slug:"_1-2-\u6CE8\u610F",children:[]}]},{level:3,title:"2. \u591A\u8868\u67E5\u8BE2\u5206\u7C7B\u8BB2\u89E3",slug:"_2-\u591A\u8868\u67E5\u8BE2\u5206\u7C7B\u8BB2\u89E3",children:[{level:4,title:"\u5206\u7C7B1\uFF1A\u7B49\u503C\u8FDE\u63A5 vs \u975E\u7B49\u503C\u8FDE\u63A5",slug:"\u5206\u7C7B1-\u7B49\u503C\u8FDE\u63A5-vs-\u975E\u7B49\u503C\u8FDE\u63A5",children:[]},{level:4,title:"\u5206\u7C7B2\uFF1A\u81EA\u8FDE\u63A5 vs \u975E\u81EA\u8FDE\u63A5",slug:"\u5206\u7C7B2-\u81EA\u8FDE\u63A5-vs-\u975E\u81EA\u8FDE\u63A5",children:[]},{level:4,title:"\u5206\u7C7B3\uFF1A\u5185\u8FDE\u63A5  vs  \u5916\u8FDE\u63A5",slug:"\u5206\u7C7B3-\u5185\u8FDE\u63A5-vs-\u5916\u8FDE\u63A5",children:[]}]},{level:3,title:"3. SQL99\u8BED\u6CD5\u5B9E\u73B0\u591A\u8868\u67E5\u8BE2",slug:"_3-sql99\u8BED\u6CD5\u5B9E\u73B0\u591A\u8868\u67E5\u8BE2",children:[{level:4,title:"3.1 \u57FA\u672C\u8BED\u6CD5",slug:"_3-1-\u57FA\u672C\u8BED\u6CD5",children:[]},{level:4,title:"3.2 \u5185\u8FDE\u63A5(INNER JOIN)\u7684\u5B9E\u73B0",slug:"_3-2-\u5185\u8FDE\u63A5-inner-join-\u7684\u5B9E\u73B0",children:[]},{level:4,title:"3.3 \u5916\u8FDE\u63A5(OUTER JOIN)\u7684\u5B9E\u73B0",slug:"_3-3-\u5916\u8FDE\u63A5-outer-join-\u7684\u5B9E\u73B0",children:[{level:5,title:"3.3.1 \u5DE6\u5916\u8FDE\u63A5(LEFT OUTER JOIN)",slug:"_3-3-1-\u5DE6\u5916\u8FDE\u63A5-left-outer-join",children:[]},{level:5,title:"3.3.2 \u53F3\u5916\u8FDE\u63A5(RIGHT OUTER JOIN)",slug:"_3-3-2-\u53F3\u5916\u8FDE\u63A5-right-outer-join",children:[]}]}]},{level:3,title:"4. UNION\u7684\u4F7F\u7528",slug:"_4-union\u7684\u4F7F\u7528",children:[]},{level:3,title:"5. 7\u79CDSQL JOINS\u7684\u5B9E\u73B0",slug:"_5-7\u79CDsql-joins\u7684\u5B9E\u73B0",children:[{level:4,title:"5.1 \u4E3E\u4F8B",slug:"_5-1-\u4E3E\u4F8B",children:[]},{level:4,title:"5.2 \u8BED\u6CD5\u683C\u5F0F\u5C0F\u7ED3",slug:"_5-2-\u8BED\u6CD5\u683C\u5F0F\u5C0F\u7ED3",children:[]}]},{level:3,title:"6. SQL99\u8BED\u6CD5\u65B0\u7279\u6027",slug:"_6-sql99\u8BED\u6CD5\u65B0\u7279\u6027",children:[{level:4,title:"6.1 \u81EA\u7136\u8FDE\u63A5",slug:"_6-1-\u81EA\u7136\u8FDE\u63A5",children:[]},{level:4,title:"6.2 USING\u8FDE\u63A5",slug:"_6-2-using\u8FDE\u63A5",children:[]}]}]},{level:2,title:"\u7B2C07\u7AE0 \u5355\u884C\u51FD\u6570",slug:"\u7B2C07\u7AE0-\u5355\u884C\u51FD\u6570",children:[{level:3,title:"1. \u6570\u503C\u51FD\u6570",slug:"_1-\u6570\u503C\u51FD\u6570",children:[{level:4,title:"1.1 \u57FA\u672C\u51FD\u6570",slug:"_1-1-\u57FA\u672C\u51FD\u6570",children:[]},{level:4,title:"1.2 \u89D2\u5EA6\u4E0E\u5F27\u5EA6",slug:"_1-2-\u89D2\u5EA6\u4E0E\u5F27\u5EA6",children:[]},{level:4,title:"1.3 \u4E09\u89D2\u51FD\u6570",slug:"_1-3-\u4E09\u89D2\u51FD\u6570",children:[]},{level:4,title:"1.4 \u6307\u6570\u4E0E\u5BF9\u6570",slug:"_1-4-\u6307\u6570\u4E0E\u5BF9\u6570",children:[]},{level:4,title:"1.5 \u8FDB\u5236\u95F4\u7684\u8F6C\u6362",slug:"_1-5-\u8FDB\u5236\u95F4\u7684\u8F6C\u6362",children:[]}]},{level:3,title:"2. \u5B57\u7B26\u4E32\u51FD\u6570",slug:"_2-\u5B57\u7B26\u4E32\u51FD\u6570",children:[]},{level:3,title:"3. \u65E5\u671F\u548C\u65F6\u95F4\u51FD\u6570",slug:"_3-\u65E5\u671F\u548C\u65F6\u95F4\u51FD\u6570",children:[{level:4,title:"3.1 \u83B7\u53D6\u65E5\u671F\u3001\u65F6\u95F4",slug:"_3-1-\u83B7\u53D6\u65E5\u671F\u3001\u65F6\u95F4",children:[]},{level:4,title:"3.2 \u65E5\u671F\u4E0E\u65F6\u95F4\u6233\u7684\u8F6C\u6362",slug:"_3-2-\u65E5\u671F\u4E0E\u65F6\u95F4\u6233\u7684\u8F6C\u6362",children:[]},{level:4,title:"3.3 \u83B7\u53D6\u6708\u4EFD\u3001\u661F\u671F\u3001\u661F\u671F\u6570\u3001\u5929\u6570\u7B49\u51FD\u6570",slug:"_3-3-\u83B7\u53D6\u6708\u4EFD\u3001\u661F\u671F\u3001\u661F\u671F\u6570\u3001\u5929\u6570\u7B49\u51FD\u6570",children:[]},{level:4,title:"3.4 \u65E5\u671F\u7684\u64CD\u4F5C\u51FD\u6570",slug:"_3-4-\u65E5\u671F\u7684\u64CD\u4F5C\u51FD\u6570",children:[]},{level:4,title:"3.5 \u65F6\u95F4\u548C\u79D2\u949F\u8F6C\u6362\u7684\u51FD\u6570",slug:"_3-5-\u65F6\u95F4\u548C\u79D2\u949F\u8F6C\u6362\u7684\u51FD\u6570",children:[]},{level:4,title:"3.6 \u8BA1\u7B97\u65E5\u671F\u548C\u65F6\u95F4\u7684\u51FD\u6570",slug:"_3-6-\u8BA1\u7B97\u65E5\u671F\u548C\u65F6\u95F4\u7684\u51FD\u6570",children:[]},{level:4,title:"3.7 \u65E5\u671F\u7684\u683C\u5F0F\u5316\u4E0E\u89E3\u6790",slug:"_3-7-\u65E5\u671F\u7684\u683C\u5F0F\u5316\u4E0E\u89E3\u6790",children:[]}]},{level:3,title:"4. \u6D41\u7A0B\u63A7\u5236\u51FD\u6570",slug:"_4-\u6D41\u7A0B\u63A7\u5236\u51FD\u6570",children:[]},{level:3,title:"5. \u52A0\u5BC6\u4E0E\u89E3\u5BC6\u51FD\u6570",slug:"_5-\u52A0\u5BC6\u4E0E\u89E3\u5BC6\u51FD\u6570",children:[]},{level:3,title:"6. MySQL\u4FE1\u606F\u51FD\u6570",slug:"_6-mysql\u4FE1\u606F\u51FD\u6570",children:[]},{level:3,title:"7. \u5176\u4ED6\u51FD\u6570",slug:"_7-\u5176\u4ED6\u51FD\u6570",children:[]}]},{level:2,title:"\u7B2C08\u7AE0 \u805A\u5408\u51FD\u6570",slug:"\u7B2C08\u7AE0-\u805A\u5408\u51FD\u6570",children:[{level:3,title:"1. \u805A\u5408\u51FD\u6570\u4ECB\u7ECD",slug:"_1-\u805A\u5408\u51FD\u6570\u4ECB\u7ECD",children:[{level:4,title:"\u6982\u8FF0",slug:"\u6982\u8FF0",children:[]},{level:4,title:"1.1 AVG\u548CSUM\u51FD\u6570",slug:"_1-1-avg\u548Csum\u51FD\u6570",children:[]},{level:4,title:"1.2 MIN\u548CMAX\u51FD\u6570",slug:"_1-2-min\u548Cmax\u51FD\u6570",children:[]},{level:4,title:"1.3 COUNT\u51FD\u6570",slug:"_1-3-count\u51FD\u6570",children:[]}]},{level:3,title:"2. GROUP BY",slug:"_2-group-by",children:[{level:4,title:"2.1 \u57FA\u672C\u4F7F\u7528",slug:"_2-1-\u57FA\u672C\u4F7F\u7528",children:[]},{level:4,title:"2.2 \u4F7F\u7528\u591A\u4E2A\u5217\u5206\u7EC4",slug:"_2-2-\u4F7F\u7528\u591A\u4E2A\u5217\u5206\u7EC4",children:[]},{level:4,title:"2.3 GROUP BY\u4E2D\u4F7F\u7528WITH ROLLUP",slug:"_2-3-group-by\u4E2D\u4F7F\u7528with-rollup",children:[]}]},{level:3,title:"3. HAVING",slug:"_3-having",children:[{level:4,title:"3.1 \u57FA\u672C\u4F7F\u7528",slug:"_3-1-\u57FA\u672C\u4F7F\u7528",children:[]},{level:4,title:"3.2 WHERE\u548CHAVING\u7684\u5BF9\u6BD4",slug:"_3-2-where\u548Chaving\u7684\u5BF9\u6BD4",children:[]}]},{level:3,title:"4. SELECT\u7684\u6267\u884C\u8FC7\u7A0B",slug:"_4-select\u7684\u6267\u884C\u8FC7\u7A0B",children:[{level:4,title:"4.1 \u67E5\u8BE2\u7684\u7ED3\u6784",slug:"_4-1-\u67E5\u8BE2\u7684\u7ED3\u6784",children:[]},{level:4,title:"4.2 SELECT\u6267\u884C\u987A\u5E8F",slug:"_4-2-select\u6267\u884C\u987A\u5E8F",children:[]},{level:4,title:"4.3 SQL \u7684\u6267\u884C\u539F\u7406",slug:"_4-3-sql-\u7684\u6267\u884C\u539F\u7406",children:[]}]}]},{level:2,title:"\u7B2C09\u7AE0 \u5B50\u67E5\u8BE2",slug:"\u7B2C09\u7AE0-\u5B50\u67E5\u8BE2",children:[{level:3,title:"1. \u9700\u6C42\u5206\u6790\u4E0E\u95EE\u9898\u89E3\u51B3",slug:"_1-\u9700\u6C42\u5206\u6790\u4E0E\u95EE\u9898\u89E3\u51B3",children:[{level:4,title:"1.1 \u5B9E\u9645\u95EE\u9898",slug:"_1-1-\u5B9E\u9645\u95EE\u9898",children:[]},{level:4,title:"1.2 \u5B50\u67E5\u8BE2\u7684\u57FA\u672C\u4F7F\u7528",slug:"_1-2-\u5B50\u67E5\u8BE2\u7684\u57FA\u672C\u4F7F\u7528",children:[]},{level:4,title:"1.3 \u5B50\u67E5\u8BE2\u7684\u5206\u7C7B",slug:"_1-3-\u5B50\u67E5\u8BE2\u7684\u5206\u7C7B",children:[]}]},{level:3,title:"2. \u5355\u884C\u5B50\u67E5\u8BE2",slug:"_2-\u5355\u884C\u5B50\u67E5\u8BE2",children:[{level:4,title:"2.1 \u5355\u884C\u6BD4\u8F83\u64CD\u4F5C\u7B26",slug:"_2-1-\u5355\u884C\u6BD4\u8F83\u64CD\u4F5C\u7B26",children:[]},{level:4,title:"2.2 \u4EE3\u7801\u793A\u4F8B",slug:"_2-2-\u4EE3\u7801\u793A\u4F8B",children:[]},{level:4,title:"2.3 HAVING \u4E2D\u7684\u5B50\u67E5\u8BE2",slug:"_2-3-having-\u4E2D\u7684\u5B50\u67E5\u8BE2",children:[]},{level:4,title:"2.4 CASE\u4E2D\u7684\u5B50\u67E5\u8BE2",slug:"_2-4-case\u4E2D\u7684\u5B50\u67E5\u8BE2",children:[]},{level:4,title:"2.5 \u5B50\u67E5\u8BE2\u4E2D\u7684\u7A7A\u503C\u95EE\u9898",slug:"_2-5-\u5B50\u67E5\u8BE2\u4E2D\u7684\u7A7A\u503C\u95EE\u9898",children:[]},{level:4,title:"2.6 \u975E\u6CD5\u4F7F\u7528\u5B50\u67E5\u8BE2",slug:"_2-6-\u975E\u6CD5\u4F7F\u7528\u5B50\u67E5\u8BE2",children:[]}]},{level:3,title:"3. \u591A\u884C\u5B50\u67E5\u8BE2",slug:"_3-\u591A\u884C\u5B50\u67E5\u8BE2",children:[{level:4,title:"3.1 \u591A\u884C\u6BD4\u8F83\u64CD\u4F5C\u7B26",slug:"_3-1-\u591A\u884C\u6BD4\u8F83\u64CD\u4F5C\u7B26",children:[]},{level:4,title:"3.2 \u4EE3\u7801\u793A\u4F8B",slug:"_3-2-\u4EE3\u7801\u793A\u4F8B",children:[]},{level:4,title:"3.3 \u7A7A\u503C\u95EE\u9898",slug:"_3-3-\u7A7A\u503C\u95EE\u9898",children:[]}]},{level:3,title:"4. \u76F8\u5173\u5B50\u67E5\u8BE2",slug:"_4-\u76F8\u5173\u5B50\u67E5\u8BE2",children:[{level:4,title:"4.1 \u76F8\u5173\u5B50\u67E5\u8BE2\u6267\u884C\u6D41\u7A0B",slug:"_4-1-\u76F8\u5173\u5B50\u67E5\u8BE2\u6267\u884C\u6D41\u7A0B",children:[]},{level:4,title:"4.2 \u4EE3\u7801\u793A\u4F8B",slug:"_4-2-\u4EE3\u7801\u793A\u4F8B",children:[]},{level:4,title:"4.3 EXISTS\u4E0ENOT EXISTS\u5173\u952E\u5B57",slug:"_4-3-exists\u4E0Enot-exists\u5173\u952E\u5B57",children:[]}]}]},{level:2,title:"\u7B2C10\u7AE0 \u521B\u5EFA\u548C\u7BA1\u7406\u8868",slug:"\u7B2C10\u7AE0-\u521B\u5EFA\u548C\u7BA1\u7406\u8868",children:[{level:3,title:"1. \u57FA\u7840\u77E5\u8BC6",slug:"_1-\u57FA\u7840\u77E5\u8BC6",children:[{level:4,title:"1.1 \u6807\u8BC6\u7B26\u547D\u540D\u89C4\u5219",slug:"_1-1-\u6807\u8BC6\u7B26\u547D\u540D\u89C4\u5219",children:[]}]},{level:3,title:"2. \u521B\u5EFA\u548C\u7BA1\u7406\u6570\u636E\u5E93",slug:"_2-\u521B\u5EFA\u548C\u7BA1\u7406\u6570\u636E\u5E93",children:[{level:4,title:"2.1 \u521B\u5EFA\u6570\u636E\u5E93",slug:"_2-1-\u521B\u5EFA\u6570\u636E\u5E93",children:[]},{level:4,title:"2.2 \u4F7F\u7528\u6570\u636E\u5E93",slug:"_2-2-\u4F7F\u7528\u6570\u636E\u5E93",children:[]},{level:4,title:"2.3 \u4FEE\u6539\u6570\u636E\u5E93",slug:"_2-3-\u4FEE\u6539\u6570\u636E\u5E93",children:[]},{level:4,title:"2.4 \u5220\u9664\u6570\u636E\u5E93",slug:"_2-4-\u5220\u9664\u6570\u636E\u5E93",children:[]}]},{level:3,title:"3. \u521B\u5EFA\u8868",slug:"_3-\u521B\u5EFA\u8868",children:[{level:4,title:"3.1 \u521B\u5EFA\u65B9\u5F0F1",slug:"_3-1-\u521B\u5EFA\u65B9\u5F0F1",children:[]},{level:4,title:"3.2 \u521B\u5EFA\u65B9\u5F0F2",slug:"_3-2-\u521B\u5EFA\u65B9\u5F0F2",children:[]},{level:4,title:"3.3 \u67E5\u770B\u6570\u636E\u8868\u7ED3\u6784",slug:"_3-3-\u67E5\u770B\u6570\u636E\u8868\u7ED3\u6784",children:[]}]},{level:3,title:"4. \u4FEE\u6539\u8868",slug:"_4-\u4FEE\u6539\u8868",children:[{level:4,title:"4.1 \u8FFD\u52A0\u4E00\u4E2A\u5217",slug:"_4-1-\u8FFD\u52A0\u4E00\u4E2A\u5217",children:[]},{level:4,title:"4.2 \u4FEE\u6539\u4E00\u4E2A\u5217",slug:"_4-2-\u4FEE\u6539\u4E00\u4E2A\u5217",children:[]},{level:4,title:"4.3 \u91CD\u547D\u540D\u4E00\u4E2A\u5217",slug:"_4-3-\u91CD\u547D\u540D\u4E00\u4E2A\u5217",children:[]},{level:4,title:"4.4 \u5220\u9664\u4E00\u4E2A\u5217",slug:"_4-4-\u5220\u9664\u4E00\u4E2A\u5217",children:[]}]},{level:3,title:"5. \u91CD\u547D\u540D\u8868",slug:"_5-\u91CD\u547D\u540D\u8868",children:[]},{level:3,title:"6. \u5220\u9664\u8868",slug:"_6-\u5220\u9664\u8868",children:[]},{level:3,title:"7. \u6E05\u7A7A\u8868",slug:"_7-\u6E05\u7A7A\u8868",children:[]},{level:3,title:"8. \u5185\u5BB9\u62D3\u5C55",slug:"_8-\u5185\u5BB9\u62D3\u5C55",children:[]}]},{level:2,title:"\u7B2C11\u7AE0 \u6570\u636E\u5904\u7406\u4E4B\u589E\u5220\u6539",slug:"\u7B2C11\u7AE0-\u6570\u636E\u5904\u7406\u4E4B\u589E\u5220\u6539",children:[{level:3,title:"1. \u63D2\u5165\u6570\u636E",slug:"_1-\u63D2\u5165\u6570\u636E",children:[{level:4,title:"1.1 \u65B9\u5F0F1\uFF1AVALUES\u7684\u65B9\u5F0F\u6DFB\u52A0",slug:"_1-1-\u65B9\u5F0F1-values\u7684\u65B9\u5F0F\u6DFB\u52A0",children:[]},{level:4,title:"1.2 \u65B9\u5F0F2\uFF1A\u5C06\u67E5\u8BE2\u7ED3\u679C\u63D2\u5165\u5230\u8868\u4E2D",slug:"_1-2-\u65B9\u5F0F2-\u5C06\u67E5\u8BE2\u7ED3\u679C\u63D2\u5165\u5230\u8868\u4E2D",children:[]}]},{level:3,title:"2. \u66F4\u65B0\u6570\u636E",slug:"_2-\u66F4\u65B0\u6570\u636E",children:[]},{level:3,title:"3. \u5220\u9664\u6570\u636E",slug:"_3-\u5220\u9664\u6570\u636E",children:[]},{level:3,title:"4. MySQL8\u65B0\u7279\u6027\uFF1A\u8BA1\u7B97\u5217",slug:"_4-mysql8\u65B0\u7279\u6027-\u8BA1\u7B97\u5217",children:[]}]},{level:2,title:"\u7B2C12\u7AE0 MySQL\u6570\u636E\u7C7B\u578B\u7CBE\u8BB2",slug:"\u7B2C12\u7AE0-mysql\u6570\u636E\u7C7B\u578B\u7CBE\u8BB2",children:[{level:3,title:"1. MySQL\u4E2D\u7684\u6570\u636E\u7C7B\u578B",slug:"_1-mysql\u4E2D\u7684\u6570\u636E\u7C7B\u578B",children:[]},{level:3,title:"2. \u6574\u6570\u7C7B\u578B",slug:"_2-\u6574\u6570\u7C7B\u578B",children:[{level:4,title:"2.1 \u7C7B\u578B\u4ECB\u7ECD",slug:"_2-1-\u7C7B\u578B\u4ECB\u7ECD",children:[]},{level:4,title:"2.2 \u53EF\u9009\u5C5E\u6027",slug:"_2-2-\u53EF\u9009\u5C5E\u6027",children:[{level:5,title:"2.2.1 M",slug:"_2-2-1-m",children:[]},{level:5,title:"2.2.2 UNSIGNED",slug:"_2-2-2-unsigned",children:[]},{level:5,title:"2.2.3 ZEROFILL",slug:"_2-2-3-zerofill",children:[]}]},{level:4,title:"2.3 \u9002\u7528\u573A\u666F",slug:"_2-3-\u9002\u7528\u573A\u666F",children:[]},{level:4,title:"2.4 \u5982\u4F55\u9009\u62E9\uFF1F",slug:"_2-4-\u5982\u4F55\u9009\u62E9",children:[]}]},{level:3,title:"3. \u6D6E\u70B9\u7C7B\u578B",slug:"_3-\u6D6E\u70B9\u7C7B\u578B",children:[{level:4,title:"3.1 \u7C7B\u578B\u4ECB\u7ECD",slug:"_3-1-\u7C7B\u578B\u4ECB\u7ECD",children:[]},{level:4,title:"3.2 \u6570\u636E\u7CBE\u5EA6\u8BF4\u660E",slug:"_3-2-\u6570\u636E\u7CBE\u5EA6\u8BF4\u660E",children:[]}]},{level:3,title:"4. \u5B9A\u70B9\u6570\u7C7B\u578B",slug:"_4-\u5B9A\u70B9\u6570\u7C7B\u578B",children:[{level:4,title:"4.1 \u7C7B\u578B\u4ECB\u7ECD",slug:"_4-1-\u7C7B\u578B\u4ECB\u7ECD",children:[]},{level:4,title:"4.2 \u5F00\u53D1\u4E2D\u7ECF\u9A8C",slug:"_4-2-\u5F00\u53D1\u4E2D\u7ECF\u9A8C",children:[]}]},{level:3,title:"5. \u4F4D\u7C7B\u578B\uFF1ABIT",slug:"_5-\u4F4D\u7C7B\u578B-bit",children:[]},{level:3,title:"6. \u65E5\u671F\u4E0E\u65F6\u95F4\u7C7B\u578B",slug:"_6-\u65E5\u671F\u4E0E\u65F6\u95F4\u7C7B\u578B",children:[{level:4,title:"6.1 YEAR\u7C7B\u578B",slug:"_6-1-year\u7C7B\u578B",children:[]},{level:4,title:"6.2 DATE\u7C7B\u578B",slug:"_6-2-date\u7C7B\u578B",children:[]},{level:4,title:"6.3 TIME\u7C7B\u578B",slug:"_6-3-time\u7C7B\u578B",children:[]},{level:4,title:"6.4 DATETIME\u7C7B\u578B",slug:"_6-4-datetime\u7C7B\u578B",children:[]},{level:4,title:"6.5 TIMESTAMP\u7C7B\u578B",slug:"_6-5-timestamp\u7C7B\u578B",children:[]},{level:4,title:"6.6 \u5F00\u53D1\u4E2D\u7ECF\u9A8C",slug:"_6-6-\u5F00\u53D1\u4E2D\u7ECF\u9A8C",children:[]}]},{level:3,title:"7. \u6587\u672C\u5B57\u7B26\u4E32\u7C7B\u578B",slug:"_7-\u6587\u672C\u5B57\u7B26\u4E32\u7C7B\u578B",children:[{level:4,title:"7.1 CHAR\u4E0EVARCHAR\u7C7B\u578B",slug:"_7-1-char\u4E0Evarchar\u7C7B\u578B",children:[]},{level:4,title:"7.2 TEXT\u7C7B\u578B",slug:"_7-2-text\u7C7B\u578B",children:[]}]},{level:3,title:"8. ENUM\u7C7B\u578B",slug:"_8-enum\u7C7B\u578B",children:[]},{level:3,title:"9. SET\u7C7B\u578B",slug:"_9-set\u7C7B\u578B",children:[]},{level:3,title:"10. \u4E8C\u8FDB\u5236\u5B57\u7B26\u4E32\u7C7B\u578B",slug:"_10-\u4E8C\u8FDB\u5236\u5B57\u7B26\u4E32\u7C7B\u578B",children:[]},{level:3,title:"11. JSON \u7C7B\u578B",slug:"_11-json-\u7C7B\u578B",children:[]},{level:3,title:"12. \u7A7A\u95F4\u7C7B\u578B",slug:"_12-\u7A7A\u95F4\u7C7B\u578B",children:[]},{level:3,title:"13. \u5C0F\u7ED3\u53CA\u9009\u62E9\u5EFA\u8BAE",slug:"_13-\u5C0F\u7ED3\u53CA\u9009\u62E9\u5EFA\u8BAE",children:[]}]},{level:2,title:"\u7B2C13\u7AE0 \u7EA6\u675F",slug:"\u7B2C13\u7AE0-\u7EA6\u675F",children:[{level:3,title:"1. \u7EA6\u675F(constraint)\u6982\u8FF0",slug:"_1-\u7EA6\u675F-constraint-\u6982\u8FF0",children:[{level:4,title:"1.1 \u4E3A\u4EC0\u4E48\u9700\u8981\u7EA6\u675F",slug:"_1-1-\u4E3A\u4EC0\u4E48\u9700\u8981\u7EA6\u675F",children:[]},{level:4,title:"1.2 \u4EC0\u4E48\u662F\u7EA6\u675F",slug:"_1-2-\u4EC0\u4E48\u662F\u7EA6\u675F",children:[]},{level:4,title:"1.3 \u7EA6\u675F\u7684\u5206\u7C7B",slug:"_1-3-\u7EA6\u675F\u7684\u5206\u7C7B",children:[]}]},{level:3,title:"2. \u975E\u7A7A\u7EA6\u675F",slug:"_2-\u975E\u7A7A\u7EA6\u675F",children:[{level:4,title:"2.1 \u4F5C\u7528",slug:"_2-1-\u4F5C\u7528",children:[]},{level:4,title:"2.2 \u5173\u952E\u5B57",slug:"_2-2-\u5173\u952E\u5B57",children:[]},{level:4,title:"2.3 \u7279\u70B9",slug:"_2-3-\u7279\u70B9",children:[]},{level:4,title:"2.4 \u6DFB\u52A0\u975E\u7A7A\u7EA6\u675F",slug:"_2-4-\u6DFB\u52A0\u975E\u7A7A\u7EA6\u675F",children:[]},{level:4,title:"2.5 \u5220\u9664\u975E\u7A7A\u7EA6\u675F",slug:"_2-5-\u5220\u9664\u975E\u7A7A\u7EA6\u675F",children:[]}]},{level:3,title:"3. \u552F\u4E00\u6027\u7EA6\u675F",slug:"_3-\u552F\u4E00\u6027\u7EA6\u675F",children:[{level:4,title:"3.1 \u4F5C\u7528",slug:"_3-1-\u4F5C\u7528",children:[]},{level:4,title:"3.2 \u5173\u952E\u5B57",slug:"_3-2-\u5173\u952E\u5B57",children:[]},{level:4,title:"3.3 \u7279\u70B9",slug:"_3-3-\u7279\u70B9",children:[]},{level:4,title:"3.4 \u6DFB\u52A0\uFF08\u590D\u5408\uFF09\u552F\u4E00\u7EA6\u675F",slug:"_3-4-\u6DFB\u52A0-\u590D\u5408-\u552F\u4E00\u7EA6\u675F",children:[]},{level:4,title:"3.5 \u5220\u9664\u552F\u4E00\u7EA6\u675F",slug:"_3-5-\u5220\u9664\u552F\u4E00\u7EA6\u675F",children:[]}]},{level:3,title:"4. PRIMARY KEY \u7EA6\u675F",slug:"_4-primary-key-\u7EA6\u675F",children:[{level:4,title:"4.1 \u4F5C\u7528",slug:"_4-1-\u4F5C\u7528",children:[]},{level:4,title:"4.2 \u5173\u952E\u5B57",slug:"_4-2-\u5173\u952E\u5B57",children:[]},{level:4,title:"4.3 \u7279\u70B9",slug:"_4-3-\u7279\u70B9",children:[]},{level:4,title:"4.4 \u6DFB\u52A0\uFF08\u590D\u5408\uFF09\u4E3B\u952E\u7EA6\u675F",slug:"_4-4-\u6DFB\u52A0-\u590D\u5408-\u4E3B\u952E\u7EA6\u675F",children:[]},{level:4,title:"4.5 \u5220\u9664\u4E3B\u952E\u7EA6\u675F",slug:"_4-5-\u5220\u9664\u4E3B\u952E\u7EA6\u675F",children:[]}]},{level:3,title:"5. \u81EA\u589E\u5217\uFF1AAUTO_INCREMENT",slug:"_5-\u81EA\u589E\u5217-auto-increment",children:[{level:4,title:"5.1 \u4F5C\u7528",slug:"_5-1-\u4F5C\u7528",children:[]},{level:4,title:"5.2 \u5173\u952E\u5B57",slug:"_5-2-\u5173\u952E\u5B57",children:[]},{level:4,title:"5.3 \u7279\u70B9\u548C\u8981\u6C42",slug:"_5-3-\u7279\u70B9\u548C\u8981\u6C42",children:[]},{level:4,title:"5.4 \u5982\u4F55\u6307\u5B9A\u81EA\u589E\u7EA6\u675F",slug:"_5-4-\u5982\u4F55\u6307\u5B9A\u81EA\u589E\u7EA6\u675F",children:[]},{level:4,title:"5.5 \u5982\u4F55\u5220\u9664\u81EA\u589E\u7EA6\u675F",slug:"_5-5-\u5982\u4F55\u5220\u9664\u81EA\u589E\u7EA6\u675F",children:[]},{level:4,title:"5.6 MySQL 8.0\u65B0\u7279\u6027\u2014\u81EA\u589E\u53D8\u91CF\u7684\u6301\u4E45\u5316",slug:"_5-6-mysql-8-0\u65B0\u7279\u6027\u2014\u81EA\u589E\u53D8\u91CF\u7684\u6301\u4E45\u5316",children:[]}]},{level:3,title:"6. FOREIGN KEY \u7EA6\u675F",slug:"_6-foreign-key-\u7EA6\u675F",children:[{level:4,title:"6.1 \u4F5C\u7528",slug:"_6-1-\u4F5C\u7528",children:[]},{level:4,title:"6.2 \u5173\u952E\u5B57",slug:"_6-2-\u5173\u952E\u5B57",children:[]},{level:4,title:"6.3 \u4E3B\u8868\u548C\u4ECE\u8868/\u7236\u8868\u548C\u5B50\u8868",slug:"_6-3-\u4E3B\u8868\u548C\u4ECE\u8868-\u7236\u8868\u548C\u5B50\u8868",children:[]},{level:4,title:"6.4 \u7279\u70B9",slug:"_6-4-\u7279\u70B9",children:[]},{level:4,title:"6.5 \u6DFB\u52A0\u5916\u952E\u7EA6\u675F",slug:"_6-5-\u6DFB\u52A0\u5916\u952E\u7EA6\u675F",children:[]},{level:4,title:"6.6 \u7EA6\u675F\u7B49\u7EA7",slug:"_6-6-\u7EA6\u675F\u7B49\u7EA7",children:[]},{level:4,title:"6.7 \u5220\u9664\u5916\u952E\u7EA6\u675F",slug:"_6-7-\u5220\u9664\u5916\u952E\u7EA6\u675F",children:[]},{level:4,title:"6.8 \u5F00\u53D1\u573A\u666F",slug:"_6-8-\u5F00\u53D1\u573A\u666F",children:[]},{level:4,title:"6.9 \u963F\u91CC\u5F00\u53D1\u89C4\u8303",slug:"_6-9-\u963F\u91CC\u5F00\u53D1\u89C4\u8303",children:[]}]},{level:3,title:"7. CHECK \u7EA6\u675F",slug:"_7-check-\u7EA6\u675F",children:[{level:4,title:"7.1 \u4F5C\u7528",slug:"_7-1-\u4F5C\u7528",children:[]},{level:4,title:"7.2 \u5173\u952E\u5B57",slug:"_7-2-\u5173\u952E\u5B57",children:[]},{level:4,title:"7.3 \u8BF4\u660E\uFF1AMySQL 5.7 \u4E0D\u652F\u6301",slug:"_7-3-\u8BF4\u660E-mysql-5-7-\u4E0D\u652F\u6301",children:[]}]},{level:3,title:"8. DEFAULT\u7EA6\u675F",slug:"_8-default\u7EA6\u675F",children:[{level:4,title:"8.1 \u4F5C\u7528",slug:"_8-1-\u4F5C\u7528",children:[]},{level:4,title:"8.2 \u5173\u952E\u5B57",slug:"_8-2-\u5173\u952E\u5B57",children:[]},{level:4,title:"8.3 \u5982\u4F55\u7ED9\u5B57\u6BB5\u52A0\u9ED8\u8BA4\u503C",slug:"_8-3-\u5982\u4F55\u7ED9\u5B57\u6BB5\u52A0\u9ED8\u8BA4\u503C",children:[]},{level:4,title:"8.4 \u5982\u4F55\u5220\u9664\u9ED8\u8BA4\u503C\u7EA6\u675F",slug:"_8-4-\u5982\u4F55\u5220\u9664\u9ED8\u8BA4\u503C\u7EA6\u675F",children:[]}]},{level:3,title:"9. \u9762\u8BD5",slug:"_9-\u9762\u8BD5",children:[]}]},{level:2,title:"\u7B2C14\u7AE0 \u89C6\u56FE",slug:"\u7B2C14\u7AE0-\u89C6\u56FE",children:[{level:3,title:"1. \u5E38\u89C1\u7684\u6570\u636E\u5E93\u5BF9\u8C61",slug:"_1-\u5E38\u89C1\u7684\u6570\u636E\u5E93\u5BF9\u8C61",children:[]},{level:3,title:"2. \u89C6\u56FE\u6982\u8FF0",slug:"_2-\u89C6\u56FE\u6982\u8FF0",children:[{level:4,title:"2.1 \u4E3A\u4EC0\u4E48\u4F7F\u7528\u89C6\u56FE\uFF1F",slug:"_2-1-\u4E3A\u4EC0\u4E48\u4F7F\u7528\u89C6\u56FE",children:[]},{level:4,title:"2.2 \u89C6\u56FE\u7684\u7406\u89E3",slug:"_2-2-\u89C6\u56FE\u7684\u7406\u89E3",children:[]}]},{level:3,title:"3. \u521B\u5EFA\u89C6\u56FE",slug:"_3-\u521B\u5EFA\u89C6\u56FE",children:[]},{level:3,title:"4. \u67E5\u770B\u89C6\u56FE",slug:"_4-\u67E5\u770B\u89C6\u56FE",children:[]},{level:3,title:"5. \u66F4\u65B0\u89C6\u56FE\u7684\u6570\u636E",slug:"_5-\u66F4\u65B0\u89C6\u56FE\u7684\u6570\u636E",children:[{level:4,title:"5.1 \u4E00\u822C\u60C5\u51B5",slug:"_5-1-\u4E00\u822C\u60C5\u51B5",children:[]},{level:4,title:"5.2 \u4E0D\u53EF\u66F4\u65B0\u7684\u89C6\u56FE",slug:"_5-2-\u4E0D\u53EF\u66F4\u65B0\u7684\u89C6\u56FE",children:[]}]},{level:3,title:"6. \u4FEE\u6539\u3001\u5220\u9664\u89C6\u56FE",slug:"_6-\u4FEE\u6539\u3001\u5220\u9664\u89C6\u56FE",children:[{level:4,title:"6.1 \u4FEE\u6539\u89C6\u56FE",slug:"_6-1-\u4FEE\u6539\u89C6\u56FE",children:[]},{level:4,title:"6.2 \u5220\u9664\u89C6\u56FE",slug:"_6-2-\u5220\u9664\u89C6\u56FE",children:[]}]},{level:3,title:"7. \u603B\u7ED3",slug:"_7-\u603B\u7ED3",children:[{level:4,title:"7.1 \u89C6\u56FE\u4F18\u70B9",slug:"_7-1-\u89C6\u56FE\u4F18\u70B9",children:[]},{level:4,title:"7.2 \u89C6\u56FE\u4E0D\u8DB3",slug:"_7-2-\u89C6\u56FE\u4E0D\u8DB3",children:[]}]}]},{level:2,title:"\u7B2C15\u7AE0 \u5B58\u50A8\u8FC7\u7A0B\u4E0E\u51FD\u6570",slug:"\u7B2C15\u7AE0-\u5B58\u50A8\u8FC7\u7A0B\u4E0E\u51FD\u6570",children:[{level:3,title:"1. \u5B58\u50A8\u8FC7\u7A0B\u6982\u8FF0",slug:"_1-\u5B58\u50A8\u8FC7\u7A0B\u6982\u8FF0",children:[{level:5,title:"1.1 \u7406\u89E3",slug:"_1-1-\u7406\u89E3",children:[]}]},{level:3,title:"2. \u521B\u5EFA\u5B58\u50A8\u8FC7\u7A0B",slug:"_2-\u521B\u5EFA\u5B58\u50A8\u8FC7\u7A0B",children:[{level:4,title:"2.1 \u8BED\u6CD5\u5206\u6790",slug:"_2-1-\u8BED\u6CD5\u5206\u6790",children:[]},{level:4,title:"2.2 \u4EE3\u7801\u4E3E\u4F8B",slug:"_2-2-\u4EE3\u7801\u4E3E\u4F8B",children:[]}]},{level:3,title:"3. \u8C03\u7528\u5B58\u50A8\u8FC7\u7A0B",slug:"_3-\u8C03\u7528\u5B58\u50A8\u8FC7\u7A0B",children:[{level:4,title:"3.1 \u8C03\u7528\u683C\u5F0F",slug:"_3-1-\u8C03\u7528\u683C\u5F0F",children:[]}]},{level:3,title:"4. \u5B58\u50A8\u51FD\u6570\u7684\u4F7F\u7528",slug:"_4-\u5B58\u50A8\u51FD\u6570\u7684\u4F7F\u7528",children:[{level:4,title:"4.1 \u8BED\u6CD5\u5206\u6790",slug:"_4-1-\u8BED\u6CD5\u5206\u6790",children:[]},{level:4,title:"4.2 \u8C03\u7528\u5B58\u50A8\u51FD\u6570",slug:"_4-2-\u8C03\u7528\u5B58\u50A8\u51FD\u6570",children:[]},{level:4,title:"4.3 \u4EE3\u7801\u4E3E\u4F8B",slug:"_4-3-\u4EE3\u7801\u4E3E\u4F8B",children:[]},{level:4,title:"4.4 \u5BF9\u6BD4\u5B58\u50A8\u51FD\u6570\u548C\u5B58\u50A8\u8FC7\u7A0B",slug:"_4-4-\u5BF9\u6BD4\u5B58\u50A8\u51FD\u6570\u548C\u5B58\u50A8\u8FC7\u7A0B",children:[]}]},{level:3,title:"5. \u5B58\u50A8\u8FC7\u7A0B\u548C\u51FD\u6570\u7684\u67E5\u770B\u3001\u4FEE\u6539\u3001\u5220\u9664",slug:"_5-\u5B58\u50A8\u8FC7\u7A0B\u548C\u51FD\u6570\u7684\u67E5\u770B\u3001\u4FEE\u6539\u3001\u5220\u9664",children:[{level:4,title:"5.1 \u67E5\u770B",slug:"_5-1-\u67E5\u770B",children:[]},{level:4,title:"5.2 \u4FEE\u6539",slug:"_5-2-\u4FEE\u6539",children:[]},{level:4,title:"5.3 \u5220\u9664",slug:"_5-3-\u5220\u9664",children:[]}]},{level:3,title:"6. \u5173\u4E8E\u5B58\u50A8\u8FC7\u7A0B\u4F7F\u7528\u7684\u4E89\u8BAE",slug:"_6-\u5173\u4E8E\u5B58\u50A8\u8FC7\u7A0B\u4F7F\u7528\u7684\u4E89\u8BAE",children:[{level:4,title:"6.1 \u4F18\u70B9",slug:"_6-1-\u4F18\u70B9",children:[]},{level:4,title:"6.2 \u7F3A\u70B9",slug:"_6-2-\u7F3A\u70B9",children:[]}]}]},{level:2,title:"\u7B2C16\u7AE0 \u53D8\u91CF\u3001\u6D41\u7A0B\u63A7\u5236\u4E0E\u6E38\u6807",slug:"\u7B2C16\u7AE0-\u53D8\u91CF\u3001\u6D41\u7A0B\u63A7\u5236\u4E0E\u6E38\u6807",children:[{level:3,title:"1. \u53D8\u91CF",slug:"_1-\u53D8\u91CF",children:[{level:4,title:"1.1 \u7CFB\u7EDF\u53D8\u91CF",slug:"_1-1-\u7CFB\u7EDF\u53D8\u91CF",children:[{level:5,title:"1.1.1 \u7CFB\u7EDF\u53D8\u91CF\u5206\u7C7B",slug:"_1-1-1-\u7CFB\u7EDF\u53D8\u91CF\u5206\u7C7B",children:[]},{level:5,title:"1.1.2 \u67E5\u770B\u7CFB\u7EDF\u53D8\u91CF",slug:"_1-1-2-\u67E5\u770B\u7CFB\u7EDF\u53D8\u91CF",children:[]}]},{level:4,title:"1.2 \u7528\u6237\u53D8\u91CF",slug:"_1-2-\u7528\u6237\u53D8\u91CF",children:[{level:5,title:"1.2.1 \u7528\u6237\u53D8\u91CF\u5206\u7C7B",slug:"_1-2-1-\u7528\u6237\u53D8\u91CF\u5206\u7C7B",children:[]},{level:5,title:"1.2.2 \u4F1A\u8BDD\u7528\u6237\u53D8\u91CF",slug:"_1-2-2-\u4F1A\u8BDD\u7528\u6237\u53D8\u91CF",children:[]},{level:5,title:"1.2.3 \u5C40\u90E8\u53D8\u91CF",slug:"_1-2-3-\u5C40\u90E8\u53D8\u91CF",children:[]},{level:5,title:"1.2.4 \u5BF9\u6BD4\u4F1A\u8BDD\u7528\u6237\u53D8\u91CF\u4E0E\u5C40\u90E8\u53D8\u91CF",slug:"_1-2-4-\u5BF9\u6BD4\u4F1A\u8BDD\u7528\u6237\u53D8\u91CF\u4E0E\u5C40\u90E8\u53D8\u91CF",children:[]}]}]},{level:3,title:"2. \u5B9A\u4E49\u6761\u4EF6\u4E0E\u5904\u7406\u7A0B\u5E8F",slug:"_2-\u5B9A\u4E49\u6761\u4EF6\u4E0E\u5904\u7406\u7A0B\u5E8F",children:[{level:4,title:"2.1 \u5B9A\u4E49\u6761\u4EF6",slug:"_2-1-\u5B9A\u4E49\u6761\u4EF6",children:[]},{level:4,title:"2.2 \u5B9A\u4E49\u5904\u7406\u7A0B\u5E8F",slug:"_2-2-\u5B9A\u4E49\u5904\u7406\u7A0B\u5E8F",children:[]}]},{level:3,title:"3. \u6D41\u7A0B\u63A7\u5236",slug:"_3-\u6D41\u7A0B\u63A7\u5236",children:[{level:4,title:"3.1 \u5206\u652F\u7ED3\u6784\u4E4B IF",slug:"_3-1-\u5206\u652F\u7ED3\u6784\u4E4B-if",children:[]},{level:4,title:"3.2 \u5206\u652F\u7ED3\u6784\u4E4B CASE",slug:"_3-2-\u5206\u652F\u7ED3\u6784\u4E4B-case",children:[]},{level:4,title:"3.3 \u5FAA\u73AF\u7ED3\u6784\u4E4BLOOP",slug:"_3-3-\u5FAA\u73AF\u7ED3\u6784\u4E4Bloop",children:[]},{level:4,title:"3.4 \u5FAA\u73AF\u7ED3\u6784\u4E4BWHILE",slug:"_3-4-\u5FAA\u73AF\u7ED3\u6784\u4E4Bwhile",children:[]},{level:4,title:"3.5 \u5FAA\u73AF\u7ED3\u6784\u4E4BREPEAT",slug:"_3-5-\u5FAA\u73AF\u7ED3\u6784\u4E4Brepeat",children:[]},{level:4,title:"3.6 \u8DF3\u8F6C\u8BED\u53E5\u4E4BLEAVE\u8BED\u53E5",slug:"_3-6-\u8DF3\u8F6C\u8BED\u53E5\u4E4Bleave\u8BED\u53E5",children:[]},{level:4,title:"3.7 \u8DF3\u8F6C\u8BED\u53E5\u4E4BITERATE\u8BED\u53E5",slug:"_3-7-\u8DF3\u8F6C\u8BED\u53E5\u4E4Biterate\u8BED\u53E5",children:[]}]},{level:3,title:"4. \u6E38\u6807",slug:"_4-\u6E38\u6807",children:[{level:4,title:"4.1 \u4EC0\u4E48\u662F\u6E38\u6807\uFF08\u6216\u5149\u6807\uFF09",slug:"_4-1-\u4EC0\u4E48\u662F\u6E38\u6807-\u6216\u5149\u6807",children:[]},{level:4,title:"4.2 \u4F7F\u7528\u6E38\u6807\u6B65\u9AA4",slug:"_4-2-\u4F7F\u7528\u6E38\u6807\u6B65\u9AA4",children:[]},{level:4,title:"4.3 \u5C0F\u7ED3",slug:"_4-3-\u5C0F\u7ED3",children:[]},{level:4,title:"\u8865\u5145\uFF1AMySQL 8.0\u7684\u65B0\u7279\u6027\u2014\u5168\u5C40\u53D8\u91CF\u7684\u6301\u4E45\u5316",slug:"\u8865\u5145-mysql-8-0\u7684\u65B0\u7279\u6027\u2014\u5168\u5C40\u53D8\u91CF\u7684\u6301\u4E45\u5316",children:[]}]}]},{level:2,title:"\u7B2C17\u7AE0 \u89E6\u53D1\u5668",slug:"\u7B2C17\u7AE0-\u89E6\u53D1\u5668",children:[{level:3,title:"1. \u89E6\u53D1\u5668\u6982\u8FF0",slug:"_1-\u89E6\u53D1\u5668\u6982\u8FF0",children:[]},{level:3,title:"2. \u89E6\u53D1\u5668\u7684\u521B\u5EFA",slug:"_2-\u89E6\u53D1\u5668\u7684\u521B\u5EFA",children:[{level:4,title:"2.1 \u521B\u5EFA\u89E6\u53D1\u5668\u8BED\u6CD5",slug:"_2-1-\u521B\u5EFA\u89E6\u53D1\u5668\u8BED\u6CD5",children:[]}]},{level:3,title:"3. \u67E5\u770B\u3001\u5220\u9664\u89E6\u53D1\u5668",slug:"_3-\u67E5\u770B\u3001\u5220\u9664\u89E6\u53D1\u5668",children:[{level:4,title:"3.1 \u67E5\u770B\u89E6\u53D1\u5668",slug:"_3-1-\u67E5\u770B\u89E6\u53D1\u5668",children:[]},{level:4,title:"3.2 \u5220\u9664\u89E6\u53D1\u5668",slug:"_3-2-\u5220\u9664\u89E6\u53D1\u5668",children:[]}]},{level:3,title:"4. \u89E6\u53D1\u5668\u7684\u4F18\u7F3A\u70B9",slug:"_4-\u89E6\u53D1\u5668\u7684\u4F18\u7F3A\u70B9",children:[{level:4,title:"4.1 \u4F18\u70B9",slug:"_4-1-\u4F18\u70B9",children:[]},{level:4,title:"4.2 \u7F3A\u70B9",slug:"_4-2-\u7F3A\u70B9",children:[]},{level:4,title:"4.3 \u6CE8\u610F\u70B9",slug:"_4-3-\u6CE8\u610F\u70B9",children:[]}]}]},{level:2,title:"\u7B2C18\u7AE0 MySQL8\u5176\u5B83\u65B0\u7279\u6027",slug:"\u7B2C18\u7AE0-mysql8\u5176\u5B83\u65B0\u7279\u6027",children:[{level:3,title:"1. \u65B0\u7279\u60271\uFF1A\u7A97\u53E3\u51FD\u6570",slug:"_1-\u65B0\u7279\u60271-\u7A97\u53E3\u51FD\u6570",children:[{level:4,title:"1.1 \u7A97\u53E3\u51FD\u6570\u5206\u7C7B",slug:"_1-1-\u7A97\u53E3\u51FD\u6570\u5206\u7C7B",children:[]},{level:4,title:"1.2 \u8BED\u6CD5\u7ED3\u6784",slug:"_1-2-\u8BED\u6CD5\u7ED3\u6784",children:[]},{level:4,title:"1.3 \u5C0F \u7ED3",slug:"_1-3-\u5C0F-\u7ED3",children:[]}]},{level:3,title:"2. \u65B0\u7279\u60272\uFF1A\u516C\u7528\u8868\u8868\u8FBE\u5F0F",slug:"_2-\u65B0\u7279\u60272-\u516C\u7528\u8868\u8868\u8FBE\u5F0F",children:[{level:4,title:"2.1 \u666E\u901A\u516C\u7528\u8868\u8868\u8FBE\u5F0F",slug:"_2-1-\u666E\u901A\u516C\u7528\u8868\u8868\u8FBE\u5F0F",children:[]},{level:4,title:"2.2 \u9012\u5F52\u516C\u7528\u8868\u8868\u8FBE\u5F0F",slug:"_2-2-\u9012\u5F52\u516C\u7528\u8868\u8868\u8FBE\u5F0F",children:[]},{level:4,title:"2.3 \u5C0F \u7ED3",slug:"_2-3-\u5C0F-\u7ED3",children:[]}]}]}],git:{updatedTime:1710173784e3,contributors:[{name:"shailene",email:"64005626+shaileneF@users.noreply.github.com",commits:1}]},filePathRelative:"java/\u6570\u636E\u5E93/mysql/\u57FA\u7840\u7BC7/MySQL\u6570\u636E\u5E93\u7B14\u8BB0-\u7B2C\u4E00\u90E8\u5206.md"};export{l as data};
                    diff --git "a/assets/MySQL\346\225\260\346\215\256\345\272\223\347\254\224\350\256\260-\347\254\254\344\270\200\351\203\250\345\210\206.html.62abea75.js" "b/assets/MySQL\346\225\260\346\215\256\345\272\223\347\254\224\350\256\260-\347\254\254\344\270\200\351\203\250\345\210\206.html.2685ce3f.js"
                    similarity index 99%
                    rename from "assets/MySQL\346\225\260\346\215\256\345\272\223\347\254\224\350\256\260-\347\254\254\344\270\200\351\203\250\345\210\206.html.62abea75.js"
                    rename to "assets/MySQL\346\225\260\346\215\256\345\272\223\347\254\224\350\256\260-\347\254\254\344\270\200\351\203\250\345\210\206.html.2685ce3f.js"
                    index 3fc9cdf8..2f89490c 100644
                    --- "a/assets/MySQL\346\225\260\346\215\256\345\272\223\347\254\224\350\256\260-\347\254\254\344\270\200\351\203\250\345\210\206.html.62abea75.js"
                    +++ "b/assets/MySQL\346\225\260\346\215\256\345\272\223\347\254\224\350\256\260-\347\254\254\344\270\200\351\203\250\345\210\206.html.2685ce3f.js"
                    @@ -1,4 +1,4 @@
                    -import{_ as s,e as n}from"./app.0d029894.js";var a="/study/assets/image-20220501222501715.85b46003.png",t="/study/assets/image-20220501223333852.5405ea75.png",e="/study/assets/image-20220501224609152.aaaf00b0.png",o="/study/assets/image-20220501224859393.e6d54a93.png",p="/study/assets/image-20220501230307428.bf89f80c.png",r="/study/assets/image-20220501230411372.c63df155.png",l="/study/assets/image-20220501230504625.19cc3804.png",c="/study/assets/image-20220501230730379.45e04e50.png",d="/study/assets/image-20220502180838771.d1f1e76c.png",i="/study/assets/image-20220502184304058.8bf409c6.png",u="/study/assets/image-20220502190908034.0b0c9cb3.png",k="/study/assets/image-20220502225257266.6de297ad.png",g="/study/assets/image-20220502225458779.ca457a20.png",h="/study/assets/image-20220502225458779.ca457a20.png",E="/study/assets/image-20220502231659661.d62c49ff.png",y="/study/assets/image-20220502232107515.52cca96e.png",m="/study/assets/image-20220502235236891.a438cbd8.png",T="/study/assets/image-20220502235244755.07443d25.png",L="/study/assets/image-20220502234515501.dc7b90ea.png",_="/study/assets/image-20220503142321115.a3151a13.png",R="/study/assets/image-20220503160142309.b7b71074.png",S="/study/assets/image-20220503162754152.749cd3a8.png",A="/study/assets/image-20220503205320333.b4edeaf8.png";const N={},b=n('

                    \u7B2C\u4E00\u90E8\u5206 MySQL\u57FA\u7840\u7BC7

                    \u7B2C01\u7AE0 \u6570\u636E\u5E93\u6982\u8FF0

                    1. \u4E3A\u4EC0\u4E48\u8981\u4F7F\u7528\u6570\u636E\u5E93

                    • \u6301\u4E45\u5316(persistence)\uFF1A\u628A\u6570\u636E\u4FDD\u5B58\u5230\u53EF\u6389\u7535\u5F0F\u5B58\u50A8\u8BBE\u5907\u4E2D\u4EE5\u4F9B\u4E4B\u540E\u4F7F\u7528\u3002\u5927\u591A\u6570\u60C5\u51B5\u4E0B\uFF0C\u7279\u522B\u662F\u4F01\u4E1A\u7EA7\u5E94\u7528\uFF0C\u6570\u636E\u6301\u4E45\u5316\u610F\u5473\u7740\u5C06\u5185\u5B58\u4E2D\u7684\u6570\u636E\u4FDD\u5B58\u5230\u786C\u76D8\u4E0A\u52A0\u4EE5\u201C\u56FA\u5316\u201D\uFF0C\u800C\u6301\u4E45\u5316\u7684\u5B9E\u73B0\u8FC7\u7A0B\u5927\u591A\u901A\u8FC7\u5404\u79CD\u5173\u7CFB\u6570\u636E\u5E93\u6765\u5B8C\u6210\u3002

                      \u5185\u5B58\u65AD\u7535\u4E86\u5C31\u4E0D\u80FD\u8FDB\u884C\u5B58\u50A8\u4E86\u3002\u5185\u5B58\u4E2D\u5B58\u50A8\u7684\u6570\u636E\u4E0D\u4FDD\u9669\uFF0C\u6240\u4EE5\u9700\u8981\u505A\u6570\u636E\u6301\u4E45\u5316\u3002

                    • \u6301\u4E45\u5316\u7684\u4E3B\u8981\u4F5C\u7528\u662F\u5C06\u5185\u5B58\u4E2D\u7684\u6570\u636E\u5B58\u50A8\u5728\u5173\u7CFB\u578B\u6570\u636E\u5E93\u4E2D\uFF0C\u5F53\u7136\u4E5F\u53EF\u4EE5\u5B58\u50A8\u5728\u78C1\u76D8\u6587\u4EF6\u3001XML\u6570\u636E\u6587\u4EF6\u4E2D\u3002

                    2. \u6570\u636E\u5E93\u4E0E\u6570\u636E\u5E93\u7BA1\u7406\u7CFB\u7EDF

                    2.1 \u6570\u636E\u5E93\u7684\u76F8\u5173\u6982\u5FF5

                    • DB\uFF1A\u6570\u636E\u5E93(Database)

                      • \u5373\u5B58\u50A8\u6570\u636E\u7684\u201C\u4ED3\u5E93\u201D\uFF0C\u5176\u672C\u8D28\u662F\u4E00\u4E2A\u6587\u4EF6\u7CFB\u7EDF\u3002\u5B83\u4FDD\u5B58\u4E86\u4E00\u7CFB\u5217\u6709\u7EC4\u7EC7\u7684\u6570\u636E\u3002
                    • DBMS\uFF1A\u6570\u636E\u5E93\u7BA1\u7406\u7CFB\u7EDF(Database Management System)

                      • \u662F\u4E00\u79CD\u64CD\u7EB5\u548C\u7BA1\u7406\u6570\u636E\u5E93\u7684\u5927\u578B\u8F6F\u4EF6\uFF0C\u7528\u4E8E\u5EFA\u7ACB\u3001\u4F7F\u7528\u548C\u7EF4\u62A4\u6570\u636E\u5E93\uFF0C\u5BF9\u6570\u636E\u5E93\u8FDB\u884C\u7EDF\u4E00\u7BA1\u7406\u548C\u63A7\u5236\u3002\u7528\u6237\u901A\u8FC7\u6570\u636E\u5E93\u7BA1\u7406\u7CFB\u7EDF\u8BBF\u95EE\u6570\u636E\u5E93\u4E2D\u8868\u5185\u7684\u6570\u636E\u3002
                    • SQL\uFF1A\u7ED3\u6784\u5316\u67E5\u8BE2\u8BED\u8A00\uFF08Structured Query Language\uFF09

                      • \u4E13\u95E8\u7528\u6765\u4E0E\u6570\u636E\u5E93\u901A\u4FE1\u7684\u8BED\u8A00\u3002

                    2.2. \u6570\u636E\u5E93\u4E0E\u6570\u636E\u5E93\u7BA1\u7406\u7CFB\u7EDF\u4E4B\u95F4\u7684\u5173\u7CFB

                    \u6570\u636E\u5E93\u7BA1\u7406\u7CFB\u7EDF(DBMS)\u53EF\u4EE5\u7BA1\u7406\u591A\u4E2A\u6570\u636E\u5E93\uFF0C\u4E00\u822C\u5F00\u53D1\u4EBA\u5458\u4F1A\u9488\u5BF9\u6BCF\u4E00\u4E2A\u5E94\u7528\u521B\u5EFA\u4E00\u4E2A\u6570\u636E\u5E93\u3002\u4E3A\u4FDD\u5B58\u5E94\u7528\u4E2D\u5B9E\u4F53\u7684\u6570\u636E\uFF0C\u4E00\u822C\u4F1A\u5728\u6570\u636E\u5E93\u521B\u5EFA\u591A\u4E2A\u8868\uFF0C\u4EE5\u4FDD\u5B58\u7A0B\u5E8F\u4E2D\u5B9E\u4F53\u7528\u6237\u7684\u6570\u636E\u3002\u4E00\u822C\u4E00\u4E2AJava bean\u5BF9\u5E94\u4E8E\u4E00\u4E2A\u8868\u3002

                    \u6570\u636E\u5E93\u7BA1\u7406\u7CFB\u7EDF\u3001\u6570\u636E\u5E93\u548C\u8868\u4E4B\u95F4\u7684\u5173\u7CFB\uFF1A

                    image-20220501222501715

                    3. RDBMS\u4E0E\u975ERDBMS

                    3.1 \u5173\u7CFB\u578B\u6570\u636E\u5E93(RDBMS)

                    3.1.1 \u5B9E\u8D28
                    • \u8FD9\u79CD\u7C7B\u578B\u7684\u6570\u636E\u5E93\u662F\u6700\u53E4\u8001\u7684\u6570\u636E\u5E93\u7C7B\u578B\uFF0C\u5173\u7CFB\u578B\u6570\u636E\u5E93\u6A21\u578B\u662F\u628A\u590D\u6742\u7684\u6570\u636E\u7ED3\u6784\u5F52\u7ED3\u4E3A\u7B80\u5355\u7684\u4E8C\u5143\u5173\u7CFB \uFF08\u5373\u4E8C\u7EF4\u8868\u683C\u5F62\u5F0F\uFF09\u3002
                    • \u5173\u7CFB\u578B\u6570\u636E\u5E93\u4EE5\u884C(row)\u548C\u5217(column)\u7684\u5F62\u5F0F\u5B58\u50A8\u6570\u636E\uFF0C\u4EE5\u4FBF\u4E8E\u7528\u6237\u7406\u89E3\u3002\u8FD9\u4E00\u7CFB\u5217\u7684\u884C\u548C\u5217\u88AB\u79F0\u4E3A\u8868(table)\uFF0C\u4E00\u7EC4\u8868\u7EC4\u6210\u4E86\u4E00\u4E2A\u5E93(database)\u3002
                    • \u8868\u4E0E\u8868\u4E4B\u95F4\u7684\u6570\u636E\u8BB0\u5F55\u6709\u5173\u7CFB\u3002
                    • SQL\u5C31\u662F\u5173\u7CFB\u578B\u6570\u636E\u5E93\u7684\u67E5\u8BE2\u8BED\u8A00\u3002

                    image-20220501223333852

                    3.1.2 \u4F18\u52BF
                    • \u590D\u6742\u67E5\u8BE2

                      \u53EF\u4EE5\u7528SQL\u8BED\u53E5\u65B9\u4FBF\u7684\u5728\u4E00\u4E2A\u8868\u4EE5\u53CA\u591A\u4E2A\u8868\u4E4B\u95F4\u505A\u975E\u5E38\u590D\u6742\u7684\u6570\u636E\u67E5\u8BE2\u3002

                    • \u4E8B\u52A1\u652F\u6301

                      \u4F7F\u5F97\u5BF9\u4E8E\u5B89\u5168\u6027\u80FD\u5F88\u9AD8\u7684\u6570\u636E\u8BBF\u95EE\u8981\u6C42\u5F97\u4EE5\u5B9E\u73B0\u3002

                    3.2 \u975E\u5173\u7CFB\u578B\u6570\u636E\u5E93(\u975ERDBMS)

                    3.2.1 \u4ECB\u7ECD

                    \u975E\u5173\u7CFB\u578B\u6570\u636E\u5E93\uFF0C\u53EF\u770B\u6210\u4F20\u7EDF\u5173\u7CFB\u578B\u6570\u636E\u5E93\u7684\u529F\u80FD\u9609\u5272\u7248\u672C\uFF0C\u57FA\u4E8E\u952E\u503C\u5BF9\u5B58\u50A8\u6570\u636E\uFF0C\u4E0D\u9700\u8981\u7ECF\u8FC7SQL\u5C42\u7684\u89E3\u6790\uFF0C\u6027\u80FD\u975E\u5E38\u9AD8\u3002\u540C\u65F6\uFF0C\u901A\u8FC7\u51CF\u5C11\u4E0D\u5E38\u7528\u7684\u529F\u80FD\uFF0C\u8FDB\u4E00\u6B65\u63D0\u9AD8\u6027\u80FD\u3002

                    4. \u5173\u7CFB\u578B\u6570\u636E\u5E93\u8BBE\u8BA1\u89C4\u5219

                    • \u5173\u7CFB\u578B\u6570\u636E\u5E93\u7684\u5178\u578B\u6570\u636E\u7ED3\u6784\u5C31\u662F\u6570\u636E\u8868\uFF0C\u8FD9\u4E9B\u6570\u636E\u8868\u7684\u7EC4\u6210\u90FD\u662F\u7ED3\u6784\u5316\u7684

                    • \u5C06\u6570\u636E\u653E\u5230\u8868\uFF0C\u8868\u518D\u653E\u5230\u6570\u636E\u5E93\u4E2D\u3002

                    • \u4E00\u4E2A\u6570\u636E\u5E93\u4E2D\u53EF\u4EE5\u6709\u591A\u4E2A\u8868\uFF0C\u6BCF\u4E2A\u8868\u90FD\u6709\u4E00\u4E2A\u540D\u5B57\uFF0C\u7528\u6765\u6807\u8BC6\u81EA\u5DF1\u3002\u8868\u540D\u5177\u6709\u552F\u4E00\u6027\u3002

                    • \u8868\u5177\u6709\u4E00\u4E9B\u7279\u6027\uFF0C\u8FD9\u4E9B\u7279\u6027\u5B9A\u4E49\u4E86\u6570\u636E\u5728\u8868\u4E2D\u5982\u4F55\u5B58\u50A8\uFF0C\u7C7B\u4F3CJava\u548CPython\u4E2D \u201C\u7C7B\u201D\u7684\u8BBE\u8BA1\u3002

                    image-20220501224609152

                    4.1 \u8868\u3001\u8BB0\u5F55\u3001\u5B57\u6BB5

                    • E-R\uFF08entity-relationship\uFF0C\u5B9E\u4F53-\u8054\u7CFB\uFF09\u6A21\u578B\u4E2D\u6709\u4E09\u4E2A\u4E3B\u8981\u6982\u5FF5\u662F\uFF1A\u5B9E\u4F53\u96C6\u3001\u5C5E\u6027\u3001\u8054\u7CFB\u96C6\u3002

                    • \u4E00\u4E2A\u5B9E\u4F53\u96C6\uFF08class\uFF09\u5BF9\u5E94\u4E8E\u6570\u636E\u5E93\u4E2D\u7684\u4E00\u4E2A\u8868\uFF08table\uFF09\uFF0C\u4E00\u4E2A\u5B9E\u4F53\uFF08instance\uFF09\u5219\u5BF9\u5E94\u4E8E\u6570\u636E\u5E93\u8868\u4E2D\u7684\u4E00\u884C\uFF08row\uFF09\uFF0C\u4E5F\u79F0\u4E3A\u4E00\u6761\u8BB0\u5F55\uFF08record\uFF09\u3002\u4E00\u4E2A\u5C5E\u6027\uFF08attribute\uFF09\u5BF9\u5E94\u4E8E\u6570\u636E\u5E93\u8868\u4E2D\u7684\u4E00\u5217\uFF08column\uFF09\uFF0C\u4E5F\u79F0\u4E3A\u4E00\u4E2A\u5B57\u6BB5\uFF08field\uFF09\u3002

                      image-20220501224859393

                    4.2 \u8868\u7684\u5173\u8054\u5173\u7CFB

                    • \u8868\u4E0E\u8868\u4E4B\u95F4\u7684\u6570\u636E\u8BB0\u5F55\u6709\u5173\u7CFB(relationship)\u3002\u73B0\u5B9E\u4E16\u754C\u4E2D\u7684\u5404\u79CD\u5B9E\u4F53\u4EE5\u53CA\u5B9E\u4F53\u4E4B\u95F4\u7684\u5404\u79CD\u8054\u7CFB\u5747\u7528\u5173\u7CFB\u6A21\u578B\u6765\u8868\u793A\u3002
                    • \u56DB\u79CD\uFF1A\u4E00\u5BF9\u4E00\u5173\u8054\u3001\u4E00\u5BF9\u591A\u5173\u8054\u3001\u591A\u5BF9\u591A\u5173\u8054\u3001\u81EA\u6211\u5F15\u7528
                    4.2.1 \u4E00\u5BF9\u4E00\u5173\u8054
                    • \u5728\u5B9E\u9645\u7684\u5F00\u53D1\u4E2D\u5E94\u7528\u4E0D\u591A\uFF0C\u56E0\u4E3A\u4E00\u5BF9\u4E00\u53EF\u4EE5\u521B\u5EFA\u6210\u4E00\u5F20\u8868
                    • \u4E3E\u4F8B\uFF1A\u8BBE\u8BA1\u5B66\u751F\u8868\uFF1A\u5B66\u53F7\u3001\u59D3\u540D\u3001\u624B\u673A\u53F7\u7801\u3001\u73ED\u7EA7\u3001\u7CFB\u522B\u3001\u8EAB\u4EFD\u8BC1\u53F7\u7801\u3001\u5BB6\u5EAD\u4F4F\u5740\u3001\u7C4D\u8D2F\u3001\u7D27\u6025\u8054\u7CFB\u4EBA....
                      • \u62C6\u4E3A\u4E24\u4E2A\u8868\uFF1A\u4E24\u4E2A\u8868\u7684\u8BB0\u5F55\u662F\u4E00\u4E00\u5BF9\u5E94\u5173\u7CFB
                      • \u57FA\u7840\u4FE1\u606F\u8868\uFF08\u5E38\u7528\u4FE1\u606F\uFF09\uFF1A\u5B66\u53F7\u3001\u59D3\u540D\u3001\u624B\u673A\u53F7\u7801\u3001\u73ED\u7EA7\u3001\u7CFB\u522B
                      • \u6863\u6848\u4FE1\u606F\u8868\uFF08\u975E\u5E38\u7528\u4FE1\u606F\uFF09\uFF1A\u5B66\u53F7\u3001\u8EAB\u4EFD\u8BC1\u53F7\u7801\u3001\u5BB6\u5EAD\u4F4F\u5740\u3001\u7C4D\u8D2F\u3001\u7D27\u6025\u8054\u7CFB\u4EBA
                    • \u4E24\u79CD\u5EFA\u8868\u539F\u5219\uFF1A
                      • \u5916\u952E\u552F\u4E00\uFF1A\u4E3B\u8868\u7684\u4E3B\u952E\u548C\u4ECE\u8868\u7684\u5916\u952E\uFF08\u552F\u4E00\uFF09\uFF0C\u5F62\u6210\u4E3B\u5916\u952E\u5173\u7CFB\uFF0C\u5916\u952E\u552F\u4E00
                      • \u5916\u952E\u662F\u4E3B\u952E\uFF1A\u4E3B\u8868\u7684\u4E3B\u952E\u548C\u4ECE\u8868\u7684\u4E3B\u952E\uFF0C\u5F62\u6210\u4E3B\u5916\u952E\u5173\u7CFB
                    4.2.1 \u4E00\u5BF9\u591A\u5173\u7CFB
                    • \u5E38\u89C1\u5B9E\u4F8B\u573A\u666F\uFF1A\u5BA2\u6237\u8868\u548C\u8BA2\u5355\u8868\uFF0C\u5206\u7C7B\u8868\u548C\u5546\u54C1\u8868\uFF0C\u90E8\u95E8\u8868\u548C\u5458\u5DE5\u8868

                    • \u4E3E\u4F8B\uFF1A

                      • \u5458\u5DE5\u8868\uFF1A\u7F16\u53F7\u3001\u59D3\u540D\u3001\u6240\u5C5E\u90E8\u95E8
                      • \u90E8\u95E8\u8868\uFF1A\u7F16\u53F7\u3001\u540D\u79F0\u3001\u7B80\u4ECB

                      \u4E00\u4E2A\u90E8\u95E8\u4E2D\u6709\u591A\u4E2A\u5458\u5DE5

                      image-20220501230307428

                      image-20220501230411372

                    4.2.3 \u591A\u5BF9\u591A\u5173\u7CFB

                    image-20220501230504625

                    4.2.4 \u81EA\u6211\u5F15\u7528

                    image-20220501230730379

                    \u7B2C02\u7AE0 MySQL\u73AF\u5883\u642D\u5EFA\uFF08\u7565\uFF09

                    1. MySQL\u6F14\u793A\u4F7F\u7528

                    1.1 MySQL\u4F7F\u7528\u6F14\u793A

                    show databases;
                    +import{_ as s,e as n}from"./app.f8791b52.js";var a="/study/assets/image-20220501222501715.85b46003.png",t="/study/assets/image-20220501223333852.5405ea75.png",e="/study/assets/image-20220501224609152.aaaf00b0.png",o="/study/assets/image-20220501224859393.e6d54a93.png",p="/study/assets/image-20220501230307428.bf89f80c.png",r="/study/assets/image-20220501230411372.c63df155.png",l="/study/assets/image-20220501230504625.19cc3804.png",c="/study/assets/image-20220501230730379.45e04e50.png",d="/study/assets/image-20220502180838771.d1f1e76c.png",i="/study/assets/image-20220502184304058.8bf409c6.png",u="/study/assets/image-20220502190908034.0b0c9cb3.png",k="/study/assets/image-20220502225257266.6de297ad.png",g="/study/assets/image-20220502225458779.ca457a20.png",h="/study/assets/image-20220502225458779.ca457a20.png",E="/study/assets/image-20220502231659661.d62c49ff.png",y="/study/assets/image-20220502232107515.52cca96e.png",m="/study/assets/image-20220502235236891.a438cbd8.png",T="/study/assets/image-20220502235244755.07443d25.png",L="/study/assets/image-20220502234515501.dc7b90ea.png",_="/study/assets/image-20220503142321115.a3151a13.png",R="/study/assets/image-20220503160142309.b7b71074.png",S="/study/assets/image-20220503162754152.749cd3a8.png",A="/study/assets/image-20220503205320333.b4edeaf8.png";const N={},b=n('

                    \u7B2C\u4E00\u90E8\u5206 MySQL\u57FA\u7840\u7BC7

                    \u7B2C01\u7AE0 \u6570\u636E\u5E93\u6982\u8FF0

                    1. \u4E3A\u4EC0\u4E48\u8981\u4F7F\u7528\u6570\u636E\u5E93

                    • \u6301\u4E45\u5316(persistence)\uFF1A\u628A\u6570\u636E\u4FDD\u5B58\u5230\u53EF\u6389\u7535\u5F0F\u5B58\u50A8\u8BBE\u5907\u4E2D\u4EE5\u4F9B\u4E4B\u540E\u4F7F\u7528\u3002\u5927\u591A\u6570\u60C5\u51B5\u4E0B\uFF0C\u7279\u522B\u662F\u4F01\u4E1A\u7EA7\u5E94\u7528\uFF0C\u6570\u636E\u6301\u4E45\u5316\u610F\u5473\u7740\u5C06\u5185\u5B58\u4E2D\u7684\u6570\u636E\u4FDD\u5B58\u5230\u786C\u76D8\u4E0A\u52A0\u4EE5\u201C\u56FA\u5316\u201D\uFF0C\u800C\u6301\u4E45\u5316\u7684\u5B9E\u73B0\u8FC7\u7A0B\u5927\u591A\u901A\u8FC7\u5404\u79CD\u5173\u7CFB\u6570\u636E\u5E93\u6765\u5B8C\u6210\u3002

                      \u5185\u5B58\u65AD\u7535\u4E86\u5C31\u4E0D\u80FD\u8FDB\u884C\u5B58\u50A8\u4E86\u3002\u5185\u5B58\u4E2D\u5B58\u50A8\u7684\u6570\u636E\u4E0D\u4FDD\u9669\uFF0C\u6240\u4EE5\u9700\u8981\u505A\u6570\u636E\u6301\u4E45\u5316\u3002

                    • \u6301\u4E45\u5316\u7684\u4E3B\u8981\u4F5C\u7528\u662F\u5C06\u5185\u5B58\u4E2D\u7684\u6570\u636E\u5B58\u50A8\u5728\u5173\u7CFB\u578B\u6570\u636E\u5E93\u4E2D\uFF0C\u5F53\u7136\u4E5F\u53EF\u4EE5\u5B58\u50A8\u5728\u78C1\u76D8\u6587\u4EF6\u3001XML\u6570\u636E\u6587\u4EF6\u4E2D\u3002

                    2. \u6570\u636E\u5E93\u4E0E\u6570\u636E\u5E93\u7BA1\u7406\u7CFB\u7EDF

                    2.1 \u6570\u636E\u5E93\u7684\u76F8\u5173\u6982\u5FF5

                    • DB\uFF1A\u6570\u636E\u5E93(Database)

                      • \u5373\u5B58\u50A8\u6570\u636E\u7684\u201C\u4ED3\u5E93\u201D\uFF0C\u5176\u672C\u8D28\u662F\u4E00\u4E2A\u6587\u4EF6\u7CFB\u7EDF\u3002\u5B83\u4FDD\u5B58\u4E86\u4E00\u7CFB\u5217\u6709\u7EC4\u7EC7\u7684\u6570\u636E\u3002
                    • DBMS\uFF1A\u6570\u636E\u5E93\u7BA1\u7406\u7CFB\u7EDF(Database Management System)

                      • \u662F\u4E00\u79CD\u64CD\u7EB5\u548C\u7BA1\u7406\u6570\u636E\u5E93\u7684\u5927\u578B\u8F6F\u4EF6\uFF0C\u7528\u4E8E\u5EFA\u7ACB\u3001\u4F7F\u7528\u548C\u7EF4\u62A4\u6570\u636E\u5E93\uFF0C\u5BF9\u6570\u636E\u5E93\u8FDB\u884C\u7EDF\u4E00\u7BA1\u7406\u548C\u63A7\u5236\u3002\u7528\u6237\u901A\u8FC7\u6570\u636E\u5E93\u7BA1\u7406\u7CFB\u7EDF\u8BBF\u95EE\u6570\u636E\u5E93\u4E2D\u8868\u5185\u7684\u6570\u636E\u3002
                    • SQL\uFF1A\u7ED3\u6784\u5316\u67E5\u8BE2\u8BED\u8A00\uFF08Structured Query Language\uFF09

                      • \u4E13\u95E8\u7528\u6765\u4E0E\u6570\u636E\u5E93\u901A\u4FE1\u7684\u8BED\u8A00\u3002

                    2.2. \u6570\u636E\u5E93\u4E0E\u6570\u636E\u5E93\u7BA1\u7406\u7CFB\u7EDF\u4E4B\u95F4\u7684\u5173\u7CFB

                    \u6570\u636E\u5E93\u7BA1\u7406\u7CFB\u7EDF(DBMS)\u53EF\u4EE5\u7BA1\u7406\u591A\u4E2A\u6570\u636E\u5E93\uFF0C\u4E00\u822C\u5F00\u53D1\u4EBA\u5458\u4F1A\u9488\u5BF9\u6BCF\u4E00\u4E2A\u5E94\u7528\u521B\u5EFA\u4E00\u4E2A\u6570\u636E\u5E93\u3002\u4E3A\u4FDD\u5B58\u5E94\u7528\u4E2D\u5B9E\u4F53\u7684\u6570\u636E\uFF0C\u4E00\u822C\u4F1A\u5728\u6570\u636E\u5E93\u521B\u5EFA\u591A\u4E2A\u8868\uFF0C\u4EE5\u4FDD\u5B58\u7A0B\u5E8F\u4E2D\u5B9E\u4F53\u7528\u6237\u7684\u6570\u636E\u3002\u4E00\u822C\u4E00\u4E2AJava bean\u5BF9\u5E94\u4E8E\u4E00\u4E2A\u8868\u3002

                    \u6570\u636E\u5E93\u7BA1\u7406\u7CFB\u7EDF\u3001\u6570\u636E\u5E93\u548C\u8868\u4E4B\u95F4\u7684\u5173\u7CFB\uFF1A

                    image-20220501222501715

                    3. RDBMS\u4E0E\u975ERDBMS

                    3.1 \u5173\u7CFB\u578B\u6570\u636E\u5E93(RDBMS)

                    3.1.1 \u5B9E\u8D28
                    • \u8FD9\u79CD\u7C7B\u578B\u7684\u6570\u636E\u5E93\u662F\u6700\u53E4\u8001\u7684\u6570\u636E\u5E93\u7C7B\u578B\uFF0C\u5173\u7CFB\u578B\u6570\u636E\u5E93\u6A21\u578B\u662F\u628A\u590D\u6742\u7684\u6570\u636E\u7ED3\u6784\u5F52\u7ED3\u4E3A\u7B80\u5355\u7684\u4E8C\u5143\u5173\u7CFB \uFF08\u5373\u4E8C\u7EF4\u8868\u683C\u5F62\u5F0F\uFF09\u3002
                    • \u5173\u7CFB\u578B\u6570\u636E\u5E93\u4EE5\u884C(row)\u548C\u5217(column)\u7684\u5F62\u5F0F\u5B58\u50A8\u6570\u636E\uFF0C\u4EE5\u4FBF\u4E8E\u7528\u6237\u7406\u89E3\u3002\u8FD9\u4E00\u7CFB\u5217\u7684\u884C\u548C\u5217\u88AB\u79F0\u4E3A\u8868(table)\uFF0C\u4E00\u7EC4\u8868\u7EC4\u6210\u4E86\u4E00\u4E2A\u5E93(database)\u3002
                    • \u8868\u4E0E\u8868\u4E4B\u95F4\u7684\u6570\u636E\u8BB0\u5F55\u6709\u5173\u7CFB\u3002
                    • SQL\u5C31\u662F\u5173\u7CFB\u578B\u6570\u636E\u5E93\u7684\u67E5\u8BE2\u8BED\u8A00\u3002

                    image-20220501223333852

                    3.1.2 \u4F18\u52BF
                    • \u590D\u6742\u67E5\u8BE2

                      \u53EF\u4EE5\u7528SQL\u8BED\u53E5\u65B9\u4FBF\u7684\u5728\u4E00\u4E2A\u8868\u4EE5\u53CA\u591A\u4E2A\u8868\u4E4B\u95F4\u505A\u975E\u5E38\u590D\u6742\u7684\u6570\u636E\u67E5\u8BE2\u3002

                    • \u4E8B\u52A1\u652F\u6301

                      \u4F7F\u5F97\u5BF9\u4E8E\u5B89\u5168\u6027\u80FD\u5F88\u9AD8\u7684\u6570\u636E\u8BBF\u95EE\u8981\u6C42\u5F97\u4EE5\u5B9E\u73B0\u3002

                    3.2 \u975E\u5173\u7CFB\u578B\u6570\u636E\u5E93(\u975ERDBMS)

                    3.2.1 \u4ECB\u7ECD

                    \u975E\u5173\u7CFB\u578B\u6570\u636E\u5E93\uFF0C\u53EF\u770B\u6210\u4F20\u7EDF\u5173\u7CFB\u578B\u6570\u636E\u5E93\u7684\u529F\u80FD\u9609\u5272\u7248\u672C\uFF0C\u57FA\u4E8E\u952E\u503C\u5BF9\u5B58\u50A8\u6570\u636E\uFF0C\u4E0D\u9700\u8981\u7ECF\u8FC7SQL\u5C42\u7684\u89E3\u6790\uFF0C\u6027\u80FD\u975E\u5E38\u9AD8\u3002\u540C\u65F6\uFF0C\u901A\u8FC7\u51CF\u5C11\u4E0D\u5E38\u7528\u7684\u529F\u80FD\uFF0C\u8FDB\u4E00\u6B65\u63D0\u9AD8\u6027\u80FD\u3002

                    4. \u5173\u7CFB\u578B\u6570\u636E\u5E93\u8BBE\u8BA1\u89C4\u5219

                    • \u5173\u7CFB\u578B\u6570\u636E\u5E93\u7684\u5178\u578B\u6570\u636E\u7ED3\u6784\u5C31\u662F\u6570\u636E\u8868\uFF0C\u8FD9\u4E9B\u6570\u636E\u8868\u7684\u7EC4\u6210\u90FD\u662F\u7ED3\u6784\u5316\u7684

                    • \u5C06\u6570\u636E\u653E\u5230\u8868\uFF0C\u8868\u518D\u653E\u5230\u6570\u636E\u5E93\u4E2D\u3002

                    • \u4E00\u4E2A\u6570\u636E\u5E93\u4E2D\u53EF\u4EE5\u6709\u591A\u4E2A\u8868\uFF0C\u6BCF\u4E2A\u8868\u90FD\u6709\u4E00\u4E2A\u540D\u5B57\uFF0C\u7528\u6765\u6807\u8BC6\u81EA\u5DF1\u3002\u8868\u540D\u5177\u6709\u552F\u4E00\u6027\u3002

                    • \u8868\u5177\u6709\u4E00\u4E9B\u7279\u6027\uFF0C\u8FD9\u4E9B\u7279\u6027\u5B9A\u4E49\u4E86\u6570\u636E\u5728\u8868\u4E2D\u5982\u4F55\u5B58\u50A8\uFF0C\u7C7B\u4F3CJava\u548CPython\u4E2D \u201C\u7C7B\u201D\u7684\u8BBE\u8BA1\u3002

                    image-20220501224609152

                    4.1 \u8868\u3001\u8BB0\u5F55\u3001\u5B57\u6BB5

                    • E-R\uFF08entity-relationship\uFF0C\u5B9E\u4F53-\u8054\u7CFB\uFF09\u6A21\u578B\u4E2D\u6709\u4E09\u4E2A\u4E3B\u8981\u6982\u5FF5\u662F\uFF1A\u5B9E\u4F53\u96C6\u3001\u5C5E\u6027\u3001\u8054\u7CFB\u96C6\u3002

                    • \u4E00\u4E2A\u5B9E\u4F53\u96C6\uFF08class\uFF09\u5BF9\u5E94\u4E8E\u6570\u636E\u5E93\u4E2D\u7684\u4E00\u4E2A\u8868\uFF08table\uFF09\uFF0C\u4E00\u4E2A\u5B9E\u4F53\uFF08instance\uFF09\u5219\u5BF9\u5E94\u4E8E\u6570\u636E\u5E93\u8868\u4E2D\u7684\u4E00\u884C\uFF08row\uFF09\uFF0C\u4E5F\u79F0\u4E3A\u4E00\u6761\u8BB0\u5F55\uFF08record\uFF09\u3002\u4E00\u4E2A\u5C5E\u6027\uFF08attribute\uFF09\u5BF9\u5E94\u4E8E\u6570\u636E\u5E93\u8868\u4E2D\u7684\u4E00\u5217\uFF08column\uFF09\uFF0C\u4E5F\u79F0\u4E3A\u4E00\u4E2A\u5B57\u6BB5\uFF08field\uFF09\u3002

                      image-20220501224859393

                    4.2 \u8868\u7684\u5173\u8054\u5173\u7CFB

                    • \u8868\u4E0E\u8868\u4E4B\u95F4\u7684\u6570\u636E\u8BB0\u5F55\u6709\u5173\u7CFB(relationship)\u3002\u73B0\u5B9E\u4E16\u754C\u4E2D\u7684\u5404\u79CD\u5B9E\u4F53\u4EE5\u53CA\u5B9E\u4F53\u4E4B\u95F4\u7684\u5404\u79CD\u8054\u7CFB\u5747\u7528\u5173\u7CFB\u6A21\u578B\u6765\u8868\u793A\u3002
                    • \u56DB\u79CD\uFF1A\u4E00\u5BF9\u4E00\u5173\u8054\u3001\u4E00\u5BF9\u591A\u5173\u8054\u3001\u591A\u5BF9\u591A\u5173\u8054\u3001\u81EA\u6211\u5F15\u7528
                    4.2.1 \u4E00\u5BF9\u4E00\u5173\u8054
                    • \u5728\u5B9E\u9645\u7684\u5F00\u53D1\u4E2D\u5E94\u7528\u4E0D\u591A\uFF0C\u56E0\u4E3A\u4E00\u5BF9\u4E00\u53EF\u4EE5\u521B\u5EFA\u6210\u4E00\u5F20\u8868
                    • \u4E3E\u4F8B\uFF1A\u8BBE\u8BA1\u5B66\u751F\u8868\uFF1A\u5B66\u53F7\u3001\u59D3\u540D\u3001\u624B\u673A\u53F7\u7801\u3001\u73ED\u7EA7\u3001\u7CFB\u522B\u3001\u8EAB\u4EFD\u8BC1\u53F7\u7801\u3001\u5BB6\u5EAD\u4F4F\u5740\u3001\u7C4D\u8D2F\u3001\u7D27\u6025\u8054\u7CFB\u4EBA....
                      • \u62C6\u4E3A\u4E24\u4E2A\u8868\uFF1A\u4E24\u4E2A\u8868\u7684\u8BB0\u5F55\u662F\u4E00\u4E00\u5BF9\u5E94\u5173\u7CFB
                      • \u57FA\u7840\u4FE1\u606F\u8868\uFF08\u5E38\u7528\u4FE1\u606F\uFF09\uFF1A\u5B66\u53F7\u3001\u59D3\u540D\u3001\u624B\u673A\u53F7\u7801\u3001\u73ED\u7EA7\u3001\u7CFB\u522B
                      • \u6863\u6848\u4FE1\u606F\u8868\uFF08\u975E\u5E38\u7528\u4FE1\u606F\uFF09\uFF1A\u5B66\u53F7\u3001\u8EAB\u4EFD\u8BC1\u53F7\u7801\u3001\u5BB6\u5EAD\u4F4F\u5740\u3001\u7C4D\u8D2F\u3001\u7D27\u6025\u8054\u7CFB\u4EBA
                    • \u4E24\u79CD\u5EFA\u8868\u539F\u5219\uFF1A
                      • \u5916\u952E\u552F\u4E00\uFF1A\u4E3B\u8868\u7684\u4E3B\u952E\u548C\u4ECE\u8868\u7684\u5916\u952E\uFF08\u552F\u4E00\uFF09\uFF0C\u5F62\u6210\u4E3B\u5916\u952E\u5173\u7CFB\uFF0C\u5916\u952E\u552F\u4E00
                      • \u5916\u952E\u662F\u4E3B\u952E\uFF1A\u4E3B\u8868\u7684\u4E3B\u952E\u548C\u4ECE\u8868\u7684\u4E3B\u952E\uFF0C\u5F62\u6210\u4E3B\u5916\u952E\u5173\u7CFB
                    4.2.1 \u4E00\u5BF9\u591A\u5173\u7CFB
                    • \u5E38\u89C1\u5B9E\u4F8B\u573A\u666F\uFF1A\u5BA2\u6237\u8868\u548C\u8BA2\u5355\u8868\uFF0C\u5206\u7C7B\u8868\u548C\u5546\u54C1\u8868\uFF0C\u90E8\u95E8\u8868\u548C\u5458\u5DE5\u8868

                    • \u4E3E\u4F8B\uFF1A

                      • \u5458\u5DE5\u8868\uFF1A\u7F16\u53F7\u3001\u59D3\u540D\u3001\u6240\u5C5E\u90E8\u95E8
                      • \u90E8\u95E8\u8868\uFF1A\u7F16\u53F7\u3001\u540D\u79F0\u3001\u7B80\u4ECB

                      \u4E00\u4E2A\u90E8\u95E8\u4E2D\u6709\u591A\u4E2A\u5458\u5DE5

                      image-20220501230307428

                      image-20220501230411372

                    4.2.3 \u591A\u5BF9\u591A\u5173\u7CFB

                    image-20220501230504625

                    4.2.4 \u81EA\u6211\u5F15\u7528

                    image-20220501230730379

                    \u7B2C02\u7AE0 MySQL\u73AF\u5883\u642D\u5EFA\uFF08\u7565\uFF09

                    1. MySQL\u6F14\u793A\u4F7F\u7528

                    1.1 MySQL\u4F7F\u7528\u6F14\u793A

                    show databases;
                     

                    \u201Cinformation_schema\u201D\u662F MySQL \u7CFB\u7EDF\u81EA\u5E26\u7684\u6570\u636E\u5E93\uFF0C\u4E3B\u8981\u4FDD\u5B58 MySQL \u6570\u636E\u5E93\u670D\u52A1\u5668\u7684\u7CFB\u7EDF\u4FE1\u606F\uFF0C\u6BD4\u5982\u6570\u636E\u5E93\u7684\u540D\u79F0\u3001\u6570\u636E\u8868\u7684\u540D\u79F0\u3001\u5B57\u6BB5\u540D\u79F0\u3001\u5B58\u53D6\u6743\u9650\u3001\u6570\u636E\u6587\u4EF6\u6240\u5728\u7684\u6587\u4EF6\u5939\u548C\u7CFB\u7EDF\u4F7F\u7528\u7684\u6587\u4EF6\u5939\uFF0C\u7B49\u7B49

                    \u201Cperformance_schema\u201D\u662F MySQL \u7CFB\u7EDF\u81EA\u5E26\u7684\u6570\u636E\u5E93\uFF0C\u53EF\u4EE5\u7528\u6765\u76D1\u63A7 MySQL \u7684\u5404\u7C7B\u6027\u80FD\u6307\u6807\u3002

                    \u201Csys\u201D\u6570\u636E\u5E93\u662F MySQL \u7CFB\u7EDF\u81EA\u5E26\u7684\u6570\u636E\u5E93\uFF0C\u4E3B\u8981\u4F5C\u7528\u662F\u4EE5\u4E00\u79CD\u66F4\u5BB9\u6613\u88AB\u7406\u89E3\u7684\u65B9\u5F0F\u5C55\u793A MySQL \u6570\u636E\u5E93\u670D\u52A1\u5668\u7684\u5404\u7C7B\u6027\u80FD\u6307\u6807\uFF0C\u5E2E\u52A9\u7CFB\u7EDF\u7BA1\u7406\u5458\u548C\u5F00\u53D1\u4EBA\u5458\u76D1\u63A7 MySQL \u7684\u6280\u672F\u6027\u80FD\u3002

                    \u201Cmysql\u201D\u6570\u636E\u5E93\u4FDD\u5B58\u4E86 MySQL \u6570\u636E\u5E93\u670D\u52A1\u5668\u8FD0\u884C\u65F6\u9700\u8981\u7684\u7CFB\u7EDF\u4FE1\u606F\uFF0C\u6BD4\u5982\u6570\u636E\u6587\u4EF6\u5939\u3001\u5F53\u524D\u4F7F\u7528\u7684\u5B57\u7B26\u96C6\u3001\u7EA6\u675F\u68C0\u67E5\u4FE1\u606F\uFF0C\u7B49\u7B49

                    1.2 MySQL\u7684\u7F16\u7801\u8BBE\u7F6E

                    MySQL5.7\u4E2D

                    \u95EE\u9898\u518D\u73B0\uFF1A\u547D\u4EE4\u884C\u64CD\u4F5Csql\u4E71\u7801\u95EE\u9898

                    mysql> INSERT INTO t_stu VALUES(1,'\u5F20\u4E09','\u7537');
                     ERROR 1366 (HY000): Incorrect string value: '\\xD5\\xC5\\xC8\\xFD' for column 'sname' at row 1
                     

                    \u95EE\u9898\u89E3\u51B3

                    \u6B65\u9AA41\uFF1A\u67E5\u770B\u7F16\u7801\u547D\u4EE4

                    show variables like 'character_%';
                    diff --git "a/assets/MySQL\346\225\260\346\215\256\345\272\223\347\254\224\350\256\260-\347\254\254\344\272\214\351\203\250\345\210\206.html.eee773eb.js" "b/assets/MySQL\346\225\260\346\215\256\345\272\223\347\254\224\350\256\260-\347\254\254\344\272\214\351\203\250\345\210\206.html.4a06dff3.js"
                    similarity index 99%
                    rename from "assets/MySQL\346\225\260\346\215\256\345\272\223\347\254\224\350\256\260-\347\254\254\344\272\214\351\203\250\345\210\206.html.eee773eb.js"
                    rename to "assets/MySQL\346\225\260\346\215\256\345\272\223\347\254\224\350\256\260-\347\254\254\344\272\214\351\203\250\345\210\206.html.4a06dff3.js"
                    index 5ba93f74..8325599a 100644
                    --- "a/assets/MySQL\346\225\260\346\215\256\345\272\223\347\254\224\350\256\260-\347\254\254\344\272\214\351\203\250\345\210\206.html.eee773eb.js"
                    +++ "b/assets/MySQL\346\225\260\346\215\256\345\272\223\347\254\224\350\256\260-\347\254\254\344\272\214\351\203\250\345\210\206.html.4a06dff3.js"
                    @@ -1,4 +1,4 @@
                    -import{_ as e,e as o}from"./app.0d029894.js";var s="/study/assets/image-20220504000722409.81e9dd72.png",n="/study/assets/image-20220504001341100.1e8ac587.png",a="/study/assets/image-20220504004152165.f36a37c3.png",d="/study/assets/image-20220504005350560.838d5555.png",t="/study/assets/image-20220504225324294.da2431f3.png",r="/study/assets/image-20220504232259339.df63a41e.png",c="/study/assets/image-20220504232445093.aa6c06aa.png",i="/study/assets/image-20220504232621372.f7092bb7.png",l="/study/assets/image-20220504233032833.b3c8e264.png",p="/study/assets/image-20220504233335715.acf55b65.png",g="/study/assets/image-20220504234127640.335dc849.png",h="/study/assets/image-20220504234316804.1525e4b2.png",u="/study/assets/image-20220505162215734.c4eac240.png",m="/study/assets/image-20220505171914132.58f364a1.png",_="/study/assets/image-20220505173332961.fc8f1781.png",y="/study/assets/image-20220505173455290.5cd9774c.png",b="/study/assets/image-20220505173521250.f11dc885.png",E="/study/assets/image-20220505193509658.69739fdc.png",L="/study/assets/image-20220505200229398.e640a631.png",f="/study/assets/image-20220505200633583.2e6297d2.png",q="/study/assets/image-20220505201109329.f353254b.png",x="/study/assets/image-20220505201556827.26093eb1.png",I="/study/assets/202203301004386.add9e28a.png",S="/study/assets/image-20220505210019906.d61052ce.png",v="/study/assets/image-20220505211735337.1f86bc65.png",k="/study/assets/image-20220505222843206.eb7a5d6c.png",T="/study/assets/image-20220505222949641.231dd0e1.png",A="/study/assets/image-20220506000814916.c4d2022f.png",M="/study/assets/image-20220506002356745.f2bbc7ea.png",R="/study/assets/image-20220506185426045.5a7d7a4a.png",B="/study/assets/image-20220506192846780.76d502e4.png",O="/study/assets/image-20220506201446915.0c06eef6.png",N="/study/assets/image-20220506222057864.5b7b0d22.png",D="/study/assets/image-20220506203302015.d12b544f.png",C="/study/assets/image-20220506203503802.4ac2bcfc.png",Q="/study/assets/image-20220506203537904.838614ac.png",w="/study/assets/image-20220506203841921.e81a2329.png",P="/study/assets/image-20220506203906362.e2736081.png",U="/study/assets/image-20220506204023122.8b5f9c20.png",F="/study/assets/image-20220506234506092.8d58ae0a.png",G="/study/assets/image-20220507160540797.4591d3ad.png",V="/study/assets/image-20220507163818901.901def3f.png",H="/study/assets/image-20220507164734700.7fbfb371.png",X="/study/assets/image-20220507165929442.54f87386.png",j="/study/assets/image-20220507170030634.1b53a78c.png",K="/study/assets/image-20220507170059960.6f42d8cd.png",Y="/study/assets/image-20220507171258096.6ed85af6.png",W="/study/assets/image-20220507200231991.d61b0b6a.png",z="/study/assets/image-20220507213023844.6d23c3dd.png",J="/study/assets/image-20220507213340990.41822ac4.png",Z="/study/assets/image-20220507213742681.142e924b.png",$="/study/assets/image-20220507214421081.62173eed.png",ee="/study/assets/image-20220507214433475.9f94d878.png",oe="/study/assets/image-20220507215125805.6003bcc1.png",se="/study/assets/image-20220508230451144.3c5b8f15.png",ne="/study/assets/image-20220508230501235.2b021fa1.png",ae="/study/assets/image-20220508230751274.cb85b876.png",de="/study/assets/image-20220508233703417.37504d51.png",te="/study/assets/image-20220508234123285.ae53250a.png",re="/study/assets/image-20220508234708282.82a35a31.png",ce="/study/assets/image-20220509001427900.4192f424.png",ie="/study/assets/image-20220509181504432.b2685c95.png",le="/study/assets/image-20220509183558237.255c63f3.png",pe="/study/assets/image-20220509220055881.0e9e232d.png",ge="/study/assets/image-20220509220637171.6721ae17.png",he="/study/assets/image-20220509222742980.84e98516.png",ue="/study/assets/image-20220509223609674.96b7d316.png",me="/study/assets/image-20220510011844211.a5b1fb3c.png",_e="/study/assets/image-20220510184237766.a6b5d13a.png",ye="/study/assets/image-20220510184313614.91983300.png",be="/study/assets/image-20220510184704055.11e0de7d.png",Ee="/study/assets/image-20220510184941761.37f9f278.png",Le="/study/assets/image-20220510185252533.5971615f.png",fe="/study/assets/image-20220510190929111.ea3c246c.png",qe="/study/assets/image-20220510191837001.201fb832.png",xe="/study/assets/image-20220510193537606.f5a39192.png",Ie="/study/assets/image-20220510194504708.3911bb1b.png",Se="/study/assets/image-20220510194539697.593d800f.png",ve="/study/assets/image-20220510223605049.b62c8336.png",ke="/study/assets/image-20220510225155107.b9e126b9.png",Te="/study/assets/image-20220511172652113.3fb1c363.png",Ae="/study/assets/image-20220511184826408.dd1764ed.png",Me="/study/assets/image-20220512155401343.facd798a.png",Re="/study/assets/image-20220512162022056.c5b5eddc.png",Be="/study/assets/image-20220512162208201.602b64ed.png",Oe="/study/assets/image-20220512164808936.343be76c.png",Ne="/study/assets/image-20220512165212730.e6925630.png",De="/study/assets/image-20220512171649266.b85c6f9d.png",Ce="/study/assets/image-20220512202803992.7a8408d0.png",Qe="/study/assets/image-20220512214929906.dd94068a.png",we="/study/assets/image-20220512215337713.6f00d430.png",Pe="/study/assets/image-20220512223646812.30a6743a.png",Ue="/study/assets/image-20220512225928434.ef6bca70.png",Fe="/study/assets/image-20220512232420415.cd1d0229.png",Ge="/study/assets/image-20220513000732732.284ad065.png",Ve="/study/assets/image-20220513171605954.ef7ae0fe.png",He="/study/assets/image-20220513184324327.3c6919a3.png";const Xe={},je=o(`

                    \u7B2C\u4E8C\u90E8\u5206 MySQL\u9AD8\u7EA7\u7279\u6027\u7BC7

                    \u7B2C01\u7AE0 Linux\u4E0BMySQL\u7684\u5B89\u88C5\u4E0E\u4F7F\u7528

                    1. \u5B89\u88C5\u524D\u8BF4\u660E

                    1.1 \u67E5\u770B\u662F\u5426\u5B89\u88C5\u8FC7MySQL

                    • \u5982\u679C\u4F60\u662F\u7528rpm\u5B89\u88C5, \u68C0\u67E5\u4E00\u4E0BRPM PACKAGE\uFF1A
                    rpm -qa | grep -i mysql # -i \u5FFD\u7565\u5927\u5C0F\u5199
                    +import{_ as e,e as o}from"./app.f8791b52.js";var s="/study/assets/image-20220504000722409.81e9dd72.png",n="/study/assets/image-20220504001341100.1e8ac587.png",a="/study/assets/image-20220504004152165.f36a37c3.png",d="/study/assets/image-20220504005350560.838d5555.png",t="/study/assets/image-20220504225324294.da2431f3.png",r="/study/assets/image-20220504232259339.df63a41e.png",c="/study/assets/image-20220504232445093.aa6c06aa.png",i="/study/assets/image-20220504232621372.f7092bb7.png",l="/study/assets/image-20220504233032833.b3c8e264.png",p="/study/assets/image-20220504233335715.acf55b65.png",g="/study/assets/image-20220504234127640.335dc849.png",h="/study/assets/image-20220504234316804.1525e4b2.png",u="/study/assets/image-20220505162215734.c4eac240.png",m="/study/assets/image-20220505171914132.58f364a1.png",_="/study/assets/image-20220505173332961.fc8f1781.png",y="/study/assets/image-20220505173455290.5cd9774c.png",b="/study/assets/image-20220505173521250.f11dc885.png",E="/study/assets/image-20220505193509658.69739fdc.png",L="/study/assets/image-20220505200229398.e640a631.png",f="/study/assets/image-20220505200633583.2e6297d2.png",q="/study/assets/image-20220505201109329.f353254b.png",x="/study/assets/image-20220505201556827.26093eb1.png",I="/study/assets/202203301004386.add9e28a.png",S="/study/assets/image-20220505210019906.d61052ce.png",v="/study/assets/image-20220505211735337.1f86bc65.png",k="/study/assets/image-20220505222843206.eb7a5d6c.png",T="/study/assets/image-20220505222949641.231dd0e1.png",A="/study/assets/image-20220506000814916.c4d2022f.png",M="/study/assets/image-20220506002356745.f2bbc7ea.png",R="/study/assets/image-20220506185426045.5a7d7a4a.png",B="/study/assets/image-20220506192846780.76d502e4.png",O="/study/assets/image-20220506201446915.0c06eef6.png",N="/study/assets/image-20220506222057864.5b7b0d22.png",D="/study/assets/image-20220506203302015.d12b544f.png",C="/study/assets/image-20220506203503802.4ac2bcfc.png",Q="/study/assets/image-20220506203537904.838614ac.png",w="/study/assets/image-20220506203841921.e81a2329.png",P="/study/assets/image-20220506203906362.e2736081.png",U="/study/assets/image-20220506204023122.8b5f9c20.png",F="/study/assets/image-20220506234506092.8d58ae0a.png",G="/study/assets/image-20220507160540797.4591d3ad.png",V="/study/assets/image-20220507163818901.901def3f.png",H="/study/assets/image-20220507164734700.7fbfb371.png",X="/study/assets/image-20220507165929442.54f87386.png",j="/study/assets/image-20220507170030634.1b53a78c.png",K="/study/assets/image-20220507170059960.6f42d8cd.png",Y="/study/assets/image-20220507171258096.6ed85af6.png",W="/study/assets/image-20220507200231991.d61b0b6a.png",z="/study/assets/image-20220507213023844.6d23c3dd.png",J="/study/assets/image-20220507213340990.41822ac4.png",Z="/study/assets/image-20220507213742681.142e924b.png",$="/study/assets/image-20220507214421081.62173eed.png",ee="/study/assets/image-20220507214433475.9f94d878.png",oe="/study/assets/image-20220507215125805.6003bcc1.png",se="/study/assets/image-20220508230451144.3c5b8f15.png",ne="/study/assets/image-20220508230501235.2b021fa1.png",ae="/study/assets/image-20220508230751274.cb85b876.png",de="/study/assets/image-20220508233703417.37504d51.png",te="/study/assets/image-20220508234123285.ae53250a.png",re="/study/assets/image-20220508234708282.82a35a31.png",ce="/study/assets/image-20220509001427900.4192f424.png",ie="/study/assets/image-20220509181504432.b2685c95.png",le="/study/assets/image-20220509183558237.255c63f3.png",pe="/study/assets/image-20220509220055881.0e9e232d.png",ge="/study/assets/image-20220509220637171.6721ae17.png",he="/study/assets/image-20220509222742980.84e98516.png",ue="/study/assets/image-20220509223609674.96b7d316.png",me="/study/assets/image-20220510011844211.a5b1fb3c.png",_e="/study/assets/image-20220510184237766.a6b5d13a.png",ye="/study/assets/image-20220510184313614.91983300.png",be="/study/assets/image-20220510184704055.11e0de7d.png",Ee="/study/assets/image-20220510184941761.37f9f278.png",Le="/study/assets/image-20220510185252533.5971615f.png",fe="/study/assets/image-20220510190929111.ea3c246c.png",qe="/study/assets/image-20220510191837001.201fb832.png",xe="/study/assets/image-20220510193537606.f5a39192.png",Ie="/study/assets/image-20220510194504708.3911bb1b.png",Se="/study/assets/image-20220510194539697.593d800f.png",ve="/study/assets/image-20220510223605049.b62c8336.png",ke="/study/assets/image-20220510225155107.b9e126b9.png",Te="/study/assets/image-20220511172652113.3fb1c363.png",Ae="/study/assets/image-20220511184826408.dd1764ed.png",Me="/study/assets/image-20220512155401343.facd798a.png",Re="/study/assets/image-20220512162022056.c5b5eddc.png",Be="/study/assets/image-20220512162208201.602b64ed.png",Oe="/study/assets/image-20220512164808936.343be76c.png",Ne="/study/assets/image-20220512165212730.e6925630.png",De="/study/assets/image-20220512171649266.b85c6f9d.png",Ce="/study/assets/image-20220512202803992.7a8408d0.png",Qe="/study/assets/image-20220512214929906.dd94068a.png",we="/study/assets/image-20220512215337713.6f00d430.png",Pe="/study/assets/image-20220512223646812.30a6743a.png",Ue="/study/assets/image-20220512225928434.ef6bca70.png",Fe="/study/assets/image-20220512232420415.cd1d0229.png",Ge="/study/assets/image-20220513000732732.284ad065.png",Ve="/study/assets/image-20220513171605954.ef7ae0fe.png",He="/study/assets/image-20220513184324327.3c6919a3.png";const Xe={},je=o(`

                    \u7B2C\u4E8C\u90E8\u5206 MySQL\u9AD8\u7EA7\u7279\u6027\u7BC7

                    \u7B2C01\u7AE0 Linux\u4E0BMySQL\u7684\u5B89\u88C5\u4E0E\u4F7F\u7528

                    1. \u5B89\u88C5\u524D\u8BF4\u660E

                    1.1 \u67E5\u770B\u662F\u5426\u5B89\u88C5\u8FC7MySQL

                    • \u5982\u679C\u4F60\u662F\u7528rpm\u5B89\u88C5, \u68C0\u67E5\u4E00\u4E0BRPM PACKAGE\uFF1A
                    rpm -qa | grep -i mysql # -i \u5FFD\u7565\u5927\u5C0F\u5199
                     
                    • \u68C0\u67E5mysql service\uFF1A
                    systemctl status mysqld.service
                     

                    1.2 MySQL\u7684\u5378\u8F7D

                    1. \u5173\u95ED mysql \u670D\u52A1

                    systemctl stop mysqld.service
                     

                    2. \u67E5\u770B\u5F53\u524D mysql \u5B89\u88C5\u72B6\u51B5

                    rpm -qa | grep -i mysql
                    diff --git "a/assets/MySQL\346\225\260\346\215\256\345\272\223\347\254\224\350\256\260-\347\254\254\344\272\214\351\203\250\345\210\206.html.832565fe.js" "b/assets/MySQL\346\225\260\346\215\256\345\272\223\347\254\224\350\256\260-\347\254\254\344\272\214\351\203\250\345\210\206.html.ee2d8734.js"
                    similarity index 99%
                    rename from "assets/MySQL\346\225\260\346\215\256\345\272\223\347\254\224\350\256\260-\347\254\254\344\272\214\351\203\250\345\210\206.html.832565fe.js"
                    rename to "assets/MySQL\346\225\260\346\215\256\345\272\223\347\254\224\350\256\260-\347\254\254\344\272\214\351\203\250\345\210\206.html.ee2d8734.js"
                    index f8006bb7..345bb929 100644
                    --- "a/assets/MySQL\346\225\260\346\215\256\345\272\223\347\254\224\350\256\260-\347\254\254\344\272\214\351\203\250\345\210\206.html.832565fe.js"
                    +++ "b/assets/MySQL\346\225\260\346\215\256\345\272\223\347\254\224\350\256\260-\347\254\254\344\272\214\351\203\250\345\210\206.html.ee2d8734.js"
                    @@ -1 +1 @@
                    -const l={key:"v-94326c4c",path:"/java/%E6%95%B0%E6%8D%AE%E5%BA%93/mysql/%E9%AB%98%E7%BA%A7%E7%AF%87/MySQL%E6%95%B0%E6%8D%AE%E5%BA%93%E7%AC%94%E8%AE%B0-%E7%AC%AC%E4%BA%8C%E9%83%A8%E5%88%86.html",title:"\u7B2C\u4E8C\u90E8\u5206 MySQL\u9AD8\u7EA7\u7279\u6027\u7BC7",lang:"zh-CN",frontmatter:{},excerpt:"",headers:[{level:2,title:"\u7B2C01\u7AE0 Linux\u4E0BMySQL\u7684\u5B89\u88C5\u4E0E\u4F7F\u7528",slug:"\u7B2C01\u7AE0-linux\u4E0Bmysql\u7684\u5B89\u88C5\u4E0E\u4F7F\u7528",children:[{level:3,title:"1. \u5B89\u88C5\u524D\u8BF4\u660E",slug:"_1-\u5B89\u88C5\u524D\u8BF4\u660E",children:[{level:4,title:"1.1 \u67E5\u770B\u662F\u5426\u5B89\u88C5\u8FC7MySQL",slug:"_1-1-\u67E5\u770B\u662F\u5426\u5B89\u88C5\u8FC7mysql",children:[]},{level:4,title:"1.2 MySQL\u7684\u5378\u8F7D",slug:"_1-2-mysql\u7684\u5378\u8F7D",children:[]}]},{level:3,title:"2. MySQL\u7684Linux\u7248\u5B89\u88C5",slug:"_2-mysql\u7684linux\u7248\u5B89\u88C5",children:[{level:4,title:"2.1 CentOS7\u4E0B\u68C0\u67E5MySQL\u4F9D\u8D56",slug:"_2-1-centos7\u4E0B\u68C0\u67E5mysql\u4F9D\u8D56",children:[]},{level:4,title:"2.2 CentOS7\u4E0BMySQL\u5B89\u88C5\u8FC7\u7A0B",slug:"_2-2-centos7\u4E0Bmysql\u5B89\u88C5\u8FC7\u7A0B",children:[]},{level:4,title:"2.3 \u67E5\u770BMySQL\u7248\u672C",slug:"_2-3-\u67E5\u770Bmysql\u7248\u672C",children:[]},{level:4,title:"2.4 \u670D\u52A1\u7684\u521D\u59CB\u5316",slug:"_2-4-\u670D\u52A1\u7684\u521D\u59CB\u5316",children:[]},{level:4,title:"2.5 \u542F\u52A8MySQL\uFF0C\u67E5\u770B\u72B6\u6001",slug:"_2-5-\u542F\u52A8mysql-\u67E5\u770B\u72B6\u6001",children:[]},{level:4,title:"2.6 \u67E5\u770BMySQL\u670D\u52A1\u662F\u5426\u81EA\u542F\u52A8",slug:"_2-6-\u67E5\u770Bmysql\u670D\u52A1\u662F\u5426\u81EA\u542F\u52A8",children:[]}]},{level:3,title:"3. MySQL\u767B\u5F55",slug:"_3-mysql\u767B\u5F55",children:[{level:4,title:"3.1 \u9996\u6B21\u767B\u5F55",slug:"_3-1-\u9996\u6B21\u767B\u5F55",children:[]},{level:4,title:"3.2 \u4FEE\u6539\u5BC6\u7801",slug:"_3-2-\u4FEE\u6539\u5BC6\u7801",children:[]},{level:4,title:"3.3 \u8BBE\u7F6E\u8FDC\u7A0B\u767B\u5F55",slug:"_3-3-\u8BBE\u7F6E\u8FDC\u7A0B\u767B\u5F55",children:[]}]},{level:3,title:"4. Linux\u4E0B\u4FEE\u6539\u914D\u7F6E",slug:"_4-linux\u4E0B\u4FEE\u6539\u914D\u7F6E",children:[]},{level:3,title:"5. \u5B57\u7B26\u96C6\u7684\u76F8\u5173\u64CD\u4F5C",slug:"_5-\u5B57\u7B26\u96C6\u7684\u76F8\u5173\u64CD\u4F5C",children:[{level:4,title:"5.1 \u5404\u7EA7\u522B\u7684\u5B57\u7B26\u96C6",slug:"_5-1-\u5404\u7EA7\u522B\u7684\u5B57\u7B26\u96C6",children:[]},{level:4,title:"5.2 \u8BF7\u6C42\u5230\u54CD\u5E94\u8FC7\u7A0B\u4E2D\u5B57\u7B26\u96C6\u7684\u53D8\u5316",slug:"_5-2-\u8BF7\u6C42\u5230\u54CD\u5E94\u8FC7\u7A0B\u4E2D\u5B57\u7B26\u96C6\u7684\u53D8\u5316",children:[]}]}]},{level:2,title:"\u7B2C02\u7AE0 MySQL\u7684\u6570\u636E\u76EE\u5F55",slug:"\u7B2C02\u7AE0-mysql\u7684\u6570\u636E\u76EE\u5F55",children:[{level:3,title:"1. MySQL8\u7684\u4E3B\u8981\u76EE\u5F55\u7ED3\u6784",slug:"_1-mysql8\u7684\u4E3B\u8981\u76EE\u5F55\u7ED3\u6784",children:[{level:4,title:"1.1 \u6570\u636E\u5E93\u6587\u4EF6\u7684\u5B58\u653E\u8DEF\u5F84",slug:"_1-1-\u6570\u636E\u5E93\u6587\u4EF6\u7684\u5B58\u653E\u8DEF\u5F84",children:[]},{level:4,title:"1.2 \u76F8\u5173\u547D\u4EE4\u76EE\u5F55",slug:"_1-2-\u76F8\u5173\u547D\u4EE4\u76EE\u5F55",children:[]},{level:4,title:"1.3 \u914D\u7F6E\u6587\u4EF6\u76EE\u5F55",slug:"_1-3-\u914D\u7F6E\u6587\u4EF6\u76EE\u5F55",children:[]}]},{level:3,title:"2. \u6570\u636E\u5E93\u548C\u6587\u4EF6\u7CFB\u7EDF\u7684\u5173\u7CFB",slug:"_2-\u6570\u636E\u5E93\u548C\u6587\u4EF6\u7CFB\u7EDF\u7684\u5173\u7CFB",children:[{level:4,title:"2.1 \u67E5\u770B\u9ED8\u8BA4\u6570\u636E\u5E93",slug:"_2-1-\u67E5\u770B\u9ED8\u8BA4\u6570\u636E\u5E93",children:[]},{level:4,title:"2.2 \u6570\u636E\u5E93\u5728\u6587\u4EF6\u7CFB\u7EDF\u4E2D\u7684\u8868\u793A",slug:"_2-2-\u6570\u636E\u5E93\u5728\u6587\u4EF6\u7CFB\u7EDF\u4E2D\u7684\u8868\u793A",children:[]},{level:4,title:"2.3 \u8868\u5728\u6587\u4EF6\u7CFB\u7EDF\u4E2D\u7684\u8868\u793A",slug:"_2-3-\u8868\u5728\u6587\u4EF6\u7CFB\u7EDF\u4E2D\u7684\u8868\u793A",children:[{level:5,title:"2.3.1 InnoDB\u5B58\u50A8\u5F15\u64CE\u6A21\u5F0F",slug:"_2-3-1-innodb\u5B58\u50A8\u5F15\u64CE\u6A21\u5F0F",children:[]},{level:5,title:"2.3.2 MyISAM\u5B58\u50A8\u5F15\u64CE\u6A21\u5F0F",slug:"_2-3-2-myisam\u5B58\u50A8\u5F15\u64CE\u6A21\u5F0F",children:[]}]},{level:4,title:"2.4 \u5C0F\u7ED3",slug:"_2-4-\u5C0F\u7ED3",children:[]}]}]},{level:2,title:"\u7B2C03\u7AE0 \u7528\u6237\u4E0E\u6743\u9650\u7BA1\u7406",slug:"\u7B2C03\u7AE0-\u7528\u6237\u4E0E\u6743\u9650\u7BA1\u7406",children:[{level:3,title:"1. \u7528\u6237\u7BA1\u7406",slug:"_1-\u7528\u6237\u7BA1\u7406",children:[{level:4,title:"1.1 \u767B\u5F55MySQL\u670D\u52A1\u5668",slug:"_1-1-\u767B\u5F55mysql\u670D\u52A1\u5668",children:[]},{level:4,title:"1.2 \u521B\u5EFA\u7528\u6237",slug:"_1-2-\u521B\u5EFA\u7528\u6237",children:[]},{level:4,title:"1.3 \u4FEE\u6539\u7528\u6237",slug:"_1-3-\u4FEE\u6539\u7528\u6237",children:[]},{level:4,title:"1.4 \u5220\u9664\u7528\u6237",slug:"_1-4-\u5220\u9664\u7528\u6237",children:[]},{level:4,title:"1.5 \u8BBE\u7F6E\u5F53\u524D\u7528\u6237\u5BC6\u7801",slug:"_1-5-\u8BBE\u7F6E\u5F53\u524D\u7528\u6237\u5BC6\u7801",children:[]},{level:4,title:"1.6 \u4FEE\u6539\u5176\u5B83\u7528\u6237\u5BC6\u7801",slug:"_1-6-\u4FEE\u6539\u5176\u5B83\u7528\u6237\u5BC6\u7801",children:[]}]},{level:3,title:"2. \u6743\u9650\u7BA1\u7406",slug:"_2-\u6743\u9650\u7BA1\u7406",children:[{level:4,title:"2.1 \u6743\u9650\u5217\u8868",slug:"_2-1-\u6743\u9650\u5217\u8868",children:[]},{level:4,title:"2.2 \u6388\u4E88\u6743\u9650\u7684\u539F\u5219",slug:"_2-2-\u6388\u4E88\u6743\u9650\u7684\u539F\u5219",children:[]},{level:4,title:"2.3 \u6388\u4E88\u6743\u9650",slug:"_2-3-\u6388\u4E88\u6743\u9650",children:[]},{level:4,title:"2.4 \u67E5\u770B\u6743\u9650",slug:"_2-4-\u67E5\u770B\u6743\u9650",children:[]},{level:4,title:"2.5 \u6536\u56DE\u6743\u9650",slug:"_2-5-\u6536\u56DE\u6743\u9650",children:[]}]},{level:3,title:"3. \u89D2\u8272\u7BA1\u7406",slug:"_3-\u89D2\u8272\u7BA1\u7406",children:[{level:4,title:"3.1 \u521B\u5EFA\u89D2\u8272",slug:"_3-1-\u521B\u5EFA\u89D2\u8272",children:[]},{level:4,title:"3.2 \u7ED9\u89D2\u8272\u8D4B\u4E88\u6743\u9650",slug:"_3-2-\u7ED9\u89D2\u8272\u8D4B\u4E88\u6743\u9650",children:[]},{level:4,title:"3.3 \u67E5\u770B\u89D2\u8272\u7684\u6743\u9650",slug:"_3-3-\u67E5\u770B\u89D2\u8272\u7684\u6743\u9650",children:[]},{level:4,title:"3.4 \u56DE\u6536\u89D2\u8272\u7684\u6743\u9650",slug:"_3-4-\u56DE\u6536\u89D2\u8272\u7684\u6743\u9650",children:[]},{level:4,title:"3.5 \u5220\u9664\u89D2\u8272",slug:"_3-5-\u5220\u9664\u89D2\u8272",children:[]},{level:4,title:"3.6 \u7ED9\u7528\u6237\u8D4B\u4E88\u89D2\u8272",slug:"_3-6-\u7ED9\u7528\u6237\u8D4B\u4E88\u89D2\u8272",children:[]},{level:4,title:"3.7 \u6FC0\u6D3B\u89D2\u8272",slug:"_3-7-\u6FC0\u6D3B\u89D2\u8272",children:[]},{level:4,title:"3.8 \u64A4\u9500\u7528\u6237\u7684\u89D2\u8272",slug:"_3-8-\u64A4\u9500\u7528\u6237\u7684\u89D2\u8272",children:[]},{level:4,title:"3.9 \u8BBE\u7F6E\u5F3A\u5236\u89D2\u8272(mandatory role)",slug:"_3-9-\u8BBE\u7F6E\u5F3A\u5236\u89D2\u8272-mandatory-role",children:[]}]}]},{level:2,title:"\u7B2C04\u7AE0 \u903B\u8F91\u67B6\u6784",slug:"\u7B2C04\u7AE0-\u903B\u8F91\u67B6\u6784",children:[{level:3,title:"1. \u903B\u8F91\u67B6\u6784\u5256\u6790",slug:"_1-\u903B\u8F91\u67B6\u6784\u5256\u6790",children:[{level:4,title:"1.1 \u670D\u52A1\u5668\u5904\u7406\u5BA2\u6237\u7AEF\u8BF7\u6C42",slug:"_1-1-\u670D\u52A1\u5668\u5904\u7406\u5BA2\u6237\u7AEF\u8BF7\u6C42",children:[]},{level:4,title:"1.2 Connectors",slug:"_1-2-connectors",children:[]},{level:4,title:"1.3 \u7B2C1\u5C42\uFF1A\u8FDE\u63A5\u5C42",slug:"_1-3-\u7B2C1\u5C42-\u8FDE\u63A5\u5C42",children:[]},{level:4,title:"1.4 \u7B2C2\u5C42\uFF1A\u670D\u52A1\u5C42",slug:"_1-4-\u7B2C2\u5C42-\u670D\u52A1\u5C42",children:[]},{level:4,title:"1.5 \u7B2C3\u5C42\uFF1A\u5F15\u64CE\u5C42",slug:"_1-5-\u7B2C3\u5C42-\u5F15\u64CE\u5C42",children:[]},{level:4,title:"1.6 \u5C0F\u7ED3",slug:"_1-6-\u5C0F\u7ED3",children:[]}]},{level:3,title:"2. SQL\u6267\u884C\u6D41\u7A0B",slug:"_2-sql\u6267\u884C\u6D41\u7A0B",children:[{level:4,title:"2.1 MySQL \u4E2D\u7684 SQL\u6267\u884C\u6D41\u7A0B",slug:"_2-1-mysql-\u4E2D\u7684-sql\u6267\u884C\u6D41\u7A0B",children:[]}]},{level:3,title:"3. \u6570\u636E\u5E93\u7F13\u51B2\u6C60(buffer pool)",slug:"_3-\u6570\u636E\u5E93\u7F13\u51B2\u6C60-buffer-pool",children:[{level:4,title:"3.1 \u7F13\u51B2\u6C60 vs \u67E5\u8BE2\u7F13\u5B58",slug:"_3-1-\u7F13\u51B2\u6C60-vs-\u67E5\u8BE2\u7F13\u5B58",children:[]},{level:4,title:"3.2 \u7F13\u51B2\u6C60\u5982\u4F55\u8BFB\u53D6\u6570\u636E",slug:"_3-2-\u7F13\u51B2\u6C60\u5982\u4F55\u8BFB\u53D6\u6570\u636E",children:[]},{level:4,title:"3.3 \u67E5\u770B/\u8BBE\u7F6E\u7F13\u51B2\u6C60\u7684\u5927\u5C0F",slug:"_3-3-\u67E5\u770B-\u8BBE\u7F6E\u7F13\u51B2\u6C60\u7684\u5927\u5C0F",children:[]},{level:4,title:"3.4 \u591A\u4E2ABuffer Pool\u5B9E\u4F8B",slug:"_3-4-\u591A\u4E2Abuffer-pool\u5B9E\u4F8B",children:[]}]}]},{level:2,title:"\u7B2C05\u7AE0 \u5B58\u50A8\u5F15\u64CE",slug:"\u7B2C05\u7AE0-\u5B58\u50A8\u5F15\u64CE",children:[{level:3,title:"1. \u67E5\u770B\u5B58\u50A8\u5F15\u64CE",slug:"_1-\u67E5\u770B\u5B58\u50A8\u5F15\u64CE",children:[]},{level:3,title:"2. \u8BBE\u7F6E\u7CFB\u7EDF\u9ED8\u8BA4\u7684\u5B58\u50A8\u5F15\u64CE",slug:"_2-\u8BBE\u7F6E\u7CFB\u7EDF\u9ED8\u8BA4\u7684\u5B58\u50A8\u5F15\u64CE",children:[]},{level:3,title:"3. \u8BBE\u7F6E\u8868\u7684\u5B58\u50A8\u5F15\u64CE",slug:"_3-\u8BBE\u7F6E\u8868\u7684\u5B58\u50A8\u5F15\u64CE",children:[{level:4,title:"3.1 \u521B\u5EFA\u8868\u65F6\u6307\u5B9A\u5B58\u50A8\u5F15\u64CE",slug:"_3-1-\u521B\u5EFA\u8868\u65F6\u6307\u5B9A\u5B58\u50A8\u5F15\u64CE",children:[]},{level:4,title:"3.2 \u4FEE\u6539\u8868\u7684\u5B58\u50A8\u5F15\u64CE",slug:"_3-2-\u4FEE\u6539\u8868\u7684\u5B58\u50A8\u5F15\u64CE",children:[]}]},{level:3,title:"4. \u5F15\u64CE\u4ECB\u7ECD",slug:"_4-\u5F15\u64CE\u4ECB\u7ECD",children:[{level:4,title:"4.1 InnoDB \u5F15\u64CE\uFF1A\u5177\u5907\u5916\u952E\u652F\u6301\u529F\u80FD\u7684\u4E8B\u52A1\u5B58\u50A8\u5F15\u64CE",slug:"_4-1-innodb-\u5F15\u64CE-\u5177\u5907\u5916\u952E\u652F\u6301\u529F\u80FD\u7684\u4E8B\u52A1\u5B58\u50A8\u5F15\u64CE",children:[]},{level:4,title:"4.2 MyISAM \u5F15\u64CE\uFF1A\u4E3B\u8981\u7684\u975E\u4E8B\u52A1\u5904\u7406\u5B58\u50A8\u5F15\u64CE",slug:"_4-2-myisam-\u5F15\u64CE-\u4E3B\u8981\u7684\u975E\u4E8B\u52A1\u5904\u7406\u5B58\u50A8\u5F15\u64CE",children:[]},{level:4,title:"4.3 Archive \u5F15\u64CE\uFF1A\u7528\u4E8E\u6570\u636E\u5B58\u6863",slug:"_4-3-archive-\u5F15\u64CE-\u7528\u4E8E\u6570\u636E\u5B58\u6863",children:[]},{level:4,title:"4.4 Blackhole \u5F15\u64CE\uFF1A\u4E22\u5F03\u5199\u64CD\u4F5C\uFF0C\u8BFB\u64CD\u4F5C\u4F1A\u8FD4\u56DE\u7A7A\u5185\u5BB9",slug:"_4-4-blackhole-\u5F15\u64CE-\u4E22\u5F03\u5199\u64CD\u4F5C-\u8BFB\u64CD\u4F5C\u4F1A\u8FD4\u56DE\u7A7A\u5185\u5BB9",children:[]},{level:4,title:"4.5 CSV \u5F15\u64CE\uFF1A\u5B58\u50A8\u6570\u636E\u65F6\uFF0C\u4EE5\u9017\u53F7\u5206\u9694\u5404\u4E2A\u6570\u636E\u9879",slug:"_4-5-csv-\u5F15\u64CE-\u5B58\u50A8\u6570\u636E\u65F6-\u4EE5\u9017\u53F7\u5206\u9694\u5404\u4E2A\u6570\u636E\u9879",children:[]},{level:4,title:"4.6 Memory \u5F15\u64CE\uFF1A\u7F6E\u4E8E\u5185\u5B58\u7684\u8868",slug:"_4-6-memory-\u5F15\u64CE-\u7F6E\u4E8E\u5185\u5B58\u7684\u8868",children:[]},{level:4,title:"4.7 Federated \u5F15\u64CE\uFF1A\u8BBF\u95EE\u8FDC\u7A0B\u8868",slug:"_4-7-federated-\u5F15\u64CE-\u8BBF\u95EE\u8FDC\u7A0B\u8868",children:[]},{level:4,title:"4.8 Merge\u5F15\u64CE\uFF1A\u7BA1\u7406\u591A\u4E2AMyISAM\u8868\u6784\u6210\u7684\u8868\u96C6\u5408",slug:"_4-8-merge\u5F15\u64CE-\u7BA1\u7406\u591A\u4E2Amyisam\u8868\u6784\u6210\u7684\u8868\u96C6\u5408",children:[]},{level:4,title:"4.9 NDB\u5F15\u64CE\uFF1AMySQL\u96C6\u7FA4\u4E13\u7528\u5B58\u50A8\u5F15\u64CE",slug:"_4-9-ndb\u5F15\u64CE-mysql\u96C6\u7FA4\u4E13\u7528\u5B58\u50A8\u5F15\u64CE",children:[]}]},{level:3,title:"5. MyISAM\u548CInnoDB",slug:"_5-myisam\u548Cinnodb",children:[]}]},{level:2,title:"\u7B2C06\u7AE0 \u7D22\u5F15\u7684\u6570\u636E\u7ED3\u6784",slug:"\u7B2C06\u7AE0-\u7D22\u5F15\u7684\u6570\u636E\u7ED3\u6784",children:[{level:3,title:"1.\u4E3A\u4EC0\u4E48\u4F7F\u7528\u7D22\u5F15\uFF1F",slug:"_1-\u4E3A\u4EC0\u4E48\u4F7F\u7528\u7D22\u5F15",children:[]},{level:3,title:"2. \u7D22\u5F15\u53CA\u5176\u4F18\u7F3A\u70B9",slug:"_2-\u7D22\u5F15\u53CA\u5176\u4F18\u7F3A\u70B9",children:[{level:4,title:"2.1 \u7D22\u5F15\u6982\u8FF0",slug:"_2-1-\u7D22\u5F15\u6982\u8FF0",children:[]},{level:4,title:"2.2 \u4F18\u70B9",slug:"_2-2-\u4F18\u70B9",children:[]},{level:4,title:"2.3 \u7F3A\u70B9",slug:"_2-3-\u7F3A\u70B9",children:[]}]},{level:3,title:"3. InnoDB\u4E2D\u7D22\u5F15\u7684\u63A8\u6F14",slug:"_3-innodb\u4E2D\u7D22\u5F15\u7684\u63A8\u6F14",children:[{level:4,title:"3.1 \u7D22\u5F15\u4E4B\u524D\u7684\u67E5\u627E",slug:"_3-1-\u7D22\u5F15\u4E4B\u524D\u7684\u67E5\u627E",children:[]},{level:4,title:"3.2 \u8BBE\u8BA1\u7D22\u5F15",slug:"_3-2-\u8BBE\u8BA1\u7D22\u5F15",children:[{level:5,title:"1. \u4E00\u4E2A\u7B80\u5355\u7684\u7D22\u5F15\u8BBE\u8BA1\u65B9\u6848",slug:"_1-\u4E00\u4E2A\u7B80\u5355\u7684\u7D22\u5F15\u8BBE\u8BA1\u65B9\u6848",children:[]},{level:5,title:"2. InnoDB\u4E2D\u7684\u7D22\u5F15\u65B9\u6848",slug:"_2-innodb\u4E2D\u7684\u7D22\u5F15\u65B9\u6848",children:[]}]},{level:4,title:"3.3 \u5E38\u89C1\u7D22\u5F15\u6982\u5FF5",slug:"_3-3-\u5E38\u89C1\u7D22\u5F15\u6982\u5FF5",children:[{level:5,title:"1. \u805A\u7C07\u7D22\u5F15",slug:"_1-\u805A\u7C07\u7D22\u5F15",children:[]},{level:5,title:"2. \u4E8C\u7EA7\u7D22\u5F15\uFF08\u8F85\u52A9\u7D22\u5F15\u3001\u975E\u805A\u7C07\u7D22\u5F15\uFF09",slug:"_2-\u4E8C\u7EA7\u7D22\u5F15-\u8F85\u52A9\u7D22\u5F15\u3001\u975E\u805A\u7C07\u7D22\u5F15",children:[]},{level:5,title:"3. \u8054\u5408\u7D22\u5F15",slug:"_3-\u8054\u5408\u7D22\u5F15",children:[]}]},{level:4,title:"3.4 InnoDB\u7684B+\u6811\u7D22\u5F15\u7684\u6CE8\u610F\u4E8B\u9879",slug:"_3-4-innodb\u7684b-\u6811\u7D22\u5F15\u7684\u6CE8\u610F\u4E8B\u9879",children:[{level:5,title:"1. \u6839\u9875\u9762\u4F4D\u7F6E\u4E07\u5E74\u4E0D\u52A8",slug:"_1-\u6839\u9875\u9762\u4F4D\u7F6E\u4E07\u5E74\u4E0D\u52A8",children:[]},{level:5,title:"2. \u5185\u8282\u70B9\u4E2D\u76EE\u5F55\u9879\u8BB0\u5F55\u7684\u552F\u4E00\u6027",slug:"_2-\u5185\u8282\u70B9\u4E2D\u76EE\u5F55\u9879\u8BB0\u5F55\u7684\u552F\u4E00\u6027",children:[]},{level:5,title:"3. \u4E00\u4E2A\u9875\u9762\u6700\u5C11\u53EF\u4EE5\u5B58\u50A82\u6761\u8BB0\u5F55",slug:"_3-\u4E00\u4E2A\u9875\u9762\u6700\u5C11\u53EF\u4EE5\u5B58\u50A82\u6761\u8BB0\u5F55",children:[]}]}]},{level:3,title:"4. MyISAM\u4E2D\u7684\u7D22\u5F15\u65B9\u6848",slug:"_4-myisam\u4E2D\u7684\u7D22\u5F15\u65B9\u6848",children:[{level:4,title:"4.1 MyISAM\u7D22\u5F15\u7684\u539F\u7406",slug:"_4-1-myisam\u7D22\u5F15\u7684\u539F\u7406",children:[]},{level:4,title:"4.2 MyISAM \u4E0E InnoDB\u5BF9\u6BD4",slug:"_4-2-myisam-\u4E0E-innodb\u5BF9\u6BD4",children:[]}]},{level:3,title:"5. \u7D22\u5F15\u7684\u4EE3\u4EF7",slug:"_5-\u7D22\u5F15\u7684\u4EE3\u4EF7",children:[]},{level:3,title:"6. MySQL\u6570\u636E\u7ED3\u6784\u9009\u62E9\u7684\u5408\u7406\u6027",slug:"_6-mysql\u6570\u636E\u7ED3\u6784\u9009\u62E9\u7684\u5408\u7406\u6027",children:[{level:4,title:"6.1 Hash\u7ED3\u6784",slug:"_6-1-hash\u7ED3\u6784",children:[]},{level:4,title:"6.2 \u4E8C\u53C9\u641C\u7D22\u6811",slug:"_6-2-\u4E8C\u53C9\u641C\u7D22\u6811",children:[]},{level:4,title:"6.3 AVL\u6811",slug:"_6-3-avl\u6811",children:[]},{level:4,title:"6.4 B-Tree",slug:"_6-4-b-tree",children:[]},{level:4,title:"6.5 B+Tree",slug:"_6-5-b-tree",children:[]}]}]},{level:2,title:"\u7B2C07\u7AE0 InnoDB\u6570\u636E\u5B58\u50A8\u7ED3\u6784",slug:"\u7B2C07\u7AE0-innodb\u6570\u636E\u5B58\u50A8\u7ED3\u6784",children:[{level:3,title:"1. \u6570\u636E\u5E93\u7684\u5B58\u50A8\u7ED3\u6784\uFF1A\u9875",slug:"_1-\u6570\u636E\u5E93\u7684\u5B58\u50A8\u7ED3\u6784-\u9875",children:[{level:4,title:"1.1 \u78C1\u76D8\u4E0E\u5185\u5B58\u4EA4\u4E92\u57FA\u672C\u5355\u4F4D\uFF1A\u9875",slug:"_1-1-\u78C1\u76D8\u4E0E\u5185\u5B58\u4EA4\u4E92\u57FA\u672C\u5355\u4F4D-\u9875",children:[]},{level:4,title:"1.2 \u9875\u7ED3\u6784\u6982\u8FF0",slug:"_1-2-\u9875\u7ED3\u6784\u6982\u8FF0",children:[]},{level:4,title:"1.3 \u9875\u7684\u4E0A\u5C42\u7ED3\u6784",slug:"_1-3-\u9875\u7684\u4E0A\u5C42\u7ED3\u6784",children:[]}]},{level:3,title:"2. \u9875\u7684\u5185\u90E8\u7ED3\u6784",slug:"_2-\u9875\u7684\u5185\u90E8\u7ED3\u6784",children:[{level:4,title:"2.1 \u7B2C1\u90E8\u5206\uFF1A\u6587\u4EF6\u5934\u90E8\u548C\u6587\u4EF6\u5C3E\u90E8",slug:"_2-1-\u7B2C1\u90E8\u5206-\u6587\u4EF6\u5934\u90E8\u548C\u6587\u4EF6\u5C3E\u90E8",children:[{level:5,title:"2.1.1 File Header\uFF08\u6587\u4EF6\u5934\u90E8\uFF09\uFF0838\u5B57\u8282\uFF09",slug:"_2-1-1-file-header-\u6587\u4EF6\u5934\u90E8-38\u5B57\u8282",children:[]},{level:5,title:"2.1.2 File Trailer\uFF08\u6587\u4EF6\u5C3E\u90E8\uFF09\uFF088\u5B57\u8282\uFF09",slug:"_2-1-2-file-trailer-\u6587\u4EF6\u5C3E\u90E8-8\u5B57\u8282",children:[]}]},{level:4,title:"2.2 \u7B2C2\u90E8\u5206\uFF1A\u7A7A\u95F2\u7A7A\u95F4\u3001\u7528\u6237\u8BB0\u5F55\u548C\u6700\u5C0F\u6700\u5927\u8BB0\u5F55",slug:"_2-2-\u7B2C2\u90E8\u5206-\u7A7A\u95F2\u7A7A\u95F4\u3001\u7528\u6237\u8BB0\u5F55\u548C\u6700\u5C0F\u6700\u5927\u8BB0\u5F55",children:[{level:5,title:"2.2.1 Free Space (\u7A7A\u95F2\u7A7A\u95F4)",slug:"_2-2-1-free-space-\u7A7A\u95F2\u7A7A\u95F4",children:[]},{level:5,title:"2.2.2 User Records (\u7528\u6237\u8BB0\u5F55)",slug:"_2-2-2-user-records-\u7528\u6237\u8BB0\u5F55",children:[]},{level:5,title:"2.2.3 Infimum + Supremum\uFF08\u6700\u5C0F\u6700\u5927\u8BB0\u5F55\uFF09",slug:"_2-2-3-infimum-supremum-\u6700\u5C0F\u6700\u5927\u8BB0\u5F55",children:[]}]},{level:4,title:"2.3 \u7B2C3\u90E8\u5206\uFF1A\u9875\u76EE\u5F55\u548C\u9875\u9762\u5934\u90E8",slug:"_2-3-\u7B2C3\u90E8\u5206-\u9875\u76EE\u5F55\u548C\u9875\u9762\u5934\u90E8",children:[{level:5,title:"2.3.1 Page Directory\uFF08\u9875\u76EE\u5F55\uFF09",slug:"_2-3-1-page-directory-\u9875\u76EE\u5F55",children:[]},{level:5,title:"2.3.2 Page Header\uFF08\u9875\u9762\u5934\u90E8\uFF09",slug:"_2-3-2-page-header-\u9875\u9762\u5934\u90E8",children:[]}]}]},{level:3,title:"3. InnoDB\u884C\u683C\u5F0F\uFF08\u6216\u8BB0\u5F55\u683C\u5F0F\uFF09",slug:"_3-innodb\u884C\u683C\u5F0F-\u6216\u8BB0\u5F55\u683C\u5F0F",children:[{level:4,title:"3.1 \u6307\u5B9A\u884C\u683C\u5F0F\u7684\u8BED\u6CD5",slug:"_3-1-\u6307\u5B9A\u884C\u683C\u5F0F\u7684\u8BED\u6CD5",children:[]},{level:4,title:"3.2 COMPACT\u884C\u683C\u5F0F",slug:"_3-2-compact\u884C\u683C\u5F0F",children:[{level:5,title:"3.2.1 \u53D8\u957F\u5B57\u6BB5\u957F\u5EA6\u5217\u8868",slug:"_3-2-1-\u53D8\u957F\u5B57\u6BB5\u957F\u5EA6\u5217\u8868",children:[]},{level:5,title:"3.2.2 NULL\u503C\u5217\u8868",slug:"_3-2-2-null\u503C\u5217\u8868",children:[]},{level:5,title:"3.2.3 \u8BB0\u5F55\u5934\u4FE1\u606F\uFF085\u5B57\u8282\uFF09",slug:"_3-2-3-\u8BB0\u5F55\u5934\u4FE1\u606F-5\u5B57\u8282",children:[]},{level:5,title:"3.2.4 \u8BB0\u5F55\u7684\u771F\u5B9E\u6570\u636E",slug:"_3-2-4-\u8BB0\u5F55\u7684\u771F\u5B9E\u6570\u636E",children:[]}]},{level:4,title:"3.3 Dynamic\u548CCompressed\u884C\u683C\u5F0F",slug:"_3-3-dynamic\u548Ccompressed\u884C\u683C\u5F0F",children:[]}]},{level:3,title:"4. \u533A\u3001\u6BB5\u548C\u788E\u7247\u533A",slug:"_4-\u533A\u3001\u6BB5\u548C\u788E\u7247\u533A",children:[{level:4,title:"4.1 \u4E3A\u4EC0\u4E48\u8981\u6709\u533A\uFF1F",slug:"_4-1-\u4E3A\u4EC0\u4E48\u8981\u6709\u533A",children:[]},{level:4,title:"4.2 \u4E3A\u4EC0\u4E48\u8981\u6709\u6BB5\uFF1F",slug:"_4-2-\u4E3A\u4EC0\u4E48\u8981\u6709\u6BB5",children:[]},{level:4,title:"4.3 \u4E3A\u4EC0\u4E48\u8981\u6709\u788E\u7247\u533A\uFF1F",slug:"_4-3-\u4E3A\u4EC0\u4E48\u8981\u6709\u788E\u7247\u533A",children:[]},{level:4,title:"4.4 \u533A\u7684\u5206\u7C7B",slug:"_4-4-\u533A\u7684\u5206\u7C7B",children:[]}]}]},{level:2,title:"\u7B2C08\u7AE0 \u7D22\u5F15\u7684\u521B\u5EFA\u4E0E\u8BBE\u8BA1\u539F\u5219",slug:"\u7B2C08\u7AE0-\u7D22\u5F15\u7684\u521B\u5EFA\u4E0E\u8BBE\u8BA1\u539F\u5219",children:[{level:3,title:"1. \u7D22\u5F15\u7684\u58F0\u660E\u4E0E\u4F7F\u7528",slug:"_1-\u7D22\u5F15\u7684\u58F0\u660E\u4E0E\u4F7F\u7528",children:[{level:4,title:"1.1 \u7D22\u5F15\u7684\u5206\u7C7B",slug:"_1-1-\u7D22\u5F15\u7684\u5206\u7C7B",children:[]},{level:4,title:"1.2 \u521B\u5EFA\u7D22\u5F15",slug:"_1-2-\u521B\u5EFA\u7D22\u5F15",children:[{level:5,title:"1.\u521B\u5EFA\u8868\u7684\u65F6\u5019\u521B\u5EFA\u7D22\u5F15",slug:"_1-\u521B\u5EFA\u8868\u7684\u65F6\u5019\u521B\u5EFA\u7D22\u5F15",children:[]},{level:5,title:"2. \u5728\u5DF2\u7ECF\u5B58\u5728\u7684\u8868\u4E0A\u521B\u5EFA\u7D22\u5F15",slug:"_2-\u5728\u5DF2\u7ECF\u5B58\u5728\u7684\u8868\u4E0A\u521B\u5EFA\u7D22\u5F15",children:[]}]},{level:4,title:"1.3 \u5220\u9664\u7D22\u5F15",slug:"_1-3-\u5220\u9664\u7D22\u5F15",children:[]}]},{level:3,title:"2. MySQL8.0\u7D22\u5F15\u65B0\u7279\u6027",slug:"_2-mysql8-0\u7D22\u5F15\u65B0\u7279\u6027",children:[{level:4,title:"2.1 \u652F\u6301\u964D\u5E8F\u7D22\u5F15",slug:"_2-1-\u652F\u6301\u964D\u5E8F\u7D22\u5F15",children:[]},{level:4,title:"2.2 \u9690\u85CF\u7D22\u5F15",slug:"_2-2-\u9690\u85CF\u7D22\u5F15",children:[]}]},{level:3,title:"3. \u7D22\u5F15\u7684\u8BBE\u8BA1\u539F\u5219",slug:"_3-\u7D22\u5F15\u7684\u8BBE\u8BA1\u539F\u5219",children:[{level:4,title:"3.1 \u54EA\u4E9B\u60C5\u51B5\u9002\u5408\u521B\u5EFA\u7D22\u5F15",slug:"_3-1-\u54EA\u4E9B\u60C5\u51B5\u9002\u5408\u521B\u5EFA\u7D22\u5F15",children:[]},{level:4,title:"3.2 \u9650\u5236\u7D22\u5F15\u7684\u6570\u76EE",slug:"_3-2-\u9650\u5236\u7D22\u5F15\u7684\u6570\u76EE",children:[]},{level:4,title:"3.3 \u54EA\u4E9B\u60C5\u51B5\u4E0D\u9002\u5408\u521B\u5EFA\u7D22\u5F15",slug:"_3-3-\u54EA\u4E9B\u60C5\u51B5\u4E0D\u9002\u5408\u521B\u5EFA\u7D22\u5F15",children:[]}]}]},{level:2,title:"\u7B2C09\u7AE0 \u6027\u80FD\u5206\u6790\u5DE5\u5177\u7684\u4F7F\u7528",slug:"\u7B2C09\u7AE0-\u6027\u80FD\u5206\u6790\u5DE5\u5177\u7684\u4F7F\u7528",children:[{level:3,title:"1. \u7EDF\u8BA1SQL\u7684\u67E5\u8BE2\u6210\u672C\uFF1Alast_query_cost",slug:"_1-\u7EDF\u8BA1sql\u7684\u67E5\u8BE2\u6210\u672C-last-query-cost",children:[]},{level:3,title:"2. \u5B9A\u4F4D\u6267\u884C\u6162\u7684SQL\uFF1A\u6162\u67E5\u8BE2\u65E5\u5FD7",slug:"_2-\u5B9A\u4F4D\u6267\u884C\u6162\u7684sql-\u6162\u67E5\u8BE2\u65E5\u5FD7",children:[{level:4,title:"2.1 \u5F00\u542F\u6162\u67E5\u8BE2\u65E5\u5FD7\u53C2\u6570",slug:"_2-1-\u5F00\u542F\u6162\u67E5\u8BE2\u65E5\u5FD7\u53C2\u6570",children:[]},{level:4,title:"2.2 \u67E5\u770B\u6162\u67E5\u8BE2\u6570\u76EE",slug:"_2-2-\u67E5\u770B\u6162\u67E5\u8BE2\u6570\u76EE",children:[]},{level:4,title:"2.3 \u6162\u67E5\u8BE2\u65E5\u5FD7\u5206\u6790\u5DE5\u5177\uFF1Amysqldumpslow",slug:"_2-3-\u6162\u67E5\u8BE2\u65E5\u5FD7\u5206\u6790\u5DE5\u5177-mysqldumpslow",children:[]},{level:4,title:"2.4 \u5173\u95ED\u6162\u67E5\u8BE2\u65E5\u5FD7",slug:"_2-4-\u5173\u95ED\u6162\u67E5\u8BE2\u65E5\u5FD7",children:[]}]},{level:3,title:"3. \u67E5\u770B SQL \u6267\u884C\u6210\u672C\uFF1ASHOW PROFILE",slug:"_3-\u67E5\u770B-sql-\u6267\u884C\u6210\u672C-show-profile",children:[]},{level:3,title:"4. \u5206\u6790\u67E5\u8BE2\u8BED\u53E5\uFF1AEXPLAIN",slug:"_4-\u5206\u6790\u67E5\u8BE2\u8BED\u53E5-explain",children:[{level:4,title:"4.1 \u57FA\u672C\u8BED\u6CD5",slug:"_4-1-\u57FA\u672C\u8BED\u6CD5",children:[]},{level:4,title:"4.2 EXPLAIN\u5404\u5217\u4F5C\u7528",slug:"_4-2-explain\u5404\u5217\u4F5C\u7528",children:[]}]},{level:3,title:"5. EXPLAIN\u7684\u8FDB\u4E00\u6B65\u4F7F\u7528",slug:"_5-explain\u7684\u8FDB\u4E00\u6B65\u4F7F\u7528",children:[{level:4,title:"5.1 EXPLAIN\u56DB\u79CD\u8F93\u51FA\u683C\u5F0F",slug:"_5-1-explain\u56DB\u79CD\u8F93\u51FA\u683C\u5F0F",children:[]},{level:4,title:"5.2 SHOW WARNINGS\u7684\u4F7F\u7528",slug:"_5-2-show-warnings\u7684\u4F7F\u7528",children:[]}]},{level:3,title:"6. \u5206\u6790\u4F18\u5316\u5668\u6267\u884C\u8BA1\u5212\uFF1Atrace",slug:"_6-\u5206\u6790\u4F18\u5316\u5668\u6267\u884C\u8BA1\u5212-trace",children:[]},{level:3,title:"7. MySQL\u76D1\u63A7\u5206\u6790\u89C6\u56FE-sys schema",slug:"_7-mysql\u76D1\u63A7\u5206\u6790\u89C6\u56FE-sys-schema",children:[{level:4,title:"7.1 Sys schema\u89C6\u56FE\u4F7F\u7528\u573A\u666F",slug:"_7-1-sys-schema\u89C6\u56FE\u4F7F\u7528\u573A\u666F",children:[]}]}]},{level:2,title:"\u7B2C10\u7AE0 \u7D22\u5F15\u4F18\u5316\u4E0E\u67E5\u8BE2\u4F18\u5316",slug:"\u7B2C10\u7AE0-\u7D22\u5F15\u4F18\u5316\u4E0E\u67E5\u8BE2\u4F18\u5316",children:[{level:3,title:"1. \u7D22\u5F15\u5931\u6548\u6848\u4F8B",slug:"_1-\u7D22\u5F15\u5931\u6548\u6848\u4F8B",children:[{level:4,title:"1.1 \u5168\u503C\u5339\u914D\u6211\u6700\u7231",slug:"_1-1-\u5168\u503C\u5339\u914D\u6211\u6700\u7231",children:[]},{level:4,title:"1.2 \u6700\u4F73\u5DE6\u524D\u7F00\u6CD5\u5219",slug:"_1-2-\u6700\u4F73\u5DE6\u524D\u7F00\u6CD5\u5219",children:[]},{level:4,title:"1.3 \u4E3B\u952E\u63D2\u5165\u987A\u5E8F",slug:"_1-3-\u4E3B\u952E\u63D2\u5165\u987A\u5E8F",children:[]},{level:4,title:"1.4 \u8BA1\u7B97\u3001\u51FD\u6570\u3001\u7C7B\u578B\u8F6C\u6362(\u81EA\u52A8\u6216\u624B\u52A8)\u5BFC\u81F4\u7D22\u5F15\u5931\u6548",slug:"_1-4-\u8BA1\u7B97\u3001\u51FD\u6570\u3001\u7C7B\u578B\u8F6C\u6362-\u81EA\u52A8\u6216\u624B\u52A8-\u5BFC\u81F4\u7D22\u5F15\u5931\u6548",children:[]},{level:4,title:"1.5 \u7C7B\u578B\u8F6C\u6362\u5BFC\u81F4\u7D22\u5F15\u5931\u6548",slug:"_1-5-\u7C7B\u578B\u8F6C\u6362\u5BFC\u81F4\u7D22\u5F15\u5931\u6548",children:[]},{level:4,title:"1.6 \u8303\u56F4\u6761\u4EF6\u53F3\u8FB9\u7684\u5217\u7D22\u5F15\u5931\u6548",slug:"_1-6-\u8303\u56F4\u6761\u4EF6\u53F3\u8FB9\u7684\u5217\u7D22\u5F15\u5931\u6548",children:[]},{level:4,title:"1.7 \u4E0D\u7B49\u4E8E(!= \u6216\u8005<>)\u7D22\u5F15\u5931\u6548",slug:"_1-7-\u4E0D\u7B49\u4E8E-\u6216\u8005-\u7D22\u5F15\u5931\u6548",children:[]},{level:4,title:"1.8 is null\u53EF\u4EE5\u4F7F\u7528\u7D22\u5F15\uFF0Cis not null\u65E0\u6CD5\u4F7F\u7528\u7D22\u5F15",slug:"_1-8-is-null\u53EF\u4EE5\u4F7F\u7528\u7D22\u5F15-is-not-null\u65E0\u6CD5\u4F7F\u7528\u7D22\u5F15",children:[]},{level:4,title:"1.9 like\u4EE5\u901A\u914D\u7B26%\u5F00\u5934\u7D22\u5F15\u5931\u6548",slug:"_1-9-like\u4EE5\u901A\u914D\u7B26-\u5F00\u5934\u7D22\u5F15\u5931\u6548",children:[]},{level:4,title:"1.10 OR \u524D\u540E\u5B58\u5728\u975E\u7D22\u5F15\u7684\u5217\uFF0C\u7D22\u5F15\u5931\u6548",slug:"_1-10-or-\u524D\u540E\u5B58\u5728\u975E\u7D22\u5F15\u7684\u5217-\u7D22\u5F15\u5931\u6548",children:[]},{level:4,title:"1.11 \u6570\u636E\u5E93\u548C\u8868\u7684\u5B57\u7B26\u96C6\u7EDF\u4E00\u4F7F\u7528utf8mb4",slug:"_1-11-\u6570\u636E\u5E93\u548C\u8868\u7684\u5B57\u7B26\u96C6\u7EDF\u4E00\u4F7F\u7528utf8mb4",children:[]}]},{level:3,title:"2. \u5173\u8054\u67E5\u8BE2\u4F18\u5316",slug:"_2-\u5173\u8054\u67E5\u8BE2\u4F18\u5316",children:[{level:4,title:"2.1 \u5185\u8FDE\u63A5",slug:"_2-1-\u5185\u8FDE\u63A5",children:[]},{level:4,title:"2.2 \u5916\u8FDE\u63A5",slug:"_2-2-\u5916\u8FDE\u63A5",children:[]},{level:4,title:"2.3 JOIN\u8BED\u53E5\u539F\u7406",slug:"_2-3-join\u8BED\u53E5\u539F\u7406",children:[{level:5,title:"2.3.1 \u5916\u8FDE\u63A5\u548C\u5185\u8FDE\u63A5",slug:"_2-3-1-\u5916\u8FDE\u63A5\u548C\u5185\u8FDE\u63A5",children:[]},{level:5,title:"2.3.2 Simple Nested-Loop Join\uFF08\u7B80\u5355\u5D4C\u5957\u5FAA\u73AF\u7D22\u5F15\uFF09",slug:"_2-3-2-simple-nested-loop-join-\u7B80\u5355\u5D4C\u5957\u5FAA\u73AF\u7D22\u5F15",children:[]},{level:5,title:"2.3.3 Index Nested-Loop Join\uFF08\u7D22\u5F15\u5D4C\u5957\u5FAA\u73AF\u8FDE\u63A5\uFF09",slug:"_2-3-3-index-nested-loop-join-\u7D22\u5F15\u5D4C\u5957\u5FAA\u73AF\u8FDE\u63A5",children:[]},{level:5,title:"2.3.4 Block Nested-Loop Join\uFF08\u5757\u5D4C\u5957\u5FAA\u73AF\u8FDE\u63A5\uFF09",slug:"_2-3-4-block-nested-loop-join-\u5757\u5D4C\u5957\u5FAA\u73AF\u8FDE\u63A5",children:[]},{level:5,title:"2.3.5 Hash Join",slug:"_2-3-5-hash-join",children:[]}]}]},{level:3,title:"3. \u5B50\u67E5\u8BE2\u4F18\u5316",slug:"_3-\u5B50\u67E5\u8BE2\u4F18\u5316",children:[]},{level:3,title:"4. \u6392\u5E8F\u4F18\u5316",slug:"_4-\u6392\u5E8F\u4F18\u5316",children:[]},{level:3,title:"5. GROUP BY\u4F18\u5316",slug:"_5-group-by\u4F18\u5316",children:[]},{level:3,title:"6. \u4F18\u5316\u5206\u9875\u67E5\u8BE2",slug:"_6-\u4F18\u5316\u5206\u9875\u67E5\u8BE2",children:[]},{level:3,title:"7. \u4F18\u5148\u8003\u8651\u8986\u76D6\u7D22\u5F15",slug:"_7-\u4F18\u5148\u8003\u8651\u8986\u76D6\u7D22\u5F15",children:[{level:5,title:"7.1 \u4EC0\u4E48\u662F\u8986\u76D6\u7D22\u5F15\uFF1F",slug:"_7-1-\u4EC0\u4E48\u662F\u8986\u76D6\u7D22\u5F15",children:[]},{level:5,title:"7.2 \u8986\u76D6\u7D22\u5F15\u7684\u5229\u5F0A",slug:"_7-2-\u8986\u76D6\u7D22\u5F15\u7684\u5229\u5F0A",children:[]}]},{level:3,title:"8. \u7D22\u5F15\u6761\u4EF6\u4E0B\u63A8",slug:"_8-\u7D22\u5F15\u6761\u4EF6\u4E0B\u63A8",children:[{level:4,title:"8.1 \u4F7F\u7528\u524D\u540E\u7684\u626B\u63CF\u8FC7\u7A0B",slug:"_8-1-\u4F7F\u7528\u524D\u540E\u7684\u626B\u63CF\u8FC7\u7A0B",children:[]}]},{level:3,title:"9. \u5176\u5B83\u67E5\u8BE2\u4F18\u5316\u7B56\u7565",slug:"_9-\u5176\u5B83\u67E5\u8BE2\u4F18\u5316\u7B56\u7565",children:[{level:4,title:"9.1 EXISTS \u548C IN \u7684\u533A\u5206",slug:"_9-1-exists-\u548C-in-\u7684\u533A\u5206",children:[]},{level:4,title:"9.2 COUNT(*)\u4E0ECOUNT(\u5177\u4F53\u5B57\u6BB5)\u6548\u7387",slug:"_9-2-count-\u4E0Ecount-\u5177\u4F53\u5B57\u6BB5-\u6548\u7387",children:[]},{level:4,title:"9.3 \u5173\u4E8ESELECT(*)",slug:"_9-3-\u5173\u4E8Eselect",children:[]},{level:4,title:"9.4 LIMIT 1 \u5BF9\u4F18\u5316\u7684\u5F71\u54CD",slug:"_9-4-limit-1-\u5BF9\u4F18\u5316\u7684\u5F71\u54CD",children:[]},{level:4,title:"9.5 \u591A\u4F7F\u7528COMMIT",slug:"_9-5-\u591A\u4F7F\u7528commit",children:[]}]}]},{level:2,title:"\u7B2C11\u7AE0 \u6570\u636E\u5E93\u7684\u8BBE\u8BA1\u89C4\u8303",slug:"\u7B2C11\u7AE0-\u6570\u636E\u5E93\u7684\u8BBE\u8BA1\u89C4\u8303",children:[{level:3,title:"1. \u8303 \u5F0F",slug:"_1-\u8303-\u5F0F",children:[{level:4,title:"1.1 \u8303\u5F0F\u7B80\u4ECB",slug:"_1-1-\u8303\u5F0F\u7B80\u4ECB",children:[]},{level:4,title:"1.2 \u8303\u5F0F\u90FD\u5305\u62EC\u54EA\u4E9B",slug:"_1-2-\u8303\u5F0F\u90FD\u5305\u62EC\u54EA\u4E9B",children:[]},{level:4,title:"1.3 \u952E\u548C\u76F8\u5173\u5C5E\u6027\u7684\u6982\u5FF5",slug:"_1-3-\u952E\u548C\u76F8\u5173\u5C5E\u6027\u7684\u6982\u5FF5",children:[]},{level:4,title:"1.4 \u7B2C\u4E00\u8303\u5F0F(1st NF)",slug:"_1-4-\u7B2C\u4E00\u8303\u5F0F-1st-nf",children:[]},{level:4,title:"1.5 \u7B2C\u4E8C\u8303\u5F0F(2nd NF)",slug:"_1-5-\u7B2C\u4E8C\u8303\u5F0F-2nd-nf",children:[]},{level:4,title:"1.6 \u7B2C\u4E09\u8303\u5F0F(3rd NF)",slug:"_1-6-\u7B2C\u4E09\u8303\u5F0F-3rd-nf",children:[]},{level:4,title:"1.7 \u5C0F\u7ED3",slug:"_1-7-\u5C0F\u7ED3",children:[]}]},{level:3,title:"2. \u53CD\u8303\u5F0F\u5316",slug:"_2-\u53CD\u8303\u5F0F\u5316",children:[{level:4,title:"2.1 \u6982\u8FF0",slug:"_2-1-\u6982\u8FF0",children:[]},{level:4,title:"2.2 \u53CD\u8303\u5F0F\u7684\u65B0\u95EE\u9898",slug:"_2-2-\u53CD\u8303\u5F0F\u7684\u65B0\u95EE\u9898",children:[]},{level:4,title:"2.3 \u53CD\u8303\u5F0F\u7684\u9002\u7528\u573A\u666F",slug:"_2-3-\u53CD\u8303\u5F0F\u7684\u9002\u7528\u573A\u666F",children:[]}]},{level:3,title:"3. BCNF(\u5DF4\u65AF\u8303\u5F0F)",slug:"_3-bcnf-\u5DF4\u65AF\u8303\u5F0F",children:[]},{level:3,title:"4. ER\u6A21\u578B",slug:"_4-er\u6A21\u578B",children:[{level:4,title:"4.1 ER \u6A21\u578B\u5305\u62EC\u90A3\u4E9B\u8981\u7D20\uFF1F",slug:"_4-1-er-\u6A21\u578B\u5305\u62EC\u90A3\u4E9B\u8981\u7D20",children:[]},{level:4,title:"4.2 \u5173\u7CFB\u7684\u7C7B\u578B",slug:"_4-2-\u5173\u7CFB\u7684\u7C7B\u578B",children:[]}]},{level:3,title:"5. \u6570\u636E\u8868\u7684\u8BBE\u8BA1\u539F\u5219",slug:"_5-\u6570\u636E\u8868\u7684\u8BBE\u8BA1\u539F\u5219",children:[]},{level:3,title:"6. \u6570\u636E\u5E93\u5BF9\u8C61\u7F16\u5199\u5EFA\u8BAE",slug:"_6-\u6570\u636E\u5E93\u5BF9\u8C61\u7F16\u5199\u5EFA\u8BAE",children:[{level:4,title:"6.1 \u5173\u4E8E\u5E93",slug:"_6-1-\u5173\u4E8E\u5E93",children:[]},{level:4,title:"6.2 \u5173\u4E8E\u8868\u3001\u5217",slug:"_6-2-\u5173\u4E8E\u8868\u3001\u5217",children:[]},{level:4,title:"6.3 \u5173\u4E8E\u7D22\u5F15",slug:"_6-3-\u5173\u4E8E\u7D22\u5F15",children:[]},{level:4,title:"6.4 SQL\u7F16\u5199",slug:"_6-4-sql\u7F16\u5199",children:[]}]}]},{level:2,title:"\u7B2C12\u7AE0 \u6570\u636E\u5E93\u5176\u5B83\u8C03\u4F18\u7B56\u7565",slug:"\u7B2C12\u7AE0-\u6570\u636E\u5E93\u5176\u5B83\u8C03\u4F18\u7B56\u7565",children:[{level:3,title:"1. \u6570\u636E\u5E93\u8C03\u4F18\u7684\u63AA\u65BD",slug:"_1-\u6570\u636E\u5E93\u8C03\u4F18\u7684\u63AA\u65BD",children:[{level:4,title:"1.1 \u8C03\u4F18\u7684\u76EE\u6807",slug:"_1-1-\u8C03\u4F18\u7684\u76EE\u6807",children:[]},{level:4,title:"1.2 \u5982\u4F55\u5B9A\u4F4D\u8C03\u4F18\u95EE\u9898",slug:"_1-2-\u5982\u4F55\u5B9A\u4F4D\u8C03\u4F18\u95EE\u9898",children:[]},{level:4,title:"1.3 \u8C03\u4F18\u7684\u7EF4\u5EA6\u548C\u6B65\u9AA4",slug:"_1-3-\u8C03\u4F18\u7684\u7EF4\u5EA6\u548C\u6B65\u9AA4",children:[]}]},{level:3,title:"2. \u4F18\u5316MySQL\u670D\u52A1\u5668",slug:"_2-\u4F18\u5316mysql\u670D\u52A1\u5668",children:[{level:4,title:"2.1 \u4F18\u5316\u670D\u52A1\u5668\u786C\u4EF6",slug:"_2-1-\u4F18\u5316\u670D\u52A1\u5668\u786C\u4EF6",children:[]},{level:4,title:"2.2 \u4F18\u5316MySQL\u7684\u53C2\u6570",slug:"_2-2-\u4F18\u5316mysql\u7684\u53C2\u6570",children:[]}]},{level:3,title:"3. \u4F18\u5316\u6570\u636E\u5E93\u7ED3\u6784",slug:"_3-\u4F18\u5316\u6570\u636E\u5E93\u7ED3\u6784",children:[{level:4,title:"3.1 \u62C6\u5206\u8868\uFF1A\u51B7\u70ED\u6570\u636E\u5206\u79BB",slug:"_3-1-\u62C6\u5206\u8868-\u51B7\u70ED\u6570\u636E\u5206\u79BB",children:[]},{level:4,title:"3.2 \u589E\u52A0\u4E2D\u95F4\u8868",slug:"_3-2-\u589E\u52A0\u4E2D\u95F4\u8868",children:[]},{level:4,title:"3.3 \u589E\u52A0\u5197\u4F59\u5B57\u6BB5",slug:"_3-3-\u589E\u52A0\u5197\u4F59\u5B57\u6BB5",children:[]},{level:4,title:"3.4 \u4F18\u5316\u6570\u636E\u7C7B\u578B",slug:"_3-4-\u4F18\u5316\u6570\u636E\u7C7B\u578B",children:[]},{level:4,title:"3.5 \u4F18\u5316\u63D2\u5165\u8BB0\u5F55\u7684\u901F\u5EA6",slug:"_3-5-\u4F18\u5316\u63D2\u5165\u8BB0\u5F55\u7684\u901F\u5EA6",children:[]},{level:4,title:"3.6 \u4F7F\u7528\u975E\u7A7A\u7EA6\u675F",slug:"_3-6-\u4F7F\u7528\u975E\u7A7A\u7EA6\u675F",children:[]},{level:4,title:"3.7 \u5206\u6790\u8868\u3001\u68C0\u67E5\u8868\u4E0E\u4F18\u5316\u8868",slug:"_3-7-\u5206\u6790\u8868\u3001\u68C0\u67E5\u8868\u4E0E\u4F18\u5316\u8868",children:[]}]},{level:3,title:"4.\u5927\u8868\u4F18\u5316",slug:"_4-\u5927\u8868\u4F18\u5316",children:[{level:4,title:"4.1 \u9650\u5B9A\u67E5\u8BE2\u7684\u8303\u56F4",slug:"_4-1-\u9650\u5B9A\u67E5\u8BE2\u7684\u8303\u56F4",children:[]},{level:4,title:"4.2 \u8BFB\u5199\u5206\u79BB",slug:"_4-2-\u8BFB\u5199\u5206\u79BB",children:[]},{level:4,title:"4.3 \u5782\u76F4\u62C6\u5206",slug:"_4-3-\u5782\u76F4\u62C6\u5206",children:[]},{level:4,title:"4.4 \u6C34\u5E73\u62C6\u5206",slug:"_4-4-\u6C34\u5E73\u62C6\u5206",children:[]}]}]},{level:2,title:"\u7B2C13\u7AE0 \u4E8B\u52A1\u57FA\u7840\u77E5\u8BC6",slug:"\u7B2C13\u7AE0-\u4E8B\u52A1\u57FA\u7840\u77E5\u8BC6",children:[{level:3,title:"1. \u6570\u636E\u5E93\u4E8B\u52A1\u6982\u8FF0",slug:"_1-\u6570\u636E\u5E93\u4E8B\u52A1\u6982\u8FF0",children:[{level:4,title:"1.1 \u57FA\u672C\u6982\u5FF5",slug:"_1-1-\u57FA\u672C\u6982\u5FF5",children:[]},{level:4,title:"1.2 \u4E8B\u52A1\u7684ACID\u7279\u6027",slug:"_1-2-\u4E8B\u52A1\u7684acid\u7279\u6027",children:[]},{level:4,title:"1.3 \u4E8B\u52A1\u7684\u72B6\u6001",slug:"_1-3-\u4E8B\u52A1\u7684\u72B6\u6001",children:[]}]},{level:3,title:"2. \u5982\u4F55\u4F7F\u7528\u4E8B\u52A1",slug:"_2-\u5982\u4F55\u4F7F\u7528\u4E8B\u52A1",children:[{level:4,title:"2.1 \u663E\u5F0F\u4E8B\u52A1",slug:"_2-1-\u663E\u5F0F\u4E8B\u52A1",children:[]},{level:4,title:"2.2 \u9690\u5F0F\u4E8B\u52A1",slug:"_2-2-\u9690\u5F0F\u4E8B\u52A1",children:[]},{level:4,title:"2.3 \u9690\u5F0F\u63D0\u4EA4\u6570\u636E\u7684\u60C5\u51B5",slug:"_2-3-\u9690\u5F0F\u63D0\u4EA4\u6570\u636E\u7684\u60C5\u51B5",children:[]},{level:4,title:"2.4 \u5C0F\u7ED3",slug:"_2-4-\u5C0F\u7ED3-1",children:[]}]},{level:3,title:"3. \u4E8B\u52A1\u9694\u79BB\u7EA7\u522B",slug:"_3-\u4E8B\u52A1\u9694\u79BB\u7EA7\u522B",children:[{level:4,title:"3.1 \u6570\u636E\u5E76\u53D1\u95EE\u9898",slug:"_3-1-\u6570\u636E\u5E76\u53D1\u95EE\u9898",children:[]},{level:4,title:"3.2 SQL\u4E2D\u7684\u56DB\u79CD\u9694\u79BB\u7EA7\u522B",slug:"_3-2-sql\u4E2D\u7684\u56DB\u79CD\u9694\u79BB\u7EA7\u522B",children:[]},{level:4,title:"3.3 \u5982\u4F55\u8BBE\u7F6E\u4E8B\u52A1\u7684\u9694\u79BB\u7EA7\u522B",slug:"_3-3-\u5982\u4F55\u8BBE\u7F6E\u4E8B\u52A1\u7684\u9694\u79BB\u7EA7\u522B",children:[]}]}]},{level:2,title:"\u7B2C14\u7AE0 MySQL\u4E8B\u52A1\u65E5\u5FD7",slug:"\u7B2C14\u7AE0-mysql\u4E8B\u52A1\u65E5\u5FD7",children:[{level:3,title:"1. redo\u65E5\u5FD7",slug:"_1-redo\u65E5\u5FD7",children:[{level:4,title:"1.1 \u4E3A\u4EC0\u4E48\u9700\u8981REDO\u65E5\u5FD7",slug:"_1-1-\u4E3A\u4EC0\u4E48\u9700\u8981redo\u65E5\u5FD7",children:[]},{level:4,title:"1.2 REDO\u65E5\u5FD7\u7684\u597D\u5904\u3001\u7279\u70B9",slug:"_1-2-redo\u65E5\u5FD7\u7684\u597D\u5904\u3001\u7279\u70B9",children:[]},{level:4,title:"1.3 redo\u7684\u7EC4\u6210",slug:"_1-3-redo\u7684\u7EC4\u6210",children:[]},{level:4,title:"1.4 redo\u7684\u6574\u4F53\u6D41\u7A0B",slug:"_1-4-redo\u7684\u6574\u4F53\u6D41\u7A0B",children:[]},{level:4,title:"1.5 redo log\u7684\u5237\u76D8\u7B56\u7565",slug:"_1-5-redo-log\u7684\u5237\u76D8\u7B56\u7565",children:[]},{level:4,title:"1.6 \u4E0D\u540C\u5237\u76D8\u7B56\u7565\u6F14\u793A",slug:"_1-6-\u4E0D\u540C\u5237\u76D8\u7B56\u7565\u6F14\u793A",children:[]},{level:4,title:"1.7 \u5199\u5165redo log buffer\u8FC7\u7A0B",slug:"_1-7-\u5199\u5165redo-log-buffer\u8FC7\u7A0B",children:[]},{level:4,title:"1.8 redo log file",slug:"_1-8-redo-log-file",children:[]}]},{level:3,title:"2. Undo\u65E5\u5FD7",slug:"_2-undo\u65E5\u5FD7",children:[{level:4,title:"2.1 \u5982\u4F55\u7406\u89E3Undo\u65E5\u5FD7",slug:"_2-1-\u5982\u4F55\u7406\u89E3undo\u65E5\u5FD7",children:[]},{level:4,title:"2.2 Undo\u65E5\u5FD7\u7684\u4F5C\u7528",slug:"_2-2-undo\u65E5\u5FD7\u7684\u4F5C\u7528",children:[]},{level:4,title:"2.3 undo\u7684\u5B58\u50A8\u7ED3\u6784",slug:"_2-3-undo\u7684\u5B58\u50A8\u7ED3\u6784",children:[]},{level:4,title:"2.4 undo\u7684\u7C7B\u578B",slug:"_2-4-undo\u7684\u7C7B\u578B",children:[]},{level:4,title:"2.5 undo log\u7684\u751F\u547D\u5468\u671F",slug:"_2-5-undo-log\u7684\u751F\u547D\u5468\u671F",children:[]},{level:4,title:"2.6 \u5C0F\u7ED3",slug:"_2-6-\u5C0F\u7ED3",children:[]}]}]},{level:2,title:"\u7B2C15\u7AE0 \u9501",slug:"\u7B2C15\u7AE0-\u9501",children:[{level:3,title:"1. \u6982\u8FF0",slug:"_1-\u6982\u8FF0",children:[]},{level:3,title:"2. MySQL\u5E76\u53D1\u4E8B\u52A1\u8BBF\u95EE\u76F8\u540C\u8BB0\u5F55",slug:"_2-mysql\u5E76\u53D1\u4E8B\u52A1\u8BBF\u95EE\u76F8\u540C\u8BB0\u5F55",children:[{level:4,title:"2.1 \u8BFB-\u8BFB\u60C5\u51B5",slug:"_2-1-\u8BFB-\u8BFB\u60C5\u51B5",children:[]},{level:4,title:"2.2 \u5199-\u5199\u60C5\u51B5",slug:"_2-2-\u5199-\u5199\u60C5\u51B5",children:[]},{level:4,title:"2.3 \u8BFB-\u5199\u6216\u5199-\u8BFB\u60C5\u51B5",slug:"_2-3-\u8BFB-\u5199\u6216\u5199-\u8BFB\u60C5\u51B5",children:[]},{level:4,title:"2.4 \u5E76\u53D1\u95EE\u9898\u7684\u89E3\u51B3\u65B9\u6848",slug:"_2-4-\u5E76\u53D1\u95EE\u9898\u7684\u89E3\u51B3\u65B9\u6848",children:[]}]},{level:3,title:"3. \u9501\u7684\u4E0D\u540C\u89D2\u5EA6\u5206\u7C7B",slug:"_3-\u9501\u7684\u4E0D\u540C\u89D2\u5EA6\u5206\u7C7B",children:[{level:4,title:"3.1 \u4ECE\u6570\u636E\u64CD\u4F5C\u7684\u7C7B\u578B\u5212\u5206\uFF1A\u8BFB\u9501\u3001\u5199\u9501",slug:"_3-1-\u4ECE\u6570\u636E\u64CD\u4F5C\u7684\u7C7B\u578B\u5212\u5206-\u8BFB\u9501\u3001\u5199\u9501",children:[]},{level:4,title:"3.2 \u4ECE\u6570\u636E\u64CD\u4F5C\u7684\u7C92\u5EA6\u5212\u5206\uFF1A\u8868\u7EA7\u9501\u3001\u9875\u7EA7\u9501\u3001\u884C\u9501",slug:"_3-2-\u4ECE\u6570\u636E\u64CD\u4F5C\u7684\u7C92\u5EA6\u5212\u5206-\u8868\u7EA7\u9501\u3001\u9875\u7EA7\u9501\u3001\u884C\u9501",children:[{level:5,title:"1. \u8868\u9501\uFF08Table Lock\uFF09",slug:"_1-\u8868\u9501-table-lock",children:[]},{level:5,title:"2. InnoDB\u4E2D\u7684\u884C\u9501",slug:"_2-innodb\u4E2D\u7684\u884C\u9501",children:[]},{level:5,title:"3. \u9875\u9501",slug:"_3-\u9875\u9501",children:[]}]},{level:4,title:"3.3 \u4ECE\u5BF9\u5F85\u9501\u7684\u6001\u5EA6\u5212\u5206:\u4E50\u89C2\u9501\u3001\u60B2\u89C2\u9501",slug:"_3-3-\u4ECE\u5BF9\u5F85\u9501\u7684\u6001\u5EA6\u5212\u5206-\u4E50\u89C2\u9501\u3001\u60B2\u89C2\u9501",children:[]},{level:4,title:"3.4 \u6309\u52A0\u9501\u7684\u65B9\u5F0F\u5212\u5206\uFF1A\u663E\u5F0F\u9501\u3001\u9690\u5F0F\u9501",slug:"_3-4-\u6309\u52A0\u9501\u7684\u65B9\u5F0F\u5212\u5206-\u663E\u5F0F\u9501\u3001\u9690\u5F0F\u9501",children:[]},{level:4,title:"3.5 \u5176\u5B83\u9501\u4E4B\uFF1A\u5168\u5C40\u9501",slug:"_3-5-\u5176\u5B83\u9501\u4E4B-\u5168\u5C40\u9501",children:[]},{level:4,title:"3.6 \u5176\u5B83\u9501\u4E4B\uFF1A\u6B7B\u9501",slug:"_3-6-\u5176\u5B83\u9501\u4E4B-\u6B7B\u9501",children:[]}]},{level:3,title:"4. \u9501\u7684\u5185\u5B58\u7ED3\u6784",slug:"_4-\u9501\u7684\u5185\u5B58\u7ED3\u6784",children:[]},{level:3,title:"5. \u9501\u76D1\u63A7",slug:"_5-\u9501\u76D1\u63A7",children:[]}]},{level:2,title:"\u7B2C16\u7AE0 \u591A\u7248\u672C\u5E76\u53D1\u63A7\u5236",slug:"\u7B2C16\u7AE0-\u591A\u7248\u672C\u5E76\u53D1\u63A7\u5236",children:[{level:3,title:"1. \u4EC0\u4E48\u662FMVCC",slug:"_1-\u4EC0\u4E48\u662Fmvcc",children:[]},{level:3,title:"2. \u5FEB\u7167\u8BFB\u4E0E\u5F53\u524D\u8BFB",slug:"_2-\u5FEB\u7167\u8BFB\u4E0E\u5F53\u524D\u8BFB",children:[{level:4,title:"2.1 \u5FEB\u7167\u8BFB",slug:"_2-1-\u5FEB\u7167\u8BFB",children:[]},{level:4,title:"2.2 \u5F53\u524D\u8BFB",slug:"_2-2-\u5F53\u524D\u8BFB",children:[]}]},{level:3,title:"3. \u590D\u4E60",slug:"_3-\u590D\u4E60",children:[{level:4,title:"3.1 \u518D\u8C08\u9694\u79BB\u7EA7\u522B",slug:"_3-1-\u518D\u8C08\u9694\u79BB\u7EA7\u522B",children:[]},{level:4,title:"3.2 \u9690\u85CF\u5B57\u6BB5\u3001Undo Log\u7248\u672C\u94FE",slug:"_3-2-\u9690\u85CF\u5B57\u6BB5\u3001undo-log\u7248\u672C\u94FE",children:[]}]},{level:3,title:"4. MVCC\u5B9E\u73B0\u539F\u7406\u4E4BReadView",slug:"_4-mvcc\u5B9E\u73B0\u539F\u7406\u4E4Breadview",children:[{level:4,title:"4.1 \u4EC0\u4E48\u662FReadView",slug:"_4-1-\u4EC0\u4E48\u662Freadview",children:[]},{level:4,title:"4.2 \u8BBE\u8BA1\u601D\u8DEF",slug:"_4-2-\u8BBE\u8BA1\u601D\u8DEF",children:[]},{level:4,title:"4.3 ReadView\u7684\u89C4\u5219",slug:"_4-3-readview\u7684\u89C4\u5219",children:[]},{level:4,title:"4.4 MVCC\u6574\u4F53\u64CD\u4F5C\u6D41\u7A0B",slug:"_4-4-mvcc\u6574\u4F53\u64CD\u4F5C\u6D41\u7A0B",children:[]}]},{level:3,title:"5. \u4E3E\u4F8B\u8BF4\u660E",slug:"_5-\u4E3E\u4F8B\u8BF4\u660E",children:[{level:4,title:"5.1 READ COMMITTED\u9694\u79BB\u7EA7\u522B\u4E0B",slug:"_5-1-read-committed\u9694\u79BB\u7EA7\u522B\u4E0B",children:[]},{level:4,title:"5.2 REPEATABLE READ\u9694\u79BB\u7EA7\u522B\u4E0B",slug:"_5-2-repeatable-read\u9694\u79BB\u7EA7\u522B\u4E0B",children:[]},{level:4,title:"5.3 \u5982\u4F55\u89E3\u51B3\u5E7B\u8BFB",slug:"_5-3-\u5982\u4F55\u89E3\u51B3\u5E7B\u8BFB",children:[]}]},{level:3,title:"6. \u603B\u7ED3",slug:"_6-\u603B\u7ED3",children:[]}]},{level:2,title:"\u7B2C17\u7AE0 \u5176\u5B83\u6570\u636E\u5E93\u65E5\u5FD7",slug:"\u7B2C17\u7AE0-\u5176\u5B83\u6570\u636E\u5E93\u65E5\u5FD7",children:[{level:3,title:"1. MySQL\u652F\u6301\u7684\u65E5\u5FD7",slug:"_1-mysql\u652F\u6301\u7684\u65E5\u5FD7",children:[{level:4,title:"1.1 \u65E5\u5FD7\u7C7B\u578B",slug:"_1-1-\u65E5\u5FD7\u7C7B\u578B",children:[]},{level:4,title:"1.2 \u65E5\u5FD7\u7684\u5F0A\u7AEF",slug:"_1-2-\u65E5\u5FD7\u7684\u5F0A\u7AEF",children:[]}]},{level:3,title:"2. \u901A\u7528\u67E5\u8BE2\u65E5\u5FD7(general query log)",slug:"_2-\u901A\u7528\u67E5\u8BE2\u65E5\u5FD7-general-query-log",children:[{level:4,title:"2.1 \u67E5\u770B\u5F53\u524D\u72B6\u6001",slug:"_2-1-\u67E5\u770B\u5F53\u524D\u72B6\u6001",children:[]},{level:4,title:"2.2 \u542F\u52A8\u65E5\u5FD7",slug:"_2-2-\u542F\u52A8\u65E5\u5FD7",children:[]},{level:4,title:"2.3 \u505C\u6B62\u65E5\u5FD7",slug:"_2-3-\u505C\u6B62\u65E5\u5FD7",children:[]}]},{level:3,title:"3.\u9519\u8BEF\u65E5\u5FD7(error log)",slug:"_3-\u9519\u8BEF\u65E5\u5FD7-error-log",children:[{level:4,title:"3.1 \u542F\u52A8\u65E5\u5FD7",slug:"_3-1-\u542F\u52A8\u65E5\u5FD7",children:[]},{level:4,title:"3.2 \u67E5\u770B\u65E5\u5FD7",slug:"_3-2-\u67E5\u770B\u65E5\u5FD7",children:[]},{level:4,title:"3.3 \u5220\u9664\\\u5237\u65B0\u65E5\u5FD7",slug:"_3-3-\u5220\u9664-\u5237\u65B0\u65E5\u5FD7",children:[]}]},{level:3,title:"4. \u4E8C\u8FDB\u5236\u65E5\u5FD7(bin log)",slug:"_4-\u4E8C\u8FDB\u5236\u65E5\u5FD7-bin-log",children:[{level:4,title:"4.1 \u67E5\u770B\u9ED8\u8BA4\u60C5\u51B5",slug:"_4-1-\u67E5\u770B\u9ED8\u8BA4\u60C5\u51B5",children:[]},{level:4,title:"4.2 \u65E5\u5FD7\u53C2\u6570\u8BBE\u7F6E",slug:"_4-2-\u65E5\u5FD7\u53C2\u6570\u8BBE\u7F6E",children:[]},{level:4,title:"4.3 \u67E5\u770B\u65E5\u5FD7",slug:"_4-3-\u67E5\u770B\u65E5\u5FD7",children:[]},{level:4,title:"4.4 \u4F7F\u7528\u65E5\u5FD7\u6062\u590D\u6570\u636E",slug:"_4-4-\u4F7F\u7528\u65E5\u5FD7\u6062\u590D\u6570\u636E",children:[]},{level:4,title:"4.5 \u5220\u9664\u4E8C\u8FDB\u5236\u65E5\u5FD7",slug:"_4-5-\u5220\u9664\u4E8C\u8FDB\u5236\u65E5\u5FD7",children:[]}]},{level:3,title:"5. \u518D\u8C08\u4E8C\u8FDB\u5236\u65E5\u5FD7(binlog)",slug:"_5-\u518D\u8C08\u4E8C\u8FDB\u5236\u65E5\u5FD7-binlog",children:[{level:4,title:"5.1 \u5199\u5165\u673A\u5236",slug:"_5-1-\u5199\u5165\u673A\u5236",children:[]},{level:4,title:"5.2 binlog\u4E0Eredolog\u5BF9\u6BD4",slug:"_5-2-binlog\u4E0Eredolog\u5BF9\u6BD4",children:[]},{level:4,title:"5.3 \u4E24\u9636\u6BB5\u63D0\u4EA4",slug:"_5-3-\u4E24\u9636\u6BB5\u63D0\u4EA4",children:[]}]},{level:3,title:"6. \u4E2D\u7EE7\u65E5\u5FD7(relay log)",slug:"_6-\u4E2D\u7EE7\u65E5\u5FD7-relay-log",children:[{level:4,title:"6.1 \u4ECB\u7ECD",slug:"_6-1-\u4ECB\u7ECD",children:[]},{level:4,title:"6.2 \u6062\u590D\u7684\u5178\u578B\u9519\u8BEF",slug:"_6-2-\u6062\u590D\u7684\u5178\u578B\u9519\u8BEF",children:[]}]}]},{level:2,title:"\u7B2C18\u7AE0 \u4E3B\u4ECE\u590D\u5236",slug:"\u7B2C18\u7AE0-\u4E3B\u4ECE\u590D\u5236",children:[{level:3,title:"1. \u4E3B\u4ECE\u590D\u5236\u6982\u8FF0",slug:"_1-\u4E3B\u4ECE\u590D\u5236\u6982\u8FF0",children:[{level:4,title:"1.1 \u5982\u4F55\u63D0\u5347\u6570\u636E\u5E93\u5E76\u53D1\u80FD\u529B",slug:"_1-1-\u5982\u4F55\u63D0\u5347\u6570\u636E\u5E93\u5E76\u53D1\u80FD\u529B",children:[]},{level:4,title:"1.2 \u4E3B\u4ECE\u590D\u5236\u7684\u4F5C\u7528",slug:"_1-2-\u4E3B\u4ECE\u590D\u5236\u7684\u4F5C\u7528",children:[]}]},{level:3,title:"2. \u4E3B\u4ECE\u590D\u5236\u7684\u539F\u7406",slug:"_2-\u4E3B\u4ECE\u590D\u5236\u7684\u539F\u7406",children:[{level:4,title:"2.1 \u539F\u7406\u5256\u6790",slug:"_2-1-\u539F\u7406\u5256\u6790",children:[]},{level:4,title:"2.2 \u590D\u5236\u7684\u57FA\u672C\u539F\u5219",slug:"_2-2-\u590D\u5236\u7684\u57FA\u672C\u539F\u5219",children:[]}]},{level:3,title:"3. \u540C\u6B65\u6570\u636E\u4E00\u81F4\u6027\u95EE\u9898",slug:"_3-\u540C\u6B65\u6570\u636E\u4E00\u81F4\u6027\u95EE\u9898",children:[{level:4,title:"3.1 \u7406\u89E3\u4E3B\u4ECE\u5EF6\u8FDF\u95EE\u9898",slug:"_3-1-\u7406\u89E3\u4E3B\u4ECE\u5EF6\u8FDF\u95EE\u9898",children:[]},{level:4,title:"3.2 \u4E3B\u4ECE\u5EF6\u8FDF\u95EE\u9898\u539F\u56E0",slug:"_3-2-\u4E3B\u4ECE\u5EF6\u8FDF\u95EE\u9898\u539F\u56E0",children:[]},{level:4,title:"3.3 \u5982\u4F55\u51CF\u5C11\u4E3B\u4ECE\u5EF6\u8FDF",slug:"_3-3-\u5982\u4F55\u51CF\u5C11\u4E3B\u4ECE\u5EF6\u8FDF",children:[]},{level:4,title:"3.4 \u5982\u4F55\u89E3\u51B3\u4E00\u81F4\u6027\u95EE\u9898",slug:"_3-4-\u5982\u4F55\u89E3\u51B3\u4E00\u81F4\u6027\u95EE\u9898",children:[]}]}]},{level:2,title:"\u7B2C19\u7AE0 \u6570\u636E\u5E93\u5907\u4EFD\u4E0E\u6062\u590D",slug:"\u7B2C19\u7AE0-\u6570\u636E\u5E93\u5907\u4EFD\u4E0E\u6062\u590D",children:[{level:3,title:"1. \u7269\u7406\u5907\u4EFD\u4E0E\u903B\u8F91\u5907\u4EFD",slug:"_1-\u7269\u7406\u5907\u4EFD\u4E0E\u903B\u8F91\u5907\u4EFD",children:[]},{level:3,title:"2. mysqldump\u5B9E\u73B0\u903B\u8F91\u5907\u4EFD",slug:"_2-mysqldump\u5B9E\u73B0\u903B\u8F91\u5907\u4EFD",children:[{level:4,title:"2.1 \u5907\u4EFD\u4E00\u4E2A\u6570\u636E\u5E93",slug:"_2-1-\u5907\u4EFD\u4E00\u4E2A\u6570\u636E\u5E93",children:[]},{level:4,title:"2.2 \u5907\u4EFD\u5168\u90E8\u6570\u636E\u5E93",slug:"_2-2-\u5907\u4EFD\u5168\u90E8\u6570\u636E\u5E93",children:[]},{level:4,title:"2.3 \u5907\u4EFD\u90E8\u5206\u6570\u636E\u5E93",slug:"_2-3-\u5907\u4EFD\u90E8\u5206\u6570\u636E\u5E93",children:[]},{level:4,title:"2.4 \u5907\u4EFD\u90E8\u5206\u8868",slug:"_2-4-\u5907\u4EFD\u90E8\u5206\u8868",children:[]},{level:4,title:"2.5 \u5907\u4EFD\u5355\u8868\u7684\u90E8\u5206\u6570\u636E",slug:"_2-5-\u5907\u4EFD\u5355\u8868\u7684\u90E8\u5206\u6570\u636E",children:[]},{level:4,title:"2.6 \u6392\u9664\u67D0\u4E9B\u8868\u7684\u5907\u4EFD",slug:"_2-6-\u6392\u9664\u67D0\u4E9B\u8868\u7684\u5907\u4EFD",children:[]},{level:4,title:"2.7 \u53EA\u5907\u4EFD\u7ED3\u6784\u6216\u53EA\u5907\u4EFD\u6570\u636E",slug:"_2-7-\u53EA\u5907\u4EFD\u7ED3\u6784\u6216\u53EA\u5907\u4EFD\u6570\u636E",children:[]},{level:4,title:"2.8 \u5907\u4EFD\u4E2D\u5305\u542B\u5B58\u50A8\u8FC7\u7A0B\u3001\u51FD\u6570\u3001\u4E8B\u4EF6",slug:"_2-8-\u5907\u4EFD\u4E2D\u5305\u542B\u5B58\u50A8\u8FC7\u7A0B\u3001\u51FD\u6570\u3001\u4E8B\u4EF6",children:[]}]},{level:3,title:"3. mysql\u547D\u4EE4\u6062\u590D\u6570\u636E",slug:"_3-mysql\u547D\u4EE4\u6062\u590D\u6570\u636E",children:[{level:4,title:"3.1 \u5355\u5E93\u5907\u4EFD\u4E2D\u6062\u590D\u5355\u5E93",slug:"_3-1-\u5355\u5E93\u5907\u4EFD\u4E2D\u6062\u590D\u5355\u5E93",children:[]},{level:4,title:"3.2 \u5168\u91CF\u5907\u4EFD\u6062\u590D",slug:"_3-2-\u5168\u91CF\u5907\u4EFD\u6062\u590D",children:[]},{level:4,title:"3.3 \u4ECE\u5168\u91CF\u5907\u4EFD\u4E2D\u6062\u590D\u5355\u5E93",slug:"_3-3-\u4ECE\u5168\u91CF\u5907\u4EFD\u4E2D\u6062\u590D\u5355\u5E93",children:[]},{level:4,title:"3.4 \u4ECE\u5355\u5E93\u5907\u4EFD\u4E2D\u6062\u590D\u5355\u8868",slug:"_3-4-\u4ECE\u5355\u5E93\u5907\u4EFD\u4E2D\u6062\u590D\u5355\u8868",children:[]}]},{level:3,title:"4. \u8868\u7684\u5BFC\u51FA\u4E0E\u5BFC\u5165",slug:"_4-\u8868\u7684\u5BFC\u51FA\u4E0E\u5BFC\u5165",children:[{level:4,title:"4.1 \u8868\u7684\u5BFC\u51FA",slug:"_4-1-\u8868\u7684\u5BFC\u51FA",children:[]},{level:4,title:"4.2 \u8868\u7684\u5BFC\u5165",slug:"_4-2-\u8868\u7684\u5BFC\u5165",children:[]}]}]}],git:{updatedTime:1710173765e3,contributors:[{name:"shailene",email:"64005626+shaileneF@users.noreply.github.com",commits:1}]},filePathRelative:"java/\u6570\u636E\u5E93/mysql/\u9AD8\u7EA7\u7BC7/MySQL\u6570\u636E\u5E93\u7B14\u8BB0-\u7B2C\u4E8C\u90E8\u5206.md"};export{l as data};
                    +const l={key:"v-94326c4c",path:"/java/%E6%95%B0%E6%8D%AE%E5%BA%93/mysql/%E9%AB%98%E7%BA%A7%E7%AF%87/MySQL%E6%95%B0%E6%8D%AE%E5%BA%93%E7%AC%94%E8%AE%B0-%E7%AC%AC%E4%BA%8C%E9%83%A8%E5%88%86.html",title:"\u7B2C\u4E8C\u90E8\u5206 MySQL\u9AD8\u7EA7\u7279\u6027\u7BC7",lang:"zh-CN",frontmatter:{},excerpt:"",headers:[{level:2,title:"\u7B2C01\u7AE0 Linux\u4E0BMySQL\u7684\u5B89\u88C5\u4E0E\u4F7F\u7528",slug:"\u7B2C01\u7AE0-linux\u4E0Bmysql\u7684\u5B89\u88C5\u4E0E\u4F7F\u7528",children:[{level:3,title:"1. \u5B89\u88C5\u524D\u8BF4\u660E",slug:"_1-\u5B89\u88C5\u524D\u8BF4\u660E",children:[{level:4,title:"1.1 \u67E5\u770B\u662F\u5426\u5B89\u88C5\u8FC7MySQL",slug:"_1-1-\u67E5\u770B\u662F\u5426\u5B89\u88C5\u8FC7mysql",children:[]},{level:4,title:"1.2 MySQL\u7684\u5378\u8F7D",slug:"_1-2-mysql\u7684\u5378\u8F7D",children:[]}]},{level:3,title:"2. MySQL\u7684Linux\u7248\u5B89\u88C5",slug:"_2-mysql\u7684linux\u7248\u5B89\u88C5",children:[{level:4,title:"2.1 CentOS7\u4E0B\u68C0\u67E5MySQL\u4F9D\u8D56",slug:"_2-1-centos7\u4E0B\u68C0\u67E5mysql\u4F9D\u8D56",children:[]},{level:4,title:"2.2 CentOS7\u4E0BMySQL\u5B89\u88C5\u8FC7\u7A0B",slug:"_2-2-centos7\u4E0Bmysql\u5B89\u88C5\u8FC7\u7A0B",children:[]},{level:4,title:"2.3 \u67E5\u770BMySQL\u7248\u672C",slug:"_2-3-\u67E5\u770Bmysql\u7248\u672C",children:[]},{level:4,title:"2.4 \u670D\u52A1\u7684\u521D\u59CB\u5316",slug:"_2-4-\u670D\u52A1\u7684\u521D\u59CB\u5316",children:[]},{level:4,title:"2.5 \u542F\u52A8MySQL\uFF0C\u67E5\u770B\u72B6\u6001",slug:"_2-5-\u542F\u52A8mysql-\u67E5\u770B\u72B6\u6001",children:[]},{level:4,title:"2.6 \u67E5\u770BMySQL\u670D\u52A1\u662F\u5426\u81EA\u542F\u52A8",slug:"_2-6-\u67E5\u770Bmysql\u670D\u52A1\u662F\u5426\u81EA\u542F\u52A8",children:[]}]},{level:3,title:"3. MySQL\u767B\u5F55",slug:"_3-mysql\u767B\u5F55",children:[{level:4,title:"3.1 \u9996\u6B21\u767B\u5F55",slug:"_3-1-\u9996\u6B21\u767B\u5F55",children:[]},{level:4,title:"3.2 \u4FEE\u6539\u5BC6\u7801",slug:"_3-2-\u4FEE\u6539\u5BC6\u7801",children:[]},{level:4,title:"3.3 \u8BBE\u7F6E\u8FDC\u7A0B\u767B\u5F55",slug:"_3-3-\u8BBE\u7F6E\u8FDC\u7A0B\u767B\u5F55",children:[]}]},{level:3,title:"4. Linux\u4E0B\u4FEE\u6539\u914D\u7F6E",slug:"_4-linux\u4E0B\u4FEE\u6539\u914D\u7F6E",children:[]},{level:3,title:"5. \u5B57\u7B26\u96C6\u7684\u76F8\u5173\u64CD\u4F5C",slug:"_5-\u5B57\u7B26\u96C6\u7684\u76F8\u5173\u64CD\u4F5C",children:[{level:4,title:"5.1 \u5404\u7EA7\u522B\u7684\u5B57\u7B26\u96C6",slug:"_5-1-\u5404\u7EA7\u522B\u7684\u5B57\u7B26\u96C6",children:[]},{level:4,title:"5.2 \u8BF7\u6C42\u5230\u54CD\u5E94\u8FC7\u7A0B\u4E2D\u5B57\u7B26\u96C6\u7684\u53D8\u5316",slug:"_5-2-\u8BF7\u6C42\u5230\u54CD\u5E94\u8FC7\u7A0B\u4E2D\u5B57\u7B26\u96C6\u7684\u53D8\u5316",children:[]}]}]},{level:2,title:"\u7B2C02\u7AE0 MySQL\u7684\u6570\u636E\u76EE\u5F55",slug:"\u7B2C02\u7AE0-mysql\u7684\u6570\u636E\u76EE\u5F55",children:[{level:3,title:"1. MySQL8\u7684\u4E3B\u8981\u76EE\u5F55\u7ED3\u6784",slug:"_1-mysql8\u7684\u4E3B\u8981\u76EE\u5F55\u7ED3\u6784",children:[{level:4,title:"1.1 \u6570\u636E\u5E93\u6587\u4EF6\u7684\u5B58\u653E\u8DEF\u5F84",slug:"_1-1-\u6570\u636E\u5E93\u6587\u4EF6\u7684\u5B58\u653E\u8DEF\u5F84",children:[]},{level:4,title:"1.2 \u76F8\u5173\u547D\u4EE4\u76EE\u5F55",slug:"_1-2-\u76F8\u5173\u547D\u4EE4\u76EE\u5F55",children:[]},{level:4,title:"1.3 \u914D\u7F6E\u6587\u4EF6\u76EE\u5F55",slug:"_1-3-\u914D\u7F6E\u6587\u4EF6\u76EE\u5F55",children:[]}]},{level:3,title:"2. \u6570\u636E\u5E93\u548C\u6587\u4EF6\u7CFB\u7EDF\u7684\u5173\u7CFB",slug:"_2-\u6570\u636E\u5E93\u548C\u6587\u4EF6\u7CFB\u7EDF\u7684\u5173\u7CFB",children:[{level:4,title:"2.1 \u67E5\u770B\u9ED8\u8BA4\u6570\u636E\u5E93",slug:"_2-1-\u67E5\u770B\u9ED8\u8BA4\u6570\u636E\u5E93",children:[]},{level:4,title:"2.2 \u6570\u636E\u5E93\u5728\u6587\u4EF6\u7CFB\u7EDF\u4E2D\u7684\u8868\u793A",slug:"_2-2-\u6570\u636E\u5E93\u5728\u6587\u4EF6\u7CFB\u7EDF\u4E2D\u7684\u8868\u793A",children:[]},{level:4,title:"2.3 \u8868\u5728\u6587\u4EF6\u7CFB\u7EDF\u4E2D\u7684\u8868\u793A",slug:"_2-3-\u8868\u5728\u6587\u4EF6\u7CFB\u7EDF\u4E2D\u7684\u8868\u793A",children:[{level:5,title:"2.3.1 InnoDB\u5B58\u50A8\u5F15\u64CE\u6A21\u5F0F",slug:"_2-3-1-innodb\u5B58\u50A8\u5F15\u64CE\u6A21\u5F0F",children:[]},{level:5,title:"2.3.2 MyISAM\u5B58\u50A8\u5F15\u64CE\u6A21\u5F0F",slug:"_2-3-2-myisam\u5B58\u50A8\u5F15\u64CE\u6A21\u5F0F",children:[]}]},{level:4,title:"2.4 \u5C0F\u7ED3",slug:"_2-4-\u5C0F\u7ED3",children:[]}]}]},{level:2,title:"\u7B2C03\u7AE0 \u7528\u6237\u4E0E\u6743\u9650\u7BA1\u7406",slug:"\u7B2C03\u7AE0-\u7528\u6237\u4E0E\u6743\u9650\u7BA1\u7406",children:[{level:3,title:"1. \u7528\u6237\u7BA1\u7406",slug:"_1-\u7528\u6237\u7BA1\u7406",children:[{level:4,title:"1.1 \u767B\u5F55MySQL\u670D\u52A1\u5668",slug:"_1-1-\u767B\u5F55mysql\u670D\u52A1\u5668",children:[]},{level:4,title:"1.2 \u521B\u5EFA\u7528\u6237",slug:"_1-2-\u521B\u5EFA\u7528\u6237",children:[]},{level:4,title:"1.3 \u4FEE\u6539\u7528\u6237",slug:"_1-3-\u4FEE\u6539\u7528\u6237",children:[]},{level:4,title:"1.4 \u5220\u9664\u7528\u6237",slug:"_1-4-\u5220\u9664\u7528\u6237",children:[]},{level:4,title:"1.5 \u8BBE\u7F6E\u5F53\u524D\u7528\u6237\u5BC6\u7801",slug:"_1-5-\u8BBE\u7F6E\u5F53\u524D\u7528\u6237\u5BC6\u7801",children:[]},{level:4,title:"1.6 \u4FEE\u6539\u5176\u5B83\u7528\u6237\u5BC6\u7801",slug:"_1-6-\u4FEE\u6539\u5176\u5B83\u7528\u6237\u5BC6\u7801",children:[]}]},{level:3,title:"2. \u6743\u9650\u7BA1\u7406",slug:"_2-\u6743\u9650\u7BA1\u7406",children:[{level:4,title:"2.1 \u6743\u9650\u5217\u8868",slug:"_2-1-\u6743\u9650\u5217\u8868",children:[]},{level:4,title:"2.2 \u6388\u4E88\u6743\u9650\u7684\u539F\u5219",slug:"_2-2-\u6388\u4E88\u6743\u9650\u7684\u539F\u5219",children:[]},{level:4,title:"2.3 \u6388\u4E88\u6743\u9650",slug:"_2-3-\u6388\u4E88\u6743\u9650",children:[]},{level:4,title:"2.4 \u67E5\u770B\u6743\u9650",slug:"_2-4-\u67E5\u770B\u6743\u9650",children:[]},{level:4,title:"2.5 \u6536\u56DE\u6743\u9650",slug:"_2-5-\u6536\u56DE\u6743\u9650",children:[]}]},{level:3,title:"3. \u89D2\u8272\u7BA1\u7406",slug:"_3-\u89D2\u8272\u7BA1\u7406",children:[{level:4,title:"3.1 \u521B\u5EFA\u89D2\u8272",slug:"_3-1-\u521B\u5EFA\u89D2\u8272",children:[]},{level:4,title:"3.2 \u7ED9\u89D2\u8272\u8D4B\u4E88\u6743\u9650",slug:"_3-2-\u7ED9\u89D2\u8272\u8D4B\u4E88\u6743\u9650",children:[]},{level:4,title:"3.3 \u67E5\u770B\u89D2\u8272\u7684\u6743\u9650",slug:"_3-3-\u67E5\u770B\u89D2\u8272\u7684\u6743\u9650",children:[]},{level:4,title:"3.4 \u56DE\u6536\u89D2\u8272\u7684\u6743\u9650",slug:"_3-4-\u56DE\u6536\u89D2\u8272\u7684\u6743\u9650",children:[]},{level:4,title:"3.5 \u5220\u9664\u89D2\u8272",slug:"_3-5-\u5220\u9664\u89D2\u8272",children:[]},{level:4,title:"3.6 \u7ED9\u7528\u6237\u8D4B\u4E88\u89D2\u8272",slug:"_3-6-\u7ED9\u7528\u6237\u8D4B\u4E88\u89D2\u8272",children:[]},{level:4,title:"3.7 \u6FC0\u6D3B\u89D2\u8272",slug:"_3-7-\u6FC0\u6D3B\u89D2\u8272",children:[]},{level:4,title:"3.8 \u64A4\u9500\u7528\u6237\u7684\u89D2\u8272",slug:"_3-8-\u64A4\u9500\u7528\u6237\u7684\u89D2\u8272",children:[]},{level:4,title:"3.9 \u8BBE\u7F6E\u5F3A\u5236\u89D2\u8272(mandatory role)",slug:"_3-9-\u8BBE\u7F6E\u5F3A\u5236\u89D2\u8272-mandatory-role",children:[]}]}]},{level:2,title:"\u7B2C04\u7AE0 \u903B\u8F91\u67B6\u6784",slug:"\u7B2C04\u7AE0-\u903B\u8F91\u67B6\u6784",children:[{level:3,title:"1. \u903B\u8F91\u67B6\u6784\u5256\u6790",slug:"_1-\u903B\u8F91\u67B6\u6784\u5256\u6790",children:[{level:4,title:"1.1 \u670D\u52A1\u5668\u5904\u7406\u5BA2\u6237\u7AEF\u8BF7\u6C42",slug:"_1-1-\u670D\u52A1\u5668\u5904\u7406\u5BA2\u6237\u7AEF\u8BF7\u6C42",children:[]},{level:4,title:"1.2 Connectors",slug:"_1-2-connectors",children:[]},{level:4,title:"1.3 \u7B2C1\u5C42\uFF1A\u8FDE\u63A5\u5C42",slug:"_1-3-\u7B2C1\u5C42-\u8FDE\u63A5\u5C42",children:[]},{level:4,title:"1.4 \u7B2C2\u5C42\uFF1A\u670D\u52A1\u5C42",slug:"_1-4-\u7B2C2\u5C42-\u670D\u52A1\u5C42",children:[]},{level:4,title:"1.5 \u7B2C3\u5C42\uFF1A\u5F15\u64CE\u5C42",slug:"_1-5-\u7B2C3\u5C42-\u5F15\u64CE\u5C42",children:[]},{level:4,title:"1.6 \u5C0F\u7ED3",slug:"_1-6-\u5C0F\u7ED3",children:[]}]},{level:3,title:"2. SQL\u6267\u884C\u6D41\u7A0B",slug:"_2-sql\u6267\u884C\u6D41\u7A0B",children:[{level:4,title:"2.1 MySQL \u4E2D\u7684 SQL\u6267\u884C\u6D41\u7A0B",slug:"_2-1-mysql-\u4E2D\u7684-sql\u6267\u884C\u6D41\u7A0B",children:[]}]},{level:3,title:"3. \u6570\u636E\u5E93\u7F13\u51B2\u6C60(buffer pool)",slug:"_3-\u6570\u636E\u5E93\u7F13\u51B2\u6C60-buffer-pool",children:[{level:4,title:"3.1 \u7F13\u51B2\u6C60 vs \u67E5\u8BE2\u7F13\u5B58",slug:"_3-1-\u7F13\u51B2\u6C60-vs-\u67E5\u8BE2\u7F13\u5B58",children:[]},{level:4,title:"3.2 \u7F13\u51B2\u6C60\u5982\u4F55\u8BFB\u53D6\u6570\u636E",slug:"_3-2-\u7F13\u51B2\u6C60\u5982\u4F55\u8BFB\u53D6\u6570\u636E",children:[]},{level:4,title:"3.3 \u67E5\u770B/\u8BBE\u7F6E\u7F13\u51B2\u6C60\u7684\u5927\u5C0F",slug:"_3-3-\u67E5\u770B-\u8BBE\u7F6E\u7F13\u51B2\u6C60\u7684\u5927\u5C0F",children:[]},{level:4,title:"3.4 \u591A\u4E2ABuffer Pool\u5B9E\u4F8B",slug:"_3-4-\u591A\u4E2Abuffer-pool\u5B9E\u4F8B",children:[]}]}]},{level:2,title:"\u7B2C05\u7AE0 \u5B58\u50A8\u5F15\u64CE",slug:"\u7B2C05\u7AE0-\u5B58\u50A8\u5F15\u64CE",children:[{level:3,title:"1. \u67E5\u770B\u5B58\u50A8\u5F15\u64CE",slug:"_1-\u67E5\u770B\u5B58\u50A8\u5F15\u64CE",children:[]},{level:3,title:"2. \u8BBE\u7F6E\u7CFB\u7EDF\u9ED8\u8BA4\u7684\u5B58\u50A8\u5F15\u64CE",slug:"_2-\u8BBE\u7F6E\u7CFB\u7EDF\u9ED8\u8BA4\u7684\u5B58\u50A8\u5F15\u64CE",children:[]},{level:3,title:"3. \u8BBE\u7F6E\u8868\u7684\u5B58\u50A8\u5F15\u64CE",slug:"_3-\u8BBE\u7F6E\u8868\u7684\u5B58\u50A8\u5F15\u64CE",children:[{level:4,title:"3.1 \u521B\u5EFA\u8868\u65F6\u6307\u5B9A\u5B58\u50A8\u5F15\u64CE",slug:"_3-1-\u521B\u5EFA\u8868\u65F6\u6307\u5B9A\u5B58\u50A8\u5F15\u64CE",children:[]},{level:4,title:"3.2 \u4FEE\u6539\u8868\u7684\u5B58\u50A8\u5F15\u64CE",slug:"_3-2-\u4FEE\u6539\u8868\u7684\u5B58\u50A8\u5F15\u64CE",children:[]}]},{level:3,title:"4. \u5F15\u64CE\u4ECB\u7ECD",slug:"_4-\u5F15\u64CE\u4ECB\u7ECD",children:[{level:4,title:"4.1 InnoDB \u5F15\u64CE\uFF1A\u5177\u5907\u5916\u952E\u652F\u6301\u529F\u80FD\u7684\u4E8B\u52A1\u5B58\u50A8\u5F15\u64CE",slug:"_4-1-innodb-\u5F15\u64CE-\u5177\u5907\u5916\u952E\u652F\u6301\u529F\u80FD\u7684\u4E8B\u52A1\u5B58\u50A8\u5F15\u64CE",children:[]},{level:4,title:"4.2 MyISAM \u5F15\u64CE\uFF1A\u4E3B\u8981\u7684\u975E\u4E8B\u52A1\u5904\u7406\u5B58\u50A8\u5F15\u64CE",slug:"_4-2-myisam-\u5F15\u64CE-\u4E3B\u8981\u7684\u975E\u4E8B\u52A1\u5904\u7406\u5B58\u50A8\u5F15\u64CE",children:[]},{level:4,title:"4.3 Archive \u5F15\u64CE\uFF1A\u7528\u4E8E\u6570\u636E\u5B58\u6863",slug:"_4-3-archive-\u5F15\u64CE-\u7528\u4E8E\u6570\u636E\u5B58\u6863",children:[]},{level:4,title:"4.4 Blackhole \u5F15\u64CE\uFF1A\u4E22\u5F03\u5199\u64CD\u4F5C\uFF0C\u8BFB\u64CD\u4F5C\u4F1A\u8FD4\u56DE\u7A7A\u5185\u5BB9",slug:"_4-4-blackhole-\u5F15\u64CE-\u4E22\u5F03\u5199\u64CD\u4F5C-\u8BFB\u64CD\u4F5C\u4F1A\u8FD4\u56DE\u7A7A\u5185\u5BB9",children:[]},{level:4,title:"4.5 CSV \u5F15\u64CE\uFF1A\u5B58\u50A8\u6570\u636E\u65F6\uFF0C\u4EE5\u9017\u53F7\u5206\u9694\u5404\u4E2A\u6570\u636E\u9879",slug:"_4-5-csv-\u5F15\u64CE-\u5B58\u50A8\u6570\u636E\u65F6-\u4EE5\u9017\u53F7\u5206\u9694\u5404\u4E2A\u6570\u636E\u9879",children:[]},{level:4,title:"4.6 Memory \u5F15\u64CE\uFF1A\u7F6E\u4E8E\u5185\u5B58\u7684\u8868",slug:"_4-6-memory-\u5F15\u64CE-\u7F6E\u4E8E\u5185\u5B58\u7684\u8868",children:[]},{level:4,title:"4.7 Federated \u5F15\u64CE\uFF1A\u8BBF\u95EE\u8FDC\u7A0B\u8868",slug:"_4-7-federated-\u5F15\u64CE-\u8BBF\u95EE\u8FDC\u7A0B\u8868",children:[]},{level:4,title:"4.8 Merge\u5F15\u64CE\uFF1A\u7BA1\u7406\u591A\u4E2AMyISAM\u8868\u6784\u6210\u7684\u8868\u96C6\u5408",slug:"_4-8-merge\u5F15\u64CE-\u7BA1\u7406\u591A\u4E2Amyisam\u8868\u6784\u6210\u7684\u8868\u96C6\u5408",children:[]},{level:4,title:"4.9 NDB\u5F15\u64CE\uFF1AMySQL\u96C6\u7FA4\u4E13\u7528\u5B58\u50A8\u5F15\u64CE",slug:"_4-9-ndb\u5F15\u64CE-mysql\u96C6\u7FA4\u4E13\u7528\u5B58\u50A8\u5F15\u64CE",children:[]}]},{level:3,title:"5. MyISAM\u548CInnoDB",slug:"_5-myisam\u548Cinnodb",children:[]}]},{level:2,title:"\u7B2C06\u7AE0 \u7D22\u5F15\u7684\u6570\u636E\u7ED3\u6784",slug:"\u7B2C06\u7AE0-\u7D22\u5F15\u7684\u6570\u636E\u7ED3\u6784",children:[{level:3,title:"1.\u4E3A\u4EC0\u4E48\u4F7F\u7528\u7D22\u5F15\uFF1F",slug:"_1-\u4E3A\u4EC0\u4E48\u4F7F\u7528\u7D22\u5F15",children:[]},{level:3,title:"2. \u7D22\u5F15\u53CA\u5176\u4F18\u7F3A\u70B9",slug:"_2-\u7D22\u5F15\u53CA\u5176\u4F18\u7F3A\u70B9",children:[{level:4,title:"2.1 \u7D22\u5F15\u6982\u8FF0",slug:"_2-1-\u7D22\u5F15\u6982\u8FF0",children:[]},{level:4,title:"2.2 \u4F18\u70B9",slug:"_2-2-\u4F18\u70B9",children:[]},{level:4,title:"2.3 \u7F3A\u70B9",slug:"_2-3-\u7F3A\u70B9",children:[]}]},{level:3,title:"3. InnoDB\u4E2D\u7D22\u5F15\u7684\u63A8\u6F14",slug:"_3-innodb\u4E2D\u7D22\u5F15\u7684\u63A8\u6F14",children:[{level:4,title:"3.1 \u7D22\u5F15\u4E4B\u524D\u7684\u67E5\u627E",slug:"_3-1-\u7D22\u5F15\u4E4B\u524D\u7684\u67E5\u627E",children:[]},{level:4,title:"3.2 \u8BBE\u8BA1\u7D22\u5F15",slug:"_3-2-\u8BBE\u8BA1\u7D22\u5F15",children:[{level:5,title:"1. \u4E00\u4E2A\u7B80\u5355\u7684\u7D22\u5F15\u8BBE\u8BA1\u65B9\u6848",slug:"_1-\u4E00\u4E2A\u7B80\u5355\u7684\u7D22\u5F15\u8BBE\u8BA1\u65B9\u6848",children:[]},{level:5,title:"2. InnoDB\u4E2D\u7684\u7D22\u5F15\u65B9\u6848",slug:"_2-innodb\u4E2D\u7684\u7D22\u5F15\u65B9\u6848",children:[]}]},{level:4,title:"3.3 \u5E38\u89C1\u7D22\u5F15\u6982\u5FF5",slug:"_3-3-\u5E38\u89C1\u7D22\u5F15\u6982\u5FF5",children:[{level:5,title:"1. \u805A\u7C07\u7D22\u5F15",slug:"_1-\u805A\u7C07\u7D22\u5F15",children:[]},{level:5,title:"2. \u4E8C\u7EA7\u7D22\u5F15\uFF08\u8F85\u52A9\u7D22\u5F15\u3001\u975E\u805A\u7C07\u7D22\u5F15\uFF09",slug:"_2-\u4E8C\u7EA7\u7D22\u5F15-\u8F85\u52A9\u7D22\u5F15\u3001\u975E\u805A\u7C07\u7D22\u5F15",children:[]},{level:5,title:"3. \u8054\u5408\u7D22\u5F15",slug:"_3-\u8054\u5408\u7D22\u5F15",children:[]}]},{level:4,title:"3.4 InnoDB\u7684B+\u6811\u7D22\u5F15\u7684\u6CE8\u610F\u4E8B\u9879",slug:"_3-4-innodb\u7684b-\u6811\u7D22\u5F15\u7684\u6CE8\u610F\u4E8B\u9879",children:[{level:5,title:"1. \u6839\u9875\u9762\u4F4D\u7F6E\u4E07\u5E74\u4E0D\u52A8",slug:"_1-\u6839\u9875\u9762\u4F4D\u7F6E\u4E07\u5E74\u4E0D\u52A8",children:[]},{level:5,title:"2. \u5185\u8282\u70B9\u4E2D\u76EE\u5F55\u9879\u8BB0\u5F55\u7684\u552F\u4E00\u6027",slug:"_2-\u5185\u8282\u70B9\u4E2D\u76EE\u5F55\u9879\u8BB0\u5F55\u7684\u552F\u4E00\u6027",children:[]},{level:5,title:"3. \u4E00\u4E2A\u9875\u9762\u6700\u5C11\u53EF\u4EE5\u5B58\u50A82\u6761\u8BB0\u5F55",slug:"_3-\u4E00\u4E2A\u9875\u9762\u6700\u5C11\u53EF\u4EE5\u5B58\u50A82\u6761\u8BB0\u5F55",children:[]}]}]},{level:3,title:"4. MyISAM\u4E2D\u7684\u7D22\u5F15\u65B9\u6848",slug:"_4-myisam\u4E2D\u7684\u7D22\u5F15\u65B9\u6848",children:[{level:4,title:"4.1 MyISAM\u7D22\u5F15\u7684\u539F\u7406",slug:"_4-1-myisam\u7D22\u5F15\u7684\u539F\u7406",children:[]},{level:4,title:"4.2 MyISAM \u4E0E InnoDB\u5BF9\u6BD4",slug:"_4-2-myisam-\u4E0E-innodb\u5BF9\u6BD4",children:[]}]},{level:3,title:"5. \u7D22\u5F15\u7684\u4EE3\u4EF7",slug:"_5-\u7D22\u5F15\u7684\u4EE3\u4EF7",children:[]},{level:3,title:"6. MySQL\u6570\u636E\u7ED3\u6784\u9009\u62E9\u7684\u5408\u7406\u6027",slug:"_6-mysql\u6570\u636E\u7ED3\u6784\u9009\u62E9\u7684\u5408\u7406\u6027",children:[{level:4,title:"6.1 Hash\u7ED3\u6784",slug:"_6-1-hash\u7ED3\u6784",children:[]},{level:4,title:"6.2 \u4E8C\u53C9\u641C\u7D22\u6811",slug:"_6-2-\u4E8C\u53C9\u641C\u7D22\u6811",children:[]},{level:4,title:"6.3 AVL\u6811",slug:"_6-3-avl\u6811",children:[]},{level:4,title:"6.4 B-Tree",slug:"_6-4-b-tree",children:[]},{level:4,title:"6.5 B+Tree",slug:"_6-5-b-tree",children:[]}]}]},{level:2,title:"\u7B2C07\u7AE0 InnoDB\u6570\u636E\u5B58\u50A8\u7ED3\u6784",slug:"\u7B2C07\u7AE0-innodb\u6570\u636E\u5B58\u50A8\u7ED3\u6784",children:[{level:3,title:"1. \u6570\u636E\u5E93\u7684\u5B58\u50A8\u7ED3\u6784\uFF1A\u9875",slug:"_1-\u6570\u636E\u5E93\u7684\u5B58\u50A8\u7ED3\u6784-\u9875",children:[{level:4,title:"1.1 \u78C1\u76D8\u4E0E\u5185\u5B58\u4EA4\u4E92\u57FA\u672C\u5355\u4F4D\uFF1A\u9875",slug:"_1-1-\u78C1\u76D8\u4E0E\u5185\u5B58\u4EA4\u4E92\u57FA\u672C\u5355\u4F4D-\u9875",children:[]},{level:4,title:"1.2 \u9875\u7ED3\u6784\u6982\u8FF0",slug:"_1-2-\u9875\u7ED3\u6784\u6982\u8FF0",children:[]},{level:4,title:"1.3 \u9875\u7684\u4E0A\u5C42\u7ED3\u6784",slug:"_1-3-\u9875\u7684\u4E0A\u5C42\u7ED3\u6784",children:[]}]},{level:3,title:"2. \u9875\u7684\u5185\u90E8\u7ED3\u6784",slug:"_2-\u9875\u7684\u5185\u90E8\u7ED3\u6784",children:[{level:4,title:"2.1 \u7B2C1\u90E8\u5206\uFF1A\u6587\u4EF6\u5934\u90E8\u548C\u6587\u4EF6\u5C3E\u90E8",slug:"_2-1-\u7B2C1\u90E8\u5206-\u6587\u4EF6\u5934\u90E8\u548C\u6587\u4EF6\u5C3E\u90E8",children:[{level:5,title:"2.1.1 File Header\uFF08\u6587\u4EF6\u5934\u90E8\uFF09\uFF0838\u5B57\u8282\uFF09",slug:"_2-1-1-file-header-\u6587\u4EF6\u5934\u90E8-38\u5B57\u8282",children:[]},{level:5,title:"2.1.2 File Trailer\uFF08\u6587\u4EF6\u5C3E\u90E8\uFF09\uFF088\u5B57\u8282\uFF09",slug:"_2-1-2-file-trailer-\u6587\u4EF6\u5C3E\u90E8-8\u5B57\u8282",children:[]}]},{level:4,title:"2.2 \u7B2C2\u90E8\u5206\uFF1A\u7A7A\u95F2\u7A7A\u95F4\u3001\u7528\u6237\u8BB0\u5F55\u548C\u6700\u5C0F\u6700\u5927\u8BB0\u5F55",slug:"_2-2-\u7B2C2\u90E8\u5206-\u7A7A\u95F2\u7A7A\u95F4\u3001\u7528\u6237\u8BB0\u5F55\u548C\u6700\u5C0F\u6700\u5927\u8BB0\u5F55",children:[{level:5,title:"2.2.1 Free Space (\u7A7A\u95F2\u7A7A\u95F4)",slug:"_2-2-1-free-space-\u7A7A\u95F2\u7A7A\u95F4",children:[]},{level:5,title:"2.2.2 User Records (\u7528\u6237\u8BB0\u5F55)",slug:"_2-2-2-user-records-\u7528\u6237\u8BB0\u5F55",children:[]},{level:5,title:"2.2.3 Infimum + Supremum\uFF08\u6700\u5C0F\u6700\u5927\u8BB0\u5F55\uFF09",slug:"_2-2-3-infimum-supremum-\u6700\u5C0F\u6700\u5927\u8BB0\u5F55",children:[]}]},{level:4,title:"2.3 \u7B2C3\u90E8\u5206\uFF1A\u9875\u76EE\u5F55\u548C\u9875\u9762\u5934\u90E8",slug:"_2-3-\u7B2C3\u90E8\u5206-\u9875\u76EE\u5F55\u548C\u9875\u9762\u5934\u90E8",children:[{level:5,title:"2.3.1 Page Directory\uFF08\u9875\u76EE\u5F55\uFF09",slug:"_2-3-1-page-directory-\u9875\u76EE\u5F55",children:[]},{level:5,title:"2.3.2 Page Header\uFF08\u9875\u9762\u5934\u90E8\uFF09",slug:"_2-3-2-page-header-\u9875\u9762\u5934\u90E8",children:[]}]}]},{level:3,title:"3. InnoDB\u884C\u683C\u5F0F\uFF08\u6216\u8BB0\u5F55\u683C\u5F0F\uFF09",slug:"_3-innodb\u884C\u683C\u5F0F-\u6216\u8BB0\u5F55\u683C\u5F0F",children:[{level:4,title:"3.1 \u6307\u5B9A\u884C\u683C\u5F0F\u7684\u8BED\u6CD5",slug:"_3-1-\u6307\u5B9A\u884C\u683C\u5F0F\u7684\u8BED\u6CD5",children:[]},{level:4,title:"3.2 COMPACT\u884C\u683C\u5F0F",slug:"_3-2-compact\u884C\u683C\u5F0F",children:[{level:5,title:"3.2.1 \u53D8\u957F\u5B57\u6BB5\u957F\u5EA6\u5217\u8868",slug:"_3-2-1-\u53D8\u957F\u5B57\u6BB5\u957F\u5EA6\u5217\u8868",children:[]},{level:5,title:"3.2.2 NULL\u503C\u5217\u8868",slug:"_3-2-2-null\u503C\u5217\u8868",children:[]},{level:5,title:"3.2.3 \u8BB0\u5F55\u5934\u4FE1\u606F\uFF085\u5B57\u8282\uFF09",slug:"_3-2-3-\u8BB0\u5F55\u5934\u4FE1\u606F-5\u5B57\u8282",children:[]},{level:5,title:"3.2.4 \u8BB0\u5F55\u7684\u771F\u5B9E\u6570\u636E",slug:"_3-2-4-\u8BB0\u5F55\u7684\u771F\u5B9E\u6570\u636E",children:[]}]},{level:4,title:"3.3 Dynamic\u548CCompressed\u884C\u683C\u5F0F",slug:"_3-3-dynamic\u548Ccompressed\u884C\u683C\u5F0F",children:[]}]},{level:3,title:"4. \u533A\u3001\u6BB5\u548C\u788E\u7247\u533A",slug:"_4-\u533A\u3001\u6BB5\u548C\u788E\u7247\u533A",children:[{level:4,title:"4.1 \u4E3A\u4EC0\u4E48\u8981\u6709\u533A\uFF1F",slug:"_4-1-\u4E3A\u4EC0\u4E48\u8981\u6709\u533A",children:[]},{level:4,title:"4.2 \u4E3A\u4EC0\u4E48\u8981\u6709\u6BB5\uFF1F",slug:"_4-2-\u4E3A\u4EC0\u4E48\u8981\u6709\u6BB5",children:[]},{level:4,title:"4.3 \u4E3A\u4EC0\u4E48\u8981\u6709\u788E\u7247\u533A\uFF1F",slug:"_4-3-\u4E3A\u4EC0\u4E48\u8981\u6709\u788E\u7247\u533A",children:[]},{level:4,title:"4.4 \u533A\u7684\u5206\u7C7B",slug:"_4-4-\u533A\u7684\u5206\u7C7B",children:[]}]}]},{level:2,title:"\u7B2C08\u7AE0 \u7D22\u5F15\u7684\u521B\u5EFA\u4E0E\u8BBE\u8BA1\u539F\u5219",slug:"\u7B2C08\u7AE0-\u7D22\u5F15\u7684\u521B\u5EFA\u4E0E\u8BBE\u8BA1\u539F\u5219",children:[{level:3,title:"1. \u7D22\u5F15\u7684\u58F0\u660E\u4E0E\u4F7F\u7528",slug:"_1-\u7D22\u5F15\u7684\u58F0\u660E\u4E0E\u4F7F\u7528",children:[{level:4,title:"1.1 \u7D22\u5F15\u7684\u5206\u7C7B",slug:"_1-1-\u7D22\u5F15\u7684\u5206\u7C7B",children:[]},{level:4,title:"1.2 \u521B\u5EFA\u7D22\u5F15",slug:"_1-2-\u521B\u5EFA\u7D22\u5F15",children:[{level:5,title:"1.\u521B\u5EFA\u8868\u7684\u65F6\u5019\u521B\u5EFA\u7D22\u5F15",slug:"_1-\u521B\u5EFA\u8868\u7684\u65F6\u5019\u521B\u5EFA\u7D22\u5F15",children:[]},{level:5,title:"2. \u5728\u5DF2\u7ECF\u5B58\u5728\u7684\u8868\u4E0A\u521B\u5EFA\u7D22\u5F15",slug:"_2-\u5728\u5DF2\u7ECF\u5B58\u5728\u7684\u8868\u4E0A\u521B\u5EFA\u7D22\u5F15",children:[]}]},{level:4,title:"1.3 \u5220\u9664\u7D22\u5F15",slug:"_1-3-\u5220\u9664\u7D22\u5F15",children:[]}]},{level:3,title:"2. MySQL8.0\u7D22\u5F15\u65B0\u7279\u6027",slug:"_2-mysql8-0\u7D22\u5F15\u65B0\u7279\u6027",children:[{level:4,title:"2.1 \u652F\u6301\u964D\u5E8F\u7D22\u5F15",slug:"_2-1-\u652F\u6301\u964D\u5E8F\u7D22\u5F15",children:[]},{level:4,title:"2.2 \u9690\u85CF\u7D22\u5F15",slug:"_2-2-\u9690\u85CF\u7D22\u5F15",children:[]}]},{level:3,title:"3. \u7D22\u5F15\u7684\u8BBE\u8BA1\u539F\u5219",slug:"_3-\u7D22\u5F15\u7684\u8BBE\u8BA1\u539F\u5219",children:[{level:4,title:"3.1 \u54EA\u4E9B\u60C5\u51B5\u9002\u5408\u521B\u5EFA\u7D22\u5F15",slug:"_3-1-\u54EA\u4E9B\u60C5\u51B5\u9002\u5408\u521B\u5EFA\u7D22\u5F15",children:[]},{level:4,title:"3.2 \u9650\u5236\u7D22\u5F15\u7684\u6570\u76EE",slug:"_3-2-\u9650\u5236\u7D22\u5F15\u7684\u6570\u76EE",children:[]},{level:4,title:"3.3 \u54EA\u4E9B\u60C5\u51B5\u4E0D\u9002\u5408\u521B\u5EFA\u7D22\u5F15",slug:"_3-3-\u54EA\u4E9B\u60C5\u51B5\u4E0D\u9002\u5408\u521B\u5EFA\u7D22\u5F15",children:[]}]}]},{level:2,title:"\u7B2C09\u7AE0 \u6027\u80FD\u5206\u6790\u5DE5\u5177\u7684\u4F7F\u7528",slug:"\u7B2C09\u7AE0-\u6027\u80FD\u5206\u6790\u5DE5\u5177\u7684\u4F7F\u7528",children:[{level:3,title:"1. \u7EDF\u8BA1SQL\u7684\u67E5\u8BE2\u6210\u672C\uFF1Alast_query_cost",slug:"_1-\u7EDF\u8BA1sql\u7684\u67E5\u8BE2\u6210\u672C-last-query-cost",children:[]},{level:3,title:"2. \u5B9A\u4F4D\u6267\u884C\u6162\u7684SQL\uFF1A\u6162\u67E5\u8BE2\u65E5\u5FD7",slug:"_2-\u5B9A\u4F4D\u6267\u884C\u6162\u7684sql-\u6162\u67E5\u8BE2\u65E5\u5FD7",children:[{level:4,title:"2.1 \u5F00\u542F\u6162\u67E5\u8BE2\u65E5\u5FD7\u53C2\u6570",slug:"_2-1-\u5F00\u542F\u6162\u67E5\u8BE2\u65E5\u5FD7\u53C2\u6570",children:[]},{level:4,title:"2.2 \u67E5\u770B\u6162\u67E5\u8BE2\u6570\u76EE",slug:"_2-2-\u67E5\u770B\u6162\u67E5\u8BE2\u6570\u76EE",children:[]},{level:4,title:"2.3 \u6162\u67E5\u8BE2\u65E5\u5FD7\u5206\u6790\u5DE5\u5177\uFF1Amysqldumpslow",slug:"_2-3-\u6162\u67E5\u8BE2\u65E5\u5FD7\u5206\u6790\u5DE5\u5177-mysqldumpslow",children:[]},{level:4,title:"2.4 \u5173\u95ED\u6162\u67E5\u8BE2\u65E5\u5FD7",slug:"_2-4-\u5173\u95ED\u6162\u67E5\u8BE2\u65E5\u5FD7",children:[]}]},{level:3,title:"3. \u67E5\u770B SQL \u6267\u884C\u6210\u672C\uFF1ASHOW PROFILE",slug:"_3-\u67E5\u770B-sql-\u6267\u884C\u6210\u672C-show-profile",children:[]},{level:3,title:"4. \u5206\u6790\u67E5\u8BE2\u8BED\u53E5\uFF1AEXPLAIN",slug:"_4-\u5206\u6790\u67E5\u8BE2\u8BED\u53E5-explain",children:[{level:4,title:"4.1 \u57FA\u672C\u8BED\u6CD5",slug:"_4-1-\u57FA\u672C\u8BED\u6CD5",children:[]},{level:4,title:"4.2 EXPLAIN\u5404\u5217\u4F5C\u7528",slug:"_4-2-explain\u5404\u5217\u4F5C\u7528",children:[]}]},{level:3,title:"5. EXPLAIN\u7684\u8FDB\u4E00\u6B65\u4F7F\u7528",slug:"_5-explain\u7684\u8FDB\u4E00\u6B65\u4F7F\u7528",children:[{level:4,title:"5.1 EXPLAIN\u56DB\u79CD\u8F93\u51FA\u683C\u5F0F",slug:"_5-1-explain\u56DB\u79CD\u8F93\u51FA\u683C\u5F0F",children:[]},{level:4,title:"5.2 SHOW WARNINGS\u7684\u4F7F\u7528",slug:"_5-2-show-warnings\u7684\u4F7F\u7528",children:[]}]},{level:3,title:"6. \u5206\u6790\u4F18\u5316\u5668\u6267\u884C\u8BA1\u5212\uFF1Atrace",slug:"_6-\u5206\u6790\u4F18\u5316\u5668\u6267\u884C\u8BA1\u5212-trace",children:[]},{level:3,title:"7. MySQL\u76D1\u63A7\u5206\u6790\u89C6\u56FE-sys schema",slug:"_7-mysql\u76D1\u63A7\u5206\u6790\u89C6\u56FE-sys-schema",children:[{level:4,title:"7.1 Sys schema\u89C6\u56FE\u4F7F\u7528\u573A\u666F",slug:"_7-1-sys-schema\u89C6\u56FE\u4F7F\u7528\u573A\u666F",children:[]}]}]},{level:2,title:"\u7B2C10\u7AE0 \u7D22\u5F15\u4F18\u5316\u4E0E\u67E5\u8BE2\u4F18\u5316",slug:"\u7B2C10\u7AE0-\u7D22\u5F15\u4F18\u5316\u4E0E\u67E5\u8BE2\u4F18\u5316",children:[{level:3,title:"1. \u7D22\u5F15\u5931\u6548\u6848\u4F8B",slug:"_1-\u7D22\u5F15\u5931\u6548\u6848\u4F8B",children:[{level:4,title:"1.1 \u5168\u503C\u5339\u914D\u6211\u6700\u7231",slug:"_1-1-\u5168\u503C\u5339\u914D\u6211\u6700\u7231",children:[]},{level:4,title:"1.2 \u6700\u4F73\u5DE6\u524D\u7F00\u6CD5\u5219",slug:"_1-2-\u6700\u4F73\u5DE6\u524D\u7F00\u6CD5\u5219",children:[]},{level:4,title:"1.3 \u4E3B\u952E\u63D2\u5165\u987A\u5E8F",slug:"_1-3-\u4E3B\u952E\u63D2\u5165\u987A\u5E8F",children:[]},{level:4,title:"1.4 \u8BA1\u7B97\u3001\u51FD\u6570\u3001\u7C7B\u578B\u8F6C\u6362(\u81EA\u52A8\u6216\u624B\u52A8)\u5BFC\u81F4\u7D22\u5F15\u5931\u6548",slug:"_1-4-\u8BA1\u7B97\u3001\u51FD\u6570\u3001\u7C7B\u578B\u8F6C\u6362-\u81EA\u52A8\u6216\u624B\u52A8-\u5BFC\u81F4\u7D22\u5F15\u5931\u6548",children:[]},{level:4,title:"1.5 \u7C7B\u578B\u8F6C\u6362\u5BFC\u81F4\u7D22\u5F15\u5931\u6548",slug:"_1-5-\u7C7B\u578B\u8F6C\u6362\u5BFC\u81F4\u7D22\u5F15\u5931\u6548",children:[]},{level:4,title:"1.6 \u8303\u56F4\u6761\u4EF6\u53F3\u8FB9\u7684\u5217\u7D22\u5F15\u5931\u6548",slug:"_1-6-\u8303\u56F4\u6761\u4EF6\u53F3\u8FB9\u7684\u5217\u7D22\u5F15\u5931\u6548",children:[]},{level:4,title:"1.7 \u4E0D\u7B49\u4E8E(!= \u6216\u8005<>)\u7D22\u5F15\u5931\u6548",slug:"_1-7-\u4E0D\u7B49\u4E8E-\u6216\u8005-\u7D22\u5F15\u5931\u6548",children:[]},{level:4,title:"1.8 is null\u53EF\u4EE5\u4F7F\u7528\u7D22\u5F15\uFF0Cis not null\u65E0\u6CD5\u4F7F\u7528\u7D22\u5F15",slug:"_1-8-is-null\u53EF\u4EE5\u4F7F\u7528\u7D22\u5F15-is-not-null\u65E0\u6CD5\u4F7F\u7528\u7D22\u5F15",children:[]},{level:4,title:"1.9 like\u4EE5\u901A\u914D\u7B26%\u5F00\u5934\u7D22\u5F15\u5931\u6548",slug:"_1-9-like\u4EE5\u901A\u914D\u7B26-\u5F00\u5934\u7D22\u5F15\u5931\u6548",children:[]},{level:4,title:"1.10 OR \u524D\u540E\u5B58\u5728\u975E\u7D22\u5F15\u7684\u5217\uFF0C\u7D22\u5F15\u5931\u6548",slug:"_1-10-or-\u524D\u540E\u5B58\u5728\u975E\u7D22\u5F15\u7684\u5217-\u7D22\u5F15\u5931\u6548",children:[]},{level:4,title:"1.11 \u6570\u636E\u5E93\u548C\u8868\u7684\u5B57\u7B26\u96C6\u7EDF\u4E00\u4F7F\u7528utf8mb4",slug:"_1-11-\u6570\u636E\u5E93\u548C\u8868\u7684\u5B57\u7B26\u96C6\u7EDF\u4E00\u4F7F\u7528utf8mb4",children:[]}]},{level:3,title:"2. \u5173\u8054\u67E5\u8BE2\u4F18\u5316",slug:"_2-\u5173\u8054\u67E5\u8BE2\u4F18\u5316",children:[{level:4,title:"2.1 \u5185\u8FDE\u63A5",slug:"_2-1-\u5185\u8FDE\u63A5",children:[]},{level:4,title:"2.2 \u5916\u8FDE\u63A5",slug:"_2-2-\u5916\u8FDE\u63A5",children:[]},{level:4,title:"2.3 JOIN\u8BED\u53E5\u539F\u7406",slug:"_2-3-join\u8BED\u53E5\u539F\u7406",children:[{level:5,title:"2.3.1 \u5916\u8FDE\u63A5\u548C\u5185\u8FDE\u63A5",slug:"_2-3-1-\u5916\u8FDE\u63A5\u548C\u5185\u8FDE\u63A5",children:[]},{level:5,title:"2.3.2 Simple Nested-Loop Join\uFF08\u7B80\u5355\u5D4C\u5957\u5FAA\u73AF\u7D22\u5F15\uFF09",slug:"_2-3-2-simple-nested-loop-join-\u7B80\u5355\u5D4C\u5957\u5FAA\u73AF\u7D22\u5F15",children:[]},{level:5,title:"2.3.3 Index Nested-Loop Join\uFF08\u7D22\u5F15\u5D4C\u5957\u5FAA\u73AF\u8FDE\u63A5\uFF09",slug:"_2-3-3-index-nested-loop-join-\u7D22\u5F15\u5D4C\u5957\u5FAA\u73AF\u8FDE\u63A5",children:[]},{level:5,title:"2.3.4 Block Nested-Loop Join\uFF08\u5757\u5D4C\u5957\u5FAA\u73AF\u8FDE\u63A5\uFF09",slug:"_2-3-4-block-nested-loop-join-\u5757\u5D4C\u5957\u5FAA\u73AF\u8FDE\u63A5",children:[]},{level:5,title:"2.3.5 Hash Join",slug:"_2-3-5-hash-join",children:[]}]}]},{level:3,title:"3. \u5B50\u67E5\u8BE2\u4F18\u5316",slug:"_3-\u5B50\u67E5\u8BE2\u4F18\u5316",children:[]},{level:3,title:"4. \u6392\u5E8F\u4F18\u5316",slug:"_4-\u6392\u5E8F\u4F18\u5316",children:[]},{level:3,title:"5. GROUP BY\u4F18\u5316",slug:"_5-group-by\u4F18\u5316",children:[]},{level:3,title:"6. \u4F18\u5316\u5206\u9875\u67E5\u8BE2",slug:"_6-\u4F18\u5316\u5206\u9875\u67E5\u8BE2",children:[]},{level:3,title:"7. \u4F18\u5148\u8003\u8651\u8986\u76D6\u7D22\u5F15",slug:"_7-\u4F18\u5148\u8003\u8651\u8986\u76D6\u7D22\u5F15",children:[{level:5,title:"7.1 \u4EC0\u4E48\u662F\u8986\u76D6\u7D22\u5F15\uFF1F",slug:"_7-1-\u4EC0\u4E48\u662F\u8986\u76D6\u7D22\u5F15",children:[]},{level:5,title:"7.2 \u8986\u76D6\u7D22\u5F15\u7684\u5229\u5F0A",slug:"_7-2-\u8986\u76D6\u7D22\u5F15\u7684\u5229\u5F0A",children:[]}]},{level:3,title:"8. \u7D22\u5F15\u6761\u4EF6\u4E0B\u63A8",slug:"_8-\u7D22\u5F15\u6761\u4EF6\u4E0B\u63A8",children:[{level:4,title:"8.1 \u4F7F\u7528\u524D\u540E\u7684\u626B\u63CF\u8FC7\u7A0B",slug:"_8-1-\u4F7F\u7528\u524D\u540E\u7684\u626B\u63CF\u8FC7\u7A0B",children:[]}]},{level:3,title:"9. \u5176\u5B83\u67E5\u8BE2\u4F18\u5316\u7B56\u7565",slug:"_9-\u5176\u5B83\u67E5\u8BE2\u4F18\u5316\u7B56\u7565",children:[{level:4,title:"9.1 EXISTS \u548C IN \u7684\u533A\u5206",slug:"_9-1-exists-\u548C-in-\u7684\u533A\u5206",children:[]},{level:4,title:"9.2 COUNT(*)\u4E0ECOUNT(\u5177\u4F53\u5B57\u6BB5)\u6548\u7387",slug:"_9-2-count-\u4E0Ecount-\u5177\u4F53\u5B57\u6BB5-\u6548\u7387",children:[]},{level:4,title:"9.3 \u5173\u4E8ESELECT(*)",slug:"_9-3-\u5173\u4E8Eselect",children:[]},{level:4,title:"9.4 LIMIT 1 \u5BF9\u4F18\u5316\u7684\u5F71\u54CD",slug:"_9-4-limit-1-\u5BF9\u4F18\u5316\u7684\u5F71\u54CD",children:[]},{level:4,title:"9.5 \u591A\u4F7F\u7528COMMIT",slug:"_9-5-\u591A\u4F7F\u7528commit",children:[]}]}]},{level:2,title:"\u7B2C11\u7AE0 \u6570\u636E\u5E93\u7684\u8BBE\u8BA1\u89C4\u8303",slug:"\u7B2C11\u7AE0-\u6570\u636E\u5E93\u7684\u8BBE\u8BA1\u89C4\u8303",children:[{level:3,title:"1. \u8303 \u5F0F",slug:"_1-\u8303-\u5F0F",children:[{level:4,title:"1.1 \u8303\u5F0F\u7B80\u4ECB",slug:"_1-1-\u8303\u5F0F\u7B80\u4ECB",children:[]},{level:4,title:"1.2 \u8303\u5F0F\u90FD\u5305\u62EC\u54EA\u4E9B",slug:"_1-2-\u8303\u5F0F\u90FD\u5305\u62EC\u54EA\u4E9B",children:[]},{level:4,title:"1.3 \u952E\u548C\u76F8\u5173\u5C5E\u6027\u7684\u6982\u5FF5",slug:"_1-3-\u952E\u548C\u76F8\u5173\u5C5E\u6027\u7684\u6982\u5FF5",children:[]},{level:4,title:"1.4 \u7B2C\u4E00\u8303\u5F0F(1st NF)",slug:"_1-4-\u7B2C\u4E00\u8303\u5F0F-1st-nf",children:[]},{level:4,title:"1.5 \u7B2C\u4E8C\u8303\u5F0F(2nd NF)",slug:"_1-5-\u7B2C\u4E8C\u8303\u5F0F-2nd-nf",children:[]},{level:4,title:"1.6 \u7B2C\u4E09\u8303\u5F0F(3rd NF)",slug:"_1-6-\u7B2C\u4E09\u8303\u5F0F-3rd-nf",children:[]},{level:4,title:"1.7 \u5C0F\u7ED3",slug:"_1-7-\u5C0F\u7ED3",children:[]}]},{level:3,title:"2. \u53CD\u8303\u5F0F\u5316",slug:"_2-\u53CD\u8303\u5F0F\u5316",children:[{level:4,title:"2.1 \u6982\u8FF0",slug:"_2-1-\u6982\u8FF0",children:[]},{level:4,title:"2.2 \u53CD\u8303\u5F0F\u7684\u65B0\u95EE\u9898",slug:"_2-2-\u53CD\u8303\u5F0F\u7684\u65B0\u95EE\u9898",children:[]},{level:4,title:"2.3 \u53CD\u8303\u5F0F\u7684\u9002\u7528\u573A\u666F",slug:"_2-3-\u53CD\u8303\u5F0F\u7684\u9002\u7528\u573A\u666F",children:[]}]},{level:3,title:"3. BCNF(\u5DF4\u65AF\u8303\u5F0F)",slug:"_3-bcnf-\u5DF4\u65AF\u8303\u5F0F",children:[]},{level:3,title:"4. ER\u6A21\u578B",slug:"_4-er\u6A21\u578B",children:[{level:4,title:"4.1 ER \u6A21\u578B\u5305\u62EC\u90A3\u4E9B\u8981\u7D20\uFF1F",slug:"_4-1-er-\u6A21\u578B\u5305\u62EC\u90A3\u4E9B\u8981\u7D20",children:[]},{level:4,title:"4.2 \u5173\u7CFB\u7684\u7C7B\u578B",slug:"_4-2-\u5173\u7CFB\u7684\u7C7B\u578B",children:[]}]},{level:3,title:"5. \u6570\u636E\u8868\u7684\u8BBE\u8BA1\u539F\u5219",slug:"_5-\u6570\u636E\u8868\u7684\u8BBE\u8BA1\u539F\u5219",children:[]},{level:3,title:"6. \u6570\u636E\u5E93\u5BF9\u8C61\u7F16\u5199\u5EFA\u8BAE",slug:"_6-\u6570\u636E\u5E93\u5BF9\u8C61\u7F16\u5199\u5EFA\u8BAE",children:[{level:4,title:"6.1 \u5173\u4E8E\u5E93",slug:"_6-1-\u5173\u4E8E\u5E93",children:[]},{level:4,title:"6.2 \u5173\u4E8E\u8868\u3001\u5217",slug:"_6-2-\u5173\u4E8E\u8868\u3001\u5217",children:[]},{level:4,title:"6.3 \u5173\u4E8E\u7D22\u5F15",slug:"_6-3-\u5173\u4E8E\u7D22\u5F15",children:[]},{level:4,title:"6.4 SQL\u7F16\u5199",slug:"_6-4-sql\u7F16\u5199",children:[]}]}]},{level:2,title:"\u7B2C12\u7AE0 \u6570\u636E\u5E93\u5176\u5B83\u8C03\u4F18\u7B56\u7565",slug:"\u7B2C12\u7AE0-\u6570\u636E\u5E93\u5176\u5B83\u8C03\u4F18\u7B56\u7565",children:[{level:3,title:"1. \u6570\u636E\u5E93\u8C03\u4F18\u7684\u63AA\u65BD",slug:"_1-\u6570\u636E\u5E93\u8C03\u4F18\u7684\u63AA\u65BD",children:[{level:4,title:"1.1 \u8C03\u4F18\u7684\u76EE\u6807",slug:"_1-1-\u8C03\u4F18\u7684\u76EE\u6807",children:[]},{level:4,title:"1.2 \u5982\u4F55\u5B9A\u4F4D\u8C03\u4F18\u95EE\u9898",slug:"_1-2-\u5982\u4F55\u5B9A\u4F4D\u8C03\u4F18\u95EE\u9898",children:[]},{level:4,title:"1.3 \u8C03\u4F18\u7684\u7EF4\u5EA6\u548C\u6B65\u9AA4",slug:"_1-3-\u8C03\u4F18\u7684\u7EF4\u5EA6\u548C\u6B65\u9AA4",children:[]}]},{level:3,title:"2. \u4F18\u5316MySQL\u670D\u52A1\u5668",slug:"_2-\u4F18\u5316mysql\u670D\u52A1\u5668",children:[{level:4,title:"2.1 \u4F18\u5316\u670D\u52A1\u5668\u786C\u4EF6",slug:"_2-1-\u4F18\u5316\u670D\u52A1\u5668\u786C\u4EF6",children:[]},{level:4,title:"2.2 \u4F18\u5316MySQL\u7684\u53C2\u6570",slug:"_2-2-\u4F18\u5316mysql\u7684\u53C2\u6570",children:[]}]},{level:3,title:"3. \u4F18\u5316\u6570\u636E\u5E93\u7ED3\u6784",slug:"_3-\u4F18\u5316\u6570\u636E\u5E93\u7ED3\u6784",children:[{level:4,title:"3.1 \u62C6\u5206\u8868\uFF1A\u51B7\u70ED\u6570\u636E\u5206\u79BB",slug:"_3-1-\u62C6\u5206\u8868-\u51B7\u70ED\u6570\u636E\u5206\u79BB",children:[]},{level:4,title:"3.2 \u589E\u52A0\u4E2D\u95F4\u8868",slug:"_3-2-\u589E\u52A0\u4E2D\u95F4\u8868",children:[]},{level:4,title:"3.3 \u589E\u52A0\u5197\u4F59\u5B57\u6BB5",slug:"_3-3-\u589E\u52A0\u5197\u4F59\u5B57\u6BB5",children:[]},{level:4,title:"3.4 \u4F18\u5316\u6570\u636E\u7C7B\u578B",slug:"_3-4-\u4F18\u5316\u6570\u636E\u7C7B\u578B",children:[]},{level:4,title:"3.5 \u4F18\u5316\u63D2\u5165\u8BB0\u5F55\u7684\u901F\u5EA6",slug:"_3-5-\u4F18\u5316\u63D2\u5165\u8BB0\u5F55\u7684\u901F\u5EA6",children:[]},{level:4,title:"3.6 \u4F7F\u7528\u975E\u7A7A\u7EA6\u675F",slug:"_3-6-\u4F7F\u7528\u975E\u7A7A\u7EA6\u675F",children:[]},{level:4,title:"3.7 \u5206\u6790\u8868\u3001\u68C0\u67E5\u8868\u4E0E\u4F18\u5316\u8868",slug:"_3-7-\u5206\u6790\u8868\u3001\u68C0\u67E5\u8868\u4E0E\u4F18\u5316\u8868",children:[]}]},{level:3,title:"4.\u5927\u8868\u4F18\u5316",slug:"_4-\u5927\u8868\u4F18\u5316",children:[{level:4,title:"4.1 \u9650\u5B9A\u67E5\u8BE2\u7684\u8303\u56F4",slug:"_4-1-\u9650\u5B9A\u67E5\u8BE2\u7684\u8303\u56F4",children:[]},{level:4,title:"4.2 \u8BFB\u5199\u5206\u79BB",slug:"_4-2-\u8BFB\u5199\u5206\u79BB",children:[]},{level:4,title:"4.3 \u5782\u76F4\u62C6\u5206",slug:"_4-3-\u5782\u76F4\u62C6\u5206",children:[]},{level:4,title:"4.4 \u6C34\u5E73\u62C6\u5206",slug:"_4-4-\u6C34\u5E73\u62C6\u5206",children:[]}]}]},{level:2,title:"\u7B2C13\u7AE0 \u4E8B\u52A1\u57FA\u7840\u77E5\u8BC6",slug:"\u7B2C13\u7AE0-\u4E8B\u52A1\u57FA\u7840\u77E5\u8BC6",children:[{level:3,title:"1. \u6570\u636E\u5E93\u4E8B\u52A1\u6982\u8FF0",slug:"_1-\u6570\u636E\u5E93\u4E8B\u52A1\u6982\u8FF0",children:[{level:4,title:"1.1 \u57FA\u672C\u6982\u5FF5",slug:"_1-1-\u57FA\u672C\u6982\u5FF5",children:[]},{level:4,title:"1.2 \u4E8B\u52A1\u7684ACID\u7279\u6027",slug:"_1-2-\u4E8B\u52A1\u7684acid\u7279\u6027",children:[]},{level:4,title:"1.3 \u4E8B\u52A1\u7684\u72B6\u6001",slug:"_1-3-\u4E8B\u52A1\u7684\u72B6\u6001",children:[]}]},{level:3,title:"2. \u5982\u4F55\u4F7F\u7528\u4E8B\u52A1",slug:"_2-\u5982\u4F55\u4F7F\u7528\u4E8B\u52A1",children:[{level:4,title:"2.1 \u663E\u5F0F\u4E8B\u52A1",slug:"_2-1-\u663E\u5F0F\u4E8B\u52A1",children:[]},{level:4,title:"2.2 \u9690\u5F0F\u4E8B\u52A1",slug:"_2-2-\u9690\u5F0F\u4E8B\u52A1",children:[]},{level:4,title:"2.3 \u9690\u5F0F\u63D0\u4EA4\u6570\u636E\u7684\u60C5\u51B5",slug:"_2-3-\u9690\u5F0F\u63D0\u4EA4\u6570\u636E\u7684\u60C5\u51B5",children:[]},{level:4,title:"2.4 \u5C0F\u7ED3",slug:"_2-4-\u5C0F\u7ED3-1",children:[]}]},{level:3,title:"3. \u4E8B\u52A1\u9694\u79BB\u7EA7\u522B",slug:"_3-\u4E8B\u52A1\u9694\u79BB\u7EA7\u522B",children:[{level:4,title:"3.1 \u6570\u636E\u5E76\u53D1\u95EE\u9898",slug:"_3-1-\u6570\u636E\u5E76\u53D1\u95EE\u9898",children:[]},{level:4,title:"3.2 SQL\u4E2D\u7684\u56DB\u79CD\u9694\u79BB\u7EA7\u522B",slug:"_3-2-sql\u4E2D\u7684\u56DB\u79CD\u9694\u79BB\u7EA7\u522B",children:[]},{level:4,title:"3.3 \u5982\u4F55\u8BBE\u7F6E\u4E8B\u52A1\u7684\u9694\u79BB\u7EA7\u522B",slug:"_3-3-\u5982\u4F55\u8BBE\u7F6E\u4E8B\u52A1\u7684\u9694\u79BB\u7EA7\u522B",children:[]}]}]},{level:2,title:"\u7B2C14\u7AE0 MySQL\u4E8B\u52A1\u65E5\u5FD7",slug:"\u7B2C14\u7AE0-mysql\u4E8B\u52A1\u65E5\u5FD7",children:[{level:3,title:"1. redo\u65E5\u5FD7",slug:"_1-redo\u65E5\u5FD7",children:[{level:4,title:"1.1 \u4E3A\u4EC0\u4E48\u9700\u8981REDO\u65E5\u5FD7",slug:"_1-1-\u4E3A\u4EC0\u4E48\u9700\u8981redo\u65E5\u5FD7",children:[]},{level:4,title:"1.2 REDO\u65E5\u5FD7\u7684\u597D\u5904\u3001\u7279\u70B9",slug:"_1-2-redo\u65E5\u5FD7\u7684\u597D\u5904\u3001\u7279\u70B9",children:[]},{level:4,title:"1.3 redo\u7684\u7EC4\u6210",slug:"_1-3-redo\u7684\u7EC4\u6210",children:[]},{level:4,title:"1.4 redo\u7684\u6574\u4F53\u6D41\u7A0B",slug:"_1-4-redo\u7684\u6574\u4F53\u6D41\u7A0B",children:[]},{level:4,title:"1.5 redo log\u7684\u5237\u76D8\u7B56\u7565",slug:"_1-5-redo-log\u7684\u5237\u76D8\u7B56\u7565",children:[]},{level:4,title:"1.6 \u4E0D\u540C\u5237\u76D8\u7B56\u7565\u6F14\u793A",slug:"_1-6-\u4E0D\u540C\u5237\u76D8\u7B56\u7565\u6F14\u793A",children:[]},{level:4,title:"1.7 \u5199\u5165redo log buffer\u8FC7\u7A0B",slug:"_1-7-\u5199\u5165redo-log-buffer\u8FC7\u7A0B",children:[]},{level:4,title:"1.8 redo log file",slug:"_1-8-redo-log-file",children:[]}]},{level:3,title:"2. Undo\u65E5\u5FD7",slug:"_2-undo\u65E5\u5FD7",children:[{level:4,title:"2.1 \u5982\u4F55\u7406\u89E3Undo\u65E5\u5FD7",slug:"_2-1-\u5982\u4F55\u7406\u89E3undo\u65E5\u5FD7",children:[]},{level:4,title:"2.2 Undo\u65E5\u5FD7\u7684\u4F5C\u7528",slug:"_2-2-undo\u65E5\u5FD7\u7684\u4F5C\u7528",children:[]},{level:4,title:"2.3 undo\u7684\u5B58\u50A8\u7ED3\u6784",slug:"_2-3-undo\u7684\u5B58\u50A8\u7ED3\u6784",children:[]},{level:4,title:"2.4 undo\u7684\u7C7B\u578B",slug:"_2-4-undo\u7684\u7C7B\u578B",children:[]},{level:4,title:"2.5 undo log\u7684\u751F\u547D\u5468\u671F",slug:"_2-5-undo-log\u7684\u751F\u547D\u5468\u671F",children:[]},{level:4,title:"2.6 \u5C0F\u7ED3",slug:"_2-6-\u5C0F\u7ED3",children:[]}]}]},{level:2,title:"\u7B2C15\u7AE0 \u9501",slug:"\u7B2C15\u7AE0-\u9501",children:[{level:3,title:"1. \u6982\u8FF0",slug:"_1-\u6982\u8FF0",children:[]},{level:3,title:"2. MySQL\u5E76\u53D1\u4E8B\u52A1\u8BBF\u95EE\u76F8\u540C\u8BB0\u5F55",slug:"_2-mysql\u5E76\u53D1\u4E8B\u52A1\u8BBF\u95EE\u76F8\u540C\u8BB0\u5F55",children:[{level:4,title:"2.1 \u8BFB-\u8BFB\u60C5\u51B5",slug:"_2-1-\u8BFB-\u8BFB\u60C5\u51B5",children:[]},{level:4,title:"2.2 \u5199-\u5199\u60C5\u51B5",slug:"_2-2-\u5199-\u5199\u60C5\u51B5",children:[]},{level:4,title:"2.3 \u8BFB-\u5199\u6216\u5199-\u8BFB\u60C5\u51B5",slug:"_2-3-\u8BFB-\u5199\u6216\u5199-\u8BFB\u60C5\u51B5",children:[]},{level:4,title:"2.4 \u5E76\u53D1\u95EE\u9898\u7684\u89E3\u51B3\u65B9\u6848",slug:"_2-4-\u5E76\u53D1\u95EE\u9898\u7684\u89E3\u51B3\u65B9\u6848",children:[]}]},{level:3,title:"3. \u9501\u7684\u4E0D\u540C\u89D2\u5EA6\u5206\u7C7B",slug:"_3-\u9501\u7684\u4E0D\u540C\u89D2\u5EA6\u5206\u7C7B",children:[{level:4,title:"3.1 \u4ECE\u6570\u636E\u64CD\u4F5C\u7684\u7C7B\u578B\u5212\u5206\uFF1A\u8BFB\u9501\u3001\u5199\u9501",slug:"_3-1-\u4ECE\u6570\u636E\u64CD\u4F5C\u7684\u7C7B\u578B\u5212\u5206-\u8BFB\u9501\u3001\u5199\u9501",children:[]},{level:4,title:"3.2 \u4ECE\u6570\u636E\u64CD\u4F5C\u7684\u7C92\u5EA6\u5212\u5206\uFF1A\u8868\u7EA7\u9501\u3001\u9875\u7EA7\u9501\u3001\u884C\u9501",slug:"_3-2-\u4ECE\u6570\u636E\u64CD\u4F5C\u7684\u7C92\u5EA6\u5212\u5206-\u8868\u7EA7\u9501\u3001\u9875\u7EA7\u9501\u3001\u884C\u9501",children:[{level:5,title:"1. \u8868\u9501\uFF08Table Lock\uFF09",slug:"_1-\u8868\u9501-table-lock",children:[]},{level:5,title:"2. InnoDB\u4E2D\u7684\u884C\u9501",slug:"_2-innodb\u4E2D\u7684\u884C\u9501",children:[]},{level:5,title:"3. \u9875\u9501",slug:"_3-\u9875\u9501",children:[]}]},{level:4,title:"3.3 \u4ECE\u5BF9\u5F85\u9501\u7684\u6001\u5EA6\u5212\u5206:\u4E50\u89C2\u9501\u3001\u60B2\u89C2\u9501",slug:"_3-3-\u4ECE\u5BF9\u5F85\u9501\u7684\u6001\u5EA6\u5212\u5206-\u4E50\u89C2\u9501\u3001\u60B2\u89C2\u9501",children:[]},{level:4,title:"3.4 \u6309\u52A0\u9501\u7684\u65B9\u5F0F\u5212\u5206\uFF1A\u663E\u5F0F\u9501\u3001\u9690\u5F0F\u9501",slug:"_3-4-\u6309\u52A0\u9501\u7684\u65B9\u5F0F\u5212\u5206-\u663E\u5F0F\u9501\u3001\u9690\u5F0F\u9501",children:[]},{level:4,title:"3.5 \u5176\u5B83\u9501\u4E4B\uFF1A\u5168\u5C40\u9501",slug:"_3-5-\u5176\u5B83\u9501\u4E4B-\u5168\u5C40\u9501",children:[]},{level:4,title:"3.6 \u5176\u5B83\u9501\u4E4B\uFF1A\u6B7B\u9501",slug:"_3-6-\u5176\u5B83\u9501\u4E4B-\u6B7B\u9501",children:[]}]},{level:3,title:"4. \u9501\u7684\u5185\u5B58\u7ED3\u6784",slug:"_4-\u9501\u7684\u5185\u5B58\u7ED3\u6784",children:[]},{level:3,title:"5. \u9501\u76D1\u63A7",slug:"_5-\u9501\u76D1\u63A7",children:[]}]},{level:2,title:"\u7B2C16\u7AE0 \u591A\u7248\u672C\u5E76\u53D1\u63A7\u5236",slug:"\u7B2C16\u7AE0-\u591A\u7248\u672C\u5E76\u53D1\u63A7\u5236",children:[{level:3,title:"1. \u4EC0\u4E48\u662FMVCC",slug:"_1-\u4EC0\u4E48\u662Fmvcc",children:[]},{level:3,title:"2. \u5FEB\u7167\u8BFB\u4E0E\u5F53\u524D\u8BFB",slug:"_2-\u5FEB\u7167\u8BFB\u4E0E\u5F53\u524D\u8BFB",children:[{level:4,title:"2.1 \u5FEB\u7167\u8BFB",slug:"_2-1-\u5FEB\u7167\u8BFB",children:[]},{level:4,title:"2.2 \u5F53\u524D\u8BFB",slug:"_2-2-\u5F53\u524D\u8BFB",children:[]}]},{level:3,title:"3. \u590D\u4E60",slug:"_3-\u590D\u4E60",children:[{level:4,title:"3.1 \u518D\u8C08\u9694\u79BB\u7EA7\u522B",slug:"_3-1-\u518D\u8C08\u9694\u79BB\u7EA7\u522B",children:[]},{level:4,title:"3.2 \u9690\u85CF\u5B57\u6BB5\u3001Undo Log\u7248\u672C\u94FE",slug:"_3-2-\u9690\u85CF\u5B57\u6BB5\u3001undo-log\u7248\u672C\u94FE",children:[]}]},{level:3,title:"4. MVCC\u5B9E\u73B0\u539F\u7406\u4E4BReadView",slug:"_4-mvcc\u5B9E\u73B0\u539F\u7406\u4E4Breadview",children:[{level:4,title:"4.1 \u4EC0\u4E48\u662FReadView",slug:"_4-1-\u4EC0\u4E48\u662Freadview",children:[]},{level:4,title:"4.2 \u8BBE\u8BA1\u601D\u8DEF",slug:"_4-2-\u8BBE\u8BA1\u601D\u8DEF",children:[]},{level:4,title:"4.3 ReadView\u7684\u89C4\u5219",slug:"_4-3-readview\u7684\u89C4\u5219",children:[]},{level:4,title:"4.4 MVCC\u6574\u4F53\u64CD\u4F5C\u6D41\u7A0B",slug:"_4-4-mvcc\u6574\u4F53\u64CD\u4F5C\u6D41\u7A0B",children:[]}]},{level:3,title:"5. \u4E3E\u4F8B\u8BF4\u660E",slug:"_5-\u4E3E\u4F8B\u8BF4\u660E",children:[{level:4,title:"5.1 READ COMMITTED\u9694\u79BB\u7EA7\u522B\u4E0B",slug:"_5-1-read-committed\u9694\u79BB\u7EA7\u522B\u4E0B",children:[]},{level:4,title:"5.2 REPEATABLE READ\u9694\u79BB\u7EA7\u522B\u4E0B",slug:"_5-2-repeatable-read\u9694\u79BB\u7EA7\u522B\u4E0B",children:[]},{level:4,title:"5.3 \u5982\u4F55\u89E3\u51B3\u5E7B\u8BFB",slug:"_5-3-\u5982\u4F55\u89E3\u51B3\u5E7B\u8BFB",children:[]}]},{level:3,title:"6. \u603B\u7ED3",slug:"_6-\u603B\u7ED3",children:[]}]},{level:2,title:"\u7B2C17\u7AE0 \u5176\u5B83\u6570\u636E\u5E93\u65E5\u5FD7",slug:"\u7B2C17\u7AE0-\u5176\u5B83\u6570\u636E\u5E93\u65E5\u5FD7",children:[{level:3,title:"1. MySQL\u652F\u6301\u7684\u65E5\u5FD7",slug:"_1-mysql\u652F\u6301\u7684\u65E5\u5FD7",children:[{level:4,title:"1.1 \u65E5\u5FD7\u7C7B\u578B",slug:"_1-1-\u65E5\u5FD7\u7C7B\u578B",children:[]},{level:4,title:"1.2 \u65E5\u5FD7\u7684\u5F0A\u7AEF",slug:"_1-2-\u65E5\u5FD7\u7684\u5F0A\u7AEF",children:[]}]},{level:3,title:"2. \u901A\u7528\u67E5\u8BE2\u65E5\u5FD7(general query log)",slug:"_2-\u901A\u7528\u67E5\u8BE2\u65E5\u5FD7-general-query-log",children:[{level:4,title:"2.1 \u67E5\u770B\u5F53\u524D\u72B6\u6001",slug:"_2-1-\u67E5\u770B\u5F53\u524D\u72B6\u6001",children:[]},{level:4,title:"2.2 \u542F\u52A8\u65E5\u5FD7",slug:"_2-2-\u542F\u52A8\u65E5\u5FD7",children:[]},{level:4,title:"2.3 \u505C\u6B62\u65E5\u5FD7",slug:"_2-3-\u505C\u6B62\u65E5\u5FD7",children:[]}]},{level:3,title:"3.\u9519\u8BEF\u65E5\u5FD7(error log)",slug:"_3-\u9519\u8BEF\u65E5\u5FD7-error-log",children:[{level:4,title:"3.1 \u542F\u52A8\u65E5\u5FD7",slug:"_3-1-\u542F\u52A8\u65E5\u5FD7",children:[]},{level:4,title:"3.2 \u67E5\u770B\u65E5\u5FD7",slug:"_3-2-\u67E5\u770B\u65E5\u5FD7",children:[]},{level:4,title:"3.3 \u5220\u9664\\\u5237\u65B0\u65E5\u5FD7",slug:"_3-3-\u5220\u9664-\u5237\u65B0\u65E5\u5FD7",children:[]}]},{level:3,title:"4. \u4E8C\u8FDB\u5236\u65E5\u5FD7(bin log)",slug:"_4-\u4E8C\u8FDB\u5236\u65E5\u5FD7-bin-log",children:[{level:4,title:"4.1 \u67E5\u770B\u9ED8\u8BA4\u60C5\u51B5",slug:"_4-1-\u67E5\u770B\u9ED8\u8BA4\u60C5\u51B5",children:[]},{level:4,title:"4.2 \u65E5\u5FD7\u53C2\u6570\u8BBE\u7F6E",slug:"_4-2-\u65E5\u5FD7\u53C2\u6570\u8BBE\u7F6E",children:[]},{level:4,title:"4.3 \u67E5\u770B\u65E5\u5FD7",slug:"_4-3-\u67E5\u770B\u65E5\u5FD7",children:[]},{level:4,title:"4.4 \u4F7F\u7528\u65E5\u5FD7\u6062\u590D\u6570\u636E",slug:"_4-4-\u4F7F\u7528\u65E5\u5FD7\u6062\u590D\u6570\u636E",children:[]},{level:4,title:"4.5 \u5220\u9664\u4E8C\u8FDB\u5236\u65E5\u5FD7",slug:"_4-5-\u5220\u9664\u4E8C\u8FDB\u5236\u65E5\u5FD7",children:[]}]},{level:3,title:"5. \u518D\u8C08\u4E8C\u8FDB\u5236\u65E5\u5FD7(binlog)",slug:"_5-\u518D\u8C08\u4E8C\u8FDB\u5236\u65E5\u5FD7-binlog",children:[{level:4,title:"5.1 \u5199\u5165\u673A\u5236",slug:"_5-1-\u5199\u5165\u673A\u5236",children:[]},{level:4,title:"5.2 binlog\u4E0Eredolog\u5BF9\u6BD4",slug:"_5-2-binlog\u4E0Eredolog\u5BF9\u6BD4",children:[]},{level:4,title:"5.3 \u4E24\u9636\u6BB5\u63D0\u4EA4",slug:"_5-3-\u4E24\u9636\u6BB5\u63D0\u4EA4",children:[]}]},{level:3,title:"6. \u4E2D\u7EE7\u65E5\u5FD7(relay log)",slug:"_6-\u4E2D\u7EE7\u65E5\u5FD7-relay-log",children:[{level:4,title:"6.1 \u4ECB\u7ECD",slug:"_6-1-\u4ECB\u7ECD",children:[]},{level:4,title:"6.2 \u6062\u590D\u7684\u5178\u578B\u9519\u8BEF",slug:"_6-2-\u6062\u590D\u7684\u5178\u578B\u9519\u8BEF",children:[]}]}]},{level:2,title:"\u7B2C18\u7AE0 \u4E3B\u4ECE\u590D\u5236",slug:"\u7B2C18\u7AE0-\u4E3B\u4ECE\u590D\u5236",children:[{level:3,title:"1. \u4E3B\u4ECE\u590D\u5236\u6982\u8FF0",slug:"_1-\u4E3B\u4ECE\u590D\u5236\u6982\u8FF0",children:[{level:4,title:"1.1 \u5982\u4F55\u63D0\u5347\u6570\u636E\u5E93\u5E76\u53D1\u80FD\u529B",slug:"_1-1-\u5982\u4F55\u63D0\u5347\u6570\u636E\u5E93\u5E76\u53D1\u80FD\u529B",children:[]},{level:4,title:"1.2 \u4E3B\u4ECE\u590D\u5236\u7684\u4F5C\u7528",slug:"_1-2-\u4E3B\u4ECE\u590D\u5236\u7684\u4F5C\u7528",children:[]}]},{level:3,title:"2. \u4E3B\u4ECE\u590D\u5236\u7684\u539F\u7406",slug:"_2-\u4E3B\u4ECE\u590D\u5236\u7684\u539F\u7406",children:[{level:4,title:"2.1 \u539F\u7406\u5256\u6790",slug:"_2-1-\u539F\u7406\u5256\u6790",children:[]},{level:4,title:"2.2 \u590D\u5236\u7684\u57FA\u672C\u539F\u5219",slug:"_2-2-\u590D\u5236\u7684\u57FA\u672C\u539F\u5219",children:[]}]},{level:3,title:"3. \u540C\u6B65\u6570\u636E\u4E00\u81F4\u6027\u95EE\u9898",slug:"_3-\u540C\u6B65\u6570\u636E\u4E00\u81F4\u6027\u95EE\u9898",children:[{level:4,title:"3.1 \u7406\u89E3\u4E3B\u4ECE\u5EF6\u8FDF\u95EE\u9898",slug:"_3-1-\u7406\u89E3\u4E3B\u4ECE\u5EF6\u8FDF\u95EE\u9898",children:[]},{level:4,title:"3.2 \u4E3B\u4ECE\u5EF6\u8FDF\u95EE\u9898\u539F\u56E0",slug:"_3-2-\u4E3B\u4ECE\u5EF6\u8FDF\u95EE\u9898\u539F\u56E0",children:[]},{level:4,title:"3.3 \u5982\u4F55\u51CF\u5C11\u4E3B\u4ECE\u5EF6\u8FDF",slug:"_3-3-\u5982\u4F55\u51CF\u5C11\u4E3B\u4ECE\u5EF6\u8FDF",children:[]},{level:4,title:"3.4 \u5982\u4F55\u89E3\u51B3\u4E00\u81F4\u6027\u95EE\u9898",slug:"_3-4-\u5982\u4F55\u89E3\u51B3\u4E00\u81F4\u6027\u95EE\u9898",children:[]}]}]},{level:2,title:"\u7B2C19\u7AE0 \u6570\u636E\u5E93\u5907\u4EFD\u4E0E\u6062\u590D",slug:"\u7B2C19\u7AE0-\u6570\u636E\u5E93\u5907\u4EFD\u4E0E\u6062\u590D",children:[{level:3,title:"1. \u7269\u7406\u5907\u4EFD\u4E0E\u903B\u8F91\u5907\u4EFD",slug:"_1-\u7269\u7406\u5907\u4EFD\u4E0E\u903B\u8F91\u5907\u4EFD",children:[]},{level:3,title:"2. mysqldump\u5B9E\u73B0\u903B\u8F91\u5907\u4EFD",slug:"_2-mysqldump\u5B9E\u73B0\u903B\u8F91\u5907\u4EFD",children:[{level:4,title:"2.1 \u5907\u4EFD\u4E00\u4E2A\u6570\u636E\u5E93",slug:"_2-1-\u5907\u4EFD\u4E00\u4E2A\u6570\u636E\u5E93",children:[]},{level:4,title:"2.2 \u5907\u4EFD\u5168\u90E8\u6570\u636E\u5E93",slug:"_2-2-\u5907\u4EFD\u5168\u90E8\u6570\u636E\u5E93",children:[]},{level:4,title:"2.3 \u5907\u4EFD\u90E8\u5206\u6570\u636E\u5E93",slug:"_2-3-\u5907\u4EFD\u90E8\u5206\u6570\u636E\u5E93",children:[]},{level:4,title:"2.4 \u5907\u4EFD\u90E8\u5206\u8868",slug:"_2-4-\u5907\u4EFD\u90E8\u5206\u8868",children:[]},{level:4,title:"2.5 \u5907\u4EFD\u5355\u8868\u7684\u90E8\u5206\u6570\u636E",slug:"_2-5-\u5907\u4EFD\u5355\u8868\u7684\u90E8\u5206\u6570\u636E",children:[]},{level:4,title:"2.6 \u6392\u9664\u67D0\u4E9B\u8868\u7684\u5907\u4EFD",slug:"_2-6-\u6392\u9664\u67D0\u4E9B\u8868\u7684\u5907\u4EFD",children:[]},{level:4,title:"2.7 \u53EA\u5907\u4EFD\u7ED3\u6784\u6216\u53EA\u5907\u4EFD\u6570\u636E",slug:"_2-7-\u53EA\u5907\u4EFD\u7ED3\u6784\u6216\u53EA\u5907\u4EFD\u6570\u636E",children:[]},{level:4,title:"2.8 \u5907\u4EFD\u4E2D\u5305\u542B\u5B58\u50A8\u8FC7\u7A0B\u3001\u51FD\u6570\u3001\u4E8B\u4EF6",slug:"_2-8-\u5907\u4EFD\u4E2D\u5305\u542B\u5B58\u50A8\u8FC7\u7A0B\u3001\u51FD\u6570\u3001\u4E8B\u4EF6",children:[]}]},{level:3,title:"3. mysql\u547D\u4EE4\u6062\u590D\u6570\u636E",slug:"_3-mysql\u547D\u4EE4\u6062\u590D\u6570\u636E",children:[{level:4,title:"3.1 \u5355\u5E93\u5907\u4EFD\u4E2D\u6062\u590D\u5355\u5E93",slug:"_3-1-\u5355\u5E93\u5907\u4EFD\u4E2D\u6062\u590D\u5355\u5E93",children:[]},{level:4,title:"3.2 \u5168\u91CF\u5907\u4EFD\u6062\u590D",slug:"_3-2-\u5168\u91CF\u5907\u4EFD\u6062\u590D",children:[]},{level:4,title:"3.3 \u4ECE\u5168\u91CF\u5907\u4EFD\u4E2D\u6062\u590D\u5355\u5E93",slug:"_3-3-\u4ECE\u5168\u91CF\u5907\u4EFD\u4E2D\u6062\u590D\u5355\u5E93",children:[]},{level:4,title:"3.4 \u4ECE\u5355\u5E93\u5907\u4EFD\u4E2D\u6062\u590D\u5355\u8868",slug:"_3-4-\u4ECE\u5355\u5E93\u5907\u4EFD\u4E2D\u6062\u590D\u5355\u8868",children:[]}]},{level:3,title:"4. \u8868\u7684\u5BFC\u51FA\u4E0E\u5BFC\u5165",slug:"_4-\u8868\u7684\u5BFC\u51FA\u4E0E\u5BFC\u5165",children:[{level:4,title:"4.1 \u8868\u7684\u5BFC\u51FA",slug:"_4-1-\u8868\u7684\u5BFC\u51FA",children:[]},{level:4,title:"4.2 \u8868\u7684\u5BFC\u5165",slug:"_4-2-\u8868\u7684\u5BFC\u5165",children:[]}]}]}],git:{updatedTime:1710173784e3,contributors:[{name:"shailene",email:"64005626+shaileneF@users.noreply.github.com",commits:1}]},filePathRelative:"java/\u6570\u636E\u5E93/mysql/\u9AD8\u7EA7\u7BC7/MySQL\u6570\u636E\u5E93\u7B14\u8BB0-\u7B2C\u4E8C\u90E8\u5206.md"};export{l as data};
                    diff --git a/assets/Mybatis.html.7a4d957e.js b/assets/Mybatis.html.d904674e.js
                    similarity index 98%
                    rename from assets/Mybatis.html.7a4d957e.js
                    rename to assets/Mybatis.html.d904674e.js
                    index 9150b78b..60e8d17b 100644
                    --- a/assets/Mybatis.html.7a4d957e.js
                    +++ b/assets/Mybatis.html.d904674e.js
                    @@ -1 +1 @@
                    -const l={key:"v-9f83c3ba",path:"/java/%E6%A1%86%E6%9E%B6/mybatis/Mybatis.html",title:"MyBatis",lang:"zh-CN",frontmatter:{},excerpt:"",headers:[{level:2,title:"\u7B2C1\u7AE0 \u6846\u67B6\u6982\u8FF0",slug:"\u7B2C1\u7AE0-\u6846\u67B6\u6982\u8FF0",children:[{level:3,title:"\u4E09\u5C42\u67B6\u6784",slug:"\u4E09\u5C42\u67B6\u6784",children:[]},{level:3,title:"\u6846\u67B6\u5B9A\u4E49",slug:"\u6846\u67B6\u5B9A\u4E49",children:[]},{level:3,title:"\u4F7F\u7528JDBC\u7684\u7F3A\u9677",slug:"\u4F7F\u7528jdbc\u7684\u7F3A\u9677",children:[]},{level:3,title:"Mybatis\u6846\u67B6\u6982\u8FF0",slug:"mybatis\u6846\u67B6\u6982\u8FF0",children:[]}]},{level:2,title:"\u7B2C2\u7AE0 MyBatis\u5FEB\u901F\u5165\u95E8",slug:"\u7B2C2\u7AE0-mybatis\u5FEB\u901F\u5165\u95E8",children:[{level:3,title:"MyBatis\u5165\u95E8\u4F8B\u5B50",slug:"mybatis\u5165\u95E8\u4F8B\u5B50",children:[{level:4,title:"\u5B9E\u73B0\u6B65\u9AA4",slug:"\u5B9E\u73B0\u6B65\u9AA4",children:[]},{level:4,title:"sql\u6620\u5C04\u6587\u4EF6",slug:"sql\u6620\u5C04\u6587\u4EF6",children:[]},{level:4,title:"mybatis\u4E3B\u914D\u7F6E\u6587\u4EF6",slug:"mybatis\u4E3B\u914D\u7F6E\u6587\u4EF6",children:[]},{level:4,title:"\u901A\u8FC7mybatis\u8BBF\u95EE\u6570\u636E\u5E93",slug:"\u901A\u8FC7mybatis\u8BBF\u95EE\u6570\u636E\u5E93",children:[]}]},{level:3,title:"Mybatis\u7528\u5230\u7684\u7C7B\u548C\u5BF9\u8C61\u7684\u4ECB\u7ECD",slug:"mybatis\u7528\u5230\u7684\u7C7B\u548C\u5BF9\u8C61\u7684\u4ECB\u7ECD",children:[{level:4,title:"\u521B\u5EFASqlSession\u6240\u9700\u8981\u7684\u7C7B",slug:"\u521B\u5EFAsqlsession\u6240\u9700\u8981\u7684\u7C7B",children:[]},{level:4,title:"MyBatis\u5DE5\u5177\u7C7B\u5199\u6CD5",slug:"mybatis\u5DE5\u5177\u7C7B\u5199\u6CD5",children:[]}]}]},{level:2,title:"\u7B2C3\u7AE0 MyBatis\u6846\u67B6\u7684Dao\u4EE3\u7406",slug:"\u7B2C3\u7AE0-mybatis\u6846\u67B6\u7684dao\u4EE3\u7406",children:[{level:3,title:"DAO\u4EE3\u7406\u5B9E\u73B0\u6570\u636E\u5E93\u64CD\u4F5C",slug:"dao\u4EE3\u7406\u5B9E\u73B0\u6570\u636E\u5E93\u64CD\u4F5C",children:[{level:4,title:"\u5B9E\u73B0\u539F\u7406",slug:"\u5B9E\u73B0\u539F\u7406",children:[]},{level:4,title:"\u5B9E\u73B0\u6B65\u9AA4",slug:"\u5B9E\u73B0\u6B65\u9AA4-1",children:[]}]},{level:3,title:"\u6DF1\u5165\u7406\u89E3\u53C2\u6570",slug:"\u6DF1\u5165\u7406\u89E3\u53C2\u6570",children:[{level:4,title:"parameterType",slug:"parametertype",children:[]},{level:4,title:"sql mapper \u6620\u5C04\u6587\u4EF6\uFF0C\u4E00\u4E2A\u7B80\u5355\u7C7B\u578B\u7684\u53C2\u6570\u4F20\u503C\u65B9\u5F0F",slug:"sql-mapper-\u6620\u5C04\u6587\u4EF6-\u4E00\u4E2A\u7B80\u5355\u7C7B\u578B\u7684\u53C2\u6570\u4F20\u503C\u65B9\u5F0F",children:[]},{level:4,title:"sql mapper \u6620\u5C04\u6587\u4EF6\uFF0C\u591A\u4E2A\u53C2\u6570\u4F20\u503C\u65B9\u5F0F",slug:"sql-mapper-\u6620\u5C04\u6587\u4EF6-\u591A\u4E2A\u53C2\u6570\u4F20\u503C\u65B9\u5F0F",children:[]},{level:4,title:"## \u548C $",slug:"\u548C",children:[]}]},{level:3,title:"Mybatis\u7684\u8FD4\u56DE\u7ED3\u679C",slug:"mybatis\u7684\u8FD4\u56DE\u7ED3\u679C",children:[{level:4,title:"resultType",slug:"resulttype",children:[]},{level:4,title:"resultMap",slug:"resultmap",children:[]}]},{level:3,title:"Mybatis\u6A21\u7CCA\u67E5\u8BE2\u7684\u4E24\u79CD\u65B9\u5F0F",slug:"mybatis\u6A21\u7CCA\u67E5\u8BE2\u7684\u4E24\u79CD\u65B9\u5F0F",children:[]}]},{level:2,title:"\u7B2C4\u7AE0 \u52A8\u6001SQL",slug:"\u7B2C4\u7AE0-\u52A8\u6001sql",children:[{level:3,title:"\u6982\u8FF0",slug:"\u6982\u8FF0",children:[]},{level:3,title:"\u4ECB\u7ECD\u4E09\u79CD\u6807\u7B7E",slug:"\u4ECB\u7ECD\u4E09\u79CD\u6807\u7B7E",children:[]},{level:3,title:"\u4EE3\u7801\u7247\u6BB5",slug:"\u4EE3\u7801\u7247\u6BB5",children:[]}]},{level:2,title:"\u7B2C5\u7AE0 MyBatis\u914D\u7F6E\u6587\u4EF6",slug:"\u7B2C5\u7AE0-mybatis\u914D\u7F6E\u6587\u4EF6",children:[{level:3,title:"\u4E3B\u914D\u7F6E\u6587\u4EF6",slug:"\u4E3B\u914D\u7F6E\u6587\u4EF6",children:[]},{level:3,title:"\u6570\u636E\u5E93\u5C5E\u6027\u914D\u7F6E\u6587\u4EF6",slug:"\u6570\u636E\u5E93\u5C5E\u6027\u914D\u7F6E\u6587\u4EF6",children:[]}]},{level:2,title:"\u8865\u5145",slug:"\u8865\u5145",children:[{level:3,title:"\u4F7F\u7528PageHelper\u5728mybatis\u6765\u81EA\u52A8\u5E2E\u52A9\u5206\u9875",slug:"\u4F7F\u7528pagehelper\u5728mybatis\u6765\u81EA\u52A8\u5E2E\u52A9\u5206\u9875",children:[]}]}],git:{updatedTime:1710173765e3,contributors:[{name:"shailene",email:"64005626+shaileneF@users.noreply.github.com",commits:1}]},filePathRelative:"java/\u6846\u67B6/mybatis/Mybatis.md"};export{l as data};
                    +const l={key:"v-9f83c3ba",path:"/java/%E6%A1%86%E6%9E%B6/mybatis/Mybatis.html",title:"MyBatis",lang:"zh-CN",frontmatter:{},excerpt:"",headers:[{level:2,title:"\u7B2C1\u7AE0 \u6846\u67B6\u6982\u8FF0",slug:"\u7B2C1\u7AE0-\u6846\u67B6\u6982\u8FF0",children:[{level:3,title:"\u4E09\u5C42\u67B6\u6784",slug:"\u4E09\u5C42\u67B6\u6784",children:[]},{level:3,title:"\u6846\u67B6\u5B9A\u4E49",slug:"\u6846\u67B6\u5B9A\u4E49",children:[]},{level:3,title:"\u4F7F\u7528JDBC\u7684\u7F3A\u9677",slug:"\u4F7F\u7528jdbc\u7684\u7F3A\u9677",children:[]},{level:3,title:"Mybatis\u6846\u67B6\u6982\u8FF0",slug:"mybatis\u6846\u67B6\u6982\u8FF0",children:[]}]},{level:2,title:"\u7B2C2\u7AE0 MyBatis\u5FEB\u901F\u5165\u95E8",slug:"\u7B2C2\u7AE0-mybatis\u5FEB\u901F\u5165\u95E8",children:[{level:3,title:"MyBatis\u5165\u95E8\u4F8B\u5B50",slug:"mybatis\u5165\u95E8\u4F8B\u5B50",children:[{level:4,title:"\u5B9E\u73B0\u6B65\u9AA4",slug:"\u5B9E\u73B0\u6B65\u9AA4",children:[]},{level:4,title:"sql\u6620\u5C04\u6587\u4EF6",slug:"sql\u6620\u5C04\u6587\u4EF6",children:[]},{level:4,title:"mybatis\u4E3B\u914D\u7F6E\u6587\u4EF6",slug:"mybatis\u4E3B\u914D\u7F6E\u6587\u4EF6",children:[]},{level:4,title:"\u901A\u8FC7mybatis\u8BBF\u95EE\u6570\u636E\u5E93",slug:"\u901A\u8FC7mybatis\u8BBF\u95EE\u6570\u636E\u5E93",children:[]}]},{level:3,title:"Mybatis\u7528\u5230\u7684\u7C7B\u548C\u5BF9\u8C61\u7684\u4ECB\u7ECD",slug:"mybatis\u7528\u5230\u7684\u7C7B\u548C\u5BF9\u8C61\u7684\u4ECB\u7ECD",children:[{level:4,title:"\u521B\u5EFASqlSession\u6240\u9700\u8981\u7684\u7C7B",slug:"\u521B\u5EFAsqlsession\u6240\u9700\u8981\u7684\u7C7B",children:[]},{level:4,title:"MyBatis\u5DE5\u5177\u7C7B\u5199\u6CD5",slug:"mybatis\u5DE5\u5177\u7C7B\u5199\u6CD5",children:[]}]}]},{level:2,title:"\u7B2C3\u7AE0 MyBatis\u6846\u67B6\u7684Dao\u4EE3\u7406",slug:"\u7B2C3\u7AE0-mybatis\u6846\u67B6\u7684dao\u4EE3\u7406",children:[{level:3,title:"DAO\u4EE3\u7406\u5B9E\u73B0\u6570\u636E\u5E93\u64CD\u4F5C",slug:"dao\u4EE3\u7406\u5B9E\u73B0\u6570\u636E\u5E93\u64CD\u4F5C",children:[{level:4,title:"\u5B9E\u73B0\u539F\u7406",slug:"\u5B9E\u73B0\u539F\u7406",children:[]},{level:4,title:"\u5B9E\u73B0\u6B65\u9AA4",slug:"\u5B9E\u73B0\u6B65\u9AA4-1",children:[]}]},{level:3,title:"\u6DF1\u5165\u7406\u89E3\u53C2\u6570",slug:"\u6DF1\u5165\u7406\u89E3\u53C2\u6570",children:[{level:4,title:"parameterType",slug:"parametertype",children:[]},{level:4,title:"sql mapper \u6620\u5C04\u6587\u4EF6\uFF0C\u4E00\u4E2A\u7B80\u5355\u7C7B\u578B\u7684\u53C2\u6570\u4F20\u503C\u65B9\u5F0F",slug:"sql-mapper-\u6620\u5C04\u6587\u4EF6-\u4E00\u4E2A\u7B80\u5355\u7C7B\u578B\u7684\u53C2\u6570\u4F20\u503C\u65B9\u5F0F",children:[]},{level:4,title:"sql mapper \u6620\u5C04\u6587\u4EF6\uFF0C\u591A\u4E2A\u53C2\u6570\u4F20\u503C\u65B9\u5F0F",slug:"sql-mapper-\u6620\u5C04\u6587\u4EF6-\u591A\u4E2A\u53C2\u6570\u4F20\u503C\u65B9\u5F0F",children:[]},{level:4,title:"## \u548C $",slug:"\u548C",children:[]}]},{level:3,title:"Mybatis\u7684\u8FD4\u56DE\u7ED3\u679C",slug:"mybatis\u7684\u8FD4\u56DE\u7ED3\u679C",children:[{level:4,title:"resultType",slug:"resulttype",children:[]},{level:4,title:"resultMap",slug:"resultmap",children:[]}]},{level:3,title:"Mybatis\u6A21\u7CCA\u67E5\u8BE2\u7684\u4E24\u79CD\u65B9\u5F0F",slug:"mybatis\u6A21\u7CCA\u67E5\u8BE2\u7684\u4E24\u79CD\u65B9\u5F0F",children:[]}]},{level:2,title:"\u7B2C4\u7AE0 \u52A8\u6001SQL",slug:"\u7B2C4\u7AE0-\u52A8\u6001sql",children:[{level:3,title:"\u6982\u8FF0",slug:"\u6982\u8FF0",children:[]},{level:3,title:"\u4ECB\u7ECD\u4E09\u79CD\u6807\u7B7E",slug:"\u4ECB\u7ECD\u4E09\u79CD\u6807\u7B7E",children:[]},{level:3,title:"\u4EE3\u7801\u7247\u6BB5",slug:"\u4EE3\u7801\u7247\u6BB5",children:[]}]},{level:2,title:"\u7B2C5\u7AE0 MyBatis\u914D\u7F6E\u6587\u4EF6",slug:"\u7B2C5\u7AE0-mybatis\u914D\u7F6E\u6587\u4EF6",children:[{level:3,title:"\u4E3B\u914D\u7F6E\u6587\u4EF6",slug:"\u4E3B\u914D\u7F6E\u6587\u4EF6",children:[]},{level:3,title:"\u6570\u636E\u5E93\u5C5E\u6027\u914D\u7F6E\u6587\u4EF6",slug:"\u6570\u636E\u5E93\u5C5E\u6027\u914D\u7F6E\u6587\u4EF6",children:[]}]},{level:2,title:"\u8865\u5145",slug:"\u8865\u5145",children:[{level:3,title:"\u4F7F\u7528PageHelper\u5728mybatis\u6765\u81EA\u52A8\u5E2E\u52A9\u5206\u9875",slug:"\u4F7F\u7528pagehelper\u5728mybatis\u6765\u81EA\u52A8\u5E2E\u52A9\u5206\u9875",children:[]}]}],git:{updatedTime:1710173784e3,contributors:[{name:"shailene",email:"64005626+shaileneF@users.noreply.github.com",commits:1}]},filePathRelative:"java/\u6846\u67B6/mybatis/Mybatis.md"};export{l as data};
                    diff --git a/assets/Mybatis.html.cc855b6a.js b/assets/Mybatis.html.f4ea1339.js
                    similarity index 99%
                    rename from assets/Mybatis.html.cc855b6a.js
                    rename to assets/Mybatis.html.f4ea1339.js
                    index 69f327a5..492fdd8f 100644
                    --- a/assets/Mybatis.html.cc855b6a.js
                    +++ b/assets/Mybatis.html.f4ea1339.js
                    @@ -1,4 +1,4 @@
                    -import{_ as a,e as n}from"./app.0d029894.js";var s="/study/assets/image-20210910213003041.a7e1ac01.png",t="/study/assets/image-20210912204827485.44851558.png",p="/study/assets/image-20210912204838670.076d9948.png",e="/study/assets/image-20210912204940961.2e2e3e9f.png",o="/study/assets/image-20210912204900434.cda15062.png",l="/study/assets/image-20210912205159195.8e35dc8f.png",c="/study/assets/image-20210912210543125.494a603b.png",u="/study/assets/image-20210912214202756.46acff6c.png",i="/study/assets/image-20210912214209011.3bd39a1b.png",r="/study/assets/image-20211231170347832.7663e77c.png",k="/study/assets/image-20210913111244558.3bda3309.png",g="/study/assets/image-20210913113956465.a4a70347.png",d="/study/assets/image-20210913114945145.caadaab4.png",m="/study/assets/image-20210913142035391.ed925244.png",q="/study/assets/image-20210913145213669.4a7237d0.png",y="/study/assets/image-20210913145239671.2539ba2f.png",S="/study/assets/image-20210913152221165.0f9ad036.png",v="/study/assets/image-20210913153350204.b3fe36ff.png",h="/study/assets/image-20210913153406267.faccce93.png",b="/study/assets/image-20210913153140997.98e5100b.png";const x={},f=n('

                    MyBatis

                    \u7B2C1\u7AE0 \u6846\u67B6\u6982\u8FF0

                    \u4E09\u5C42\u67B6\u6784

                    1. image-20210910213003041

                    2. \u4E09\u5C42\u5BF9\u5E94\u7684\u5305\uFF1A

                      \u754C\u9762\u5C42\uFF1Acontroller\u5305\uFF08servlet\uFF09

                      \u4E1A\u52A1\u903B\u8F91\u5C42\uFF1Aservice\u5305\uFF08XXXService\u7C7B\uFF09

                      \u6570\u636E\u8BBF\u95EE\u5C42\uFF1Adao\u5305\uFF08XXXDao\u7C7B\uFF09

                      \u6211\u8BA4\u4E3AMVC\u4E2D\u7684V\u5728spring\u8FD9\u4E09\u5C42\u67B6\u6784\u4E0B\uFF0CV\u5DF2\u7ECF\u88AB\u5206\u79BB\u51FA\u53BB\uFF0CC\u4EE3\u8868\u7684\u4E1A\u52A1\u903B\u8F91\u5C42\uFF0C\u5C31\u662Fcontroller+service

                    3. MVC\u4E09\u5C42\u67B6\u6784\uFF0CM\u4EE3\u8868\u6570\u636E\uFF0CV\u4EE3\u8868\u89C6\u56FE\uFF0CC\u4EE3\u8868\u63A7\u5236\uFF0C\u4E5F\u5C31\u662F\u4E1A\u52A1\u903B\u8F91\u5904\u7406\u3002

                      MVC\u4E2D\u7684C\u5C31\u4EE3\u8868\u4E86springboot\u4E2D\u7684controller\u5C42\u548Cservice\u5C42\u3002

                      V\u5C31\u662F\u754C\u9762\u5C42\uFF0CM\u5C31\u662F\u6570\u636E\u8BBF\u95EE\u5C42\uFF0CC\u5C31\u662F\u4E1A\u52A1\u903B\u8F91\u5C42\u3002

                      \u7528\u6237--->\u754C\u9762\u5C42---->\u4E1A\u52A1\u903B\u8F91\u5C42---->\u6570\u636E\u8BBF\u95EE\u5C42---->\u6570\u636E\u5E93

                    4. \u5728springBoot\u4E2D\uFF0C\u4E1A\u52A1\u903B\u8F91\u5C42\u53C8\u5206\u4E3A\u4E86controller\u5C42\u548Cservice\u5C42\uFF0C\u89C6\u56FE\u5C42\u88AB\u62FF\u4E86\u51FA\u53BB\uFF0C\u5B9E\u73B0\u4E86\u524D\u540E\u7AEF\u7684\u5206\u79BB\uFF0C

                      controller\u5C42\u7528\u4E8E\u63A5\u53D7\u8BF7\u6C42\uFF0C\u8C03\u7528service\u5C42\u5904\u7406\u8BF7\u6C42\uFF0C\u8FD4\u56DE\u8BF7\u6C42\uFF0C\u4EE5JSON\u6216XML\u683C\u5F0F\u8FD4\u56DE\u7ED9\u524D\u7AEF\u9875\u9762\u8FDB\u884C\u5904\u7406\u3002\u8FD9\u6D89\u53CA\u5230REST

                      service\u5C42 \u4E13\u5FC3\u5904\u7406\u4E1A\u52A1\u903B\u8F91\uFF0C\u5E76\u8C03\u7528DAO\u5C42

                      \u603B\u7ED3\uFF1A

                      • controller\u5C42----web\u5C42\uFF0C\u6709\u7684\u4E5F\u53EB\u754C\u9762\u5C42\uFF0C\u4F46\u5B9E\u9645\u548Chtml\u3001jsp\u4E0D\u662F\u4E00\u7C7B\uFF0C**\u8FD9\u4E00\u5C42\u505A\u7684\u5C31\u662Fservlet\u505A\u7684\u5DE5\u4F5C\uFF0C\u63A5\u6536\u3001\u5904\u7406\u8BF7\u6C42\uFF0C\u8FD4\u56DE\u8BF7\u6C42\u7684\u7ED3\u679C\u3002**\u5728springboot\u4E2D\uFF0C\u4E0D\u548C\u754C\u9762\u6302\u94A9\uFF0C\u8FD4\u56DExml\u6216json\u683C\u5F0F\u7684\u7ED3\u679C\u7ED9\u524D\u7AEF\u3002------\u5BF9\u5E94\u6846\u67B6\uFF1AspringMVC
                      • service\u5C42---\u4E1A\u52A1\u903B\u8F91\u5C42\uFF0C\u4E13\u5FC3\u5904\u7406\u4E1A\u52A1\u903B\u8F91------\u5BF9\u5E94\u6846\u67B6\uFF1Aspring
                      • DAO\u5C42---\u6301\u4E45\u5C42\uFF0C\u548C\u6570\u636E\u5E93\u6253\u4EA4\u9053------\u5BF9\u5E94\u6846\u67B6\uFF1Amybatis
                    5. \u6839\u636E\u7B2C\u4E8C\u70B9\uFF1A

                      controller\u5C42 \u5BF9\u5E94 spring MVC : \u63A5\u6536\u8BF7\u6C42\uFF0C\u54CD\u5E94\u5904\u7406\u7ED3\u679C

                      service\u5C42 \u5BF9\u5E94 spring \uFF1A \u5904\u7406\u4E1A\u52A1\uFF0C\u8FD4\u56DE\u5904\u7406\u7ED3\u679C\u7ED9controller\u5C42

                      DAO\u5C42 \u5BF9\u5E94 mybatis

                    \u6846\u67B6\u5B9A\u4E49

                    1. \u6846\u67B6\u4E2D\u5B9A\u4E49\u597D\u4E86\u4E00\u4E9B\u529F\u80FD\u3001\u7EC4\u4EF6\uFF0C\u8FD9\u4E9B\u529F\u80FD\u3001\u7EC4\u4EF6\u662F\u53EF\u7528\u7684\uFF0C

                      \u81EA\u5DF1\u5199\u7684\u9879\u76EE\u4E2D\u7684\u529F\u80FD\uFF0C\u53EF\u4EE5\u5229\u7528\u6846\u67B6\u4E2D\u5DF2\u6709\u7684\u529F\u80FD

                      \u6846\u67B6\u662F\u4E00\u4E2A\u534A\u6210\u54C1\u7684\u8F6F\u4EF6\uFF0C\u5B9A\u4E49\u597D\u4E86\u4E00\u4E9B\u57FA\u7840\u529F\u80FD\uFF0C\u9700\u8981\u52A0\u5165\u81EA\u5DF1\u7684\u529F\u80FD\u624D\u662F\u5B8C\u6574\u7684\u3002

                      \u8FD9\u4E9B\u57FA\u7840\u529F\u80FD\u662F\u53EF\u91CD\u590D\u4F7F\u7528\u7684\uFF0C\u53EF\u5347\u7EA7\u7684\u3002

                      \u6846\u67B6\u662F\u4E00\u4E2A\u63D0\u4F9B\u597D\u4E86\u57FA\u7840\u529F\u80FD\u7684\u5E73\u53F0

                    2. \u6846\u67B6\u662F\u6574\u4E2A\u6216\u90E8\u5206\u7CFB\u7EDF\u7684\u53EF\u91CD\u7528\u8BBE\u8BA1

                      \u662F\u5B89\u5168\u7684\u3001\u53EF\u590D\u7528\u7684\u3001\u4E0D\u65AD\u5347\u7EA7\u7684\u8F6F\u4EF6\u3002\u662F\u5199\u597D\u4E00\u90E8\u5206\u529F\u80FD\u3001\u7EC4\u4EF6\u7684\u8F6F\u4EF6\uFF0C\u8FD9\u4E9B\u529F\u80FD\u3001\u7EC4\u4EF6\u4F9B\u6211\u4EEC\u5F00\u53D1\u51FA\u5B8C\u6574\u7684\u4EA7\u54C1\u3002

                    3. \u6846\u67B6\u7279\u70B9\uFF1A

                      • \u6846\u67B6\u4E00\u822C\u4E0D\u662F\u5168\u80FD\u7684\uFF0C\u4E0D\u80FD\u505A\u6240\u6709\u4E8B\u60C5
                      • \u6846\u67B6\u662F\u9488\u5BF9\u67D0\u4E00\u4E2A\u9886\u57DF\u6709\u6548\uFF0C\u7279\u957F\u5728\u67D0\u4E00\u4E2A\u65B9\u9762\uFF0C\u6BD4\u5982mybatis\uFF0C\u505A\u6570\u636E\u5E93\u64CD\u4F5C\u5F3A\u3002

                    \u4F7F\u7528JDBC\u7684\u7F3A\u9677

                    1. \u4EE3\u7801\u6BD4\u8F83\u591A\uFF0C\u5F00\u53D1\u6548\u7387\u4F4E
                    2. \u9700\u8981\u5173\u6CE8Connection\u3001Statement\u3001ResultSet\u5BF9\u8C61\u521B\u5EFA\u548C\u9500\u6BC1
                    3. \u5BF9ResultSet\u67E5\u8BE2\u7684\u7ED3\u679C\uFF0C\u9700\u8981\u81EA\u5DF1\u5C01\u88C5\u4E3AList
                    4. \u91CD\u590D\u7684\u4EE3\u7801\u6BD4\u8F83\u591A\u4E9B\u3002
                    5. \u4E1A\u52A1\u4EE3\u7801\u548C\u6570\u636E\u5E93\u7684\u64CD\u4F5C\u6DF7\u6742\u5728\u4E00\u8D77\u3002

                    Mybatis\u6846\u67B6\u6982\u8FF0

                    1. Mybatis\u662F\u4E00\u4E2A\u6846\u67B6\uFF0C\u7528\u4E8EDAO\u5C42\uFF0C\u63D0\u4F9B\u4E86\u8BBF\u95EE\u6570\u636E\u5E93\u7684\u57FA\u672C\u529F\u80FD\uFF0C\u6539\u8FDB\u4E86JDBC\u7684\u7F3A\u70B9

                    2. \u89E3\u51B3\u7684\u4E3B\u8981\u95EE\u9898\uFF1A

                      \u51CF\u8F7BJDBC\u7684\u590D\u6742\u6027\uFF0C\u4E0D\u7528\u91CD\u590D\u7684\u521B\u5EFAconnection\uFF0C\u5173\u95EDconnection\uFF08\u5373\u4F7F\u6211\u4EEC\u5DF2\u7ECF\u628A\u521B\u5EFAconnection\u548C\u5173\u95EDconnection\u5C01\u88C5\u5230\u4E86\u4E13\u95E8\u7684\u5DE5\u5177\u7C7B\u91CC\uFF09\uFF0C\u4E0D\u7528\u91CD\u590D\u7F16\u5199statement\uFF0C\u4E0D\u7528\u8003\u8651\u8D44\u6E90\u4EE3\u7801\u7684\u5173\u95ED

                      \u76EE\u7684\uFF1A\u8BA9\u5F00\u53D1\u8005\u4E13\u5FC3SQL\u7684\u5904\u7406\uFF0C\u5176\u4ED6\u8FD9\u4E9B\u5173\u4E8E\u6570\u636E\u5E93\u7684\u64CD\u4F5C\uFF0C\u7531Mybatis\u4EE3\u52B3

                      \u5728JDBC\u4E2D\uFF0C\u867D\u7136\u6211\u4EEC\u521B\u5EFA\u4E86\u5DE5\u5177\u7C7B\uFF0C\u4F46\u662F\u8FD8\u662F\u8981\u4E0D\u65AD\u8C03\u7528\u521B\u5EFAconnection\u7684\u65B9\u6CD5\uFF0C\u5728BaseDAO\u62BD\u8C61\u7C7B\u63D0\u4F9B\u7684\u65B9\u6CD5\u91CC\uFF0C\u867D\u7136connection\u662F\u4F20\u5165\u7684\uFF0C\u4F46\u662F\u6BCF\u6B21\u90FD\u8981\u5173\u95ED\u8D44\u6E90

                    3. Mybatis \u662FSQL Mapper Framework for Java \u5373 sql\u6620\u5C04\u6846\u67B6

                      • SQL mapper \uFF1A SQL\u6620\u5C04\uFF1A

                        \u662F\u8BF4\u6211\u4EEC\u53EF\u4EE5\u628A\u6570\u636E\u5E93\u4E2D\u8868\u4E2D\u7684\u4E00\u884C\u6570\u636E\u6620\u5C04\u4E3A\u4E00\u4E2AJava\u7C7B\u7684\u5B9E\u4F8B\u5316\u5BF9\u8C61\uFF08\u4E00\u884C\u6570\u636E\u662F\u5177\u4F53\u7684\uFF0C\u6240\u4EE5\u662F\u5B9E\u4F8B\u5316\u5BF9\u8C61\uFF09

                        \u6570\u636E\u5E93\u4E2D\u7684\u4E00\u4E2A\u8868\u5BF9\u5E94\u4E8E\u4E00\u4E2AJava\u7C7B

                        \u8FD9\u662FORM\u601D\u60F3\uFF0C\u5BF9\u8C61\u5173\u7CFB\u6620\u5C04\u601D\u60F3\u3002

                      • Data Access Objects\uFF1A

                        \u6570\u636E\u8BBF\u95EE\uFF0C\u5373\u5BF9\u6570\u636E\u5E93\u6267\u884C\u589E\u5220\u6539\u67E5\u64CD\u4F5C\u3002

                    4. mybatis\u63D0\u4F9B\u4E86\u54EA\u4E9B\u529F\u80FD

                      • \u63D0\u4F9B\u4E86\u521B\u5EFAconnection\u3001statement\u3001ResultSet\u7684\u80FD\u529B\uFF0C\u4E0D\u7528\u5F00\u53D1\u4EBA\u5458\u521B\u5EFA\u4E86
                      • \u63D0\u4F9B\u4E86\u6267\u884CSQL\u8BED\u53E5\u7684\u80FD\u529B\uFF08\u4E4B\u524DJDBC\u901A\u8FC7QueryRunner\u6267\u884C\uFF09\uFF0C\u4E0D\u7528\u5F00\u53D1\u4EBA\u5458\u6267\u884Csql
                      • \u63D0\u4F9B\u4E86\u5FAA\u73AFSQL\uFF0C\u628ASQL\u7684\u7ED3\u679C\u8F6C\u4E3AJava\u5BF9\u8C61\uFF0CList\u96C6\u5408\u7684\u80FD\u529B
                      • \u63D0\u4F9B\u4E86\u5173\u95ED\u8D44\u6E90\u7684\u80FD\u529B\uFF0C\u4E0D\u7528\u5F00\u53D1\u4EBA\u5458\u5173\u95EDConnection\u3001Statement\u7B49\u3002

                      \u5F00\u53D1\u4EBA\u5458\u505A\u7684\u662F\uFF1A\u63D0\u4F9BSQL\u8BED\u53E5

                      \u5F00\u53D1\u4EBA\u5458\u63D0\u4F9Bsql\u8BED\u53E5---mybatis\u5904\u7406sql----\u5F00\u53D1\u4EBA\u5458\u5F97\u5230List\u96C6\u5408\u6216Java\u5BF9\u8C61\uFF08\u8868\u4E2D\u7684\u6570\u636E\u6620\u5C04\u5230Java\u5C42\u9762\uFF09

                      \u4E5F\u5C31\u662F\u5BF9\u6570\u636E\u5E93\u7684\u64CD\u4F5C\uFF0C\u4EA4\u7ED9Mybatis\u6267\u884C\uFF0C\u5F00\u53D1\u4EBA\u5458\u53EA\u63D0\u4F9BSQL\uFF0C\u4E13\u6CE8\u4E8E\u4E1A\u52A1\u7684\u5904\u7406.\u548C\u6570\u636E\u5E93\u6253\u4EA4\u9053\u7684\u4E00\u4E9B\u6D41\u6C34\u7EBF\u5DE5\u4F5C,\u4EA4\u7ED9mybatis\u5904\u7406

                    5. mybatis\u662F\u4E00\u4E2ASQL\u6620\u5C04\u6846\u67B6\uFF0C\u63D0\u4F9B\u7684\u6570\u636E\u5E93\u7684\u64CD\u4F5C\u80FD\u529B\uFF0C\u662F\u589E\u5F3A\u7684JDBC

                    \u7B2C2\u7AE0 MyBatis\u5FEB\u901F\u5165\u95E8

                    MyBatis\u5165\u95E8\u4F8B\u5B50

                    \u5B9E\u73B0\u6B65\u9AA4

                    1. \u65B0\u5EFA\u6570\u636E\u5E93

                    2. \u65B0\u5EFA\u8868

                    3. \u521B\u5EFAmaven\u9879\u76EE

                    4. \u6DFB\u52A0mybatis\u4F9D\u8D56\uFF0C\u6DFB\u52A0MYSQL\u9A71\u52A8connector\u4F9D\u8D56

                    5. \u521B\u5EFA\u5B9E\u4F53\u7C7B\uFF08Java Bean\uFF09\uFF0C\u5BF9\u5E94\u4E8Emysql\u4E2D\u4E00\u4E2A\u8868\uFF0C\u8868\u4E2D\u4E00\u884C\u6570\u636E\u5BF9\u5E94\u4E8EJava\u5C42\u9762\u7684\u4E00\u4E2A\u7C7B\u7684\u5BF9\u8C61\uFF0C\u8FD9\u662FORM\uFF0C\u5BF9\u8C61\u5173\u7CFB\u6620\u5C04\u6A21\u578B

                    6. \u521B\u5EFA\u6301\u4E45\u5C42\u7684DAO\u63A5\u53E3\uFF0C\u5B9A\u4E49\u64CD\u4F5C\u6570\u636E\u5E93\u7684\u65B9\u6CD5\uFF0C\u6B64\u65B9\u6CD5\u540D\u8981\u4F5C\u4E3ASQL\u8BED\u53E5\u6807\u7B7E\u7684ID\uFF0C\u6807\u8BC6\u6240\u8981\u6267\u884C\u7684SQL\u8BED\u53E5\u3002\u800CSQL\u8BED\u53E5\u7684ID\u548C\u63A5\u53E3\u91CC\u7684\u65B9\u6CD5\u540D\u662F\u76F8\u540C\u7684

                      nameSpace + \u201C.\u201D+\u6B64ID = sqlId

                      nameSpace\u4E3A\u63A5\u53E3\u7684\u5168\u9650\u5B9A\u540D\u3002

                    7. \u521B\u5EFAsql\u6620\u5C04\u6587\u4EF6(\u4E5F\u53EBmapper\u6587\u4EF6)

                      sql\u6620\u5C04\u6587\u4EF6\uFF1A\u5199sql\u8BED\u53E5\u7684\uFF0C\u4E00\u822C\u4E00\u4E2A\u8868\uFF08\u5BF9\u5E94\u4E00\u4E2A\u7C7B\uFF09\u5BF9\u5E94\u4E00\u4E2Asql\u6620\u5C04\u6587\u4EF6

                      \u8FD9\u4E2A\u6587\u4EF6\u662Fxml\u6587\u4EF6\uFF0C\u5199\u5728\u63A5\u53E3\u6240\u5728\u7684\u76EE\u5F55\u4E2D\uFF0C\u8FD9\u4E2A\u6587\u4EF6\u7684\u540D\u79F0\u548C\u63A5\u53E3\u4FDD\u6301\u4E00\u81F4

                    8. \u521B\u5EFAmybatis\u4E3B\u914D\u7F6E\u6587\u4EF6\uFF1A

                      \u4E00\u4E2A\u9879\u76EE\u5C31\u4E00\u4E2A\u4E3B\u914D\u7F6E\u6587\u4EF6

                      \u4E3B\u914D\u7F6E\u6587\u4EF6\u63D0\u4F9B\u4E86

                      • \u6570\u636E\u5E93\u7684\u8FDE\u63A5\u4FE1\u606F\uFF08\u73AF\u5883\u4FE1\u606F\uFF0C\u5373\u4E3B\u914D\u7F6E\u6587\u4EF6\u4E2D\u7684environment\uFF09\uFF0C\u9664\u4E86\u8FDE\u63A5\u4FE1\u606F\uFF0C\u8FD8\u6709\u4E8B\u52A1\u4FE1\u606F\uFF0C\u662F\u5426\u4F7F\u7528\u8FDE\u63A5\u6C60\u7B49\u3002

                      • SQL\u6620\u5C04\u6587\u4EF6\u7684\u4F4D\u7F6E\u4FE1\u606F

                        \u53EF\u4EE5\u5199\u591A\u4E2ASQL\u6620\u5C04\u6587\u4EF6

                    9. \u521B\u5EFA\u4F7F\u7528mybatis\u7C7B

                      \u901A\u8FC7mybatis\u8BBF\u95EE\u6570\u636E\u5E93

                      \u4F7F\u7528mybatis\u7684\u5BF9\u8C61SqlSession\uFF0C\u901A\u8FC7\u5B83\u7684\u65B9\u6CD5\u6267\u884Csql\u8BED\u53E5

                    sql\u6620\u5C04\u6587\u4EF6

                    <?xml version="1.0" encoding="UTF-8" ?>
                    +import{_ as a,e as n}from"./app.f8791b52.js";var s="/study/assets/image-20210910213003041.a7e1ac01.png",t="/study/assets/image-20210912204827485.44851558.png",p="/study/assets/image-20210912204838670.076d9948.png",e="/study/assets/image-20210912204940961.2e2e3e9f.png",o="/study/assets/image-20210912204900434.cda15062.png",l="/study/assets/image-20210912205159195.8e35dc8f.png",c="/study/assets/image-20210912210543125.494a603b.png",u="/study/assets/image-20210912214202756.46acff6c.png",i="/study/assets/image-20210912214209011.3bd39a1b.png",r="/study/assets/image-20211231170347832.7663e77c.png",k="/study/assets/image-20210913111244558.3bda3309.png",g="/study/assets/image-20210913113956465.a4a70347.png",d="/study/assets/image-20210913114945145.caadaab4.png",m="/study/assets/image-20210913142035391.ed925244.png",q="/study/assets/image-20210913145213669.4a7237d0.png",y="/study/assets/image-20210913145239671.2539ba2f.png",S="/study/assets/image-20210913152221165.0f9ad036.png",v="/study/assets/image-20210913153350204.b3fe36ff.png",h="/study/assets/image-20210913153406267.faccce93.png",b="/study/assets/image-20210913153140997.98e5100b.png";const x={},f=n('

                    MyBatis

                    \u7B2C1\u7AE0 \u6846\u67B6\u6982\u8FF0

                    \u4E09\u5C42\u67B6\u6784

                    1. image-20210910213003041

                    2. \u4E09\u5C42\u5BF9\u5E94\u7684\u5305\uFF1A

                      \u754C\u9762\u5C42\uFF1Acontroller\u5305\uFF08servlet\uFF09

                      \u4E1A\u52A1\u903B\u8F91\u5C42\uFF1Aservice\u5305\uFF08XXXService\u7C7B\uFF09

                      \u6570\u636E\u8BBF\u95EE\u5C42\uFF1Adao\u5305\uFF08XXXDao\u7C7B\uFF09

                      \u6211\u8BA4\u4E3AMVC\u4E2D\u7684V\u5728spring\u8FD9\u4E09\u5C42\u67B6\u6784\u4E0B\uFF0CV\u5DF2\u7ECF\u88AB\u5206\u79BB\u51FA\u53BB\uFF0CC\u4EE3\u8868\u7684\u4E1A\u52A1\u903B\u8F91\u5C42\uFF0C\u5C31\u662Fcontroller+service

                    3. MVC\u4E09\u5C42\u67B6\u6784\uFF0CM\u4EE3\u8868\u6570\u636E\uFF0CV\u4EE3\u8868\u89C6\u56FE\uFF0CC\u4EE3\u8868\u63A7\u5236\uFF0C\u4E5F\u5C31\u662F\u4E1A\u52A1\u903B\u8F91\u5904\u7406\u3002

                      MVC\u4E2D\u7684C\u5C31\u4EE3\u8868\u4E86springboot\u4E2D\u7684controller\u5C42\u548Cservice\u5C42\u3002

                      V\u5C31\u662F\u754C\u9762\u5C42\uFF0CM\u5C31\u662F\u6570\u636E\u8BBF\u95EE\u5C42\uFF0CC\u5C31\u662F\u4E1A\u52A1\u903B\u8F91\u5C42\u3002

                      \u7528\u6237--->\u754C\u9762\u5C42---->\u4E1A\u52A1\u903B\u8F91\u5C42---->\u6570\u636E\u8BBF\u95EE\u5C42---->\u6570\u636E\u5E93

                    4. \u5728springBoot\u4E2D\uFF0C\u4E1A\u52A1\u903B\u8F91\u5C42\u53C8\u5206\u4E3A\u4E86controller\u5C42\u548Cservice\u5C42\uFF0C\u89C6\u56FE\u5C42\u88AB\u62FF\u4E86\u51FA\u53BB\uFF0C\u5B9E\u73B0\u4E86\u524D\u540E\u7AEF\u7684\u5206\u79BB\uFF0C

                      controller\u5C42\u7528\u4E8E\u63A5\u53D7\u8BF7\u6C42\uFF0C\u8C03\u7528service\u5C42\u5904\u7406\u8BF7\u6C42\uFF0C\u8FD4\u56DE\u8BF7\u6C42\uFF0C\u4EE5JSON\u6216XML\u683C\u5F0F\u8FD4\u56DE\u7ED9\u524D\u7AEF\u9875\u9762\u8FDB\u884C\u5904\u7406\u3002\u8FD9\u6D89\u53CA\u5230REST

                      service\u5C42 \u4E13\u5FC3\u5904\u7406\u4E1A\u52A1\u903B\u8F91\uFF0C\u5E76\u8C03\u7528DAO\u5C42

                      \u603B\u7ED3\uFF1A

                      • controller\u5C42----web\u5C42\uFF0C\u6709\u7684\u4E5F\u53EB\u754C\u9762\u5C42\uFF0C\u4F46\u5B9E\u9645\u548Chtml\u3001jsp\u4E0D\u662F\u4E00\u7C7B\uFF0C**\u8FD9\u4E00\u5C42\u505A\u7684\u5C31\u662Fservlet\u505A\u7684\u5DE5\u4F5C\uFF0C\u63A5\u6536\u3001\u5904\u7406\u8BF7\u6C42\uFF0C\u8FD4\u56DE\u8BF7\u6C42\u7684\u7ED3\u679C\u3002**\u5728springboot\u4E2D\uFF0C\u4E0D\u548C\u754C\u9762\u6302\u94A9\uFF0C\u8FD4\u56DExml\u6216json\u683C\u5F0F\u7684\u7ED3\u679C\u7ED9\u524D\u7AEF\u3002------\u5BF9\u5E94\u6846\u67B6\uFF1AspringMVC
                      • service\u5C42---\u4E1A\u52A1\u903B\u8F91\u5C42\uFF0C\u4E13\u5FC3\u5904\u7406\u4E1A\u52A1\u903B\u8F91------\u5BF9\u5E94\u6846\u67B6\uFF1Aspring
                      • DAO\u5C42---\u6301\u4E45\u5C42\uFF0C\u548C\u6570\u636E\u5E93\u6253\u4EA4\u9053------\u5BF9\u5E94\u6846\u67B6\uFF1Amybatis
                    5. \u6839\u636E\u7B2C\u4E8C\u70B9\uFF1A

                      controller\u5C42 \u5BF9\u5E94 spring MVC : \u63A5\u6536\u8BF7\u6C42\uFF0C\u54CD\u5E94\u5904\u7406\u7ED3\u679C

                      service\u5C42 \u5BF9\u5E94 spring \uFF1A \u5904\u7406\u4E1A\u52A1\uFF0C\u8FD4\u56DE\u5904\u7406\u7ED3\u679C\u7ED9controller\u5C42

                      DAO\u5C42 \u5BF9\u5E94 mybatis

                    \u6846\u67B6\u5B9A\u4E49

                    1. \u6846\u67B6\u4E2D\u5B9A\u4E49\u597D\u4E86\u4E00\u4E9B\u529F\u80FD\u3001\u7EC4\u4EF6\uFF0C\u8FD9\u4E9B\u529F\u80FD\u3001\u7EC4\u4EF6\u662F\u53EF\u7528\u7684\uFF0C

                      \u81EA\u5DF1\u5199\u7684\u9879\u76EE\u4E2D\u7684\u529F\u80FD\uFF0C\u53EF\u4EE5\u5229\u7528\u6846\u67B6\u4E2D\u5DF2\u6709\u7684\u529F\u80FD

                      \u6846\u67B6\u662F\u4E00\u4E2A\u534A\u6210\u54C1\u7684\u8F6F\u4EF6\uFF0C\u5B9A\u4E49\u597D\u4E86\u4E00\u4E9B\u57FA\u7840\u529F\u80FD\uFF0C\u9700\u8981\u52A0\u5165\u81EA\u5DF1\u7684\u529F\u80FD\u624D\u662F\u5B8C\u6574\u7684\u3002

                      \u8FD9\u4E9B\u57FA\u7840\u529F\u80FD\u662F\u53EF\u91CD\u590D\u4F7F\u7528\u7684\uFF0C\u53EF\u5347\u7EA7\u7684\u3002

                      \u6846\u67B6\u662F\u4E00\u4E2A\u63D0\u4F9B\u597D\u4E86\u57FA\u7840\u529F\u80FD\u7684\u5E73\u53F0

                    2. \u6846\u67B6\u662F\u6574\u4E2A\u6216\u90E8\u5206\u7CFB\u7EDF\u7684\u53EF\u91CD\u7528\u8BBE\u8BA1

                      \u662F\u5B89\u5168\u7684\u3001\u53EF\u590D\u7528\u7684\u3001\u4E0D\u65AD\u5347\u7EA7\u7684\u8F6F\u4EF6\u3002\u662F\u5199\u597D\u4E00\u90E8\u5206\u529F\u80FD\u3001\u7EC4\u4EF6\u7684\u8F6F\u4EF6\uFF0C\u8FD9\u4E9B\u529F\u80FD\u3001\u7EC4\u4EF6\u4F9B\u6211\u4EEC\u5F00\u53D1\u51FA\u5B8C\u6574\u7684\u4EA7\u54C1\u3002

                    3. \u6846\u67B6\u7279\u70B9\uFF1A

                      • \u6846\u67B6\u4E00\u822C\u4E0D\u662F\u5168\u80FD\u7684\uFF0C\u4E0D\u80FD\u505A\u6240\u6709\u4E8B\u60C5
                      • \u6846\u67B6\u662F\u9488\u5BF9\u67D0\u4E00\u4E2A\u9886\u57DF\u6709\u6548\uFF0C\u7279\u957F\u5728\u67D0\u4E00\u4E2A\u65B9\u9762\uFF0C\u6BD4\u5982mybatis\uFF0C\u505A\u6570\u636E\u5E93\u64CD\u4F5C\u5F3A\u3002

                    \u4F7F\u7528JDBC\u7684\u7F3A\u9677

                    1. \u4EE3\u7801\u6BD4\u8F83\u591A\uFF0C\u5F00\u53D1\u6548\u7387\u4F4E
                    2. \u9700\u8981\u5173\u6CE8Connection\u3001Statement\u3001ResultSet\u5BF9\u8C61\u521B\u5EFA\u548C\u9500\u6BC1
                    3. \u5BF9ResultSet\u67E5\u8BE2\u7684\u7ED3\u679C\uFF0C\u9700\u8981\u81EA\u5DF1\u5C01\u88C5\u4E3AList
                    4. \u91CD\u590D\u7684\u4EE3\u7801\u6BD4\u8F83\u591A\u4E9B\u3002
                    5. \u4E1A\u52A1\u4EE3\u7801\u548C\u6570\u636E\u5E93\u7684\u64CD\u4F5C\u6DF7\u6742\u5728\u4E00\u8D77\u3002

                    Mybatis\u6846\u67B6\u6982\u8FF0

                    1. Mybatis\u662F\u4E00\u4E2A\u6846\u67B6\uFF0C\u7528\u4E8EDAO\u5C42\uFF0C\u63D0\u4F9B\u4E86\u8BBF\u95EE\u6570\u636E\u5E93\u7684\u57FA\u672C\u529F\u80FD\uFF0C\u6539\u8FDB\u4E86JDBC\u7684\u7F3A\u70B9

                    2. \u89E3\u51B3\u7684\u4E3B\u8981\u95EE\u9898\uFF1A

                      \u51CF\u8F7BJDBC\u7684\u590D\u6742\u6027\uFF0C\u4E0D\u7528\u91CD\u590D\u7684\u521B\u5EFAconnection\uFF0C\u5173\u95EDconnection\uFF08\u5373\u4F7F\u6211\u4EEC\u5DF2\u7ECF\u628A\u521B\u5EFAconnection\u548C\u5173\u95EDconnection\u5C01\u88C5\u5230\u4E86\u4E13\u95E8\u7684\u5DE5\u5177\u7C7B\u91CC\uFF09\uFF0C\u4E0D\u7528\u91CD\u590D\u7F16\u5199statement\uFF0C\u4E0D\u7528\u8003\u8651\u8D44\u6E90\u4EE3\u7801\u7684\u5173\u95ED

                      \u76EE\u7684\uFF1A\u8BA9\u5F00\u53D1\u8005\u4E13\u5FC3SQL\u7684\u5904\u7406\uFF0C\u5176\u4ED6\u8FD9\u4E9B\u5173\u4E8E\u6570\u636E\u5E93\u7684\u64CD\u4F5C\uFF0C\u7531Mybatis\u4EE3\u52B3

                      \u5728JDBC\u4E2D\uFF0C\u867D\u7136\u6211\u4EEC\u521B\u5EFA\u4E86\u5DE5\u5177\u7C7B\uFF0C\u4F46\u662F\u8FD8\u662F\u8981\u4E0D\u65AD\u8C03\u7528\u521B\u5EFAconnection\u7684\u65B9\u6CD5\uFF0C\u5728BaseDAO\u62BD\u8C61\u7C7B\u63D0\u4F9B\u7684\u65B9\u6CD5\u91CC\uFF0C\u867D\u7136connection\u662F\u4F20\u5165\u7684\uFF0C\u4F46\u662F\u6BCF\u6B21\u90FD\u8981\u5173\u95ED\u8D44\u6E90

                    3. Mybatis \u662FSQL Mapper Framework for Java \u5373 sql\u6620\u5C04\u6846\u67B6

                      • SQL mapper \uFF1A SQL\u6620\u5C04\uFF1A

                        \u662F\u8BF4\u6211\u4EEC\u53EF\u4EE5\u628A\u6570\u636E\u5E93\u4E2D\u8868\u4E2D\u7684\u4E00\u884C\u6570\u636E\u6620\u5C04\u4E3A\u4E00\u4E2AJava\u7C7B\u7684\u5B9E\u4F8B\u5316\u5BF9\u8C61\uFF08\u4E00\u884C\u6570\u636E\u662F\u5177\u4F53\u7684\uFF0C\u6240\u4EE5\u662F\u5B9E\u4F8B\u5316\u5BF9\u8C61\uFF09

                        \u6570\u636E\u5E93\u4E2D\u7684\u4E00\u4E2A\u8868\u5BF9\u5E94\u4E8E\u4E00\u4E2AJava\u7C7B

                        \u8FD9\u662FORM\u601D\u60F3\uFF0C\u5BF9\u8C61\u5173\u7CFB\u6620\u5C04\u601D\u60F3\u3002

                      • Data Access Objects\uFF1A

                        \u6570\u636E\u8BBF\u95EE\uFF0C\u5373\u5BF9\u6570\u636E\u5E93\u6267\u884C\u589E\u5220\u6539\u67E5\u64CD\u4F5C\u3002

                    4. mybatis\u63D0\u4F9B\u4E86\u54EA\u4E9B\u529F\u80FD

                      • \u63D0\u4F9B\u4E86\u521B\u5EFAconnection\u3001statement\u3001ResultSet\u7684\u80FD\u529B\uFF0C\u4E0D\u7528\u5F00\u53D1\u4EBA\u5458\u521B\u5EFA\u4E86
                      • \u63D0\u4F9B\u4E86\u6267\u884CSQL\u8BED\u53E5\u7684\u80FD\u529B\uFF08\u4E4B\u524DJDBC\u901A\u8FC7QueryRunner\u6267\u884C\uFF09\uFF0C\u4E0D\u7528\u5F00\u53D1\u4EBA\u5458\u6267\u884Csql
                      • \u63D0\u4F9B\u4E86\u5FAA\u73AFSQL\uFF0C\u628ASQL\u7684\u7ED3\u679C\u8F6C\u4E3AJava\u5BF9\u8C61\uFF0CList\u96C6\u5408\u7684\u80FD\u529B
                      • \u63D0\u4F9B\u4E86\u5173\u95ED\u8D44\u6E90\u7684\u80FD\u529B\uFF0C\u4E0D\u7528\u5F00\u53D1\u4EBA\u5458\u5173\u95EDConnection\u3001Statement\u7B49\u3002

                      \u5F00\u53D1\u4EBA\u5458\u505A\u7684\u662F\uFF1A\u63D0\u4F9BSQL\u8BED\u53E5

                      \u5F00\u53D1\u4EBA\u5458\u63D0\u4F9Bsql\u8BED\u53E5---mybatis\u5904\u7406sql----\u5F00\u53D1\u4EBA\u5458\u5F97\u5230List\u96C6\u5408\u6216Java\u5BF9\u8C61\uFF08\u8868\u4E2D\u7684\u6570\u636E\u6620\u5C04\u5230Java\u5C42\u9762\uFF09

                      \u4E5F\u5C31\u662F\u5BF9\u6570\u636E\u5E93\u7684\u64CD\u4F5C\uFF0C\u4EA4\u7ED9Mybatis\u6267\u884C\uFF0C\u5F00\u53D1\u4EBA\u5458\u53EA\u63D0\u4F9BSQL\uFF0C\u4E13\u6CE8\u4E8E\u4E1A\u52A1\u7684\u5904\u7406.\u548C\u6570\u636E\u5E93\u6253\u4EA4\u9053\u7684\u4E00\u4E9B\u6D41\u6C34\u7EBF\u5DE5\u4F5C,\u4EA4\u7ED9mybatis\u5904\u7406

                    5. mybatis\u662F\u4E00\u4E2ASQL\u6620\u5C04\u6846\u67B6\uFF0C\u63D0\u4F9B\u7684\u6570\u636E\u5E93\u7684\u64CD\u4F5C\u80FD\u529B\uFF0C\u662F\u589E\u5F3A\u7684JDBC

                    \u7B2C2\u7AE0 MyBatis\u5FEB\u901F\u5165\u95E8

                    MyBatis\u5165\u95E8\u4F8B\u5B50

                    \u5B9E\u73B0\u6B65\u9AA4

                    1. \u65B0\u5EFA\u6570\u636E\u5E93

                    2. \u65B0\u5EFA\u8868

                    3. \u521B\u5EFAmaven\u9879\u76EE

                    4. \u6DFB\u52A0mybatis\u4F9D\u8D56\uFF0C\u6DFB\u52A0MYSQL\u9A71\u52A8connector\u4F9D\u8D56

                    5. \u521B\u5EFA\u5B9E\u4F53\u7C7B\uFF08Java Bean\uFF09\uFF0C\u5BF9\u5E94\u4E8Emysql\u4E2D\u4E00\u4E2A\u8868\uFF0C\u8868\u4E2D\u4E00\u884C\u6570\u636E\u5BF9\u5E94\u4E8EJava\u5C42\u9762\u7684\u4E00\u4E2A\u7C7B\u7684\u5BF9\u8C61\uFF0C\u8FD9\u662FORM\uFF0C\u5BF9\u8C61\u5173\u7CFB\u6620\u5C04\u6A21\u578B

                    6. \u521B\u5EFA\u6301\u4E45\u5C42\u7684DAO\u63A5\u53E3\uFF0C\u5B9A\u4E49\u64CD\u4F5C\u6570\u636E\u5E93\u7684\u65B9\u6CD5\uFF0C\u6B64\u65B9\u6CD5\u540D\u8981\u4F5C\u4E3ASQL\u8BED\u53E5\u6807\u7B7E\u7684ID\uFF0C\u6807\u8BC6\u6240\u8981\u6267\u884C\u7684SQL\u8BED\u53E5\u3002\u800CSQL\u8BED\u53E5\u7684ID\u548C\u63A5\u53E3\u91CC\u7684\u65B9\u6CD5\u540D\u662F\u76F8\u540C\u7684

                      nameSpace + \u201C.\u201D+\u6B64ID = sqlId

                      nameSpace\u4E3A\u63A5\u53E3\u7684\u5168\u9650\u5B9A\u540D\u3002

                    7. \u521B\u5EFAsql\u6620\u5C04\u6587\u4EF6(\u4E5F\u53EBmapper\u6587\u4EF6)

                      sql\u6620\u5C04\u6587\u4EF6\uFF1A\u5199sql\u8BED\u53E5\u7684\uFF0C\u4E00\u822C\u4E00\u4E2A\u8868\uFF08\u5BF9\u5E94\u4E00\u4E2A\u7C7B\uFF09\u5BF9\u5E94\u4E00\u4E2Asql\u6620\u5C04\u6587\u4EF6

                      \u8FD9\u4E2A\u6587\u4EF6\u662Fxml\u6587\u4EF6\uFF0C\u5199\u5728\u63A5\u53E3\u6240\u5728\u7684\u76EE\u5F55\u4E2D\uFF0C\u8FD9\u4E2A\u6587\u4EF6\u7684\u540D\u79F0\u548C\u63A5\u53E3\u4FDD\u6301\u4E00\u81F4

                    8. \u521B\u5EFAmybatis\u4E3B\u914D\u7F6E\u6587\u4EF6\uFF1A

                      \u4E00\u4E2A\u9879\u76EE\u5C31\u4E00\u4E2A\u4E3B\u914D\u7F6E\u6587\u4EF6

                      \u4E3B\u914D\u7F6E\u6587\u4EF6\u63D0\u4F9B\u4E86

                      • \u6570\u636E\u5E93\u7684\u8FDE\u63A5\u4FE1\u606F\uFF08\u73AF\u5883\u4FE1\u606F\uFF0C\u5373\u4E3B\u914D\u7F6E\u6587\u4EF6\u4E2D\u7684environment\uFF09\uFF0C\u9664\u4E86\u8FDE\u63A5\u4FE1\u606F\uFF0C\u8FD8\u6709\u4E8B\u52A1\u4FE1\u606F\uFF0C\u662F\u5426\u4F7F\u7528\u8FDE\u63A5\u6C60\u7B49\u3002

                      • SQL\u6620\u5C04\u6587\u4EF6\u7684\u4F4D\u7F6E\u4FE1\u606F

                        \u53EF\u4EE5\u5199\u591A\u4E2ASQL\u6620\u5C04\u6587\u4EF6

                    9. \u521B\u5EFA\u4F7F\u7528mybatis\u7C7B

                      \u901A\u8FC7mybatis\u8BBF\u95EE\u6570\u636E\u5E93

                      \u4F7F\u7528mybatis\u7684\u5BF9\u8C61SqlSession\uFF0C\u901A\u8FC7\u5B83\u7684\u65B9\u6CD5\u6267\u884Csql\u8BED\u53E5

                    sql\u6620\u5C04\u6587\u4EF6

                    <?xml version="1.0" encoding="UTF-8" ?>
                     <!DOCTYPE mapper
                             PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                             "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
                    diff --git a/assets/RabbitMQ.html.0628df73.js b/assets/RabbitMQ.html.96e35acd.js
                    similarity index 98%
                    rename from assets/RabbitMQ.html.0628df73.js
                    rename to assets/RabbitMQ.html.96e35acd.js
                    index 70f01b92..5b4fe7c3 100644
                    --- a/assets/RabbitMQ.html.0628df73.js
                    +++ b/assets/RabbitMQ.html.96e35acd.js
                    @@ -1 +1 @@
                    -const l={key:"v-1e0ac90e",path:"/java/%E6%B6%88%E6%81%AF%E9%98%9F%E5%88%97/RabbitMQ/RabbitMQ.html",title:"RabbitMQ",lang:"zh-CN",frontmatter:{},excerpt:"",headers:[{level:2,title:"\u4E00\u3001\u6D88\u606F\u961F\u5217",slug:"\u4E00\u3001\u6D88\u606F\u961F\u5217",children:[{level:3,title:"MQ\u7684\u76F8\u5173\u6982\u5FF5",slug:"mq\u7684\u76F8\u5173\u6982\u5FF5",children:[{level:4,title:"1. \u4EC0\u4E48\u662FMQ",slug:"_1-\u4EC0\u4E48\u662Fmq",children:[]},{level:4,title:"2. \u4E3A\u4EC0\u4E48\u8981\u7528MQ",slug:"_2-\u4E3A\u4EC0\u4E48\u8981\u7528mq",children:[]},{level:4,title:"3. MQ\u7684\u5206\u7C7B",slug:"_3-mq\u7684\u5206\u7C7B",children:[]}]},{level:3,title:"RabbitMQ",slug:"rabbitmq-1",children:[{level:4,title:"RabbitMQ\u7684\u6982\u5FF5",slug:"rabbitmq\u7684\u6982\u5FF5",children:[]},{level:4,title:"\u56DB\u5927\u6838\u5FC3\u6982\u5FF5",slug:"\u56DB\u5927\u6838\u5FC3\u6982\u5FF5",children:[]},{level:4,title:"\u540D\u8BCD\u4ECB\u7ECD",slug:"\u540D\u8BCD\u4ECB\u7ECD",children:[]},{level:4,title:"\u5B89\u88C5",slug:"\u5B89\u88C5",children:[]}]}]},{level:2,title:"\u4E8C\u3001\u6838\u5FC3\u90E8\u5206",slug:"\u4E8C\u3001\u6838\u5FC3\u90E8\u5206",children:[{level:3,title:"\u7B80\u5355\u6A21\u5F0F--Hello World",slug:"\u7B80\u5355\u6A21\u5F0F-hello-world",children:[]},{level:3,title:"\u5DE5\u4F5C\u6A21\u5F0F--Work queues",slug:"\u5DE5\u4F5C\u6A21\u5F0F-work-queues",children:[{level:4,title:"\u6982\u8FF0",slug:"\u6982\u8FF0",children:[]},{level:4,title:"DEMO",slug:"demo",children:[]},{level:4,title:"\u6D88\u606F\u5E94\u7B54",slug:"\u6D88\u606F\u5E94\u7B54",children:[]},{level:4,title:"RabbitMQ\u6301\u4E45\u5316",slug:"rabbitmq\u6301\u4E45\u5316",children:[]}]},{level:3,title:"\u53D1\u5E03/\u8BA2\u9605\u6A21\u5F0F--Publish/Subscribe",slug:"\u53D1\u5E03-\u8BA2\u9605\u6A21\u5F0F-publish-subscribe",children:[{level:4,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-1",children:[]},{level:4,title:"\u53D1\u5E03\u8BA2\u9605\u6A21\u5F0F\u4EE3\u7801\u793A\u4F8B",slug:"\u53D1\u5E03\u8BA2\u9605\u6A21\u5F0F\u4EE3\u7801\u793A\u4F8B",children:[]}]},{level:3,title:"\u8DEF\u7531\u6A21\u5F0F--Routing",slug:"\u8DEF\u7531\u6A21\u5F0F-routing",children:[{level:4,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-2",children:[]},{level:4,title:"\u793A\u4F8B\u4EE3\u7801",slug:"\u793A\u4F8B\u4EE3\u7801",children:[]}]},{level:3,title:"\u4E3B\u9898\u6A21\u5F0F--Topics",slug:"\u4E3B\u9898\u6A21\u5F0F-topics",children:[{level:4,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-3",children:[]}]},{level:3,title:"\u53D1\u5E03\u786E\u8BA4\u6A21\u5F0F--Publisher Confirms",slug:"\u53D1\u5E03\u786E\u8BA4\u6A21\u5F0F-publisher-confirms",children:[{level:4,title:"\u539F\u7406",slug:"\u539F\u7406",children:[]},{level:4,title:"\u53D1\u5E03\u786E\u8BA4\u7684\u7B56\u7565",slug:"\u53D1\u5E03\u786E\u8BA4\u7684\u7B56\u7565",children:[]}]},{level:3,title:"\u4EA4\u6362\u673A",slug:"\u4EA4\u6362\u673A",children:[{level:4,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-4",children:[]}]}]},{level:2,title:"\u4E09\u3001\u9AD8\u7EA7\u90E8\u5206",slug:"\u4E09\u3001\u9AD8\u7EA7\u90E8\u5206",children:[{level:3,title:"1. \u6B7B\u4FE1\u961F\u5217",slug:"_1-\u6B7B\u4FE1\u961F\u5217",children:[{level:4,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-5",children:[]},{level:4,title:"\u4EE3\u7801\u793A\u4F8B",slug:"\u4EE3\u7801\u793A\u4F8B",children:[]}]},{level:3,title:"2. \u5EF6\u65F6\u961F\u5217",slug:"_2-\u5EF6\u65F6\u961F\u5217",children:[{level:4,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-6",children:[]},{level:4,title:"\u6574\u5408springboot",slug:"\u6574\u5408springboot",children:[]},{level:4,title:"\u4EE3\u7801\u5B9E\u73B0\u5EF6\u8FDF\u961F\u5217",slug:"\u4EE3\u7801\u5B9E\u73B0\u5EF6\u8FDF\u961F\u5217",children:[]},{level:4,title:"\u5EF6\u65F6\u961F\u5217\u7684\u4F18\u5316",slug:"\u5EF6\u65F6\u961F\u5217\u7684\u4F18\u5316",children:[]},{level:4,title:"\u57FA\u4E8E\u63D2\u4EF6\u7684\u5EF6\u65F6\u961F\u5217",slug:"\u57FA\u4E8E\u63D2\u4EF6\u7684\u5EF6\u65F6\u961F\u5217",children:[]}]},{level:3,title:"3. \u53D1\u5E03\u786E\u8BA4\u9AD8\u7EA7",slug:"_3-\u53D1\u5E03\u786E\u8BA4\u9AD8\u7EA7",children:[{level:4,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-7",children:[]},{level:4,title:"3.1 \u53D1\u5E03\u786E\u8BA4",slug:"_3-1-\u53D1\u5E03\u786E\u8BA4",children:[]},{level:4,title:"3.2 \u56DE\u9000\u6D88\u606F",slug:"_3-2-\u56DE\u9000\u6D88\u606F",children:[]},{level:4,title:"3.3 \u5907\u4EFD\u4EA4\u6362\u673A",slug:"_3-3-\u5907\u4EFD\u4EA4\u6362\u673A",children:[]}]},{level:3,title:"4. \u5E42\u7B49\u6027",slug:"_4-\u5E42\u7B49\u6027",children:[]},{level:3,title:"5. \u4F18\u5148\u7EA7\u961F\u5217",slug:"_5-\u4F18\u5148\u7EA7\u961F\u5217",children:[]},{level:3,title:"6. \u60F0\u6027\u961F\u5217",slug:"_6-\u60F0\u6027\u961F\u5217",children:[]}]},{level:2,title:"\u56DB\u3001\u96C6\u7FA4\u90E8\u5206",slug:"\u56DB\u3001\u96C6\u7FA4\u90E8\u5206",children:[]}],git:{updatedTime:1710173765e3,contributors:[{name:"shailene",email:"64005626+shaileneF@users.noreply.github.com",commits:1}]},filePathRelative:"java/\u6D88\u606F\u961F\u5217/RabbitMQ/RabbitMQ.md"};export{l as data};
                    +const l={key:"v-1e0ac90e",path:"/java/%E6%B6%88%E6%81%AF%E9%98%9F%E5%88%97/RabbitMQ/RabbitMQ.html",title:"RabbitMQ",lang:"zh-CN",frontmatter:{},excerpt:"",headers:[{level:2,title:"\u4E00\u3001\u6D88\u606F\u961F\u5217",slug:"\u4E00\u3001\u6D88\u606F\u961F\u5217",children:[{level:3,title:"MQ\u7684\u76F8\u5173\u6982\u5FF5",slug:"mq\u7684\u76F8\u5173\u6982\u5FF5",children:[{level:4,title:"1. \u4EC0\u4E48\u662FMQ",slug:"_1-\u4EC0\u4E48\u662Fmq",children:[]},{level:4,title:"2. \u4E3A\u4EC0\u4E48\u8981\u7528MQ",slug:"_2-\u4E3A\u4EC0\u4E48\u8981\u7528mq",children:[]},{level:4,title:"3. MQ\u7684\u5206\u7C7B",slug:"_3-mq\u7684\u5206\u7C7B",children:[]}]},{level:3,title:"RabbitMQ",slug:"rabbitmq-1",children:[{level:4,title:"RabbitMQ\u7684\u6982\u5FF5",slug:"rabbitmq\u7684\u6982\u5FF5",children:[]},{level:4,title:"\u56DB\u5927\u6838\u5FC3\u6982\u5FF5",slug:"\u56DB\u5927\u6838\u5FC3\u6982\u5FF5",children:[]},{level:4,title:"\u540D\u8BCD\u4ECB\u7ECD",slug:"\u540D\u8BCD\u4ECB\u7ECD",children:[]},{level:4,title:"\u5B89\u88C5",slug:"\u5B89\u88C5",children:[]}]}]},{level:2,title:"\u4E8C\u3001\u6838\u5FC3\u90E8\u5206",slug:"\u4E8C\u3001\u6838\u5FC3\u90E8\u5206",children:[{level:3,title:"\u7B80\u5355\u6A21\u5F0F--Hello World",slug:"\u7B80\u5355\u6A21\u5F0F-hello-world",children:[]},{level:3,title:"\u5DE5\u4F5C\u6A21\u5F0F--Work queues",slug:"\u5DE5\u4F5C\u6A21\u5F0F-work-queues",children:[{level:4,title:"\u6982\u8FF0",slug:"\u6982\u8FF0",children:[]},{level:4,title:"DEMO",slug:"demo",children:[]},{level:4,title:"\u6D88\u606F\u5E94\u7B54",slug:"\u6D88\u606F\u5E94\u7B54",children:[]},{level:4,title:"RabbitMQ\u6301\u4E45\u5316",slug:"rabbitmq\u6301\u4E45\u5316",children:[]}]},{level:3,title:"\u53D1\u5E03/\u8BA2\u9605\u6A21\u5F0F--Publish/Subscribe",slug:"\u53D1\u5E03-\u8BA2\u9605\u6A21\u5F0F-publish-subscribe",children:[{level:4,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-1",children:[]},{level:4,title:"\u53D1\u5E03\u8BA2\u9605\u6A21\u5F0F\u4EE3\u7801\u793A\u4F8B",slug:"\u53D1\u5E03\u8BA2\u9605\u6A21\u5F0F\u4EE3\u7801\u793A\u4F8B",children:[]}]},{level:3,title:"\u8DEF\u7531\u6A21\u5F0F--Routing",slug:"\u8DEF\u7531\u6A21\u5F0F-routing",children:[{level:4,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-2",children:[]},{level:4,title:"\u793A\u4F8B\u4EE3\u7801",slug:"\u793A\u4F8B\u4EE3\u7801",children:[]}]},{level:3,title:"\u4E3B\u9898\u6A21\u5F0F--Topics",slug:"\u4E3B\u9898\u6A21\u5F0F-topics",children:[{level:4,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-3",children:[]}]},{level:3,title:"\u53D1\u5E03\u786E\u8BA4\u6A21\u5F0F--Publisher Confirms",slug:"\u53D1\u5E03\u786E\u8BA4\u6A21\u5F0F-publisher-confirms",children:[{level:4,title:"\u539F\u7406",slug:"\u539F\u7406",children:[]},{level:4,title:"\u53D1\u5E03\u786E\u8BA4\u7684\u7B56\u7565",slug:"\u53D1\u5E03\u786E\u8BA4\u7684\u7B56\u7565",children:[]}]},{level:3,title:"\u4EA4\u6362\u673A",slug:"\u4EA4\u6362\u673A",children:[{level:4,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-4",children:[]}]}]},{level:2,title:"\u4E09\u3001\u9AD8\u7EA7\u90E8\u5206",slug:"\u4E09\u3001\u9AD8\u7EA7\u90E8\u5206",children:[{level:3,title:"1. \u6B7B\u4FE1\u961F\u5217",slug:"_1-\u6B7B\u4FE1\u961F\u5217",children:[{level:4,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-5",children:[]},{level:4,title:"\u4EE3\u7801\u793A\u4F8B",slug:"\u4EE3\u7801\u793A\u4F8B",children:[]}]},{level:3,title:"2. \u5EF6\u65F6\u961F\u5217",slug:"_2-\u5EF6\u65F6\u961F\u5217",children:[{level:4,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-6",children:[]},{level:4,title:"\u6574\u5408springboot",slug:"\u6574\u5408springboot",children:[]},{level:4,title:"\u4EE3\u7801\u5B9E\u73B0\u5EF6\u8FDF\u961F\u5217",slug:"\u4EE3\u7801\u5B9E\u73B0\u5EF6\u8FDF\u961F\u5217",children:[]},{level:4,title:"\u5EF6\u65F6\u961F\u5217\u7684\u4F18\u5316",slug:"\u5EF6\u65F6\u961F\u5217\u7684\u4F18\u5316",children:[]},{level:4,title:"\u57FA\u4E8E\u63D2\u4EF6\u7684\u5EF6\u65F6\u961F\u5217",slug:"\u57FA\u4E8E\u63D2\u4EF6\u7684\u5EF6\u65F6\u961F\u5217",children:[]}]},{level:3,title:"3. \u53D1\u5E03\u786E\u8BA4\u9AD8\u7EA7",slug:"_3-\u53D1\u5E03\u786E\u8BA4\u9AD8\u7EA7",children:[{level:4,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-7",children:[]},{level:4,title:"3.1 \u53D1\u5E03\u786E\u8BA4",slug:"_3-1-\u53D1\u5E03\u786E\u8BA4",children:[]},{level:4,title:"3.2 \u56DE\u9000\u6D88\u606F",slug:"_3-2-\u56DE\u9000\u6D88\u606F",children:[]},{level:4,title:"3.3 \u5907\u4EFD\u4EA4\u6362\u673A",slug:"_3-3-\u5907\u4EFD\u4EA4\u6362\u673A",children:[]}]},{level:3,title:"4. \u5E42\u7B49\u6027",slug:"_4-\u5E42\u7B49\u6027",children:[]},{level:3,title:"5. \u4F18\u5148\u7EA7\u961F\u5217",slug:"_5-\u4F18\u5148\u7EA7\u961F\u5217",children:[]},{level:3,title:"6. \u60F0\u6027\u961F\u5217",slug:"_6-\u60F0\u6027\u961F\u5217",children:[]}]},{level:2,title:"\u56DB\u3001\u96C6\u7FA4\u90E8\u5206",slug:"\u56DB\u3001\u96C6\u7FA4\u90E8\u5206",children:[]}],git:{updatedTime:1710173784e3,contributors:[{name:"shailene",email:"64005626+shaileneF@users.noreply.github.com",commits:1}]},filePathRelative:"java/\u6D88\u606F\u961F\u5217/RabbitMQ/RabbitMQ.md"};export{l as data};
                    diff --git a/assets/RabbitMQ.html.8b3da301.js b/assets/RabbitMQ.html.b086482d.js
                    similarity index 99%
                    rename from assets/RabbitMQ.html.8b3da301.js
                    rename to assets/RabbitMQ.html.b086482d.js
                    index 5321a4ff..b93aa33f 100644
                    --- a/assets/RabbitMQ.html.8b3da301.js
                    +++ b/assets/RabbitMQ.html.b086482d.js
                    @@ -1,4 +1,4 @@
                    -import{_ as t,r as p,o,c,a as n,b as e,F as l,e as s,d as u}from"./app.0d029894.js";var i="/study/assets/image-20220414184339337.3b1752fd.png",k="/study/assets/image-20220414185205763.16256b7f.png",r="/study/assets/image-20220414205022012.ab0f99a4.png",g="/study/assets/watermark,type_d3F5LXplbmhlaQ,shadow_50,text_Q1NETiBA4pie57K-4peI5b2p4peI54y_4peI56yU4peI6K6w4pic,size_20,color_FFFFFF,t_70,g_se,x_16.7a3efe5c.png",d="/study/assets/watermark,type_d3F5LXplbmhlaQ,shadow_50,text_Q1NETiBA4pie57K-4peI5b2p4peI54y_4peI56yU4peI6K6w4pic,size_20,color_FFFFFF,t_70,g_se,x_16-16499492641123.bf4887f1.png",m="/study/assets/watermark,type_d3F5LXplbmhlaQ,shadow_50,text_Q1NETiBA4pie57K-4peI5b2p4peI54y_4peI56yU4peI6K6w4pic,size_15,color_FFFFFF,t_70,g_se,x_16.87eb8ca7.png",b="/study/assets/watermark,type_d3F5LXplbmhlaQ,shadow_50,text_Q1NETiBA4pie57K-4peI5b2p4peI54y_4peI56yU4peI6K6w4pic,size_20,color_FFFFFF,t_70,g_se,x_16-16499494474448.ec8fc500.png",y="/study/assets/image-20220415175304337.3ecc40a6.png",h="/study/assets/image-20220415192200596.4b8d5b7a.png",f="/study/assets/image-20220420145350578.b88775fe.png",q="/study/assets/image-20220420145534095.1d94ef40.png",w="/study/assets/image-20220419220324676.b9ee2c4a.png",v="/study/assets/image-20220420161731182.d9a44df9.png",E="/study/assets/image-20220420203017170.bb685a80.png",x="/study/assets/image-20220420230833638.87699eb8.png",C="/study/assets/image-20220420230846071.30d53285.png",_="/study/assets/image-20220421195852600.d1dcd447.png",S="/study/assets/image-20220421200956783.30a1cab3.png";const M={},T=s('

                    RabbitMQ

                    \u4E00\u3001\u6D88\u606F\u961F\u5217

                    MQ\u7684\u76F8\u5173\u6982\u5FF5

                    1. \u4EC0\u4E48\u662FMQ

                    MQ\uFF08message queue\uFF09\u662F\u6D88\u606F\u961F\u5217\uFF0C\u672C\u8D28\u662F\u4E2A\u961F\u5217\uFF0C\u9075\u5FAAFIFO\u5148\u5165\u5148\u51FA\u539F\u5219\uFF0C\u53EA\u4E0D\u8FC7\u961F\u5217\u4E2D\u5B58\u653E\u7684\u5185\u5BB9\u662Fmessage\u800C\u5DF2\u3002MQ\u662F\u4E00\u79CD\u8DE8\u8FDB\u7A0B\u7684\u901A\u4FE1\u673A\u5236\uFF0C\u7528\u4E8E\u5FAE\u670D\u52A1\u8282\u70B9\u4E4B\u95F4\u7684\u901A\u4FE1\uFF0C\u6240\u4EE5\u5728\u5206\u5E03\u5F0F\u7CFB\u7EDF\u4E2D\u8D77\u7740\u91CD\u8981\u4F5C\u7528\uFF0C\u7528\u4E8E\u4E0A\u4E0B\u6E38\u4F20\u9012\u6D88\u606F\u3002\u5728\u4E92\u8054\u7F51\u67B6\u6784\u4E2D\uFF0CMQ\u662F\u4E00\u79CD\u975E\u5E38\u5E38\u89C1\u7684\u4E0A\u4E0B\u6E38\u201C\u903B\u8F91\u89E3\u8026+\u7269\u7406\u89E3\u8026\u201D\u7684\u6D88\u606F\u901A\u4FE1\u670D\u52A1\u3002\u4F7F\u7528\u4E86MQ\u4E4B\u540E\uFF0C\u5FAE\u670D\u52A1\u4E4B\u95F4\u7684\u6D88\u606F\u4F20\u9012\u53EA\u9700\u8981\u4F9D\u8D56MQ\uFF0C\u4E0D\u9700\u8981\u4F9D\u8D56\u5176\u4ED6\u670D\u52A1\u3002

                    2. \u4E3A\u4EC0\u4E48\u8981\u7528MQ

                    1. \u6D41\u91CF\u524A\u5CF0

                      \u4E3E\u4F8B\uFF0C\u5982\u679C\u8BA2\u5355\u7CFB\u7EDF\u6700\u591A\u80FD\u5904\u7406\u4E00\u4E07\u6B21\u8BA2\u5355\uFF0C\u8FD9\u4E2A\u5904\u7406\u80FD\u529B\u5E94\u4ED8\u6B63\u5E38\u65F6\u6BB5\u7684\u4E0B\u5355\u7EF0\u7EF0\u6709\u4F59\uFF0C\u6B63\u5E38\u65F6\u6BB5\u6211\u4EEC\u4E0B\u5355\u4E00\u79D2\u540E\u5C31\u80FD\u8FD4\u56DE\u7ED3\u679C\uFF0C\u4F46\u662F\u5728\u9AD8\u5CF0\u671F\uFF0C\u5982\u679C\u6709\u4E24\u4E07\u6B21\u4E0B\u5355\u64CD\u4F5C\u7CFB\u7EDF\u662F\u5904\u7406\u4E0D\u4E86\u7684\uFF0C\u53EA\u80FD\u9650\u5236\u8BA2\u5355\u8D85\u8FC7\u4E00\u4E07\u540E\u4E0D\u5141\u8BB8\u7528\u6237\u4E0B\u5355\u3002\u8FD9\u79CD\u60C5\u51B5\uFF0C\u4F7F\u7528\u6D88\u606F\u961F\u5217\u505A\u7F13\u51B2\uFF0C\u628A\u4E00\u79D2\u5185\u4E0B\u7684\u8BA2\u5355\u5206\u6563\u6210\u4E00\u6BB5\u65F6\u95F4\u6765\u5904\u7406\uFF0C\u5141\u8BB8\u7528\u6237\u4E0B\u5355\uFF0C\u5C06\u7528\u6237\u7684\u8BA2\u5355\u4FE1\u606F\uFF08\u8BA2\u5355\u8BF7\u6C42\uFF09\u901A\u8FC7\u6D88\u606F\u961F\u5217\u8FDB\u884C\u6392\u961F\u3002\u8FD9\u65F6\u6709\u4E9B\u7528\u6237\u53EF\u80FD\u5728\u4E0B\u5355\u5341\u51E0\u79D2\u540E\u624D\u80FD\u6536\u5230\u4E0B\u5355\u6210\u529F\u7684\u64CD\u4F5C\uFF0C\u4F46\u662F\u6BD4\u4E0D\u80FD\u4E0B\u5355\u7684\u4F53\u9A8C\u8981\u597D\u3002

                    2. \u5E94\u7528\u89E3\u8026

                      \u4EE5\u7535\u5546\u5E94\u7528\u4E3A\u4F8B\uFF0C\u5E94\u7528\u4E2D\u6709\u8BA2\u5355\u7CFB\u7EDF\u3001\u5E93\u5B58\u7CFB\u7EDF\u3001\u7269\u6D41\u7CFB\u7EDF\u3001\u652F\u4ED8\u7CFB\u7EDF\u3002\u7528\u6237\u521B\u5EFA\u8BA2\u5355\u540E\uFF0C\u5982\u679C\u8026\u5408\u8C03\u7528\u5E93\u5B58\u7CFB\u7EDF\u3001\u7269\u6D41\u7CFB\u7EDF\u3001\u652F\u4ED8\u7CFB\u7EDF\uFF0C\u4EFB\u4F55\u4E00\u4E2A\u5B50\u7CFB\u7EDF\u51FA\u4E86\u6545\u969C\uFF0C\u90FD\u4F1A\u9020\u6210\u4E0B\u5355\u64CD\u4F5C\u5F02\u5E38\u3002\u5F53\u8F6C\u53D8\u6210\u57FA\u4E8E\u6D88\u606F\u961F\u5217\u7684\u65B9\u5F0F\u540E\uFF0C\u7CFB\u7EDF\u95F4\u8C03\u7528\u7684\u95EE\u9898\u4F1A\u51CF\u5C11\u5F88\u591A\uFF0C\u6BD4\u5982\u7269\u6D41\u7CFB\u7EDF\u56E0\u4E3A\u53D1\u751F\u6545\u969C\uFF0C\u9700\u8981\u51E0\u5206\u949F\u6765\u4FEE\u590D\uFF0C\u5728\u8FD9\u51E0\u5206\u949F\u7684\u65F6\u95F4\u91CC\uFF0C\u7269\u6D41\u7CFB\u7EDF\u8981\u5904\u7406\u7684\u8BA2\u5355\u4FE1\u606F\u88AB\u7F13\u5B58\u5728\u6D88\u606F\u961F\u5217\u4E2D\uFF0C\u7528\u6237\u7684\u4E0B\u5355\u64CD\u4F5C\u53EF\u4EE5\u6B63\u5E38\u5B8C\u6210\uFF0C\u5F53\u7269\u6D41\u7CFB\u7EDF\u6062\u590D\u540E\uFF0C\u7EE7\u7EED\u5904\u7406\u8BA2\u5355\u4FE1\u606F\u5373\u53EF\u3002\u7528\u6237\u611F\u53D7\u4E0D\u5230\u7269\u6D41\u7CFB\u7EDF\u7684\u6545\u969C\uFF0C\u63D0\u5347\u4E86\u7CFB\u7EDF\u7684\u53EF\u7528\u6027\u3002

                      image-20220414184339337

                    3. \u5F02\u6B65\u5904\u7406

                      \u670D\u52A1\u95F4\u8C03\u7528\u662F\u5F02\u6B65\u7684\uFF08\u4E00\u4E2A\u5FAE\u670D\u52A1\u5728\u5206\u5E03\u5F0F\u7CFB\u7EDF\u4E2D\u65E2\u53EF\u4EE5\u662F\u63D0\u4F9B\u8005\uFF0C\u4E5F\u53EF\u4EE5\u662F\u6D88\u8D39\u8005\u6216\u8005\u8BF4\u8C03\u7528\u8005\uFF09\uFF0C\u4F8B\u5982A\u8C03\u7528B\uFF0CB\u9700\u8981\u82B1\u8D39\u5F88\u957F\u65F6\u95F4\u6267\u884C\uFF0CA\u9700\u8981\u77E5\u9053B\u4EC0\u4E48\u65F6\u5019\u6267\u884C\u5B8C\u3002\u4F7F\u7528\u6D88\u606F\u603B\u7EBF\uFF0C\u53EF\u4EE5\u5F88\u65B9\u4FBF\u5730\u89E3\u51B3\u8FD9\u4E2A\u95EE\u9898\uFF0CA\u8C03\u7528B\u670D\u52A1\u540E\uFF0C\u53EA\u9700\u8981\u76D1\u542CB\u5904\u7406\u5B8C\u6210\u7684\u6D88\u606F\uFF0C\u5F53B\u5904\u7406\u5B8C\u6210\u540E\uFF0C\u4F1A\u53D1\u9001\u6D88\u606F\u7ED9MQ\uFF0CA\u670D\u52A1\u4F1A\u901A\u8FC7MQ\u83B7\u53D6\u5230B\u5DF2\u7ECF\u6267\u884C\u5B8C\u4E1A\u52A1\u7684\u6D88\u606F\u3002\u901A\u8FC7\u6D88\u606F\u961F\u5217\uFF0CA\u670D\u52A1\u80FD\u53CA\u65F6\u5730\u5F97\u5230\u5F02\u6B65\u5904\u7406\u6210\u529F\u7684\u6D88\u606F\u3002

                      image-20220414185205763

                    3. MQ\u7684\u5206\u7C7B

                    \u7B80\u8981\u4ECB\u7ECD\uFF0C\u5177\u4F53\u77E5\u8BC6\u9700\u5355\u72EC\u5B66\u4E60\u3001\u67E5\u9605\u3002

                    1. ActiveMQ

                      \u4F18\u70B9\uFF1A\u5355\u673A\u541E\u5410\u91CF\u4E07\u7EA7\uFF0C\u65F6\u6548\u6027ms\u7EA7\uFF0C\u53EF\u7528\u6027\u9AD8\u3002

                    2. kafka

                      \u4F18\u70B9\uFF1A\u6027\u80FD\u9AD8\uFF0C\u541E\u5410\u91CF\u9AD8\uFF0C\u5206\u5E03\u5F0F\uFF0C\u4E00\u4E2A\u6570\u636E\u591A\u4E2A\u526F\u672C\uFF0C\u5C11\u6570\u673A\u5668\u5B95\u673A\uFF0C\u4E0D\u4F1A\u4E22\u5931\u6570\u636E\u3002\u6D88\u8D39\u8005\u91C7\u7528pull\u65B9\u5F0F\u6D88\u8D39\u6D88\u606F\uFF0C\u6D88\u606F\u6709\u5E8F\uFF0C\u901A\u8FC7\u63A7\u5236\u80FD\u591F\u4FDD\u8BC1\u6240\u6709\u6D88\u606F\u88AB\u6D88\u8D39\u4E14\u53EA\u6D88\u8D39\u4E00\u6B21\u3002\u5728\u65E5\u5FD7\u9886\u57DF\u6BD4\u8F83\u6210\u719F\uFF0C\u88AB\u591A\u5BB6\u516C\u53F8\u548C\u591A\u4E2A\u5F00\u6E90\u9879\u76EE\u4F7F\u7528\u3002\u5728\u5927\u6570\u636E\u9886\u57DF\u7684\u5B9E\u65F6\u8BA1\u7B97\u4EE5\u53CA\u65E5\u5FD7\u91C7\u96C6\u88AB\u5927\u89C4\u6A21\u4F7F\u7528\u3002

                      \u9002\u7528\u4E8E\u4EA7\u751F\u5927\u91CF\u6570\u636E\u7684\u4E92\u8054\u7F51\u670D\u52A1\u7684\u6570\u636E\u6536\u96C6\u4E1A\u52A1\u3002\u5982\u679C\u662F\u5F00\u53D1\u65E5\u5FD7\u91C7\u96C6\u529F\u80FD\uFF0C\u80AF\u5B9A\u9996\u9009kafka\u3002

                    3. RocketMQ

                      \u5929\u751F\u4E3A\u91D1\u878D\u4E92\u8054\u7F51\u9886\u57DF\u800C\u751F\uFF0C\u5BF9\u4E8E\u53EF\u9760\u6027\u8981\u6C42\u5F88\u9AD8\u7684\u573A\u666F\uFF0C\u5C24\u5176\u662F\u7535\u5546\u91CC\u9762\u7684\u8BA2\u5355\u6263\u6B3E\uFF0C\u4EE5\u53CA\u4E1A\u52A1\u524A\u5CF0\u3002

                    4. RabbitMQ

                      \u6027\u80FD\u597D\uFF0C\u65F6\u6548\u6027\u5FAE\u79D2\u7EA7\uFF0C\u793E\u533A\u6D3B\u8DC3\u5EA6\u8F83\u9AD8\uFF0C\u7BA1\u7406\u754C\u9762\u65B9\u4FBF\u3002\u5982\u679C\u6570\u636E\u91CF\u6CA1\u6709\u90A3\u4E48\u5927\uFF0C\u4E2D\u5C0F\u578B\u516C\u53F8\u4F18\u5148\u9009\u62E9\u529F\u80FD\u6BD4\u8F83\u5B8C\u5907\u7684RabbitMQ\u3002

                    RabbitMQ

                    RabbitMQ\u7684\u6982\u5FF5

                    RabbitMQ\u662F\u4E00\u4E2A\u6D88\u606F\u4E2D\u95F4\u4EF6\uFF0C\u8D1F\u8D23\u63A5\u6536\u5E76\u8F6C\u53D1\u6D88\u606F\u3002\u53EF\u4EE5\u628A\u5B83\u5F53\u4F5C\u4E00\u4E2A\u5FEB\u9012\u7AD9\u70B9\uFF0C\u5F53\u4F60\u8981\u53D1\u9001\u4E00\u4E2A\u5305\u88F9\u65F6\uFF0C\u628A\u5305\u88F9\u653E\u5230\u5FEB\u9012\u7AD9\uFF0C\u5FEB\u9012\u5458\u6700\u7EC8\u4F1A\u628A\u5FEB\u9012\u9001\u5230\u6536\u4EF6\u4EBA\u90A3\u91CC\u3002RabbitMQ\u8D1F\u8D23\u63A5\u6536\u3001\u5B58\u50A8\u548C\u8F6C\u53D1\u6D88\u606F\u6570\u636E\u3002

                    \u56DB\u5927\u6838\u5FC3\u6982\u5FF5

                    1. \u751F\u4EA7\u8005

                      \u4EA7\u751F\u6D88\u606F\uFF0C\u53D1\u9001\u6D88\u606F\u7ED9\u6D88\u606F\u961F\u5217\u7684\u7A0B\u5E8F\u3002

                    2. \u4EA4\u6362\u673A

                      \u4E00\u4E2A\u4EA4\u6362\u673A\u53EF\u4EE5\u7ED1\u5B9A\u591A\u4E2A\u961F\u5217\u3002

                      \u4EA4\u6362\u673A\u662FRabbitMQ\u4E2D\u4E00\u4E2A\u975E\u5E38\u91CD\u8981\u7684\u90E8\u4EF6\uFF0C\u4E00\u65B9\u9762\u5B83\u63A5\u6536\u6765\u81EA\u751F\u4EA7\u8005\u7684\u6D88\u606F\uFF0C\u4E00\u65B9\u9762\u5B83\u5C06\u6D88\u606F\u63A8\u9001\u81F3\u961F\u5217\u4E2D\uFF0C\u4EA4\u6362\u673A\u5FC5\u987B\u786E\u5207\u77E5\u9053\u5982\u4F55\u5904\u7406\u5B83\u63A5\u6536\u5230\u7684\u6D88\u606F\uFF0C\u662F\u5C06\u8FD9\u4E9B\u6D88\u606F\u63A8\u9001\u5230\u7279\u5B9A\u961F\u5217\u8FD8\u662F\u63A8\u9001\u5230\u591A\u4E2A\u961F\u5217\uFF0C\u4EA6\u6216\u8005\u662F\u628A\u6D88\u606F\u4E22\u5F03\uFF0C\u8FD9\u4E2A\u5F97\u7531\u4EA4\u6362\u673A\u7C7B\u578B\u51B3\u5B9A\u3002

                    3. \u961F\u5217

                      \u961F\u5217\u662FRabbitMQ\u5185\u90E8\u4F7F\u7528\u7684\u4E00\u79CD\u6570\u636E\u7ED3\u6784\uFF0C\u6D88\u606F\u5B58\u50A8\u5728\u961F\u5217\u4E2D\uFF0C\u961F\u5217\u4EC5\u53D7\u4E3B\u673A\u7684\u5185\u5B58\u548C\u78C1\u76D8\u9650\u5236\u7684\u7EA6\u675F\uFF0C\u672C\u8D28\u4E0A\u662F\u4E00\u4E2A\u5927\u7684\u6D88\u606F\u7F13\u51B2\u533A\u3002\u8BB8\u591A\u751F\u4EA7\u8005\u53EF\u4EE5\u5C06\u6D88\u606F\u53D1\u9001\u5230\u4E00\u4E2A\u961F\u5217\uFF0C\u8BB8\u591A\u6D88\u8D39\u8005\u53EF\u4EE5\u5C1D\u8BD5\u4ECE\u4E00\u4E2A\u961F\u5217\u63A5\u6536\u6570\u636E\uFF0C\u8FD9\u662F\u6211\u4EEC\u4F7F\u7528\u961F\u5217\u7684\u65B9\u5F0F\u3002

                    4. \u6D88\u8D39\u8005

                      \u6D88\u8D39\u4E0E\u63A5\u6536\u5177\u6709\u76F8\u4F3C\u7684\u542B\u4E49\uFF0C\u6D88\u8D39\u8005\u5927\u591A\u65F6\u5019\u662F\u4E00\u4E2A\u7B49\u5F85\u63A5\u6536\u6D88\u606F\u7684\u7A0B\u5E8F\u3002\u8BF7\u6CE8\u610F\u751F\u4EA7\u8005\u3001\u6D88\u8D39\u8005\u548C\u6D88\u606F\u4E2D\u95F4\u4EF6\u5F88\u591A\u65F6\u5019\u5E76\u4E0D\u5728\u540C\u4E00\u673A\u5668\u4E0A\uFF0C\u540C\u4E00\u4E2A\u5E94\u7528\u7A0B\u5E8F\u65E2\u53EF\u4EE5\u662F\u751F\u4EA7\u8005\u4E5F\u53EF\u4EE5\u662F\u6D88\u8D39\u8005\u3002

                    \u540D\u8BCD\u4ECB\u7ECD

                    image-20220414205022012

                    1. Broker\uFF1A\u63A5\u6536\u548C\u5206\u53D1\u6D88\u606F\u7684\u5E94\u7528\u3002

                      \u5305\u542B\u4E24\u90E8\u5206\uFF1A\u4EA4\u6362\u673AExchange\u548C\u961F\u5217Queue

                    2. Connection\uFF1Aproducer\u548Cconsumer\u4E0EBroker\u4E4B\u95F4\u7684TCP\u8FDE\u63A5\u3002

                    3. Channel\uFF1A

                      \u6BCF\u4E00\u4E2A\u751F\u4EA7\u8005\u4E0EMQ\u4E4B\u95F4\u4F1A\u5EFA\u7ACB\u4E00\u4E2A\u8FDE\u63A5Connection\uFF0C\u6BCF\u4E00\u4E2AConnection\u91CC\u4F1A\u6709\u591A\u4E2A\u4FE1\u9053Channel\uFF0C\u4FE1\u9053\u5C31\u662F\u53D1\u9001\u6D88\u606F\u7684\u901A\u9053\u3002

                      \u5982\u679C\u6BCF\u4E00\u6B21\u8BBF\u95EERabbitMQ\u90FD\u5EFA\u7ACB\u4E00\u4E2AConnection\uFF0C\u5728\u6D88\u606F\u91CF\u5927\u7684\u65F6\u5019\u5EFA\u7ACBTCP Connection\u7684\u5F00\u9500\u5C06\u662F\u5DE8\u5927\u7684\uFF0C\u6548\u7387\u4E5F\u8F83\u4F4E\u3002Channel\u662F\u5728connection\u5185\u90E8\u5EFA\u7ACB\u7684\u903B\u8F91\u8FDE\u63A5\uFF0C\u5982\u679C\u5E94\u7528\u7A0B\u5E8F\u652F\u6301\u591A\u7EBF\u7A0B\uFF0C\u901A\u5E38\u6BCF\u4E2A\u7EBF\u7A0B\u521B\u5EFA\u5355\u72EC\u7684channel\u8FDB\u884C\u901A\u8BAF\uFF0Cchannel\u4E4B\u95F4\u662F\u5B8C\u5168\u9694\u79BB\u7684\u3002

                      Channel\u4F5C\u4E3A\u8F7B\u91CF\u7EA7\u7684Connection\u6781\u5927\u51CF\u5C11\u4E86\u64CD\u4F5C\u7CFB\u7EDF\u5EFA\u7ACBTCP connection\u7684\u5F00\u9500\u3002

                      \u53EF\u4EE5\u7406\u89E3\u4E3A\u8FDE\u63A5\u6C60\u3002

                    4. Exchange:

                      message\u5230\u8FBEbroker\u7684\u7B2C\u4E00\u7AD9\uFF0C\u6839\u636E\u5206\u53D1\u89C4\u5219\uFF0C\u5339\u914D\u67E5\u8BE2\u8868\u4E2D\u7684routing key\uFF0C\u5206\u53D1\u6D88\u606F\u5230queue\u4E2D\u53BB\u3002\u5E38\u7528\u7684\u7C7B\u578B\u6709\uFF1Adirect\uFF08point-to-point\uFF09\uFF0Ctopic\uFF08publish-subscribe\uFF09\uFF0Cfanout\uFF08multicast\uFF09

                    5. Queue\uFF1A

                      \u6D88\u606F\u6700\u7EC8\u88AB\u9001\u5230\u8FD9\u91CC\u7B49\u5F85consumer\u53D6\u8D70

                    6. Binding\uFF1A

                      exchange\u548Cqueue\u4E4B\u95F4\u7684\u865A\u62DF\u8FDE\u63A5\uFF0Cbinding\u4E2D\u53EF\u4EE5\u5305\u542Brouting key\uFF0Cbinding\u4FE1\u606F\u88AB\u4FDD\u5B58\u5230exchange\u4E2D\u7684\u67E5\u8BE2\u8868\u4E2D\uFF0C\u7528\u4E8Emessage\u7684\u5206\u53D1\u4F9D\u636E\u3002

                    \u5B89\u88C5

                    ',19),A={href:"https://blog.csdn.net/shishishilove/article/details/122086399",target:"_blank",rel:"noopener noreferrer"},N=u("(30\u6761\u6D88\u606F) Linux\u5B89\u88C5RabbitMQ\u8BE6\u7EC6\u6559\u7A0B_\u261E\u7CBE\u25C8\u5F69\u25C8\u733F\u25C8\u7B14\u25C8\u8BB0\u261C\u7684\u535A\u5BA2-CSDN\u535A\u5BA2_linux\u5B89\u88C5rabbitmq\u6559\u7A0B"),Q=s(`

                    \u4E00\u3001\u73AF\u5883\u51C6\u5907

                    1\u3001RabbitMQ\u7248\u672C \u548C Erlang \u7248\u672C\u517C\u5BB9\u6027\u5173\u7CFB https://www.rabbitmq.com/which-erlang.html 2\u3001\u5B98\u65B9\u5B89\u88C5\u5305\u4E0B\u8F7D\u5730\u5740

                    \u3010erlang\u4E0B\u8F7D\u5730\u5740\u3011\uFF1Ahttps://hub.fastgit.org/rabbitmq/erlang-rpm/releases

                    \u3010socat\u4E0B\u8F7D\u5730\u5740\u3011\uFF1Ahttp://www.rpmfind.net/linux/rpm2html/search.php?query=socat(x86-64)

                    \u3010rabbitmq\u4E0B\u8F7D\u5730\u5740\u3011\uFF1Ahttps://github.com/rabbitmq/rabbitmq-server/releases

                    3\u3001\u5B89\u88C5\u5305\u4E2D\u8BF4\u660E\uFF0C\u8BF7\u4E0B\u8F7D\u5BF9\u5E94\u7684\u5B89\u88C5\u5305 el6\uFF1ACentOS 6.x \u7684\u4E0B\u8F7D el7\uFF1ACentOS 7.x \u7684\u4E0B\u8F7D el8\uFF1ACentOS 8.x \u7684\u4E0B\u8F7D

                    \u4E8C\u3001\u5B89\u88C5\u64CD\u4F5C\u6B65\u9AA4 1\u3001\u5B89\u88C5C++\u4F9D\u8D56\u73AF\u5883

                    *****************\u547D\u4EE4\u5982\u4E0B******************
                    +import{_ as t,r as p,o,c,a as n,b as e,F as l,e as s,d as u}from"./app.f8791b52.js";var i="/study/assets/image-20220414184339337.3b1752fd.png",k="/study/assets/image-20220414185205763.16256b7f.png",r="/study/assets/image-20220414205022012.ab0f99a4.png",g="/study/assets/watermark,type_d3F5LXplbmhlaQ,shadow_50,text_Q1NETiBA4pie57K-4peI5b2p4peI54y_4peI56yU4peI6K6w4pic,size_20,color_FFFFFF,t_70,g_se,x_16.7a3efe5c.png",d="/study/assets/watermark,type_d3F5LXplbmhlaQ,shadow_50,text_Q1NETiBA4pie57K-4peI5b2p4peI54y_4peI56yU4peI6K6w4pic,size_20,color_FFFFFF,t_70,g_se,x_16-16499492641123.bf4887f1.png",m="/study/assets/watermark,type_d3F5LXplbmhlaQ,shadow_50,text_Q1NETiBA4pie57K-4peI5b2p4peI54y_4peI56yU4peI6K6w4pic,size_15,color_FFFFFF,t_70,g_se,x_16.87eb8ca7.png",b="/study/assets/watermark,type_d3F5LXplbmhlaQ,shadow_50,text_Q1NETiBA4pie57K-4peI5b2p4peI54y_4peI56yU4peI6K6w4pic,size_20,color_FFFFFF,t_70,g_se,x_16-16499494474448.ec8fc500.png",y="/study/assets/image-20220415175304337.3ecc40a6.png",h="/study/assets/image-20220415192200596.4b8d5b7a.png",f="/study/assets/image-20220420145350578.b88775fe.png",q="/study/assets/image-20220420145534095.1d94ef40.png",w="/study/assets/image-20220419220324676.b9ee2c4a.png",v="/study/assets/image-20220420161731182.d9a44df9.png",E="/study/assets/image-20220420203017170.bb685a80.png",x="/study/assets/image-20220420230833638.87699eb8.png",C="/study/assets/image-20220420230846071.30d53285.png",_="/study/assets/image-20220421195852600.d1dcd447.png",S="/study/assets/image-20220421200956783.30a1cab3.png";const M={},T=s('

                    RabbitMQ

                    \u4E00\u3001\u6D88\u606F\u961F\u5217

                    MQ\u7684\u76F8\u5173\u6982\u5FF5

                    1. \u4EC0\u4E48\u662FMQ

                    MQ\uFF08message queue\uFF09\u662F\u6D88\u606F\u961F\u5217\uFF0C\u672C\u8D28\u662F\u4E2A\u961F\u5217\uFF0C\u9075\u5FAAFIFO\u5148\u5165\u5148\u51FA\u539F\u5219\uFF0C\u53EA\u4E0D\u8FC7\u961F\u5217\u4E2D\u5B58\u653E\u7684\u5185\u5BB9\u662Fmessage\u800C\u5DF2\u3002MQ\u662F\u4E00\u79CD\u8DE8\u8FDB\u7A0B\u7684\u901A\u4FE1\u673A\u5236\uFF0C\u7528\u4E8E\u5FAE\u670D\u52A1\u8282\u70B9\u4E4B\u95F4\u7684\u901A\u4FE1\uFF0C\u6240\u4EE5\u5728\u5206\u5E03\u5F0F\u7CFB\u7EDF\u4E2D\u8D77\u7740\u91CD\u8981\u4F5C\u7528\uFF0C\u7528\u4E8E\u4E0A\u4E0B\u6E38\u4F20\u9012\u6D88\u606F\u3002\u5728\u4E92\u8054\u7F51\u67B6\u6784\u4E2D\uFF0CMQ\u662F\u4E00\u79CD\u975E\u5E38\u5E38\u89C1\u7684\u4E0A\u4E0B\u6E38\u201C\u903B\u8F91\u89E3\u8026+\u7269\u7406\u89E3\u8026\u201D\u7684\u6D88\u606F\u901A\u4FE1\u670D\u52A1\u3002\u4F7F\u7528\u4E86MQ\u4E4B\u540E\uFF0C\u5FAE\u670D\u52A1\u4E4B\u95F4\u7684\u6D88\u606F\u4F20\u9012\u53EA\u9700\u8981\u4F9D\u8D56MQ\uFF0C\u4E0D\u9700\u8981\u4F9D\u8D56\u5176\u4ED6\u670D\u52A1\u3002

                    2. \u4E3A\u4EC0\u4E48\u8981\u7528MQ

                    1. \u6D41\u91CF\u524A\u5CF0

                      \u4E3E\u4F8B\uFF0C\u5982\u679C\u8BA2\u5355\u7CFB\u7EDF\u6700\u591A\u80FD\u5904\u7406\u4E00\u4E07\u6B21\u8BA2\u5355\uFF0C\u8FD9\u4E2A\u5904\u7406\u80FD\u529B\u5E94\u4ED8\u6B63\u5E38\u65F6\u6BB5\u7684\u4E0B\u5355\u7EF0\u7EF0\u6709\u4F59\uFF0C\u6B63\u5E38\u65F6\u6BB5\u6211\u4EEC\u4E0B\u5355\u4E00\u79D2\u540E\u5C31\u80FD\u8FD4\u56DE\u7ED3\u679C\uFF0C\u4F46\u662F\u5728\u9AD8\u5CF0\u671F\uFF0C\u5982\u679C\u6709\u4E24\u4E07\u6B21\u4E0B\u5355\u64CD\u4F5C\u7CFB\u7EDF\u662F\u5904\u7406\u4E0D\u4E86\u7684\uFF0C\u53EA\u80FD\u9650\u5236\u8BA2\u5355\u8D85\u8FC7\u4E00\u4E07\u540E\u4E0D\u5141\u8BB8\u7528\u6237\u4E0B\u5355\u3002\u8FD9\u79CD\u60C5\u51B5\uFF0C\u4F7F\u7528\u6D88\u606F\u961F\u5217\u505A\u7F13\u51B2\uFF0C\u628A\u4E00\u79D2\u5185\u4E0B\u7684\u8BA2\u5355\u5206\u6563\u6210\u4E00\u6BB5\u65F6\u95F4\u6765\u5904\u7406\uFF0C\u5141\u8BB8\u7528\u6237\u4E0B\u5355\uFF0C\u5C06\u7528\u6237\u7684\u8BA2\u5355\u4FE1\u606F\uFF08\u8BA2\u5355\u8BF7\u6C42\uFF09\u901A\u8FC7\u6D88\u606F\u961F\u5217\u8FDB\u884C\u6392\u961F\u3002\u8FD9\u65F6\u6709\u4E9B\u7528\u6237\u53EF\u80FD\u5728\u4E0B\u5355\u5341\u51E0\u79D2\u540E\u624D\u80FD\u6536\u5230\u4E0B\u5355\u6210\u529F\u7684\u64CD\u4F5C\uFF0C\u4F46\u662F\u6BD4\u4E0D\u80FD\u4E0B\u5355\u7684\u4F53\u9A8C\u8981\u597D\u3002

                    2. \u5E94\u7528\u89E3\u8026

                      \u4EE5\u7535\u5546\u5E94\u7528\u4E3A\u4F8B\uFF0C\u5E94\u7528\u4E2D\u6709\u8BA2\u5355\u7CFB\u7EDF\u3001\u5E93\u5B58\u7CFB\u7EDF\u3001\u7269\u6D41\u7CFB\u7EDF\u3001\u652F\u4ED8\u7CFB\u7EDF\u3002\u7528\u6237\u521B\u5EFA\u8BA2\u5355\u540E\uFF0C\u5982\u679C\u8026\u5408\u8C03\u7528\u5E93\u5B58\u7CFB\u7EDF\u3001\u7269\u6D41\u7CFB\u7EDF\u3001\u652F\u4ED8\u7CFB\u7EDF\uFF0C\u4EFB\u4F55\u4E00\u4E2A\u5B50\u7CFB\u7EDF\u51FA\u4E86\u6545\u969C\uFF0C\u90FD\u4F1A\u9020\u6210\u4E0B\u5355\u64CD\u4F5C\u5F02\u5E38\u3002\u5F53\u8F6C\u53D8\u6210\u57FA\u4E8E\u6D88\u606F\u961F\u5217\u7684\u65B9\u5F0F\u540E\uFF0C\u7CFB\u7EDF\u95F4\u8C03\u7528\u7684\u95EE\u9898\u4F1A\u51CF\u5C11\u5F88\u591A\uFF0C\u6BD4\u5982\u7269\u6D41\u7CFB\u7EDF\u56E0\u4E3A\u53D1\u751F\u6545\u969C\uFF0C\u9700\u8981\u51E0\u5206\u949F\u6765\u4FEE\u590D\uFF0C\u5728\u8FD9\u51E0\u5206\u949F\u7684\u65F6\u95F4\u91CC\uFF0C\u7269\u6D41\u7CFB\u7EDF\u8981\u5904\u7406\u7684\u8BA2\u5355\u4FE1\u606F\u88AB\u7F13\u5B58\u5728\u6D88\u606F\u961F\u5217\u4E2D\uFF0C\u7528\u6237\u7684\u4E0B\u5355\u64CD\u4F5C\u53EF\u4EE5\u6B63\u5E38\u5B8C\u6210\uFF0C\u5F53\u7269\u6D41\u7CFB\u7EDF\u6062\u590D\u540E\uFF0C\u7EE7\u7EED\u5904\u7406\u8BA2\u5355\u4FE1\u606F\u5373\u53EF\u3002\u7528\u6237\u611F\u53D7\u4E0D\u5230\u7269\u6D41\u7CFB\u7EDF\u7684\u6545\u969C\uFF0C\u63D0\u5347\u4E86\u7CFB\u7EDF\u7684\u53EF\u7528\u6027\u3002

                      image-20220414184339337

                    3. \u5F02\u6B65\u5904\u7406

                      \u670D\u52A1\u95F4\u8C03\u7528\u662F\u5F02\u6B65\u7684\uFF08\u4E00\u4E2A\u5FAE\u670D\u52A1\u5728\u5206\u5E03\u5F0F\u7CFB\u7EDF\u4E2D\u65E2\u53EF\u4EE5\u662F\u63D0\u4F9B\u8005\uFF0C\u4E5F\u53EF\u4EE5\u662F\u6D88\u8D39\u8005\u6216\u8005\u8BF4\u8C03\u7528\u8005\uFF09\uFF0C\u4F8B\u5982A\u8C03\u7528B\uFF0CB\u9700\u8981\u82B1\u8D39\u5F88\u957F\u65F6\u95F4\u6267\u884C\uFF0CA\u9700\u8981\u77E5\u9053B\u4EC0\u4E48\u65F6\u5019\u6267\u884C\u5B8C\u3002\u4F7F\u7528\u6D88\u606F\u603B\u7EBF\uFF0C\u53EF\u4EE5\u5F88\u65B9\u4FBF\u5730\u89E3\u51B3\u8FD9\u4E2A\u95EE\u9898\uFF0CA\u8C03\u7528B\u670D\u52A1\u540E\uFF0C\u53EA\u9700\u8981\u76D1\u542CB\u5904\u7406\u5B8C\u6210\u7684\u6D88\u606F\uFF0C\u5F53B\u5904\u7406\u5B8C\u6210\u540E\uFF0C\u4F1A\u53D1\u9001\u6D88\u606F\u7ED9MQ\uFF0CA\u670D\u52A1\u4F1A\u901A\u8FC7MQ\u83B7\u53D6\u5230B\u5DF2\u7ECF\u6267\u884C\u5B8C\u4E1A\u52A1\u7684\u6D88\u606F\u3002\u901A\u8FC7\u6D88\u606F\u961F\u5217\uFF0CA\u670D\u52A1\u80FD\u53CA\u65F6\u5730\u5F97\u5230\u5F02\u6B65\u5904\u7406\u6210\u529F\u7684\u6D88\u606F\u3002

                      image-20220414185205763

                    3. MQ\u7684\u5206\u7C7B

                    \u7B80\u8981\u4ECB\u7ECD\uFF0C\u5177\u4F53\u77E5\u8BC6\u9700\u5355\u72EC\u5B66\u4E60\u3001\u67E5\u9605\u3002

                    1. ActiveMQ

                      \u4F18\u70B9\uFF1A\u5355\u673A\u541E\u5410\u91CF\u4E07\u7EA7\uFF0C\u65F6\u6548\u6027ms\u7EA7\uFF0C\u53EF\u7528\u6027\u9AD8\u3002

                    2. kafka

                      \u4F18\u70B9\uFF1A\u6027\u80FD\u9AD8\uFF0C\u541E\u5410\u91CF\u9AD8\uFF0C\u5206\u5E03\u5F0F\uFF0C\u4E00\u4E2A\u6570\u636E\u591A\u4E2A\u526F\u672C\uFF0C\u5C11\u6570\u673A\u5668\u5B95\u673A\uFF0C\u4E0D\u4F1A\u4E22\u5931\u6570\u636E\u3002\u6D88\u8D39\u8005\u91C7\u7528pull\u65B9\u5F0F\u6D88\u8D39\u6D88\u606F\uFF0C\u6D88\u606F\u6709\u5E8F\uFF0C\u901A\u8FC7\u63A7\u5236\u80FD\u591F\u4FDD\u8BC1\u6240\u6709\u6D88\u606F\u88AB\u6D88\u8D39\u4E14\u53EA\u6D88\u8D39\u4E00\u6B21\u3002\u5728\u65E5\u5FD7\u9886\u57DF\u6BD4\u8F83\u6210\u719F\uFF0C\u88AB\u591A\u5BB6\u516C\u53F8\u548C\u591A\u4E2A\u5F00\u6E90\u9879\u76EE\u4F7F\u7528\u3002\u5728\u5927\u6570\u636E\u9886\u57DF\u7684\u5B9E\u65F6\u8BA1\u7B97\u4EE5\u53CA\u65E5\u5FD7\u91C7\u96C6\u88AB\u5927\u89C4\u6A21\u4F7F\u7528\u3002

                      \u9002\u7528\u4E8E\u4EA7\u751F\u5927\u91CF\u6570\u636E\u7684\u4E92\u8054\u7F51\u670D\u52A1\u7684\u6570\u636E\u6536\u96C6\u4E1A\u52A1\u3002\u5982\u679C\u662F\u5F00\u53D1\u65E5\u5FD7\u91C7\u96C6\u529F\u80FD\uFF0C\u80AF\u5B9A\u9996\u9009kafka\u3002

                    3. RocketMQ

                      \u5929\u751F\u4E3A\u91D1\u878D\u4E92\u8054\u7F51\u9886\u57DF\u800C\u751F\uFF0C\u5BF9\u4E8E\u53EF\u9760\u6027\u8981\u6C42\u5F88\u9AD8\u7684\u573A\u666F\uFF0C\u5C24\u5176\u662F\u7535\u5546\u91CC\u9762\u7684\u8BA2\u5355\u6263\u6B3E\uFF0C\u4EE5\u53CA\u4E1A\u52A1\u524A\u5CF0\u3002

                    4. RabbitMQ

                      \u6027\u80FD\u597D\uFF0C\u65F6\u6548\u6027\u5FAE\u79D2\u7EA7\uFF0C\u793E\u533A\u6D3B\u8DC3\u5EA6\u8F83\u9AD8\uFF0C\u7BA1\u7406\u754C\u9762\u65B9\u4FBF\u3002\u5982\u679C\u6570\u636E\u91CF\u6CA1\u6709\u90A3\u4E48\u5927\uFF0C\u4E2D\u5C0F\u578B\u516C\u53F8\u4F18\u5148\u9009\u62E9\u529F\u80FD\u6BD4\u8F83\u5B8C\u5907\u7684RabbitMQ\u3002

                    RabbitMQ

                    RabbitMQ\u7684\u6982\u5FF5

                    RabbitMQ\u662F\u4E00\u4E2A\u6D88\u606F\u4E2D\u95F4\u4EF6\uFF0C\u8D1F\u8D23\u63A5\u6536\u5E76\u8F6C\u53D1\u6D88\u606F\u3002\u53EF\u4EE5\u628A\u5B83\u5F53\u4F5C\u4E00\u4E2A\u5FEB\u9012\u7AD9\u70B9\uFF0C\u5F53\u4F60\u8981\u53D1\u9001\u4E00\u4E2A\u5305\u88F9\u65F6\uFF0C\u628A\u5305\u88F9\u653E\u5230\u5FEB\u9012\u7AD9\uFF0C\u5FEB\u9012\u5458\u6700\u7EC8\u4F1A\u628A\u5FEB\u9012\u9001\u5230\u6536\u4EF6\u4EBA\u90A3\u91CC\u3002RabbitMQ\u8D1F\u8D23\u63A5\u6536\u3001\u5B58\u50A8\u548C\u8F6C\u53D1\u6D88\u606F\u6570\u636E\u3002

                    \u56DB\u5927\u6838\u5FC3\u6982\u5FF5

                    1. \u751F\u4EA7\u8005

                      \u4EA7\u751F\u6D88\u606F\uFF0C\u53D1\u9001\u6D88\u606F\u7ED9\u6D88\u606F\u961F\u5217\u7684\u7A0B\u5E8F\u3002

                    2. \u4EA4\u6362\u673A

                      \u4E00\u4E2A\u4EA4\u6362\u673A\u53EF\u4EE5\u7ED1\u5B9A\u591A\u4E2A\u961F\u5217\u3002

                      \u4EA4\u6362\u673A\u662FRabbitMQ\u4E2D\u4E00\u4E2A\u975E\u5E38\u91CD\u8981\u7684\u90E8\u4EF6\uFF0C\u4E00\u65B9\u9762\u5B83\u63A5\u6536\u6765\u81EA\u751F\u4EA7\u8005\u7684\u6D88\u606F\uFF0C\u4E00\u65B9\u9762\u5B83\u5C06\u6D88\u606F\u63A8\u9001\u81F3\u961F\u5217\u4E2D\uFF0C\u4EA4\u6362\u673A\u5FC5\u987B\u786E\u5207\u77E5\u9053\u5982\u4F55\u5904\u7406\u5B83\u63A5\u6536\u5230\u7684\u6D88\u606F\uFF0C\u662F\u5C06\u8FD9\u4E9B\u6D88\u606F\u63A8\u9001\u5230\u7279\u5B9A\u961F\u5217\u8FD8\u662F\u63A8\u9001\u5230\u591A\u4E2A\u961F\u5217\uFF0C\u4EA6\u6216\u8005\u662F\u628A\u6D88\u606F\u4E22\u5F03\uFF0C\u8FD9\u4E2A\u5F97\u7531\u4EA4\u6362\u673A\u7C7B\u578B\u51B3\u5B9A\u3002

                    3. \u961F\u5217

                      \u961F\u5217\u662FRabbitMQ\u5185\u90E8\u4F7F\u7528\u7684\u4E00\u79CD\u6570\u636E\u7ED3\u6784\uFF0C\u6D88\u606F\u5B58\u50A8\u5728\u961F\u5217\u4E2D\uFF0C\u961F\u5217\u4EC5\u53D7\u4E3B\u673A\u7684\u5185\u5B58\u548C\u78C1\u76D8\u9650\u5236\u7684\u7EA6\u675F\uFF0C\u672C\u8D28\u4E0A\u662F\u4E00\u4E2A\u5927\u7684\u6D88\u606F\u7F13\u51B2\u533A\u3002\u8BB8\u591A\u751F\u4EA7\u8005\u53EF\u4EE5\u5C06\u6D88\u606F\u53D1\u9001\u5230\u4E00\u4E2A\u961F\u5217\uFF0C\u8BB8\u591A\u6D88\u8D39\u8005\u53EF\u4EE5\u5C1D\u8BD5\u4ECE\u4E00\u4E2A\u961F\u5217\u63A5\u6536\u6570\u636E\uFF0C\u8FD9\u662F\u6211\u4EEC\u4F7F\u7528\u961F\u5217\u7684\u65B9\u5F0F\u3002

                    4. \u6D88\u8D39\u8005

                      \u6D88\u8D39\u4E0E\u63A5\u6536\u5177\u6709\u76F8\u4F3C\u7684\u542B\u4E49\uFF0C\u6D88\u8D39\u8005\u5927\u591A\u65F6\u5019\u662F\u4E00\u4E2A\u7B49\u5F85\u63A5\u6536\u6D88\u606F\u7684\u7A0B\u5E8F\u3002\u8BF7\u6CE8\u610F\u751F\u4EA7\u8005\u3001\u6D88\u8D39\u8005\u548C\u6D88\u606F\u4E2D\u95F4\u4EF6\u5F88\u591A\u65F6\u5019\u5E76\u4E0D\u5728\u540C\u4E00\u673A\u5668\u4E0A\uFF0C\u540C\u4E00\u4E2A\u5E94\u7528\u7A0B\u5E8F\u65E2\u53EF\u4EE5\u662F\u751F\u4EA7\u8005\u4E5F\u53EF\u4EE5\u662F\u6D88\u8D39\u8005\u3002

                    \u540D\u8BCD\u4ECB\u7ECD

                    image-20220414205022012

                    1. Broker\uFF1A\u63A5\u6536\u548C\u5206\u53D1\u6D88\u606F\u7684\u5E94\u7528\u3002

                      \u5305\u542B\u4E24\u90E8\u5206\uFF1A\u4EA4\u6362\u673AExchange\u548C\u961F\u5217Queue

                    2. Connection\uFF1Aproducer\u548Cconsumer\u4E0EBroker\u4E4B\u95F4\u7684TCP\u8FDE\u63A5\u3002

                    3. Channel\uFF1A

                      \u6BCF\u4E00\u4E2A\u751F\u4EA7\u8005\u4E0EMQ\u4E4B\u95F4\u4F1A\u5EFA\u7ACB\u4E00\u4E2A\u8FDE\u63A5Connection\uFF0C\u6BCF\u4E00\u4E2AConnection\u91CC\u4F1A\u6709\u591A\u4E2A\u4FE1\u9053Channel\uFF0C\u4FE1\u9053\u5C31\u662F\u53D1\u9001\u6D88\u606F\u7684\u901A\u9053\u3002

                      \u5982\u679C\u6BCF\u4E00\u6B21\u8BBF\u95EERabbitMQ\u90FD\u5EFA\u7ACB\u4E00\u4E2AConnection\uFF0C\u5728\u6D88\u606F\u91CF\u5927\u7684\u65F6\u5019\u5EFA\u7ACBTCP Connection\u7684\u5F00\u9500\u5C06\u662F\u5DE8\u5927\u7684\uFF0C\u6548\u7387\u4E5F\u8F83\u4F4E\u3002Channel\u662F\u5728connection\u5185\u90E8\u5EFA\u7ACB\u7684\u903B\u8F91\u8FDE\u63A5\uFF0C\u5982\u679C\u5E94\u7528\u7A0B\u5E8F\u652F\u6301\u591A\u7EBF\u7A0B\uFF0C\u901A\u5E38\u6BCF\u4E2A\u7EBF\u7A0B\u521B\u5EFA\u5355\u72EC\u7684channel\u8FDB\u884C\u901A\u8BAF\uFF0Cchannel\u4E4B\u95F4\u662F\u5B8C\u5168\u9694\u79BB\u7684\u3002

                      Channel\u4F5C\u4E3A\u8F7B\u91CF\u7EA7\u7684Connection\u6781\u5927\u51CF\u5C11\u4E86\u64CD\u4F5C\u7CFB\u7EDF\u5EFA\u7ACBTCP connection\u7684\u5F00\u9500\u3002

                      \u53EF\u4EE5\u7406\u89E3\u4E3A\u8FDE\u63A5\u6C60\u3002

                    4. Exchange:

                      message\u5230\u8FBEbroker\u7684\u7B2C\u4E00\u7AD9\uFF0C\u6839\u636E\u5206\u53D1\u89C4\u5219\uFF0C\u5339\u914D\u67E5\u8BE2\u8868\u4E2D\u7684routing key\uFF0C\u5206\u53D1\u6D88\u606F\u5230queue\u4E2D\u53BB\u3002\u5E38\u7528\u7684\u7C7B\u578B\u6709\uFF1Adirect\uFF08point-to-point\uFF09\uFF0Ctopic\uFF08publish-subscribe\uFF09\uFF0Cfanout\uFF08multicast\uFF09

                    5. Queue\uFF1A

                      \u6D88\u606F\u6700\u7EC8\u88AB\u9001\u5230\u8FD9\u91CC\u7B49\u5F85consumer\u53D6\u8D70

                    6. Binding\uFF1A

                      exchange\u548Cqueue\u4E4B\u95F4\u7684\u865A\u62DF\u8FDE\u63A5\uFF0Cbinding\u4E2D\u53EF\u4EE5\u5305\u542Brouting key\uFF0Cbinding\u4FE1\u606F\u88AB\u4FDD\u5B58\u5230exchange\u4E2D\u7684\u67E5\u8BE2\u8868\u4E2D\uFF0C\u7528\u4E8Emessage\u7684\u5206\u53D1\u4F9D\u636E\u3002

                    \u5B89\u88C5

                    ',19),A={href:"https://blog.csdn.net/shishishilove/article/details/122086399",target:"_blank",rel:"noopener noreferrer"},N=u("(30\u6761\u6D88\u606F) Linux\u5B89\u88C5RabbitMQ\u8BE6\u7EC6\u6559\u7A0B_\u261E\u7CBE\u25C8\u5F69\u25C8\u733F\u25C8\u7B14\u25C8\u8BB0\u261C\u7684\u535A\u5BA2-CSDN\u535A\u5BA2_linux\u5B89\u88C5rabbitmq\u6559\u7A0B"),Q=s(`

                    \u4E00\u3001\u73AF\u5883\u51C6\u5907

                    1\u3001RabbitMQ\u7248\u672C \u548C Erlang \u7248\u672C\u517C\u5BB9\u6027\u5173\u7CFB https://www.rabbitmq.com/which-erlang.html 2\u3001\u5B98\u65B9\u5B89\u88C5\u5305\u4E0B\u8F7D\u5730\u5740

                    \u3010erlang\u4E0B\u8F7D\u5730\u5740\u3011\uFF1Ahttps://hub.fastgit.org/rabbitmq/erlang-rpm/releases

                    \u3010socat\u4E0B\u8F7D\u5730\u5740\u3011\uFF1Ahttp://www.rpmfind.net/linux/rpm2html/search.php?query=socat(x86-64)

                    \u3010rabbitmq\u4E0B\u8F7D\u5730\u5740\u3011\uFF1Ahttps://github.com/rabbitmq/rabbitmq-server/releases

                    3\u3001\u5B89\u88C5\u5305\u4E2D\u8BF4\u660E\uFF0C\u8BF7\u4E0B\u8F7D\u5BF9\u5E94\u7684\u5B89\u88C5\u5305 el6\uFF1ACentOS 6.x \u7684\u4E0B\u8F7D el7\uFF1ACentOS 7.x \u7684\u4E0B\u8F7D el8\uFF1ACentOS 8.x \u7684\u4E0B\u8F7D

                    \u4E8C\u3001\u5B89\u88C5\u64CD\u4F5C\u6B65\u9AA4 1\u3001\u5B89\u88C5C++\u4F9D\u8D56\u73AF\u5883

                    *****************\u547D\u4EE4\u5982\u4E0B******************
                     yum install build-essential openssl openssl-devel unixODBC unixODBC-devel make gcc gcc-c++ kernel-devel m4 ncurses-devel tk tc xz
                     

                    2\u3001\u51C6\u5907\u5B89\u88C5\u5305 \u3010\u6211\u8FD9\u91CC\u9009\u62E9\u76EE\u524D\u6700\u65B0\u7248\u672C\uFF0C\u5177\u4F53\u6839\u636E\u81EA\u5DF1\u9700\u8981\u9009\u62E9\u5BF9\u5E94\u7684\u7248\u672C\u3011

                    erlang-23.3.4.8-1.el7.x86_64.rpm
                     rabbitmq-server-3.9.11-1.el7.noarch.rpm
                    diff --git a/assets/app.0d029894.js b/assets/app.f8791b52.js
                    similarity index 96%
                    rename from assets/app.0d029894.js
                    rename to assets/app.f8791b52.js
                    index 89797f81..33c03201 100644
                    --- a/assets/app.0d029894.js
                    +++ b/assets/app.f8791b52.js
                    @@ -1,4 +1,4 @@
                    -var vl=Object.defineProperty,_l=Object.defineProperties;var Al=Object.getOwnPropertyDescriptors;var wo=Object.getOwnPropertySymbols;var bl=Object.prototype.hasOwnProperty,yl=Object.prototype.propertyIsEnumerable;var Ro=(e,t,n)=>t in e?vl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ze=(e,t)=>{for(var n in t||(t={}))bl.call(t,n)&&Ro(e,n,t[n]);if(wo)for(var n of wo(t))yl.call(t,n)&&Ro(e,n,t[n]);return e},Pn=(e,t)=>_l(e,Al(t));const bo={},Bl="modulepreload",Po={},Cl="/study/",x=function(t,n){return!n||n.length===0?t():Promise.all(n.map(r=>{if(r=`${Cl}${r}`,r in Po)return;Po[r]=!0;const o=r.endsWith(".css"),s=o?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${r}"]${s}`))return;const i=document.createElement("link");if(i.rel=o?"stylesheet":Bl,o||(i.as="script",i.crossOrigin=""),i.href=r,document.head.appendChild(i),o)return new Promise((l,a)=>{i.addEventListener("load",l),i.addEventListener("error",()=>a(new Error(`Unable to preload CSS for ${r}`)))})})).then(()=>t())},wl={"v-8daa1a0e":()=>x(()=>import("./index.html.0c85d45a.js"),[]).then(({data:e})=>e),"v-4e3aed14":()=>x(()=>import("./index.html.2e98ec0b.js"),[]).then(({data:e})=>e),"v-2d0a8eae":()=>x(()=>import("./index.html.f4ea396a.js"),[]).then(({data:e})=>e),"v-14c69af4":()=>x(()=>import("./index.html.a408b578.js"),[]).then(({data:e})=>e),"v-2d0aa62c":()=>x(()=>import("./index.html.be48243d.js"),[]).then(({data:e})=>e),"v-73197d7b":()=>x(()=>import("./index.html.39572673.js"),[]).then(({data:e})=>e),"v-d5c1c75c":()=>x(()=>import("./index.html.3612ef71.js"),[]).then(({data:e})=>e),"v-24adc8d7":()=>x(()=>import("./\u8BBE\u8BA1\u6A21\u5F0F1.html.2c1e2068.js"),[]).then(({data:e})=>e),"v-2d61ea56":()=>x(()=>import("./\u8BBE\u8BA1\u6A21\u5F0F2.html.f8c65f89.js"),[]).then(({data:e})=>e),"v-4f8f811e":()=>x(()=>import("./gin.html.d26ee634.js"),[]).then(({data:e})=>e),"v-2ea03d90":()=>x(()=>import("./golang.html.c9f1a9cc.js"),[]).then(({data:e})=>e),"v-500ab9d8":()=>x(()=>import("./gorm.html.5c4f6234.js"),[]).then(({data:e})=>e),"v-b6ec6710":()=>x(()=>import("./Javaweb.html.42f83f44.js"),[]).then(({data:e})=>e),"v-3201b6ed":()=>x(()=>import("./ES.html.6ce7153c.js"),[]).then(({data:e})=>e),"v-3a6a4d07":()=>x(()=>import("./vue\u57FA\u7840.html.308c7ebe.js"),[]).then(({data:e})=>e),"v-12a323e6":()=>x(()=>import("./vue\u7EC4\u4EF6.html.900eca1b.js"),[]).then(({data:e})=>e),"v-57fd34d4":()=>x(()=>import("./\u4E00\u4E9B\u77E5\u8BC6\u70B9\u7684\u8BB0\u5F55.html.12d09d3c.js"),[]).then(({data:e})=>e),"v-1cbd166b":()=>x(()=>import("./Java\u7B14\u8BB0.html.bbeb4465.js"),[]).then(({data:e})=>e),"v-83ddddfc":()=>x(()=>import("./dubbo.html.5bac4341.js"),[]).then(({data:e})=>e),"v-1dbd0fce":()=>x(()=>import("./springcloud\uFF08\u4E0A\uFF09.html.41b01bda.js"),[]).then(({data:e})=>e),"v-77987a0f":()=>x(()=>import("./springcloud\uFF08\u4E0B\uFF09.html.d60a3245.js"),[]).then(({data:e})=>e),"v-9ef17310":()=>x(()=>import("./zookeeper.html.ca2e38fc.js"),[]).then(({data:e})=>e),"v-05cd8fe4":()=>x(()=>import("./\u300A\u5E76\u53D1\u7F16\u7A0B\u7684\u827A\u672F\u300B\u7B14\u8BB0.html.e4a226e8.js"),[]).then(({data:e})=>e),"v-0013e773":()=>x(()=>import("./\u5E76\u53D1\u7F16\u7A0B.html.c68aed4d.js"),[]).then(({data:e})=>e),"v-4c0a9128":()=>x(()=>import("./\u5C1A\u7845\u8C37_\u5B8B\u7EA2\u5EB7_JDBC.html.c5b856de.js"),[]).then(({data:e})=>e),"v-456aa1eb":()=>x(()=>import("./redis.html.f8eb0a54.js"),[]).then(({data:e})=>e),"v-9f83c3ba":()=>x(()=>import("./Mybatis.html.7a4d957e.js"),[]).then(({data:e})=>e),"v-21b5c2ea":()=>x(()=>import("./spring.html.7e52750f.js"),[]).then(({data:e})=>e),"v-068e11cb":()=>x(()=>import("./springboot.html.b6bef083.js"),[]).then(({data:e})=>e),"v-92381d18":()=>x(()=>import("./springboot.html.18996c7f.js"),[]).then(({data:e})=>e),"v-0788dc22":()=>x(()=>import("./springMVC.html.72533e36.js"),[]).then(({data:e})=>e),"v-4b84538b":()=>x(()=>import("./kafka.html.3dcdcb63.js"),[]).then(({data:e})=>e),"v-1e0ac90e":()=>x(()=>import("./RabbitMQ.html.0628df73.js"),[]).then(({data:e})=>e),"v-d2a5a678":()=>x(()=>import("./\u64CD\u4F5C\u7CFB\u7EDF.html.e2a129ed.js"),[]).then(({data:e})=>e),"v-30eca57b":()=>x(()=>import("./flink\u57FA\u672C\u7BC72.html.167231dc.js"),[]).then(({data:e})=>e),"v-791cd9a5":()=>x(()=>import("./MySQL\u6570\u636E\u5E93\u7B14\u8BB0-\u7B2C\u4E00\u90E8\u5206.html.7d7d9671.js"),[]).then(({data:e})=>e),"v-94326c4c":()=>x(()=>import("./MySQL\u6570\u636E\u5E93\u7B14\u8BB0-\u7B2C\u4E8C\u90E8\u5206.html.832565fe.js"),[]).then(({data:e})=>e),"v-3706649a":()=>x(()=>import("./404.html.93146c89.js"),[]).then(({data:e})=>e)};function Ur(e,t){const n=Object.create(null),r=e.split(",");for(let o=0;o!!n[o.toLowerCase()]:o=>!!n[o]}const Rl="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Pl=Ur(Rl);function Fs(e){return!!e||e===""}function Yn(e){if(Y(e)){const t={};for(let n=0;n{if(n){const r=n.split(Ol);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function bn(e){let t="";if(me(e))t=e;else if(Y(e))for(let n=0;nme(e)?e:e==null?"":Y(e)||be(e)&&(e.toString===Is||!te(e.toString))?JSON.stringify(e,Ss,2):String(e),Ss=(e,t)=>t&&t.__v_isRef?Ss(e,t.value):$t(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[r,o])=>(n[`${r} =>`]=o,n),{})}:xs(t)?{[`Set(${t.size})`]:[...t.values()]}:be(t)&&!Y(t)&&!ks(t)?String(t):t,pe={},Ht=[],We=()=>{},Sl=()=>!1,xl=/^on[^a-z]/,yn=e=>xl.test(e),qr=e=>e.startsWith("onUpdate:"),we=Object.assign,Kr=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},Dl=Object.prototype.hasOwnProperty,se=(e,t)=>Dl.call(e,t),Y=Array.isArray,$t=e=>Gn(e)==="[object Map]",xs=e=>Gn(e)==="[object Set]",te=e=>typeof e=="function",me=e=>typeof e=="string",Wr=e=>typeof e=="symbol",be=e=>e!==null&&typeof e=="object",Ds=e=>be(e)&&te(e.then)&&te(e.catch),Is=Object.prototype.toString,Gn=e=>Is.call(e),Il=e=>Gn(e).slice(8,-1),ks=e=>Gn(e)==="[object Object]",Jr=e=>me(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,ln=Ur(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Zn=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},kl=/-(\w)/g,Ge=Zn(e=>e.replace(kl,(t,n)=>n?n.toUpperCase():"")),Ml=/\B([A-Z])/g,St=Zn(e=>e.replace(Ml,"-$1").toLowerCase()),Xn=Zn(e=>e.charAt(0).toUpperCase()+e.slice(1)),cr=Zn(e=>e?`on${Xn(e)}`:""),pn=(e,t)=>!Object.is(e,t),ur=(e,t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},Ms=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let To;const jl=()=>To||(To=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{});let Ie;class Nl{constructor(t=!1){this.active=!0,this.effects=[],this.cleanups=[],!t&&Ie&&(this.parent=Ie,this.index=(Ie.scopes||(Ie.scopes=[])).push(this)-1)}run(t){if(this.active){const n=Ie;try{return Ie=this,t()}finally{Ie=n}}}on(){Ie=this}off(){Ie=this.parent}stop(t){if(this.active){let n,r;for(n=0,r=this.effects.length;n{const t=new Set(e);return t.w=0,t.n=0,t},js=e=>(e.w&Et)>0,Ns=e=>(e.n&Et)>0,Vl=({deps:e})=>{if(e.length)for(let t=0;t{const{deps:t}=e;if(t.length){let n=0;for(let r=0;r{(c==="length"||c>=r)&&l.push(a)});else switch(n!==void 0&&l.push(i.get(n)),t){case"add":Y(e)?Jr(n)&&l.push(i.get("length")):(l.push(i.get(Tt)),$t(e)&&l.push(i.get(Rr)));break;case"delete":Y(e)||(l.push(i.get(Tt)),$t(e)&&l.push(i.get(Rr)));break;case"set":$t(e)&&l.push(i.get(Tt));break}if(l.length===1)l[0]&&Pr(l[0]);else{const a=[];for(const c of l)c&&a.push(...c);Pr(Qr(a))}}function Pr(e,t){const n=Y(e)?e:[...e];for(const r of n)r.computed&&Lo(r);for(const r of n)r.computed||Lo(r)}function Lo(e,t){(e!==qe||e.allowRecurse)&&(e.scheduler?e.scheduler():e.run())}const ql=Ur("__proto__,__v_isRef,__isVue"),zs=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Wr)),Kl=Gr(),Wl=Gr(!1,!0),Jl=Gr(!0),Fo=Ql();function Ql(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...n){const r=ae(this);for(let s=0,i=this.length;s{e[t]=function(...n){Jt();const r=ae(this)[t].apply(this,n);return Qt(),r}}),e}function Gr(e=!1,t=!1){return function(r,o,s){if(o==="__v_isReactive")return!e;if(o==="__v_isReadonly")return e;if(o==="__v_isShallow")return t;if(o==="__v_raw"&&s===(e?t?fa:Ws:t?Ks:qs).get(r))return r;const i=Y(r);if(!e&&i&&se(Fo,o))return Reflect.get(Fo,o,s);const l=Reflect.get(r,o,s);return(Wr(o)?zs.has(o):ql(o))||(e||je(r,"get",o),t)?l:Be(l)?i&&Jr(o)?l:l.value:be(l)?e?eo(l):Yt(l):l}}const Yl=Vs(),Gl=Vs(!0);function Vs(e=!1){return function(n,r,o,s){let i=n[r];if(mn(i)&&Be(i)&&!Be(o))return!1;if(!e&&!mn(o)&&(Tr(o)||(o=ae(o),i=ae(i)),!Y(n)&&Be(i)&&!Be(o)))return i.value=o,!0;const l=Y(n)&&Jr(r)?Number(r)e,er=e=>Reflect.getPrototypeOf(e);function Tn(e,t,n=!1,r=!1){e=e.__v_raw;const o=ae(e),s=ae(t);n||(t!==s&&je(o,"get",t),je(o,"get",s));const{has:i}=er(o),l=r?Zr:n?no:En;if(i.call(o,t))return l(e.get(t));if(i.call(o,s))return l(e.get(s));e!==o&&e.get(t)}function On(e,t=!1){const n=this.__v_raw,r=ae(n),o=ae(e);return t||(e!==o&&je(r,"has",e),je(r,"has",o)),e===o?n.has(e):n.has(e)||n.has(o)}function Ln(e,t=!1){return e=e.__v_raw,!t&&je(ae(e),"iterate",Tt),Reflect.get(e,"size",e)}function So(e){e=ae(e);const t=ae(this);return er(t).has.call(t,e)||(t.add(e),rt(t,"add",e,e)),this}function xo(e,t){t=ae(t);const n=ae(this),{has:r,get:o}=er(n);let s=r.call(n,e);s||(e=ae(e),s=r.call(n,e));const i=o.call(n,e);return n.set(e,t),s?pn(t,i)&&rt(n,"set",e,t):rt(n,"add",e,t),this}function Do(e){const t=ae(this),{has:n,get:r}=er(t);let o=n.call(t,e);o||(e=ae(e),o=n.call(t,e)),r&&r.call(t,e);const s=t.delete(e);return o&&rt(t,"delete",e,void 0),s}function Io(){const e=ae(this),t=e.size!==0,n=e.clear();return t&&rt(e,"clear",void 0,void 0),n}function Fn(e,t){return function(r,o){const s=this,i=s.__v_raw,l=ae(i),a=t?Zr:e?no:En;return!e&&je(l,"iterate",Tt),i.forEach((c,f)=>r.call(o,a(c),a(f),s))}}function Sn(e,t,n){return function(...r){const o=this.__v_raw,s=ae(o),i=$t(s),l=e==="entries"||e===Symbol.iterator&&i,a=e==="keys"&&i,c=o[e](...r),f=n?Zr:t?no:En;return!t&&je(s,"iterate",a?Rr:Tt),{next(){const{value:p,done:d}=c.next();return d?{value:p,done:d}:{value:l?[f(p[0]),f(p[1])]:f(p),done:d}},[Symbol.iterator](){return this}}}}function st(e){return function(...t){return e==="delete"?!1:this}}function ra(){const e={get(s){return Tn(this,s)},get size(){return Ln(this)},has:On,add:So,set:xo,delete:Do,clear:Io,forEach:Fn(!1,!1)},t={get(s){return Tn(this,s,!1,!0)},get size(){return Ln(this)},has:On,add:So,set:xo,delete:Do,clear:Io,forEach:Fn(!1,!0)},n={get(s){return Tn(this,s,!0)},get size(){return Ln(this,!0)},has(s){return On.call(this,s,!0)},add:st("add"),set:st("set"),delete:st("delete"),clear:st("clear"),forEach:Fn(!0,!1)},r={get(s){return Tn(this,s,!0,!0)},get size(){return Ln(this,!0)},has(s){return On.call(this,s,!0)},add:st("add"),set:st("set"),delete:st("delete"),clear:st("clear"),forEach:Fn(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(s=>{e[s]=Sn(s,!1,!1),n[s]=Sn(s,!0,!1),t[s]=Sn(s,!1,!0),r[s]=Sn(s,!0,!0)}),[e,n,t,r]}const[oa,sa,ia,la]=ra();function Xr(e,t){const n=t?e?la:ia:e?sa:oa;return(r,o,s)=>o==="__v_isReactive"?!e:o==="__v_isReadonly"?e:o==="__v_raw"?r:Reflect.get(se(n,o)&&o in r?n:r,o,s)}const aa={get:Xr(!1,!1)},ca={get:Xr(!1,!0)},ua={get:Xr(!0,!1)},qs=new WeakMap,Ks=new WeakMap,Ws=new WeakMap,fa=new WeakMap;function da(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function ha(e){return e.__v_skip||!Object.isExtensible(e)?0:da(Il(e))}function Yt(e){return mn(e)?e:to(e,!1,Us,aa,qs)}function pa(e){return to(e,!1,na,ca,Ks)}function eo(e){return to(e,!0,ta,ua,Ws)}function to(e,t,n,r,o){if(!be(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const s=o.get(e);if(s)return s;const i=ha(e);if(i===0)return e;const l=new Proxy(e,i===2?r:n);return o.set(e,l),l}function zt(e){return mn(e)?zt(e.__v_raw):!!(e&&e.__v_isReactive)}function mn(e){return!!(e&&e.__v_isReadonly)}function Tr(e){return!!(e&&e.__v_isShallow)}function Js(e){return zt(e)||mn(e)}function ae(e){const t=e&&e.__v_raw;return t?ae(t):e}function Qs(e){return Nn(e,"__v_skip",!0),e}const En=e=>be(e)?Yt(e):e,no=e=>be(e)?eo(e):e;function Ys(e){pt&&qe&&(e=ae(e),$s(e.dep||(e.dep=Qr())))}function Gs(e,t){e=ae(e),e.dep&&Pr(e.dep)}function Be(e){return!!(e&&e.__v_isRef===!0)}function Pe(e){return Xs(e,!1)}function Zs(e){return Xs(e,!0)}function Xs(e,t){return Be(e)?e:new ma(e,t)}class ma{constructor(t,n){this.__v_isShallow=n,this.dep=void 0,this.__v_isRef=!0,this._rawValue=n?t:ae(t),this._value=n?t:En(t)}get value(){return Ys(this),this._value}set value(t){t=this.__v_isShallow?t:ae(t),pn(t,this._rawValue)&&(this._rawValue=t,this._value=this.__v_isShallow?t:En(t),Gs(this))}}function Ot(e){return Be(e)?e.value:e}const Ea={get:(e,t,n)=>Ot(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const o=e[t];return Be(o)&&!Be(n)?(o.value=n,!0):Reflect.set(e,t,n,r)}};function ei(e){return zt(e)?e:new Proxy(e,Ea)}function nh(e){const t=Y(e)?new Array(e.length):{};for(const n in e)t[n]=va(e,n);return t}class ga{constructor(t,n,r){this._object=t,this._key=n,this._defaultValue=r,this.__v_isRef=!0}get value(){const t=this._object[this._key];return t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}}function va(e,t,n){const r=e[t];return Be(r)?r:new ga(e,t,n)}class _a{constructor(t,n,r,o){this._setter=n,this.dep=void 0,this.__v_isRef=!0,this._dirty=!0,this.effect=new Yr(t,()=>{this._dirty||(this._dirty=!0,Gs(this))}),this.effect.computed=this,this.effect.active=this._cacheable=!o,this.__v_isReadonly=r}get value(){const t=ae(this);return Ys(t),(t._dirty||!t._cacheable)&&(t._dirty=!1,t._value=t.effect.run()),t._value}set value(t){this._setter(t)}}function Aa(e,t,n=!1){let r,o;const s=te(e);return s?(r=e,o=We):(r=e.get,o=e.set),new _a(r,o,s||!o,n)}function mt(e,t,n,r){let o;try{o=r?e(...r):e()}catch(s){Bn(s,t,n)}return o}function ze(e,t,n,r){if(te(e)){const s=mt(e,t,n,r);return s&&Ds(s)&&s.catch(i=>{Bn(i,t,n)}),s}const o=[];for(let s=0;s>>1;gn(ke[r])et&&ke.splice(t,1)}function ri(e,t,n,r){Y(e)?n.push(...e):(!t||!t.includes(e,e.allowRecurse?r+1:r))&&n.push(e),ni()}function Ca(e){ri(e,sn,an,Mt)}function wa(e){ri(e,ut,cn,jt)}function tr(e,t=null){if(an.length){for(Lr=t,sn=[...new Set(an)],an.length=0,Mt=0;Mtgn(n)-gn(r)),jt=0;jte.id==null?1/0:e.id;function oi(e){Or=!1,Hn=!0,tr(e),ke.sort((n,r)=>gn(n)-gn(r));const t=We;try{for(et=0;etv.trim())),p&&(o=n.map(Ms))}let l,a=r[l=cr(t)]||r[l=cr(Ge(t))];!a&&s&&(a=r[l=cr(St(t))]),a&&ze(a,e,6,o);const c=r[l+"Once"];if(c){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,ze(c,e,6,o)}}function si(e,t,n=!1){const r=t.emitsCache,o=r.get(e);if(o!==void 0)return o;const s=e.emits;let i={},l=!1;if(!te(e)){const a=c=>{const f=si(c,t,!0);f&&(l=!0,we(i,f))};!n&&t.mixins.length&&t.mixins.forEach(a),e.extends&&a(e.extends),e.mixins&&e.mixins.forEach(a)}return!s&&!l?(r.set(e,null),null):(Y(s)?s.forEach(a=>i[a]=null):we(i,s),r.set(e,i),i)}function nr(e,t){return!e||!yn(t)?!1:(t=t.slice(2).replace(/Once$/,""),se(e,t[0].toLowerCase()+t.slice(1))||se(e,St(t))||se(e,t))}let Re=null,ii=null;function zn(e){const t=Re;return Re=e,ii=e&&e.type.__scopeId||null,t}function Pa(e,t=Re,n){if(!t||e._n)return e;const r=(...o)=>{r._d&&Ko(-1);const s=zn(t),i=e(...o);return zn(s),r._d&&Ko(1),i};return r._n=!0,r._c=!0,r._d=!0,r}function fr(e){const{type:t,vnode:n,proxy:r,withProxy:o,props:s,propsOptions:[i],slots:l,attrs:a,emit:c,render:f,renderCache:p,data:d,setupState:v,ctx:A,inheritAttrs:D}=e;let O,g;const _=zn(e);try{if(n.shapeFlag&4){const M=o||r;O=Ue(f.call(M,M,p,s,v,d,A)),g=a}else{const M=t;O=Ue(M.length>1?M(s,{attrs:a,slots:l,emit:c}):M(s,null)),g=t.props?a:Ta(a)}}catch(M){fn.length=0,Bn(M,e,1),O=_e(Me)}let R=O;if(g&&D!==!1){const M=Object.keys(g),{shapeFlag:q}=R;M.length&&q&7&&(i&&M.some(qr)&&(g=Oa(g,i)),R=gt(R,g))}return n.dirs&&(R=gt(R),R.dirs=R.dirs?R.dirs.concat(n.dirs):n.dirs),n.transition&&(R.transition=n.transition),O=R,zn(_),O}const Ta=e=>{let t;for(const n in e)(n==="class"||n==="style"||yn(n))&&((t||(t={}))[n]=e[n]);return t},Oa=(e,t)=>{const n={};for(const r in e)(!qr(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function La(e,t,n){const{props:r,children:o,component:s}=e,{props:i,children:l,patchFlag:a}=t,c=s.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&a>=0){if(a&1024)return!0;if(a&16)return r?ko(r,i,c):!!i;if(a&8){const f=t.dynamicProps;for(let p=0;pe.__isSuspense;function li(e,t){t&&t.pendingBranch?Y(e)?t.effects.push(...e):t.effects.push(e):wa(e)}function Lt(e,t){if(ye){let n=ye.provides;const r=ye.parent&&ye.parent.provides;r===n&&(n=ye.provides=Object.create(r)),n[e]=t}}function Ce(e,t,n=!1){const r=ye||Re;if(r){const o=r.parent==null?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides;if(o&&e in o)return o[e];if(arguments.length>1)return n&&te(t)?t.call(r.proxy):t}}const Mo={};function nt(e,t,n){return ai(e,t,n)}function ai(e,t,{immediate:n,deep:r,flush:o,onTrack:s,onTrigger:i}=pe){const l=ye;let a,c=!1,f=!1;if(Be(e)?(a=()=>e.value,c=Tr(e)):zt(e)?(a=()=>e,r=!0):Y(e)?(f=!0,c=e.some(g=>zt(g)||Tr(g)),a=()=>e.map(g=>{if(Be(g))return g.value;if(zt(g))return Pt(g);if(te(g))return mt(g,l,2)})):te(e)?t?a=()=>mt(e,l,2):a=()=>{if(!(l&&l.isUnmounted))return p&&p(),ze(e,l,3,[d])}:a=We,t&&r){const g=a;a=()=>Pt(g())}let p,d=g=>{p=O.onStop=()=>{mt(g,l,4)}};if(qt)return d=We,t?n&&ze(t,l,3,[a(),f?[]:void 0,d]):a(),We;let v=f?[]:Mo;const A=()=>{if(!!O.active)if(t){const g=O.run();(r||c||(f?g.some((_,R)=>pn(_,v[R])):pn(g,v)))&&(p&&p(),ze(t,l,3,[g,v===Mo?void 0:v,d]),v=g)}else O.run()};A.allowRecurse=!!t;let D;o==="sync"?D=A:o==="post"?D=()=>Fe(A,l&&l.suspense):D=()=>Ca(A);const O=new Yr(a,D);return t?n?A():v=O.run():o==="post"?Fe(O.run.bind(O),l&&l.suspense):O.run(),()=>{O.stop(),l&&l.scope&&Kr(l.scope.effects,O)}}function xa(e,t,n){const r=this.proxy,o=me(e)?e.includes(".")?ci(r,e):()=>r[e]:e.bind(r,r);let s;te(t)?s=t:(s=t.handler,n=t);const i=ye;Ut(this);const l=ai(o,s.bind(r),n);return i?Ut(i):Ft(),l}function ci(e,t){const n=t.split(".");return()=>{let r=e;for(let o=0;o{Pt(n,t)});else if(ks(e))for(const n in e)Pt(e[n],t);return e}function Da(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return vt(()=>{e.isMounted=!0}),io(()=>{e.isUnmounting=!0}),e}const He=[Function,Array],Ia={name:"BaseTransition",props:{mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:He,onEnter:He,onAfterEnter:He,onEnterCancelled:He,onBeforeLeave:He,onLeave:He,onAfterLeave:He,onLeaveCancelled:He,onBeforeAppear:He,onAppear:He,onAfterAppear:He,onAppearCancelled:He},setup(e,{slots:t}){const n=Si(),r=Da();let o;return()=>{const s=t.default&&di(t.default(),!0);if(!s||!s.length)return;let i=s[0];if(s.length>1){for(const D of s)if(D.type!==Me){i=D;break}}const l=ae(e),{mode:a}=l;if(r.isLeaving)return dr(i);const c=jo(i);if(!c)return dr(i);const f=Fr(c,l,r,n);Sr(c,f);const p=n.subTree,d=p&&jo(p);let v=!1;const{getTransitionKey:A}=c.type;if(A){const D=A();o===void 0?o=D:D!==o&&(o=D,v=!0)}if(d&&d.type!==Me&&(!wt(c,d)||v)){const D=Fr(d,l,r,n);if(Sr(d,D),a==="out-in")return r.isLeaving=!0,D.afterLeave=()=>{r.isLeaving=!1,n.update()},dr(i);a==="in-out"&&c.type!==Me&&(D.delayLeave=(O,g,_)=>{const R=fi(r,d);R[String(d.key)]=d,O._leaveCb=()=>{g(),O._leaveCb=void 0,delete f.delayedLeave},f.delayedLeave=_})}return i}}},ui=Ia;function fi(e,t){const{leavingVNodes:n}=e;let r=n.get(t.type);return r||(r=Object.create(null),n.set(t.type,r)),r}function Fr(e,t,n,r){const{appear:o,mode:s,persisted:i=!1,onBeforeEnter:l,onEnter:a,onAfterEnter:c,onEnterCancelled:f,onBeforeLeave:p,onLeave:d,onAfterLeave:v,onLeaveCancelled:A,onBeforeAppear:D,onAppear:O,onAfterAppear:g,onAppearCancelled:_}=t,R=String(e.key),M=fi(n,e),q=(m,W)=>{m&&ze(m,r,9,W)},$=(m,W)=>{const H=W[1];q(m,W),Y(m)?m.every(K=>K.length<=1)&&H():m.length<=1&&H()},I={mode:s,persisted:i,beforeEnter(m){let W=l;if(!n.isMounted)if(o)W=D||l;else return;m._leaveCb&&m._leaveCb(!0);const H=M[R];H&&wt(e,H)&&H.el._leaveCb&&H.el._leaveCb(),q(W,[m])},enter(m){let W=a,H=c,K=f;if(!n.isMounted)if(o)W=O||a,H=g||c,K=_||f;else return;let j=!1;const C=m._enterCb=P=>{j||(j=!0,P?q(K,[m]):q(H,[m]),I.delayedLeave&&I.delayedLeave(),m._enterCb=void 0)};W?$(W,[m,C]):C()},leave(m,W){const H=String(e.key);if(m._enterCb&&m._enterCb(!0),n.isUnmounting)return W();q(p,[m]);let K=!1;const j=m._leaveCb=C=>{K||(K=!0,W(),C?q(A,[m]):q(v,[m]),m._leaveCb=void 0,M[H]===e&&delete M[H])};M[H]=e,d?$(d,[m,j]):j()},clone(m){return Fr(m,t,n,r)}};return I}function dr(e){if(Cn(e))return e=gt(e),e.children=null,e}function jo(e){return Cn(e)?e.children?e.children[0]:void 0:e}function Sr(e,t){e.shapeFlag&6&&e.component?Sr(e.component.subTree,t):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function di(e,t=!1,n){let r=[],o=0;for(let s=0;s1)for(let s=0;s!!e.type.__asyncLoader;function re(e){te(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:r,delay:o=200,timeout:s,suspensible:i=!0,onError:l}=e;let a=null,c,f=0;const p=()=>(f++,a=null,d()),d=()=>{let v;return a||(v=a=t().catch(A=>{if(A=A instanceof Error?A:new Error(String(A)),l)return new Promise((D,O)=>{l(A,()=>D(p()),()=>O(A),f+1)});throw A}).then(A=>v!==a&&a?a:(A&&(A.__esModule||A[Symbol.toStringTag]==="Module")&&(A=A.default),c=A,A)))};return Je({name:"AsyncComponentWrapper",__asyncLoader:d,get __asyncResolved(){return c},setup(){const v=ye;if(c)return()=>hr(c,v);const A=_=>{a=null,Bn(_,v,13,!r)};if(i&&v.suspense||qt)return d().then(_=>()=>hr(_,v)).catch(_=>(A(_),()=>r?_e(r,{error:_}):null));const D=Pe(!1),O=Pe(),g=Pe(!!o);return o&&setTimeout(()=>{g.value=!1},o),s!=null&&setTimeout(()=>{if(!D.value&&!O.value){const _=new Error(`Async component timed out after ${s}ms.`);A(_),O.value=_}},s),d().then(()=>{D.value=!0,v.parent&&Cn(v.parent.vnode)&&so(v.parent.update)}).catch(_=>{A(_),O.value=_}),()=>{if(D.value&&c)return hr(c,v);if(O.value&&r)return _e(r,{error:O.value});if(n&&!g.value)return _e(n)}}})}function hr(e,{vnode:{ref:t,props:n,children:r,shapeFlag:o},parent:s}){const i=_e(e,n,r);return i.ref=t,i}const Cn=e=>e.type.__isKeepAlive;function ka(e,t){hi(e,"a",t)}function Ma(e,t){hi(e,"da",t)}function hi(e,t,n=ye){const r=e.__wdc||(e.__wdc=()=>{let o=n;for(;o;){if(o.isDeactivated)return;o=o.parent}return e()});if(rr(t,r,n),n){let o=n.parent;for(;o&&o.parent;)Cn(o.parent.vnode)&&ja(r,t,n,o),o=o.parent}}function ja(e,t,n,r){const o=rr(t,e,r,!0);lo(()=>{Kr(r[t],o)},n)}function rr(e,t,n=ye,r=!1){if(n){const o=n[e]||(n[e]=[]),s=t.__weh||(t.__weh=(...i)=>{if(n.isUnmounted)return;Jt(),Ut(n);const l=ze(t,n,e,i);return Ft(),Qt(),l});return r?o.unshift(s):o.push(s),s}}const ot=e=>(t,n=ye)=>(!qt||e==="sp")&&rr(e,t,n),pi=ot("bm"),vt=ot("m"),Na=ot("bu"),Ha=ot("u"),io=ot("bum"),lo=ot("um"),$a=ot("sp"),za=ot("rtg"),Va=ot("rtc");function Ua(e,t=ye){rr("ec",e,t)}function rh(e,t){const n=Re;if(n===null)return e;const r=ir(n)||n.proxy,o=e.dirs||(e.dirs=[]);for(let s=0;st(i,l,void 0,s&&s[l]));else{const i=Object.keys(e);o=new Array(i.length);for(let l=0,a=i.length;lKn(t)?!(t.type===Me||t.type===Se&&!gi(t.children)):!0)?e:null}const xr=e=>e?xi(e)?ir(e)||e.proxy:xr(e.parent):null,Vn=we(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>xr(e.parent),$root:e=>xr(e.root),$emit:e=>e.emit,$options:e=>_i(e),$forceUpdate:e=>e.f||(e.f=()=>so(e.update)),$nextTick:e=>e.n||(e.n=oo.bind(e.proxy)),$watch:e=>xa.bind(e)}),Ja={get({_:e},t){const{ctx:n,setupState:r,data:o,props:s,accessCache:i,type:l,appContext:a}=e;let c;if(t[0]!=="$"){const v=i[t];if(v!==void 0)switch(v){case 1:return r[t];case 2:return o[t];case 4:return n[t];case 3:return s[t]}else{if(r!==pe&&se(r,t))return i[t]=1,r[t];if(o!==pe&&se(o,t))return i[t]=2,o[t];if((c=e.propsOptions[0])&&se(c,t))return i[t]=3,s[t];if(n!==pe&&se(n,t))return i[t]=4,n[t];Dr&&(i[t]=0)}}const f=Vn[t];let p,d;if(f)return t==="$attrs"&&je(e,"get",t),f(e);if((p=l.__cssModules)&&(p=p[t]))return p;if(n!==pe&&se(n,t))return i[t]=4,n[t];if(d=a.config.globalProperties,se(d,t))return d[t]},set({_:e},t,n){const{data:r,setupState:o,ctx:s}=e;return o!==pe&&se(o,t)?(o[t]=n,!0):r!==pe&&se(r,t)?(r[t]=n,!0):se(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(s[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:o,propsOptions:s}},i){let l;return!!n[i]||e!==pe&&se(e,i)||t!==pe&&se(t,i)||(l=s[0])&&se(l,i)||se(r,i)||se(Vn,i)||se(o.config.globalProperties,i)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:se(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};let Dr=!0;function Qa(e){const t=_i(e),n=e.proxy,r=e.ctx;Dr=!1,t.beforeCreate&&Ho(t.beforeCreate,e,"bc");const{data:o,computed:s,methods:i,watch:l,provide:a,inject:c,created:f,beforeMount:p,mounted:d,beforeUpdate:v,updated:A,activated:D,deactivated:O,beforeDestroy:g,beforeUnmount:_,destroyed:R,unmounted:M,render:q,renderTracked:$,renderTriggered:I,errorCaptured:m,serverPrefetch:W,expose:H,inheritAttrs:K,components:j,directives:C,filters:P}=t;if(c&&Ya(c,r,null,e.appContext.config.unwrapInjectedRef),i)for(const G in i){const oe=i[G];te(oe)&&(r[G]=oe.bind(n))}if(o){const G=o.call(n,n);be(G)&&(e.data=Yt(G))}if(Dr=!0,s)for(const G in s){const oe=s[G],Ae=te(oe)?oe.bind(n,n):te(oe.get)?oe.get.bind(n,n):We,Te=!te(oe)&&te(oe.set)?oe.set.bind(n):We,xe=ve({get:Ae,set:Te});Object.defineProperty(r,G,{enumerable:!0,configurable:!0,get:()=>xe.value,set:Ne=>xe.value=Ne})}if(l)for(const G in l)vi(l[G],r,n,G);if(a){const G=te(a)?a.call(n):a;Reflect.ownKeys(G).forEach(oe=>{Lt(oe,G[oe])})}f&&Ho(f,e,"c");function N(G,oe){Y(oe)?oe.forEach(Ae=>G(Ae.bind(n))):oe&&G(oe.bind(n))}if(N(pi,p),N(vt,d),N(Na,v),N(Ha,A),N(ka,D),N(Ma,O),N(Ua,m),N(Va,$),N(za,I),N(io,_),N(lo,M),N($a,W),Y(H))if(H.length){const G=e.exposed||(e.exposed={});H.forEach(oe=>{Object.defineProperty(G,oe,{get:()=>n[oe],set:Ae=>n[oe]=Ae})})}else e.exposed||(e.exposed={});q&&e.render===We&&(e.render=q),K!=null&&(e.inheritAttrs=K),j&&(e.components=j),C&&(e.directives=C)}function Ya(e,t,n=We,r=!1){Y(e)&&(e=Ir(e));for(const o in e){const s=e[o];let i;be(s)?"default"in s?i=Ce(s.from||o,s.default,!0):i=Ce(s.from||o):i=Ce(s),Be(i)&&r?Object.defineProperty(t,o,{enumerable:!0,configurable:!0,get:()=>i.value,set:l=>i.value=l}):t[o]=i}}function Ho(e,t,n){ze(Y(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,n)}function vi(e,t,n,r){const o=r.includes(".")?ci(n,r):()=>n[r];if(me(e)){const s=t[e];te(s)&&nt(o,s)}else if(te(e))nt(o,e.bind(n));else if(be(e))if(Y(e))e.forEach(s=>vi(s,t,n,r));else{const s=te(e.handler)?e.handler.bind(n):t[e.handler];te(s)&&nt(o,s,e)}}function _i(e){const t=e.type,{mixins:n,extends:r}=t,{mixins:o,optionsCache:s,config:{optionMergeStrategies:i}}=e.appContext,l=s.get(t);let a;return l?a=l:!o.length&&!n&&!r?a=t:(a={},o.length&&o.forEach(c=>Un(a,c,i,!0)),Un(a,t,i)),s.set(t,a),a}function Un(e,t,n,r=!1){const{mixins:o,extends:s}=t;s&&Un(e,s,n,!0),o&&o.forEach(i=>Un(e,i,n,!0));for(const i in t)if(!(r&&i==="expose")){const l=Ga[i]||n&&n[i];e[i]=l?l(e[i],t[i]):t[i]}return e}const Ga={data:$o,props:yt,emits:yt,methods:yt,computed:yt,beforeCreate:Oe,created:Oe,beforeMount:Oe,mounted:Oe,beforeUpdate:Oe,updated:Oe,beforeDestroy:Oe,beforeUnmount:Oe,destroyed:Oe,unmounted:Oe,activated:Oe,deactivated:Oe,errorCaptured:Oe,serverPrefetch:Oe,components:yt,directives:yt,watch:Xa,provide:$o,inject:Za};function $o(e,t){return t?e?function(){return we(te(e)?e.call(this,this):e,te(t)?t.call(this,this):t)}:t:e}function Za(e,t){return yt(Ir(e),Ir(t))}function Ir(e){if(Y(e)){const t={};for(let n=0;n0)&&!(i&16)){if(i&8){const f=e.vnode.dynamicProps;for(let p=0;p{a=!0;const[d,v]=bi(p,t,!0);we(i,d),v&&l.push(...v)};!n&&t.mixins.length&&t.mixins.forEach(f),e.extends&&f(e.extends),e.mixins&&e.mixins.forEach(f)}if(!s&&!a)return r.set(e,Ht),Ht;if(Y(s))for(let f=0;f-1,v[1]=D<0||A-1||se(v,"default"))&&l.push(p)}}}const c=[i,l];return r.set(e,c),c}function zo(e){return e[0]!=="$"}function Vo(e){const t=e&&e.toString().match(/^\s*function (\w+)/);return t?t[1]:e===null?"null":""}function Uo(e,t){return Vo(e)===Vo(t)}function qo(e,t){return Y(t)?t.findIndex(n=>Uo(n,e)):te(t)&&Uo(t,e)?0:-1}const yi=e=>e[0]==="_"||e==="$stable",ao=e=>Y(e)?e.map(Ue):[Ue(e)],nc=(e,t,n)=>{if(t._n)return t;const r=Pa((...o)=>ao(t(...o)),n);return r._c=!1,r},Bi=(e,t,n)=>{const r=e._ctx;for(const o in e){if(yi(o))continue;const s=e[o];if(te(s))t[o]=nc(o,s,r);else if(s!=null){const i=ao(s);t[o]=()=>i}}},Ci=(e,t)=>{const n=ao(t);e.slots.default=()=>n},rc=(e,t)=>{if(e.vnode.shapeFlag&32){const n=t._;n?(e.slots=ae(t),Nn(t,"_",n)):Bi(t,e.slots={})}else e.slots={},t&&Ci(e,t);Nn(e.slots,sr,1)},oc=(e,t,n)=>{const{vnode:r,slots:o}=e;let s=!0,i=pe;if(r.shapeFlag&32){const l=t._;l?n&&l===1?s=!1:(we(o,t),!n&&l===1&&delete o._):(s=!t.$stable,Bi(t,o)),i=t}else t&&(Ci(e,t),i={default:1});if(s)for(const l in o)!yi(l)&&!(l in i)&&delete o[l]};function wi(){return{app:null,config:{isNativeTag:Sl,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let sc=0;function ic(e,t){return function(r,o=null){te(r)||(r=Object.assign({},r)),o!=null&&!be(o)&&(o=null);const s=wi(),i=new Set;let l=!1;const a=s.app={_uid:sc++,_component:r,_props:o,_container:null,_context:s,_instance:null,version:wc,get config(){return s.config},set config(c){},use(c,...f){return i.has(c)||(c&&te(c.install)?(i.add(c),c.install(a,...f)):te(c)&&(i.add(c),c(a,...f))),a},mixin(c){return s.mixins.includes(c)||s.mixins.push(c),a},component(c,f){return f?(s.components[c]=f,a):s.components[c]},directive(c,f){return f?(s.directives[c]=f,a):s.directives[c]},mount(c,f,p){if(!l){const d=_e(r,o);return d.appContext=s,f&&t?t(d,c):e(d,c,p),l=!0,a._container=c,c.__vue_app__=a,ir(d.component)||d.component.proxy}},unmount(){l&&(e(null,a._container),delete a._container.__vue_app__)},provide(c,f){return s.provides[c]=f,a}};return a}}function qn(e,t,n,r,o=!1){if(Y(e)){e.forEach((d,v)=>qn(d,t&&(Y(t)?t[v]:t),n,r,o));return}if(Vt(r)&&!o)return;const s=r.shapeFlag&4?ir(r.component)||r.component.proxy:r.el,i=o?null:s,{i:l,r:a}=e,c=t&&t.r,f=l.refs===pe?l.refs={}:l.refs,p=l.setupState;if(c!=null&&c!==a&&(me(c)?(f[c]=null,se(p,c)&&(p[c]=null)):Be(c)&&(c.value=null)),te(a))mt(a,l,12,[i,f]);else{const d=me(a),v=Be(a);if(d||v){const A=()=>{if(e.f){const D=d?f[a]:a.value;o?Y(D)&&Kr(D,s):Y(D)?D.includes(s)||D.push(s):d?(f[a]=[s],se(p,a)&&(p[a]=f[a])):(a.value=[s],e.k&&(f[e.k]=a.value))}else d?(f[a]=i,se(p,a)&&(p[a]=i)):Be(a)&&(a.value=i,e.k&&(f[e.k]=i))};i?(A.id=-1,Fe(A,n)):A()}}}let it=!1;const xn=e=>/svg/.test(e.namespaceURI)&&e.tagName!=="foreignObject",Dn=e=>e.nodeType===8;function lc(e){const{mt:t,p:n,o:{patchProp:r,createText:o,nextSibling:s,parentNode:i,remove:l,insert:a,createComment:c}}=e,f=(g,_)=>{if(!_.hasChildNodes()){n(null,g,_),$n();return}it=!1,p(_.firstChild,g,null,null,null),$n(),it&&console.error("Hydration completed but contains mismatches.")},p=(g,_,R,M,q,$=!1)=>{const I=Dn(g)&&g.data==="[",m=()=>D(g,_,R,M,q,I),{type:W,ref:H,shapeFlag:K,patchFlag:j}=_,C=g.nodeType;_.el=g,j===-2&&($=!1,_.dynamicChildren=null);let P=null;switch(W){case vn:C!==3?_.children===""?(a(_.el=o(""),g.parentElement,g),P=g):P=m():(g.data!==_.children&&(it=!0,g.data=_.children),P=s(g));break;case Me:C!==8||I?P=m():P=s(g);break;case un:if(C!==1)P=m();else{P=g;const X=!_.children.length;for(let N=0;N<_.staticCount;N++)X&&(_.children+=P.outerHTML),N===_.staticCount-1&&(_.anchor=P),P=s(P);return P}break;case Se:I?P=A(g,_,R,M,q,$):P=m();break;default:if(K&1)C!==1||_.type.toLowerCase()!==g.tagName.toLowerCase()?P=m():P=d(g,_,R,M,q,$);else if(K&6){_.slotScopeIds=q;const X=i(g);if(t(_,X,null,R,M,xn(X),$),P=I?O(g):s(g),P&&Dn(P)&&P.data==="teleport end"&&(P=s(P)),Vt(_)){let N;I?(N=_e(Se),N.anchor=P?P.previousSibling:X.lastChild):N=g.nodeType===3?co(""):_e("div"),N.el=g,_.component.subTree=N}}else K&64?C!==8?P=m():P=_.type.hydrate(g,_,R,M,q,$,e,v):K&128&&(P=_.type.hydrate(g,_,R,M,xn(i(g)),q,$,e,p))}return H!=null&&qn(H,null,M,_),P},d=(g,_,R,M,q,$)=>{$=$||!!_.dynamicChildren;const{type:I,props:m,patchFlag:W,shapeFlag:H,dirs:K}=_,j=I==="input"&&K||I==="option";if(j||W!==-1){if(K&&Ye(_,null,R,"created"),m)if(j||!$||W&48)for(const P in m)(j&&P.endsWith("value")||yn(P)&&!ln(P))&&r(g,P,null,m[P],!1,void 0,R);else m.onClick&&r(g,"onClick",null,m.onClick,!1,void 0,R);let C;if((C=m&&m.onVnodeBeforeMount)&&$e(C,R,_),K&&Ye(_,null,R,"beforeMount"),((C=m&&m.onVnodeMounted)||K)&&li(()=>{C&&$e(C,R,_),K&&Ye(_,null,R,"mounted")},M),H&16&&!(m&&(m.innerHTML||m.textContent))){let P=v(g.firstChild,_,g,R,M,q,$);for(;P;){it=!0;const X=P;P=P.nextSibling,l(X)}}else H&8&&g.textContent!==_.children&&(it=!0,g.textContent=_.children)}return g.nextSibling},v=(g,_,R,M,q,$,I)=>{I=I||!!_.dynamicChildren;const m=_.children,W=m.length;for(let H=0;H{const{slotScopeIds:I}=_;I&&(q=q?q.concat(I):I);const m=i(g),W=v(s(g),_,m,R,M,q,$);return W&&Dn(W)&&W.data==="]"?s(_.anchor=W):(it=!0,a(_.anchor=c("]"),m,W),W)},D=(g,_,R,M,q,$)=>{if(it=!0,_.el=null,$){const W=O(g);for(;;){const H=s(g);if(H&&H!==W)l(H);else break}}const I=s(g),m=i(g);return l(g),n(null,_,m,I,R,M,xn(m),q),I},O=g=>{let _=0;for(;g;)if(g=s(g),g&&Dn(g)&&(g.data==="["&&_++,g.data==="]")){if(_===0)return s(g);_--}return g};return[f,p]}const Fe=li;function ac(e){return cc(e,lc)}function cc(e,t){const n=jl();n.__VUE__=!0;const{insert:r,remove:o,patchProp:s,createElement:i,createText:l,createComment:a,setText:c,setElementText:f,parentNode:p,nextSibling:d,setScopeId:v=We,cloneNode:A,insertStaticContent:D}=e,O=(u,h,E,B=null,y=null,T=null,k=!1,L=null,S=!!h.dynamicChildren)=>{if(u===h)return;u&&!wt(u,h)&&(B=V(u),Le(u,y,T,!0),u=null),h.patchFlag===-2&&(S=!1,h.dynamicChildren=null);const{type:w,ref:J,shapeFlag:U}=h;switch(w){case vn:g(u,h,E,B);break;case Me:_(u,h,E,B);break;case un:u==null&&R(h,E,B,k);break;case Se:C(u,h,E,B,y,T,k,L,S);break;default:U&1?$(u,h,E,B,y,T,k,L,S):U&6?P(u,h,E,B,y,T,k,L,S):(U&64||U&128)&&w.process(u,h,E,B,y,T,k,L,S,ue)}J!=null&&y&&qn(J,u&&u.ref,T,h||u,!h)},g=(u,h,E,B)=>{if(u==null)r(h.el=l(h.children),E,B);else{const y=h.el=u.el;h.children!==u.children&&c(y,h.children)}},_=(u,h,E,B)=>{u==null?r(h.el=a(h.children||""),E,B):h.el=u.el},R=(u,h,E,B)=>{[u.el,u.anchor]=D(u.children,h,E,B,u.el,u.anchor)},M=({el:u,anchor:h},E,B)=>{let y;for(;u&&u!==h;)y=d(u),r(u,E,B),u=y;r(h,E,B)},q=({el:u,anchor:h})=>{let E;for(;u&&u!==h;)E=d(u),o(u),u=E;o(h)},$=(u,h,E,B,y,T,k,L,S)=>{k=k||h.type==="svg",u==null?I(h,E,B,y,T,k,L,S):H(u,h,y,T,k,L,S)},I=(u,h,E,B,y,T,k,L)=>{let S,w;const{type:J,props:U,shapeFlag:Q,transition:Z,patchFlag:ie,dirs:fe}=u;if(u.el&&A!==void 0&&ie===-1)S=u.el=A(u.el);else{if(S=u.el=i(u.type,T,U&&U.is,U),Q&8?f(S,u.children):Q&16&&W(u.children,S,null,B,y,T&&J!=="foreignObject",k,L),fe&&Ye(u,null,B,"created"),U){for(const Ee in U)Ee!=="value"&&!ln(Ee)&&s(S,Ee,null,U[Ee],T,u.children,B,y,F);"value"in U&&s(S,"value",null,U.value),(w=U.onVnodeBeforeMount)&&$e(w,B,u)}m(S,u,u.scopeId,k,B)}fe&&Ye(u,null,B,"beforeMount");const de=(!y||y&&!y.pendingBranch)&&Z&&!Z.persisted;de&&Z.beforeEnter(S),r(S,h,E),((w=U&&U.onVnodeMounted)||de||fe)&&Fe(()=>{w&&$e(w,B,u),de&&Z.enter(S),fe&&Ye(u,null,B,"mounted")},y)},m=(u,h,E,B,y)=>{if(E&&v(u,E),B)for(let T=0;T{for(let w=S;w{const L=h.el=u.el;let{patchFlag:S,dynamicChildren:w,dirs:J}=h;S|=u.patchFlag&16;const U=u.props||pe,Q=h.props||pe;let Z;E&&_t(E,!1),(Z=Q.onVnodeBeforeUpdate)&&$e(Z,E,h,u),J&&Ye(h,u,E,"beforeUpdate"),E&&_t(E,!0);const ie=y&&h.type!=="foreignObject";if(w?K(u.dynamicChildren,w,L,E,B,ie,T):k||Ae(u,h,L,null,E,B,ie,T,!1),S>0){if(S&16)j(L,h,U,Q,E,B,y);else if(S&2&&U.class!==Q.class&&s(L,"class",null,Q.class,y),S&4&&s(L,"style",U.style,Q.style,y),S&8){const fe=h.dynamicProps;for(let de=0;de{Z&&$e(Z,E,h,u),J&&Ye(h,u,E,"updated")},B)},K=(u,h,E,B,y,T,k)=>{for(let L=0;L{if(E!==B){for(const L in B){if(ln(L))continue;const S=B[L],w=E[L];S!==w&&L!=="value"&&s(u,L,w,S,k,h.children,y,T,F)}if(E!==pe)for(const L in E)!ln(L)&&!(L in B)&&s(u,L,E[L],null,k,h.children,y,T,F);"value"in B&&s(u,"value",E.value,B.value)}},C=(u,h,E,B,y,T,k,L,S)=>{const w=h.el=u?u.el:l(""),J=h.anchor=u?u.anchor:l("");let{patchFlag:U,dynamicChildren:Q,slotScopeIds:Z}=h;Z&&(L=L?L.concat(Z):Z),u==null?(r(w,E,B),r(J,E,B),W(h.children,E,J,y,T,k,L,S)):U>0&&U&64&&Q&&u.dynamicChildren?(K(u.dynamicChildren,Q,E,y,T,k,L),(h.key!=null||y&&h===y.subTree)&&Ri(u,h,!0)):Ae(u,h,E,J,y,T,k,L,S)},P=(u,h,E,B,y,T,k,L,S)=>{h.slotScopeIds=L,u==null?h.shapeFlag&512?y.ctx.activate(h,E,B,k,S):X(h,E,B,y,T,k,S):N(u,h,S)},X=(u,h,E,B,y,T,k)=>{const L=u.component=vc(u,B,y);if(Cn(u)&&(L.ctx.renderer=ue),_c(L),L.asyncDep){if(y&&y.registerDep(L,G),!u.el){const S=L.subTree=_e(Me);_(null,S,h,E)}return}G(L,u,h,E,y,T,k)},N=(u,h,E)=>{const B=h.component=u.component;if(La(u,h,E))if(B.asyncDep&&!B.asyncResolved){oe(B,h,E);return}else B.next=h,Ba(B.update),B.update();else h.el=u.el,B.vnode=h},G=(u,h,E,B,y,T,k)=>{const L=()=>{if(u.isMounted){let{next:J,bu:U,u:Q,parent:Z,vnode:ie}=u,fe=J,de;_t(u,!1),J?(J.el=ie.el,oe(u,J,k)):J=ie,U&&ur(U),(de=J.props&&J.props.onVnodeBeforeUpdate)&&$e(de,Z,J,ie),_t(u,!0);const Ee=fr(u),Ve=u.subTree;u.subTree=Ee,O(Ve,Ee,p(Ve.el),V(Ve),u,y,T),J.el=Ee.el,fe===null&&Fa(u,Ee.el),Q&&Fe(Q,y),(de=J.props&&J.props.onVnodeUpdated)&&Fe(()=>$e(de,Z,J,ie),y)}else{let J;const{el:U,props:Q}=h,{bm:Z,m:ie,parent:fe}=u,de=Vt(h);if(_t(u,!1),Z&&ur(Z),!de&&(J=Q&&Q.onVnodeBeforeMount)&&$e(J,fe,h),_t(u,!0),U&&ee){const Ee=()=>{u.subTree=fr(u),ee(U,u.subTree,u,y,null)};de?h.type.__asyncLoader().then(()=>!u.isUnmounted&&Ee()):Ee()}else{const Ee=u.subTree=fr(u);O(null,Ee,E,B,u,y,T),h.el=Ee.el}if(ie&&Fe(ie,y),!de&&(J=Q&&Q.onVnodeMounted)){const Ee=h;Fe(()=>$e(J,fe,Ee),y)}(h.shapeFlag&256||fe&&Vt(fe.vnode)&&fe.vnode.shapeFlag&256)&&u.a&&Fe(u.a,y),u.isMounted=!0,h=E=B=null}},S=u.effect=new Yr(L,()=>so(w),u.scope),w=u.update=()=>S.run();w.id=u.uid,_t(u,!0),w()},oe=(u,h,E)=>{h.component=u;const B=u.vnode.props;u.vnode=h,u.next=null,tc(u,h.props,B,E),oc(u,h.children,E),Jt(),tr(void 0,u.update),Qt()},Ae=(u,h,E,B,y,T,k,L,S=!1)=>{const w=u&&u.children,J=u?u.shapeFlag:0,U=h.children,{patchFlag:Q,shapeFlag:Z}=h;if(Q>0){if(Q&128){xe(w,U,E,B,y,T,k,L,S);return}else if(Q&256){Te(w,U,E,B,y,T,k,L,S);return}}Z&8?(J&16&&F(w,y,T),U!==w&&f(E,U)):J&16?Z&16?xe(w,U,E,B,y,T,k,L,S):F(w,y,T,!0):(J&8&&f(E,""),Z&16&&W(U,E,B,y,T,k,L,S))},Te=(u,h,E,B,y,T,k,L,S)=>{u=u||Ht,h=h||Ht;const w=u.length,J=h.length,U=Math.min(w,J);let Q;for(Q=0;QJ?F(u,y,T,!0,!1,U):W(h,E,B,y,T,k,L,S,U)},xe=(u,h,E,B,y,T,k,L,S)=>{let w=0;const J=h.length;let U=u.length-1,Q=J-1;for(;w<=U&&w<=Q;){const Z=u[w],ie=h[w]=S?ft(h[w]):Ue(h[w]);if(wt(Z,ie))O(Z,ie,E,null,y,T,k,L,S);else break;w++}for(;w<=U&&w<=Q;){const Z=u[U],ie=h[Q]=S?ft(h[Q]):Ue(h[Q]);if(wt(Z,ie))O(Z,ie,E,null,y,T,k,L,S);else break;U--,Q--}if(w>U){if(w<=Q){const Z=Q+1,ie=ZQ)for(;w<=U;)Le(u[w],y,T,!0),w++;else{const Z=w,ie=w,fe=new Map;for(w=ie;w<=Q;w++){const De=h[w]=S?ft(h[w]):Ue(h[w]);De.key!=null&&fe.set(De.key,w)}let de,Ee=0;const Ve=Q-ie+1;let Dt=!1,yo=0;const Xt=new Array(Ve);for(w=0;w=Ve){Le(De,y,T,!0);continue}let Qe;if(De.key!=null)Qe=fe.get(De.key);else for(de=ie;de<=Q;de++)if(Xt[de-ie]===0&&wt(De,h[de])){Qe=de;break}Qe===void 0?Le(De,y,T,!0):(Xt[Qe-ie]=w+1,Qe>=yo?yo=Qe:Dt=!0,O(De,h[Qe],E,null,y,T,k,L,S),Ee++)}const Bo=Dt?uc(Xt):Ht;for(de=Bo.length-1,w=Ve-1;w>=0;w--){const De=ie+w,Qe=h[De],Co=De+1{const{el:T,type:k,transition:L,children:S,shapeFlag:w}=u;if(w&6){Ne(u.component.subTree,h,E,B);return}if(w&128){u.suspense.move(h,E,B);return}if(w&64){k.move(u,h,E,ue);return}if(k===Se){r(T,h,E);for(let U=0;UL.enter(T),y);else{const{leave:U,delayLeave:Q,afterLeave:Z}=L,ie=()=>r(T,h,E),fe=()=>{U(T,()=>{ie(),Z&&Z()})};Q?Q(T,ie,fe):fe()}else r(T,h,E)},Le=(u,h,E,B=!1,y=!1)=>{const{type:T,props:k,ref:L,children:S,dynamicChildren:w,shapeFlag:J,patchFlag:U,dirs:Q}=u;if(L!=null&&qn(L,null,E,u,!0),J&256){h.ctx.deactivate(u);return}const Z=J&1&&Q,ie=!Vt(u);let fe;if(ie&&(fe=k&&k.onVnodeBeforeUnmount)&&$e(fe,h,u),J&6)z(u.component,E,B);else{if(J&128){u.suspense.unmount(E,B);return}Z&&Ye(u,null,h,"beforeUnmount"),J&64?u.type.remove(u,h,E,y,ue,B):w&&(T!==Se||U>0&&U&64)?F(w,h,E,!1,!0):(T===Se&&U&384||!y&&J&16)&&F(S,h,E),B&&Zt(u)}(ie&&(fe=k&&k.onVnodeUnmounted)||Z)&&Fe(()=>{fe&&$e(fe,h,u),Z&&Ye(u,null,h,"unmounted")},E)},Zt=u=>{const{type:h,el:E,anchor:B,transition:y}=u;if(h===Se){b(E,B);return}if(h===un){q(u);return}const T=()=>{o(E),y&&!y.persisted&&y.afterLeave&&y.afterLeave()};if(u.shapeFlag&1&&y&&!y.persisted){const{leave:k,delayLeave:L}=y,S=()=>k(E,T);L?L(u.el,T,S):S()}else T()},b=(u,h)=>{let E;for(;u!==h;)E=d(u),o(u),u=E;o(h)},z=(u,h,E)=>{const{bum:B,scope:y,update:T,subTree:k,um:L}=u;B&&ur(B),y.stop(),T&&(T.active=!1,Le(k,u,h,E)),L&&Fe(L,h),Fe(()=>{u.isUnmounted=!0},h),h&&h.pendingBranch&&!h.isUnmounted&&u.asyncDep&&!u.asyncResolved&&u.suspenseId===h.pendingId&&(h.deps--,h.deps===0&&h.resolve())},F=(u,h,E,B=!1,y=!1,T=0)=>{for(let k=T;ku.shapeFlag&6?V(u.component.subTree):u.shapeFlag&128?u.suspense.next():d(u.anchor||u.el),ce=(u,h,E)=>{u==null?h._vnode&&Le(h._vnode,null,null,!0):O(h._vnode||null,u,h,null,null,null,E),$n(),h._vnode=u},ue={p:O,um:Le,m:Ne,r:Zt,mt:X,mc:W,pc:Ae,pbc:K,n:V,o:e};let ne,ee;return t&&([ne,ee]=t(ue)),{render:ce,hydrate:ne,createApp:ic(ce,ne)}}function _t({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function Ri(e,t,n=!1){const r=e.children,o=t.children;if(Y(r)&&Y(o))for(let s=0;s>1,e[n[l]]0&&(t[r]=n[s-1]),n[s]=r)}}for(s=n.length,i=n[s-1];s-- >0;)n[s]=i,i=t[i];return n}const fc=e=>e.__isTeleport,Se=Symbol(void 0),vn=Symbol(void 0),Me=Symbol(void 0),un=Symbol(void 0),fn=[];let Ke=null;function or(e=!1){fn.push(Ke=e?null:[])}function dc(){fn.pop(),Ke=fn[fn.length-1]||null}let _n=1;function Ko(e){_n+=e}function Pi(e){return e.dynamicChildren=_n>0?Ke||Ht:null,dc(),_n>0&&Ke&&Ke.push(e),e}function Ti(e,t,n,r,o,s){return Pi(Fi(e,t,n,r,o,s,!0))}function Oi(e,t,n,r,o){return Pi(_e(e,t,n,r,o,!0))}function Kn(e){return e?e.__v_isVNode===!0:!1}function wt(e,t){return e.type===t.type&&e.key===t.key}const sr="__vInternal",Li=({key:e})=>e!=null?e:null,Mn=({ref:e,ref_key:t,ref_for:n})=>e!=null?me(e)||Be(e)||te(e)?{i:Re,r:e,k:t,f:!!n}:e:null;function Fi(e,t=null,n=null,r=0,o=null,s=e===Se?0:1,i=!1,l=!1){const a={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Li(t),ref:t&&Mn(t),scopeId:ii,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:s,patchFlag:r,dynamicProps:o,dynamicChildren:null,appContext:null};return l?(uo(a,n),s&128&&e.normalize(a)):n&&(a.shapeFlag|=me(n)?8:16),_n>0&&!i&&Ke&&(a.patchFlag>0||s&6)&&a.patchFlag!==32&&Ke.push(a),a}const _e=hc;function hc(e,t=null,n=null,r=0,o=null,s=!1){if((!e||e===Ka)&&(e=Me),Kn(e)){const l=gt(e,t,!0);return n&&uo(l,n),_n>0&&!s&&Ke&&(l.shapeFlag&6?Ke[Ke.indexOf(e)]=l:Ke.push(l)),l.patchFlag|=-2,l}if(Cc(e)&&(e=e.__vccOpts),t){t=pc(t);let{class:l,style:a}=t;l&&!me(l)&&(t.class=bn(l)),be(a)&&(Js(a)&&!Y(a)&&(a=we({},a)),t.style=Yn(a))}const i=me(e)?1:Sa(e)?128:fc(e)?64:be(e)?4:te(e)?2:0;return Fi(e,t,n,r,o,i,s,!0)}function pc(e){return e?Js(e)||sr in e?we({},e):e:null}function gt(e,t,n=!1){const{props:r,ref:o,patchFlag:s,children:i}=e,l=t?mc(r||{},t):r;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:l,key:l&&Li(l),ref:t&&t.ref?n&&o?Y(o)?o.concat(Mn(t)):[o,Mn(t)]:Mn(t):o,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:i,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Se?s===-1?16:s|16:s,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&>(e.ssContent),ssFallback:e.ssFallback&>(e.ssFallback),el:e.el,anchor:e.anchor}}function co(e=" ",t=0){return _e(vn,null,e,t)}function sh(e,t){const n=_e(un,null,e);return n.staticCount=t,n}function ih(e="",t=!1){return t?(or(),Oi(Me,null,e)):_e(Me,null,e)}function Ue(e){return e==null||typeof e=="boolean"?_e(Me):Y(e)?_e(Se,null,e.slice()):typeof e=="object"?ft(e):_e(vn,null,String(e))}function ft(e){return e.el===null||e.memo?e:gt(e)}function uo(e,t){let n=0;const{shapeFlag:r}=e;if(t==null)t=null;else if(Y(t))n=16;else if(typeof t=="object")if(r&65){const o=t.default;o&&(o._c&&(o._d=!1),uo(e,o()),o._c&&(o._d=!0));return}else{n=32;const o=t._;!o&&!(sr in t)?t._ctx=Re:o===3&&Re&&(Re.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else te(t)?(t={default:t,_ctx:Re},n=32):(t=String(t),r&64?(n=16,t=[co(t)]):n=8);e.children=t,e.shapeFlag|=n}function mc(...e){const t={};for(let n=0;nye||Re,Ut=e=>{ye=e,e.scope.on()},Ft=()=>{ye&&ye.scope.off(),ye=null};function xi(e){return e.vnode.shapeFlag&4}let qt=!1;function _c(e,t=!1){qt=t;const{props:n,children:r}=e.vnode,o=xi(e);ec(e,n,o,t),rc(e,r);const s=o?Ac(e,t):void 0;return qt=!1,s}function Ac(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=Qs(new Proxy(e.ctx,Ja));const{setup:r}=n;if(r){const o=e.setupContext=r.length>1?yc(e):null;Ut(e),Jt();const s=mt(r,e,0,[e.props,o]);if(Qt(),Ft(),Ds(s)){if(s.then(Ft,Ft),t)return s.then(i=>{Wo(e,i,t)}).catch(i=>{Bn(i,e,0)});e.asyncDep=s}else Wo(e,s,t)}else Di(e,t)}function Wo(e,t,n){te(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:be(t)&&(e.setupState=ei(t)),Di(e,n)}let Jo;function Di(e,t,n){const r=e.type;if(!e.render){if(!t&&Jo&&!r.render){const o=r.template;if(o){const{isCustomElement:s,compilerOptions:i}=e.appContext.config,{delimiters:l,compilerOptions:a}=r,c=we(we({isCustomElement:s,delimiters:l},i),a);r.render=Jo(o,c)}}e.render=r.render||We}Ut(e),Jt(),Qa(e),Qt(),Ft()}function bc(e){return new Proxy(e.attrs,{get(t,n){return je(e,"get","$attrs"),t[n]}})}function yc(e){const t=r=>{e.exposed=r||{}};let n;return{get attrs(){return n||(n=bc(e))},slots:e.slots,emit:e.emit,expose:t}}function ir(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(ei(Qs(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Vn)return Vn[n](e)}}))}function Bc(e){return te(e)&&e.displayName||e.name}function Cc(e){return te(e)&&"__vccOpts"in e}const ve=(e,t)=>Aa(e,t,qt);function ge(e,t,n){const r=arguments.length;return r===2?be(t)&&!Y(t)?Kn(t)?_e(e,null,[t]):_e(e,t):_e(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&Kn(n)&&(n=[n]),_e(e,t,n))}const wc="3.2.34",Rc="http://www.w3.org/2000/svg",Rt=typeof document!="undefined"?document:null,Qo=Rt&&Rt.createElement("template"),Pc={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{const o=t?Rt.createElementNS(Rc,e):Rt.createElement(e,n?{is:n}:void 0);return e==="select"&&r&&r.multiple!=null&&o.setAttribute("multiple",r.multiple),o},createText:e=>Rt.createTextNode(e),createComment:e=>Rt.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Rt.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},cloneNode(e){const t=e.cloneNode(!0);return"_value"in e&&(t._value=e._value),t},insertStaticContent(e,t,n,r,o,s){const i=n?n.previousSibling:t.lastChild;if(o&&(o===s||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),n),!(o===s||!(o=o.nextSibling)););else{Qo.innerHTML=r?`${e}`:e;const l=Qo.content;if(r){const a=l.firstChild;for(;a.firstChild;)l.appendChild(a.firstChild);l.removeChild(a)}t.insertBefore(l,n)}return[i?i.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}};function Tc(e,t,n){const r=e._vtc;r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}function Oc(e,t,n){const r=e.style,o=me(n);if(n&&!o){for(const s in n)Mr(r,s,n[s]);if(t&&!me(t))for(const s in t)n[s]==null&&Mr(r,s,"")}else{const s=r.display;o?t!==n&&(r.cssText=n):t&&e.removeAttribute("style"),"_vod"in e&&(r.display=s)}}const Yo=/\s*!important$/;function Mr(e,t,n){if(Y(n))n.forEach(r=>Mr(e,t,r));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const r=Lc(e,t);Yo.test(n)?e.setProperty(St(r),n.replace(Yo,""),"important"):e[r]=n}}const Go=["Webkit","Moz","ms"],pr={};function Lc(e,t){const n=pr[t];if(n)return n;let r=Ge(t);if(r!=="filter"&&r in e)return pr[t]=r;r=Xn(r);for(let o=0;o{let e=Date.now,t=!1;if(typeof window!="undefined"){Date.now()>document.createEvent("Event").timeStamp&&(e=()=>performance.now());const n=navigator.userAgent.match(/firefox\/(\d+)/i);t=!!(n&&Number(n[1])<=53)}return[e,t]})();let jr=0;const Dc=Promise.resolve(),Ic=()=>{jr=0},kc=()=>jr||(Dc.then(Ic),jr=Ii());function Mc(e,t,n,r){e.addEventListener(t,n,r)}function jc(e,t,n,r){e.removeEventListener(t,n,r)}function Nc(e,t,n,r,o=null){const s=e._vei||(e._vei={}),i=s[t];if(r&&i)i.value=r;else{const[l,a]=Hc(t);if(r){const c=s[t]=$c(r,o);Mc(e,l,c,a)}else i&&(jc(e,l,i,a),s[t]=void 0)}}const Xo=/(?:Once|Passive|Capture)$/;function Hc(e){let t;if(Xo.test(e)){t={};let n;for(;n=e.match(Xo);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}return[St(e.slice(2)),t]}function $c(e,t){const n=r=>{const o=r.timeStamp||Ii();(xc||o>=n.attached-1)&&ze(zc(r,n.value),t,5,[r])};return n.value=e,n.attached=kc(),n}function zc(e,t){if(Y(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(r=>o=>!o._stopped&&r&&r(o))}else return t}const es=/^on[a-z]/,Vc=(e,t,n,r,o=!1,s,i,l,a)=>{t==="class"?Tc(e,r,o):t==="style"?Oc(e,n,r):yn(t)?qr(t)||Nc(e,t,n,r,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Uc(e,t,r,o))?Sc(e,t,r,s,i,l,a):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),Fc(e,t,r,o))};function Uc(e,t,n,r){return r?!!(t==="innerHTML"||t==="textContent"||t in e&&es.test(t)&&te(n)):t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA"||es.test(t)&&me(n)?!1:t in e}const lt="transition",en="animation",fo=(e,{slots:t})=>ge(ui,qc(e),t);fo.displayName="Transition";const ki={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String};fo.props=we({},ui.props,ki);const At=(e,t=[])=>{Y(e)?e.forEach(n=>n(...t)):e&&e(...t)},ts=e=>e?Y(e)?e.some(t=>t.length>1):e.length>1:!1;function qc(e){const t={};for(const C in e)C in ki||(t[C]=e[C]);if(e.css===!1)return t;const{name:n="v",type:r,duration:o,enterFromClass:s=`${n}-enter-from`,enterActiveClass:i=`${n}-enter-active`,enterToClass:l=`${n}-enter-to`,appearFromClass:a=s,appearActiveClass:c=i,appearToClass:f=l,leaveFromClass:p=`${n}-leave-from`,leaveActiveClass:d=`${n}-leave-active`,leaveToClass:v=`${n}-leave-to`}=e,A=Kc(o),D=A&&A[0],O=A&&A[1],{onBeforeEnter:g,onEnter:_,onEnterCancelled:R,onLeave:M,onLeaveCancelled:q,onBeforeAppear:$=g,onAppear:I=_,onAppearCancelled:m=R}=t,W=(C,P,X)=>{bt(C,P?f:l),bt(C,P?c:i),X&&X()};let H=!1;const K=(C,P)=>{H=!1,bt(C,p),bt(C,v),bt(C,d),P&&P()},j=C=>(P,X)=>{const N=C?I:_,G=()=>W(P,C,X);At(N,[P,G]),ns(()=>{bt(P,C?a:s),at(P,C?f:l),ts(N)||rs(P,r,D,G)})};return we(t,{onBeforeEnter(C){At(g,[C]),at(C,s),at(C,i)},onBeforeAppear(C){At($,[C]),at(C,a),at(C,c)},onEnter:j(!1),onAppear:j(!0),onLeave(C,P){H=!0;const X=()=>K(C,P);at(C,p),Qc(),at(C,d),ns(()=>{!H||(bt(C,p),at(C,v),ts(M)||rs(C,r,O,X))}),At(M,[C,X])},onEnterCancelled(C){W(C,!1),At(R,[C])},onAppearCancelled(C){W(C,!0),At(m,[C])},onLeaveCancelled(C){K(C),At(q,[C])}})}function Kc(e){if(e==null)return null;if(be(e))return[mr(e.enter),mr(e.leave)];{const t=mr(e);return[t,t]}}function mr(e){return Ms(e)}function at(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e._vtc||(e._vtc=new Set)).add(t)}function bt(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.remove(r));const{_vtc:n}=e;n&&(n.delete(t),n.size||(e._vtc=void 0))}function ns(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let Wc=0;function rs(e,t,n,r){const o=e._endId=++Wc,s=()=>{o===e._endId&&r()};if(n)return setTimeout(s,n);const{type:i,timeout:l,propCount:a}=Jc(e,t);if(!i)return r();const c=i+"end";let f=0;const p=()=>{e.removeEventListener(c,d),s()},d=v=>{v.target===e&&++f>=a&&p()};setTimeout(()=>{f(n[A]||"").split(", "),o=r(lt+"Delay"),s=r(lt+"Duration"),i=os(o,s),l=r(en+"Delay"),a=r(en+"Duration"),c=os(l,a);let f=null,p=0,d=0;t===lt?i>0&&(f=lt,p=i,d=s.length):t===en?c>0&&(f=en,p=c,d=a.length):(p=Math.max(i,c),f=p>0?i>c?lt:en:null,d=f?f===lt?s.length:a.length:0);const v=f===lt&&/\b(transform|all)(,|$)/.test(n[lt+"Property"]);return{type:f,timeout:p,propCount:d,hasTransform:v}}function os(e,t){for(;e.lengthss(n)+ss(e[r])))}function ss(e){return Number(e.slice(0,-1).replace(",","."))*1e3}function Qc(){return document.body.offsetHeight}const Yc={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},lh=(e,t)=>n=>{if(!("key"in n))return;const r=St(n.key);if(t.some(o=>o===r||Yc[o]===r))return e(n)},ah={beforeMount(e,{value:t},{transition:n}){e._vod=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):tn(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:r}){!t!=!n&&(r?t?(r.beforeEnter(e),tn(e,!0),r.enter(e)):r.leave(e,()=>{tn(e,!1)}):tn(e,t))},beforeUnmount(e,{value:t}){tn(e,t)}};function tn(e,t){e.style.display=t?e._vod:"none"}const Gc=we({patchProp:Vc},Pc);let Er,is=!1;function Zc(){return Er=is?Er:ac(Gc),is=!0,Er}const Xc=(...e)=>{const t=Zc().createApp(...e),{mount:n}=t;return t.mount=r=>{const o=eu(r);if(o)return n(o,!0,o instanceof SVGElement)},t};function eu(e){return me(e)?document.querySelector(e):e}const tu={base:"/study/",lang:"zh-CN",title:"shAilene",description:"just be simple.",head:[["link",{rel:"icon",href:"/icon/111.ico"}]],locales:{}};var nu=([e,t,n])=>e==="meta"&&t.name?`${e}.${t.name}`:["title","base"].includes(e)?e:e==="template"&&t.id?`${e}.${t.id}`:JSON.stringify([e,t,n]),ru=e=>{const t=new Set,n=[];return e.forEach(r=>{const o=nu(r);t.has(o)||(t.add(o),n.push(r))}),n},ou=e=>/^(https?:)?\/\//.test(e),ch=e=>/^mailto:/.test(e),uh=e=>/^tel:/.test(e),Mi=e=>Object.prototype.toString.call(e)==="[object Object]",su=e=>e.replace(/\/$/,""),iu=e=>e.replace(/^\//,""),ji=(e,t)=>{const n=Object.keys(e).sort((r,o)=>{const s=o.split("/").length-r.split("/").length;return s!==0?s:o.length-r.length});for(const r of n)if(t.startsWith(r))return r;return"/"};const Ni={"v-8daa1a0e":re(()=>x(()=>import("./index.html.f11d2763.js"),[])),"v-4e3aed14":re(()=>x(()=>import("./index.html.84d9f956.js"),[])),"v-2d0a8eae":re(()=>x(()=>import("./index.html.5ae480ec.js"),[])),"v-14c69af4":re(()=>x(()=>import("./index.html.a6f36b52.js"),[])),"v-2d0aa62c":re(()=>x(()=>import("./index.html.4194ee21.js"),[])),"v-73197d7b":re(()=>x(()=>import("./index.html.2d412476.js"),[])),"v-d5c1c75c":re(()=>x(()=>import("./index.html.a6f628ba.js"),[])),"v-24adc8d7":re(()=>x(()=>import("./\u8BBE\u8BA1\u6A21\u5F0F1.html.59f2acaf.js"),[])),"v-2d61ea56":re(()=>x(()=>import("./\u8BBE\u8BA1\u6A21\u5F0F2.html.f6de4e88.js"),[])),"v-4f8f811e":re(()=>x(()=>import("./gin.html.bedf9bde.js"),[])),"v-2ea03d90":re(()=>x(()=>import("./golang.html.dbe7738b.js"),[])),"v-500ab9d8":re(()=>x(()=>import("./gorm.html.5e254620.js"),[])),"v-b6ec6710":re(()=>x(()=>import("./Javaweb.html.5aa574b2.js"),[])),"v-3201b6ed":re(()=>x(()=>import("./ES.html.07e17114.js"),[])),"v-3a6a4d07":re(()=>x(()=>import("./vue\u57FA\u7840.html.62eeae42.js"),[])),"v-12a323e6":re(()=>x(()=>import("./vue\u7EC4\u4EF6.html.cc1ac58c.js"),[])),"v-57fd34d4":re(()=>x(()=>import("./\u4E00\u4E9B\u77E5\u8BC6\u70B9\u7684\u8BB0\u5F55.html.0bbe19dd.js"),[])),"v-1cbd166b":re(()=>x(()=>import("./Java\u7B14\u8BB0.html.eea0351f.js"),[])),"v-83ddddfc":re(()=>x(()=>import("./dubbo.html.aceb0d71.js"),[])),"v-1dbd0fce":re(()=>x(()=>import("./springcloud\uFF08\u4E0A\uFF09.html.d3af961f.js"),[])),"v-77987a0f":re(()=>x(()=>import("./springcloud\uFF08\u4E0B\uFF09.html.6063447d.js"),[])),"v-9ef17310":re(()=>x(()=>import("./zookeeper.html.90ea0636.js"),[])),"v-05cd8fe4":re(()=>x(()=>import("./\u300A\u5E76\u53D1\u7F16\u7A0B\u7684\u827A\u672F\u300B\u7B14\u8BB0.html.8bbaeb8b.js"),[])),"v-0013e773":re(()=>x(()=>import("./\u5E76\u53D1\u7F16\u7A0B.html.a9177a47.js"),[])),"v-4c0a9128":re(()=>x(()=>import("./\u5C1A\u7845\u8C37_\u5B8B\u7EA2\u5EB7_JDBC.html.0f329aed.js"),[])),"v-456aa1eb":re(()=>x(()=>import("./redis.html.dabb0d1a.js"),[])),"v-9f83c3ba":re(()=>x(()=>import("./Mybatis.html.cc855b6a.js"),[])),"v-21b5c2ea":re(()=>x(()=>import("./spring.html.d98785fc.js"),[])),"v-068e11cb":re(()=>x(()=>import("./springboot.html.a6d2266b.js"),[])),"v-92381d18":re(()=>x(()=>import("./springboot.html.a07c26b1.js"),[])),"v-0788dc22":re(()=>x(()=>import("./springMVC.html.c1022e1c.js"),[])),"v-4b84538b":re(()=>x(()=>import("./kafka.html.2e570e06.js"),[])),"v-1e0ac90e":re(()=>x(()=>import("./RabbitMQ.html.8b3da301.js"),[])),"v-d2a5a678":re(()=>x(()=>import("./\u64CD\u4F5C\u7CFB\u7EDF.html.30ef5701.js"),[])),"v-30eca57b":re(()=>x(()=>import("./flink\u57FA\u672C\u7BC72.html.417d9689.js"),[])),"v-791cd9a5":re(()=>x(()=>import("./MySQL\u6570\u636E\u5E93\u7B14\u8BB0-\u7B2C\u4E00\u90E8\u5206.html.62abea75.js"),[])),"v-94326c4c":re(()=>x(()=>import("./MySQL\u6570\u636E\u5E93\u7B14\u8BB0-\u7B2C\u4E8C\u90E8\u5206.html.eee773eb.js"),[])),"v-3706649a":re(()=>x(()=>import("./404.html.071da894.js"),[]))},lu={"404":re(()=>x(()=>import("./404.f91eaeb1.js"),[])),Layout:re(()=>x(()=>import("./Layout.9eb27800.js"),[]))};var Hi=Pe(wl),$i=eo({key:"",path:"",title:"",lang:"",frontmatter:{},excerpt:"",headers:[]}),tt=Pe($i),wn=()=>tt;bo.webpackHot&&(__VUE_HMR_RUNTIME__.updatePageData=e=>{Hi.value[e.key]=()=>Promise.resolve(e),e.key===tt.value.key&&(tt.value=e)});var zi=Symbol(""),au=()=>{const e=Ce(zi);if(!e)throw new Error("usePageFrontmatter() is called without provider.");return e},Vi=Symbol(""),cu=()=>{const e=Ce(Vi);if(!e)throw new Error("usePageHead() is called without provider.");return e},uu=Symbol(""),Ui=Symbol(""),fu=()=>{const e=Ce(Ui);if(!e)throw new Error("usePageLang() is called without provider.");return e},ho=Symbol(""),du=()=>{const e=Ce(ho);if(!e)throw new Error("useRouteLocale() is called without provider.");return e},ht=Pe(tu),hu=()=>ht;bo.webpackHot&&(__VUE_HMR_RUNTIME__.updateSiteData=e=>{ht.value=e});var qi=Symbol(""),fh=()=>{const e=Ce(qi);if(!e)throw new Error("useSiteLocaleData() is called without provider.");return e},pu=Symbol(""),Bt=Yt({resolvePageData:async e=>{const t=Hi.value[e],n=await(t==null?void 0:t());return n!=null?n:$i},resolvePageFrontmatter:e=>e.frontmatter,resolvePageHead:(e,t,n)=>{const r=me(t.description)?t.description:n.description,o=[...Y(t.head)?t.head:[],...n.head,["title",{},e],["meta",{name:"description",content:r}]];return ru(o)},resolvePageHeadTitle:(e,t)=>`${e.title?`${e.title} | `:""}${t.title}`,resolvePageLang:e=>e.lang||"en",resolveRouteLocale:(e,t)=>ji(e,t),resolveSiteLocaleData:(e,t)=>Ze(Ze({},e),e.locales[t])}),mu=Je({setup(e,t){const n=Pe(!1);return vt(()=>{n.value=!0}),()=>{var r,o;return n.value?(o=(r=t.slots).default)==null?void 0:o.call(r):null}}}),po=e=>{let t;e.pageKey?t=e.pageKey:t=wn().value.key;const n=Ni[t];return n?ge(n):ge("div","404 Not Found")};po.displayName="Content";po.props={pageKey:{type:String,required:!1}};var ls=Je({name:"Vuepress",setup(){const e=wn(),t=ve(()=>{let n;if(e.value.path){const r=e.value.frontmatter.layout;me(r)?n=r:n="Layout"}else n="404";return lu[n]||qa(n,!1)});return()=>ge(t.value)}}),Eu=e=>ou(e)?e:`${hu().value.base}${iu(e)}`,xt=e=>e;function Ki(e,t,n){var r,o,s;t===void 0&&(t=50),n===void 0&&(n={});var i=(r=n.isImmediate)!=null&&r,l=(o=n.callback)!=null&&o,a=n.maxWait,c=Date.now(),f=[];function p(){if(a!==void 0){var v=Date.now()-c;if(v+t>=a)return a-v}return t}var d=function(){var v=[].slice.call(arguments),A=this;return new Promise(function(D,O){var g=i&&s===void 0;if(s!==void 0&&clearTimeout(s),s=setTimeout(function(){if(s=void 0,c=Date.now(),!i){var R=e.apply(A,v);l&&l(R),f.forEach(function(M){return(0,M.resolve)(R)}),f=[]}},p()),g){var _=e.apply(A,v);return l&&l(_),D(_)}f.push({resolve:D,reject:O})})};return d.cancel=function(v){s!==void 0&&clearTimeout(s),f.forEach(function(A){return(0,A.reject)(v)}),f=[]},d}/*!
                    +var vl=Object.defineProperty,_l=Object.defineProperties;var Al=Object.getOwnPropertyDescriptors;var wo=Object.getOwnPropertySymbols;var bl=Object.prototype.hasOwnProperty,yl=Object.prototype.propertyIsEnumerable;var Ro=(e,t,n)=>t in e?vl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ze=(e,t)=>{for(var n in t||(t={}))bl.call(t,n)&&Ro(e,n,t[n]);if(wo)for(var n of wo(t))yl.call(t,n)&&Ro(e,n,t[n]);return e},Pn=(e,t)=>_l(e,Al(t));const bo={},Bl="modulepreload",Po={},Cl="/study/",x=function(t,n){return!n||n.length===0?t():Promise.all(n.map(r=>{if(r=`${Cl}${r}`,r in Po)return;Po[r]=!0;const o=r.endsWith(".css"),s=o?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${r}"]${s}`))return;const i=document.createElement("link");if(i.rel=o?"stylesheet":Bl,o||(i.as="script",i.crossOrigin=""),i.href=r,document.head.appendChild(i),o)return new Promise((l,a)=>{i.addEventListener("load",l),i.addEventListener("error",()=>a(new Error(`Unable to preload CSS for ${r}`)))})})).then(()=>t())},wl={"v-8daa1a0e":()=>x(()=>import("./index.html.96cd7f18.js"),[]).then(({data:e})=>e),"v-4e3aed14":()=>x(()=>import("./index.html.eb4fe638.js"),[]).then(({data:e})=>e),"v-2d0a8eae":()=>x(()=>import("./index.html.a0e845aa.js"),[]).then(({data:e})=>e),"v-14c69af4":()=>x(()=>import("./index.html.3bf85b9e.js"),[]).then(({data:e})=>e),"v-2d0aa62c":()=>x(()=>import("./index.html.4ea9b40b.js"),[]).then(({data:e})=>e),"v-73197d7b":()=>x(()=>import("./index.html.debf178a.js"),[]).then(({data:e})=>e),"v-d5c1c75c":()=>x(()=>import("./index.html.a15f486d.js"),[]).then(({data:e})=>e),"v-24adc8d7":()=>x(()=>import("./\u8BBE\u8BA1\u6A21\u5F0F1.html.86b74039.js"),[]).then(({data:e})=>e),"v-2d61ea56":()=>x(()=>import("./\u8BBE\u8BA1\u6A21\u5F0F2.html.e3943cda.js"),[]).then(({data:e})=>e),"v-4f8f811e":()=>x(()=>import("./gin.html.a49721b6.js"),[]).then(({data:e})=>e),"v-2ea03d90":()=>x(()=>import("./golang.html.cd5a0b46.js"),[]).then(({data:e})=>e),"v-500ab9d8":()=>x(()=>import("./gorm.html.e4710022.js"),[]).then(({data:e})=>e),"v-b6ec6710":()=>x(()=>import("./Javaweb.html.020e7587.js"),[]).then(({data:e})=>e),"v-3201b6ed":()=>x(()=>import("./ES.html.fda018d9.js"),[]).then(({data:e})=>e),"v-3a6a4d07":()=>x(()=>import("./vue\u57FA\u7840.html.4ed4544f.js"),[]).then(({data:e})=>e),"v-12a323e6":()=>x(()=>import("./vue\u7EC4\u4EF6.html.2d08ae6e.js"),[]).then(({data:e})=>e),"v-57fd34d4":()=>x(()=>import("./\u4E00\u4E9B\u77E5\u8BC6\u70B9\u7684\u8BB0\u5F55.html.a5e2280f.js"),[]).then(({data:e})=>e),"v-1cbd166b":()=>x(()=>import("./Java\u7B14\u8BB0.html.c673c7f2.js"),[]).then(({data:e})=>e),"v-83ddddfc":()=>x(()=>import("./dubbo.html.d317341f.js"),[]).then(({data:e})=>e),"v-1dbd0fce":()=>x(()=>import("./springcloud\uFF08\u4E0A\uFF09.html.902088db.js"),[]).then(({data:e})=>e),"v-77987a0f":()=>x(()=>import("./springcloud\uFF08\u4E0B\uFF09.html.8ea03a64.js"),[]).then(({data:e})=>e),"v-9ef17310":()=>x(()=>import("./zookeeper.html.a0dd5722.js"),[]).then(({data:e})=>e),"v-05cd8fe4":()=>x(()=>import("./\u300A\u5E76\u53D1\u7F16\u7A0B\u7684\u827A\u672F\u300B\u7B14\u8BB0.html.c117a8b6.js"),[]).then(({data:e})=>e),"v-0013e773":()=>x(()=>import("./\u5E76\u53D1\u7F16\u7A0B.html.dfa7ceab.js"),[]).then(({data:e})=>e),"v-4c0a9128":()=>x(()=>import("./\u5C1A\u7845\u8C37_\u5B8B\u7EA2\u5EB7_JDBC.html.840018b6.js"),[]).then(({data:e})=>e),"v-456aa1eb":()=>x(()=>import("./redis.html.d8140978.js"),[]).then(({data:e})=>e),"v-9f83c3ba":()=>x(()=>import("./Mybatis.html.d904674e.js"),[]).then(({data:e})=>e),"v-21b5c2ea":()=>x(()=>import("./spring.html.b4a95f59.js"),[]).then(({data:e})=>e),"v-068e11cb":()=>x(()=>import("./springboot.html.5534c4e6.js"),[]).then(({data:e})=>e),"v-92381d18":()=>x(()=>import("./springboot.html.6fe03d84.js"),[]).then(({data:e})=>e),"v-0788dc22":()=>x(()=>import("./springMVC.html.841e0238.js"),[]).then(({data:e})=>e),"v-4b84538b":()=>x(()=>import("./kafka.html.b40144f3.js"),[]).then(({data:e})=>e),"v-1e0ac90e":()=>x(()=>import("./RabbitMQ.html.96e35acd.js"),[]).then(({data:e})=>e),"v-d2a5a678":()=>x(()=>import("./\u64CD\u4F5C\u7CFB\u7EDF.html.d862ed98.js"),[]).then(({data:e})=>e),"v-30eca57b":()=>x(()=>import("./flink\u57FA\u672C\u7BC72.html.053d0f90.js"),[]).then(({data:e})=>e),"v-791cd9a5":()=>x(()=>import("./MySQL\u6570\u636E\u5E93\u7B14\u8BB0-\u7B2C\u4E00\u90E8\u5206.html.17c02c61.js"),[]).then(({data:e})=>e),"v-94326c4c":()=>x(()=>import("./MySQL\u6570\u636E\u5E93\u7B14\u8BB0-\u7B2C\u4E8C\u90E8\u5206.html.ee2d8734.js"),[]).then(({data:e})=>e),"v-3706649a":()=>x(()=>import("./404.html.93146c89.js"),[]).then(({data:e})=>e)};function Ur(e,t){const n=Object.create(null),r=e.split(",");for(let o=0;o!!n[o.toLowerCase()]:o=>!!n[o]}const Rl="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Pl=Ur(Rl);function Fs(e){return!!e||e===""}function Yn(e){if(Y(e)){const t={};for(let n=0;n{if(n){const r=n.split(Ol);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function bn(e){let t="";if(me(e))t=e;else if(Y(e))for(let n=0;nme(e)?e:e==null?"":Y(e)||be(e)&&(e.toString===Is||!te(e.toString))?JSON.stringify(e,Ss,2):String(e),Ss=(e,t)=>t&&t.__v_isRef?Ss(e,t.value):$t(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[r,o])=>(n[`${r} =>`]=o,n),{})}:xs(t)?{[`Set(${t.size})`]:[...t.values()]}:be(t)&&!Y(t)&&!ks(t)?String(t):t,pe={},Ht=[],We=()=>{},Sl=()=>!1,xl=/^on[^a-z]/,yn=e=>xl.test(e),qr=e=>e.startsWith("onUpdate:"),we=Object.assign,Kr=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},Dl=Object.prototype.hasOwnProperty,se=(e,t)=>Dl.call(e,t),Y=Array.isArray,$t=e=>Gn(e)==="[object Map]",xs=e=>Gn(e)==="[object Set]",te=e=>typeof e=="function",me=e=>typeof e=="string",Wr=e=>typeof e=="symbol",be=e=>e!==null&&typeof e=="object",Ds=e=>be(e)&&te(e.then)&&te(e.catch),Is=Object.prototype.toString,Gn=e=>Is.call(e),Il=e=>Gn(e).slice(8,-1),ks=e=>Gn(e)==="[object Object]",Jr=e=>me(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,ln=Ur(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Zn=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},kl=/-(\w)/g,Ge=Zn(e=>e.replace(kl,(t,n)=>n?n.toUpperCase():"")),Ml=/\B([A-Z])/g,St=Zn(e=>e.replace(Ml,"-$1").toLowerCase()),Xn=Zn(e=>e.charAt(0).toUpperCase()+e.slice(1)),cr=Zn(e=>e?`on${Xn(e)}`:""),pn=(e,t)=>!Object.is(e,t),ur=(e,t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},Ms=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let To;const jl=()=>To||(To=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{});let Ie;class Nl{constructor(t=!1){this.active=!0,this.effects=[],this.cleanups=[],!t&&Ie&&(this.parent=Ie,this.index=(Ie.scopes||(Ie.scopes=[])).push(this)-1)}run(t){if(this.active){const n=Ie;try{return Ie=this,t()}finally{Ie=n}}}on(){Ie=this}off(){Ie=this.parent}stop(t){if(this.active){let n,r;for(n=0,r=this.effects.length;n{const t=new Set(e);return t.w=0,t.n=0,t},js=e=>(e.w&Et)>0,Ns=e=>(e.n&Et)>0,Vl=({deps:e})=>{if(e.length)for(let t=0;t{const{deps:t}=e;if(t.length){let n=0;for(let r=0;r{(c==="length"||c>=r)&&l.push(a)});else switch(n!==void 0&&l.push(i.get(n)),t){case"add":Y(e)?Jr(n)&&l.push(i.get("length")):(l.push(i.get(Tt)),$t(e)&&l.push(i.get(Rr)));break;case"delete":Y(e)||(l.push(i.get(Tt)),$t(e)&&l.push(i.get(Rr)));break;case"set":$t(e)&&l.push(i.get(Tt));break}if(l.length===1)l[0]&&Pr(l[0]);else{const a=[];for(const c of l)c&&a.push(...c);Pr(Qr(a))}}function Pr(e,t){const n=Y(e)?e:[...e];for(const r of n)r.computed&&Lo(r);for(const r of n)r.computed||Lo(r)}function Lo(e,t){(e!==qe||e.allowRecurse)&&(e.scheduler?e.scheduler():e.run())}const ql=Ur("__proto__,__v_isRef,__isVue"),zs=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Wr)),Kl=Gr(),Wl=Gr(!1,!0),Jl=Gr(!0),Fo=Ql();function Ql(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...n){const r=ae(this);for(let s=0,i=this.length;s{e[t]=function(...n){Jt();const r=ae(this)[t].apply(this,n);return Qt(),r}}),e}function Gr(e=!1,t=!1){return function(r,o,s){if(o==="__v_isReactive")return!e;if(o==="__v_isReadonly")return e;if(o==="__v_isShallow")return t;if(o==="__v_raw"&&s===(e?t?fa:Ws:t?Ks:qs).get(r))return r;const i=Y(r);if(!e&&i&&se(Fo,o))return Reflect.get(Fo,o,s);const l=Reflect.get(r,o,s);return(Wr(o)?zs.has(o):ql(o))||(e||je(r,"get",o),t)?l:Be(l)?i&&Jr(o)?l:l.value:be(l)?e?eo(l):Yt(l):l}}const Yl=Vs(),Gl=Vs(!0);function Vs(e=!1){return function(n,r,o,s){let i=n[r];if(mn(i)&&Be(i)&&!Be(o))return!1;if(!e&&!mn(o)&&(Tr(o)||(o=ae(o),i=ae(i)),!Y(n)&&Be(i)&&!Be(o)))return i.value=o,!0;const l=Y(n)&&Jr(r)?Number(r)e,er=e=>Reflect.getPrototypeOf(e);function Tn(e,t,n=!1,r=!1){e=e.__v_raw;const o=ae(e),s=ae(t);n||(t!==s&&je(o,"get",t),je(o,"get",s));const{has:i}=er(o),l=r?Zr:n?no:En;if(i.call(o,t))return l(e.get(t));if(i.call(o,s))return l(e.get(s));e!==o&&e.get(t)}function On(e,t=!1){const n=this.__v_raw,r=ae(n),o=ae(e);return t||(e!==o&&je(r,"has",e),je(r,"has",o)),e===o?n.has(e):n.has(e)||n.has(o)}function Ln(e,t=!1){return e=e.__v_raw,!t&&je(ae(e),"iterate",Tt),Reflect.get(e,"size",e)}function So(e){e=ae(e);const t=ae(this);return er(t).has.call(t,e)||(t.add(e),rt(t,"add",e,e)),this}function xo(e,t){t=ae(t);const n=ae(this),{has:r,get:o}=er(n);let s=r.call(n,e);s||(e=ae(e),s=r.call(n,e));const i=o.call(n,e);return n.set(e,t),s?pn(t,i)&&rt(n,"set",e,t):rt(n,"add",e,t),this}function Do(e){const t=ae(this),{has:n,get:r}=er(t);let o=n.call(t,e);o||(e=ae(e),o=n.call(t,e)),r&&r.call(t,e);const s=t.delete(e);return o&&rt(t,"delete",e,void 0),s}function Io(){const e=ae(this),t=e.size!==0,n=e.clear();return t&&rt(e,"clear",void 0,void 0),n}function Fn(e,t){return function(r,o){const s=this,i=s.__v_raw,l=ae(i),a=t?Zr:e?no:En;return!e&&je(l,"iterate",Tt),i.forEach((c,f)=>r.call(o,a(c),a(f),s))}}function Sn(e,t,n){return function(...r){const o=this.__v_raw,s=ae(o),i=$t(s),l=e==="entries"||e===Symbol.iterator&&i,a=e==="keys"&&i,c=o[e](...r),f=n?Zr:t?no:En;return!t&&je(s,"iterate",a?Rr:Tt),{next(){const{value:p,done:d}=c.next();return d?{value:p,done:d}:{value:l?[f(p[0]),f(p[1])]:f(p),done:d}},[Symbol.iterator](){return this}}}}function st(e){return function(...t){return e==="delete"?!1:this}}function ra(){const e={get(s){return Tn(this,s)},get size(){return Ln(this)},has:On,add:So,set:xo,delete:Do,clear:Io,forEach:Fn(!1,!1)},t={get(s){return Tn(this,s,!1,!0)},get size(){return Ln(this)},has:On,add:So,set:xo,delete:Do,clear:Io,forEach:Fn(!1,!0)},n={get(s){return Tn(this,s,!0)},get size(){return Ln(this,!0)},has(s){return On.call(this,s,!0)},add:st("add"),set:st("set"),delete:st("delete"),clear:st("clear"),forEach:Fn(!0,!1)},r={get(s){return Tn(this,s,!0,!0)},get size(){return Ln(this,!0)},has(s){return On.call(this,s,!0)},add:st("add"),set:st("set"),delete:st("delete"),clear:st("clear"),forEach:Fn(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(s=>{e[s]=Sn(s,!1,!1),n[s]=Sn(s,!0,!1),t[s]=Sn(s,!1,!0),r[s]=Sn(s,!0,!0)}),[e,n,t,r]}const[oa,sa,ia,la]=ra();function Xr(e,t){const n=t?e?la:ia:e?sa:oa;return(r,o,s)=>o==="__v_isReactive"?!e:o==="__v_isReadonly"?e:o==="__v_raw"?r:Reflect.get(se(n,o)&&o in r?n:r,o,s)}const aa={get:Xr(!1,!1)},ca={get:Xr(!1,!0)},ua={get:Xr(!0,!1)},qs=new WeakMap,Ks=new WeakMap,Ws=new WeakMap,fa=new WeakMap;function da(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function ha(e){return e.__v_skip||!Object.isExtensible(e)?0:da(Il(e))}function Yt(e){return mn(e)?e:to(e,!1,Us,aa,qs)}function pa(e){return to(e,!1,na,ca,Ks)}function eo(e){return to(e,!0,ta,ua,Ws)}function to(e,t,n,r,o){if(!be(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const s=o.get(e);if(s)return s;const i=ha(e);if(i===0)return e;const l=new Proxy(e,i===2?r:n);return o.set(e,l),l}function zt(e){return mn(e)?zt(e.__v_raw):!!(e&&e.__v_isReactive)}function mn(e){return!!(e&&e.__v_isReadonly)}function Tr(e){return!!(e&&e.__v_isShallow)}function Js(e){return zt(e)||mn(e)}function ae(e){const t=e&&e.__v_raw;return t?ae(t):e}function Qs(e){return Nn(e,"__v_skip",!0),e}const En=e=>be(e)?Yt(e):e,no=e=>be(e)?eo(e):e;function Ys(e){pt&&qe&&(e=ae(e),$s(e.dep||(e.dep=Qr())))}function Gs(e,t){e=ae(e),e.dep&&Pr(e.dep)}function Be(e){return!!(e&&e.__v_isRef===!0)}function Pe(e){return Xs(e,!1)}function Zs(e){return Xs(e,!0)}function Xs(e,t){return Be(e)?e:new ma(e,t)}class ma{constructor(t,n){this.__v_isShallow=n,this.dep=void 0,this.__v_isRef=!0,this._rawValue=n?t:ae(t),this._value=n?t:En(t)}get value(){return Ys(this),this._value}set value(t){t=this.__v_isShallow?t:ae(t),pn(t,this._rawValue)&&(this._rawValue=t,this._value=this.__v_isShallow?t:En(t),Gs(this))}}function Ot(e){return Be(e)?e.value:e}const Ea={get:(e,t,n)=>Ot(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const o=e[t];return Be(o)&&!Be(n)?(o.value=n,!0):Reflect.set(e,t,n,r)}};function ei(e){return zt(e)?e:new Proxy(e,Ea)}function nh(e){const t=Y(e)?new Array(e.length):{};for(const n in e)t[n]=va(e,n);return t}class ga{constructor(t,n,r){this._object=t,this._key=n,this._defaultValue=r,this.__v_isRef=!0}get value(){const t=this._object[this._key];return t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}}function va(e,t,n){const r=e[t];return Be(r)?r:new ga(e,t,n)}class _a{constructor(t,n,r,o){this._setter=n,this.dep=void 0,this.__v_isRef=!0,this._dirty=!0,this.effect=new Yr(t,()=>{this._dirty||(this._dirty=!0,Gs(this))}),this.effect.computed=this,this.effect.active=this._cacheable=!o,this.__v_isReadonly=r}get value(){const t=ae(this);return Ys(t),(t._dirty||!t._cacheable)&&(t._dirty=!1,t._value=t.effect.run()),t._value}set value(t){this._setter(t)}}function Aa(e,t,n=!1){let r,o;const s=te(e);return s?(r=e,o=We):(r=e.get,o=e.set),new _a(r,o,s||!o,n)}function mt(e,t,n,r){let o;try{o=r?e(...r):e()}catch(s){Bn(s,t,n)}return o}function ze(e,t,n,r){if(te(e)){const s=mt(e,t,n,r);return s&&Ds(s)&&s.catch(i=>{Bn(i,t,n)}),s}const o=[];for(let s=0;s>>1;gn(ke[r])et&&ke.splice(t,1)}function ri(e,t,n,r){Y(e)?n.push(...e):(!t||!t.includes(e,e.allowRecurse?r+1:r))&&n.push(e),ni()}function Ca(e){ri(e,sn,an,Mt)}function wa(e){ri(e,ut,cn,jt)}function tr(e,t=null){if(an.length){for(Lr=t,sn=[...new Set(an)],an.length=0,Mt=0;Mtgn(n)-gn(r)),jt=0;jte.id==null?1/0:e.id;function oi(e){Or=!1,Hn=!0,tr(e),ke.sort((n,r)=>gn(n)-gn(r));const t=We;try{for(et=0;etv.trim())),p&&(o=n.map(Ms))}let l,a=r[l=cr(t)]||r[l=cr(Ge(t))];!a&&s&&(a=r[l=cr(St(t))]),a&&ze(a,e,6,o);const c=r[l+"Once"];if(c){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,ze(c,e,6,o)}}function si(e,t,n=!1){const r=t.emitsCache,o=r.get(e);if(o!==void 0)return o;const s=e.emits;let i={},l=!1;if(!te(e)){const a=c=>{const f=si(c,t,!0);f&&(l=!0,we(i,f))};!n&&t.mixins.length&&t.mixins.forEach(a),e.extends&&a(e.extends),e.mixins&&e.mixins.forEach(a)}return!s&&!l?(r.set(e,null),null):(Y(s)?s.forEach(a=>i[a]=null):we(i,s),r.set(e,i),i)}function nr(e,t){return!e||!yn(t)?!1:(t=t.slice(2).replace(/Once$/,""),se(e,t[0].toLowerCase()+t.slice(1))||se(e,St(t))||se(e,t))}let Re=null,ii=null;function zn(e){const t=Re;return Re=e,ii=e&&e.type.__scopeId||null,t}function Pa(e,t=Re,n){if(!t||e._n)return e;const r=(...o)=>{r._d&&Ko(-1);const s=zn(t),i=e(...o);return zn(s),r._d&&Ko(1),i};return r._n=!0,r._c=!0,r._d=!0,r}function fr(e){const{type:t,vnode:n,proxy:r,withProxy:o,props:s,propsOptions:[i],slots:l,attrs:a,emit:c,render:f,renderCache:p,data:d,setupState:v,ctx:A,inheritAttrs:D}=e;let O,g;const _=zn(e);try{if(n.shapeFlag&4){const M=o||r;O=Ue(f.call(M,M,p,s,v,d,A)),g=a}else{const M=t;O=Ue(M.length>1?M(s,{attrs:a,slots:l,emit:c}):M(s,null)),g=t.props?a:Ta(a)}}catch(M){fn.length=0,Bn(M,e,1),O=_e(Me)}let R=O;if(g&&D!==!1){const M=Object.keys(g),{shapeFlag:q}=R;M.length&&q&7&&(i&&M.some(qr)&&(g=Oa(g,i)),R=gt(R,g))}return n.dirs&&(R=gt(R),R.dirs=R.dirs?R.dirs.concat(n.dirs):n.dirs),n.transition&&(R.transition=n.transition),O=R,zn(_),O}const Ta=e=>{let t;for(const n in e)(n==="class"||n==="style"||yn(n))&&((t||(t={}))[n]=e[n]);return t},Oa=(e,t)=>{const n={};for(const r in e)(!qr(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function La(e,t,n){const{props:r,children:o,component:s}=e,{props:i,children:l,patchFlag:a}=t,c=s.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&a>=0){if(a&1024)return!0;if(a&16)return r?ko(r,i,c):!!i;if(a&8){const f=t.dynamicProps;for(let p=0;pe.__isSuspense;function li(e,t){t&&t.pendingBranch?Y(e)?t.effects.push(...e):t.effects.push(e):wa(e)}function Lt(e,t){if(ye){let n=ye.provides;const r=ye.parent&&ye.parent.provides;r===n&&(n=ye.provides=Object.create(r)),n[e]=t}}function Ce(e,t,n=!1){const r=ye||Re;if(r){const o=r.parent==null?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides;if(o&&e in o)return o[e];if(arguments.length>1)return n&&te(t)?t.call(r.proxy):t}}const Mo={};function nt(e,t,n){return ai(e,t,n)}function ai(e,t,{immediate:n,deep:r,flush:o,onTrack:s,onTrigger:i}=pe){const l=ye;let a,c=!1,f=!1;if(Be(e)?(a=()=>e.value,c=Tr(e)):zt(e)?(a=()=>e,r=!0):Y(e)?(f=!0,c=e.some(g=>zt(g)||Tr(g)),a=()=>e.map(g=>{if(Be(g))return g.value;if(zt(g))return Pt(g);if(te(g))return mt(g,l,2)})):te(e)?t?a=()=>mt(e,l,2):a=()=>{if(!(l&&l.isUnmounted))return p&&p(),ze(e,l,3,[d])}:a=We,t&&r){const g=a;a=()=>Pt(g())}let p,d=g=>{p=O.onStop=()=>{mt(g,l,4)}};if(qt)return d=We,t?n&&ze(t,l,3,[a(),f?[]:void 0,d]):a(),We;let v=f?[]:Mo;const A=()=>{if(!!O.active)if(t){const g=O.run();(r||c||(f?g.some((_,R)=>pn(_,v[R])):pn(g,v)))&&(p&&p(),ze(t,l,3,[g,v===Mo?void 0:v,d]),v=g)}else O.run()};A.allowRecurse=!!t;let D;o==="sync"?D=A:o==="post"?D=()=>Fe(A,l&&l.suspense):D=()=>Ca(A);const O=new Yr(a,D);return t?n?A():v=O.run():o==="post"?Fe(O.run.bind(O),l&&l.suspense):O.run(),()=>{O.stop(),l&&l.scope&&Kr(l.scope.effects,O)}}function xa(e,t,n){const r=this.proxy,o=me(e)?e.includes(".")?ci(r,e):()=>r[e]:e.bind(r,r);let s;te(t)?s=t:(s=t.handler,n=t);const i=ye;Ut(this);const l=ai(o,s.bind(r),n);return i?Ut(i):Ft(),l}function ci(e,t){const n=t.split(".");return()=>{let r=e;for(let o=0;o{Pt(n,t)});else if(ks(e))for(const n in e)Pt(e[n],t);return e}function Da(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return vt(()=>{e.isMounted=!0}),io(()=>{e.isUnmounting=!0}),e}const He=[Function,Array],Ia={name:"BaseTransition",props:{mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:He,onEnter:He,onAfterEnter:He,onEnterCancelled:He,onBeforeLeave:He,onLeave:He,onAfterLeave:He,onLeaveCancelled:He,onBeforeAppear:He,onAppear:He,onAfterAppear:He,onAppearCancelled:He},setup(e,{slots:t}){const n=Si(),r=Da();let o;return()=>{const s=t.default&&di(t.default(),!0);if(!s||!s.length)return;let i=s[0];if(s.length>1){for(const D of s)if(D.type!==Me){i=D;break}}const l=ae(e),{mode:a}=l;if(r.isLeaving)return dr(i);const c=jo(i);if(!c)return dr(i);const f=Fr(c,l,r,n);Sr(c,f);const p=n.subTree,d=p&&jo(p);let v=!1;const{getTransitionKey:A}=c.type;if(A){const D=A();o===void 0?o=D:D!==o&&(o=D,v=!0)}if(d&&d.type!==Me&&(!wt(c,d)||v)){const D=Fr(d,l,r,n);if(Sr(d,D),a==="out-in")return r.isLeaving=!0,D.afterLeave=()=>{r.isLeaving=!1,n.update()},dr(i);a==="in-out"&&c.type!==Me&&(D.delayLeave=(O,g,_)=>{const R=fi(r,d);R[String(d.key)]=d,O._leaveCb=()=>{g(),O._leaveCb=void 0,delete f.delayedLeave},f.delayedLeave=_})}return i}}},ui=Ia;function fi(e,t){const{leavingVNodes:n}=e;let r=n.get(t.type);return r||(r=Object.create(null),n.set(t.type,r)),r}function Fr(e,t,n,r){const{appear:o,mode:s,persisted:i=!1,onBeforeEnter:l,onEnter:a,onAfterEnter:c,onEnterCancelled:f,onBeforeLeave:p,onLeave:d,onAfterLeave:v,onLeaveCancelled:A,onBeforeAppear:D,onAppear:O,onAfterAppear:g,onAppearCancelled:_}=t,R=String(e.key),M=fi(n,e),q=(m,W)=>{m&&ze(m,r,9,W)},$=(m,W)=>{const H=W[1];q(m,W),Y(m)?m.every(K=>K.length<=1)&&H():m.length<=1&&H()},I={mode:s,persisted:i,beforeEnter(m){let W=l;if(!n.isMounted)if(o)W=D||l;else return;m._leaveCb&&m._leaveCb(!0);const H=M[R];H&&wt(e,H)&&H.el._leaveCb&&H.el._leaveCb(),q(W,[m])},enter(m){let W=a,H=c,K=f;if(!n.isMounted)if(o)W=O||a,H=g||c,K=_||f;else return;let j=!1;const C=m._enterCb=P=>{j||(j=!0,P?q(K,[m]):q(H,[m]),I.delayedLeave&&I.delayedLeave(),m._enterCb=void 0)};W?$(W,[m,C]):C()},leave(m,W){const H=String(e.key);if(m._enterCb&&m._enterCb(!0),n.isUnmounting)return W();q(p,[m]);let K=!1;const j=m._leaveCb=C=>{K||(K=!0,W(),C?q(A,[m]):q(v,[m]),m._leaveCb=void 0,M[H]===e&&delete M[H])};M[H]=e,d?$(d,[m,j]):j()},clone(m){return Fr(m,t,n,r)}};return I}function dr(e){if(Cn(e))return e=gt(e),e.children=null,e}function jo(e){return Cn(e)?e.children?e.children[0]:void 0:e}function Sr(e,t){e.shapeFlag&6&&e.component?Sr(e.component.subTree,t):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function di(e,t=!1,n){let r=[],o=0;for(let s=0;s1)for(let s=0;s!!e.type.__asyncLoader;function re(e){te(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:r,delay:o=200,timeout:s,suspensible:i=!0,onError:l}=e;let a=null,c,f=0;const p=()=>(f++,a=null,d()),d=()=>{let v;return a||(v=a=t().catch(A=>{if(A=A instanceof Error?A:new Error(String(A)),l)return new Promise((D,O)=>{l(A,()=>D(p()),()=>O(A),f+1)});throw A}).then(A=>v!==a&&a?a:(A&&(A.__esModule||A[Symbol.toStringTag]==="Module")&&(A=A.default),c=A,A)))};return Je({name:"AsyncComponentWrapper",__asyncLoader:d,get __asyncResolved(){return c},setup(){const v=ye;if(c)return()=>hr(c,v);const A=_=>{a=null,Bn(_,v,13,!r)};if(i&&v.suspense||qt)return d().then(_=>()=>hr(_,v)).catch(_=>(A(_),()=>r?_e(r,{error:_}):null));const D=Pe(!1),O=Pe(),g=Pe(!!o);return o&&setTimeout(()=>{g.value=!1},o),s!=null&&setTimeout(()=>{if(!D.value&&!O.value){const _=new Error(`Async component timed out after ${s}ms.`);A(_),O.value=_}},s),d().then(()=>{D.value=!0,v.parent&&Cn(v.parent.vnode)&&so(v.parent.update)}).catch(_=>{A(_),O.value=_}),()=>{if(D.value&&c)return hr(c,v);if(O.value&&r)return _e(r,{error:O.value});if(n&&!g.value)return _e(n)}}})}function hr(e,{vnode:{ref:t,props:n,children:r,shapeFlag:o},parent:s}){const i=_e(e,n,r);return i.ref=t,i}const Cn=e=>e.type.__isKeepAlive;function ka(e,t){hi(e,"a",t)}function Ma(e,t){hi(e,"da",t)}function hi(e,t,n=ye){const r=e.__wdc||(e.__wdc=()=>{let o=n;for(;o;){if(o.isDeactivated)return;o=o.parent}return e()});if(rr(t,r,n),n){let o=n.parent;for(;o&&o.parent;)Cn(o.parent.vnode)&&ja(r,t,n,o),o=o.parent}}function ja(e,t,n,r){const o=rr(t,e,r,!0);lo(()=>{Kr(r[t],o)},n)}function rr(e,t,n=ye,r=!1){if(n){const o=n[e]||(n[e]=[]),s=t.__weh||(t.__weh=(...i)=>{if(n.isUnmounted)return;Jt(),Ut(n);const l=ze(t,n,e,i);return Ft(),Qt(),l});return r?o.unshift(s):o.push(s),s}}const ot=e=>(t,n=ye)=>(!qt||e==="sp")&&rr(e,t,n),pi=ot("bm"),vt=ot("m"),Na=ot("bu"),Ha=ot("u"),io=ot("bum"),lo=ot("um"),$a=ot("sp"),za=ot("rtg"),Va=ot("rtc");function Ua(e,t=ye){rr("ec",e,t)}function rh(e,t){const n=Re;if(n===null)return e;const r=ir(n)||n.proxy,o=e.dirs||(e.dirs=[]);for(let s=0;st(i,l,void 0,s&&s[l]));else{const i=Object.keys(e);o=new Array(i.length);for(let l=0,a=i.length;lKn(t)?!(t.type===Me||t.type===Se&&!gi(t.children)):!0)?e:null}const xr=e=>e?xi(e)?ir(e)||e.proxy:xr(e.parent):null,Vn=we(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>xr(e.parent),$root:e=>xr(e.root),$emit:e=>e.emit,$options:e=>_i(e),$forceUpdate:e=>e.f||(e.f=()=>so(e.update)),$nextTick:e=>e.n||(e.n=oo.bind(e.proxy)),$watch:e=>xa.bind(e)}),Ja={get({_:e},t){const{ctx:n,setupState:r,data:o,props:s,accessCache:i,type:l,appContext:a}=e;let c;if(t[0]!=="$"){const v=i[t];if(v!==void 0)switch(v){case 1:return r[t];case 2:return o[t];case 4:return n[t];case 3:return s[t]}else{if(r!==pe&&se(r,t))return i[t]=1,r[t];if(o!==pe&&se(o,t))return i[t]=2,o[t];if((c=e.propsOptions[0])&&se(c,t))return i[t]=3,s[t];if(n!==pe&&se(n,t))return i[t]=4,n[t];Dr&&(i[t]=0)}}const f=Vn[t];let p,d;if(f)return t==="$attrs"&&je(e,"get",t),f(e);if((p=l.__cssModules)&&(p=p[t]))return p;if(n!==pe&&se(n,t))return i[t]=4,n[t];if(d=a.config.globalProperties,se(d,t))return d[t]},set({_:e},t,n){const{data:r,setupState:o,ctx:s}=e;return o!==pe&&se(o,t)?(o[t]=n,!0):r!==pe&&se(r,t)?(r[t]=n,!0):se(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(s[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:o,propsOptions:s}},i){let l;return!!n[i]||e!==pe&&se(e,i)||t!==pe&&se(t,i)||(l=s[0])&&se(l,i)||se(r,i)||se(Vn,i)||se(o.config.globalProperties,i)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:se(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};let Dr=!0;function Qa(e){const t=_i(e),n=e.proxy,r=e.ctx;Dr=!1,t.beforeCreate&&Ho(t.beforeCreate,e,"bc");const{data:o,computed:s,methods:i,watch:l,provide:a,inject:c,created:f,beforeMount:p,mounted:d,beforeUpdate:v,updated:A,activated:D,deactivated:O,beforeDestroy:g,beforeUnmount:_,destroyed:R,unmounted:M,render:q,renderTracked:$,renderTriggered:I,errorCaptured:m,serverPrefetch:W,expose:H,inheritAttrs:K,components:j,directives:C,filters:P}=t;if(c&&Ya(c,r,null,e.appContext.config.unwrapInjectedRef),i)for(const G in i){const oe=i[G];te(oe)&&(r[G]=oe.bind(n))}if(o){const G=o.call(n,n);be(G)&&(e.data=Yt(G))}if(Dr=!0,s)for(const G in s){const oe=s[G],Ae=te(oe)?oe.bind(n,n):te(oe.get)?oe.get.bind(n,n):We,Te=!te(oe)&&te(oe.set)?oe.set.bind(n):We,xe=ve({get:Ae,set:Te});Object.defineProperty(r,G,{enumerable:!0,configurable:!0,get:()=>xe.value,set:Ne=>xe.value=Ne})}if(l)for(const G in l)vi(l[G],r,n,G);if(a){const G=te(a)?a.call(n):a;Reflect.ownKeys(G).forEach(oe=>{Lt(oe,G[oe])})}f&&Ho(f,e,"c");function N(G,oe){Y(oe)?oe.forEach(Ae=>G(Ae.bind(n))):oe&&G(oe.bind(n))}if(N(pi,p),N(vt,d),N(Na,v),N(Ha,A),N(ka,D),N(Ma,O),N(Ua,m),N(Va,$),N(za,I),N(io,_),N(lo,M),N($a,W),Y(H))if(H.length){const G=e.exposed||(e.exposed={});H.forEach(oe=>{Object.defineProperty(G,oe,{get:()=>n[oe],set:Ae=>n[oe]=Ae})})}else e.exposed||(e.exposed={});q&&e.render===We&&(e.render=q),K!=null&&(e.inheritAttrs=K),j&&(e.components=j),C&&(e.directives=C)}function Ya(e,t,n=We,r=!1){Y(e)&&(e=Ir(e));for(const o in e){const s=e[o];let i;be(s)?"default"in s?i=Ce(s.from||o,s.default,!0):i=Ce(s.from||o):i=Ce(s),Be(i)&&r?Object.defineProperty(t,o,{enumerable:!0,configurable:!0,get:()=>i.value,set:l=>i.value=l}):t[o]=i}}function Ho(e,t,n){ze(Y(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,n)}function vi(e,t,n,r){const o=r.includes(".")?ci(n,r):()=>n[r];if(me(e)){const s=t[e];te(s)&&nt(o,s)}else if(te(e))nt(o,e.bind(n));else if(be(e))if(Y(e))e.forEach(s=>vi(s,t,n,r));else{const s=te(e.handler)?e.handler.bind(n):t[e.handler];te(s)&&nt(o,s,e)}}function _i(e){const t=e.type,{mixins:n,extends:r}=t,{mixins:o,optionsCache:s,config:{optionMergeStrategies:i}}=e.appContext,l=s.get(t);let a;return l?a=l:!o.length&&!n&&!r?a=t:(a={},o.length&&o.forEach(c=>Un(a,c,i,!0)),Un(a,t,i)),s.set(t,a),a}function Un(e,t,n,r=!1){const{mixins:o,extends:s}=t;s&&Un(e,s,n,!0),o&&o.forEach(i=>Un(e,i,n,!0));for(const i in t)if(!(r&&i==="expose")){const l=Ga[i]||n&&n[i];e[i]=l?l(e[i],t[i]):t[i]}return e}const Ga={data:$o,props:yt,emits:yt,methods:yt,computed:yt,beforeCreate:Oe,created:Oe,beforeMount:Oe,mounted:Oe,beforeUpdate:Oe,updated:Oe,beforeDestroy:Oe,beforeUnmount:Oe,destroyed:Oe,unmounted:Oe,activated:Oe,deactivated:Oe,errorCaptured:Oe,serverPrefetch:Oe,components:yt,directives:yt,watch:Xa,provide:$o,inject:Za};function $o(e,t){return t?e?function(){return we(te(e)?e.call(this,this):e,te(t)?t.call(this,this):t)}:t:e}function Za(e,t){return yt(Ir(e),Ir(t))}function Ir(e){if(Y(e)){const t={};for(let n=0;n0)&&!(i&16)){if(i&8){const f=e.vnode.dynamicProps;for(let p=0;p{a=!0;const[d,v]=bi(p,t,!0);we(i,d),v&&l.push(...v)};!n&&t.mixins.length&&t.mixins.forEach(f),e.extends&&f(e.extends),e.mixins&&e.mixins.forEach(f)}if(!s&&!a)return r.set(e,Ht),Ht;if(Y(s))for(let f=0;f-1,v[1]=D<0||A-1||se(v,"default"))&&l.push(p)}}}const c=[i,l];return r.set(e,c),c}function zo(e){return e[0]!=="$"}function Vo(e){const t=e&&e.toString().match(/^\s*function (\w+)/);return t?t[1]:e===null?"null":""}function Uo(e,t){return Vo(e)===Vo(t)}function qo(e,t){return Y(t)?t.findIndex(n=>Uo(n,e)):te(t)&&Uo(t,e)?0:-1}const yi=e=>e[0]==="_"||e==="$stable",ao=e=>Y(e)?e.map(Ue):[Ue(e)],nc=(e,t,n)=>{if(t._n)return t;const r=Pa((...o)=>ao(t(...o)),n);return r._c=!1,r},Bi=(e,t,n)=>{const r=e._ctx;for(const o in e){if(yi(o))continue;const s=e[o];if(te(s))t[o]=nc(o,s,r);else if(s!=null){const i=ao(s);t[o]=()=>i}}},Ci=(e,t)=>{const n=ao(t);e.slots.default=()=>n},rc=(e,t)=>{if(e.vnode.shapeFlag&32){const n=t._;n?(e.slots=ae(t),Nn(t,"_",n)):Bi(t,e.slots={})}else e.slots={},t&&Ci(e,t);Nn(e.slots,sr,1)},oc=(e,t,n)=>{const{vnode:r,slots:o}=e;let s=!0,i=pe;if(r.shapeFlag&32){const l=t._;l?n&&l===1?s=!1:(we(o,t),!n&&l===1&&delete o._):(s=!t.$stable,Bi(t,o)),i=t}else t&&(Ci(e,t),i={default:1});if(s)for(const l in o)!yi(l)&&!(l in i)&&delete o[l]};function wi(){return{app:null,config:{isNativeTag:Sl,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let sc=0;function ic(e,t){return function(r,o=null){te(r)||(r=Object.assign({},r)),o!=null&&!be(o)&&(o=null);const s=wi(),i=new Set;let l=!1;const a=s.app={_uid:sc++,_component:r,_props:o,_container:null,_context:s,_instance:null,version:wc,get config(){return s.config},set config(c){},use(c,...f){return i.has(c)||(c&&te(c.install)?(i.add(c),c.install(a,...f)):te(c)&&(i.add(c),c(a,...f))),a},mixin(c){return s.mixins.includes(c)||s.mixins.push(c),a},component(c,f){return f?(s.components[c]=f,a):s.components[c]},directive(c,f){return f?(s.directives[c]=f,a):s.directives[c]},mount(c,f,p){if(!l){const d=_e(r,o);return d.appContext=s,f&&t?t(d,c):e(d,c,p),l=!0,a._container=c,c.__vue_app__=a,ir(d.component)||d.component.proxy}},unmount(){l&&(e(null,a._container),delete a._container.__vue_app__)},provide(c,f){return s.provides[c]=f,a}};return a}}function qn(e,t,n,r,o=!1){if(Y(e)){e.forEach((d,v)=>qn(d,t&&(Y(t)?t[v]:t),n,r,o));return}if(Vt(r)&&!o)return;const s=r.shapeFlag&4?ir(r.component)||r.component.proxy:r.el,i=o?null:s,{i:l,r:a}=e,c=t&&t.r,f=l.refs===pe?l.refs={}:l.refs,p=l.setupState;if(c!=null&&c!==a&&(me(c)?(f[c]=null,se(p,c)&&(p[c]=null)):Be(c)&&(c.value=null)),te(a))mt(a,l,12,[i,f]);else{const d=me(a),v=Be(a);if(d||v){const A=()=>{if(e.f){const D=d?f[a]:a.value;o?Y(D)&&Kr(D,s):Y(D)?D.includes(s)||D.push(s):d?(f[a]=[s],se(p,a)&&(p[a]=f[a])):(a.value=[s],e.k&&(f[e.k]=a.value))}else d?(f[a]=i,se(p,a)&&(p[a]=i)):Be(a)&&(a.value=i,e.k&&(f[e.k]=i))};i?(A.id=-1,Fe(A,n)):A()}}}let it=!1;const xn=e=>/svg/.test(e.namespaceURI)&&e.tagName!=="foreignObject",Dn=e=>e.nodeType===8;function lc(e){const{mt:t,p:n,o:{patchProp:r,createText:o,nextSibling:s,parentNode:i,remove:l,insert:a,createComment:c}}=e,f=(g,_)=>{if(!_.hasChildNodes()){n(null,g,_),$n();return}it=!1,p(_.firstChild,g,null,null,null),$n(),it&&console.error("Hydration completed but contains mismatches.")},p=(g,_,R,M,q,$=!1)=>{const I=Dn(g)&&g.data==="[",m=()=>D(g,_,R,M,q,I),{type:W,ref:H,shapeFlag:K,patchFlag:j}=_,C=g.nodeType;_.el=g,j===-2&&($=!1,_.dynamicChildren=null);let P=null;switch(W){case vn:C!==3?_.children===""?(a(_.el=o(""),g.parentElement,g),P=g):P=m():(g.data!==_.children&&(it=!0,g.data=_.children),P=s(g));break;case Me:C!==8||I?P=m():P=s(g);break;case un:if(C!==1)P=m();else{P=g;const X=!_.children.length;for(let N=0;N<_.staticCount;N++)X&&(_.children+=P.outerHTML),N===_.staticCount-1&&(_.anchor=P),P=s(P);return P}break;case Se:I?P=A(g,_,R,M,q,$):P=m();break;default:if(K&1)C!==1||_.type.toLowerCase()!==g.tagName.toLowerCase()?P=m():P=d(g,_,R,M,q,$);else if(K&6){_.slotScopeIds=q;const X=i(g);if(t(_,X,null,R,M,xn(X),$),P=I?O(g):s(g),P&&Dn(P)&&P.data==="teleport end"&&(P=s(P)),Vt(_)){let N;I?(N=_e(Se),N.anchor=P?P.previousSibling:X.lastChild):N=g.nodeType===3?co(""):_e("div"),N.el=g,_.component.subTree=N}}else K&64?C!==8?P=m():P=_.type.hydrate(g,_,R,M,q,$,e,v):K&128&&(P=_.type.hydrate(g,_,R,M,xn(i(g)),q,$,e,p))}return H!=null&&qn(H,null,M,_),P},d=(g,_,R,M,q,$)=>{$=$||!!_.dynamicChildren;const{type:I,props:m,patchFlag:W,shapeFlag:H,dirs:K}=_,j=I==="input"&&K||I==="option";if(j||W!==-1){if(K&&Ye(_,null,R,"created"),m)if(j||!$||W&48)for(const P in m)(j&&P.endsWith("value")||yn(P)&&!ln(P))&&r(g,P,null,m[P],!1,void 0,R);else m.onClick&&r(g,"onClick",null,m.onClick,!1,void 0,R);let C;if((C=m&&m.onVnodeBeforeMount)&&$e(C,R,_),K&&Ye(_,null,R,"beforeMount"),((C=m&&m.onVnodeMounted)||K)&&li(()=>{C&&$e(C,R,_),K&&Ye(_,null,R,"mounted")},M),H&16&&!(m&&(m.innerHTML||m.textContent))){let P=v(g.firstChild,_,g,R,M,q,$);for(;P;){it=!0;const X=P;P=P.nextSibling,l(X)}}else H&8&&g.textContent!==_.children&&(it=!0,g.textContent=_.children)}return g.nextSibling},v=(g,_,R,M,q,$,I)=>{I=I||!!_.dynamicChildren;const m=_.children,W=m.length;for(let H=0;H{const{slotScopeIds:I}=_;I&&(q=q?q.concat(I):I);const m=i(g),W=v(s(g),_,m,R,M,q,$);return W&&Dn(W)&&W.data==="]"?s(_.anchor=W):(it=!0,a(_.anchor=c("]"),m,W),W)},D=(g,_,R,M,q,$)=>{if(it=!0,_.el=null,$){const W=O(g);for(;;){const H=s(g);if(H&&H!==W)l(H);else break}}const I=s(g),m=i(g);return l(g),n(null,_,m,I,R,M,xn(m),q),I},O=g=>{let _=0;for(;g;)if(g=s(g),g&&Dn(g)&&(g.data==="["&&_++,g.data==="]")){if(_===0)return s(g);_--}return g};return[f,p]}const Fe=li;function ac(e){return cc(e,lc)}function cc(e,t){const n=jl();n.__VUE__=!0;const{insert:r,remove:o,patchProp:s,createElement:i,createText:l,createComment:a,setText:c,setElementText:f,parentNode:p,nextSibling:d,setScopeId:v=We,cloneNode:A,insertStaticContent:D}=e,O=(u,h,E,B=null,y=null,T=null,k=!1,L=null,S=!!h.dynamicChildren)=>{if(u===h)return;u&&!wt(u,h)&&(B=V(u),Le(u,y,T,!0),u=null),h.patchFlag===-2&&(S=!1,h.dynamicChildren=null);const{type:w,ref:J,shapeFlag:U}=h;switch(w){case vn:g(u,h,E,B);break;case Me:_(u,h,E,B);break;case un:u==null&&R(h,E,B,k);break;case Se:C(u,h,E,B,y,T,k,L,S);break;default:U&1?$(u,h,E,B,y,T,k,L,S):U&6?P(u,h,E,B,y,T,k,L,S):(U&64||U&128)&&w.process(u,h,E,B,y,T,k,L,S,ue)}J!=null&&y&&qn(J,u&&u.ref,T,h||u,!h)},g=(u,h,E,B)=>{if(u==null)r(h.el=l(h.children),E,B);else{const y=h.el=u.el;h.children!==u.children&&c(y,h.children)}},_=(u,h,E,B)=>{u==null?r(h.el=a(h.children||""),E,B):h.el=u.el},R=(u,h,E,B)=>{[u.el,u.anchor]=D(u.children,h,E,B,u.el,u.anchor)},M=({el:u,anchor:h},E,B)=>{let y;for(;u&&u!==h;)y=d(u),r(u,E,B),u=y;r(h,E,B)},q=({el:u,anchor:h})=>{let E;for(;u&&u!==h;)E=d(u),o(u),u=E;o(h)},$=(u,h,E,B,y,T,k,L,S)=>{k=k||h.type==="svg",u==null?I(h,E,B,y,T,k,L,S):H(u,h,y,T,k,L,S)},I=(u,h,E,B,y,T,k,L)=>{let S,w;const{type:J,props:U,shapeFlag:Q,transition:Z,patchFlag:ie,dirs:fe}=u;if(u.el&&A!==void 0&&ie===-1)S=u.el=A(u.el);else{if(S=u.el=i(u.type,T,U&&U.is,U),Q&8?f(S,u.children):Q&16&&W(u.children,S,null,B,y,T&&J!=="foreignObject",k,L),fe&&Ye(u,null,B,"created"),U){for(const Ee in U)Ee!=="value"&&!ln(Ee)&&s(S,Ee,null,U[Ee],T,u.children,B,y,F);"value"in U&&s(S,"value",null,U.value),(w=U.onVnodeBeforeMount)&&$e(w,B,u)}m(S,u,u.scopeId,k,B)}fe&&Ye(u,null,B,"beforeMount");const de=(!y||y&&!y.pendingBranch)&&Z&&!Z.persisted;de&&Z.beforeEnter(S),r(S,h,E),((w=U&&U.onVnodeMounted)||de||fe)&&Fe(()=>{w&&$e(w,B,u),de&&Z.enter(S),fe&&Ye(u,null,B,"mounted")},y)},m=(u,h,E,B,y)=>{if(E&&v(u,E),B)for(let T=0;T{for(let w=S;w{const L=h.el=u.el;let{patchFlag:S,dynamicChildren:w,dirs:J}=h;S|=u.patchFlag&16;const U=u.props||pe,Q=h.props||pe;let Z;E&&_t(E,!1),(Z=Q.onVnodeBeforeUpdate)&&$e(Z,E,h,u),J&&Ye(h,u,E,"beforeUpdate"),E&&_t(E,!0);const ie=y&&h.type!=="foreignObject";if(w?K(u.dynamicChildren,w,L,E,B,ie,T):k||Ae(u,h,L,null,E,B,ie,T,!1),S>0){if(S&16)j(L,h,U,Q,E,B,y);else if(S&2&&U.class!==Q.class&&s(L,"class",null,Q.class,y),S&4&&s(L,"style",U.style,Q.style,y),S&8){const fe=h.dynamicProps;for(let de=0;de{Z&&$e(Z,E,h,u),J&&Ye(h,u,E,"updated")},B)},K=(u,h,E,B,y,T,k)=>{for(let L=0;L{if(E!==B){for(const L in B){if(ln(L))continue;const S=B[L],w=E[L];S!==w&&L!=="value"&&s(u,L,w,S,k,h.children,y,T,F)}if(E!==pe)for(const L in E)!ln(L)&&!(L in B)&&s(u,L,E[L],null,k,h.children,y,T,F);"value"in B&&s(u,"value",E.value,B.value)}},C=(u,h,E,B,y,T,k,L,S)=>{const w=h.el=u?u.el:l(""),J=h.anchor=u?u.anchor:l("");let{patchFlag:U,dynamicChildren:Q,slotScopeIds:Z}=h;Z&&(L=L?L.concat(Z):Z),u==null?(r(w,E,B),r(J,E,B),W(h.children,E,J,y,T,k,L,S)):U>0&&U&64&&Q&&u.dynamicChildren?(K(u.dynamicChildren,Q,E,y,T,k,L),(h.key!=null||y&&h===y.subTree)&&Ri(u,h,!0)):Ae(u,h,E,J,y,T,k,L,S)},P=(u,h,E,B,y,T,k,L,S)=>{h.slotScopeIds=L,u==null?h.shapeFlag&512?y.ctx.activate(h,E,B,k,S):X(h,E,B,y,T,k,S):N(u,h,S)},X=(u,h,E,B,y,T,k)=>{const L=u.component=vc(u,B,y);if(Cn(u)&&(L.ctx.renderer=ue),_c(L),L.asyncDep){if(y&&y.registerDep(L,G),!u.el){const S=L.subTree=_e(Me);_(null,S,h,E)}return}G(L,u,h,E,y,T,k)},N=(u,h,E)=>{const B=h.component=u.component;if(La(u,h,E))if(B.asyncDep&&!B.asyncResolved){oe(B,h,E);return}else B.next=h,Ba(B.update),B.update();else h.el=u.el,B.vnode=h},G=(u,h,E,B,y,T,k)=>{const L=()=>{if(u.isMounted){let{next:J,bu:U,u:Q,parent:Z,vnode:ie}=u,fe=J,de;_t(u,!1),J?(J.el=ie.el,oe(u,J,k)):J=ie,U&&ur(U),(de=J.props&&J.props.onVnodeBeforeUpdate)&&$e(de,Z,J,ie),_t(u,!0);const Ee=fr(u),Ve=u.subTree;u.subTree=Ee,O(Ve,Ee,p(Ve.el),V(Ve),u,y,T),J.el=Ee.el,fe===null&&Fa(u,Ee.el),Q&&Fe(Q,y),(de=J.props&&J.props.onVnodeUpdated)&&Fe(()=>$e(de,Z,J,ie),y)}else{let J;const{el:U,props:Q}=h,{bm:Z,m:ie,parent:fe}=u,de=Vt(h);if(_t(u,!1),Z&&ur(Z),!de&&(J=Q&&Q.onVnodeBeforeMount)&&$e(J,fe,h),_t(u,!0),U&&ee){const Ee=()=>{u.subTree=fr(u),ee(U,u.subTree,u,y,null)};de?h.type.__asyncLoader().then(()=>!u.isUnmounted&&Ee()):Ee()}else{const Ee=u.subTree=fr(u);O(null,Ee,E,B,u,y,T),h.el=Ee.el}if(ie&&Fe(ie,y),!de&&(J=Q&&Q.onVnodeMounted)){const Ee=h;Fe(()=>$e(J,fe,Ee),y)}(h.shapeFlag&256||fe&&Vt(fe.vnode)&&fe.vnode.shapeFlag&256)&&u.a&&Fe(u.a,y),u.isMounted=!0,h=E=B=null}},S=u.effect=new Yr(L,()=>so(w),u.scope),w=u.update=()=>S.run();w.id=u.uid,_t(u,!0),w()},oe=(u,h,E)=>{h.component=u;const B=u.vnode.props;u.vnode=h,u.next=null,tc(u,h.props,B,E),oc(u,h.children,E),Jt(),tr(void 0,u.update),Qt()},Ae=(u,h,E,B,y,T,k,L,S=!1)=>{const w=u&&u.children,J=u?u.shapeFlag:0,U=h.children,{patchFlag:Q,shapeFlag:Z}=h;if(Q>0){if(Q&128){xe(w,U,E,B,y,T,k,L,S);return}else if(Q&256){Te(w,U,E,B,y,T,k,L,S);return}}Z&8?(J&16&&F(w,y,T),U!==w&&f(E,U)):J&16?Z&16?xe(w,U,E,B,y,T,k,L,S):F(w,y,T,!0):(J&8&&f(E,""),Z&16&&W(U,E,B,y,T,k,L,S))},Te=(u,h,E,B,y,T,k,L,S)=>{u=u||Ht,h=h||Ht;const w=u.length,J=h.length,U=Math.min(w,J);let Q;for(Q=0;QJ?F(u,y,T,!0,!1,U):W(h,E,B,y,T,k,L,S,U)},xe=(u,h,E,B,y,T,k,L,S)=>{let w=0;const J=h.length;let U=u.length-1,Q=J-1;for(;w<=U&&w<=Q;){const Z=u[w],ie=h[w]=S?ft(h[w]):Ue(h[w]);if(wt(Z,ie))O(Z,ie,E,null,y,T,k,L,S);else break;w++}for(;w<=U&&w<=Q;){const Z=u[U],ie=h[Q]=S?ft(h[Q]):Ue(h[Q]);if(wt(Z,ie))O(Z,ie,E,null,y,T,k,L,S);else break;U--,Q--}if(w>U){if(w<=Q){const Z=Q+1,ie=ZQ)for(;w<=U;)Le(u[w],y,T,!0),w++;else{const Z=w,ie=w,fe=new Map;for(w=ie;w<=Q;w++){const De=h[w]=S?ft(h[w]):Ue(h[w]);De.key!=null&&fe.set(De.key,w)}let de,Ee=0;const Ve=Q-ie+1;let Dt=!1,yo=0;const Xt=new Array(Ve);for(w=0;w=Ve){Le(De,y,T,!0);continue}let Qe;if(De.key!=null)Qe=fe.get(De.key);else for(de=ie;de<=Q;de++)if(Xt[de-ie]===0&&wt(De,h[de])){Qe=de;break}Qe===void 0?Le(De,y,T,!0):(Xt[Qe-ie]=w+1,Qe>=yo?yo=Qe:Dt=!0,O(De,h[Qe],E,null,y,T,k,L,S),Ee++)}const Bo=Dt?uc(Xt):Ht;for(de=Bo.length-1,w=Ve-1;w>=0;w--){const De=ie+w,Qe=h[De],Co=De+1{const{el:T,type:k,transition:L,children:S,shapeFlag:w}=u;if(w&6){Ne(u.component.subTree,h,E,B);return}if(w&128){u.suspense.move(h,E,B);return}if(w&64){k.move(u,h,E,ue);return}if(k===Se){r(T,h,E);for(let U=0;UL.enter(T),y);else{const{leave:U,delayLeave:Q,afterLeave:Z}=L,ie=()=>r(T,h,E),fe=()=>{U(T,()=>{ie(),Z&&Z()})};Q?Q(T,ie,fe):fe()}else r(T,h,E)},Le=(u,h,E,B=!1,y=!1)=>{const{type:T,props:k,ref:L,children:S,dynamicChildren:w,shapeFlag:J,patchFlag:U,dirs:Q}=u;if(L!=null&&qn(L,null,E,u,!0),J&256){h.ctx.deactivate(u);return}const Z=J&1&&Q,ie=!Vt(u);let fe;if(ie&&(fe=k&&k.onVnodeBeforeUnmount)&&$e(fe,h,u),J&6)z(u.component,E,B);else{if(J&128){u.suspense.unmount(E,B);return}Z&&Ye(u,null,h,"beforeUnmount"),J&64?u.type.remove(u,h,E,y,ue,B):w&&(T!==Se||U>0&&U&64)?F(w,h,E,!1,!0):(T===Se&&U&384||!y&&J&16)&&F(S,h,E),B&&Zt(u)}(ie&&(fe=k&&k.onVnodeUnmounted)||Z)&&Fe(()=>{fe&&$e(fe,h,u),Z&&Ye(u,null,h,"unmounted")},E)},Zt=u=>{const{type:h,el:E,anchor:B,transition:y}=u;if(h===Se){b(E,B);return}if(h===un){q(u);return}const T=()=>{o(E),y&&!y.persisted&&y.afterLeave&&y.afterLeave()};if(u.shapeFlag&1&&y&&!y.persisted){const{leave:k,delayLeave:L}=y,S=()=>k(E,T);L?L(u.el,T,S):S()}else T()},b=(u,h)=>{let E;for(;u!==h;)E=d(u),o(u),u=E;o(h)},z=(u,h,E)=>{const{bum:B,scope:y,update:T,subTree:k,um:L}=u;B&&ur(B),y.stop(),T&&(T.active=!1,Le(k,u,h,E)),L&&Fe(L,h),Fe(()=>{u.isUnmounted=!0},h),h&&h.pendingBranch&&!h.isUnmounted&&u.asyncDep&&!u.asyncResolved&&u.suspenseId===h.pendingId&&(h.deps--,h.deps===0&&h.resolve())},F=(u,h,E,B=!1,y=!1,T=0)=>{for(let k=T;ku.shapeFlag&6?V(u.component.subTree):u.shapeFlag&128?u.suspense.next():d(u.anchor||u.el),ce=(u,h,E)=>{u==null?h._vnode&&Le(h._vnode,null,null,!0):O(h._vnode||null,u,h,null,null,null,E),$n(),h._vnode=u},ue={p:O,um:Le,m:Ne,r:Zt,mt:X,mc:W,pc:Ae,pbc:K,n:V,o:e};let ne,ee;return t&&([ne,ee]=t(ue)),{render:ce,hydrate:ne,createApp:ic(ce,ne)}}function _t({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function Ri(e,t,n=!1){const r=e.children,o=t.children;if(Y(r)&&Y(o))for(let s=0;s>1,e[n[l]]0&&(t[r]=n[s-1]),n[s]=r)}}for(s=n.length,i=n[s-1];s-- >0;)n[s]=i,i=t[i];return n}const fc=e=>e.__isTeleport,Se=Symbol(void 0),vn=Symbol(void 0),Me=Symbol(void 0),un=Symbol(void 0),fn=[];let Ke=null;function or(e=!1){fn.push(Ke=e?null:[])}function dc(){fn.pop(),Ke=fn[fn.length-1]||null}let _n=1;function Ko(e){_n+=e}function Pi(e){return e.dynamicChildren=_n>0?Ke||Ht:null,dc(),_n>0&&Ke&&Ke.push(e),e}function Ti(e,t,n,r,o,s){return Pi(Fi(e,t,n,r,o,s,!0))}function Oi(e,t,n,r,o){return Pi(_e(e,t,n,r,o,!0))}function Kn(e){return e?e.__v_isVNode===!0:!1}function wt(e,t){return e.type===t.type&&e.key===t.key}const sr="__vInternal",Li=({key:e})=>e!=null?e:null,Mn=({ref:e,ref_key:t,ref_for:n})=>e!=null?me(e)||Be(e)||te(e)?{i:Re,r:e,k:t,f:!!n}:e:null;function Fi(e,t=null,n=null,r=0,o=null,s=e===Se?0:1,i=!1,l=!1){const a={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Li(t),ref:t&&Mn(t),scopeId:ii,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:s,patchFlag:r,dynamicProps:o,dynamicChildren:null,appContext:null};return l?(uo(a,n),s&128&&e.normalize(a)):n&&(a.shapeFlag|=me(n)?8:16),_n>0&&!i&&Ke&&(a.patchFlag>0||s&6)&&a.patchFlag!==32&&Ke.push(a),a}const _e=hc;function hc(e,t=null,n=null,r=0,o=null,s=!1){if((!e||e===Ka)&&(e=Me),Kn(e)){const l=gt(e,t,!0);return n&&uo(l,n),_n>0&&!s&&Ke&&(l.shapeFlag&6?Ke[Ke.indexOf(e)]=l:Ke.push(l)),l.patchFlag|=-2,l}if(Cc(e)&&(e=e.__vccOpts),t){t=pc(t);let{class:l,style:a}=t;l&&!me(l)&&(t.class=bn(l)),be(a)&&(Js(a)&&!Y(a)&&(a=we({},a)),t.style=Yn(a))}const i=me(e)?1:Sa(e)?128:fc(e)?64:be(e)?4:te(e)?2:0;return Fi(e,t,n,r,o,i,s,!0)}function pc(e){return e?Js(e)||sr in e?we({},e):e:null}function gt(e,t,n=!1){const{props:r,ref:o,patchFlag:s,children:i}=e,l=t?mc(r||{},t):r;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:l,key:l&&Li(l),ref:t&&t.ref?n&&o?Y(o)?o.concat(Mn(t)):[o,Mn(t)]:Mn(t):o,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:i,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Se?s===-1?16:s|16:s,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&>(e.ssContent),ssFallback:e.ssFallback&>(e.ssFallback),el:e.el,anchor:e.anchor}}function co(e=" ",t=0){return _e(vn,null,e,t)}function sh(e,t){const n=_e(un,null,e);return n.staticCount=t,n}function ih(e="",t=!1){return t?(or(),Oi(Me,null,e)):_e(Me,null,e)}function Ue(e){return e==null||typeof e=="boolean"?_e(Me):Y(e)?_e(Se,null,e.slice()):typeof e=="object"?ft(e):_e(vn,null,String(e))}function ft(e){return e.el===null||e.memo?e:gt(e)}function uo(e,t){let n=0;const{shapeFlag:r}=e;if(t==null)t=null;else if(Y(t))n=16;else if(typeof t=="object")if(r&65){const o=t.default;o&&(o._c&&(o._d=!1),uo(e,o()),o._c&&(o._d=!0));return}else{n=32;const o=t._;!o&&!(sr in t)?t._ctx=Re:o===3&&Re&&(Re.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else te(t)?(t={default:t,_ctx:Re},n=32):(t=String(t),r&64?(n=16,t=[co(t)]):n=8);e.children=t,e.shapeFlag|=n}function mc(...e){const t={};for(let n=0;nye||Re,Ut=e=>{ye=e,e.scope.on()},Ft=()=>{ye&&ye.scope.off(),ye=null};function xi(e){return e.vnode.shapeFlag&4}let qt=!1;function _c(e,t=!1){qt=t;const{props:n,children:r}=e.vnode,o=xi(e);ec(e,n,o,t),rc(e,r);const s=o?Ac(e,t):void 0;return qt=!1,s}function Ac(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=Qs(new Proxy(e.ctx,Ja));const{setup:r}=n;if(r){const o=e.setupContext=r.length>1?yc(e):null;Ut(e),Jt();const s=mt(r,e,0,[e.props,o]);if(Qt(),Ft(),Ds(s)){if(s.then(Ft,Ft),t)return s.then(i=>{Wo(e,i,t)}).catch(i=>{Bn(i,e,0)});e.asyncDep=s}else Wo(e,s,t)}else Di(e,t)}function Wo(e,t,n){te(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:be(t)&&(e.setupState=ei(t)),Di(e,n)}let Jo;function Di(e,t,n){const r=e.type;if(!e.render){if(!t&&Jo&&!r.render){const o=r.template;if(o){const{isCustomElement:s,compilerOptions:i}=e.appContext.config,{delimiters:l,compilerOptions:a}=r,c=we(we({isCustomElement:s,delimiters:l},i),a);r.render=Jo(o,c)}}e.render=r.render||We}Ut(e),Jt(),Qa(e),Qt(),Ft()}function bc(e){return new Proxy(e.attrs,{get(t,n){return je(e,"get","$attrs"),t[n]}})}function yc(e){const t=r=>{e.exposed=r||{}};let n;return{get attrs(){return n||(n=bc(e))},slots:e.slots,emit:e.emit,expose:t}}function ir(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(ei(Qs(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Vn)return Vn[n](e)}}))}function Bc(e){return te(e)&&e.displayName||e.name}function Cc(e){return te(e)&&"__vccOpts"in e}const ve=(e,t)=>Aa(e,t,qt);function ge(e,t,n){const r=arguments.length;return r===2?be(t)&&!Y(t)?Kn(t)?_e(e,null,[t]):_e(e,t):_e(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&Kn(n)&&(n=[n]),_e(e,t,n))}const wc="3.2.34",Rc="http://www.w3.org/2000/svg",Rt=typeof document!="undefined"?document:null,Qo=Rt&&Rt.createElement("template"),Pc={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{const o=t?Rt.createElementNS(Rc,e):Rt.createElement(e,n?{is:n}:void 0);return e==="select"&&r&&r.multiple!=null&&o.setAttribute("multiple",r.multiple),o},createText:e=>Rt.createTextNode(e),createComment:e=>Rt.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Rt.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},cloneNode(e){const t=e.cloneNode(!0);return"_value"in e&&(t._value=e._value),t},insertStaticContent(e,t,n,r,o,s){const i=n?n.previousSibling:t.lastChild;if(o&&(o===s||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),n),!(o===s||!(o=o.nextSibling)););else{Qo.innerHTML=r?`${e}`:e;const l=Qo.content;if(r){const a=l.firstChild;for(;a.firstChild;)l.appendChild(a.firstChild);l.removeChild(a)}t.insertBefore(l,n)}return[i?i.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}};function Tc(e,t,n){const r=e._vtc;r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}function Oc(e,t,n){const r=e.style,o=me(n);if(n&&!o){for(const s in n)Mr(r,s,n[s]);if(t&&!me(t))for(const s in t)n[s]==null&&Mr(r,s,"")}else{const s=r.display;o?t!==n&&(r.cssText=n):t&&e.removeAttribute("style"),"_vod"in e&&(r.display=s)}}const Yo=/\s*!important$/;function Mr(e,t,n){if(Y(n))n.forEach(r=>Mr(e,t,r));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const r=Lc(e,t);Yo.test(n)?e.setProperty(St(r),n.replace(Yo,""),"important"):e[r]=n}}const Go=["Webkit","Moz","ms"],pr={};function Lc(e,t){const n=pr[t];if(n)return n;let r=Ge(t);if(r!=="filter"&&r in e)return pr[t]=r;r=Xn(r);for(let o=0;o{let e=Date.now,t=!1;if(typeof window!="undefined"){Date.now()>document.createEvent("Event").timeStamp&&(e=()=>performance.now());const n=navigator.userAgent.match(/firefox\/(\d+)/i);t=!!(n&&Number(n[1])<=53)}return[e,t]})();let jr=0;const Dc=Promise.resolve(),Ic=()=>{jr=0},kc=()=>jr||(Dc.then(Ic),jr=Ii());function Mc(e,t,n,r){e.addEventListener(t,n,r)}function jc(e,t,n,r){e.removeEventListener(t,n,r)}function Nc(e,t,n,r,o=null){const s=e._vei||(e._vei={}),i=s[t];if(r&&i)i.value=r;else{const[l,a]=Hc(t);if(r){const c=s[t]=$c(r,o);Mc(e,l,c,a)}else i&&(jc(e,l,i,a),s[t]=void 0)}}const Xo=/(?:Once|Passive|Capture)$/;function Hc(e){let t;if(Xo.test(e)){t={};let n;for(;n=e.match(Xo);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}return[St(e.slice(2)),t]}function $c(e,t){const n=r=>{const o=r.timeStamp||Ii();(xc||o>=n.attached-1)&&ze(zc(r,n.value),t,5,[r])};return n.value=e,n.attached=kc(),n}function zc(e,t){if(Y(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(r=>o=>!o._stopped&&r&&r(o))}else return t}const es=/^on[a-z]/,Vc=(e,t,n,r,o=!1,s,i,l,a)=>{t==="class"?Tc(e,r,o):t==="style"?Oc(e,n,r):yn(t)?qr(t)||Nc(e,t,n,r,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Uc(e,t,r,o))?Sc(e,t,r,s,i,l,a):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),Fc(e,t,r,o))};function Uc(e,t,n,r){return r?!!(t==="innerHTML"||t==="textContent"||t in e&&es.test(t)&&te(n)):t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA"||es.test(t)&&me(n)?!1:t in e}const lt="transition",en="animation",fo=(e,{slots:t})=>ge(ui,qc(e),t);fo.displayName="Transition";const ki={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String};fo.props=we({},ui.props,ki);const At=(e,t=[])=>{Y(e)?e.forEach(n=>n(...t)):e&&e(...t)},ts=e=>e?Y(e)?e.some(t=>t.length>1):e.length>1:!1;function qc(e){const t={};for(const C in e)C in ki||(t[C]=e[C]);if(e.css===!1)return t;const{name:n="v",type:r,duration:o,enterFromClass:s=`${n}-enter-from`,enterActiveClass:i=`${n}-enter-active`,enterToClass:l=`${n}-enter-to`,appearFromClass:a=s,appearActiveClass:c=i,appearToClass:f=l,leaveFromClass:p=`${n}-leave-from`,leaveActiveClass:d=`${n}-leave-active`,leaveToClass:v=`${n}-leave-to`}=e,A=Kc(o),D=A&&A[0],O=A&&A[1],{onBeforeEnter:g,onEnter:_,onEnterCancelled:R,onLeave:M,onLeaveCancelled:q,onBeforeAppear:$=g,onAppear:I=_,onAppearCancelled:m=R}=t,W=(C,P,X)=>{bt(C,P?f:l),bt(C,P?c:i),X&&X()};let H=!1;const K=(C,P)=>{H=!1,bt(C,p),bt(C,v),bt(C,d),P&&P()},j=C=>(P,X)=>{const N=C?I:_,G=()=>W(P,C,X);At(N,[P,G]),ns(()=>{bt(P,C?a:s),at(P,C?f:l),ts(N)||rs(P,r,D,G)})};return we(t,{onBeforeEnter(C){At(g,[C]),at(C,s),at(C,i)},onBeforeAppear(C){At($,[C]),at(C,a),at(C,c)},onEnter:j(!1),onAppear:j(!0),onLeave(C,P){H=!0;const X=()=>K(C,P);at(C,p),Qc(),at(C,d),ns(()=>{!H||(bt(C,p),at(C,v),ts(M)||rs(C,r,O,X))}),At(M,[C,X])},onEnterCancelled(C){W(C,!1),At(R,[C])},onAppearCancelled(C){W(C,!0),At(m,[C])},onLeaveCancelled(C){K(C),At(q,[C])}})}function Kc(e){if(e==null)return null;if(be(e))return[mr(e.enter),mr(e.leave)];{const t=mr(e);return[t,t]}}function mr(e){return Ms(e)}function at(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e._vtc||(e._vtc=new Set)).add(t)}function bt(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.remove(r));const{_vtc:n}=e;n&&(n.delete(t),n.size||(e._vtc=void 0))}function ns(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let Wc=0;function rs(e,t,n,r){const o=e._endId=++Wc,s=()=>{o===e._endId&&r()};if(n)return setTimeout(s,n);const{type:i,timeout:l,propCount:a}=Jc(e,t);if(!i)return r();const c=i+"end";let f=0;const p=()=>{e.removeEventListener(c,d),s()},d=v=>{v.target===e&&++f>=a&&p()};setTimeout(()=>{f(n[A]||"").split(", "),o=r(lt+"Delay"),s=r(lt+"Duration"),i=os(o,s),l=r(en+"Delay"),a=r(en+"Duration"),c=os(l,a);let f=null,p=0,d=0;t===lt?i>0&&(f=lt,p=i,d=s.length):t===en?c>0&&(f=en,p=c,d=a.length):(p=Math.max(i,c),f=p>0?i>c?lt:en:null,d=f?f===lt?s.length:a.length:0);const v=f===lt&&/\b(transform|all)(,|$)/.test(n[lt+"Property"]);return{type:f,timeout:p,propCount:d,hasTransform:v}}function os(e,t){for(;e.lengthss(n)+ss(e[r])))}function ss(e){return Number(e.slice(0,-1).replace(",","."))*1e3}function Qc(){return document.body.offsetHeight}const Yc={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},lh=(e,t)=>n=>{if(!("key"in n))return;const r=St(n.key);if(t.some(o=>o===r||Yc[o]===r))return e(n)},ah={beforeMount(e,{value:t},{transition:n}){e._vod=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):tn(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:r}){!t!=!n&&(r?t?(r.beforeEnter(e),tn(e,!0),r.enter(e)):r.leave(e,()=>{tn(e,!1)}):tn(e,t))},beforeUnmount(e,{value:t}){tn(e,t)}};function tn(e,t){e.style.display=t?e._vod:"none"}const Gc=we({patchProp:Vc},Pc);let Er,is=!1;function Zc(){return Er=is?Er:ac(Gc),is=!0,Er}const Xc=(...e)=>{const t=Zc().createApp(...e),{mount:n}=t;return t.mount=r=>{const o=eu(r);if(o)return n(o,!0,o instanceof SVGElement)},t};function eu(e){return me(e)?document.querySelector(e):e}const tu={base:"/study/",lang:"zh-CN",title:"shAilene",description:"just be simple.",head:[["link",{rel:"icon",href:"/icon/111.ico"}]],locales:{}};var nu=([e,t,n])=>e==="meta"&&t.name?`${e}.${t.name}`:["title","base"].includes(e)?e:e==="template"&&t.id?`${e}.${t.id}`:JSON.stringify([e,t,n]),ru=e=>{const t=new Set,n=[];return e.forEach(r=>{const o=nu(r);t.has(o)||(t.add(o),n.push(r))}),n},ou=e=>/^(https?:)?\/\//.test(e),ch=e=>/^mailto:/.test(e),uh=e=>/^tel:/.test(e),Mi=e=>Object.prototype.toString.call(e)==="[object Object]",su=e=>e.replace(/\/$/,""),iu=e=>e.replace(/^\//,""),ji=(e,t)=>{const n=Object.keys(e).sort((r,o)=>{const s=o.split("/").length-r.split("/").length;return s!==0?s:o.length-r.length});for(const r of n)if(t.startsWith(r))return r;return"/"};const Ni={"v-8daa1a0e":re(()=>x(()=>import("./index.html.c7d52ef1.js"),[])),"v-4e3aed14":re(()=>x(()=>import("./index.html.e76ca8fd.js"),[])),"v-2d0a8eae":re(()=>x(()=>import("./index.html.30ce0398.js"),[])),"v-14c69af4":re(()=>x(()=>import("./index.html.5c567981.js"),[])),"v-2d0aa62c":re(()=>x(()=>import("./index.html.5bd5d5a7.js"),[])),"v-73197d7b":re(()=>x(()=>import("./index.html.92fc2c18.js"),[])),"v-d5c1c75c":re(()=>x(()=>import("./index.html.e11e6091.js"),[])),"v-24adc8d7":re(()=>x(()=>import("./\u8BBE\u8BA1\u6A21\u5F0F1.html.38456b0f.js"),[])),"v-2d61ea56":re(()=>x(()=>import("./\u8BBE\u8BA1\u6A21\u5F0F2.html.013cf02d.js"),[])),"v-4f8f811e":re(()=>x(()=>import("./gin.html.9aeae20f.js"),[])),"v-2ea03d90":re(()=>x(()=>import("./golang.html.27b9c935.js"),[])),"v-500ab9d8":re(()=>x(()=>import("./gorm.html.fea77a30.js"),[])),"v-b6ec6710":re(()=>x(()=>import("./Javaweb.html.3fb4d015.js"),[])),"v-3201b6ed":re(()=>x(()=>import("./ES.html.630ab9f5.js"),[])),"v-3a6a4d07":re(()=>x(()=>import("./vue\u57FA\u7840.html.5a7cad2c.js"),[])),"v-12a323e6":re(()=>x(()=>import("./vue\u7EC4\u4EF6.html.733f6df3.js"),[])),"v-57fd34d4":re(()=>x(()=>import("./\u4E00\u4E9B\u77E5\u8BC6\u70B9\u7684\u8BB0\u5F55.html.1a3b253e.js"),[])),"v-1cbd166b":re(()=>x(()=>import("./Java\u7B14\u8BB0.html.64b81d20.js"),[])),"v-83ddddfc":re(()=>x(()=>import("./dubbo.html.8095631a.js"),[])),"v-1dbd0fce":re(()=>x(()=>import("./springcloud\uFF08\u4E0A\uFF09.html.0fdc4fcf.js"),[])),"v-77987a0f":re(()=>x(()=>import("./springcloud\uFF08\u4E0B\uFF09.html.87e1b4ab.js"),[])),"v-9ef17310":re(()=>x(()=>import("./zookeeper.html.64c8c5f3.js"),[])),"v-05cd8fe4":re(()=>x(()=>import("./\u300A\u5E76\u53D1\u7F16\u7A0B\u7684\u827A\u672F\u300B\u7B14\u8BB0.html.2c67d429.js"),[])),"v-0013e773":re(()=>x(()=>import("./\u5E76\u53D1\u7F16\u7A0B.html.3e7c354c.js"),[])),"v-4c0a9128":re(()=>x(()=>import("./\u5C1A\u7845\u8C37_\u5B8B\u7EA2\u5EB7_JDBC.html.753425b4.js"),[])),"v-456aa1eb":re(()=>x(()=>import("./redis.html.bc33957c.js"),[])),"v-9f83c3ba":re(()=>x(()=>import("./Mybatis.html.f4ea1339.js"),[])),"v-21b5c2ea":re(()=>x(()=>import("./spring.html.e77939c3.js"),[])),"v-068e11cb":re(()=>x(()=>import("./springboot.html.0a246b01.js"),[])),"v-92381d18":re(()=>x(()=>import("./springboot.html.4daae716.js"),[])),"v-0788dc22":re(()=>x(()=>import("./springMVC.html.5bc788ed.js"),[])),"v-4b84538b":re(()=>x(()=>import("./kafka.html.7f75cf5c.js"),[])),"v-1e0ac90e":re(()=>x(()=>import("./RabbitMQ.html.b086482d.js"),[])),"v-d2a5a678":re(()=>x(()=>import("./\u64CD\u4F5C\u7CFB\u7EDF.html.7291dadc.js"),[])),"v-30eca57b":re(()=>x(()=>import("./flink\u57FA\u672C\u7BC72.html.151e4540.js"),[])),"v-791cd9a5":re(()=>x(()=>import("./MySQL\u6570\u636E\u5E93\u7B14\u8BB0-\u7B2C\u4E00\u90E8\u5206.html.2685ce3f.js"),[])),"v-94326c4c":re(()=>x(()=>import("./MySQL\u6570\u636E\u5E93\u7B14\u8BB0-\u7B2C\u4E8C\u90E8\u5206.html.4a06dff3.js"),[])),"v-3706649a":re(()=>x(()=>import("./404.html.95128ecc.js"),[]))},lu={"404":re(()=>x(()=>import("./404.11fc05c0.js"),[])),Layout:re(()=>x(()=>import("./Layout.179ef6b3.js"),[]))};var Hi=Pe(wl),$i=eo({key:"",path:"",title:"",lang:"",frontmatter:{},excerpt:"",headers:[]}),tt=Pe($i),wn=()=>tt;bo.webpackHot&&(__VUE_HMR_RUNTIME__.updatePageData=e=>{Hi.value[e.key]=()=>Promise.resolve(e),e.key===tt.value.key&&(tt.value=e)});var zi=Symbol(""),au=()=>{const e=Ce(zi);if(!e)throw new Error("usePageFrontmatter() is called without provider.");return e},Vi=Symbol(""),cu=()=>{const e=Ce(Vi);if(!e)throw new Error("usePageHead() is called without provider.");return e},uu=Symbol(""),Ui=Symbol(""),fu=()=>{const e=Ce(Ui);if(!e)throw new Error("usePageLang() is called without provider.");return e},ho=Symbol(""),du=()=>{const e=Ce(ho);if(!e)throw new Error("useRouteLocale() is called without provider.");return e},ht=Pe(tu),hu=()=>ht;bo.webpackHot&&(__VUE_HMR_RUNTIME__.updateSiteData=e=>{ht.value=e});var qi=Symbol(""),fh=()=>{const e=Ce(qi);if(!e)throw new Error("useSiteLocaleData() is called without provider.");return e},pu=Symbol(""),Bt=Yt({resolvePageData:async e=>{const t=Hi.value[e],n=await(t==null?void 0:t());return n!=null?n:$i},resolvePageFrontmatter:e=>e.frontmatter,resolvePageHead:(e,t,n)=>{const r=me(t.description)?t.description:n.description,o=[...Y(t.head)?t.head:[],...n.head,["title",{},e],["meta",{name:"description",content:r}]];return ru(o)},resolvePageHeadTitle:(e,t)=>`${e.title?`${e.title} | `:""}${t.title}`,resolvePageLang:e=>e.lang||"en",resolveRouteLocale:(e,t)=>ji(e,t),resolveSiteLocaleData:(e,t)=>Ze(Ze({},e),e.locales[t])}),mu=Je({setup(e,t){const n=Pe(!1);return vt(()=>{n.value=!0}),()=>{var r,o;return n.value?(o=(r=t.slots).default)==null?void 0:o.call(r):null}}}),po=e=>{let t;e.pageKey?t=e.pageKey:t=wn().value.key;const n=Ni[t];return n?ge(n):ge("div","404 Not Found")};po.displayName="Content";po.props={pageKey:{type:String,required:!1}};var ls=Je({name:"Vuepress",setup(){const e=wn(),t=ve(()=>{let n;if(e.value.path){const r=e.value.frontmatter.layout;me(r)?n=r:n="Layout"}else n="404";return lu[n]||qa(n,!1)});return()=>ge(t.value)}}),Eu=e=>ou(e)?e:`${hu().value.base}${iu(e)}`,xt=e=>e;function Ki(e,t,n){var r,o,s;t===void 0&&(t=50),n===void 0&&(n={});var i=(r=n.isImmediate)!=null&&r,l=(o=n.callback)!=null&&o,a=n.maxWait,c=Date.now(),f=[];function p(){if(a!==void 0){var v=Date.now()-c;if(v+t>=a)return a-v}return t}var d=function(){var v=[].slice.call(arguments),A=this;return new Promise(function(D,O){var g=i&&s===void 0;if(s!==void 0&&clearTimeout(s),s=setTimeout(function(){if(s=void 0,c=Date.now(),!i){var R=e.apply(A,v);l&&l(R),f.forEach(function(M){return(0,M.resolve)(R)}),f=[]}},p()),g){var _=e.apply(A,v);return l&&l(_),D(_)}f.push({resolve:D,reject:O})})};return d.cancel=function(v){s!==void 0&&clearTimeout(s),f.forEach(function(A){return(0,A.reject)(v)}),f=[]},d}/*!
                       * vue-router v4.0.15
                       * (c) 2022 Eduardo San Martin Morote
                       * @license MIT
                    diff --git a/assets/dubbo.html.aceb0d71.js b/assets/dubbo.html.8095631a.js
                    similarity index 99%
                    rename from assets/dubbo.html.aceb0d71.js
                    rename to assets/dubbo.html.8095631a.js
                    index f82280cb..fc4d57cb 100644
                    --- a/assets/dubbo.html.aceb0d71.js
                    +++ b/assets/dubbo.html.8095631a.js
                    @@ -1,4 +1,4 @@
                    -import{_ as a,e as n}from"./app.0d029894.js";var s="/study/assets/image-20220107145037242.87152ef2.png",t="/study/assets/image-20220107150819280.4feb5d88.png",p="/study/assets/image-20220107152751298.e3b11193.png",e="/study/assets/image-20220107153019520.67669201.png",o="/study/assets/image-20220107154427177.7be6f025.png",l="/study/assets/image-20220107224809995.a6409be9.png",c="/study/assets/image-20220108142917450.ef0c75b3.png",u="/study/assets/image-20220108154140030.d5508176.png",i="/study/assets/image-20220108154510355.967310eb.png",r="/study/assets/image-20220108194148535.8bd7f2b0.png",k="/study/assets/image-20220108194925385.facd82db.png";const d={},b=n('

                    Dubbo

                    \u7B2C1\u7AE0 \u8FDC\u7A0B\u8C03\u7528

                    \u6982\u8FF0

                    1. \u5355\u4E00\u5E94\u7528\u7684\u4F18\u70B9\uFF1A\u5F00\u53D1\u76F8\u5BF9\u7B80\u5355

                      \u5355\u4E00\u5E94\u7528\u7684\u7F3A\u70B9\uFF1A\u90E8\u7F72\u4E0A\u548C\u540E\u671F\u7684\u5F00\u53D1\u7EF4\u62A4\u4E0A\uFF0C\u6BD4\u8F83\u9EBB\u70E6\uFF0C\u4F18\u5316\u8F83\u9EBB\u70E6\u3002

                    2. \u5FAE\u670D\u52A1\uFF1A

                      \u4E00\u4E2A\u5927\u7684\u5355\u4F53\u5E94\u7528\u62C6\u5206\u6210\u5F88\u591A\u5C0F\u7684\u670D\u52A1\uFF0C\u8FD9\u6BCF\u4E00\u4E2A\u5C0F\u7684\u670D\u52A1\u90FD\u662F\u4E00\u4E2A\u5E94\u7528\u3002\u8FD9\u5C31\u53EB\u5FAE\u670D\u52A1

                      \u6BCF\u4E2A\u670D\u52A1\u90FD\u662F\u5355\u4E00\u7684\uFF0C\u5C0F\u7684\uFF0C\u800C\u4E14\u53EF\u8FD0\u884C\u7684\uFF0C\u6BCF\u4E2A\u670D\u52A1\u53EF\u4EE5\u90E8\u7F72\u5728\u4E0D\u540C\u7684\u670D\u52A1\u5668\u4E0A\uFF0C\u8FD9\u53EB\u5FAE\u670D\u52A1\u3002

                      \u5206\u5E03\u5F0F\uFF1A

                      \u8FD9\u4E9B\u5C0F\u7684\u5E94\u7528\u5206\u522B\u90E8\u7F72\u5728\u4E0D\u540C\u7684\u670D\u52A1\u5668\u4E0A\uFF0C\u5728\u670D\u52A1\u5668\u7AEF\uFF0C\u8FD9\u4E9B\u4E0D\u540C\u7684\u670D\u52A1\u5668\u6784\u6210\u4E86\u4E00\u4E2A\u7ED3\u6784\uFF0C\u4E00\u4E2A\u7F51\u7EDC\uFF0C\u8FD9\u5C31\u53EB\u5206\u5E03\u5F0F\u7684\u7ED3\u6784\uFF0C\u8FD9\u5C31\u662F\u670D\u52A1\u5668\u96C6\u7FA4\uFF0C\u96C6\u7FA4\u662F\u591A\u4E2A\u670D\u52A1\u5668\uFF0C\u662F\u4E00\u79CD\u7269\u7406\u5F62\u6001\uFF0C\u5206\u5E03\u5F0F\u5219\u662F\u4E00\u79CD\u601D\u60F3\u3002

                      \u8FD9\u591A\u4E2A\u670D\u52A1\u5668\u4F5C\u4E3A\u4E00\u4E2A\u6574\u4F53\u5411\u7528\u6237\u63D0\u4F9B\u529F\u80FD\u3002

                      \u7531\u591A\u53F0\u670D\u52A1\u5668\u5171\u540C\u5B8C\u6210\u4E00\u4EF6\u6BD4\u8F83\u590D\u6742\u7684\u4E8B\uFF0C\u53EF\u4EE5\u7406\u89E3\u4E3A\u5206\u5E03\u5F0F

                      \u8FD9\u79CD\u5206\u5E03\u5F0F\u7684\u7ED3\u6784\uFF0C\u591A\u53F0\u670D\u52A1\u5668\uFF0C\u5BF9\u7528\u6237\u800C\u8A00\u662F\u4E00\u4E2A\u6574\u4F53\u3002

                      \u603B\u7ED3\uFF1A

                      \u5FAE\u670D\u52A1\u7684\u5F00\u53D1\u6A21\u5F0F\uFF0C\u5206\u5E03\u5F0F\u7684\u90E8\u7F72

                    3. \u90E8\u7F72\u5728\u4E0D\u540C\u670D\u52A1\u5668\u4E0A\u7684\u4E0D\u540C\u5E94\u7528\u4E4B\u95F4\uFF0C\u907F\u514D\u4E0D\u4E86\u4E92\u76F8\u8C03\u7528\u7684\u529F\u80FD

                      servlet\u4E4B\u95F4\u7684\u8C03\u7528\u662F\u901A\u8FC7http\u534F\u8BAE\u8FDB\u884C\u8C03\u7528\uFF0C\u662F\u6BD4\u8F83\u6162\u7684\u3002

                      \u600E\u4E48\u65B9\u4FBF\u5730\u8FDB\u884C\u5FAE\u670D\u52A1\u4E4B\u95F4\u7684\u8C03\u7528\u548C\u8BBF\u95EE\u7684\u5462?

                      dubbo\u6846\u67B6\u3002

                    RPC\u534F\u8BAE

                    RPC\u662F\u4EC0\u4E48\uFF1F

                    1. \u534F\u8BAE\u6307\u591A\u65B9\u5171\u540C\u9075\u5FAA\u7684\u89C4\u8303\uFF0C\u5728\u7F51\u7EDC\u4E0A\u7684\u8BA1\u7B97\u673A\u8FDB\u884C\u6570\u636E\u4EA4\u6362\u4F9D\u9760\u5404\u79CD\u534F\u8BAE\uFF0C\u4F8B\u5982http\u3001ftp\u7B49\u3002

                    2. \u4E00\u53F0\u8BA1\u7B97\u673A\u6309\u89C4\u5B9A\u597D\u7684\u683C\u5F0F\u53D1\u9001\u6570\u636E\uFF0C\u53E6\u4E00\u53F0\u8BA1\u7B97\u7684\u7A0B\u5E8F\u6309\u6307\u5B9A\u7684\u683C\u5F0F\u63A5\u6536\u6570\u636E\uFF0C\u4E24\u53F0\u8BA1\u7B97\u673A\u6216\u8005\u8BF4\u670D\u52A1\u5668\u4F7F\u7528\u4E92\u76F8\u7406\u89E3\u7684\u683C\u5F0F\u8BFB\u5199\u6570\u636E\uFF0C\u8FBE\u5230\u6570\u636E\u4EA4\u6362\u7684\u76EE\u7684\u3002

                    3. RPC\u662FRemote Procedure Call Protocol\uFF0C\u5373\u8FDC\u7A0B\u8FC7\u7A0B\u8C03\u7528\u534F\u8BAE\u3002\u662F\u4E00\u79CD\u901A\u8FC7\u7F51\u7EDC\u4ECE\u8FDC\u7A0B\u8BA1\u7B97\u673A\u7A0B\u5E8F\u8BF7\u6C42\u670D\u52A1\uFF0C\u800C\u4E0D\u9700\u8981\u4E86\u89E3\u5E95\u5C42\u7F51\u7EDC\u6280\u672F\u7684\u534F\u8BAE\u3002\u8BE5\u534F\u8BAE\u5141\u8BB8\u8FD0\u884C\u4E8E\u4E00\u53F0\u8BA1\u7B97\u673A\u7684\u7A0B\u5E8F\u8C03\u7528\u53E6\u4E00\u53F0\u8BA1\u7B97\u673A\u7684\u7A0B\u5E8F\u3002\u7A0B\u5E8F\u5458\u65E0\u9700\u7F16\u5199\u7F51\u7EDC\u4EA4\u4E92\u7684\u529F\u80FD\u4EE3\u7801\u3002

                      \u7B80\u800C\u8A00\u4E4B\uFF0CRPC\u534F\u8BAE\u662F\u5B9E\u73B0\u5206\u5E03\u5F0F\u73AF\u5883\u4E2D\uFF0C\u4E0D\u540C\u670D\u52A1\u4E4B\u95F4\u6216\u8005\u8BF4\u670D\u52A1\u5668\u4E4B\u95F4\u7684\u76F8\u4E92\u8C03\u7528\u7684\u534F\u8BAE\u3002

                      RPC\u534F\u8BAE\u5B9A\u4E49\u4E86\u5E95\u5C42\u7684\u670D\u52A1\u5668\u4E4B\u95F4\u6570\u636E\u4EA4\u6362\u7684\u65B9\u5F0F\u548C\u8C03\u7528\u7684\u5904\u7406\u903B\u8F91\u7B49\u3002

                    4. RPC\u91CC\u9762\u8FD8\u6709\u5F88\u591A\u5B50\u534F\u8BAE\u3002

                    RPC\u7684\u4F5C\u7528

                    1. \u4E3B\u8981\u529F\u80FD\u662F\u8BA9\u6784\u5EFA\u5206\u5E03\u5F0F\u8BA1\u7B97\uFF08\u5E94\u7528\uFF09\u66F4\u5BB9\u6613\uFF0C\u5728\u63D0\u4F9B\u5F3A\u5927\u7684\u8FDC\u7A0B\u8C03\u7528\u80FD\u529B\u65F6\u4E0D\u635F\u5931\u672C\u5730\u8C03\u7528\u7684\u8BED\u4E49\u7B80\u6D01\u6027\uFF0C\u5728\u4E00\u53F0\u8BA1\u7B97\u673A\u7684\u7A0B\u5E8F\u4F7F\u7528\u5176\u4ED6\u8BA1\u7B97\u673A\u4E0A\u7684\u529F\u80FD\u5C31\u50CF\u4F7F\u7528\u81EA\u5DF1\u7684\u529F\u80FD\u4E00\u6837\u3002

                      RPC\u6280\u672F\u63D0\u4F9B\u4E86\u900F\u660E\u7684\u8BBF\u95EE\u5176\u4ED6\u670D\u52A1\u7684\u5E95\u5C42\u5B9E\u73B0\u7EC6\u8282\uFF0C\u4F7F\u7528\u5206\u5E03\u5F0F\u7CFB\u7EDF\u4E2D\u7684\u670D\u52A1\u66F4\u52A0\u65B9\u4FBF\u3002

                    \u5206\u5E03\u5F0F

                    1. \u5206\u5E03\u5F0F\u6307\u591A\u53F0\u8BA1\u7B97\u673A\uFF08\u670D\u52A1\u5668\uFF09\u4F4D\u4E8E\u7F51\u7EDC\u7CFB\u7EDF\u4E2D\uFF0C\u591A\u53F0\u8BA1\u7B97\u673A\u5F62\u6210\u4E00\u4E2A\u6574\u4F53\u5BF9\u5916\u754C\u63D0\u4F9B\u670D\u52A1\u3002\u7528\u6237\u4F7F\u7528\u7CFB\u7EDF\u4E0D\u77E5\u9053\u662F\u591A\u53F0\u8BA1\u7B97\u673A\u5728\u4F7F\u7528\u4E0D\u540C\u7684\u64CD\u4F5C\u7CFB\u7EDF\uFF0C\u4E0D\u540C\u7684\u5E94\u7528\u7A0B\u5E8F\u63D0\u4F9B\u670D\u52A1\u3002

                    2. \u96C6\u7FA4\u662F\u4E00\u79CD\u7269\u7406\u7ED3\u6784\uFF0C\u800C\u5206\u5E03\u5F0F\u662F\u4E00\u79CD\u601D\u60F3\uFF0C\u4E0D\u540C\u7684\u5355\u4E00\u7684\u5E94\u7528\u90E8\u7F72\u5728\u4E0D\u540C\u7684\u670D\u52A1\u5668\u4E0A\uFF0C\u8FD9\u4E9B\u4E0D\u540C\u7684\u670D\u52A1\u5668\u53C8\u4F5C\u4E3A\u4E00\u4E2A\u6574\u4F53\u5BF9\u5916\u63D0\u4F9B\u670D\u52A1\uFF0C\u8FD9\u53EB\u505A\u5206\u5E03\u5F0F\u7684\u7ED3\u6784\u3002

                      \u5206\u5E03\u5F0F\u5F3A\u8C03\u90E8\u7F72\uFF0C\u5FAE\u670D\u52A1\u5F3A\u8C03\u5F00\u53D1\u3002

                    3. RPC\u8BA9\u5206\u5E03\u5F0F\u5730\u5F00\u53D1\u6A21\u5F0F\u66F4\u7B80\u5355\u3002

                    \u7B2C2\u7AE0 Dubbo

                    Dubbo\u4ECB\u7ECD

                    1. \u662F\u56FD\u5185\u7684\u963F\u91CC\u516C\u53F8\u5F00\u6E90\u7684\u3002

                      \u662F\u4E00\u4E2A\u9AD8\u6027\u80FD\u7684RPC\u6846\u67B6\u3002

                      \u65E2\u7136\u662FRPC\u6846\u67B6\uFF0C\u90A3\u4E48\u5C31\u8BF4\u660E\u6211\u4EEC\u53EF\u4EE5\u901A\u8FC7dubbo\u6846\u67B6\u6765\u505A\u5206\u5E03\u5F0F\u3001\u5FAE\u670D\u52A1\u7684\u5F00\u53D1\u3002

                    2. Dubbo\u6846\u67B6\u7684\u7EC4\u6210\u90E8\u5206

                      • spring\u5BB9\u5668
                      • \u670D\u52A1\u63D0\u4F9B\u8005\uFF08\u63D0\u4F9B\u670D\u52A1\u7684\uFF09
                      • \u670D\u52A1\u7684\u6D88\u8D39\u8005\uFF08\u7528\u5176\u4ED6\u670D\u52A1\u5668\u63D0\u4F9B\u7684\u670D\u52A1\u7684\uFF09
                      • \u6CE8\u518C\u4E2D\u5FC3---\u7528\u6765\u7BA1\u7406dubbo\u670D\u52A1\u8005\u548C\u6D88\u8D39\u8005\u7684
                      • \u76D1\u63A7\u4E2D\u5FC3---\u76D1\u63A7\u8BB0\u5F55\u670D\u52A1\u63D0\u4F9B\u8005\u548C\u6D88\u8D39\u8005\u7684\u8C03\u7528\u60C5\u51B5\u7684\u3002

                      image-20220107145037242

                    3. \u67B6\u6784\u4ECB\u7ECD

                      • \u5355\u4E00\u5E94\u7528\u67B6\u6784

                        \u5F53\u7F51\u7AD9\u6D41\u91CF\u5F88\u5C11\u65F6\uFF0C\u53EA\u9700\u4E00\u4E2A\u5E94\u7528\uFF0C\u5C06\u6240\u6709\u7684\u529F\u80FD\u90E8\u7F72\u5728\u4E00\u8D77\uFF0C\u4EE5\u51CF\u5C11\u90E8\u7F72\u8282\u70B9\u548C\u6210\u672C\uFF0C\u6B64\u65F6\uFF0C\u7528\u4E8E\u7B80\u5316\u589E\u5220\u6539\u67E5\u5DE5\u4F5C\u91CF\u7684\u6570\u636E\u8BBF\u95EE\u6846\u67B6\uFF08ORM\uFF09\u662F\u5173\u952E\u3002

                      • \u5782\u76F4\u5E94\u7528\u67B6\u6784

                        \u5F53\u8BBF\u95EE\u91CF\u9010\u6E10\u589E\u5927\uFF0C\u5355\u4E00\u5E94\u7528\u589E\u52A0\u673A\u5668\u5E26\u6765\u7684\u52A0\u901F\u5EA6\u8D8A\u6765\u8D8A\u5C0F\uFF0C\u5C06\u5E94\u7528\u62C6\u5206\u6210\u4E92\u4E0D\u76F8\u5E72\u7684\u51E0\u4E2A\u5E94\u7528\u4EE5\u63D0\u5347\u6548\u7387\uFF0C\u6B64\u65F6\uFF0C\u7528\u4E8E\u52A0\u901F\u524D\u7AEF\u9875\u9762\u5F00\u53D1\u7684web\u6846\u67B6\uFF08MVC\uFF09\u662F\u5173\u952E

                      • \u5206\u5E03\u5F0F\u670D\u52A1\u67B6\u6784

                        \u5F53\u5782\u76F4\u5E94\u7528\u8D8A\u6765\u8D8A\u591A\uFF0C\u5E94\u7528\u4E4B\u95F4\u4EA4\u4E92\u4E0D\u53EF\u907F\u514D\uFF0C\u5C06\u6838\u5FC3\u4E1A\u52A1\u62BD\u53D6\u51FA\u6765\uFF0C\u4F5C\u4E3A\u72EC\u7ACB\u7684\u670D\u52A1\uFF0C\u9010\u6E10\u5F62\u6210\u7A33\u5B9A\u7684\u670D\u52A1\u4E2D\u5FC3\uFF0C\u4F7F\u524D\u7AEF\u5E94\u7528\u80FD\u5FEB\u901F\u5730\u54CD\u5E94\u591A\u53D8\u7684\u5E02\u573A\u9700\u6C42\uFF0C\u6B64\u65F6\uFF0C\u7528\u4E8E\u63D0\u9AD8\u4E1A\u52A1\u590D\u7528\u53CA\u6574\u5408\u7684\u5206\u5E03\u5F0F\u670D\u52A1\u6846\u67B6\uFF08RPC\uFF09\u662F\u5173\u952E\u3002

                    4. dubbo\u80FD\u505A\u4EC0\u4E48?---3\u4E2A\u4E3B\u8981\u529F\u80FD\u3002

                      • \u5B9E\u73B0\u900F\u660E\u7684\u8FDC\u7A0B\u65B9\u6CD5\u8C03\u7528\uFF0C\u5C31\u50CF\u8C03\u7528\u672C\u5730\u65B9\u6CD5\u4E00\u6837\uFF0C\u53EF\u4EE5\u5FFD\u7565\u8FDC\u7A0B\u8C03\u7528\u7684\u5B9E\u73B0\u7EC6\u8282\u3002\u7B80\u5355\u914D\u7F6E\u5373\u53EF\u4F7F\u7528\u3002
                      • \u670D\u52A1\u7684\u81EA\u52A8\u6CE8\u518C\u548C\u670D\u52A1\u53D1\u73B0\uFF0C\u901A\u8FC7\u6CE8\u518C\u4E2D\u5FC3\uFF0C\u670D\u52A1\u5B9E\u73B0\u52A8\u6001\u7BA1\u7406\uFF08\u589E\u51CF\u670D\u52A1\u65B9\uFF09\uFF0C\u8C03\u7528\u670D\u52A1\u7684\u6D88\u8D39\u8005\u65E0\u9700\u5199\u6B7B\u8C03\u7528\u5730\u5740\u3002
                      • \u8F6F\u4EF6\u7684\u8D1F\u8F7D\u5747\u8861\u548C\u5BB9\u9519\u673A\u5236\uFF0C\u65E0\u9700\u4F7F\u7528\u786C\u4EF6\uFF0C\u964D\u4F4E\u6210\u672C\u3002

                    Dubbo\u670D\u52A1\u7684\u5B9E\u73B0\u539F\u7406

                    1. Dubbo\u7684\u5E95\u5C42\u5B9E\u73B0\u662F\u901A\u8FC7\u52A8\u6001\u4EE3\u7406\uFF0C\u7531Dubbo\u6846\u67B6\u521B\u5EFA\u8FDC\u7A0B\u670D\u52A1\uFF08\u63A5\u53E3\uFF09\u5BF9\u8C61\u7684\u4EE3\u7406\u5BF9\u8C61\uFF0C\u901A\u8FC7\u4EE3\u7406\u5BF9\u8C61\u8C03\u7528\u8FDC\u7A0B\u65B9\u6CD5\u3002

                      image-20220107150819280

                      \u6D88\u8D39\u8005A\u8C03\u7528\u670D\u52A1\u5668B\u7684\u670D\u52A1\uFF0C\u9996\u5148\u662F\u901A\u8FC7\u7F51\u7EDC\uFF0C\u56E0\u4E3AA\u7684\u7A0B\u5E8F\u548CB\u7684\u7A0B\u5E8F\u662F\u8FD0\u884C\u5728\u4E0D\u540C\u7684\u670D\u52A1\u5668\u4E0A\uFF0C\u4E5F\u5C31\u662FA\u5E94\u7528\u548CB\u5E94\u7528\u90E8\u7F72\u5728\u4E0D\u540C\u7684\u670D\u52A1\u5668\u4E0A\uFF0CA\u8C03\u7528B\uFF0C\u662F\u7531Dubbo\u6846\u67B6\uFF0C\u521B\u5EFA\u51FAB\u670D\u52A1\u5BF9\u8C61\u7684\u4EE3\u7406\u5BF9\u8C61\uFF0C\u653E\u5728A\u7684JVM\u4E2D\u3002\u901A\u8FC7\u4EE3\u7406\u5BF9\u8C61\u8BBF\u95EE\u771F\u5B9E\u7684\u76EE\u6807\u5BF9\u8C61\u7684\u65B9\u6CD5\u3002

                      \u5E95\u5C42\u901A\u8FC7\u52A8\u6001\u4EE3\u7406\u5B9E\u73B0\u6570\u636E\u7684\u8F6C\u6362\u3001\u6570\u636E\u7684\u7EC4\u88C5\u3001\u8BF7\u6C42\u7684\u53D1\u9001\u3001\u6570\u636E\u7684\u53CD\u5E8F\u5217\u5316\u53D8\u4E3A\u5B9E\u4F8B\u5BF9\u8C61\u3002\u6B64\u4EE3\u7406\u5BF9\u8C61\u662F\u7531dubbo\u6846\u67B6\u521B\u5EFA\u7684\uFF0C\u4EE3\u7406\u505A\u7684\u5DE5\u4F5C\u6211\u4EEC\u5C31\u4E0D\u7528\u505A\u4E86\uFF0C\u8FD9\u4E9B\u90FD\u7531dubbo\u6846\u67B6\u5185\u90E8\u5B9E\u73B0\uFF0C\u53EF\u4EE5\u7406\u89E3\u4E3A\u8FDC\u7A0B\u670D\u52A1\u7684\u8C03\u7528\u5BF9\u4E8E\u7A0B\u5E8F\u5458\u6765\u8BF4\u662F\u900F\u660E\u7684\u3002

                      \u6211\u4EEC\u8981\u505A\u7684\u5C31\u662F\u901A\u8FC7A\u53BB\u8C03\u7528B\u7684\u670D\u52A1\uFF0C\u5177\u4F53\u5E95\u5C42\u5177\u4F53\u600E\u4E48\u8C03\u7528\u7684\uFF0C\u90FD\u662Fdubbo\u6846\u67B6\u5185\u90E8\u5B9E\u73B0\u7684\u3002

                    Dubbo\u652F\u6301\u7684\u534F\u8BAE

                    dubbo\u534F\u8BAE

                    1. Dubbo\u652F\u6301\u516B\u79CD\u534F\u8BAE\uFF1A

                      • dubbo
                      • hessian
                      • rmi
                      • http
                      • webservice
                      • thrift
                      • memcached
                      • redis

                      \u8FD9\u516B\u79CD\u534F\u8BAE\u4E5F\u53EF\u4EE5\u8BF4\u662F\u8FDC\u7A0B\u8C03\u7528\u7684\u65B9\u5F0F\u3002

                      dubbo\u5B98\u65B9\u63A8\u8350\u7528dubbo\u534F\u8BAE\uFF0Cdubbo\u534F\u8BAE\u9ED8\u8BA4\u7AEF\u53E320880

                    2. dubbo\u534F\u8BAE\u7279\u70B9

                      dubbo\u534F\u8BAE\u91C7\u7528\u5355\u4E00\u957F\u8FDE\u63A5\u548C\u5F02\u6B65\u901A\u8BAF\uFF0C\u9002\u5408\u4E8E\u5C0F\u6570\u636E\u91CF\u9AD8\u5E76\u53D1\u7684\u670D\u52A1\u8C03\u7528\uFF0C\u4EE5\u53CA\u670D\u52A1\u6D88\u8D39\u8005\u673A\u5668\u6570\u8FDC\u5927\u4E8E\u670D\u52A1\u63D0\u4F9B\u8005\u673A\u5668\u6570\u7684\u60C5\u51B5\u3002

                    3. \u7F51\u7EDC\u901A\u4FE1\uFF1A

                      dubbo\u534F\u8BAE\u5E95\u5C42\u7F51\u7EDC\u901A\u4FE1\u9ED8\u8BA4\u4F7F\u7528\u7684\u662Fnetty\u6846\u67B6\uFF0C\u6027\u80FD\u975E\u5E38\u4F18\u79C0\uFF0C\u5B98\u65B9\u63A8\u8350\u4F7F\u7528\u3002

                      netty\u6846\u67B6\u662F\u7F51\u7EDC\u901A\u8BAF\u7684\u6846\u67B6

                      dubbo\u534F\u8BAE\u4E0D\u9002\u5408\u4F20\u9001\u5927\u6570\u636E\u91CF\u7684\u670D\u52A1\uFF0C\u6BD4\u5982\u4F20\u6587\u4EF6\u3001\u4F20\u89C6\u9891\u7B49\uFF0C\u9664\u975E\u8BF7\u6C42\u91CF\u5F88\u4F4E\u3002

                    4. \u4F7F\u7528dubbo\u534F\u8BAE

                      <dubbo:protocol name="dubbo" port="20880"/>

                      \u8FD9\u53E5\u8BDD\u5199\u5728spring\u7684\u914D\u7F6E\u6587\u4EF6\u4E2D\u3002

                    \u957F\u8FDE\u63A5\u548C\u77ED\u8FDE\u63A5

                    1. \u957F\u8FDE\u63A5

                      image-20220107152751298

                      \u7F51\u7EDC\u8FDE\u63A5\u4E00\u7ECF\u5EFA\u7ACB\uFF0C\u4E0D\u5173\u95ED\u4E0D\u9500\u6BC1\uFF0C\u4E00\u76F4\u6253\u5F00\u3002

                      \u6D88\u8D39\u80051\u30012\u30013\u90FD\u4F7F\u7528\u540C\u4E00\u4E2A\u7F51\u7EDC\u901A\u9053\u8FDB\u884C\u4F20\u8F93\uFF0C\u6D88\u8D39\u80051\u548C\u670D\u52A1\u5668\u5EFA\u7ACB\u7F51\u7EDC\u901A\u9053\u540E\uFF0C\u6D88\u8D39\u80052\u30013\u8BF7\u6C42\u670D\u52A1\u7684\u65F6\u5019\uFF0C\u4E0D\u9700\u8981\u518D\u53BB\u5EFA\u7ACB\u7F51\u7EDC\u901A\u9053\u3002\u56E0\u4E3A\u5EFA\u7ACB\u7F51\u7EDC\u901A\u9053\u662F\u6BD4\u8F83\u8017\u65F6\u7684\u3002

                      MYSQL\u6570\u636E\u5E93\u5E95\u5C42\u4F7F\u7528\u7684\u5C31\u662F\u957F\u8FDE\u63A5\u7684\u65B9\u5F0F\u3002

                    2. \u77ED\u8FDE\u63A5

                      image-20220107153019520

                      \u6BCF\u4E00\u4E2A\u5BA2\u6237\u7AEF\u5E94\u7528\u53BB\u8BF7\u6C42\u670D\u52A1\u7684\u65F6\u5019\u90FD\u5FC5\u987B\u548C\u670D\u52A1\u5668\u5EFA\u7ACB\u4E00\u4E2A\u7F51\u7EDC\u901A\u9053\u3002\u4E00\u6B21\u8BF7\u6C42\u5B8C\u6BD5\u4E4B\u540E\uFF0C\u5EFA\u7ACB\u7684\u7F51\u7EDC\u901A\u9053\u5C31\u4F1A\u5173\u95ED\uFF0C\u6BCF\u6B21\u8BF7\u6C42\u90FD\u9700\u8981\u91CD\u65B0\u5EFA\u7ACB\u7F51\u7EDC\u901A\u9053\u3002

                      \u77ED\u8FDE\u63A5\u5BF9\u4E8E\u670D\u52A1\u7AEF\u6765\u8BF4\uFF0C\u5360\u7528\u7684\u8D44\u6E90\u5C11\uFF0C\u56E0\u4E3A\u4F7F\u7528\u5B8C\u4E86\u4E4B\u540E\u4F1A\u9A6C\u4E0A\u91CA\u653E\u3002

                      \u5728\u4E92\u8054\u7F51\u5E94\u7528\u4E2D\uFF0C\u505Aweb\u5E94\u7528\u7684\u65F6\u5019\uFF0C\u7528\u6237\u548C\u670D\u52A1\u5668\u4E4B\u95F4\u4F7F\u7528\u7684\u662F\u77ED\u8FDE\u63A5\u7684\u65B9\u5F0F\uFF0C\u800C\u670D\u52A1\u5668\u548C\u670D\u52A1\u5668\u4E4B\u95F4\u7528\u7684\u662F\u957F\u8FDE\u63A5\u7684\u65B9\u5F0F\u3002

                      \u6BD4\u5982\u8BF4\u7528\u6237\u548C\u6D88\u8D39\u8005\u670D\u52A1\u5668\u4E4B\u95F4\u4F7F\u7528\u7684\u662F\u77ED\u8FDE\u63A5\u7684\u65B9\u5F0F\uFF0C\u6D88\u8D39\u8005\u670D\u52A1\u5668\u548C\u670D\u52A1\u63D0\u4F9B\u8005\u670D\u52A1\u5668\u4E4B\u95F4\u4F7F\u7528\u7684\u662F\u957F\u8FDE\u63A5\u7684\u65B9\u5F0F\u3002

                    Dubbo\u7684\u7EC4\u4EF6

                    1. \u4E3B\u8981\u662F\u7531\u4E94\u5927\u90E8\u5206\u7EC4\u6210

                      • \u5BB9\u5668--spring\u5BB9\u5668

                        \u5BB9\u5668\u6307\u7684\u662Fspring\u5BB9\u5668\uFF0C\u7531spring\u7BA1\u7406dubbo\u7684\u5404\u79CD\u5BF9\u8C61\u3002

                      • dubbo\u670D\u52A1\u7684\u63D0\u4F9B\u8005

                      • dubbo\u670D\u52A1\u7684\u6D88\u8D39\u8005

                        \u5176\u4E2D\u670D\u52A1\u63D0\u4F9B\u8005\u548C\u670D\u52A1\u6D88\u8D39\u8005\u90FD\u662Fdubbo\u7684\u7A0B\u5E8F

                      • dubbo\u6846\u67B6\u7684\u6CE8\u518C\u4E2D\u5FC3

                        \u6CE8\u518C\u4E2D\u5FC3\u662F\u4E00\u4E2A\u5355\u72EC\u7684\u5E94\u7528\u7A0B\u5E8F\uFF0C\u8D1F\u8D23\u7BA1\u7406dubbo\u670D\u52A1\u7684\u63D0\u4F9B\u8005\u548C\u6D88\u8D39\u8005\u7684\u3002\u6CE8\u518C\u4E2D\u5FC3\u662F\u4E00\u4E2A\u5E94\u7528\uFF0C\u53EF\u4EE5\u7528\u6570\u636E\u5E93\u6765\u4EE3\u66FF

                      • dubbo\u6846\u67B6\u7684\u76D1\u63A7\u4E2D\u5FC3

                        \u76D1\u63A7\u4E2D\u5FC3\u662F\u4E00\u4E2A\u7BA1\u7406\u8005\uFF0C\u7528\u6765\u5728\u540E\u53F0\u7684\u5E94\u7528\u7A0B\u5E8F\u4E2D\u7BA1\u7406\u6D88\u8D39\u8005\u548C\u63D0\u4F9B\u8005\u7684\uFF0C\u6765\u8BB0\u5F55\u6D88\u8D39\u8005\u548C\u63D0\u4F9B\u8005\u7684\u8C03\u7528\u60C5\u51B5\u7684\u3002

                        \u76D1\u63A7\u4E2D\u5FC3\u662F\u53EF\u4EE5\u6CA1\u6709\u7684

                    2. image-20220107154427177

                    \u4F7F\u7528Dubbo\u7684\u7B2C\u4E00\u4E2A\u9879\u76EE

                    1. \u70B9\u5BF9\u70B9\u7684\u76F4\u8FDE\u9879\u76EE\uFF1A\u6D88\u8D39\u8005\u76F4\u63A5\u8BBF\u95EE\u670D\u52A1\u63D0\u4F9B\u8005\uFF0C\u6CA1\u6709\u6CE8\u518C\u4E2D\u5FC3\uFF0C\u6D88\u8D39\u8005\u5FC5\u987B\u6307\u5B9A\u670D\u52A1\u63D0\u4F9B\u8005\u7684\u8BBF\u95EE\u5730\u5740\uFF08url\uFF09

                    2. \u5B9E\u73B0Provider\u5373dubbo\u670D\u52A1\u7684\u63D0\u4F9B\u8005\uFF1A\u63D0\u4F9B\u67D0\u4E2A\u529F\u80FD\uFF0C\u8BA9\u6D88\u8D39\u8005\u8C03\u7528\u7684\u3002

                      \u6B65\u9AA4\uFF1A

                      • \u65B0\u5EFAweb\u5E94\u7528

                      • \u5BFC\u5165jar\uFF1A

                        • dubbo\u6846\u67B6\u7684jar\uFF1Adubbo-2.5.3
                        • \u7F51\u7EDC\u901A\u8BAF\u7684jar\u5305\uFF1Anetty
                        • \u52A8\u6001\u4EE3\u7406\u7684\u76F8\u5173\u5305\uFF1Ajavassist.jar
                        • spring\u76F8\u5173jar\u5305\uFF1Aspring-*.jar\uFF08dubbo\u6846\u67B6\u548Cspring\u662F\u7D27\u5BC6\u7ED3\u5408\u5728\u4E00\u8D77\u7684\uFF09
                            <dependency>
                        +import{_ as a,e as n}from"./app.f8791b52.js";var s="/study/assets/image-20220107145037242.87152ef2.png",t="/study/assets/image-20220107150819280.4feb5d88.png",p="/study/assets/image-20220107152751298.e3b11193.png",e="/study/assets/image-20220107153019520.67669201.png",o="/study/assets/image-20220107154427177.7be6f025.png",l="/study/assets/image-20220107224809995.a6409be9.png",c="/study/assets/image-20220108142917450.ef0c75b3.png",u="/study/assets/image-20220108154140030.d5508176.png",i="/study/assets/image-20220108154510355.967310eb.png",r="/study/assets/image-20220108194148535.8bd7f2b0.png",k="/study/assets/image-20220108194925385.facd82db.png";const d={},b=n('

                        Dubbo

                        \u7B2C1\u7AE0 \u8FDC\u7A0B\u8C03\u7528

                        \u6982\u8FF0

                        1. \u5355\u4E00\u5E94\u7528\u7684\u4F18\u70B9\uFF1A\u5F00\u53D1\u76F8\u5BF9\u7B80\u5355

                          \u5355\u4E00\u5E94\u7528\u7684\u7F3A\u70B9\uFF1A\u90E8\u7F72\u4E0A\u548C\u540E\u671F\u7684\u5F00\u53D1\u7EF4\u62A4\u4E0A\uFF0C\u6BD4\u8F83\u9EBB\u70E6\uFF0C\u4F18\u5316\u8F83\u9EBB\u70E6\u3002

                        2. \u5FAE\u670D\u52A1\uFF1A

                          \u4E00\u4E2A\u5927\u7684\u5355\u4F53\u5E94\u7528\u62C6\u5206\u6210\u5F88\u591A\u5C0F\u7684\u670D\u52A1\uFF0C\u8FD9\u6BCF\u4E00\u4E2A\u5C0F\u7684\u670D\u52A1\u90FD\u662F\u4E00\u4E2A\u5E94\u7528\u3002\u8FD9\u5C31\u53EB\u5FAE\u670D\u52A1

                          \u6BCF\u4E2A\u670D\u52A1\u90FD\u662F\u5355\u4E00\u7684\uFF0C\u5C0F\u7684\uFF0C\u800C\u4E14\u53EF\u8FD0\u884C\u7684\uFF0C\u6BCF\u4E2A\u670D\u52A1\u53EF\u4EE5\u90E8\u7F72\u5728\u4E0D\u540C\u7684\u670D\u52A1\u5668\u4E0A\uFF0C\u8FD9\u53EB\u5FAE\u670D\u52A1\u3002

                          \u5206\u5E03\u5F0F\uFF1A

                          \u8FD9\u4E9B\u5C0F\u7684\u5E94\u7528\u5206\u522B\u90E8\u7F72\u5728\u4E0D\u540C\u7684\u670D\u52A1\u5668\u4E0A\uFF0C\u5728\u670D\u52A1\u5668\u7AEF\uFF0C\u8FD9\u4E9B\u4E0D\u540C\u7684\u670D\u52A1\u5668\u6784\u6210\u4E86\u4E00\u4E2A\u7ED3\u6784\uFF0C\u4E00\u4E2A\u7F51\u7EDC\uFF0C\u8FD9\u5C31\u53EB\u5206\u5E03\u5F0F\u7684\u7ED3\u6784\uFF0C\u8FD9\u5C31\u662F\u670D\u52A1\u5668\u96C6\u7FA4\uFF0C\u96C6\u7FA4\u662F\u591A\u4E2A\u670D\u52A1\u5668\uFF0C\u662F\u4E00\u79CD\u7269\u7406\u5F62\u6001\uFF0C\u5206\u5E03\u5F0F\u5219\u662F\u4E00\u79CD\u601D\u60F3\u3002

                          \u8FD9\u591A\u4E2A\u670D\u52A1\u5668\u4F5C\u4E3A\u4E00\u4E2A\u6574\u4F53\u5411\u7528\u6237\u63D0\u4F9B\u529F\u80FD\u3002

                          \u7531\u591A\u53F0\u670D\u52A1\u5668\u5171\u540C\u5B8C\u6210\u4E00\u4EF6\u6BD4\u8F83\u590D\u6742\u7684\u4E8B\uFF0C\u53EF\u4EE5\u7406\u89E3\u4E3A\u5206\u5E03\u5F0F

                          \u8FD9\u79CD\u5206\u5E03\u5F0F\u7684\u7ED3\u6784\uFF0C\u591A\u53F0\u670D\u52A1\u5668\uFF0C\u5BF9\u7528\u6237\u800C\u8A00\u662F\u4E00\u4E2A\u6574\u4F53\u3002

                          \u603B\u7ED3\uFF1A

                          \u5FAE\u670D\u52A1\u7684\u5F00\u53D1\u6A21\u5F0F\uFF0C\u5206\u5E03\u5F0F\u7684\u90E8\u7F72

                        3. \u90E8\u7F72\u5728\u4E0D\u540C\u670D\u52A1\u5668\u4E0A\u7684\u4E0D\u540C\u5E94\u7528\u4E4B\u95F4\uFF0C\u907F\u514D\u4E0D\u4E86\u4E92\u76F8\u8C03\u7528\u7684\u529F\u80FD

                          servlet\u4E4B\u95F4\u7684\u8C03\u7528\u662F\u901A\u8FC7http\u534F\u8BAE\u8FDB\u884C\u8C03\u7528\uFF0C\u662F\u6BD4\u8F83\u6162\u7684\u3002

                          \u600E\u4E48\u65B9\u4FBF\u5730\u8FDB\u884C\u5FAE\u670D\u52A1\u4E4B\u95F4\u7684\u8C03\u7528\u548C\u8BBF\u95EE\u7684\u5462?

                          dubbo\u6846\u67B6\u3002

                        RPC\u534F\u8BAE

                        RPC\u662F\u4EC0\u4E48\uFF1F

                        1. \u534F\u8BAE\u6307\u591A\u65B9\u5171\u540C\u9075\u5FAA\u7684\u89C4\u8303\uFF0C\u5728\u7F51\u7EDC\u4E0A\u7684\u8BA1\u7B97\u673A\u8FDB\u884C\u6570\u636E\u4EA4\u6362\u4F9D\u9760\u5404\u79CD\u534F\u8BAE\uFF0C\u4F8B\u5982http\u3001ftp\u7B49\u3002

                        2. \u4E00\u53F0\u8BA1\u7B97\u673A\u6309\u89C4\u5B9A\u597D\u7684\u683C\u5F0F\u53D1\u9001\u6570\u636E\uFF0C\u53E6\u4E00\u53F0\u8BA1\u7B97\u7684\u7A0B\u5E8F\u6309\u6307\u5B9A\u7684\u683C\u5F0F\u63A5\u6536\u6570\u636E\uFF0C\u4E24\u53F0\u8BA1\u7B97\u673A\u6216\u8005\u8BF4\u670D\u52A1\u5668\u4F7F\u7528\u4E92\u76F8\u7406\u89E3\u7684\u683C\u5F0F\u8BFB\u5199\u6570\u636E\uFF0C\u8FBE\u5230\u6570\u636E\u4EA4\u6362\u7684\u76EE\u7684\u3002

                        3. RPC\u662FRemote Procedure Call Protocol\uFF0C\u5373\u8FDC\u7A0B\u8FC7\u7A0B\u8C03\u7528\u534F\u8BAE\u3002\u662F\u4E00\u79CD\u901A\u8FC7\u7F51\u7EDC\u4ECE\u8FDC\u7A0B\u8BA1\u7B97\u673A\u7A0B\u5E8F\u8BF7\u6C42\u670D\u52A1\uFF0C\u800C\u4E0D\u9700\u8981\u4E86\u89E3\u5E95\u5C42\u7F51\u7EDC\u6280\u672F\u7684\u534F\u8BAE\u3002\u8BE5\u534F\u8BAE\u5141\u8BB8\u8FD0\u884C\u4E8E\u4E00\u53F0\u8BA1\u7B97\u673A\u7684\u7A0B\u5E8F\u8C03\u7528\u53E6\u4E00\u53F0\u8BA1\u7B97\u673A\u7684\u7A0B\u5E8F\u3002\u7A0B\u5E8F\u5458\u65E0\u9700\u7F16\u5199\u7F51\u7EDC\u4EA4\u4E92\u7684\u529F\u80FD\u4EE3\u7801\u3002

                          \u7B80\u800C\u8A00\u4E4B\uFF0CRPC\u534F\u8BAE\u662F\u5B9E\u73B0\u5206\u5E03\u5F0F\u73AF\u5883\u4E2D\uFF0C\u4E0D\u540C\u670D\u52A1\u4E4B\u95F4\u6216\u8005\u8BF4\u670D\u52A1\u5668\u4E4B\u95F4\u7684\u76F8\u4E92\u8C03\u7528\u7684\u534F\u8BAE\u3002

                          RPC\u534F\u8BAE\u5B9A\u4E49\u4E86\u5E95\u5C42\u7684\u670D\u52A1\u5668\u4E4B\u95F4\u6570\u636E\u4EA4\u6362\u7684\u65B9\u5F0F\u548C\u8C03\u7528\u7684\u5904\u7406\u903B\u8F91\u7B49\u3002

                        4. RPC\u91CC\u9762\u8FD8\u6709\u5F88\u591A\u5B50\u534F\u8BAE\u3002

                        RPC\u7684\u4F5C\u7528

                        1. \u4E3B\u8981\u529F\u80FD\u662F\u8BA9\u6784\u5EFA\u5206\u5E03\u5F0F\u8BA1\u7B97\uFF08\u5E94\u7528\uFF09\u66F4\u5BB9\u6613\uFF0C\u5728\u63D0\u4F9B\u5F3A\u5927\u7684\u8FDC\u7A0B\u8C03\u7528\u80FD\u529B\u65F6\u4E0D\u635F\u5931\u672C\u5730\u8C03\u7528\u7684\u8BED\u4E49\u7B80\u6D01\u6027\uFF0C\u5728\u4E00\u53F0\u8BA1\u7B97\u673A\u7684\u7A0B\u5E8F\u4F7F\u7528\u5176\u4ED6\u8BA1\u7B97\u673A\u4E0A\u7684\u529F\u80FD\u5C31\u50CF\u4F7F\u7528\u81EA\u5DF1\u7684\u529F\u80FD\u4E00\u6837\u3002

                          RPC\u6280\u672F\u63D0\u4F9B\u4E86\u900F\u660E\u7684\u8BBF\u95EE\u5176\u4ED6\u670D\u52A1\u7684\u5E95\u5C42\u5B9E\u73B0\u7EC6\u8282\uFF0C\u4F7F\u7528\u5206\u5E03\u5F0F\u7CFB\u7EDF\u4E2D\u7684\u670D\u52A1\u66F4\u52A0\u65B9\u4FBF\u3002

                        \u5206\u5E03\u5F0F

                        1. \u5206\u5E03\u5F0F\u6307\u591A\u53F0\u8BA1\u7B97\u673A\uFF08\u670D\u52A1\u5668\uFF09\u4F4D\u4E8E\u7F51\u7EDC\u7CFB\u7EDF\u4E2D\uFF0C\u591A\u53F0\u8BA1\u7B97\u673A\u5F62\u6210\u4E00\u4E2A\u6574\u4F53\u5BF9\u5916\u754C\u63D0\u4F9B\u670D\u52A1\u3002\u7528\u6237\u4F7F\u7528\u7CFB\u7EDF\u4E0D\u77E5\u9053\u662F\u591A\u53F0\u8BA1\u7B97\u673A\u5728\u4F7F\u7528\u4E0D\u540C\u7684\u64CD\u4F5C\u7CFB\u7EDF\uFF0C\u4E0D\u540C\u7684\u5E94\u7528\u7A0B\u5E8F\u63D0\u4F9B\u670D\u52A1\u3002

                        2. \u96C6\u7FA4\u662F\u4E00\u79CD\u7269\u7406\u7ED3\u6784\uFF0C\u800C\u5206\u5E03\u5F0F\u662F\u4E00\u79CD\u601D\u60F3\uFF0C\u4E0D\u540C\u7684\u5355\u4E00\u7684\u5E94\u7528\u90E8\u7F72\u5728\u4E0D\u540C\u7684\u670D\u52A1\u5668\u4E0A\uFF0C\u8FD9\u4E9B\u4E0D\u540C\u7684\u670D\u52A1\u5668\u53C8\u4F5C\u4E3A\u4E00\u4E2A\u6574\u4F53\u5BF9\u5916\u63D0\u4F9B\u670D\u52A1\uFF0C\u8FD9\u53EB\u505A\u5206\u5E03\u5F0F\u7684\u7ED3\u6784\u3002

                          \u5206\u5E03\u5F0F\u5F3A\u8C03\u90E8\u7F72\uFF0C\u5FAE\u670D\u52A1\u5F3A\u8C03\u5F00\u53D1\u3002

                        3. RPC\u8BA9\u5206\u5E03\u5F0F\u5730\u5F00\u53D1\u6A21\u5F0F\u66F4\u7B80\u5355\u3002

                        \u7B2C2\u7AE0 Dubbo

                        Dubbo\u4ECB\u7ECD

                        1. \u662F\u56FD\u5185\u7684\u963F\u91CC\u516C\u53F8\u5F00\u6E90\u7684\u3002

                          \u662F\u4E00\u4E2A\u9AD8\u6027\u80FD\u7684RPC\u6846\u67B6\u3002

                          \u65E2\u7136\u662FRPC\u6846\u67B6\uFF0C\u90A3\u4E48\u5C31\u8BF4\u660E\u6211\u4EEC\u53EF\u4EE5\u901A\u8FC7dubbo\u6846\u67B6\u6765\u505A\u5206\u5E03\u5F0F\u3001\u5FAE\u670D\u52A1\u7684\u5F00\u53D1\u3002

                        2. Dubbo\u6846\u67B6\u7684\u7EC4\u6210\u90E8\u5206

                          • spring\u5BB9\u5668
                          • \u670D\u52A1\u63D0\u4F9B\u8005\uFF08\u63D0\u4F9B\u670D\u52A1\u7684\uFF09
                          • \u670D\u52A1\u7684\u6D88\u8D39\u8005\uFF08\u7528\u5176\u4ED6\u670D\u52A1\u5668\u63D0\u4F9B\u7684\u670D\u52A1\u7684\uFF09
                          • \u6CE8\u518C\u4E2D\u5FC3---\u7528\u6765\u7BA1\u7406dubbo\u670D\u52A1\u8005\u548C\u6D88\u8D39\u8005\u7684
                          • \u76D1\u63A7\u4E2D\u5FC3---\u76D1\u63A7\u8BB0\u5F55\u670D\u52A1\u63D0\u4F9B\u8005\u548C\u6D88\u8D39\u8005\u7684\u8C03\u7528\u60C5\u51B5\u7684\u3002

                          image-20220107145037242

                        3. \u67B6\u6784\u4ECB\u7ECD

                          • \u5355\u4E00\u5E94\u7528\u67B6\u6784

                            \u5F53\u7F51\u7AD9\u6D41\u91CF\u5F88\u5C11\u65F6\uFF0C\u53EA\u9700\u4E00\u4E2A\u5E94\u7528\uFF0C\u5C06\u6240\u6709\u7684\u529F\u80FD\u90E8\u7F72\u5728\u4E00\u8D77\uFF0C\u4EE5\u51CF\u5C11\u90E8\u7F72\u8282\u70B9\u548C\u6210\u672C\uFF0C\u6B64\u65F6\uFF0C\u7528\u4E8E\u7B80\u5316\u589E\u5220\u6539\u67E5\u5DE5\u4F5C\u91CF\u7684\u6570\u636E\u8BBF\u95EE\u6846\u67B6\uFF08ORM\uFF09\u662F\u5173\u952E\u3002

                          • \u5782\u76F4\u5E94\u7528\u67B6\u6784

                            \u5F53\u8BBF\u95EE\u91CF\u9010\u6E10\u589E\u5927\uFF0C\u5355\u4E00\u5E94\u7528\u589E\u52A0\u673A\u5668\u5E26\u6765\u7684\u52A0\u901F\u5EA6\u8D8A\u6765\u8D8A\u5C0F\uFF0C\u5C06\u5E94\u7528\u62C6\u5206\u6210\u4E92\u4E0D\u76F8\u5E72\u7684\u51E0\u4E2A\u5E94\u7528\u4EE5\u63D0\u5347\u6548\u7387\uFF0C\u6B64\u65F6\uFF0C\u7528\u4E8E\u52A0\u901F\u524D\u7AEF\u9875\u9762\u5F00\u53D1\u7684web\u6846\u67B6\uFF08MVC\uFF09\u662F\u5173\u952E

                          • \u5206\u5E03\u5F0F\u670D\u52A1\u67B6\u6784

                            \u5F53\u5782\u76F4\u5E94\u7528\u8D8A\u6765\u8D8A\u591A\uFF0C\u5E94\u7528\u4E4B\u95F4\u4EA4\u4E92\u4E0D\u53EF\u907F\u514D\uFF0C\u5C06\u6838\u5FC3\u4E1A\u52A1\u62BD\u53D6\u51FA\u6765\uFF0C\u4F5C\u4E3A\u72EC\u7ACB\u7684\u670D\u52A1\uFF0C\u9010\u6E10\u5F62\u6210\u7A33\u5B9A\u7684\u670D\u52A1\u4E2D\u5FC3\uFF0C\u4F7F\u524D\u7AEF\u5E94\u7528\u80FD\u5FEB\u901F\u5730\u54CD\u5E94\u591A\u53D8\u7684\u5E02\u573A\u9700\u6C42\uFF0C\u6B64\u65F6\uFF0C\u7528\u4E8E\u63D0\u9AD8\u4E1A\u52A1\u590D\u7528\u53CA\u6574\u5408\u7684\u5206\u5E03\u5F0F\u670D\u52A1\u6846\u67B6\uFF08RPC\uFF09\u662F\u5173\u952E\u3002

                        4. dubbo\u80FD\u505A\u4EC0\u4E48?---3\u4E2A\u4E3B\u8981\u529F\u80FD\u3002

                          • \u5B9E\u73B0\u900F\u660E\u7684\u8FDC\u7A0B\u65B9\u6CD5\u8C03\u7528\uFF0C\u5C31\u50CF\u8C03\u7528\u672C\u5730\u65B9\u6CD5\u4E00\u6837\uFF0C\u53EF\u4EE5\u5FFD\u7565\u8FDC\u7A0B\u8C03\u7528\u7684\u5B9E\u73B0\u7EC6\u8282\u3002\u7B80\u5355\u914D\u7F6E\u5373\u53EF\u4F7F\u7528\u3002
                          • \u670D\u52A1\u7684\u81EA\u52A8\u6CE8\u518C\u548C\u670D\u52A1\u53D1\u73B0\uFF0C\u901A\u8FC7\u6CE8\u518C\u4E2D\u5FC3\uFF0C\u670D\u52A1\u5B9E\u73B0\u52A8\u6001\u7BA1\u7406\uFF08\u589E\u51CF\u670D\u52A1\u65B9\uFF09\uFF0C\u8C03\u7528\u670D\u52A1\u7684\u6D88\u8D39\u8005\u65E0\u9700\u5199\u6B7B\u8C03\u7528\u5730\u5740\u3002
                          • \u8F6F\u4EF6\u7684\u8D1F\u8F7D\u5747\u8861\u548C\u5BB9\u9519\u673A\u5236\uFF0C\u65E0\u9700\u4F7F\u7528\u786C\u4EF6\uFF0C\u964D\u4F4E\u6210\u672C\u3002

                        Dubbo\u670D\u52A1\u7684\u5B9E\u73B0\u539F\u7406

                        1. Dubbo\u7684\u5E95\u5C42\u5B9E\u73B0\u662F\u901A\u8FC7\u52A8\u6001\u4EE3\u7406\uFF0C\u7531Dubbo\u6846\u67B6\u521B\u5EFA\u8FDC\u7A0B\u670D\u52A1\uFF08\u63A5\u53E3\uFF09\u5BF9\u8C61\u7684\u4EE3\u7406\u5BF9\u8C61\uFF0C\u901A\u8FC7\u4EE3\u7406\u5BF9\u8C61\u8C03\u7528\u8FDC\u7A0B\u65B9\u6CD5\u3002

                          image-20220107150819280

                          \u6D88\u8D39\u8005A\u8C03\u7528\u670D\u52A1\u5668B\u7684\u670D\u52A1\uFF0C\u9996\u5148\u662F\u901A\u8FC7\u7F51\u7EDC\uFF0C\u56E0\u4E3AA\u7684\u7A0B\u5E8F\u548CB\u7684\u7A0B\u5E8F\u662F\u8FD0\u884C\u5728\u4E0D\u540C\u7684\u670D\u52A1\u5668\u4E0A\uFF0C\u4E5F\u5C31\u662FA\u5E94\u7528\u548CB\u5E94\u7528\u90E8\u7F72\u5728\u4E0D\u540C\u7684\u670D\u52A1\u5668\u4E0A\uFF0CA\u8C03\u7528B\uFF0C\u662F\u7531Dubbo\u6846\u67B6\uFF0C\u521B\u5EFA\u51FAB\u670D\u52A1\u5BF9\u8C61\u7684\u4EE3\u7406\u5BF9\u8C61\uFF0C\u653E\u5728A\u7684JVM\u4E2D\u3002\u901A\u8FC7\u4EE3\u7406\u5BF9\u8C61\u8BBF\u95EE\u771F\u5B9E\u7684\u76EE\u6807\u5BF9\u8C61\u7684\u65B9\u6CD5\u3002

                          \u5E95\u5C42\u901A\u8FC7\u52A8\u6001\u4EE3\u7406\u5B9E\u73B0\u6570\u636E\u7684\u8F6C\u6362\u3001\u6570\u636E\u7684\u7EC4\u88C5\u3001\u8BF7\u6C42\u7684\u53D1\u9001\u3001\u6570\u636E\u7684\u53CD\u5E8F\u5217\u5316\u53D8\u4E3A\u5B9E\u4F8B\u5BF9\u8C61\u3002\u6B64\u4EE3\u7406\u5BF9\u8C61\u662F\u7531dubbo\u6846\u67B6\u521B\u5EFA\u7684\uFF0C\u4EE3\u7406\u505A\u7684\u5DE5\u4F5C\u6211\u4EEC\u5C31\u4E0D\u7528\u505A\u4E86\uFF0C\u8FD9\u4E9B\u90FD\u7531dubbo\u6846\u67B6\u5185\u90E8\u5B9E\u73B0\uFF0C\u53EF\u4EE5\u7406\u89E3\u4E3A\u8FDC\u7A0B\u670D\u52A1\u7684\u8C03\u7528\u5BF9\u4E8E\u7A0B\u5E8F\u5458\u6765\u8BF4\u662F\u900F\u660E\u7684\u3002

                          \u6211\u4EEC\u8981\u505A\u7684\u5C31\u662F\u901A\u8FC7A\u53BB\u8C03\u7528B\u7684\u670D\u52A1\uFF0C\u5177\u4F53\u5E95\u5C42\u5177\u4F53\u600E\u4E48\u8C03\u7528\u7684\uFF0C\u90FD\u662Fdubbo\u6846\u67B6\u5185\u90E8\u5B9E\u73B0\u7684\u3002

                        Dubbo\u652F\u6301\u7684\u534F\u8BAE

                        dubbo\u534F\u8BAE

                        1. Dubbo\u652F\u6301\u516B\u79CD\u534F\u8BAE\uFF1A

                          • dubbo
                          • hessian
                          • rmi
                          • http
                          • webservice
                          • thrift
                          • memcached
                          • redis

                          \u8FD9\u516B\u79CD\u534F\u8BAE\u4E5F\u53EF\u4EE5\u8BF4\u662F\u8FDC\u7A0B\u8C03\u7528\u7684\u65B9\u5F0F\u3002

                          dubbo\u5B98\u65B9\u63A8\u8350\u7528dubbo\u534F\u8BAE\uFF0Cdubbo\u534F\u8BAE\u9ED8\u8BA4\u7AEF\u53E320880

                        2. dubbo\u534F\u8BAE\u7279\u70B9

                          dubbo\u534F\u8BAE\u91C7\u7528\u5355\u4E00\u957F\u8FDE\u63A5\u548C\u5F02\u6B65\u901A\u8BAF\uFF0C\u9002\u5408\u4E8E\u5C0F\u6570\u636E\u91CF\u9AD8\u5E76\u53D1\u7684\u670D\u52A1\u8C03\u7528\uFF0C\u4EE5\u53CA\u670D\u52A1\u6D88\u8D39\u8005\u673A\u5668\u6570\u8FDC\u5927\u4E8E\u670D\u52A1\u63D0\u4F9B\u8005\u673A\u5668\u6570\u7684\u60C5\u51B5\u3002

                        3. \u7F51\u7EDC\u901A\u4FE1\uFF1A

                          dubbo\u534F\u8BAE\u5E95\u5C42\u7F51\u7EDC\u901A\u4FE1\u9ED8\u8BA4\u4F7F\u7528\u7684\u662Fnetty\u6846\u67B6\uFF0C\u6027\u80FD\u975E\u5E38\u4F18\u79C0\uFF0C\u5B98\u65B9\u63A8\u8350\u4F7F\u7528\u3002

                          netty\u6846\u67B6\u662F\u7F51\u7EDC\u901A\u8BAF\u7684\u6846\u67B6

                          dubbo\u534F\u8BAE\u4E0D\u9002\u5408\u4F20\u9001\u5927\u6570\u636E\u91CF\u7684\u670D\u52A1\uFF0C\u6BD4\u5982\u4F20\u6587\u4EF6\u3001\u4F20\u89C6\u9891\u7B49\uFF0C\u9664\u975E\u8BF7\u6C42\u91CF\u5F88\u4F4E\u3002

                        4. \u4F7F\u7528dubbo\u534F\u8BAE

                          <dubbo:protocol name="dubbo" port="20880"/>

                          \u8FD9\u53E5\u8BDD\u5199\u5728spring\u7684\u914D\u7F6E\u6587\u4EF6\u4E2D\u3002

                        \u957F\u8FDE\u63A5\u548C\u77ED\u8FDE\u63A5

                        1. \u957F\u8FDE\u63A5

                          image-20220107152751298

                          \u7F51\u7EDC\u8FDE\u63A5\u4E00\u7ECF\u5EFA\u7ACB\uFF0C\u4E0D\u5173\u95ED\u4E0D\u9500\u6BC1\uFF0C\u4E00\u76F4\u6253\u5F00\u3002

                          \u6D88\u8D39\u80051\u30012\u30013\u90FD\u4F7F\u7528\u540C\u4E00\u4E2A\u7F51\u7EDC\u901A\u9053\u8FDB\u884C\u4F20\u8F93\uFF0C\u6D88\u8D39\u80051\u548C\u670D\u52A1\u5668\u5EFA\u7ACB\u7F51\u7EDC\u901A\u9053\u540E\uFF0C\u6D88\u8D39\u80052\u30013\u8BF7\u6C42\u670D\u52A1\u7684\u65F6\u5019\uFF0C\u4E0D\u9700\u8981\u518D\u53BB\u5EFA\u7ACB\u7F51\u7EDC\u901A\u9053\u3002\u56E0\u4E3A\u5EFA\u7ACB\u7F51\u7EDC\u901A\u9053\u662F\u6BD4\u8F83\u8017\u65F6\u7684\u3002

                          MYSQL\u6570\u636E\u5E93\u5E95\u5C42\u4F7F\u7528\u7684\u5C31\u662F\u957F\u8FDE\u63A5\u7684\u65B9\u5F0F\u3002

                        2. \u77ED\u8FDE\u63A5

                          image-20220107153019520

                          \u6BCF\u4E00\u4E2A\u5BA2\u6237\u7AEF\u5E94\u7528\u53BB\u8BF7\u6C42\u670D\u52A1\u7684\u65F6\u5019\u90FD\u5FC5\u987B\u548C\u670D\u52A1\u5668\u5EFA\u7ACB\u4E00\u4E2A\u7F51\u7EDC\u901A\u9053\u3002\u4E00\u6B21\u8BF7\u6C42\u5B8C\u6BD5\u4E4B\u540E\uFF0C\u5EFA\u7ACB\u7684\u7F51\u7EDC\u901A\u9053\u5C31\u4F1A\u5173\u95ED\uFF0C\u6BCF\u6B21\u8BF7\u6C42\u90FD\u9700\u8981\u91CD\u65B0\u5EFA\u7ACB\u7F51\u7EDC\u901A\u9053\u3002

                          \u77ED\u8FDE\u63A5\u5BF9\u4E8E\u670D\u52A1\u7AEF\u6765\u8BF4\uFF0C\u5360\u7528\u7684\u8D44\u6E90\u5C11\uFF0C\u56E0\u4E3A\u4F7F\u7528\u5B8C\u4E86\u4E4B\u540E\u4F1A\u9A6C\u4E0A\u91CA\u653E\u3002

                          \u5728\u4E92\u8054\u7F51\u5E94\u7528\u4E2D\uFF0C\u505Aweb\u5E94\u7528\u7684\u65F6\u5019\uFF0C\u7528\u6237\u548C\u670D\u52A1\u5668\u4E4B\u95F4\u4F7F\u7528\u7684\u662F\u77ED\u8FDE\u63A5\u7684\u65B9\u5F0F\uFF0C\u800C\u670D\u52A1\u5668\u548C\u670D\u52A1\u5668\u4E4B\u95F4\u7528\u7684\u662F\u957F\u8FDE\u63A5\u7684\u65B9\u5F0F\u3002

                          \u6BD4\u5982\u8BF4\u7528\u6237\u548C\u6D88\u8D39\u8005\u670D\u52A1\u5668\u4E4B\u95F4\u4F7F\u7528\u7684\u662F\u77ED\u8FDE\u63A5\u7684\u65B9\u5F0F\uFF0C\u6D88\u8D39\u8005\u670D\u52A1\u5668\u548C\u670D\u52A1\u63D0\u4F9B\u8005\u670D\u52A1\u5668\u4E4B\u95F4\u4F7F\u7528\u7684\u662F\u957F\u8FDE\u63A5\u7684\u65B9\u5F0F\u3002

                        Dubbo\u7684\u7EC4\u4EF6

                        1. \u4E3B\u8981\u662F\u7531\u4E94\u5927\u90E8\u5206\u7EC4\u6210

                          • \u5BB9\u5668--spring\u5BB9\u5668

                            \u5BB9\u5668\u6307\u7684\u662Fspring\u5BB9\u5668\uFF0C\u7531spring\u7BA1\u7406dubbo\u7684\u5404\u79CD\u5BF9\u8C61\u3002

                          • dubbo\u670D\u52A1\u7684\u63D0\u4F9B\u8005

                          • dubbo\u670D\u52A1\u7684\u6D88\u8D39\u8005

                            \u5176\u4E2D\u670D\u52A1\u63D0\u4F9B\u8005\u548C\u670D\u52A1\u6D88\u8D39\u8005\u90FD\u662Fdubbo\u7684\u7A0B\u5E8F

                          • dubbo\u6846\u67B6\u7684\u6CE8\u518C\u4E2D\u5FC3

                            \u6CE8\u518C\u4E2D\u5FC3\u662F\u4E00\u4E2A\u5355\u72EC\u7684\u5E94\u7528\u7A0B\u5E8F\uFF0C\u8D1F\u8D23\u7BA1\u7406dubbo\u670D\u52A1\u7684\u63D0\u4F9B\u8005\u548C\u6D88\u8D39\u8005\u7684\u3002\u6CE8\u518C\u4E2D\u5FC3\u662F\u4E00\u4E2A\u5E94\u7528\uFF0C\u53EF\u4EE5\u7528\u6570\u636E\u5E93\u6765\u4EE3\u66FF

                          • dubbo\u6846\u67B6\u7684\u76D1\u63A7\u4E2D\u5FC3

                            \u76D1\u63A7\u4E2D\u5FC3\u662F\u4E00\u4E2A\u7BA1\u7406\u8005\uFF0C\u7528\u6765\u5728\u540E\u53F0\u7684\u5E94\u7528\u7A0B\u5E8F\u4E2D\u7BA1\u7406\u6D88\u8D39\u8005\u548C\u63D0\u4F9B\u8005\u7684\uFF0C\u6765\u8BB0\u5F55\u6D88\u8D39\u8005\u548C\u63D0\u4F9B\u8005\u7684\u8C03\u7528\u60C5\u51B5\u7684\u3002

                            \u76D1\u63A7\u4E2D\u5FC3\u662F\u53EF\u4EE5\u6CA1\u6709\u7684

                        2. image-20220107154427177

                        \u4F7F\u7528Dubbo\u7684\u7B2C\u4E00\u4E2A\u9879\u76EE

                        1. \u70B9\u5BF9\u70B9\u7684\u76F4\u8FDE\u9879\u76EE\uFF1A\u6D88\u8D39\u8005\u76F4\u63A5\u8BBF\u95EE\u670D\u52A1\u63D0\u4F9B\u8005\uFF0C\u6CA1\u6709\u6CE8\u518C\u4E2D\u5FC3\uFF0C\u6D88\u8D39\u8005\u5FC5\u987B\u6307\u5B9A\u670D\u52A1\u63D0\u4F9B\u8005\u7684\u8BBF\u95EE\u5730\u5740\uFF08url\uFF09

                        2. \u5B9E\u73B0Provider\u5373dubbo\u670D\u52A1\u7684\u63D0\u4F9B\u8005\uFF1A\u63D0\u4F9B\u67D0\u4E2A\u529F\u80FD\uFF0C\u8BA9\u6D88\u8D39\u8005\u8C03\u7528\u7684\u3002

                          \u6B65\u9AA4\uFF1A

                          • \u65B0\u5EFAweb\u5E94\u7528

                          • \u5BFC\u5165jar\uFF1A

                            • dubbo\u6846\u67B6\u7684jar\uFF1Adubbo-2.5.3
                            • \u7F51\u7EDC\u901A\u8BAF\u7684jar\u5305\uFF1Anetty
                            • \u52A8\u6001\u4EE3\u7406\u7684\u76F8\u5173\u5305\uFF1Ajavassist.jar
                            • spring\u76F8\u5173jar\u5305\uFF1Aspring-*.jar\uFF08dubbo\u6846\u67B6\u548Cspring\u662F\u7D27\u5BC6\u7ED3\u5408\u5728\u4E00\u8D77\u7684\uFF09
                                <dependency>
                                   <groupId>com.alibaba</groupId>
                                   <artifactId>dubbo</artifactId>
                                   <version>2.6.12</version>
                            diff --git a/assets/dubbo.html.5bac4341.js b/assets/dubbo.html.d317341f.js
                            similarity index 98%
                            rename from assets/dubbo.html.5bac4341.js
                            rename to assets/dubbo.html.d317341f.js
                            index ebb19a74..020a557c 100644
                            --- a/assets/dubbo.html.5bac4341.js
                            +++ b/assets/dubbo.html.d317341f.js
                            @@ -1 +1 @@
                            -const l={key:"v-83ddddfc",path:"/java/%E5%88%86%E5%B8%83%E5%BC%8F/RPC%E6%A1%86%E6%9E%B6-dubbo/dubbo.html",title:"Dubbo",lang:"zh-CN",frontmatter:{},excerpt:"",headers:[{level:2,title:"\u7B2C1\u7AE0 \u8FDC\u7A0B\u8C03\u7528",slug:"\u7B2C1\u7AE0-\u8FDC\u7A0B\u8C03\u7528",children:[{level:3,title:"\u6982\u8FF0",slug:"\u6982\u8FF0",children:[]},{level:3,title:"RPC\u534F\u8BAE",slug:"rpc\u534F\u8BAE",children:[{level:4,title:"RPC\u662F\u4EC0\u4E48\uFF1F",slug:"rpc\u662F\u4EC0\u4E48",children:[]},{level:4,title:"RPC\u7684\u4F5C\u7528",slug:"rpc\u7684\u4F5C\u7528",children:[]},{level:4,title:"\u5206\u5E03\u5F0F",slug:"\u5206\u5E03\u5F0F",children:[]}]}]},{level:2,title:"\u7B2C2\u7AE0 Dubbo",slug:"\u7B2C2\u7AE0-dubbo",children:[{level:3,title:"Dubbo\u4ECB\u7ECD",slug:"dubbo\u4ECB\u7ECD",children:[]},{level:3,title:"Dubbo\u670D\u52A1\u7684\u5B9E\u73B0\u539F\u7406",slug:"dubbo\u670D\u52A1\u7684\u5B9E\u73B0\u539F\u7406",children:[]},{level:3,title:"Dubbo\u652F\u6301\u7684\u534F\u8BAE",slug:"dubbo\u652F\u6301\u7684\u534F\u8BAE",children:[{level:4,title:"dubbo\u534F\u8BAE",slug:"dubbo\u534F\u8BAE",children:[]},{level:4,title:"\u957F\u8FDE\u63A5\u548C\u77ED\u8FDE\u63A5",slug:"\u957F\u8FDE\u63A5\u548C\u77ED\u8FDE\u63A5",children:[]}]},{level:3,title:"Dubbo\u7684\u7EC4\u4EF6",slug:"dubbo\u7684\u7EC4\u4EF6",children:[]},{level:3,title:"\u4F7F\u7528Dubbo\u7684\u7B2C\u4E00\u4E2A\u9879\u76EE",slug:"\u4F7F\u7528dubbo\u7684\u7B2C\u4E00\u4E2A\u9879\u76EE",children:[]},{level:3,title:"\u4F7F\u7528\u63A5\u53E3\u4F5C\u4E3A\u72EC\u7ACB\u9879\u76EE",slug:"\u4F7F\u7528\u63A5\u53E3\u4F5C\u4E3A\u72EC\u7ACB\u9879\u76EE",children:[]},{level:3,title:"Dubbo\u5E38\u7528\u6807\u7B7E",slug:"dubbo\u5E38\u7528\u6807\u7B7E",children:[{level:4,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-1",children:[]},{level:4,title:"\u516C\u7528\u6807\u7B7E",slug:"\u516C\u7528\u6807\u7B7E",children:[]},{level:4,title:"\u670D\u52A1\u63D0\u4F9B\u8005\u6807\u7B7E",slug:"\u670D\u52A1\u63D0\u4F9B\u8005\u6807\u7B7E",children:[]},{level:4,title:"\u670D\u52A1\u6D88\u8D39\u8005\u6807\u7B7E",slug:"\u670D\u52A1\u6D88\u8D39\u8005\u6807\u7B7E",children:[]}]},{level:3,title:"\u5E38\u7528\u914D\u7F6E\u5C5E\u6027",slug:"\u5E38\u7528\u914D\u7F6E\u5C5E\u6027",children:[{level:4,title:"check",slug:"check",children:[]},{level:4,title:"\u8BF7\u6C42\u91CD\u8BD5retries",slug:"\u8BF7\u6C42\u91CD\u8BD5retries",children:[]}]}]},{level:2,title:"\u7B2C3\u7AE0 \u6CE8\u518C\u4E2D\u5FC3",slug:"\u7B2C3\u7AE0-\u6CE8\u518C\u4E2D\u5FC3",children:[{level:3,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-2",children:[]},{level:3,title:"zookeeper\u6982\u8FF0",slug:"zookeeper\u6982\u8FF0",children:[]},{level:3,title:"zookeeper\u4F7F\u7528",slug:"zookeeper\u4F7F\u7528",children:[{level:4,title:"\u670D\u52A1\u63D0\u4F9B\u8005",slug:"\u670D\u52A1\u63D0\u4F9B\u8005",children:[]},{level:4,title:"\u670D\u52A1\u6D88\u8D39\u8005",slug:"\u670D\u52A1\u6D88\u8D39\u8005",children:[]}]}]},{level:2,title:"\u7B2C4\u7AE0 \u76D1\u63A7\u4E2D\u5FC3",slug:"\u7B2C4\u7AE0-\u76D1\u63A7\u4E2D\u5FC3",children:[{level:3,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-3",children:[]},{level:3,title:"\u6B65\u9AA4",slug:"\u6B65\u9AA4",children:[]}]},{level:2,title:"\u7B2C5\u7AE0 \u8D1F\u8F7D\u5747\u8861",slug:"\u7B2C5\u7AE0-\u8D1F\u8F7D\u5747\u8861",children:[{level:3,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-4",children:[]},{level:3,title:"Dubbo\u8D1F\u8F7D\u5747\u8861",slug:"dubbo\u8D1F\u8F7D\u5747\u8861",children:[{level:4,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-5",children:[]},{level:4,title:"Ramdom LoadBalance",slug:"ramdom-loadbalance",children:[]},{level:4,title:"RoundRobin LoadBalance",slug:"roundrobin-loadbalance",children:[]},{level:4,title:"LeastActive LoadBalance",slug:"leastactive-loadbalance",children:[]},{level:4,title:"ConsistenceHash LoadBalance",slug:"consistencehash-loadbalance",children:[]}]},{level:3,title:"\u914D\u7F6E\u65B9\u5F0F",slug:"\u914D\u7F6E\u65B9\u5F0F",children:[]}]}],git:{updatedTime:1710173765e3,contributors:[{name:"shailene",email:"64005626+shaileneF@users.noreply.github.com",commits:1}]},filePathRelative:"java/\u5206\u5E03\u5F0F/RPC\u6846\u67B6-dubbo/dubbo.md"};export{l as data};
                            +const l={key:"v-83ddddfc",path:"/java/%E5%88%86%E5%B8%83%E5%BC%8F/RPC%E6%A1%86%E6%9E%B6-dubbo/dubbo.html",title:"Dubbo",lang:"zh-CN",frontmatter:{},excerpt:"",headers:[{level:2,title:"\u7B2C1\u7AE0 \u8FDC\u7A0B\u8C03\u7528",slug:"\u7B2C1\u7AE0-\u8FDC\u7A0B\u8C03\u7528",children:[{level:3,title:"\u6982\u8FF0",slug:"\u6982\u8FF0",children:[]},{level:3,title:"RPC\u534F\u8BAE",slug:"rpc\u534F\u8BAE",children:[{level:4,title:"RPC\u662F\u4EC0\u4E48\uFF1F",slug:"rpc\u662F\u4EC0\u4E48",children:[]},{level:4,title:"RPC\u7684\u4F5C\u7528",slug:"rpc\u7684\u4F5C\u7528",children:[]},{level:4,title:"\u5206\u5E03\u5F0F",slug:"\u5206\u5E03\u5F0F",children:[]}]}]},{level:2,title:"\u7B2C2\u7AE0 Dubbo",slug:"\u7B2C2\u7AE0-dubbo",children:[{level:3,title:"Dubbo\u4ECB\u7ECD",slug:"dubbo\u4ECB\u7ECD",children:[]},{level:3,title:"Dubbo\u670D\u52A1\u7684\u5B9E\u73B0\u539F\u7406",slug:"dubbo\u670D\u52A1\u7684\u5B9E\u73B0\u539F\u7406",children:[]},{level:3,title:"Dubbo\u652F\u6301\u7684\u534F\u8BAE",slug:"dubbo\u652F\u6301\u7684\u534F\u8BAE",children:[{level:4,title:"dubbo\u534F\u8BAE",slug:"dubbo\u534F\u8BAE",children:[]},{level:4,title:"\u957F\u8FDE\u63A5\u548C\u77ED\u8FDE\u63A5",slug:"\u957F\u8FDE\u63A5\u548C\u77ED\u8FDE\u63A5",children:[]}]},{level:3,title:"Dubbo\u7684\u7EC4\u4EF6",slug:"dubbo\u7684\u7EC4\u4EF6",children:[]},{level:3,title:"\u4F7F\u7528Dubbo\u7684\u7B2C\u4E00\u4E2A\u9879\u76EE",slug:"\u4F7F\u7528dubbo\u7684\u7B2C\u4E00\u4E2A\u9879\u76EE",children:[]},{level:3,title:"\u4F7F\u7528\u63A5\u53E3\u4F5C\u4E3A\u72EC\u7ACB\u9879\u76EE",slug:"\u4F7F\u7528\u63A5\u53E3\u4F5C\u4E3A\u72EC\u7ACB\u9879\u76EE",children:[]},{level:3,title:"Dubbo\u5E38\u7528\u6807\u7B7E",slug:"dubbo\u5E38\u7528\u6807\u7B7E",children:[{level:4,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-1",children:[]},{level:4,title:"\u516C\u7528\u6807\u7B7E",slug:"\u516C\u7528\u6807\u7B7E",children:[]},{level:4,title:"\u670D\u52A1\u63D0\u4F9B\u8005\u6807\u7B7E",slug:"\u670D\u52A1\u63D0\u4F9B\u8005\u6807\u7B7E",children:[]},{level:4,title:"\u670D\u52A1\u6D88\u8D39\u8005\u6807\u7B7E",slug:"\u670D\u52A1\u6D88\u8D39\u8005\u6807\u7B7E",children:[]}]},{level:3,title:"\u5E38\u7528\u914D\u7F6E\u5C5E\u6027",slug:"\u5E38\u7528\u914D\u7F6E\u5C5E\u6027",children:[{level:4,title:"check",slug:"check",children:[]},{level:4,title:"\u8BF7\u6C42\u91CD\u8BD5retries",slug:"\u8BF7\u6C42\u91CD\u8BD5retries",children:[]}]}]},{level:2,title:"\u7B2C3\u7AE0 \u6CE8\u518C\u4E2D\u5FC3",slug:"\u7B2C3\u7AE0-\u6CE8\u518C\u4E2D\u5FC3",children:[{level:3,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-2",children:[]},{level:3,title:"zookeeper\u6982\u8FF0",slug:"zookeeper\u6982\u8FF0",children:[]},{level:3,title:"zookeeper\u4F7F\u7528",slug:"zookeeper\u4F7F\u7528",children:[{level:4,title:"\u670D\u52A1\u63D0\u4F9B\u8005",slug:"\u670D\u52A1\u63D0\u4F9B\u8005",children:[]},{level:4,title:"\u670D\u52A1\u6D88\u8D39\u8005",slug:"\u670D\u52A1\u6D88\u8D39\u8005",children:[]}]}]},{level:2,title:"\u7B2C4\u7AE0 \u76D1\u63A7\u4E2D\u5FC3",slug:"\u7B2C4\u7AE0-\u76D1\u63A7\u4E2D\u5FC3",children:[{level:3,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-3",children:[]},{level:3,title:"\u6B65\u9AA4",slug:"\u6B65\u9AA4",children:[]}]},{level:2,title:"\u7B2C5\u7AE0 \u8D1F\u8F7D\u5747\u8861",slug:"\u7B2C5\u7AE0-\u8D1F\u8F7D\u5747\u8861",children:[{level:3,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-4",children:[]},{level:3,title:"Dubbo\u8D1F\u8F7D\u5747\u8861",slug:"dubbo\u8D1F\u8F7D\u5747\u8861",children:[{level:4,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-5",children:[]},{level:4,title:"Ramdom LoadBalance",slug:"ramdom-loadbalance",children:[]},{level:4,title:"RoundRobin LoadBalance",slug:"roundrobin-loadbalance",children:[]},{level:4,title:"LeastActive LoadBalance",slug:"leastactive-loadbalance",children:[]},{level:4,title:"ConsistenceHash LoadBalance",slug:"consistencehash-loadbalance",children:[]}]},{level:3,title:"\u914D\u7F6E\u65B9\u5F0F",slug:"\u914D\u7F6E\u65B9\u5F0F",children:[]}]}],git:{updatedTime:1710173784e3,contributors:[{name:"shailene",email:"64005626+shaileneF@users.noreply.github.com",commits:1}]},filePathRelative:"java/\u5206\u5E03\u5F0F/RPC\u6846\u67B6-dubbo/dubbo.md"};export{l as data};
                            diff --git "a/assets/flink\345\237\272\346\234\254\347\257\2072.html.167231dc.js" "b/assets/flink\345\237\272\346\234\254\347\257\2072.html.053d0f90.js"
                            similarity index 98%
                            rename from "assets/flink\345\237\272\346\234\254\347\257\2072.html.167231dc.js"
                            rename to "assets/flink\345\237\272\346\234\254\347\257\2072.html.053d0f90.js"
                            index ba2fcb62..64037991 100644
                            --- "a/assets/flink\345\237\272\346\234\254\347\257\2072.html.167231dc.js"
                            +++ "b/assets/flink\345\237\272\346\234\254\347\257\2072.html.053d0f90.js"
                            @@ -1 +1 @@
                            -const l={key:"v-30eca57b",path:"/mw/Flink/Flink%E5%9F%BA%E6%9C%AC%E7%AF%87/flink%E5%9F%BA%E6%9C%AC%E7%AF%872.html",title:"Flink\u57FA\u672C\u7BC72",lang:"zh-CN",frontmatter:{},excerpt:"",headers:[{level:2,title:"\u7B2C\u4E94\u7AE0 Flink\u8FD0\u884C\u65F6\u67B6\u6784",slug:"\u7B2C\u4E94\u7AE0-flink\u8FD0\u884C\u65F6\u67B6\u6784",children:[{level:3,title:"\u6982\u8FF0",slug:"\u6982\u8FF0",children:[]},{level:3,title:"\u4F5C\u4E1A\u7BA1\u7406\u5668",slug:"\u4F5C\u4E1A\u7BA1\u7406\u5668",children:[{level:4,title:"Job master",slug:"job-master",children:[]},{level:4,title:"\u8D44\u6E90\u7BA1\u7406\u5668",slug:"\u8D44\u6E90\u7BA1\u7406\u5668",children:[]}]},{level:3,title:"\u4EFB\u52A1\u7BA1\u7406\u5668 task manager",slug:"\u4EFB\u52A1\u7BA1\u7406\u5668-task-manager",children:[]},{level:3,title:"\u4F5C\u4E1A\u63D0\u4EA4\u6D41\u7A0B",slug:"\u4F5C\u4E1A\u63D0\u4EA4\u6D41\u7A0B",children:[{level:4,title:"\u601D\u8003",slug:"\u601D\u8003",children:[]}]},{level:3,title:"\u4E00\u4E9B\u91CD\u8981\u6982\u5FF5",slug:"\u4E00\u4E9B\u91CD\u8981\u6982\u5FF5",children:[{level:4,title:"\u5E76\u884C\u5EA6",slug:"\u5E76\u884C\u5EA6",children:[]},{level:4,title:"\u6570\u636E\u4F20\u8F93\u5F62\u5F0F",slug:"\u6570\u636E\u4F20\u8F93\u5F62\u5F0F",children:[]},{level:4,title:"\u6267\u884C\u56FE",slug:"\u6267\u884C\u56FE",children:[]},{level:4,title:"\u4EFB\u52A1\u548C\u4EFB\u52A1\u69FD",slug:"\u4EFB\u52A1\u548C\u4EFB\u52A1\u69FD",children:[]}]}]},{level:2,title:"\u7B2C\u516D\u7AE0 Datastream API",slug:"\u7B2C\u516D\u7AE0-datastream-api",children:[{level:3,title:"\u6267\u884C\u73AF\u5883",slug:"\u6267\u884C\u73AF\u5883",children:[]},{level:3,title:"\u6E90\u7B97\u5B50",slug:"\u6E90\u7B97\u5B50",children:[{level:4,title:"\u51C6\u5907\u5DE5\u4F5C",slug:"\u51C6\u5907\u5DE5\u4F5C",children:[]},{level:4,title:"\u8BFB\u53D6\u6570\u636E",slug:"\u8BFB\u53D6\u6570\u636E",children:[]},{level:4,title:"\u4ECEkafka\u8BFB\u53D6\u6570\u636E",slug:"\u4ECEkafka\u8BFB\u53D6\u6570\u636E",children:[]},{level:4,title:"\u81EA\u5B9A\u4E49source",slug:"\u81EA\u5B9A\u4E49source",children:[]},{level:4,title:"\u81EA\u5B9A\u4E49\u5E76\u884Csource",slug:"\u81EA\u5B9A\u4E49\u5E76\u884Csource",children:[]},{level:4,title:"flink\u652F\u6301\u7684\u6570\u636E\u7C7B\u578B",slug:"flink\u652F\u6301\u7684\u6570\u636E\u7C7B\u578B",children:[]}]},{level:3,title:"\u8F6C\u6362\u7B97\u5B50\uFF08Transformation\uFF09",slug:"\u8F6C\u6362\u7B97\u5B50-transformation",children:[{level:4,title:"map",slug:"map",children:[]},{level:4,title:"filter",slug:"filter",children:[]},{level:4,title:"flatMap",slug:"flatmap",children:[]},{level:4,title:"\u805A\u5408\u7B97\u5B50",slug:"\u805A\u5408\u7B97\u5B50",children:[]},{level:4,title:"\u7528\u6237\u81EA\u5B9A\u4E49\u51FD\u6570",slug:"\u7528\u6237\u81EA\u5B9A\u4E49\u51FD\u6570",children:[]},{level:4,title:"ChatGpt keyBy\u5206\u6D41\u518D\u5408\u6D41\u7684\u7528\u6CD5",slug:"chatgpt-keyby\u5206\u6D41\u518D\u5408\u6D41\u7684\u7528\u6CD5",children:[]}]},{level:3,title:"\u7269\u7406\u5206\u533A",slug:"\u7269\u7406\u5206\u533A",children:[]},{level:3,title:"\u8F93\u51FA\u7B97\u5B50",slug:"\u8F93\u51FA\u7B97\u5B50",children:[{level:4,title:"\u8F93\u51FA\u5230\u6587\u4EF6",slug:"\u8F93\u51FA\u5230\u6587\u4EF6",children:[]},{level:4,title:"\u8F93\u51FA\u5230kafka",slug:"\u8F93\u51FA\u5230kafka",children:[]}]}]},{level:2,title:"\u7B2C\u4E03\u7AE0 \u65F6\u95F4\u548C\u7A97\u53E3",slug:"\u7B2C\u4E03\u7AE0-\u65F6\u95F4\u548C\u7A97\u53E3",children:[{level:3,title:"\u65F6\u95F4\u8BED\u4E49",slug:"\u65F6\u95F4\u8BED\u4E49",children:[]},{level:3,title:"\u6C34\u4F4D\u7EBF",slug:"\u6C34\u4F4D\u7EBF",children:[]},{level:3,title:"\u7A97\u53E3",slug:"\u7A97\u53E3",children:[{level:4,title:"\u6982\u5FF5",slug:"\u6982\u5FF5",children:[]},{level:4,title:"\u5206\u7C7B",slug:"\u5206\u7C7B",children:[]},{level:4,title:"\u7A97\u53E3API",slug:"\u7A97\u53E3api",children:[]},{level:4,title:"\u7A97\u53E3\u5206\u914D\u5668",slug:"\u7A97\u53E3\u5206\u914D\u5668",children:[]},{level:4,title:"\u7A97\u53E3\u51FD\u6570",slug:"\u7A97\u53E3\u51FD\u6570",children:[]}]}]},{level:2,title:"\u7B2C\u516B\u7AE0 \u5206\u6D41\u5408\u6D41",slug:"\u7B2C\u516B\u7AE0-\u5206\u6D41\u5408\u6D41",children:[{level:3,title:"\u5206\u6D41",slug:"\u5206\u6D41",children:[]}]}],git:{updatedTime:1710173765e3,contributors:[{name:"shailene",email:"64005626+shaileneF@users.noreply.github.com",commits:1}]},filePathRelative:"mw/Flink/Flink\u57FA\u672C\u7BC7/flink\u57FA\u672C\u7BC72.md"};export{l as data};
                            +const l={key:"v-30eca57b",path:"/mw/Flink/Flink%E5%9F%BA%E6%9C%AC%E7%AF%87/flink%E5%9F%BA%E6%9C%AC%E7%AF%872.html",title:"Flink\u57FA\u672C\u7BC72",lang:"zh-CN",frontmatter:{},excerpt:"",headers:[{level:2,title:"\u7B2C\u4E94\u7AE0 Flink\u8FD0\u884C\u65F6\u67B6\u6784",slug:"\u7B2C\u4E94\u7AE0-flink\u8FD0\u884C\u65F6\u67B6\u6784",children:[{level:3,title:"\u6982\u8FF0",slug:"\u6982\u8FF0",children:[]},{level:3,title:"\u4F5C\u4E1A\u7BA1\u7406\u5668",slug:"\u4F5C\u4E1A\u7BA1\u7406\u5668",children:[{level:4,title:"Job master",slug:"job-master",children:[]},{level:4,title:"\u8D44\u6E90\u7BA1\u7406\u5668",slug:"\u8D44\u6E90\u7BA1\u7406\u5668",children:[]}]},{level:3,title:"\u4EFB\u52A1\u7BA1\u7406\u5668 task manager",slug:"\u4EFB\u52A1\u7BA1\u7406\u5668-task-manager",children:[]},{level:3,title:"\u4F5C\u4E1A\u63D0\u4EA4\u6D41\u7A0B",slug:"\u4F5C\u4E1A\u63D0\u4EA4\u6D41\u7A0B",children:[{level:4,title:"\u601D\u8003",slug:"\u601D\u8003",children:[]}]},{level:3,title:"\u4E00\u4E9B\u91CD\u8981\u6982\u5FF5",slug:"\u4E00\u4E9B\u91CD\u8981\u6982\u5FF5",children:[{level:4,title:"\u5E76\u884C\u5EA6",slug:"\u5E76\u884C\u5EA6",children:[]},{level:4,title:"\u6570\u636E\u4F20\u8F93\u5F62\u5F0F",slug:"\u6570\u636E\u4F20\u8F93\u5F62\u5F0F",children:[]},{level:4,title:"\u6267\u884C\u56FE",slug:"\u6267\u884C\u56FE",children:[]},{level:4,title:"\u4EFB\u52A1\u548C\u4EFB\u52A1\u69FD",slug:"\u4EFB\u52A1\u548C\u4EFB\u52A1\u69FD",children:[]}]}]},{level:2,title:"\u7B2C\u516D\u7AE0 Datastream API",slug:"\u7B2C\u516D\u7AE0-datastream-api",children:[{level:3,title:"\u6267\u884C\u73AF\u5883",slug:"\u6267\u884C\u73AF\u5883",children:[]},{level:3,title:"\u6E90\u7B97\u5B50",slug:"\u6E90\u7B97\u5B50",children:[{level:4,title:"\u51C6\u5907\u5DE5\u4F5C",slug:"\u51C6\u5907\u5DE5\u4F5C",children:[]},{level:4,title:"\u8BFB\u53D6\u6570\u636E",slug:"\u8BFB\u53D6\u6570\u636E",children:[]},{level:4,title:"\u4ECEkafka\u8BFB\u53D6\u6570\u636E",slug:"\u4ECEkafka\u8BFB\u53D6\u6570\u636E",children:[]},{level:4,title:"\u81EA\u5B9A\u4E49source",slug:"\u81EA\u5B9A\u4E49source",children:[]},{level:4,title:"\u81EA\u5B9A\u4E49\u5E76\u884Csource",slug:"\u81EA\u5B9A\u4E49\u5E76\u884Csource",children:[]},{level:4,title:"flink\u652F\u6301\u7684\u6570\u636E\u7C7B\u578B",slug:"flink\u652F\u6301\u7684\u6570\u636E\u7C7B\u578B",children:[]}]},{level:3,title:"\u8F6C\u6362\u7B97\u5B50\uFF08Transformation\uFF09",slug:"\u8F6C\u6362\u7B97\u5B50-transformation",children:[{level:4,title:"map",slug:"map",children:[]},{level:4,title:"filter",slug:"filter",children:[]},{level:4,title:"flatMap",slug:"flatmap",children:[]},{level:4,title:"\u805A\u5408\u7B97\u5B50",slug:"\u805A\u5408\u7B97\u5B50",children:[]},{level:4,title:"\u7528\u6237\u81EA\u5B9A\u4E49\u51FD\u6570",slug:"\u7528\u6237\u81EA\u5B9A\u4E49\u51FD\u6570",children:[]},{level:4,title:"ChatGpt keyBy\u5206\u6D41\u518D\u5408\u6D41\u7684\u7528\u6CD5",slug:"chatgpt-keyby\u5206\u6D41\u518D\u5408\u6D41\u7684\u7528\u6CD5",children:[]}]},{level:3,title:"\u7269\u7406\u5206\u533A",slug:"\u7269\u7406\u5206\u533A",children:[]},{level:3,title:"\u8F93\u51FA\u7B97\u5B50",slug:"\u8F93\u51FA\u7B97\u5B50",children:[{level:4,title:"\u8F93\u51FA\u5230\u6587\u4EF6",slug:"\u8F93\u51FA\u5230\u6587\u4EF6",children:[]},{level:4,title:"\u8F93\u51FA\u5230kafka",slug:"\u8F93\u51FA\u5230kafka",children:[]}]}]},{level:2,title:"\u7B2C\u4E03\u7AE0 \u65F6\u95F4\u548C\u7A97\u53E3",slug:"\u7B2C\u4E03\u7AE0-\u65F6\u95F4\u548C\u7A97\u53E3",children:[{level:3,title:"\u65F6\u95F4\u8BED\u4E49",slug:"\u65F6\u95F4\u8BED\u4E49",children:[]},{level:3,title:"\u6C34\u4F4D\u7EBF",slug:"\u6C34\u4F4D\u7EBF",children:[]},{level:3,title:"\u7A97\u53E3",slug:"\u7A97\u53E3",children:[{level:4,title:"\u6982\u5FF5",slug:"\u6982\u5FF5",children:[]},{level:4,title:"\u5206\u7C7B",slug:"\u5206\u7C7B",children:[]},{level:4,title:"\u7A97\u53E3API",slug:"\u7A97\u53E3api",children:[]},{level:4,title:"\u7A97\u53E3\u5206\u914D\u5668",slug:"\u7A97\u53E3\u5206\u914D\u5668",children:[]},{level:4,title:"\u7A97\u53E3\u51FD\u6570",slug:"\u7A97\u53E3\u51FD\u6570",children:[]}]}]},{level:2,title:"\u7B2C\u516B\u7AE0 \u5206\u6D41\u5408\u6D41",slug:"\u7B2C\u516B\u7AE0-\u5206\u6D41\u5408\u6D41",children:[{level:3,title:"\u5206\u6D41",slug:"\u5206\u6D41",children:[]}]}],git:{updatedTime:1710173784e3,contributors:[{name:"shailene",email:"64005626+shaileneF@users.noreply.github.com",commits:1}]},filePathRelative:"mw/Flink/Flink\u57FA\u672C\u7BC7/flink\u57FA\u672C\u7BC72.md"};export{l as data};
                            diff --git "a/assets/flink\345\237\272\346\234\254\347\257\2072.html.417d9689.js" "b/assets/flink\345\237\272\346\234\254\347\257\2072.html.151e4540.js"
                            similarity index 99%
                            rename from "assets/flink\345\237\272\346\234\254\347\257\2072.html.417d9689.js"
                            rename to "assets/flink\345\237\272\346\234\254\347\257\2072.html.151e4540.js"
                            index 4b658d33..59c1d17b 100644
                            --- "a/assets/flink\345\237\272\346\234\254\347\257\2072.html.417d9689.js"
                            +++ "b/assets/flink\345\237\272\346\234\254\347\257\2072.html.151e4540.js"
                            @@ -1,4 +1,4 @@
                            -import{_ as n,e as s}from"./app.0d029894.js";var a="/study/assets/image-20230406165402400.442b2001.png",t="/study/assets/image-20230406170036021.b51cd847.png",p="/study/assets/image-20230407154008166.550f85ce.png",o="/study/assets/image-20230407160017643.c2a4b9cd.png",e="/study/assets/image-20230410105353234.a41191ce.png",c="/study/assets/image-20230410114233386.b330fc96.png",u="/study/assets/image-20230411104546144.8132c981.png",l="/study/assets/image-20230411111028715.01af8b54.png",k="/study/assets/image-20230411112932546.11a521aa.png",i="/study/assets/image-20230411113818749.15191bec.png",r="/study/assets/image-20230411115327839.8fb2dd08.png",m="/study/assets/image-20230412140212223.d41b1d3a.png";const d={},g=s('

                            Flink\u57FA\u672C\u7BC72

                            \u7B2C\u4E94\u7AE0 Flink\u8FD0\u884C\u65F6\u67B6\u6784

                            \u6982\u8FF0

                            \u901A\u5E38\uFF0C\u6211\u4EEC\u53EA\u9700\u8981\u4F7F\u7528getExecutionEnvironment()\uFF0C\u56E0\u4E3A\u8FD9\u5C06\u6839\u636E\u4E0A\u4E0B\u6587\u6267\u884C\u6B63\u786E\u7684\u64CD\u4F5C\uFF1A\u5982\u679C\u4F60\u662F\u5728IDE\u4E2D\u6267\u884C\u7A0B\u5E8F\u6216\u4F5C\u4E3A\u5E38\u89C4Java\u7A0B\u5E8F\u6267\u884C\uFF0C\u5B83\u5C06\u521B\u5EFA\u4E00\u4E2A\u672C\u5730\u73AF\u5883\uFF0C\u8BE5\u73AF\u5883\u5C06\u5728\u672C\u5730\u8BA1\u7B97\u673A\u4E0A\u6267\u884C\u60A8\u7684\u7A0B\u5E8F\u3002\u5982\u679C\u60A8\u662F\u4ECE\u7A0B\u5E8F\u521B\u5EFA\u7684JAR\u6587\u4EF6\uFF0C\u5E76\u901A\u8FC7\u547D\u4EE4\u884C\u8C03\u7528\u5B83\uFF0C\u5219Flink\u96C6\u7FA4\u7BA1\u7406\u5668\u5C06\u6267\u884C\u60A8\u7684main\u65B9\u6CD5\uFF0C\u800CgetExecutionEnvironment()\u5C06\u8FD4\u56DE\u7528\u4E8E\u5728\u96C6\u7FA4\u4E0A\u6267\u884C\u7A0B\u5E8F\u7684\u6267\u884C\u73AF\u5883\u3002

                            Task Slot\u5C31\u662F\u4EFB\u52A1\u69FD\uFF0C\u5C31\u662F\u6267\u884C\u4EFB\u52A1\u6240\u9700\u7684\u6700\u5C0F\u7684\u4E00\u5757\u8D44\u6E90\u3002

                            flink\u5BA2\u6237\u7AEF\u5E76\u4E0D\u662F\u8FD0\u884C\u65F6\u7CFB\u7EDF\u7684\u4E00\u90E8\u5206\uFF0C\u53EA\u662F\u8D77\u4E86\u4E00\u4E2A\u63D0\u4EA4\u4F5C\u4E1A\u7684\u4F5C\u7528\u3002

                            \u5BF9\u4E8E\u8FD0\u884C\u65F6\u7CFB\u7EDF\u800C\u8A00\uFF0C\u4E3B\u8981\u5C31\u7531job manager\u548Ctask manager\u7EC4\u6210\u3002

                            \u4F5C\u4E1A\u7BA1\u7406\u5668

                            \u63A7\u5236\u4E00\u4E2A\u5E94\u7528\u7A0B\u5E8F\u6267\u884C\u7684\u4E3B\u8FDB\u7A0B\uFF0C\u662FFlink\u96C6\u7FA4\u4E2D\u4EFB\u52A1\u7BA1\u7406\u548C\u8C03\u5EA6\u7684\u6838\u5FC3\u3002

                            Job master

                            \u662FJob manager\u4E2D\u6700\u6838\u5FC3\u7684\u7EC4\u4EF6\uFF0C\u4E00\u4E2Ajob \u5BF9\u5E94\u4E8E\u4E00\u4E2Ajob master\u3002

                            \u5728\u4F5C\u4E1A\u63D0\u4EA4\u65F6\uFF0CJob Master\u4F1A\u5148\u63A5\u6536\u5230\u8981\u6267\u884C\u7684\u5E94\u7528\u3002\u4E00\u822C\u662F\u7531\u5BA2\u6237\u7AEF\u63D0\u4EA4\u6765\u7684\uFF0C\u5305\u62ECjar\u5305\uFF0C\u6570\u636E\u6D41\u56FE\uFF08dataflow graph\uFF09\u548C\u4F5C\u4E1A\u56FE\uFF08job graph\uFF09\u3002

                            job master\u4F1A\u628AjobGraph\u8F6C\u6362\u6210\u4E00\u4E2A\u7269\u7406\u5C42\u9762\u7684\u6570\u636E\u6D41\u56FE\uFF0C\u8FD9\u4E2A\u56FE\u88AB\u79F0\u4E3A\u6267\u884C\u56FE\uFF0C\u5B83\u5305\u542B\u4E86\u6240\u6709\u53EF\u4EE5\u5E76\u53D1\u6267\u884C\u7684\u4EFB\u52A1\uFF0Cjob master\u4F1A\u5411\u8D44\u6E90\u7BA1\u7406\u5668\u53D1\u51FA\u8BF7\u6C42\uFF0C\u7533\u8BF7\u6267\u884C\u4EFB\u52A1\u5FC5\u8981\u7684\u8D44\u6E90\uFF0C\u4E00\u65E6\u83B7\u5F97\u4E86\u8DB3\u591F\u7684\u8D44\u6E90\uFF0C\u5C31\u4F1A\u5C06\u6267\u884C\u56FE\u5206\u53D1\u5230\u771F\u6B63\u8FD0\u884C\u4ED6\u4EEC\u7684task manager\u4E0A\u3002

                            \u8D44\u6E90\u7BA1\u7406\u5668

                            \u8D44\u6E90\u7BA1\u7406\u5668\u4E3B\u8981\u8D1F\u8D23\u8D44\u6E90\u7684\u5206\u914D\u548C\u7BA1\u7406\uFF0C\u5728flink\u96C6\u7FA4\u4E2D\u53EA\u6709\u4E00\u4E2A\u3002\u6240\u8C13\u8D44\u6E90\u5C31\u662Ftask manager\u7684\u4EFB\u52A1\u69FD\uFF0C\u4EFB\u52A1\u69FD\u5C31\u662Fflink\u96C6\u7FA4\u7684\u8D44\u6E90\u8C03\u914D\u5355\u5143\uFF0C\u5305\u542B\u4E86\u673A\u5668\u7528\u6765\u6267\u884C\u4F5C\u4E1A\u7684\u4E00\u7EC4CPU\u548C\u5185\u5B58\u8D44\u6E90\u3002\u6BCF\u4E00\u4E2A\u4EFB\u52A1task\u90FD\u9700\u8981\u5206\u914D\u5230\u4E00\u4E2Aslot\u4E0A\u6267\u884C\u3002

                            \u4EFB\u52A1\u7BA1\u7406\u5668 task manager

                            flink\u7684\u5DE5\u4F5C\u8FDB\u7A0B\uFF0C\u901A\u5E38\u5728flink\u96C6\u7FA4\u4E2D\u4F1A\u6709\u591A\u4E2Atask manager\u8FD0\u884C\uFF0C\u6BCF\u4E00\u4E2Atask manager\u90FD\u5305\u542B\u4E86\u4E00\u5B9A\u6570\u91CF\u7684slots\u3002slots\u7684\u6570\u91CF\u9650\u5236\u4E86task manager\u80FD\u591F\u5E76\u884C\u5904\u7406\u7684\u4EFB\u52A1\u6570\u91CF\u3002

                            \u4F5C\u4E1A\u63D0\u4EA4\u6D41\u7A0B

                            standalone\u6A21\u5F0F

                            image-20230406165402400

                            yarn\u4F1A\u8BDD\u6A21\u5F0F

                            task manager\u8DD1\u5728\u5BB9\u5668\u91CC

                            image-20230406170036021

                            \u601D\u8003

                            \u4E00\u4E2A\u6D41\u5904\u7406\u7A0B\u5E8F\uFF0C\u5230\u5E95\u5305\u542B\u591A\u5C11\u4E2A\u4EFB\u52A1\uFF1F

                            \u6700\u7EC8\u6267\u884C\u4EFB\u52A1\uFF0C\u9700\u8981\u5360\u7528\u591A\u5C11slot\uFF1F

                            \u6240\u6709flink\u7A0B\u5E8F\u90FD\u662F\u7531\u4E09\u90E8\u5206\u7EC4\u6210\u7684\uFF1Asource\u3001transformation\u548Csink

                            source\u8D1F\u8D23\u8BFB\u53D6\u6570\u636E\u6E90\uFF0Ctransformation\u5229\u7528\u5404\u79CD\u7B97\u5B50\u8FDB\u884C\u5904\u7406\u52A0\u5DE5\uFF0Csink\u8D1F\u8D23\u8F93\u51FA\u3002

                            \u4E00\u4E9B\u91CD\u8981\u6982\u5FF5

                            \u5E76\u884C\u5EA6

                            \u6BCF\u4E00\u4E2A\u7B97\u5B50\uFF08operator\uFF09\u53EF\u4EE5\u5305\u542B\u4E00\u4E2A\u6216\u591A\u4E2A\u5B50\u4EFB\u52A1\uFF0C\u8FD9\u4E9B\u5B50\u4EFB\u52A1\u5728\u4E0D\u540C\u7684\u7EBF\u7A0B\u3001\u4E0D\u540C\u7684\u7269\u7406\u673A\u6216\u4E0D\u540C\u7684\u5BB9\u5668\u4E2D\u5B8C\u5168\u72EC\u7ACB\u5730\u6267\u884C\uFF08\u5728\u4E0D\u540C\u7684task manager slot\u4E2D\u6267\u884C\uFF09\u3002

                            \u4E00\u4E2A\u7279\u5B9A\u7B97\u5B50\u7684\u5B50\u4EFB\u52A1\u7684\u4E2A\u6570\u88AB\u79F0\u4E4B\u4E3A\u8FD9\u4E2A\u7B97\u5B50\u7684\u5E76\u884C\u5EA6\u3002

                            \u4E00\u4E2A\u4F5C\u4E1A\u91CC\u9762\u7684\u4E0D\u540C\u7B97\u5B50\u53EF\u4EE5\u8BBE\u7F6E\u4E0D\u540C\u7684\u5E76\u884C\u5EA6\u3002\u5E76\u884C\u5EA6\u662F\u9488\u5BF9\u6BCF\u4E2A\u7279\u5B9A\u7B97\u5B50\u800C\u8A00\u7684\u3002

                            env\u4E5F\u53EF\u4EE5\u8BBE\u7F6E\u5E76\u884C\u5EA6\uFF0C\u8868\u793A\u5168\u5C40\u7684\u6240\u6709\u7B97\u5B50\u7684\u5E76\u884C\u5EA6\u3002

                            \u5982\u679C\u5728env\u8BBE\u7F6E\u4E86\u5E76\u884C\u5EA6\uFF0C\u5728\u540E\u9762\u7684\u7B97\u5B50\u5904\u53C8\u8BBE\u7F6E\u4E86\u5E76\u884C\u5EA6\uFF0C\u90A3\u4E48\u4F18\u5148\u7EA7\u662F\u7B97\u5B50\u672C\u8EAB\u7684\u5E76\u884C\u5EA6\u4F18\u5148\u7EA7\u6700\u9AD8\u3002

                            \u4F18\u5148\u7EA7\uFF1A

                            \u6BCF\u4E2A\u7B97\u5B50\u7684\u5E76\u884C\u5EA6\u8BBE\u7F6E > env\u73AF\u5883\u7684\u5E76\u884C\u5EA6\u8BBE\u7F6E > \u4F5C\u4E1A\u63D0\u4EA4\u7684\u5E76\u884C\u5EA6\u8BBE\u7F6E

                            \u4E00\u4E2A\u6D41\u5904\u7406\u7A0B\u5E8F\uFF0C\u53EF\u4EE5\u8BA4\u4E3A\u662F\u4E00\u4E2A\u4F5C\u4E1A\uFF0C\u4E00\u4E2A\u4F5C\u4E1A\u63D0\u4EA4\u540E\uFF0C\u4E0D\u7B49\u4E8E\u4E00\u4E2A\u4EFB\u52A1\uFF0C\u800C\u662F\u591A\u4E2A\u5B50\u4EFB\u52A1\uFF0C\u6BCF\u4E00\u4E2A\u4EFB\u52A1\u4F1A\u5230task manager\u7684\u4E00\u4E2Aslot\u6267\u884C\u3002\u5177\u4F53\u662F\u591A\u5C11\u5B50\u4EFB\u52A1\uFF0C\u8FD9\u53D6\u51B3\u4E8E\u5E76\u884C\u5EA6\u7684\u8BBE\u7F6E\u3002

                            \u6570\u636E\u4F20\u8F93\u5F62\u5F0F

                            One-To-One

                            stream\u7EF4\u62A4\u7740\u5206\u533A\u4EE5\u53CA\u5143\u7D20\u7684\u987A\u5E8F\uFF0C\u6BD4\u5982source\u548Cmap\u4E4B\u95F4\uFF0C\u8FD9\u610F\u5473\u7740map\u7B97\u5B50\u7684\u5B50\u4EFB\u52A1\u770B\u5230\u7684\u5143\u7D20\u7684\u4E2A\u6570\u4EE5\u53CA\u987A\u5E8F\u548Csource\u7B97\u5B50\u7684\u5B50\u4EFB\u52A1\u751F\u4EA7\u7684\u5143\u7D20\u7684\u4E2A\u6570\u3001\u987A\u5E8F\u76F8\u540C\u3002map\u3001filter\u3001flatmap\u90FD\u662FOne-To-One\u7684\u5173\u7CFB\u3002

                            \u7B97\u5B50\u94FE\u600E\u4E48\u5408\u5E76\uFF1A

                            \u524D\u540E\u53D1\u751F\u7684\u4E24\u4E2A\u7B97\u5B50\u4E4B\u95F4\u662FOne-To-One\u7684\u5173\u7CFB\uFF0C\u4E14\u7B97\u5B50\u7684\u5E76\u884C\u5EA6\u76F8\u540C\uFF0C\u90A3\u4E48\u53EF\u4EE5\u5408\u5E76\u6210\u4E00\u4E2A\u7B97\u5B50\u94FE\uFF0C\u5728\u62D3\u6251\u56FE\u4E2D\u53EF\u4EE5\u770B\u5230\u3002\u53EF\u4EE5\u8282\u7701\u5F00\u9500\u3002

                            image-20230407154008166

                            \u6267\u884C\u56FE

                            flink\u4E2D\u7684\u6267\u884C\u56FE\u53EF\u4EE5\u5206\u4E3A\u56DB\u5C42\uFF1A

                            • StreamGraph
                            • JobGraph
                            • ExecutionGraph
                            • \u7269\u7406\u6267\u884C\u56FE

                            StreamGraph\uFF1A\u662F\u6839\u636E\u7528\u6237\u901A\u8FC7Stream API\u7F16\u5199\u7684\u4EE3\u7801\u751F\u6210\u7684\u6700\u521D\u7684\u56FE\uFF0C\u7528\u6765\u8868\u793A\u7A0B\u5E8F\u7684\u62D3\u6251\u7ED3\u6784\u3002

                            JobGraph\uFF1AStreamGraph\u7ECF\u8FC7\u4F18\u5316\u540E\uFF0C\u751F\u6210\u4E86JobGraph\uFF0C\u63D0\u4EA4\u7ED9JobManager\u7684\u6570\u636E\u7ED3\u6784\uFF0C\u4E3B\u8981\u7684\u4F18\u5316\u4E3A\uFF0C\u5C06\u591A\u4E2A\u7B26\u5408\u6761\u4EF6\u7684\u8282\u70B9chain\u5728\u4E00\u8D77\u4F5C\u4E3A\u4E00\u4E2A\u8282\u70B9\uFF08\u5408\u5E76\u6210\u7B97\u5B50\u94FE\uFF09\uFF0C\u8282\u7701\u5F00\u9500\u3002

                            ExecutionGraph\uFF1AJobManager\u6839\u636EJobGraph\u751F\u6210\u7684\u56FE\uFF0CExecutionGraph\u662FJobGraph\u7684\u5E76\u884C\u5316\u7248\u672C\uFF0C\u662F\u8C03\u5EA6\u5C42\u6700\u6838\u5FC3\u7684\u6570\u636E\u7ED3\u6784\u3002

                            \u4EFB\u52A1\u548C\u4EFB\u52A1\u69FD

                            flink\u4E2D\u6BCF\u4E00\u4E2Atask manager\u90FD\u662F\u4E00\u4E2AJVM\u8FDB\u7A0B\uFF0C\u4E3A\u4E86\u63A7\u5236\u4E00\u4E2Atask manager\u80FD\u63A5\u6536\u591A\u5C11task\uFF0Ctask manager\u901A\u8FC7task slot\u6765\u8FDB\u884C\u63A7\u5236\uFF08\u4E00\u4E2Atask manager\u81F3\u5C11\u6709\u4E00\u4E2Aslot\uFF09

                            slot\u662F\u5BF9\u8D44\u6E90\u7684\u4E00\u79CD\u5212\u5206\u3002

                            slot\u7684\u9694\u79BB\u4E3B\u8981\u662F\u9488\u5BF9\u5185\u5B58\u3002

                            \u914D\u7F6Etask manager\u7684slot\u6570\u91CF\u7684\u65F6\u5019\uFF0C\u5EFA\u8BAE\u6309cpu\u7684\u6838\u5FC3\u6570\u91CF\u6765\u914D\u7F6E\uFF0C\u4E00\u4E2Aslot\u5206\u914D\u7ED9\u4E00\u4E2A\u6838\uFF0C\u8FD9\u6837CPU\u5C31\u4E0D\u7528\u5206\u65F6\u590D\u7528\u4E86\u3002

                            \u4E3A\u4EC0\u4E485\u4E2A\u4EFB\u52A1\uFF0C\u7528\u4E24\u4E2Aslot\u5C31\u8DD1\u8D77\u6765\u4E86\uFF1F

                            \u662F\u56E0\u4E3A\u5728flink\u91CC\u9762\uFF0C\u4EFB\u52A1\u4E4B\u95F4\u9ED8\u8BA4\u662F\u53EF\u4EE5\u8FDB\u884Cslot\u5171\u4EAB\u7684\u3002

                            \u540C\u4E00\u4E2A\u7B97\u5B50\u7684\u5E76\u884C\u5B50\u4EFB\u52A1\uFF0C\u5728\u4E0D\u540C\u7684slot\u6267\u884C\uFF1B\u4E0D\u540C\u7B97\u5B50\u7684\u4EFB\u52A1\uFF0C\u6709\u5148\u540E\u987A\u5E8F\u7684\u4EFB\u52A1\uFF0C\u53EF\u4EE5\u5171\u7528\u540C\u4E00\u4E2Aslot

                            image-20230407160017643

                            \u8FD9\u6837\u7684\u7ED3\u679C\u662F\uFF0C\u4E00\u4E2Aslot\u53EF\u4EE5\u4FDD\u5B58\u4F5C\u4E1A\u7684\u6574\u4E2A\u7BA1\u9053\u3002

                            \u8981\u914D\u7F6Eslot\u6570\u91CF\u548C\u5E76\u884C\u5EA6\uFF0C\u4FDD\u8BC1\u8D44\u6E90\u7684\u5145\u5206\u5229\u7528\u3002

                            \u7B2C\u516D\u7AE0 Datastream API

                            flink\u65B0\u7248\u672C\u5DF2\u7ECF\u5B9E\u73B0\u4E86\u6D41\u6279\u4E00\u4F53\uFF0CDataSet API\u5C06\u88AB\u5F03\u7528\uFF0C\u5B98\u65B9\u63A8\u8350\u7EDF\u4E00\u4F7F\u7528Datastream API\u6765\u5904\u7406\u6D41\u6570\u636E\u548C\u6279\u6570\u636E\u3002

                            Datastream\u672C\u8EAB\u662F\u4E00\u4E2Aflink\u4E2D\u7528\u6765\u8868\u793A\u6570\u636E\u96C6\u5408\u7684\u7C7B\uFF0C\u6211\u4EEC\u7F16\u5199\u7684flink\u4EE3\u7801\u5176\u5B9E\u5C31\u662F\u57FA\u4E8E\u8FD9\u79CD\u6570\u636E\u7C7B\u578B\u7684\u5904\u7406\u3002\u6211\u4EEC\u7528\u4E00\u7CFB\u5217API\u6765\u5904\u7406\u8FD9\u4E2A\u96C6\u5408\u4E2D\u7684\u6570\u636E\uFF0C\u8FD9\u5C31\u53EB\u505A\u6570\u636E\u6D41\u7684transformations\u3002

                            \u4E00\u4E2Aflink\u7A0B\u5E8F\uFF0C\u5176\u5B9E\u5C31\u662F\u5BF9Datastream\u7684\u5404\u79CD\u8F6C\u6362\uFF0C\u5177\u4F53\u6765\u8BF4\uFF0C\u4EE3\u7801\u57FA\u672C\u4E0A\u90FD\u7531\u4EE5\u4E0B\u51E0\u90E8\u5206\u6784\u6210

                            • \u83B7\u53D6\u6267\u884C\u73AF\u5883
                            • \u8BFB\u53D6\u6570\u636E\u6E90
                            • \u5B9A\u4E49\u57FA\u4E8E\u6570\u636E\u7684\u8F6C\u6362\u64CD\u4F5C
                            • \u5B9A\u4E49\u8BA1\u7B97\u7ED3\u679C\u7684\u8F93\u51FA\u4F4D\u7F6E
                            • \u89E6\u53D1\u7A0B\u5E8F\u6267\u884C

                            \u6267\u884C\u73AF\u5883

                            \u521B\u5EFA\u6267\u884C\u73AF\u5883

                            \u6700\u7B80\u5355\u7684\u65B9\u5F0F\uFF0C\u5C31\u662F\u76F4\u63A5\u8C03\u7528getExecutionEnvironment\u65B9\u6CD5\uFF0C\u5B83\u4F1A\u6839\u636E\u5F53\u524D\u8FD0\u884C\u7684\u4E0A\u4E0B\u6587\u76F4\u63A5\u5F97\u5230\u6B63\u786E\u7684\u7ED3\u679C\u3002\u5982\u679C\u7A0B\u5E8F\u662F\u72EC\u7ACB\u8FD0\u884C\u7684\uFF0C\u5C31\u8FD4\u56DE\u4E00\u4E2A\u672C\u5730\u6267\u884C\u73AF\u5883\uFF1B\u5982\u679C\u662F\u6253\u5305\u6210\u4E86jar\u5305\uFF0C\u7136\u540E\u63D0\u4EA4\u5230\u96C6\u7FA4\u6267\u884C\uFF0C\u90A3\u4E48\u5C31\u8FD4\u56DE\u96C6\u7FA4\u6267\u884C\u73AF\u5883\u3002\u4E5F\u5C31\u662F\u8BF4\u8FD9\u4E2A\u65B9\u6CD5\u4F1A\u6839\u636E\u5F53\u524D\u8FD0\u884C\u7684\u65B9\u5F0F\uFF0C\u81EA\u884C\u51B3\u5B9A\u8BE5\u8FD4\u56DE\u4EC0\u4E48\u6837\u7684\u6267\u884C\u73AF\u5883\u3002

                            \u5728\u83B7\u53D6\u5230\u6267\u884C\u73AF\u5883\u540E\uFF0C\u6211\u4EEC\u53EF\u4EE5\u5BF9\u6267\u884C\u73AF\u5883\u8FDB\u884C\u8BBE\u7F6E\uFF0C\u6BD4\u5982\u53EF\u4EE5\u8BBE\u7F6E\u5168\u5C40\u5E76\u884C\u5EA6\uFF0C\u7981\u7528\u7B97\u5B50\u94FE\u7B49\u3002

                            \u6E90\u7B97\u5B50

                            \u9996\u8981\u4EFB\u52A1\u5C31\u662F\u628A\u6570\u636E\u8BFB\u8FDB\u6765\u3002

                            \u7528\u6765\u8BFB\u53D6\u6570\u636E\u6E90\u7684\u7B97\u5B50\u5C31\u53EB\u6E90\u7B97\u5B50\u3002source\u662F\u6574\u4E2A\u5904\u7406\u7A0B\u5E8F\u7684\u8F93\u5165\u7AEF\u3002

                            flink\u4EE3\u7801\u4E2D\u901A\u7528\u7684\u6DFB\u52A0source\u7684\u65B9\u5F0F\uFF0C\u5C31\u662F\u8C03\u7528\u6267\u884C\u73AF\u5883\u7684addSource\u65B9\u6CD5

                            \u5728\u5B9E\u9645\u5DE5\u4F5C\u4E2D\uFF0C\u6211\u4EEC\u57FA\u672C\u4E0D\u4F1A\u78B0\u5230\u5F88\u7B80\u5355\u7684\u6570\u636E\u7C7B\u578B\uFF0C\u4E0D\u4F1A\u6709\u5F88\u7B80\u5355\u7684\u5E94\u7528\u9700\u6C42\u3002\u9700\u8981\u5904\u7406\u7684\u6570\u636E\u5F80\u5F80\u662F\u5177\u6709\u591A\u4E2A\u5B57\u6BB5\u7684\u6570\u636E\u7C7B\u578B\u3002\u6240\u4EE5\u6211\u4EEC\u4E00\u822C\u60C5\u51B5\u4F1A\u628A\u5904\u7406\u6570\u636E\u5305\u88C5\u6210\u5143\u7EC4\u7C7B\u578B\u6216\u8005\u8BF4POJO\u5BF9\u8C61\uFF0C\u65B9\u4FBF\u540E\u9762\u7684\u5904\u7406\u548C\u8F6C\u6362\u3002

                            \u4E3A\u4E86\u66F4\u597D\u5730\u7406\u89E3\uFF0C\u5148\u6784\u5EFA\u4E00\u4E2A\u5B9E\u9645\u5E94\u7528\u573A\u666F\uFF0C\u6BD4\u5982\u7F51\u7AD9\u7684\u8BBF\u95EE\u64CD\u4F5C\uFF0C\u53EF\u4EE5\u62BD\u8C61\u6210\u4E00\u4E2A\u4E09\u5143\u7EC4\uFF08\u7528\u6237\u540D\u3001\u7528\u6237\u8BBF\u95EE\u7684url\uFF0C\u7528\u6237\u8BBF\u95EEurl\u7684\u65F6\u95F4\u6233\uFF09\uFF0C\u6240\u4EE5\u5728\u8FD9\u91CC\uFF0C\u6211\u4EEC\u53EF\u4EE5\u521B\u5EFA\u4E00\u4E2A\u7C7BEvent\uFF0C\u5C06\u7528\u6237\u884C\u4E3A\u5305\u88C5\u6210\u4E00\u4E2A\u5BF9\u8C61\u3002\u8FD9\u4E2A\u5BF9\u8C61\u5305\u542B\u4E0A\u8FF0\u7684\u4E09\u4E2A\u5B57\u6BB5\u3002

                            \u51C6\u5907\u5DE5\u4F5C

                            1. \u51C6\u5907POJO

                              package com.atguigu.wc.pojo.diskData;
                              +import{_ as n,e as s}from"./app.f8791b52.js";var a="/study/assets/image-20230406165402400.442b2001.png",t="/study/assets/image-20230406170036021.b51cd847.png",p="/study/assets/image-20230407154008166.550f85ce.png",o="/study/assets/image-20230407160017643.c2a4b9cd.png",e="/study/assets/image-20230410105353234.a41191ce.png",c="/study/assets/image-20230410114233386.b330fc96.png",u="/study/assets/image-20230411104546144.8132c981.png",l="/study/assets/image-20230411111028715.01af8b54.png",k="/study/assets/image-20230411112932546.11a521aa.png",i="/study/assets/image-20230411113818749.15191bec.png",r="/study/assets/image-20230411115327839.8fb2dd08.png",m="/study/assets/image-20230412140212223.d41b1d3a.png";const d={},g=s('

                              Flink\u57FA\u672C\u7BC72

                              \u7B2C\u4E94\u7AE0 Flink\u8FD0\u884C\u65F6\u67B6\u6784

                              \u6982\u8FF0

                              \u901A\u5E38\uFF0C\u6211\u4EEC\u53EA\u9700\u8981\u4F7F\u7528getExecutionEnvironment()\uFF0C\u56E0\u4E3A\u8FD9\u5C06\u6839\u636E\u4E0A\u4E0B\u6587\u6267\u884C\u6B63\u786E\u7684\u64CD\u4F5C\uFF1A\u5982\u679C\u4F60\u662F\u5728IDE\u4E2D\u6267\u884C\u7A0B\u5E8F\u6216\u4F5C\u4E3A\u5E38\u89C4Java\u7A0B\u5E8F\u6267\u884C\uFF0C\u5B83\u5C06\u521B\u5EFA\u4E00\u4E2A\u672C\u5730\u73AF\u5883\uFF0C\u8BE5\u73AF\u5883\u5C06\u5728\u672C\u5730\u8BA1\u7B97\u673A\u4E0A\u6267\u884C\u60A8\u7684\u7A0B\u5E8F\u3002\u5982\u679C\u60A8\u662F\u4ECE\u7A0B\u5E8F\u521B\u5EFA\u7684JAR\u6587\u4EF6\uFF0C\u5E76\u901A\u8FC7\u547D\u4EE4\u884C\u8C03\u7528\u5B83\uFF0C\u5219Flink\u96C6\u7FA4\u7BA1\u7406\u5668\u5C06\u6267\u884C\u60A8\u7684main\u65B9\u6CD5\uFF0C\u800CgetExecutionEnvironment()\u5C06\u8FD4\u56DE\u7528\u4E8E\u5728\u96C6\u7FA4\u4E0A\u6267\u884C\u7A0B\u5E8F\u7684\u6267\u884C\u73AF\u5883\u3002

                              Task Slot\u5C31\u662F\u4EFB\u52A1\u69FD\uFF0C\u5C31\u662F\u6267\u884C\u4EFB\u52A1\u6240\u9700\u7684\u6700\u5C0F\u7684\u4E00\u5757\u8D44\u6E90\u3002

                              flink\u5BA2\u6237\u7AEF\u5E76\u4E0D\u662F\u8FD0\u884C\u65F6\u7CFB\u7EDF\u7684\u4E00\u90E8\u5206\uFF0C\u53EA\u662F\u8D77\u4E86\u4E00\u4E2A\u63D0\u4EA4\u4F5C\u4E1A\u7684\u4F5C\u7528\u3002

                              \u5BF9\u4E8E\u8FD0\u884C\u65F6\u7CFB\u7EDF\u800C\u8A00\uFF0C\u4E3B\u8981\u5C31\u7531job manager\u548Ctask manager\u7EC4\u6210\u3002

                              \u4F5C\u4E1A\u7BA1\u7406\u5668

                              \u63A7\u5236\u4E00\u4E2A\u5E94\u7528\u7A0B\u5E8F\u6267\u884C\u7684\u4E3B\u8FDB\u7A0B\uFF0C\u662FFlink\u96C6\u7FA4\u4E2D\u4EFB\u52A1\u7BA1\u7406\u548C\u8C03\u5EA6\u7684\u6838\u5FC3\u3002

                              Job master

                              \u662FJob manager\u4E2D\u6700\u6838\u5FC3\u7684\u7EC4\u4EF6\uFF0C\u4E00\u4E2Ajob \u5BF9\u5E94\u4E8E\u4E00\u4E2Ajob master\u3002

                              \u5728\u4F5C\u4E1A\u63D0\u4EA4\u65F6\uFF0CJob Master\u4F1A\u5148\u63A5\u6536\u5230\u8981\u6267\u884C\u7684\u5E94\u7528\u3002\u4E00\u822C\u662F\u7531\u5BA2\u6237\u7AEF\u63D0\u4EA4\u6765\u7684\uFF0C\u5305\u62ECjar\u5305\uFF0C\u6570\u636E\u6D41\u56FE\uFF08dataflow graph\uFF09\u548C\u4F5C\u4E1A\u56FE\uFF08job graph\uFF09\u3002

                              job master\u4F1A\u628AjobGraph\u8F6C\u6362\u6210\u4E00\u4E2A\u7269\u7406\u5C42\u9762\u7684\u6570\u636E\u6D41\u56FE\uFF0C\u8FD9\u4E2A\u56FE\u88AB\u79F0\u4E3A\u6267\u884C\u56FE\uFF0C\u5B83\u5305\u542B\u4E86\u6240\u6709\u53EF\u4EE5\u5E76\u53D1\u6267\u884C\u7684\u4EFB\u52A1\uFF0Cjob master\u4F1A\u5411\u8D44\u6E90\u7BA1\u7406\u5668\u53D1\u51FA\u8BF7\u6C42\uFF0C\u7533\u8BF7\u6267\u884C\u4EFB\u52A1\u5FC5\u8981\u7684\u8D44\u6E90\uFF0C\u4E00\u65E6\u83B7\u5F97\u4E86\u8DB3\u591F\u7684\u8D44\u6E90\uFF0C\u5C31\u4F1A\u5C06\u6267\u884C\u56FE\u5206\u53D1\u5230\u771F\u6B63\u8FD0\u884C\u4ED6\u4EEC\u7684task manager\u4E0A\u3002

                              \u8D44\u6E90\u7BA1\u7406\u5668

                              \u8D44\u6E90\u7BA1\u7406\u5668\u4E3B\u8981\u8D1F\u8D23\u8D44\u6E90\u7684\u5206\u914D\u548C\u7BA1\u7406\uFF0C\u5728flink\u96C6\u7FA4\u4E2D\u53EA\u6709\u4E00\u4E2A\u3002\u6240\u8C13\u8D44\u6E90\u5C31\u662Ftask manager\u7684\u4EFB\u52A1\u69FD\uFF0C\u4EFB\u52A1\u69FD\u5C31\u662Fflink\u96C6\u7FA4\u7684\u8D44\u6E90\u8C03\u914D\u5355\u5143\uFF0C\u5305\u542B\u4E86\u673A\u5668\u7528\u6765\u6267\u884C\u4F5C\u4E1A\u7684\u4E00\u7EC4CPU\u548C\u5185\u5B58\u8D44\u6E90\u3002\u6BCF\u4E00\u4E2A\u4EFB\u52A1task\u90FD\u9700\u8981\u5206\u914D\u5230\u4E00\u4E2Aslot\u4E0A\u6267\u884C\u3002

                              \u4EFB\u52A1\u7BA1\u7406\u5668 task manager

                              flink\u7684\u5DE5\u4F5C\u8FDB\u7A0B\uFF0C\u901A\u5E38\u5728flink\u96C6\u7FA4\u4E2D\u4F1A\u6709\u591A\u4E2Atask manager\u8FD0\u884C\uFF0C\u6BCF\u4E00\u4E2Atask manager\u90FD\u5305\u542B\u4E86\u4E00\u5B9A\u6570\u91CF\u7684slots\u3002slots\u7684\u6570\u91CF\u9650\u5236\u4E86task manager\u80FD\u591F\u5E76\u884C\u5904\u7406\u7684\u4EFB\u52A1\u6570\u91CF\u3002

                              \u4F5C\u4E1A\u63D0\u4EA4\u6D41\u7A0B

                              standalone\u6A21\u5F0F

                              image-20230406165402400

                              yarn\u4F1A\u8BDD\u6A21\u5F0F

                              task manager\u8DD1\u5728\u5BB9\u5668\u91CC

                              image-20230406170036021

                              \u601D\u8003

                              \u4E00\u4E2A\u6D41\u5904\u7406\u7A0B\u5E8F\uFF0C\u5230\u5E95\u5305\u542B\u591A\u5C11\u4E2A\u4EFB\u52A1\uFF1F

                              \u6700\u7EC8\u6267\u884C\u4EFB\u52A1\uFF0C\u9700\u8981\u5360\u7528\u591A\u5C11slot\uFF1F

                              \u6240\u6709flink\u7A0B\u5E8F\u90FD\u662F\u7531\u4E09\u90E8\u5206\u7EC4\u6210\u7684\uFF1Asource\u3001transformation\u548Csink

                              source\u8D1F\u8D23\u8BFB\u53D6\u6570\u636E\u6E90\uFF0Ctransformation\u5229\u7528\u5404\u79CD\u7B97\u5B50\u8FDB\u884C\u5904\u7406\u52A0\u5DE5\uFF0Csink\u8D1F\u8D23\u8F93\u51FA\u3002

                              \u4E00\u4E9B\u91CD\u8981\u6982\u5FF5

                              \u5E76\u884C\u5EA6

                              \u6BCF\u4E00\u4E2A\u7B97\u5B50\uFF08operator\uFF09\u53EF\u4EE5\u5305\u542B\u4E00\u4E2A\u6216\u591A\u4E2A\u5B50\u4EFB\u52A1\uFF0C\u8FD9\u4E9B\u5B50\u4EFB\u52A1\u5728\u4E0D\u540C\u7684\u7EBF\u7A0B\u3001\u4E0D\u540C\u7684\u7269\u7406\u673A\u6216\u4E0D\u540C\u7684\u5BB9\u5668\u4E2D\u5B8C\u5168\u72EC\u7ACB\u5730\u6267\u884C\uFF08\u5728\u4E0D\u540C\u7684task manager slot\u4E2D\u6267\u884C\uFF09\u3002

                              \u4E00\u4E2A\u7279\u5B9A\u7B97\u5B50\u7684\u5B50\u4EFB\u52A1\u7684\u4E2A\u6570\u88AB\u79F0\u4E4B\u4E3A\u8FD9\u4E2A\u7B97\u5B50\u7684\u5E76\u884C\u5EA6\u3002

                              \u4E00\u4E2A\u4F5C\u4E1A\u91CC\u9762\u7684\u4E0D\u540C\u7B97\u5B50\u53EF\u4EE5\u8BBE\u7F6E\u4E0D\u540C\u7684\u5E76\u884C\u5EA6\u3002\u5E76\u884C\u5EA6\u662F\u9488\u5BF9\u6BCF\u4E2A\u7279\u5B9A\u7B97\u5B50\u800C\u8A00\u7684\u3002

                              env\u4E5F\u53EF\u4EE5\u8BBE\u7F6E\u5E76\u884C\u5EA6\uFF0C\u8868\u793A\u5168\u5C40\u7684\u6240\u6709\u7B97\u5B50\u7684\u5E76\u884C\u5EA6\u3002

                              \u5982\u679C\u5728env\u8BBE\u7F6E\u4E86\u5E76\u884C\u5EA6\uFF0C\u5728\u540E\u9762\u7684\u7B97\u5B50\u5904\u53C8\u8BBE\u7F6E\u4E86\u5E76\u884C\u5EA6\uFF0C\u90A3\u4E48\u4F18\u5148\u7EA7\u662F\u7B97\u5B50\u672C\u8EAB\u7684\u5E76\u884C\u5EA6\u4F18\u5148\u7EA7\u6700\u9AD8\u3002

                              \u4F18\u5148\u7EA7\uFF1A

                              \u6BCF\u4E2A\u7B97\u5B50\u7684\u5E76\u884C\u5EA6\u8BBE\u7F6E > env\u73AF\u5883\u7684\u5E76\u884C\u5EA6\u8BBE\u7F6E > \u4F5C\u4E1A\u63D0\u4EA4\u7684\u5E76\u884C\u5EA6\u8BBE\u7F6E

                              \u4E00\u4E2A\u6D41\u5904\u7406\u7A0B\u5E8F\uFF0C\u53EF\u4EE5\u8BA4\u4E3A\u662F\u4E00\u4E2A\u4F5C\u4E1A\uFF0C\u4E00\u4E2A\u4F5C\u4E1A\u63D0\u4EA4\u540E\uFF0C\u4E0D\u7B49\u4E8E\u4E00\u4E2A\u4EFB\u52A1\uFF0C\u800C\u662F\u591A\u4E2A\u5B50\u4EFB\u52A1\uFF0C\u6BCF\u4E00\u4E2A\u4EFB\u52A1\u4F1A\u5230task manager\u7684\u4E00\u4E2Aslot\u6267\u884C\u3002\u5177\u4F53\u662F\u591A\u5C11\u5B50\u4EFB\u52A1\uFF0C\u8FD9\u53D6\u51B3\u4E8E\u5E76\u884C\u5EA6\u7684\u8BBE\u7F6E\u3002

                              \u6570\u636E\u4F20\u8F93\u5F62\u5F0F

                              One-To-One

                              stream\u7EF4\u62A4\u7740\u5206\u533A\u4EE5\u53CA\u5143\u7D20\u7684\u987A\u5E8F\uFF0C\u6BD4\u5982source\u548Cmap\u4E4B\u95F4\uFF0C\u8FD9\u610F\u5473\u7740map\u7B97\u5B50\u7684\u5B50\u4EFB\u52A1\u770B\u5230\u7684\u5143\u7D20\u7684\u4E2A\u6570\u4EE5\u53CA\u987A\u5E8F\u548Csource\u7B97\u5B50\u7684\u5B50\u4EFB\u52A1\u751F\u4EA7\u7684\u5143\u7D20\u7684\u4E2A\u6570\u3001\u987A\u5E8F\u76F8\u540C\u3002map\u3001filter\u3001flatmap\u90FD\u662FOne-To-One\u7684\u5173\u7CFB\u3002

                              \u7B97\u5B50\u94FE\u600E\u4E48\u5408\u5E76\uFF1A

                              \u524D\u540E\u53D1\u751F\u7684\u4E24\u4E2A\u7B97\u5B50\u4E4B\u95F4\u662FOne-To-One\u7684\u5173\u7CFB\uFF0C\u4E14\u7B97\u5B50\u7684\u5E76\u884C\u5EA6\u76F8\u540C\uFF0C\u90A3\u4E48\u53EF\u4EE5\u5408\u5E76\u6210\u4E00\u4E2A\u7B97\u5B50\u94FE\uFF0C\u5728\u62D3\u6251\u56FE\u4E2D\u53EF\u4EE5\u770B\u5230\u3002\u53EF\u4EE5\u8282\u7701\u5F00\u9500\u3002

                              image-20230407154008166

                              \u6267\u884C\u56FE

                              flink\u4E2D\u7684\u6267\u884C\u56FE\u53EF\u4EE5\u5206\u4E3A\u56DB\u5C42\uFF1A

                              • StreamGraph
                              • JobGraph
                              • ExecutionGraph
                              • \u7269\u7406\u6267\u884C\u56FE

                              StreamGraph\uFF1A\u662F\u6839\u636E\u7528\u6237\u901A\u8FC7Stream API\u7F16\u5199\u7684\u4EE3\u7801\u751F\u6210\u7684\u6700\u521D\u7684\u56FE\uFF0C\u7528\u6765\u8868\u793A\u7A0B\u5E8F\u7684\u62D3\u6251\u7ED3\u6784\u3002

                              JobGraph\uFF1AStreamGraph\u7ECF\u8FC7\u4F18\u5316\u540E\uFF0C\u751F\u6210\u4E86JobGraph\uFF0C\u63D0\u4EA4\u7ED9JobManager\u7684\u6570\u636E\u7ED3\u6784\uFF0C\u4E3B\u8981\u7684\u4F18\u5316\u4E3A\uFF0C\u5C06\u591A\u4E2A\u7B26\u5408\u6761\u4EF6\u7684\u8282\u70B9chain\u5728\u4E00\u8D77\u4F5C\u4E3A\u4E00\u4E2A\u8282\u70B9\uFF08\u5408\u5E76\u6210\u7B97\u5B50\u94FE\uFF09\uFF0C\u8282\u7701\u5F00\u9500\u3002

                              ExecutionGraph\uFF1AJobManager\u6839\u636EJobGraph\u751F\u6210\u7684\u56FE\uFF0CExecutionGraph\u662FJobGraph\u7684\u5E76\u884C\u5316\u7248\u672C\uFF0C\u662F\u8C03\u5EA6\u5C42\u6700\u6838\u5FC3\u7684\u6570\u636E\u7ED3\u6784\u3002

                              \u4EFB\u52A1\u548C\u4EFB\u52A1\u69FD

                              flink\u4E2D\u6BCF\u4E00\u4E2Atask manager\u90FD\u662F\u4E00\u4E2AJVM\u8FDB\u7A0B\uFF0C\u4E3A\u4E86\u63A7\u5236\u4E00\u4E2Atask manager\u80FD\u63A5\u6536\u591A\u5C11task\uFF0Ctask manager\u901A\u8FC7task slot\u6765\u8FDB\u884C\u63A7\u5236\uFF08\u4E00\u4E2Atask manager\u81F3\u5C11\u6709\u4E00\u4E2Aslot\uFF09

                              slot\u662F\u5BF9\u8D44\u6E90\u7684\u4E00\u79CD\u5212\u5206\u3002

                              slot\u7684\u9694\u79BB\u4E3B\u8981\u662F\u9488\u5BF9\u5185\u5B58\u3002

                              \u914D\u7F6Etask manager\u7684slot\u6570\u91CF\u7684\u65F6\u5019\uFF0C\u5EFA\u8BAE\u6309cpu\u7684\u6838\u5FC3\u6570\u91CF\u6765\u914D\u7F6E\uFF0C\u4E00\u4E2Aslot\u5206\u914D\u7ED9\u4E00\u4E2A\u6838\uFF0C\u8FD9\u6837CPU\u5C31\u4E0D\u7528\u5206\u65F6\u590D\u7528\u4E86\u3002

                              \u4E3A\u4EC0\u4E485\u4E2A\u4EFB\u52A1\uFF0C\u7528\u4E24\u4E2Aslot\u5C31\u8DD1\u8D77\u6765\u4E86\uFF1F

                              \u662F\u56E0\u4E3A\u5728flink\u91CC\u9762\uFF0C\u4EFB\u52A1\u4E4B\u95F4\u9ED8\u8BA4\u662F\u53EF\u4EE5\u8FDB\u884Cslot\u5171\u4EAB\u7684\u3002

                              \u540C\u4E00\u4E2A\u7B97\u5B50\u7684\u5E76\u884C\u5B50\u4EFB\u52A1\uFF0C\u5728\u4E0D\u540C\u7684slot\u6267\u884C\uFF1B\u4E0D\u540C\u7B97\u5B50\u7684\u4EFB\u52A1\uFF0C\u6709\u5148\u540E\u987A\u5E8F\u7684\u4EFB\u52A1\uFF0C\u53EF\u4EE5\u5171\u7528\u540C\u4E00\u4E2Aslot

                              image-20230407160017643

                              \u8FD9\u6837\u7684\u7ED3\u679C\u662F\uFF0C\u4E00\u4E2Aslot\u53EF\u4EE5\u4FDD\u5B58\u4F5C\u4E1A\u7684\u6574\u4E2A\u7BA1\u9053\u3002

                              \u8981\u914D\u7F6Eslot\u6570\u91CF\u548C\u5E76\u884C\u5EA6\uFF0C\u4FDD\u8BC1\u8D44\u6E90\u7684\u5145\u5206\u5229\u7528\u3002

                              \u7B2C\u516D\u7AE0 Datastream API

                              flink\u65B0\u7248\u672C\u5DF2\u7ECF\u5B9E\u73B0\u4E86\u6D41\u6279\u4E00\u4F53\uFF0CDataSet API\u5C06\u88AB\u5F03\u7528\uFF0C\u5B98\u65B9\u63A8\u8350\u7EDF\u4E00\u4F7F\u7528Datastream API\u6765\u5904\u7406\u6D41\u6570\u636E\u548C\u6279\u6570\u636E\u3002

                              Datastream\u672C\u8EAB\u662F\u4E00\u4E2Aflink\u4E2D\u7528\u6765\u8868\u793A\u6570\u636E\u96C6\u5408\u7684\u7C7B\uFF0C\u6211\u4EEC\u7F16\u5199\u7684flink\u4EE3\u7801\u5176\u5B9E\u5C31\u662F\u57FA\u4E8E\u8FD9\u79CD\u6570\u636E\u7C7B\u578B\u7684\u5904\u7406\u3002\u6211\u4EEC\u7528\u4E00\u7CFB\u5217API\u6765\u5904\u7406\u8FD9\u4E2A\u96C6\u5408\u4E2D\u7684\u6570\u636E\uFF0C\u8FD9\u5C31\u53EB\u505A\u6570\u636E\u6D41\u7684transformations\u3002

                              \u4E00\u4E2Aflink\u7A0B\u5E8F\uFF0C\u5176\u5B9E\u5C31\u662F\u5BF9Datastream\u7684\u5404\u79CD\u8F6C\u6362\uFF0C\u5177\u4F53\u6765\u8BF4\uFF0C\u4EE3\u7801\u57FA\u672C\u4E0A\u90FD\u7531\u4EE5\u4E0B\u51E0\u90E8\u5206\u6784\u6210

                              • \u83B7\u53D6\u6267\u884C\u73AF\u5883
                              • \u8BFB\u53D6\u6570\u636E\u6E90
                              • \u5B9A\u4E49\u57FA\u4E8E\u6570\u636E\u7684\u8F6C\u6362\u64CD\u4F5C
                              • \u5B9A\u4E49\u8BA1\u7B97\u7ED3\u679C\u7684\u8F93\u51FA\u4F4D\u7F6E
                              • \u89E6\u53D1\u7A0B\u5E8F\u6267\u884C

                              \u6267\u884C\u73AF\u5883

                              \u521B\u5EFA\u6267\u884C\u73AF\u5883

                              \u6700\u7B80\u5355\u7684\u65B9\u5F0F\uFF0C\u5C31\u662F\u76F4\u63A5\u8C03\u7528getExecutionEnvironment\u65B9\u6CD5\uFF0C\u5B83\u4F1A\u6839\u636E\u5F53\u524D\u8FD0\u884C\u7684\u4E0A\u4E0B\u6587\u76F4\u63A5\u5F97\u5230\u6B63\u786E\u7684\u7ED3\u679C\u3002\u5982\u679C\u7A0B\u5E8F\u662F\u72EC\u7ACB\u8FD0\u884C\u7684\uFF0C\u5C31\u8FD4\u56DE\u4E00\u4E2A\u672C\u5730\u6267\u884C\u73AF\u5883\uFF1B\u5982\u679C\u662F\u6253\u5305\u6210\u4E86jar\u5305\uFF0C\u7136\u540E\u63D0\u4EA4\u5230\u96C6\u7FA4\u6267\u884C\uFF0C\u90A3\u4E48\u5C31\u8FD4\u56DE\u96C6\u7FA4\u6267\u884C\u73AF\u5883\u3002\u4E5F\u5C31\u662F\u8BF4\u8FD9\u4E2A\u65B9\u6CD5\u4F1A\u6839\u636E\u5F53\u524D\u8FD0\u884C\u7684\u65B9\u5F0F\uFF0C\u81EA\u884C\u51B3\u5B9A\u8BE5\u8FD4\u56DE\u4EC0\u4E48\u6837\u7684\u6267\u884C\u73AF\u5883\u3002

                              \u5728\u83B7\u53D6\u5230\u6267\u884C\u73AF\u5883\u540E\uFF0C\u6211\u4EEC\u53EF\u4EE5\u5BF9\u6267\u884C\u73AF\u5883\u8FDB\u884C\u8BBE\u7F6E\uFF0C\u6BD4\u5982\u53EF\u4EE5\u8BBE\u7F6E\u5168\u5C40\u5E76\u884C\u5EA6\uFF0C\u7981\u7528\u7B97\u5B50\u94FE\u7B49\u3002

                              \u6E90\u7B97\u5B50

                              \u9996\u8981\u4EFB\u52A1\u5C31\u662F\u628A\u6570\u636E\u8BFB\u8FDB\u6765\u3002

                              \u7528\u6765\u8BFB\u53D6\u6570\u636E\u6E90\u7684\u7B97\u5B50\u5C31\u53EB\u6E90\u7B97\u5B50\u3002source\u662F\u6574\u4E2A\u5904\u7406\u7A0B\u5E8F\u7684\u8F93\u5165\u7AEF\u3002

                              flink\u4EE3\u7801\u4E2D\u901A\u7528\u7684\u6DFB\u52A0source\u7684\u65B9\u5F0F\uFF0C\u5C31\u662F\u8C03\u7528\u6267\u884C\u73AF\u5883\u7684addSource\u65B9\u6CD5

                              \u5728\u5B9E\u9645\u5DE5\u4F5C\u4E2D\uFF0C\u6211\u4EEC\u57FA\u672C\u4E0D\u4F1A\u78B0\u5230\u5F88\u7B80\u5355\u7684\u6570\u636E\u7C7B\u578B\uFF0C\u4E0D\u4F1A\u6709\u5F88\u7B80\u5355\u7684\u5E94\u7528\u9700\u6C42\u3002\u9700\u8981\u5904\u7406\u7684\u6570\u636E\u5F80\u5F80\u662F\u5177\u6709\u591A\u4E2A\u5B57\u6BB5\u7684\u6570\u636E\u7C7B\u578B\u3002\u6240\u4EE5\u6211\u4EEC\u4E00\u822C\u60C5\u51B5\u4F1A\u628A\u5904\u7406\u6570\u636E\u5305\u88C5\u6210\u5143\u7EC4\u7C7B\u578B\u6216\u8005\u8BF4POJO\u5BF9\u8C61\uFF0C\u65B9\u4FBF\u540E\u9762\u7684\u5904\u7406\u548C\u8F6C\u6362\u3002

                              \u4E3A\u4E86\u66F4\u597D\u5730\u7406\u89E3\uFF0C\u5148\u6784\u5EFA\u4E00\u4E2A\u5B9E\u9645\u5E94\u7528\u573A\u666F\uFF0C\u6BD4\u5982\u7F51\u7AD9\u7684\u8BBF\u95EE\u64CD\u4F5C\uFF0C\u53EF\u4EE5\u62BD\u8C61\u6210\u4E00\u4E2A\u4E09\u5143\u7EC4\uFF08\u7528\u6237\u540D\u3001\u7528\u6237\u8BBF\u95EE\u7684url\uFF0C\u7528\u6237\u8BBF\u95EEurl\u7684\u65F6\u95F4\u6233\uFF09\uFF0C\u6240\u4EE5\u5728\u8FD9\u91CC\uFF0C\u6211\u4EEC\u53EF\u4EE5\u521B\u5EFA\u4E00\u4E2A\u7C7BEvent\uFF0C\u5C06\u7528\u6237\u884C\u4E3A\u5305\u88C5\u6210\u4E00\u4E2A\u5BF9\u8C61\u3002\u8FD9\u4E2A\u5BF9\u8C61\u5305\u542B\u4E0A\u8FF0\u7684\u4E09\u4E2A\u5B57\u6BB5\u3002

                              \u51C6\u5907\u5DE5\u4F5C

                              1. \u51C6\u5907POJO

                                package com.atguigu.wc.pojo.diskData;
                                 
                                 import java.sql.Timestamp;
                                 
                                diff --git a/assets/gin.html.bedf9bde.js b/assets/gin.html.9aeae20f.js
                                similarity index 99%
                                rename from assets/gin.html.bedf9bde.js
                                rename to assets/gin.html.9aeae20f.js
                                index e457ecec..9a252e68 100644
                                --- a/assets/gin.html.bedf9bde.js
                                +++ b/assets/gin.html.9aeae20f.js
                                @@ -1,4 +1,4 @@
                                -import{_ as n,e as s}from"./app.0d029894.js";var a="/study/assets/image-20220811114543114.9f1a901b.png",t="/study/assets/image-20220811141525168.aa5c4c77.png",p="/study/assets/image-20221102153108540.ede7329d.png",o="/study/assets/image-20221102153246434.acd7873a.png",c="/study/assets/image-20221102154809124.4ccaf7dd.png",e="/study/assets/image-20221102154102149.6c8d17d8.png",u="/study/assets/image-20220811142211372.6411baf1.png";const l={},i=s(`

                                Gin

                                \u4E00\u3001Hello World

                                • \u521B\u5EFA\u4E00\u4E2A\u9ED8\u8BA4\u7684\u8DEF\u7531\u5F15\u64CE
                                • \u914D\u7F6E\u8DEF\u7531\uFF0C\u901A\u8FC7\u56DE\u8C03\u51FD\u6570\u5904\u7406\u8BF7\u6C42
                                • \u542F\u52A8web\u670D\u52A1
                                func main() {
                                +import{_ as n,e as s}from"./app.f8791b52.js";var a="/study/assets/image-20220811114543114.9f1a901b.png",t="/study/assets/image-20220811141525168.aa5c4c77.png",p="/study/assets/image-20221102153108540.ede7329d.png",o="/study/assets/image-20221102153246434.acd7873a.png",c="/study/assets/image-20221102154809124.4ccaf7dd.png",e="/study/assets/image-20221102154102149.6c8d17d8.png",u="/study/assets/image-20220811142211372.6411baf1.png";const l={},i=s(`

                                Gin

                                \u4E00\u3001Hello World

                                • \u521B\u5EFA\u4E00\u4E2A\u9ED8\u8BA4\u7684\u8DEF\u7531\u5F15\u64CE
                                • \u914D\u7F6E\u8DEF\u7531\uFF0C\u901A\u8FC7\u56DE\u8C03\u51FD\u6570\u5904\u7406\u8BF7\u6C42
                                • \u542F\u52A8web\u670D\u52A1
                                func main() {
                                 	// \u521B\u5EFA\u4E00\u4E2A\u9ED8\u8BA4\u7684\u8DEF\u7531\u5F15\u64CE
                                 	r := gin.Default()
                                 	// \u914D\u7F6E\u8DEF\u7531
                                diff --git a/assets/gin.html.d26ee634.js b/assets/gin.html.a49721b6.js
                                similarity index 96%
                                rename from assets/gin.html.d26ee634.js
                                rename to assets/gin.html.a49721b6.js
                                index 78f3e0f0..f8c5e98a 100644
                                --- a/assets/gin.html.d26ee634.js
                                +++ b/assets/gin.html.a49721b6.js
                                @@ -1 +1 @@
                                -const l={key:"v-4f8f811e",path:"/go/gin/gin.html",title:"Gin",lang:"zh-CN",frontmatter:{},excerpt:"",headers:[{level:2,title:"\u4E00\u3001Hello World",slug:"\u4E00\u3001hello-world",children:[]},{level:2,title:"\u4E8C\u3001\u8FD4\u56DE\u54CD\u5E94\u7C7B\u578B",slug:"\u4E8C\u3001\u8FD4\u56DE\u54CD\u5E94\u7C7B\u578B",children:[{level:3,title:"\u62FC\u63A5JSON",slug:"\u62FC\u63A5json",children:[]},{level:3,title:"\u7ED3\u6784\u4F53",slug:"\u7ED3\u6784\u4F53",children:[]}]},{level:2,title:"\u4E09\u3001\u63A5\u6536\u53C2\u6570",slug:"\u4E09\u3001\u63A5\u6536\u53C2\u6570",children:[{level:3,title:"\u63A5\u6536querystring\u53C2\u6570",slug:"\u63A5\u6536querystring\u53C2\u6570",children:[]},{level:3,title:"\u63A5\u6536\u8868\u5355\u53C2\u6570",slug:"\u63A5\u6536\u8868\u5355\u53C2\u6570",children:[]},{level:3,title:"\u83B7\u53D6Path\u53C2\u6570",slug:"\u83B7\u53D6path\u53C2\u6570",children:[]},{level:3,title:"\u53C2\u6570\u7ED1\u5B9A",slug:"\u53C2\u6570\u7ED1\u5B9A",children:[]}]},{level:2,title:"\u56DB\u3001\u8DEF\u7531\u53CA\u63A7\u5236\u5668",slug:"\u56DB\u3001\u8DEF\u7531\u53CA\u63A7\u5236\u5668",children:[]},{level:2,title:"\u4E94\u3001\u4E2D\u95F4\u4EF6",slug:"\u4E94\u3001\u4E2D\u95F4\u4EF6",children:[{level:3,title:"\u7B80\u4ECB",slug:"\u7B80\u4ECB",children:[]},{level:3,title:"\u5B9A\u4E49",slug:"\u5B9A\u4E49",children:[]},{level:3,title:"\u6CE8\u518C",slug:"\u6CE8\u518C",children:[]},{level:3,title:"\u5E94\u7528",slug:"\u5E94\u7528",children:[]},{level:3,title:"\u6CE8\u610F",slug:"\u6CE8\u610F",children:[]}]},{level:2,title:"\u516D\u3001Model",slug:"\u516D\u3001model",children:[{level:3,title:"\u6982\u8FF0",slug:"\u6982\u8FF0",children:[]}]}],git:{updatedTime:1710173765e3,contributors:[{name:"shailene",email:"64005626+shaileneF@users.noreply.github.com",commits:1}]},filePathRelative:"go/gin/gin.md"};export{l as data};
                                +const l={key:"v-4f8f811e",path:"/go/gin/gin.html",title:"Gin",lang:"zh-CN",frontmatter:{},excerpt:"",headers:[{level:2,title:"\u4E00\u3001Hello World",slug:"\u4E00\u3001hello-world",children:[]},{level:2,title:"\u4E8C\u3001\u8FD4\u56DE\u54CD\u5E94\u7C7B\u578B",slug:"\u4E8C\u3001\u8FD4\u56DE\u54CD\u5E94\u7C7B\u578B",children:[{level:3,title:"\u62FC\u63A5JSON",slug:"\u62FC\u63A5json",children:[]},{level:3,title:"\u7ED3\u6784\u4F53",slug:"\u7ED3\u6784\u4F53",children:[]}]},{level:2,title:"\u4E09\u3001\u63A5\u6536\u53C2\u6570",slug:"\u4E09\u3001\u63A5\u6536\u53C2\u6570",children:[{level:3,title:"\u63A5\u6536querystring\u53C2\u6570",slug:"\u63A5\u6536querystring\u53C2\u6570",children:[]},{level:3,title:"\u63A5\u6536\u8868\u5355\u53C2\u6570",slug:"\u63A5\u6536\u8868\u5355\u53C2\u6570",children:[]},{level:3,title:"\u83B7\u53D6Path\u53C2\u6570",slug:"\u83B7\u53D6path\u53C2\u6570",children:[]},{level:3,title:"\u53C2\u6570\u7ED1\u5B9A",slug:"\u53C2\u6570\u7ED1\u5B9A",children:[]}]},{level:2,title:"\u56DB\u3001\u8DEF\u7531\u53CA\u63A7\u5236\u5668",slug:"\u56DB\u3001\u8DEF\u7531\u53CA\u63A7\u5236\u5668",children:[]},{level:2,title:"\u4E94\u3001\u4E2D\u95F4\u4EF6",slug:"\u4E94\u3001\u4E2D\u95F4\u4EF6",children:[{level:3,title:"\u7B80\u4ECB",slug:"\u7B80\u4ECB",children:[]},{level:3,title:"\u5B9A\u4E49",slug:"\u5B9A\u4E49",children:[]},{level:3,title:"\u6CE8\u518C",slug:"\u6CE8\u518C",children:[]},{level:3,title:"\u5E94\u7528",slug:"\u5E94\u7528",children:[]},{level:3,title:"\u6CE8\u610F",slug:"\u6CE8\u610F",children:[]}]},{level:2,title:"\u516D\u3001Model",slug:"\u516D\u3001model",children:[{level:3,title:"\u6982\u8FF0",slug:"\u6982\u8FF0",children:[]}]}],git:{updatedTime:1710173784e3,contributors:[{name:"shailene",email:"64005626+shaileneF@users.noreply.github.com",commits:1}]},filePathRelative:"go/gin/gin.md"};export{l as data};
                                diff --git a/assets/golang.html.dbe7738b.js b/assets/golang.html.27b9c935.js
                                similarity index 99%
                                rename from assets/golang.html.dbe7738b.js
                                rename to assets/golang.html.27b9c935.js
                                index 85f01f22..39bcdb7d 100644
                                --- a/assets/golang.html.dbe7738b.js
                                +++ b/assets/golang.html.27b9c935.js
                                @@ -1,4 +1,4 @@
                                -import{_ as n,e as a}from"./app.0d029894.js";var s="/study/assets/image-20220727101615334.c1facbc1.png",p="/study/assets/image-20220727105416076.3cd6dda2.png",t="/study/assets/image-20220727110325089.80e1c395.png",o="/study/assets/image-20220727110613817.9a648b3d.png",e="/study/assets/image-20220727112542873.cf4f45f9.png",l="/study/assets/image-20220727125745938.3946e194.png",c="/study/assets/image-20220727130045041.2b32c0cc.png",i="/study/assets/image-20220727130159380.581d22d6.png",u="/study/assets/image-20220727130805936.d98638cb.png",r="/study/assets/image-20220727145125068.3d982f8d.png",k="/study/assets/image-20220805114256574.524e93a1.png",g="/study/assets/image-20220805114736596.57e9620e.png",d="/study/assets/image-20220805115145009.7adfe623.png",m="/study/assets/image-20220805115739642.ca86a6c3.png",h="/study/assets/image-20220805154323775.490b1b0c.png";const f={},v=a(`

                                go

                                \u6982\u8FF0

                                1. go\u80FD\u591F\u66F4\u597D\u5730\u652F\u6301\u5E76\u53D1\u7F16\u7A0B\u3002

                                2. go\u8BED\u8A00\u7F16\u8BD1\u5FEB\u3001\u6267\u884C\u5FEB\u3001\u6613\u4E8E\u5F00\u53D1\uFF0C\u5177\u6709\u4E00\u90E8\u5206\u52A8\u6001\u8BED\u8A00\u7684\u7279\u6027\uFF0C\u540C\u65F6\u662F\u9762\u5411\u5BF9\u8C61\u7684\u8BED\u8A00\uFF0C\u5F88\u5BB9\u6613\u4E0A\u624B\u3002

                                  Java\u7F16\u8BD1\u5FEB\uFF0C\u6267\u884C\u901F\u5EA6\u4E00\u822C\u3002

                                  python\u8FD9\u79CD\u52A8\u6001\u8BED\u8A00\u867D\u7136\u5FEB\u901F\u7F16\u8BD1\uFF0C\u4F46\u662F\u6267\u884C\u901F\u5EA6\u4E00\u822C\u3002

                                  \u7F16\u8BD1\u901F\u5EA6\u6267\u884C\u901F\u5EA6
                                  Java\u4E00\u822C\u4E00\u822C
                                  python\u5FEB\u6162
                                  c++\u6162\u5FEB
                                  go\u5FEB\u5FEB

                                  \u52A8\u6001\u8BED\u8A00\u7F16\u8BD1\u901F\u5EA6\u5FEB\uFF0C\u6B63\u662F\u56E0\u4E3A\u7B80\u5355\uFF0C\u7F16\u5199\u7B80\u5355\uFF0C\u7F16\u8BD1\u5FEB\uFF0C\u4F46\u662F\u6267\u884C\u5C31\u6162\uFF0C\u56E0\u4E3A\u79BB\u5E95\u5C42\u8FDC\uFF0C\u9700\u8981\u7FFB\u8BD1\u6210\u53EF\u6267\u884C\u7684\u673A\u5668\u7801\u7684\u65F6\u95F4\u5C31\u957F\uFF0C\u53EF\u4EE5\u8FD9\u4E48\u7406\u89E3\u3002

                                  Java\u662F\u534A\u7F16\u8BD1\u534A\u89E3\u91CA\u578B\u8BED\u8A00\uFF0C\u4E3A\u4E86\u4FDD\u8BC1\u6267\u884C\u6548\u7387\u548C\u54CD\u5E94\u901F\u5EA6\u3002

                                  \u52A8\u6001\u8BED\u8A00\u548C\u811A\u672C\u8BED\u8A00\u7F16\u8BD1\u901F\u5EA6\u5FEB

                                3. \u5982\u679Cmain\u5305\u7684\u6E90\u4EE3\u7801\u6CA1\u6709\u5305\u542Bmain\u51FD\u6570\uFF0C\u5219\u4F1A\u5F15\u53D1\u6784\u5EFA\u9519\u8BEF\u3002

                                byte short int long float double char boolean String
                                +import{_ as n,e as a}from"./app.f8791b52.js";var s="/study/assets/image-20220727101615334.c1facbc1.png",p="/study/assets/image-20220727105416076.3cd6dda2.png",t="/study/assets/image-20220727110325089.80e1c395.png",o="/study/assets/image-20220727110613817.9a648b3d.png",e="/study/assets/image-20220727112542873.cf4f45f9.png",l="/study/assets/image-20220727125745938.3946e194.png",c="/study/assets/image-20220727130045041.2b32c0cc.png",i="/study/assets/image-20220727130159380.581d22d6.png",u="/study/assets/image-20220727130805936.d98638cb.png",r="/study/assets/image-20220727145125068.3d982f8d.png",k="/study/assets/image-20220805114256574.524e93a1.png",g="/study/assets/image-20220805114736596.57e9620e.png",d="/study/assets/image-20220805115145009.7adfe623.png",m="/study/assets/image-20220805115739642.ca86a6c3.png",h="/study/assets/image-20220805154323775.490b1b0c.png";const f={},v=a(`

                                go

                                \u6982\u8FF0

                                1. go\u80FD\u591F\u66F4\u597D\u5730\u652F\u6301\u5E76\u53D1\u7F16\u7A0B\u3002

                                2. go\u8BED\u8A00\u7F16\u8BD1\u5FEB\u3001\u6267\u884C\u5FEB\u3001\u6613\u4E8E\u5F00\u53D1\uFF0C\u5177\u6709\u4E00\u90E8\u5206\u52A8\u6001\u8BED\u8A00\u7684\u7279\u6027\uFF0C\u540C\u65F6\u662F\u9762\u5411\u5BF9\u8C61\u7684\u8BED\u8A00\uFF0C\u5F88\u5BB9\u6613\u4E0A\u624B\u3002

                                  Java\u7F16\u8BD1\u5FEB\uFF0C\u6267\u884C\u901F\u5EA6\u4E00\u822C\u3002

                                  python\u8FD9\u79CD\u52A8\u6001\u8BED\u8A00\u867D\u7136\u5FEB\u901F\u7F16\u8BD1\uFF0C\u4F46\u662F\u6267\u884C\u901F\u5EA6\u4E00\u822C\u3002

                                  \u7F16\u8BD1\u901F\u5EA6\u6267\u884C\u901F\u5EA6
                                  Java\u4E00\u822C\u4E00\u822C
                                  python\u5FEB\u6162
                                  c++\u6162\u5FEB
                                  go\u5FEB\u5FEB

                                  \u52A8\u6001\u8BED\u8A00\u7F16\u8BD1\u901F\u5EA6\u5FEB\uFF0C\u6B63\u662F\u56E0\u4E3A\u7B80\u5355\uFF0C\u7F16\u5199\u7B80\u5355\uFF0C\u7F16\u8BD1\u5FEB\uFF0C\u4F46\u662F\u6267\u884C\u5C31\u6162\uFF0C\u56E0\u4E3A\u79BB\u5E95\u5C42\u8FDC\uFF0C\u9700\u8981\u7FFB\u8BD1\u6210\u53EF\u6267\u884C\u7684\u673A\u5668\u7801\u7684\u65F6\u95F4\u5C31\u957F\uFF0C\u53EF\u4EE5\u8FD9\u4E48\u7406\u89E3\u3002

                                  Java\u662F\u534A\u7F16\u8BD1\u534A\u89E3\u91CA\u578B\u8BED\u8A00\uFF0C\u4E3A\u4E86\u4FDD\u8BC1\u6267\u884C\u6548\u7387\u548C\u54CD\u5E94\u901F\u5EA6\u3002

                                  \u52A8\u6001\u8BED\u8A00\u548C\u811A\u672C\u8BED\u8A00\u7F16\u8BD1\u901F\u5EA6\u5FEB

                                3. \u5982\u679Cmain\u5305\u7684\u6E90\u4EE3\u7801\u6CA1\u6709\u5305\u542Bmain\u51FD\u6570\uFF0C\u5219\u4F1A\u5F15\u53D1\u6784\u5EFA\u9519\u8BEF\u3002

                                byte short int long float double char boolean String
                                     
                                 

                                JVM\u91CC\uFF0C\u4E00\u4E2A\u6808\u5E27\u5BF9\u5E94\u7740\u4E00\u4E2A\u65B9\u6CD5\u8C03\u7528\u3002

                                1. \u6307\u9488 = \u5F15\u7528 = \u5185\u5B58\u5730\u5740

                                2. \u60F3\u8981\u4FEE\u6539\u5207\u7247\u6216\u8005\u6570\u7EC4\u91CC\u9762\u7684\u503C\uFF0C\u8981\u901A\u8FC7\u4E0B\u6807\u5373\u7D22\u5F15\u6765\u4FEE\u6539\uFF0C\u901A\u8FC7for range\u5FAA\u73AF\u3002

                                  \u4E0D\u8981\u901A\u8FC7for range\u5FAA\u73AF\u7684\u7B2C\u4E8C\u4E2A\u503Cvalue\u6765\u8FDB\u884C\u4FEE\u6539\uFF0C\u8FD9\u4E2Avalue\u53EA\u662F\u62F7\u8D1D\uFF0C\u662F\u4FEE\u6539\u4E0D\u4E86\u6570\u7EC4\u6216\u8005\u5207\u7247\u91CC\u7684\u503C\u7684\u3002

                                3. \u5207\u7247\u662F\u5F15\u7528\u7C7B\u578B\uFF0C\u5207\u7247\u7684\u5E95\u5C42\u6307\u5411\u4E00\u4E2A\u6570\u7EC4\u3002

                                4. func main() {
                                   
                                  diff --git a/assets/golang.html.c9f1a9cc.js b/assets/golang.html.cd5a0b46.js
                                  similarity index 95%
                                  rename from assets/golang.html.c9f1a9cc.js
                                  rename to assets/golang.html.cd5a0b46.js
                                  index 9beab0a3..5a60eeaf 100644
                                  --- a/assets/golang.html.c9f1a9cc.js
                                  +++ b/assets/golang.html.cd5a0b46.js
                                  @@ -1 +1 @@
                                  -const l={key:"v-2ea03d90",path:"/go/golang/golang.html",title:"go",lang:"zh-CN",frontmatter:{},excerpt:"",headers:[{level:2,title:"\u6982\u8FF0",slug:"\u6982\u8FF0",children:[]},{level:2,title:"golang\u8BED\u8A00\u7279\u6027",slug:"golang\u8BED\u8A00\u7279\u6027",children:[]},{level:2,title:"golang\u8BED\u6CD5",slug:"golang\u8BED\u6CD5",children:[{level:3,title:"\u57FA\u7840\u8BED\u6CD5",slug:"\u57FA\u7840\u8BED\u6CD5",children:[]},{level:3,title:"\u6570\u7EC4\u53CA\u5207\u7247",slug:"\u6570\u7EC4\u53CA\u5207\u7247",children:[]},{level:3,title:"map",slug:"map",children:[]},{level:3,title:"\u7ED3\u6784\u4F53struct",slug:"\u7ED3\u6784\u4F53struct",children:[]},{level:3,title:"\u53CD\u5C04",slug:"\u53CD\u5C04",children:[]},{level:3,title:"json\u548C\u7ED3\u6784\u4F53\u7684\u8F6C\u6362",slug:"json\u548C\u7ED3\u6784\u4F53\u7684\u8F6C\u6362",children:[]}]},{level:2,title:"golang\u9AD8\u9636",slug:"golang\u9AD8\u9636",children:[{level:3,title:"goroutine",slug:"goroutine",children:[]},{level:3,title:"channel",slug:"channel",children:[]}]},{level:2,title:"go modules\u6A21\u5757\u7BA1\u7406",slug:"go-modules\u6A21\u5757\u7BA1\u7406",children:[{level:3,title:"\u4EC0\u4E48\u662Fgo modules",slug:"\u4EC0\u4E48\u662Fgo-modules",children:[]}]}],git:{updatedTime:1710173765e3,contributors:[{name:"shailene",email:"64005626+shaileneF@users.noreply.github.com",commits:1}]},filePathRelative:"go/golang/golang.md"};export{l as data};
                                  +const l={key:"v-2ea03d90",path:"/go/golang/golang.html",title:"go",lang:"zh-CN",frontmatter:{},excerpt:"",headers:[{level:2,title:"\u6982\u8FF0",slug:"\u6982\u8FF0",children:[]},{level:2,title:"golang\u8BED\u8A00\u7279\u6027",slug:"golang\u8BED\u8A00\u7279\u6027",children:[]},{level:2,title:"golang\u8BED\u6CD5",slug:"golang\u8BED\u6CD5",children:[{level:3,title:"\u57FA\u7840\u8BED\u6CD5",slug:"\u57FA\u7840\u8BED\u6CD5",children:[]},{level:3,title:"\u6570\u7EC4\u53CA\u5207\u7247",slug:"\u6570\u7EC4\u53CA\u5207\u7247",children:[]},{level:3,title:"map",slug:"map",children:[]},{level:3,title:"\u7ED3\u6784\u4F53struct",slug:"\u7ED3\u6784\u4F53struct",children:[]},{level:3,title:"\u53CD\u5C04",slug:"\u53CD\u5C04",children:[]},{level:3,title:"json\u548C\u7ED3\u6784\u4F53\u7684\u8F6C\u6362",slug:"json\u548C\u7ED3\u6784\u4F53\u7684\u8F6C\u6362",children:[]}]},{level:2,title:"golang\u9AD8\u9636",slug:"golang\u9AD8\u9636",children:[{level:3,title:"goroutine",slug:"goroutine",children:[]},{level:3,title:"channel",slug:"channel",children:[]}]},{level:2,title:"go modules\u6A21\u5757\u7BA1\u7406",slug:"go-modules\u6A21\u5757\u7BA1\u7406",children:[{level:3,title:"\u4EC0\u4E48\u662Fgo modules",slug:"\u4EC0\u4E48\u662Fgo-modules",children:[]}]}],git:{updatedTime:1710173784e3,contributors:[{name:"shailene",email:"64005626+shaileneF@users.noreply.github.com",commits:1}]},filePathRelative:"go/golang/golang.md"};export{l as data};
                                  diff --git a/assets/gorm.html.5c4f6234.js b/assets/gorm.html.e4710022.js
                                  similarity index 98%
                                  rename from assets/gorm.html.5c4f6234.js
                                  rename to assets/gorm.html.e4710022.js
                                  index 46418543..fcf4e098 100644
                                  --- a/assets/gorm.html.5c4f6234.js
                                  +++ b/assets/gorm.html.e4710022.js
                                  @@ -1 +1 @@
                                  -const l={key:"v-500ab9d8",path:"/go/gorm/gorm.html",title:"gorm",lang:"zh-CN",frontmatter:{},excerpt:"",headers:[{level:2,title:"1. \u6982\u8FF0",slug:"_1-\u6982\u8FF0",children:[]},{level:2,title:"2. \u6570\u636E\u5E93\u8FDE\u63A5\u3001\u5EFA\u8868",slug:"_2-\u6570\u636E\u5E93\u8FDE\u63A5\u3001\u5EFA\u8868",children:[{level:3,title:"2.1 \u8FDE\u63A5",slug:"_2-1-\u8FDE\u63A5",children:[]},{level:3,title:"2.2 \u8868\u7684\u64CD\u4F5C",slug:"_2-2-\u8868\u7684\u64CD\u4F5C",children:[]}]},{level:2,title:"3. \u6A21\u578B\u5EFA\u7ACB",slug:"_3-\u6A21\u578B\u5EFA\u7ACB",children:[{level:3,title:"3.1 \u6982\u5FF5",slug:"_3-1-\u6982\u5FF5",children:[]},{level:3,title:"3.2 \u5B9A\u4E49",slug:"_3-2-\u5B9A\u4E49",children:[]},{level:3,title:"3.3 \u7EA6\u5B9A",slug:"_3-3-\u7EA6\u5B9A",children:[]},{level:3,title:"3.4 \u65F6\u95F4\u6233\u8DDF\u8E2A",slug:"_3-4-\u65F6\u95F4\u6233\u8DDF\u8E2A",children:[]},{level:3,title:"3.5 \u9ED8\u8BA4\u503C",slug:"_3-5-\u9ED8\u8BA4\u503C",children:[]}]},{level:2,title:"4. \u589E\u5220\u6539\u67E5",slug:"_4-\u589E\u5220\u6539\u67E5",children:[{level:3,title:"4.1 \u521B\u5EFA\u8868",slug:"_4-1-\u521B\u5EFA\u8868",children:[]},{level:3,title:"4.2 \u63D2\u5165\u6570\u636E",slug:"_4-2-\u63D2\u5165\u6570\u636E",children:[{level:4,title:"4.2.1 \u5355\u72EC\u521B\u5EFA",slug:"_4-2-1-\u5355\u72EC\u521B\u5EFA",children:[]},{level:4,title:"4.2.2 \u6307\u5B9A\u5B57\u6BB5\u521B\u5EFA",slug:"_4-2-2-\u6307\u5B9A\u5B57\u6BB5\u521B\u5EFA",children:[]},{level:4,title:"4.2.3 \u8DF3\u8FC7\u5B57\u6BB5\u521B\u5EFA",slug:"_4-2-3-\u8DF3\u8FC7\u5B57\u6BB5\u521B\u5EFA",children:[]},{level:4,title:"4.2.4 \u6279\u91CF\u521B\u5EFA",slug:"_4-2-4-\u6279\u91CF\u521B\u5EFA",children:[]}]},{level:3,title:"4.3 \u67E5\u8BE2\u6570\u636E",slug:"_4-3-\u67E5\u8BE2\u6570\u636E",children:[{level:4,title:"4.3.1 \u63A5\u6536\u8FD4\u56DE\u503C\u7684\u5F62\u5F0F",slug:"_4-3-1-\u63A5\u6536\u8FD4\u56DE\u503C\u7684\u5F62\u5F0F",children:[]},{level:4,title:"4.3.2 \u67E5\u8BE2\u4E3B\u952E\u6392\u5E8F\u540E\u7684\u7B2C\u4E00\u6761",slug:"_4-3-2-\u67E5\u8BE2\u4E3B\u952E\u6392\u5E8F\u540E\u7684\u7B2C\u4E00\u6761",children:[]},{level:4,title:"4.3.3 \u67E5\u8BE2\u4E00\u6761\u8BB0\u5F55\uFF08\u4E0D\u63A8\u8350\uFF09",slug:"_4-3-3-\u67E5\u8BE2\u4E00\u6761\u8BB0\u5F55-\u4E0D\u63A8\u8350",children:[]},{level:4,title:"4.3.4 \u67E5\u8BE2\u4E3B\u952E\u6392\u5E8F\u540E\u7684\u6700\u540E\u4E00\u6761",slug:"_4-3-4-\u67E5\u8BE2\u4E3B\u952E\u6392\u5E8F\u540E\u7684\u6700\u540E\u4E00\u6761",children:[]},{level:4,title:"4.3.5 \u67E5\u8BE2\u6240\u6709\u7684\u8BB0\u5F55",slug:"_4-3-5-\u67E5\u8BE2\u6240\u6709\u7684\u8BB0\u5F55",children:[]},{level:4,title:"4.3.6 \u67E5\u8BE2\u6761\u4EF6",slug:"_4-3-6-\u67E5\u8BE2\u6761\u4EF6",children:[]},{level:4,title:"4.3.7 \u67E5\u8BE2\u591A\u6761\u6570\u636E",slug:"_4-3-7-\u67E5\u8BE2\u591A\u6761\u6570\u636E",children:[]},{level:4,title:"4.3.8 \u667A\u80FD\u9009\u62E9\u5B57\u6BB5",slug:"_4-3-8-\u667A\u80FD\u9009\u62E9\u5B57\u6BB5",children:[]},{level:4,title:"\u63D0\u793A",slug:"\u63D0\u793A",children:[]},{level:4,title:"4.3.9 FirstOrInit",slug:"_4-3-9-firstorinit",children:[]}]},{level:3,title:"4.4 \u66F4\u65B0\u6570\u636E",slug:"_4-4-\u66F4\u65B0\u6570\u636E",children:[]},{level:3,title:"4.5 \u5220\u9664\u6570\u636E",slug:"_4-5-\u5220\u9664\u6570\u636E",children:[]},{level:3,title:"4.6 \u539F\u751FSQL",slug:"_4-6-\u539F\u751Fsql",children:[]},{level:3,title:"4.7 \u9519\u8BEF\u5904\u7406",slug:"_4-7-\u9519\u8BEF\u5904\u7406",children:[]}]},{level:2,title:"5. \u4E00\u5BF9\u4E00\u3001\u591A\u5BF9\u591A\u3001\u4E00\u5BF9\u591A\u5173\u7CFB\u7684\u589E\u5220\u6539\u67E5",slug:"_5-\u4E00\u5BF9\u4E00\u3001\u591A\u5BF9\u591A\u3001\u4E00\u5BF9\u591A\u5173\u7CFB\u7684\u589E\u5220\u6539\u67E5",children:[{level:4,title:"5.1 \u4E00\u5BF9\u4E00",slug:"_5-1-\u4E00\u5BF9\u4E00",children:[]}]},{level:2,title:"\u4E8B\u52A1\u64CD\u4F5C",slug:"\u4E8B\u52A1\u64CD\u4F5C",children:[]},{level:2,title:"\u81EA\u5B9A\u4E49\u6570\u636E\u7C7B\u578B",slug:"\u81EA\u5B9A\u4E49\u6570\u636E\u7C7B\u578B",children:[]}],git:{updatedTime:1710173765e3,contributors:[{name:"shailene",email:"64005626+shaileneF@users.noreply.github.com",commits:1}]},filePathRelative:"go/gorm/gorm.md"};export{l as data};
                                  +const l={key:"v-500ab9d8",path:"/go/gorm/gorm.html",title:"gorm",lang:"zh-CN",frontmatter:{},excerpt:"",headers:[{level:2,title:"1. \u6982\u8FF0",slug:"_1-\u6982\u8FF0",children:[]},{level:2,title:"2. \u6570\u636E\u5E93\u8FDE\u63A5\u3001\u5EFA\u8868",slug:"_2-\u6570\u636E\u5E93\u8FDE\u63A5\u3001\u5EFA\u8868",children:[{level:3,title:"2.1 \u8FDE\u63A5",slug:"_2-1-\u8FDE\u63A5",children:[]},{level:3,title:"2.2 \u8868\u7684\u64CD\u4F5C",slug:"_2-2-\u8868\u7684\u64CD\u4F5C",children:[]}]},{level:2,title:"3. \u6A21\u578B\u5EFA\u7ACB",slug:"_3-\u6A21\u578B\u5EFA\u7ACB",children:[{level:3,title:"3.1 \u6982\u5FF5",slug:"_3-1-\u6982\u5FF5",children:[]},{level:3,title:"3.2 \u5B9A\u4E49",slug:"_3-2-\u5B9A\u4E49",children:[]},{level:3,title:"3.3 \u7EA6\u5B9A",slug:"_3-3-\u7EA6\u5B9A",children:[]},{level:3,title:"3.4 \u65F6\u95F4\u6233\u8DDF\u8E2A",slug:"_3-4-\u65F6\u95F4\u6233\u8DDF\u8E2A",children:[]},{level:3,title:"3.5 \u9ED8\u8BA4\u503C",slug:"_3-5-\u9ED8\u8BA4\u503C",children:[]}]},{level:2,title:"4. \u589E\u5220\u6539\u67E5",slug:"_4-\u589E\u5220\u6539\u67E5",children:[{level:3,title:"4.1 \u521B\u5EFA\u8868",slug:"_4-1-\u521B\u5EFA\u8868",children:[]},{level:3,title:"4.2 \u63D2\u5165\u6570\u636E",slug:"_4-2-\u63D2\u5165\u6570\u636E",children:[{level:4,title:"4.2.1 \u5355\u72EC\u521B\u5EFA",slug:"_4-2-1-\u5355\u72EC\u521B\u5EFA",children:[]},{level:4,title:"4.2.2 \u6307\u5B9A\u5B57\u6BB5\u521B\u5EFA",slug:"_4-2-2-\u6307\u5B9A\u5B57\u6BB5\u521B\u5EFA",children:[]},{level:4,title:"4.2.3 \u8DF3\u8FC7\u5B57\u6BB5\u521B\u5EFA",slug:"_4-2-3-\u8DF3\u8FC7\u5B57\u6BB5\u521B\u5EFA",children:[]},{level:4,title:"4.2.4 \u6279\u91CF\u521B\u5EFA",slug:"_4-2-4-\u6279\u91CF\u521B\u5EFA",children:[]}]},{level:3,title:"4.3 \u67E5\u8BE2\u6570\u636E",slug:"_4-3-\u67E5\u8BE2\u6570\u636E",children:[{level:4,title:"4.3.1 \u63A5\u6536\u8FD4\u56DE\u503C\u7684\u5F62\u5F0F",slug:"_4-3-1-\u63A5\u6536\u8FD4\u56DE\u503C\u7684\u5F62\u5F0F",children:[]},{level:4,title:"4.3.2 \u67E5\u8BE2\u4E3B\u952E\u6392\u5E8F\u540E\u7684\u7B2C\u4E00\u6761",slug:"_4-3-2-\u67E5\u8BE2\u4E3B\u952E\u6392\u5E8F\u540E\u7684\u7B2C\u4E00\u6761",children:[]},{level:4,title:"4.3.3 \u67E5\u8BE2\u4E00\u6761\u8BB0\u5F55\uFF08\u4E0D\u63A8\u8350\uFF09",slug:"_4-3-3-\u67E5\u8BE2\u4E00\u6761\u8BB0\u5F55-\u4E0D\u63A8\u8350",children:[]},{level:4,title:"4.3.4 \u67E5\u8BE2\u4E3B\u952E\u6392\u5E8F\u540E\u7684\u6700\u540E\u4E00\u6761",slug:"_4-3-4-\u67E5\u8BE2\u4E3B\u952E\u6392\u5E8F\u540E\u7684\u6700\u540E\u4E00\u6761",children:[]},{level:4,title:"4.3.5 \u67E5\u8BE2\u6240\u6709\u7684\u8BB0\u5F55",slug:"_4-3-5-\u67E5\u8BE2\u6240\u6709\u7684\u8BB0\u5F55",children:[]},{level:4,title:"4.3.6 \u67E5\u8BE2\u6761\u4EF6",slug:"_4-3-6-\u67E5\u8BE2\u6761\u4EF6",children:[]},{level:4,title:"4.3.7 \u67E5\u8BE2\u591A\u6761\u6570\u636E",slug:"_4-3-7-\u67E5\u8BE2\u591A\u6761\u6570\u636E",children:[]},{level:4,title:"4.3.8 \u667A\u80FD\u9009\u62E9\u5B57\u6BB5",slug:"_4-3-8-\u667A\u80FD\u9009\u62E9\u5B57\u6BB5",children:[]},{level:4,title:"\u63D0\u793A",slug:"\u63D0\u793A",children:[]},{level:4,title:"4.3.9 FirstOrInit",slug:"_4-3-9-firstorinit",children:[]}]},{level:3,title:"4.4 \u66F4\u65B0\u6570\u636E",slug:"_4-4-\u66F4\u65B0\u6570\u636E",children:[]},{level:3,title:"4.5 \u5220\u9664\u6570\u636E",slug:"_4-5-\u5220\u9664\u6570\u636E",children:[]},{level:3,title:"4.6 \u539F\u751FSQL",slug:"_4-6-\u539F\u751Fsql",children:[]},{level:3,title:"4.7 \u9519\u8BEF\u5904\u7406",slug:"_4-7-\u9519\u8BEF\u5904\u7406",children:[]}]},{level:2,title:"5. \u4E00\u5BF9\u4E00\u3001\u591A\u5BF9\u591A\u3001\u4E00\u5BF9\u591A\u5173\u7CFB\u7684\u589E\u5220\u6539\u67E5",slug:"_5-\u4E00\u5BF9\u4E00\u3001\u591A\u5BF9\u591A\u3001\u4E00\u5BF9\u591A\u5173\u7CFB\u7684\u589E\u5220\u6539\u67E5",children:[{level:4,title:"5.1 \u4E00\u5BF9\u4E00",slug:"_5-1-\u4E00\u5BF9\u4E00",children:[]}]},{level:2,title:"\u4E8B\u52A1\u64CD\u4F5C",slug:"\u4E8B\u52A1\u64CD\u4F5C",children:[]},{level:2,title:"\u81EA\u5B9A\u4E49\u6570\u636E\u7C7B\u578B",slug:"\u81EA\u5B9A\u4E49\u6570\u636E\u7C7B\u578B",children:[]}],git:{updatedTime:1710173784e3,contributors:[{name:"shailene",email:"64005626+shaileneF@users.noreply.github.com",commits:1}]},filePathRelative:"go/gorm/gorm.md"};export{l as data};
                                  diff --git a/assets/gorm.html.5e254620.js b/assets/gorm.html.fea77a30.js
                                  similarity index 99%
                                  rename from assets/gorm.html.5e254620.js
                                  rename to assets/gorm.html.fea77a30.js
                                  index 8f5a7cf7..3b850e12 100644
                                  --- a/assets/gorm.html.5e254620.js
                                  +++ b/assets/gorm.html.fea77a30.js
                                  @@ -1,4 +1,4 @@
                                  -import{_ as o,r as e,o as c,c as u,a as n,b as p,F as l,d as s,e as a}from"./app.0d029894.js";const i={},k=n("h1",{id:"gorm",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#gorm","aria-hidden":"true"},"#"),s(" gorm")],-1),r=s("\u505A\u4EFB\u4F55\u4E8B\u60C5\u4E4B\u524D\u67E5\u9605"),d={href:"https://gorm.io/zh_CN/docs/connecting_to_the_database.html",target:"_blank",rel:"noopener noreferrer"},g=s("\u5B98\u65B9\u6587\u6863"),m=a(`

                                  \u672C\u6587\u6863\u53EA\u662F\u5B66\u4E60\u7B14\u8BB0\u3002

                                  1. \u6982\u8FF0

                                  1. ORM\u8BA9\u6570\u636E\u5E93\u91CC\u9762\u7684\u8868\u7ED3\u6784\u53D8\u6210\u4EE3\u7801\u5B9A\u4E49\u7684\u6570\u636E\u7ED3\u6784\uFF08golang\u91CC\u9762\u7ED3\u6784\u4F53\u7684\u7ED3\u6784\uFF09\uFF0C\u4ECE\u800C\u505A\u5230\uFF0C\u4EE3\u7801\u7ED3\u6784\u5373\u4E3A\u6570\u636E\u5E93\u7ED3\u6784\uFF0C\u4EE3\u7801\u884C\u4E3A\u5373\u4E3A\u6570\u636E\u5E93\u884C\u4E3A\u3002

                                  2. ORM\u4E5F\u662F\u9762\u5411\u5BF9\u8C61\u601D\u7EF4\u65B9\u5F0F\u7684\u4F53\u73B0\u3002

                                  3. \u6570\u636E\u8868---\u7ED3\u6784\u4F53

                                    \u6570\u636E\u884C---\u7ED3\u6784\u4F53\u5B9E\u4F8B

                                    \u6570\u636E\u8868\u5B57\u6BB5---\u7ED3\u6784\u4F53\u5B57\u6BB5\uFF08\u5C5E\u6027\uFF09

                                    \u9762\u5411\u5BF9\u8C61\u601D\u7EF4\u65B9\u5F0F\uFF0C\u4E00\u4E2A\u7ED3\u6784\u4F53\u5BF9\u8C61\uFF0C\u5177\u6709\u5C5E\u6027\u548C\u65B9\u6CD5\uFF08\u884C\u4E3A\uFF09

                                  4. ORM\u4F18\u7F3A\u70B9\uFF1A

                                    \u4F18\u70B9\uFF1A

                                    \u63D0\u9AD8\u5F00\u53D1\u6548\u7387

                                    \u7F3A\u70B9\uFF1A

                                    \u727A\u7272\u6267\u884C\u6027\u80FD\uFF0C\u5F31\u5316SQL\u80FD\u529B

                                    \u5199ORM\u8BED\u53E5\uFF0C\u76F8\u6BD4\u4E8E\u76F4\u63A5\u5199SQL\u8BED\u53E5\uFF0C\u591A\u4E86\u4E00\u4E2A\u5C06ORM\u8BED\u53E5\u7FFB\u8BD1\u6210SQL\u8BED\u53E5\u7684\u8FC7\u7A0B\uFF0C\u6027\u80FD\u81EA\u7136\u4F4E\u4E00\u4E9B\u3002

                                  2. \u6570\u636E\u5E93\u8FDE\u63A5\u3001\u5EFA\u8868

                                  2.1 \u8FDE\u63A5

                                  1. import (
                                    +import{_ as o,r as e,o as c,c as u,a as n,b as p,F as l,d as s,e as a}from"./app.f8791b52.js";const i={},k=n("h1",{id:"gorm",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#gorm","aria-hidden":"true"},"#"),s(" gorm")],-1),r=s("\u505A\u4EFB\u4F55\u4E8B\u60C5\u4E4B\u524D\u67E5\u9605"),d={href:"https://gorm.io/zh_CN/docs/connecting_to_the_database.html",target:"_blank",rel:"noopener noreferrer"},g=s("\u5B98\u65B9\u6587\u6863"),m=a(`

                                    \u672C\u6587\u6863\u53EA\u662F\u5B66\u4E60\u7B14\u8BB0\u3002

                                    1. \u6982\u8FF0

                                    1. ORM\u8BA9\u6570\u636E\u5E93\u91CC\u9762\u7684\u8868\u7ED3\u6784\u53D8\u6210\u4EE3\u7801\u5B9A\u4E49\u7684\u6570\u636E\u7ED3\u6784\uFF08golang\u91CC\u9762\u7ED3\u6784\u4F53\u7684\u7ED3\u6784\uFF09\uFF0C\u4ECE\u800C\u505A\u5230\uFF0C\u4EE3\u7801\u7ED3\u6784\u5373\u4E3A\u6570\u636E\u5E93\u7ED3\u6784\uFF0C\u4EE3\u7801\u884C\u4E3A\u5373\u4E3A\u6570\u636E\u5E93\u884C\u4E3A\u3002

                                    2. ORM\u4E5F\u662F\u9762\u5411\u5BF9\u8C61\u601D\u7EF4\u65B9\u5F0F\u7684\u4F53\u73B0\u3002

                                    3. \u6570\u636E\u8868---\u7ED3\u6784\u4F53

                                      \u6570\u636E\u884C---\u7ED3\u6784\u4F53\u5B9E\u4F8B

                                      \u6570\u636E\u8868\u5B57\u6BB5---\u7ED3\u6784\u4F53\u5B57\u6BB5\uFF08\u5C5E\u6027\uFF09

                                      \u9762\u5411\u5BF9\u8C61\u601D\u7EF4\u65B9\u5F0F\uFF0C\u4E00\u4E2A\u7ED3\u6784\u4F53\u5BF9\u8C61\uFF0C\u5177\u6709\u5C5E\u6027\u548C\u65B9\u6CD5\uFF08\u884C\u4E3A\uFF09

                                    4. ORM\u4F18\u7F3A\u70B9\uFF1A

                                      \u4F18\u70B9\uFF1A

                                      \u63D0\u9AD8\u5F00\u53D1\u6548\u7387

                                      \u7F3A\u70B9\uFF1A

                                      \u727A\u7272\u6267\u884C\u6027\u80FD\uFF0C\u5F31\u5316SQL\u80FD\u529B

                                      \u5199ORM\u8BED\u53E5\uFF0C\u76F8\u6BD4\u4E8E\u76F4\u63A5\u5199SQL\u8BED\u53E5\uFF0C\u591A\u4E86\u4E00\u4E2A\u5C06ORM\u8BED\u53E5\u7FFB\u8BD1\u6210SQL\u8BED\u53E5\u7684\u8FC7\u7A0B\uFF0C\u6027\u80FD\u81EA\u7136\u4F4E\u4E00\u4E9B\u3002

                                    2. \u6570\u636E\u5E93\u8FDE\u63A5\u3001\u5EFA\u8868

                                    2.1 \u8FDE\u63A5

                                    1. import (
                                       	"fmt"
                                       	"gorm.io/driver/mysql"
                                       	"gorm.io/gorm"
                                      diff --git a/assets/index.html.5ae480ec.js b/assets/index.html.30ce0398.js
                                      similarity index 92%
                                      rename from assets/index.html.5ae480ec.js
                                      rename to assets/index.html.30ce0398.js
                                      index b83b2377..abb65eb0 100644
                                      --- a/assets/index.html.5ae480ec.js
                                      +++ b/assets/index.html.30ce0398.js
                                      @@ -1 +1 @@
                                      -import{_ as r,r as l,o as i,c as s,a as e,b as n,w as a,F as d,d as o}from"./app.0d029894.js";const c={},_=e("h2",{id:"go",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#go","aria-hidden":"true"},"#"),o(" Go")],-1),h=o("golang"),g=e("h2",{id:"gin",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#gin","aria-hidden":"true"},"#"),o(" Gin")],-1),u=o("gin"),m=e("h2",{id:"gorm",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#gorm","aria-hidden":"true"},"#"),o(" Gorm")],-1),f=o("gorm");function x(p,b){const t=l("RouterLink");return i(),s(d,null,[_,e("ul",null,[e("li",null,[n(t,{to:"/go/golang/golang.html"},{default:a(()=>[h]),_:1})])]),g,e("ul",null,[e("li",null,[n(t,{to:"/go/gin/gin.html"},{default:a(()=>[u]),_:1})])]),m,e("ul",null,[e("li",null,[n(t,{to:"/go/gorm/gorm.html"},{default:a(()=>[f]),_:1})])])],64)}var v=r(c,[["render",x],["__file","index.html.vue"]]);export{v as default};
                                      +import{_ as r,r as l,o as i,c as s,a as e,b as n,w as a,F as d,d as o}from"./app.f8791b52.js";const c={},_=e("h2",{id:"go",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#go","aria-hidden":"true"},"#"),o(" Go")],-1),h=o("golang"),g=e("h2",{id:"gin",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#gin","aria-hidden":"true"},"#"),o(" Gin")],-1),u=o("gin"),m=e("h2",{id:"gorm",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#gorm","aria-hidden":"true"},"#"),o(" Gorm")],-1),f=o("gorm");function x(p,b){const t=l("RouterLink");return i(),s(d,null,[_,e("ul",null,[e("li",null,[n(t,{to:"/go/golang/golang.html"},{default:a(()=>[h]),_:1})])]),g,e("ul",null,[e("li",null,[n(t,{to:"/go/gin/gin.html"},{default:a(()=>[u]),_:1})])]),m,e("ul",null,[e("li",null,[n(t,{to:"/go/gorm/gorm.html"},{default:a(()=>[f]),_:1})])])],64)}var v=r(c,[["render",x],["__file","index.html.vue"]]);export{v as default};
                                      diff --git a/assets/index.html.a408b578.js b/assets/index.html.3bf85b9e.js
                                      similarity index 93%
                                      rename from assets/index.html.a408b578.js
                                      rename to assets/index.html.3bf85b9e.js
                                      index 856d2679..9f13a081 100644
                                      --- a/assets/index.html.a408b578.js
                                      +++ b/assets/index.html.3bf85b9e.js
                                      @@ -1 +1 @@
                                      -const e={key:"v-14c69af4",path:"/java/",title:"",lang:"zh-CN",frontmatter:{},excerpt:"",headers:[{level:2,title:"\u{1F4AF}Java\u57FA\u7840",slug:"java\u57FA\u7840",children:[]},{level:2,title:"\u{1F55A}JVM",slug:"jvm",children:[]},{level:2,title:"\u{1F559}\u6570\u636E\u5E93",slug:"\u6570\u636E\u5E93",children:[]},{level:2,title:"\u{1F55B}JavaWeb",slug:"javaweb",children:[]},{level:2,title:"\u{1F552}\u5E76\u53D1\u7F16\u7A0B",slug:"\u5E76\u53D1\u7F16\u7A0B",children:[]},{level:2,title:"\u{1F553}\u6846\u67B6",slug:"\u6846\u67B6",children:[]},{level:2,title:"\u{1F555}\u5206\u5E03\u5F0F",slug:"\u5206\u5E03\u5F0F",children:[]},{level:2,title:"\u{1F550}\u8BA1\u7B97\u673A\u57FA\u7840\u77E5\u8BC6",slug:"\u8BA1\u7B97\u673A\u57FA\u7840\u77E5\u8BC6",children:[]},{level:2,title:"\u{1F554}\u6D88\u606F\u961F\u5217",slug:"\u6D88\u606F\u961F\u5217",children:[]}],git:{updatedTime:1710173765e3,contributors:[{name:"shailene",email:"64005626+shaileneF@users.noreply.github.com",commits:1}]},filePathRelative:"java/README.md"};export{e as data};
                                      +const e={key:"v-14c69af4",path:"/java/",title:"",lang:"zh-CN",frontmatter:{},excerpt:"",headers:[{level:2,title:"\u{1F4AF}Java\u57FA\u7840",slug:"java\u57FA\u7840",children:[]},{level:2,title:"\u{1F55A}JVM",slug:"jvm",children:[]},{level:2,title:"\u{1F559}\u6570\u636E\u5E93",slug:"\u6570\u636E\u5E93",children:[]},{level:2,title:"\u{1F55B}JavaWeb",slug:"javaweb",children:[]},{level:2,title:"\u{1F552}\u5E76\u53D1\u7F16\u7A0B",slug:"\u5E76\u53D1\u7F16\u7A0B",children:[]},{level:2,title:"\u{1F553}\u6846\u67B6",slug:"\u6846\u67B6",children:[]},{level:2,title:"\u{1F555}\u5206\u5E03\u5F0F",slug:"\u5206\u5E03\u5F0F",children:[]},{level:2,title:"\u{1F550}\u8BA1\u7B97\u673A\u57FA\u7840\u77E5\u8BC6",slug:"\u8BA1\u7B97\u673A\u57FA\u7840\u77E5\u8BC6",children:[]},{level:2,title:"\u{1F554}\u6D88\u606F\u961F\u5217",slug:"\u6D88\u606F\u961F\u5217",children:[]}],git:{updatedTime:1710173784e3,contributors:[{name:"shailene",email:"64005626+shaileneF@users.noreply.github.com",commits:1}]},filePathRelative:"java/README.md"};export{e as data};
                                      diff --git a/assets/index.html.be48243d.js b/assets/index.html.4ea9b40b.js
                                      similarity index 87%
                                      rename from assets/index.html.be48243d.js
                                      rename to assets/index.html.4ea9b40b.js
                                      index 76c05dd1..8abb66f0 100644
                                      --- a/assets/index.html.be48243d.js
                                      +++ b/assets/index.html.4ea9b40b.js
                                      @@ -1 +1 @@
                                      -const e={key:"v-2d0aa62c",path:"/mw/",title:"",lang:"zh-CN",frontmatter:{},excerpt:"",headers:[{level:2,title:"Elastic Search",slug:"elastic-search",children:[]},{level:2,title:"Redis",slug:"redis",children:[]},{level:2,title:"Flink",slug:"flink",children:[]},{level:2,title:"Docker",slug:"docker",children:[]},{level:2,title:"MQ",slug:"mq",children:[]}],git:{updatedTime:1710173765e3,contributors:[{name:"shailene",email:"64005626+shaileneF@users.noreply.github.com",commits:1}]},filePathRelative:"mw/README.md"};export{e as data};
                                      +const e={key:"v-2d0aa62c",path:"/mw/",title:"",lang:"zh-CN",frontmatter:{},excerpt:"",headers:[{level:2,title:"Elastic Search",slug:"elastic-search",children:[]},{level:2,title:"Redis",slug:"redis",children:[]},{level:2,title:"Flink",slug:"flink",children:[]},{level:2,title:"Docker",slug:"docker",children:[]},{level:2,title:"MQ",slug:"mq",children:[]}],git:{updatedTime:1710173784e3,contributors:[{name:"shailene",email:"64005626+shaileneF@users.noreply.github.com",commits:1}]},filePathRelative:"mw/README.md"};export{e as data};
                                      diff --git a/assets/index.html.4194ee21.js b/assets/index.html.5bd5d5a7.js
                                      similarity index 96%
                                      rename from assets/index.html.4194ee21.js
                                      rename to assets/index.html.5bd5d5a7.js
                                      index e0c4df86..086be146 100644
                                      --- a/assets/index.html.4194ee21.js
                                      +++ b/assets/index.html.5bd5d5a7.js
                                      @@ -1 +1 @@
                                      -import{_ as n,r as s,o,c as d,a as e,b as a,w as i,F as r,d as t}from"./app.0d029894.js";const c={},h=e("h2",{id:"elastic-search",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#elastic-search","aria-hidden":"true"},"#"),t(" Elastic Search")],-1),_=t("ES"),u=e("h2",{id:"redis",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#redis","aria-hidden":"true"},"#"),t(" Redis")],-1),f=t("Redis"),k=e("h2",{id:"flink",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#flink","aria-hidden":"true"},"#"),t(" Flink")],-1),m=t("Flink\u57FA\u672C\u7BC71"),F=t("Flink\u57FA\u672C\u7BC72"),E=e("h2",{id:"docker",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#docker","aria-hidden":"true"},"#"),t(" Docker")],-1),b=t("Docker\u7B14\u8BB0"),x=e("h2",{id:"mq",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#mq","aria-hidden":"true"},"#"),t(" MQ")],-1),A=t("Kafka\u7B14\u8BB0"),C=t("RabbitMQ");function w(p,B){const l=s("RouterLink");return o(),d(r,null,[h,e("ul",null,[e("li",null,[a(l,{to:"/mw/elasticsearch/ES.html"},{default:i(()=>[_]),_:1})])]),u,e("ul",null,[e("li",null,[a(l,{to:"/mw/redis/redis.html"},{default:i(()=>[f]),_:1})])]),k,e("ul",null,[e("li",null,[e("p",null,[a(l,{to:"/mw/Flink/Flink%E5%9F%BA%E6%9C%AC%E7%AF%87/flink%E5%9F%BA%E6%9C%AC%E7%AF%871.html"},{default:i(()=>[m]),_:1})])]),e("li",null,[e("p",null,[a(l,{to:"/mw/Flink/Flink%E5%9F%BA%E6%9C%AC%E7%AF%87/flink%E5%9F%BA%E6%9C%AC%E7%AF%872.html"},{default:i(()=>[F]),_:1})])])]),E,e("ul",null,[e("li",null,[a(l,{to:"/mw/Docker/docker.html"},{default:i(()=>[b]),_:1})])]),x,e("ul",null,[e("li",null,[a(l,{to:"/mw/kafka/kafka.html"},{default:i(()=>[A]),_:1})]),e("li",null,[a(l,{to:"/mw/RabbitMQ/RabbitMQ.html"},{default:i(()=>[C]),_:1})])])],64)}var M=n(c,[["render",w],["__file","index.html.vue"]]);export{M as default};
                                      +import{_ as n,r as s,o,c as d,a as e,b as a,w as i,F as r,d as t}from"./app.f8791b52.js";const c={},h=e("h2",{id:"elastic-search",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#elastic-search","aria-hidden":"true"},"#"),t(" Elastic Search")],-1),_=t("ES"),u=e("h2",{id:"redis",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#redis","aria-hidden":"true"},"#"),t(" Redis")],-1),f=t("Redis"),k=e("h2",{id:"flink",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#flink","aria-hidden":"true"},"#"),t(" Flink")],-1),m=t("Flink\u57FA\u672C\u7BC71"),F=t("Flink\u57FA\u672C\u7BC72"),E=e("h2",{id:"docker",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#docker","aria-hidden":"true"},"#"),t(" Docker")],-1),b=t("Docker\u7B14\u8BB0"),x=e("h2",{id:"mq",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#mq","aria-hidden":"true"},"#"),t(" MQ")],-1),A=t("Kafka\u7B14\u8BB0"),C=t("RabbitMQ");function w(p,B){const l=s("RouterLink");return o(),d(r,null,[h,e("ul",null,[e("li",null,[a(l,{to:"/mw/elasticsearch/ES.html"},{default:i(()=>[_]),_:1})])]),u,e("ul",null,[e("li",null,[a(l,{to:"/mw/redis/redis.html"},{default:i(()=>[f]),_:1})])]),k,e("ul",null,[e("li",null,[e("p",null,[a(l,{to:"/mw/Flink/Flink%E5%9F%BA%E6%9C%AC%E7%AF%87/flink%E5%9F%BA%E6%9C%AC%E7%AF%871.html"},{default:i(()=>[m]),_:1})])]),e("li",null,[e("p",null,[a(l,{to:"/mw/Flink/Flink%E5%9F%BA%E6%9C%AC%E7%AF%87/flink%E5%9F%BA%E6%9C%AC%E7%AF%872.html"},{default:i(()=>[F]),_:1})])])]),E,e("ul",null,[e("li",null,[a(l,{to:"/mw/Docker/docker.html"},{default:i(()=>[b]),_:1})])]),x,e("ul",null,[e("li",null,[a(l,{to:"/mw/kafka/kafka.html"},{default:i(()=>[A]),_:1})]),e("li",null,[a(l,{to:"/mw/RabbitMQ/RabbitMQ.html"},{default:i(()=>[C]),_:1})])])],64)}var M=n(c,[["render",w],["__file","index.html.vue"]]);export{M as default};
                                      diff --git a/assets/index.html.a6f36b52.js b/assets/index.html.5c567981.js
                                      similarity index 98%
                                      rename from assets/index.html.a6f36b52.js
                                      rename to assets/index.html.5c567981.js
                                      index 6aedf920..70298fc6 100644
                                      --- a/assets/index.html.a6f36b52.js
                                      +++ b/assets/index.html.5c567981.js
                                      @@ -1 +1 @@
                                      -import{_ as n,r as o,o as i,c as s,a as l,b as e,w as E,F as d,d as a}from"./app.0d029894.js";const h={},_=l("h2",{id:"java\u57FA\u7840",tabindex:"-1"},[l("a",{class:"header-anchor",href:"#java\u57FA\u7840","aria-hidden":"true"},"#"),a(" \u{1F4AF}Java\u57FA\u7840")],-1),u=a("Java\u57FA\u7840"),r=l("h2",{id:"jvm",tabindex:"-1"},[l("a",{class:"header-anchor",href:"#jvm","aria-hidden":"true"},"#"),a(" \u{1F55A}JVM")],-1),B=a("JVM-1"),c=l("h2",{id:"\u6570\u636E\u5E93",tabindex:"-1"},[l("a",{class:"header-anchor",href:"#\u6570\u636E\u5E93","aria-hidden":"true"},"#"),a(" \u{1F559}\u6570\u636E\u5E93")],-1),A=a("mysql\u57FA\u7840\u7BC7"),f=a("mysql\u9AD8\u7EA7\u7BC7"),m=a("jdbc"),v=a("redis"),b=l("h2",{id:"javaweb",tabindex:"-1"},[l("a",{class:"header-anchor",href:"#javaweb","aria-hidden":"true"},"#"),a(" \u{1F55B}JavaWeb")],-1),p=a("JavaWeb"),F=l("h2",{id:"\u5E76\u53D1\u7F16\u7A0B",tabindex:"-1"},[l("a",{class:"header-anchor",href:"#\u5E76\u53D1\u7F16\u7A0B","aria-hidden":"true"},"#"),a(" \u{1F552}\u5E76\u53D1\u7F16\u7A0B")],-1),C=a("\u5E76\u53D1\u7F16\u7A0B"),j=l("li",null,[l("p",null,[l("a",{href:""},"\u5E76\u53D1\u7F16\u7A0B\u7684\u827A\u672F")])],-1),g=l("h2",{id:"\u6846\u67B6",tabindex:"-1"},[l("a",{class:"header-anchor",href:"#\u6846\u67B6","aria-hidden":"true"},"#"),a(" \u{1F553}\u6846\u67B6")],-1),x=a("mybatis"),J=a("spring"),D=a("springmvc"),k=a("springboot"),M=a("springboot\u539F\u7406"),y=l("h2",{id:"\u5206\u5E03\u5F0F",tabindex:"-1"},[l("a",{class:"header-anchor",href:"#\u5206\u5E03\u5F0F","aria-hidden":"true"},"#"),a(" \u{1F555}\u5206\u5E03\u5F0F")],-1),V=a("dubbo"),q=a("springcloud\uFF08\u4E0A\uFF09"),R=a("springcloud\uFF08\u4E0B\uFF09"),w=a("zookeeper"),L=l("h2",{id:"\u8BA1\u7B97\u673A\u57FA\u7840\u77E5\u8BC6",tabindex:"-1"},[l("a",{class:"header-anchor",href:"#\u8BA1\u7B97\u673A\u57FA\u7840\u77E5\u8BC6","aria-hidden":"true"},"#"),a(" \u{1F550}\u8BA1\u7B97\u673A\u57FA\u7840\u77E5\u8BC6")],-1),Q=l("li",null,[l("p",null,[l("a",{href:""},"linux")])],-1),W=l("li",null,[l("p",null,[l("a",{href:""},"\u8BA1\u7B97\u673A\u7F51\u7EDC")])],-1),z=a("\u64CD\u4F5C\u7CFB\u7EDF"),N=l("h2",{id:"\u6D88\u606F\u961F\u5217",tabindex:"-1"},[l("a",{class:"header-anchor",href:"#\u6D88\u606F\u961F\u5217","aria-hidden":"true"},"#"),a(" \u{1F554}\u6D88\u606F\u961F\u5217")],-1),K=a("kafka"),S=a("rabbitmq");function P(T,G){const t=o("RouterLink");return i(),s(d,null,[_,l("ul",null,[l("li",null,[e(t,{to:"/java/Java%E5%9F%BA%E7%A1%80/Java%E7%AC%94%E8%AE%B0/Java%E7%AC%94%E8%AE%B0.html"},{default:E(()=>[u]),_:1})])]),r,l("ul",null,[l("li",null,[e(t,{to:"/java/JVM/JVM%E4%B8%8A%E7%AF%87/%E4%B8%80%E4%BA%9B%E7%9F%A5%E8%AF%86%E7%82%B9%E7%9A%84%E8%AE%B0%E5%BD%95.html"},{default:E(()=>[B]),_:1})])]),c,l("ul",null,[l("li",null,[l("p",null,[e(t,{to:"/java/%E6%95%B0%E6%8D%AE%E5%BA%93/mysql/%E5%9F%BA%E7%A1%80%E7%AF%87/MySQL%E6%95%B0%E6%8D%AE%E5%BA%93%E7%AC%94%E8%AE%B0-%E7%AC%AC%E4%B8%80%E9%83%A8%E5%88%86.html"},{default:E(()=>[A]),_:1})])]),l("li",null,[l("p",null,[e(t,{to:"/java/%E6%95%B0%E6%8D%AE%E5%BA%93/mysql/%E9%AB%98%E7%BA%A7%E7%AF%87/MySQL%E6%95%B0%E6%8D%AE%E5%BA%93%E7%AC%94%E8%AE%B0-%E7%AC%AC%E4%BA%8C%E9%83%A8%E5%88%86.html"},{default:E(()=>[f]),_:1})])]),l("li",null,[l("p",null,[e(t,{to:"/java/%E6%95%B0%E6%8D%AE%E5%BA%93/jdbc/%E5%B0%9A%E7%A1%85%E8%B0%B7_%E5%AE%8B%E7%BA%A2%E5%BA%B7_JDBC.html"},{default:E(()=>[m]),_:1})])]),l("li",null,[l("p",null,[e(t,{to:"/java/%E6%95%B0%E6%8D%AE%E5%BA%93/redis/redis.html"},{default:E(()=>[v]),_:1})])])]),b,l("ul",null,[l("li",null,[e(t,{to:"/java/JavaWeb/JavaWeb.html"},{default:E(()=>[p]),_:1})])]),F,l("ul",null,[l("li",null,[l("p",null,[e(t,{to:"/java/%E5%B9%B6%E5%8F%91%E7%BC%96%E7%A8%8B/%E5%B9%B6%E5%8F%91%E7%BC%96%E7%A8%8B%E7%AC%94%E8%AE%B0/%E5%B9%B6%E5%8F%91%E7%BC%96%E7%A8%8B.html"},{default:E(()=>[C]),_:1})])]),j]),g,l("ul",null,[l("li",null,[e(t,{to:"/java/%E6%A1%86%E6%9E%B6/mybatis/Mybatis.html"},{default:E(()=>[x]),_:1})]),l("li",null,[e(t,{to:"/java/%E6%A1%86%E6%9E%B6/spring/spring.html"},{default:E(()=>[J]),_:1})]),l("li",null,[e(t,{to:"/java/%E6%A1%86%E6%9E%B6/springmvc/springMVC.html"},{default:E(()=>[D]),_:1})]),l("li",null,[e(t,{to:"/java/%E6%A1%86%E6%9E%B6/springboot/springboot.html"},{default:E(()=>[k]),_:1})]),l("li",null,[e(t,{to:"/java/%E6%A1%86%E6%9E%B6/springboot%E5%8E%9F%E7%90%86/springboot.html"},{default:E(()=>[M]),_:1})])]),y,l("ul",null,[l("li",null,[e(t,{to:"/java/%E5%88%86%E5%B8%83%E5%BC%8F/RPC%E6%A1%86%E6%9E%B6-dubbo/dubbo.html"},{default:E(()=>[V]),_:1})]),l("li",null,[e(t,{to:"/java/%E5%88%86%E5%B8%83%E5%BC%8F/springcloud/springcloud%EF%BC%88%E4%B8%8A%EF%BC%89.html"},{default:E(()=>[q]),_:1})]),l("li",null,[e(t,{to:"/java/%E5%88%86%E5%B8%83%E5%BC%8F/springcloud/springcloud%EF%BC%88%E4%B8%8B%EF%BC%89.html"},{default:E(()=>[R]),_:1})]),l("li",null,[e(t,{to:"/java/%E5%88%86%E5%B8%83%E5%BC%8F/zookeeper/zookeeper.html"},{default:E(()=>[w]),_:1})])]),L,l("ul",null,[Q,W,l("li",null,[l("p",null,[e(t,{to:"/java/%E8%AE%A1%E7%AE%97%E6%9C%BA%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F/%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F.html"},{default:E(()=>[z]),_:1})])])]),N,l("ul",null,[l("li",null,[l("p",null,[e(t,{to:"/java/%E6%B6%88%E6%81%AF%E9%98%9F%E5%88%97/Kafka/Kafka.html"},{default:E(()=>[K]),_:1})])]),l("li",null,[l("p",null,[e(t,{to:"/java/%E6%B6%88%E6%81%AF%E9%98%9F%E5%88%97/RabbitMQ/RabbitMQ.html"},{default:E(()=>[S]),_:1})])])])],64)}var I=n(h,[["render",P],["__file","index.html.vue"]]);export{I as default};
                                      +import{_ as n,r as o,o as i,c as s,a as l,b as e,w as E,F as d,d as a}from"./app.f8791b52.js";const h={},_=l("h2",{id:"java\u57FA\u7840",tabindex:"-1"},[l("a",{class:"header-anchor",href:"#java\u57FA\u7840","aria-hidden":"true"},"#"),a(" \u{1F4AF}Java\u57FA\u7840")],-1),u=a("Java\u57FA\u7840"),r=l("h2",{id:"jvm",tabindex:"-1"},[l("a",{class:"header-anchor",href:"#jvm","aria-hidden":"true"},"#"),a(" \u{1F55A}JVM")],-1),B=a("JVM-1"),c=l("h2",{id:"\u6570\u636E\u5E93",tabindex:"-1"},[l("a",{class:"header-anchor",href:"#\u6570\u636E\u5E93","aria-hidden":"true"},"#"),a(" \u{1F559}\u6570\u636E\u5E93")],-1),A=a("mysql\u57FA\u7840\u7BC7"),f=a("mysql\u9AD8\u7EA7\u7BC7"),m=a("jdbc"),v=a("redis"),b=l("h2",{id:"javaweb",tabindex:"-1"},[l("a",{class:"header-anchor",href:"#javaweb","aria-hidden":"true"},"#"),a(" \u{1F55B}JavaWeb")],-1),p=a("JavaWeb"),F=l("h2",{id:"\u5E76\u53D1\u7F16\u7A0B",tabindex:"-1"},[l("a",{class:"header-anchor",href:"#\u5E76\u53D1\u7F16\u7A0B","aria-hidden":"true"},"#"),a(" \u{1F552}\u5E76\u53D1\u7F16\u7A0B")],-1),C=a("\u5E76\u53D1\u7F16\u7A0B"),j=l("li",null,[l("p",null,[l("a",{href:""},"\u5E76\u53D1\u7F16\u7A0B\u7684\u827A\u672F")])],-1),g=l("h2",{id:"\u6846\u67B6",tabindex:"-1"},[l("a",{class:"header-anchor",href:"#\u6846\u67B6","aria-hidden":"true"},"#"),a(" \u{1F553}\u6846\u67B6")],-1),x=a("mybatis"),J=a("spring"),D=a("springmvc"),k=a("springboot"),M=a("springboot\u539F\u7406"),y=l("h2",{id:"\u5206\u5E03\u5F0F",tabindex:"-1"},[l("a",{class:"header-anchor",href:"#\u5206\u5E03\u5F0F","aria-hidden":"true"},"#"),a(" \u{1F555}\u5206\u5E03\u5F0F")],-1),V=a("dubbo"),q=a("springcloud\uFF08\u4E0A\uFF09"),R=a("springcloud\uFF08\u4E0B\uFF09"),w=a("zookeeper"),L=l("h2",{id:"\u8BA1\u7B97\u673A\u57FA\u7840\u77E5\u8BC6",tabindex:"-1"},[l("a",{class:"header-anchor",href:"#\u8BA1\u7B97\u673A\u57FA\u7840\u77E5\u8BC6","aria-hidden":"true"},"#"),a(" \u{1F550}\u8BA1\u7B97\u673A\u57FA\u7840\u77E5\u8BC6")],-1),Q=l("li",null,[l("p",null,[l("a",{href:""},"linux")])],-1),W=l("li",null,[l("p",null,[l("a",{href:""},"\u8BA1\u7B97\u673A\u7F51\u7EDC")])],-1),z=a("\u64CD\u4F5C\u7CFB\u7EDF"),N=l("h2",{id:"\u6D88\u606F\u961F\u5217",tabindex:"-1"},[l("a",{class:"header-anchor",href:"#\u6D88\u606F\u961F\u5217","aria-hidden":"true"},"#"),a(" \u{1F554}\u6D88\u606F\u961F\u5217")],-1),K=a("kafka"),S=a("rabbitmq");function P(T,G){const t=o("RouterLink");return i(),s(d,null,[_,l("ul",null,[l("li",null,[e(t,{to:"/java/Java%E5%9F%BA%E7%A1%80/Java%E7%AC%94%E8%AE%B0/Java%E7%AC%94%E8%AE%B0.html"},{default:E(()=>[u]),_:1})])]),r,l("ul",null,[l("li",null,[e(t,{to:"/java/JVM/JVM%E4%B8%8A%E7%AF%87/%E4%B8%80%E4%BA%9B%E7%9F%A5%E8%AF%86%E7%82%B9%E7%9A%84%E8%AE%B0%E5%BD%95.html"},{default:E(()=>[B]),_:1})])]),c,l("ul",null,[l("li",null,[l("p",null,[e(t,{to:"/java/%E6%95%B0%E6%8D%AE%E5%BA%93/mysql/%E5%9F%BA%E7%A1%80%E7%AF%87/MySQL%E6%95%B0%E6%8D%AE%E5%BA%93%E7%AC%94%E8%AE%B0-%E7%AC%AC%E4%B8%80%E9%83%A8%E5%88%86.html"},{default:E(()=>[A]),_:1})])]),l("li",null,[l("p",null,[e(t,{to:"/java/%E6%95%B0%E6%8D%AE%E5%BA%93/mysql/%E9%AB%98%E7%BA%A7%E7%AF%87/MySQL%E6%95%B0%E6%8D%AE%E5%BA%93%E7%AC%94%E8%AE%B0-%E7%AC%AC%E4%BA%8C%E9%83%A8%E5%88%86.html"},{default:E(()=>[f]),_:1})])]),l("li",null,[l("p",null,[e(t,{to:"/java/%E6%95%B0%E6%8D%AE%E5%BA%93/jdbc/%E5%B0%9A%E7%A1%85%E8%B0%B7_%E5%AE%8B%E7%BA%A2%E5%BA%B7_JDBC.html"},{default:E(()=>[m]),_:1})])]),l("li",null,[l("p",null,[e(t,{to:"/java/%E6%95%B0%E6%8D%AE%E5%BA%93/redis/redis.html"},{default:E(()=>[v]),_:1})])])]),b,l("ul",null,[l("li",null,[e(t,{to:"/java/JavaWeb/JavaWeb.html"},{default:E(()=>[p]),_:1})])]),F,l("ul",null,[l("li",null,[l("p",null,[e(t,{to:"/java/%E5%B9%B6%E5%8F%91%E7%BC%96%E7%A8%8B/%E5%B9%B6%E5%8F%91%E7%BC%96%E7%A8%8B%E7%AC%94%E8%AE%B0/%E5%B9%B6%E5%8F%91%E7%BC%96%E7%A8%8B.html"},{default:E(()=>[C]),_:1})])]),j]),g,l("ul",null,[l("li",null,[e(t,{to:"/java/%E6%A1%86%E6%9E%B6/mybatis/Mybatis.html"},{default:E(()=>[x]),_:1})]),l("li",null,[e(t,{to:"/java/%E6%A1%86%E6%9E%B6/spring/spring.html"},{default:E(()=>[J]),_:1})]),l("li",null,[e(t,{to:"/java/%E6%A1%86%E6%9E%B6/springmvc/springMVC.html"},{default:E(()=>[D]),_:1})]),l("li",null,[e(t,{to:"/java/%E6%A1%86%E6%9E%B6/springboot/springboot.html"},{default:E(()=>[k]),_:1})]),l("li",null,[e(t,{to:"/java/%E6%A1%86%E6%9E%B6/springboot%E5%8E%9F%E7%90%86/springboot.html"},{default:E(()=>[M]),_:1})])]),y,l("ul",null,[l("li",null,[e(t,{to:"/java/%E5%88%86%E5%B8%83%E5%BC%8F/RPC%E6%A1%86%E6%9E%B6-dubbo/dubbo.html"},{default:E(()=>[V]),_:1})]),l("li",null,[e(t,{to:"/java/%E5%88%86%E5%B8%83%E5%BC%8F/springcloud/springcloud%EF%BC%88%E4%B8%8A%EF%BC%89.html"},{default:E(()=>[q]),_:1})]),l("li",null,[e(t,{to:"/java/%E5%88%86%E5%B8%83%E5%BC%8F/springcloud/springcloud%EF%BC%88%E4%B8%8B%EF%BC%89.html"},{default:E(()=>[R]),_:1})]),l("li",null,[e(t,{to:"/java/%E5%88%86%E5%B8%83%E5%BC%8F/zookeeper/zookeeper.html"},{default:E(()=>[w]),_:1})])]),L,l("ul",null,[Q,W,l("li",null,[l("p",null,[e(t,{to:"/java/%E8%AE%A1%E7%AE%97%E6%9C%BA%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F/%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F.html"},{default:E(()=>[z]),_:1})])])]),N,l("ul",null,[l("li",null,[l("p",null,[e(t,{to:"/java/%E6%B6%88%E6%81%AF%E9%98%9F%E5%88%97/Kafka/Kafka.html"},{default:E(()=>[K]),_:1})])]),l("li",null,[l("p",null,[e(t,{to:"/java/%E6%B6%88%E6%81%AF%E9%98%9F%E5%88%97/RabbitMQ/RabbitMQ.html"},{default:E(()=>[S]),_:1})])])])],64)}var I=n(h,[["render",P],["__file","index.html.vue"]]);export{I as default};
                                      diff --git a/assets/index.html.2d412476.js b/assets/index.html.92fc2c18.js
                                      similarity index 90%
                                      rename from assets/index.html.2d412476.js
                                      rename to assets/index.html.92fc2c18.js
                                      index 9dbe55a5..46a1bd00 100644
                                      --- a/assets/index.html.2d412476.js
                                      +++ b/assets/index.html.92fc2c18.js
                                      @@ -1 +1 @@
                                      -import{_ as l,r as u,o as r,c as s,a as e,b as a,w as o,F as c,d as t}from"./app.0d029894.js";const _={},d=e("h2",{id:"vue",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#vue","aria-hidden":"true"},"#"),t(" Vue")],-1),i=t("vue\u57FA\u7840"),B=t("vue\u7EC4\u4EF6");function h(v,E){const n=u("RouterLink");return r(),s(c,null,[d,e("ul",null,[e("li",null,[e("p",null,[a(n,{to:"/%E5%89%8D%E7%AB%AF/vue/vue%E5%9F%BA%E7%A1%80/vue%E5%9F%BA%E7%A1%80.html"},{default:o(()=>[i]),_:1})])]),e("li",null,[e("p",null,[a(n,{to:"/%E5%89%8D%E7%AB%AF/vue/vue%E7%BB%84%E4%BB%B6/vue%E7%BB%84%E4%BB%B6.html"},{default:o(()=>[B]),_:1})])])])],64)}var f=l(_,[["render",h],["__file","index.html.vue"]]);export{f as default};
                                      +import{_ as l,r as u,o as r,c as s,a as e,b as a,w as o,F as c,d as t}from"./app.f8791b52.js";const _={},d=e("h2",{id:"vue",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#vue","aria-hidden":"true"},"#"),t(" Vue")],-1),i=t("vue\u57FA\u7840"),B=t("vue\u7EC4\u4EF6");function h(v,E){const n=u("RouterLink");return r(),s(c,null,[d,e("ul",null,[e("li",null,[e("p",null,[a(n,{to:"/%E5%89%8D%E7%AB%AF/vue/vue%E5%9F%BA%E7%A1%80/vue%E5%9F%BA%E7%A1%80.html"},{default:o(()=>[i]),_:1})])]),e("li",null,[e("p",null,[a(n,{to:"/%E5%89%8D%E7%AB%AF/vue/vue%E7%BB%84%E4%BB%B6/vue%E7%BB%84%E4%BB%B6.html"},{default:o(()=>[B]),_:1})])])])],64)}var f=l(_,[["render",h],["__file","index.html.vue"]]);export{f as default};
                                      diff --git a/assets/index.html.0c85d45a.js b/assets/index.html.96cd7f18.js
                                      similarity index 83%
                                      rename from assets/index.html.0c85d45a.js
                                      rename to assets/index.html.96cd7f18.js
                                      index 430a3196..3dec3112 100644
                                      --- a/assets/index.html.0c85d45a.js
                                      +++ b/assets/index.html.96cd7f18.js
                                      @@ -1 +1 @@
                                      -const e={key:"v-8daa1a0e",path:"/",title:"",lang:"zh-CN",frontmatter:{home:!0,heroImage:"/images/shailene.jpg",actions:[{text:"Get Start.",link:"/java",type:"primary"}],footer:"\u{1F4A9}"},excerpt:"",headers:[],git:{updatedTime:1710173765e3,contributors:[{name:"shailene",email:"64005626+shaileneF@users.noreply.github.com",commits:1}]},filePathRelative:"README.md"};export{e as data};
                                      +const e={key:"v-8daa1a0e",path:"/",title:"",lang:"zh-CN",frontmatter:{home:!0,heroImage:"/images/shailene.jpg",actions:[{text:"Get Start.",link:"/java",type:"primary"}],footer:"\u{1F4A9}"},excerpt:"",headers:[],git:{updatedTime:1710173784e3,contributors:[{name:"shailene",email:"64005626+shaileneF@users.noreply.github.com",commits:1}]},filePathRelative:"README.md"};export{e as data};
                                      diff --git a/assets/index.html.f4ea396a.js b/assets/index.html.a0e845aa.js
                                      similarity index 84%
                                      rename from assets/index.html.f4ea396a.js
                                      rename to assets/index.html.a0e845aa.js
                                      index 2e41667e..2b5c8d60 100644
                                      --- a/assets/index.html.f4ea396a.js
                                      +++ b/assets/index.html.a0e845aa.js
                                      @@ -1 +1 @@
                                      -const e={key:"v-2d0a8eae",path:"/go/",title:"",lang:"zh-CN",frontmatter:{},excerpt:"",headers:[{level:2,title:"Go",slug:"go",children:[]},{level:2,title:"Gin",slug:"gin",children:[]},{level:2,title:"Gorm",slug:"gorm",children:[]}],git:{updatedTime:1710173765e3,contributors:[{name:"shailene",email:"64005626+shaileneF@users.noreply.github.com",commits:1}]},filePathRelative:"go/README.md"};export{e as data};
                                      +const e={key:"v-2d0a8eae",path:"/go/",title:"",lang:"zh-CN",frontmatter:{},excerpt:"",headers:[{level:2,title:"Go",slug:"go",children:[]},{level:2,title:"Gin",slug:"gin",children:[]},{level:2,title:"Gorm",slug:"gorm",children:[]}],git:{updatedTime:1710173784e3,contributors:[{name:"shailene",email:"64005626+shaileneF@users.noreply.github.com",commits:1}]},filePathRelative:"go/README.md"};export{e as data};
                                      diff --git a/assets/index.html.3612ef71.js b/assets/index.html.a15f486d.js
                                      similarity index 85%
                                      rename from assets/index.html.3612ef71.js
                                      rename to assets/index.html.a15f486d.js
                                      index ae34d0b4..b38f0fb2 100644
                                      --- a/assets/index.html.3612ef71.js
                                      +++ b/assets/index.html.a15f486d.js
                                      @@ -1 +1 @@
                                      -const e={key:"v-d5c1c75c",path:"/%E8%AE%A1%E7%AE%97%E6%9C%BA%E5%9F%BA%E7%A1%80/",title:"",lang:"zh-CN",frontmatter:{},excerpt:"",headers:[{level:2,title:"\u64CD\u4F5C\u7CFB\u7EDF",slug:"\u64CD\u4F5C\u7CFB\u7EDF",children:[]}],git:{updatedTime:1710173765e3,contributors:[{name:"shailene",email:"64005626+shaileneF@users.noreply.github.com",commits:1}]},filePathRelative:"\u8BA1\u7B97\u673A\u57FA\u7840/README.md"};export{e as data};
                                      +const e={key:"v-d5c1c75c",path:"/%E8%AE%A1%E7%AE%97%E6%9C%BA%E5%9F%BA%E7%A1%80/",title:"",lang:"zh-CN",frontmatter:{},excerpt:"",headers:[{level:2,title:"\u64CD\u4F5C\u7CFB\u7EDF",slug:"\u64CD\u4F5C\u7CFB\u7EDF",children:[]}],git:{updatedTime:1710173784e3,contributors:[{name:"shailene",email:"64005626+shaileneF@users.noreply.github.com",commits:1}]},filePathRelative:"\u8BA1\u7B97\u673A\u57FA\u7840/README.md"};export{e as data};
                                      diff --git a/assets/index.html.f11d2763.js b/assets/index.html.c7d52ef1.js
                                      similarity index 58%
                                      rename from assets/index.html.f11d2763.js
                                      rename to assets/index.html.c7d52ef1.js
                                      index d7d48515..5053d392 100644
                                      --- a/assets/index.html.f11d2763.js
                                      +++ b/assets/index.html.c7d52ef1.js
                                      @@ -1 +1 @@
                                      -import{_ as e}from"./app.0d029894.js";const _={};function r(n,t){return null}var f=e(_,[["render",r],["__file","index.html.vue"]]);export{f as default};
                                      +import{_ as e}from"./app.f8791b52.js";const _={};function r(n,t){return null}var f=e(_,[["render",r],["__file","index.html.vue"]]);export{f as default};
                                      diff --git a/assets/index.html.39572673.js b/assets/index.html.debf178a.js
                                      similarity index 81%
                                      rename from assets/index.html.39572673.js
                                      rename to assets/index.html.debf178a.js
                                      index 5e84fada..279e325a 100644
                                      --- a/assets/index.html.39572673.js
                                      +++ b/assets/index.html.debf178a.js
                                      @@ -1 +1 @@
                                      -const e={key:"v-73197d7b",path:"/%E5%89%8D%E7%AB%AF/",title:"",lang:"zh-CN",frontmatter:{},excerpt:"",headers:[{level:2,title:"Vue",slug:"vue",children:[]}],git:{updatedTime:1710173765e3,contributors:[{name:"shailene",email:"64005626+shaileneF@users.noreply.github.com",commits:1}]},filePathRelative:"\u524D\u7AEF/README.md"};export{e as data};
                                      +const e={key:"v-73197d7b",path:"/%E5%89%8D%E7%AB%AF/",title:"",lang:"zh-CN",frontmatter:{},excerpt:"",headers:[{level:2,title:"Vue",slug:"vue",children:[]}],git:{updatedTime:1710173784e3,contributors:[{name:"shailene",email:"64005626+shaileneF@users.noreply.github.com",commits:1}]},filePathRelative:"\u524D\u7AEF/README.md"};export{e as data};
                                      diff --git a/assets/index.html.a6f628ba.js b/assets/index.html.e11e6091.js
                                      similarity index 90%
                                      rename from assets/index.html.a6f628ba.js
                                      rename to assets/index.html.e11e6091.js
                                      index 951dbbf4..21f3f8d9 100644
                                      --- a/assets/index.html.a6f628ba.js
                                      +++ b/assets/index.html.e11e6091.js
                                      @@ -1 +1 @@
                                      -import{_ as n,r as o,o as r,c as s,a as e,b as c,w as l,F as _,d as t}from"./app.0d029894.js";const d={},B=e("h2",{id:"\u64CD\u4F5C\u7CFB\u7EDF",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#\u64CD\u4F5C\u7CFB\u7EDF","aria-hidden":"true"},"#"),t(" \u64CD\u4F5C\u7CFB\u7EDF")],-1),i=t("\u64CD\u4F5C\u7CFB\u7EDF");function E(h,u){const a=o("RouterLink");return r(),s(_,null,[B,e("ul",null,[e("li",null,[c(a,{to:"/%E8%AE%A1%E7%AE%97%E6%9C%BA%E5%9F%BA%E7%A1%80/%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F/%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F.html"},{default:l(()=>[i]),_:1})])])],64)}var f=n(d,[["render",E],["__file","index.html.vue"]]);export{f as default};
                                      +import{_ as n,r as o,o as r,c as s,a as e,b as c,w as l,F as _,d as t}from"./app.f8791b52.js";const d={},B=e("h2",{id:"\u64CD\u4F5C\u7CFB\u7EDF",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#\u64CD\u4F5C\u7CFB\u7EDF","aria-hidden":"true"},"#"),t(" \u64CD\u4F5C\u7CFB\u7EDF")],-1),i=t("\u64CD\u4F5C\u7CFB\u7EDF");function E(h,u){const a=o("RouterLink");return r(),s(_,null,[B,e("ul",null,[e("li",null,[c(a,{to:"/%E8%AE%A1%E7%AE%97%E6%9C%BA%E5%9F%BA%E7%A1%80/%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F/%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F.html"},{default:l(()=>[i]),_:1})])])],64)}var f=n(d,[["render",E],["__file","index.html.vue"]]);export{f as default};
                                      diff --git a/assets/index.html.84d9f956.js b/assets/index.html.e76ca8fd.js
                                      similarity index 91%
                                      rename from assets/index.html.84d9f956.js
                                      rename to assets/index.html.e76ca8fd.js
                                      index 628327f3..d561ad53 100644
                                      --- a/assets/index.html.84d9f956.js
                                      +++ b/assets/index.html.e76ca8fd.js
                                      @@ -1 +1 @@
                                      -import{_ as r,r as o,o as l,c as i,a as e,b as s,w as a,F as d,d as t}from"./app.0d029894.js";const c={},_=e("h2",{id:"design-patterns",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#design-patterns","aria-hidden":"true"},"#"),t(" Design Patterns")],-1),u=t("\u8BBE\u8BA1\u6A21\u5F0F1"),E=t("\u8BBE\u8BA1\u6A21\u5F0F2");function h(p,m){const n=o("RouterLink");return l(),i(d,null,[_,e("ul",null,[e("li",null,[e("p",null,[s(n,{to:"/Design-patterns/design-patterns-1/%E8%AE%BE%E8%AE%A1%E6%A8%A1%E5%BC%8F1.html"},{default:a(()=>[u]),_:1})])]),e("li",null,[e("p",null,[s(n,{to:"/Design-patterns/design-patterns-2/%E8%AE%BE%E8%AE%A1%E6%A8%A1%E5%BC%8F2.html"},{default:a(()=>[E]),_:1})])])])],64)}var A=r(c,[["render",h],["__file","index.html.vue"]]);export{A as default};
                                      +import{_ as r,r as o,o as l,c as i,a as e,b as s,w as a,F as d,d as t}from"./app.f8791b52.js";const c={},_=e("h2",{id:"design-patterns",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#design-patterns","aria-hidden":"true"},"#"),t(" Design Patterns")],-1),u=t("\u8BBE\u8BA1\u6A21\u5F0F1"),E=t("\u8BBE\u8BA1\u6A21\u5F0F2");function h(p,m){const n=o("RouterLink");return l(),i(d,null,[_,e("ul",null,[e("li",null,[e("p",null,[s(n,{to:"/Design-patterns/design-patterns-1/%E8%AE%BE%E8%AE%A1%E6%A8%A1%E5%BC%8F1.html"},{default:a(()=>[u]),_:1})])]),e("li",null,[e("p",null,[s(n,{to:"/Design-patterns/design-patterns-2/%E8%AE%BE%E8%AE%A1%E6%A8%A1%E5%BC%8F2.html"},{default:a(()=>[E]),_:1})])])])],64)}var A=r(c,[["render",h],["__file","index.html.vue"]]);export{A as default};
                                      diff --git a/assets/index.html.2e98ec0b.js b/assets/index.html.eb4fe638.js
                                      similarity index 82%
                                      rename from assets/index.html.2e98ec0b.js
                                      rename to assets/index.html.eb4fe638.js
                                      index 3221c297..7dd64177 100644
                                      --- a/assets/index.html.2e98ec0b.js
                                      +++ b/assets/index.html.eb4fe638.js
                                      @@ -1 +1 @@
                                      -const e={key:"v-4e3aed14",path:"/Design-patterns/",title:"",lang:"zh-CN",frontmatter:{},excerpt:"",headers:[{level:2,title:"Design Patterns",slug:"design-patterns",children:[]}],git:{updatedTime:1710173765e3,contributors:[{name:"shailene",email:"64005626+shaileneF@users.noreply.github.com",commits:1}]},filePathRelative:"Design-patterns/README.md"};export{e as data};
                                      +const e={key:"v-4e3aed14",path:"/Design-patterns/",title:"",lang:"zh-CN",frontmatter:{},excerpt:"",headers:[{level:2,title:"Design Patterns",slug:"design-patterns",children:[]}],git:{updatedTime:1710173784e3,contributors:[{name:"shailene",email:"64005626+shaileneF@users.noreply.github.com",commits:1}]},filePathRelative:"Design-patterns/README.md"};export{e as data};
                                      diff --git a/assets/kafka.html.2e570e06.js b/assets/kafka.html.7f75cf5c.js
                                      similarity index 99%
                                      rename from assets/kafka.html.2e570e06.js
                                      rename to assets/kafka.html.7f75cf5c.js
                                      index 2a6ba4cd..344a43e9 100644
                                      --- a/assets/kafka.html.2e570e06.js
                                      +++ b/assets/kafka.html.7f75cf5c.js
                                      @@ -1,4 +1,4 @@
                                      -import{_ as a,e as n}from"./app.0d029894.js";var s="/study/assets/image-20220826172354324.7b88b75e.png",p="/study/assets/image-20220830151744696.4ee3b25f.png",t="/study/assets/image-20220830195113688.64927ec4.png";const o={},e=n('

                                      kafka

                                      \u4E00\u3001\u6982\u8FF0

                                      \u5B9A\u4E49

                                      1. Kafka\u4F20\u7EDF\u5B9A\u4E49\uFF1AKafka\u662F\u4E00\u4E2A\u5206\u5E03\u5F0F\u7684\u57FA\u4E8E\u53D1\u5E03/\u8BA2\u9605\u6A21\u5F0F\u7684\u6D88\u606F\u961F\u5217\uFF0C\u4E3B\u8981\u5E94\u7528\u4E8E\u5927\u6570\u636E\u5B9E\u65F6\u5904\u7406\u9886\u57DF\u3002

                                      2. \u4F20\u7EDF\u7684\u6D88\u606F\u961F\u5217\u7684\u4E3B\u8981\u5E94\u7528\u573A\u666F\uFF1A\u7F13\u51B2/\u524A\u5CF0\u3001\u89E3\u8026\u3001\u5F02\u6B65\u901A\u4FE1\u3002

                                        • \u7F13\u51B2\u3001\u524A\u5CF0\uFF1A\u6709\u52A9\u4E8E\u63A7\u5236\u548C\u4F18\u5316\u6570\u636E\u6D41\u7ECF\u8FC7\u7CFB\u7EDF\u7684\u901F\u5EA6\uFF0C\u89E3\u51B3\u751F\u4EA7\u6D88\u606F\u548C\u6D88\u8D39\u6D88\u606F\u7684\u5904\u7406\u901F\u5EA6\u4E0D\u4E00\u81F4\u7684\u60C5\u51B5\u3002

                                        • \u89E3\u8026\uFF1A\u60F3\u628A\u6570\u636E\u4F20\u5230\u5927\u6570\u636E\u5904\u7406\u5F15\u64CE\uFF0C\u6570\u636E\u7684\u6765\u6E90\u6709\u591A\u79CD\uFF0C\u4F8B\u5982MySQL\u3001Flume\u7B49\uFF0C\u6570\u636E\u7684\u63A5\u6536\u7AEF\u4E5F\u6709\u591A\u79CD\uFF0C\u6BD4\u5982hadoop\u3001flink\uFF0Ckafka\u7684\u89E3\u8026\u7279\u6027\u5141\u8BB8\u6211\u4EEC\u5206\u522B\u5728\u751F\u4EA7\u7AEF\u548C\u6D88\u8D39\u7AEF\u72EC\u7ACB\u8FDB\u884C\u6570\u636E\u7684\u5904\u7406\uFF0C\u53EA\u8981\u4FDD\u8BC1\u6570\u636E\u9075\u5B88\u540C\u6837\u7684\u63A5\u53E3\u7EA6\u675F\u3002

                                          \u4F8B\u5982\u6570\u636E\u7684\u6765\u6E90\u662FCPU\u91C7\u96C6\u6570\u636E\uFF0C\u6216\u8005\u6587\u4EF6\uFF0C\u90A3\u4E48\u63A5\u6536\u7AEF\u662FMySQL\u6216\u8005es\u7B49\uFF0C\u4E2D\u95F4\u9700\u8981kafka\u6765\u8FDB\u884C\u7F13\u51B2\uFF0C\u56E0\u4E3A\u6570\u636E\u548C\u6587\u4EF6\u8981\u63A8\u9001\u5230oss\u8FDB\u884C\u5206\u6790\uFF0C\u800C\u53EA\u9700\u8981\u628A\u6587\u4EF6\u4FE1\u606F\u5199\u5165kafka\uFF0C\u6587\u4EF6\u7684\u5206\u6790\u901A\u5E38\u8F83\u6162\uFF0C\u8FD9\u6837\u6D88\u8D39\u7AEF\u8981\u82B1\u7684\u65F6\u95F4\u66F4\u591A\uFF0C\u8FD9\u6837\u5C31\u8FDB\u884C\u4E86\u7F13\u51B2\uFF0C\u89E3\u51B3\u4E86\u6D88\u8D39\u7AEF\u548C\u751F\u4EA7\u7AEF\u901F\u7387\u4E0D\u4E00\u81F4\u7684\u95EE\u9898\u3002

                                          \u89E3\u8026\u6307\u7684\u662F\u89E3\u751F\u4EA7\u7AEF\u548C\u6D88\u8D39\u7AEF\u7684\u8026\u5408\u3002

                                        • \u5F02\u6B65\u901A\u4FE1

                                          \u5141\u8BB8\u7528\u6237\u628A\u4E00\u4E2A\u6D88\u606F\u653E\u5165\u961F\u5217\uFF0C\u4F46\u5E76\u4E0D\u7ACB\u5373\u5904\u7406\u5B83\uFF0C\u7136\u540E\u5728\u9700\u8981\u7684\u65F6\u5019\u518D\u53BB\u5904\u7406\u4ED6\u4EEC\u3002

                                          image-20220826172354324

                                      \u4E24\u79CD\u6A21\u5F0F

                                      1. \u70B9\u5BF9\u70B9\u6A21\u5F0F\uFF1A

                                        \u4E00\u4E2A\u751F\u4EA7\u8005\u5BF9\u5E94\u4E8E\u4E00\u4E2A\u6D88\u8D39\u8005

                                      2. \u53D1\u5E03\u8BA2\u9605\u6A21\u5F0F

                                        • \u4E3B\u6D41\u3002

                                        • \u53EF\u4EE5\u6709\u591A\u4E2Atopic

                                        • \u6D88\u8D39\u8005\u6D88\u8D39\u6570\u636E\u4E4B\u540E\u4E0D\u5220\u9664\u6570\u636E\u3002

                                        • \u6BCF\u4E2A\u6D88\u8D39\u8005\u76F8\u4E92\u72EC\u7ACB\uFF0C\u90FD\u53EF\u4EE5\u6D88\u8D39\u5230\u6570\u636E\u3002

                                      \u4E8C\u3001\u57FA\u7840\u67B6\u6784

                                      \u7B80\u4ECB

                                      1. \u4E3A\u65B9\u4FBF\u6269\u5C55\uFF0C\u63D0\u9AD8\u541E\u5410\u91CF\uFF0C\u4E00\u4E2Atopic\u5206\u4E3A\u591A\u4E2Apartition

                                        \u8FD9\u662F\u5206\u533A\u7684\u65B9\u5F0F\u3002

                                        \u6BD4\u5982100T\u7684\u6570\u636E\u8981\u53D1\u5F80\u4E00\u4E2Atopic\uFF0C\u8FD9\u4E2Atopic\u53EF\u4EE5\u8FDB\u884C\u5206\u533A\u3002

                                      2. \u914D\u5408\u5206\u533A\u7684\u8BBE\u8BA1\uFF0C\u63D0\u51FA\u6D88\u8D39\u8005\u7EC4\u7684\u6982\u5FF5\uFF0C\u7EC4\u5185\u6BCF\u4E2A\u6D88\u8D39\u8005\u5E76\u884C\u6D88\u8D39\u3002

                                        \u4E00\u4E2Abroker\u5C31\u662F\u96C6\u7FA4\u91CC\u7684\u4E00\u53F0\u670D\u52A1\u5668\u3002

                                        \u6BCF\u4E2A\u6D88\u8D39\u8005\u8D1F\u8D23\u4E00\u4E2Apartition\u7684\u6570\u636E\u7684\u6D88\u8D39\u3002

                                        \u4E00\u4E2A\u6D88\u8D39\u8005\u7EC4\u8D1F\u8D23\u4E00\u4E2Atopic\u7684\u6D88\u8D39\u3002

                                        \u4E00\u4E2A\u6D88\u8D39\u8005\u7EC4\u6709\u591A\u4E2A\u6D88\u8D39\u8005\u3002

                                        \u4E00\u4E2Atopic\u53EF\u4EE5\u6709\u591A\u4E2Apartition\uFF0C\u5206\u522B\u5728\u4E0D\u540C\u7684broker\u4E0A\u3002

                                        \u751F\u4EA7\u8005\u53D1\u9001\u6570\u636E\u5C31\u662F\u53D1\u9001\u7ED9broker\uFF0C\u5373\u670D\u52A1\u5668\u3002

                                        \u4E00\u4E2Apartition\u7684\u6570\u636E\u53EA\u80FD\u7531\u4E00\u4E2A\u6D88\u8D39\u8005\u6765\u8FDB\u884C\u6D88\u8D39\u3002

                                        \u5982\u679C\u4E00\u4E2A\u5206\u533A\u7684\u6570\u636E\u7531\u591A\u4E2A\u6D88\u8D39\u8005\u6765\u8FDB\u884C\u6D88\u8D39\uFF0C\u5C31\u5BB9\u6613\u4EA7\u751F\u6570\u636E\u5B89\u5168\u95EE\u9898\u3002

                                        \u4E5F\u5C31\u662F\u8BF4\uFF0C\u4E00\u4E2Atopic\u53EF\u4EE5\u5206\u4E3A\u591A\u4E2Apartition\uFF08\u4E5F\u5C31\u662F\u8BF4\u4E00\u4E2Atopic\u5BF9\u5E94\u4E8E\u4E00\u4E2Abroker\u96C6\u7FA4\uFF09\uFF0C\u6BCF\u4E2Apartition\u7531\u4E00\u4E2A\u6D88\u8D39\u8005\u8FDB\u884C\u6D88\u8D39\uFF0C\u51E0\u4E2Apartition\u5C31\u5BF9\u5E94\u4E8E\u51E0\u4E2A\u6D88\u8D39\u8005\uFF0C\u8FD9\u4E9B\u6D88\u8D39\u8005\u7EC4\u6210\u4E00\u4E2A\u6D88\u8D39\u8005\u7EC4\uFF0C\u4E00\u4E2Atopic\u5C31\u5BF9\u5E94\u4E8E\u4E00\u4E2A\u6D88\u8D39\u8005\u7EC4\u5373\u591A\u4E2A\u6D88\u8D39\u8005\u3002

                                        \u6240\u4EE5\u4E0D\u8981\u7406\u89E3\u4E3A\u4E00\u4E2Atopic\u7684\u6570\u636E\u88AB\u6D88\u8D39\u8005\u7EC4\u7684\u6D88\u8D39\u8005\u5E76\u884C\u6D88\u8D39\u4F1A\u4EA7\u751F\u5B89\u5168\u95EE\u9898\uFF0C\u56E0\u4E3Atopic\u5206\u4E86\u533A\u3002

                                      3. \u4E3A\u63D0\u9AD8\u53EF\u7528\u6027\uFF0C\u4E3A\u6BCF\u4E2Apartition\u589E\u52A0\u82E5\u5E72\u526F\u672C

                                      4. zookeeper\u4F1A\u5B58\u50A8kafka\u96C6\u7FA4\uFF0C\u54EA\u4E9B\u670D\u52A1\u5668\u4E0A\u7EBF\u4E86\uFF0C\u8BB0\u5F55\u670D\u52A1\u5668\u8282\u70B9\u8FD0\u884C\u7684\u72B6\u6001

                                        \u8BB0\u5F55\u6BCF\u4E00\u4E2Apartition\uFF0C\u8C01\u662Fleader

                                      5. kafka2.8.0\u4EE5\u540E\u4E5F\u53EF\u4EE5\u914D\u7F6E\u4E0D\u91C7\u7528zookeeper

                                      6. \u5206\u533A\u6570\u5927\u4E8E\u4E00\u4E2A\u7EC4\u91CC\u6D88\u8D39\u8005\u6570\u91CF\u65F6\uFF0C\u6709\u7684\u6D88\u8D39\u8005\u5BF9\u5E94\u591A\u4E2A\u5206\u533A\uFF0C\u5F53\u5206\u533A\u6570\u7B49\u4E8E\u6D88\u8D39\u8005\u6570\u7684\u65F6\u5019\uFF0C\u6BCF\u4E2A\u6D88\u8D39\u8005\u5BF9\u5E94\u4E8E\u4E00\u4E2A\u5206\u533A\u3002

                                      \u6982\u5FF5

                                      image-20220830151744696

                                      1. topic

                                        \u4E3B\u9898\u3002\u6BCF\u6761\u53D1\u5E03\u5230kafka\u7684\u6D88\u606F\u90FD\u6709\u4E00\u4E2A\u7C7B\u522B\uFF0C\u8FD9\u4E2A\u7C7B\u522B\u88AB\u79F0\u4E3Atopic\u3002

                                        \u7269\u7406\u4E0A\u4E0D\u540Ctopic\u7684\u6D88\u606F\u5206\u5F00\u5B58\u50A8\uFF0C\u4E00\u4E2Atopic\u7684\u6D88\u606F\u4E5F\u4E0D\u5E76\u4E0D\u662F\u5B58\u50A8\u5728\u4E00\u53F0\u670D\u52A1\u5668\u4E0A\u3002

                                        \u903B\u8F91\u4E0A\u4E00\u4E2Atopic\u7684\u6D88\u606F\u867D\u7136\u4FDD\u5B58\u4E8E\u4E00\u4E2A\u6216\u591A\u4E2Abroker\u4E0A\uFF0C\u4F46\u7528\u6237\u53EA\u9700\u6307\u5B9A\u6D88\u606F\u7684topic\u5373\u53EF\u751F\u4EA7\u548C\u6D88\u8D39\u6570\u636E\u800C\u4E0D\u9700\u8981\u5173\u5FC3\u6570\u636E\u5B58\u4E8E\u4F55\u5904\u3002

                                      2. partition\uFF08\u5206\u533A\uFF09

                                        partition\u662F\u7269\u7406\u4E0A\u7684\u6982\u5FF5\uFF0Ctopic\u53EF\u4EE5\u8BA4\u4E3A\u662F\u903B\u8F91\u4E0A\u7684\u6982\u5FF5\u3002

                                        \u6BCF\u4E2Atopic\u5305\u542B\u4E00\u4E2A\u6216\u591A\u4E2Apartition\uFF0C\u521B\u5EFAtopic\u65F6\u53EF\u4EE5\u6307\u5B9A\u8BE5topic\u5BF9\u5E94\u7684partition\u6570\u91CF\u3002

                                        \u53EF\u4EE5\u8BA4\u4E3A\u662F\u771F\u5B9E\u5B58\u653E\u6570\u636E\u7684\u5730\u65B9\u3002

                                      3. Replicas of partition\uFF08\u5206\u533A\u5907\u4EFD\uFF09

                                        \u526F\u672C\u53EA\u662F\u4E00\u4E2A\u5206\u533A\u7684\u5907\u4EFD\uFF0C\u526F\u672C\u4ECE\u4E0D\u8BFB\u53D6\u6216\u5199\u5165\u6570\u636E\uFF0C\u4ED6\u4EEC\u7528\u4E8E\u9632\u6B62\u6570\u636E\u4E22\u5931\u3002

                                      4. broker

                                        kafka\u96C6\u7FA4\u5305\u542B\u4E00\u4E2A\u6216\u591A\u4E2A\u670D\u52A1\u5668\uFF0C\u8FD9\u79CD\u670D\u52A1\u5668\u8282\u70B9\u88AB\u79F0\u4E3Abroker\u3002

                                        broker\u5B58\u50A8topic\u7684\u6570\u636E\u3002\u5982\u679C\u67D0topic\u6709N\u4E2Apartition\uFF0C\u96C6\u7FA4\u6709N\u4E2Abroker\uFF0C\u90A3\u4E48\u6BCF\u4E2Abroker\u5B58\u50A8\u8BE5topic\u7684\u4E00\u4E2Apartition\u3002

                                        \u5982\u679C\u67D0topic\u6709N\u4E2Apartition\uFF0C\u96C6\u7FA4\u6709(N+M)\u4E2Abroker\uFF0C\u90A3\u4E48\u5176\u4E2D\u6709N\u4E2Abroker\u5B58\u50A8\u8BE5topic\u7684\u4E00\u4E2Apartition\uFF0C\u5269\u4E0B\u7684M\u4E2Abroker\u4E0D\u5B58\u50A8\u8BE5topic\u7684partition\u6570\u636E\u3002

                                        \u5982\u679C\u67D0topic\u6709N\u4E2Apartition\uFF0C\u96C6\u7FA4\u4E2Dbroker\u6570\u76EE\u5C11\u4E8EN\u4E2A\uFF0C\u90A3\u4E48\u4E00\u4E2Abroker\u5B58\u50A8\u8BE5topic\u7684\u4E00\u4E2A\u6216\u591A\u4E2Apartition\u3002\u5728\u5B9E\u9645\u751F\u4EA7\u73AF\u5883\u4E2D\uFF0C\u5C3D\u91CF\u907F\u514D\u8FD9\u79CD\u60C5\u51B5\u7684\u53D1\u751F\uFF0C\u8FD9\u79CD\u60C5\u51B5\u5BB9\u6613\u5BFC\u81F4Kafka\u96C6\u7FA4\u6570\u636E\u4E0D\u5747\u8861\u3002

                                      5. kafka cluster

                                        kafka \u96C6\u7FA4

                                      6. producers

                                        \u751F\u4EA7\u8005\u3002\u751F\u4EA7\u8005\u662F\u53D1\u9001\u7ED9\u4E00\u4E2A\u6216\u591A\u4E2Akafka\u4E3B\u9898\u7684\u6D88\u606F\u7684\u53D1\u5E03\u8005\u3002\u751F\u4EA7\u8005\u5411kafka broker\u53D1\u9001\u6570\u636E\u3002\u751F\u4EA7\u8005\u8FD8\u53EF\u4EE5\u5411\u4ED6\u4EEC\u9009\u62E9\u7684\u5206\u533A\u53D1\u9001\u6D88\u606F\u3002

                                      7. consumers

                                        \u6D88\u8D39\u8005\u3002\u6BCF\u4E2A\u6D88\u8D39\u8005\u5C5E\u4E8E\u4E00\u4E2A\u7279\u5B9A\u7684consumer group\u3002\u53EF\u4E3A\u6BCF\u4E2Aconsumer\u6307\u5B9Agroup name\uFF0C\u82E5\u4E0D\u6307\u5B9Agroup name\uFF0C\u5219\u5C5E\u4E8E\u9ED8\u8BA4\u7684group\u3002

                                      8. consumer group

                                        \u6D88\u8D39\u8005\u7EC4\u3002\u662F\u903B\u8F91\u4E0A\u7684\u6982\u5FF5\uFF0C\u662Fkafka\u5B9E\u73B0\u5355\u64AD\u548C\u5E7F\u64AD\u4E24\u79CD\u6D88\u606F\u6A21\u578B\u7684\u624B\u6BB5\u3002\u540C\u4E00\u4E2Atopic\u7684\u6570\u636E\uFF0C\u4F1A\u5E7F\u64AD\u7ED9\u4E0D\u540C\u7684\u6D88\u8D39\u8005\u7EC4\uFF0C\u540C\u4E00\u4E2Agroup\u4E2D\u7684consumer\uFF0C\u53EA\u6709\u4E00\u4E2Aconsumer\u80FD\u62FF\u5230\u8FD9\u4E2A\u6570\u636E\u3002\u6362\u53E5\u8BDD\u8BF4\uFF0C\u5BF9\u4E8E\u540C\u4E00\u4E2Atopic\uFF0C\u6BCF\u4E2Agroup\u90FD\u53EF\u4EE5\u62FF\u5230\u540C\u6837\u7684\u6240\u6709\u6570\u636E\uFF0C\u4F46\u662F\u6570\u636E\u53EA\u80FD\u88ABgroup\u4E2D\u7684\u4E00\u4E2Aconsumer\u6D88\u8D39\u3002

                                        group\u5185\u7684\u6D88\u8D39\u8005\u53EF\u4EE5\u4F7F\u7528\u591A\u7EBF\u7A0B\u6765\u5B9E\u73B0\u3002\u6D88\u8D39\u8005\u7EC4\u7684\u6D88\u8D39\u8005\u7684\u6570\u91CF\uFF0C\u901A\u5E38\u4E0D\u8D85\u8FC7partition\u7684\u6570\u91CF\uFF0C\u4E14\u4E8C\u8005\u6700\u597D\u4FDD\u6301\u6574\u6570\u500D\u5173\u7CFB\uFF0C\u56E0\u4E3Akafka\u5728\u8BBE\u8BA1\u65F6\u5047\u5B9A\u4E86\u4E00\u4E2Apartition\u53EA\u80FD\u88AB\u4E00\u4E2A\u6D88\u8D39\u8005\u6D88\u8D39\u3002

                                      \u4E09\u3001\u5FEB\u901F\u5165\u95E8

                                      \u90E8\u7F72kafka\u96C6\u7FA4

                                      1. \u53EF\u4EE5\u901A\u8FC7\u4E09\u53F0\u670D\u52A1\u5668\u7684\u65B9\u5F0F\uFF08\u4E09\u53F0\u865A\u62DF\u673A\uFF09

                                        \u4E5F\u53EF\u4EE5\u901A\u8FC7\u4E00\u53F0linux\u670D\u52A1\u5668\uFF0C\u4E09\u4E2A\u670D\u52A1\u7AEF\u53E3\u7684\u65B9\u5F0F\u6765\u6A21\u62DFkafka\u96C6\u7FA4\u3002

                                        \u6211\u91C7\u7528\u5728\u4E00\u53F0\u673A\u5668\u4E0A\u8BBE\u7F6E\u4E09\u4E2A\u8282\u70B9\u7684\u65B9\u5F0F\u3002

                                      2. \u4E3A\u6BCF\u4E2Abroker\u521B\u5EFA\u4E00\u4E2A\u914D\u7F6E\u6587\u4EF6

                                        cp config/server.properties config/server-1.properties
                                        +import{_ as a,e as n}from"./app.f8791b52.js";var s="/study/assets/image-20220826172354324.7b88b75e.png",p="/study/assets/image-20220830151744696.4ee3b25f.png",t="/study/assets/image-20220830195113688.64927ec4.png";const o={},e=n('

                                        kafka

                                        \u4E00\u3001\u6982\u8FF0

                                        \u5B9A\u4E49

                                        1. Kafka\u4F20\u7EDF\u5B9A\u4E49\uFF1AKafka\u662F\u4E00\u4E2A\u5206\u5E03\u5F0F\u7684\u57FA\u4E8E\u53D1\u5E03/\u8BA2\u9605\u6A21\u5F0F\u7684\u6D88\u606F\u961F\u5217\uFF0C\u4E3B\u8981\u5E94\u7528\u4E8E\u5927\u6570\u636E\u5B9E\u65F6\u5904\u7406\u9886\u57DF\u3002

                                        2. \u4F20\u7EDF\u7684\u6D88\u606F\u961F\u5217\u7684\u4E3B\u8981\u5E94\u7528\u573A\u666F\uFF1A\u7F13\u51B2/\u524A\u5CF0\u3001\u89E3\u8026\u3001\u5F02\u6B65\u901A\u4FE1\u3002

                                          • \u7F13\u51B2\u3001\u524A\u5CF0\uFF1A\u6709\u52A9\u4E8E\u63A7\u5236\u548C\u4F18\u5316\u6570\u636E\u6D41\u7ECF\u8FC7\u7CFB\u7EDF\u7684\u901F\u5EA6\uFF0C\u89E3\u51B3\u751F\u4EA7\u6D88\u606F\u548C\u6D88\u8D39\u6D88\u606F\u7684\u5904\u7406\u901F\u5EA6\u4E0D\u4E00\u81F4\u7684\u60C5\u51B5\u3002

                                          • \u89E3\u8026\uFF1A\u60F3\u628A\u6570\u636E\u4F20\u5230\u5927\u6570\u636E\u5904\u7406\u5F15\u64CE\uFF0C\u6570\u636E\u7684\u6765\u6E90\u6709\u591A\u79CD\uFF0C\u4F8B\u5982MySQL\u3001Flume\u7B49\uFF0C\u6570\u636E\u7684\u63A5\u6536\u7AEF\u4E5F\u6709\u591A\u79CD\uFF0C\u6BD4\u5982hadoop\u3001flink\uFF0Ckafka\u7684\u89E3\u8026\u7279\u6027\u5141\u8BB8\u6211\u4EEC\u5206\u522B\u5728\u751F\u4EA7\u7AEF\u548C\u6D88\u8D39\u7AEF\u72EC\u7ACB\u8FDB\u884C\u6570\u636E\u7684\u5904\u7406\uFF0C\u53EA\u8981\u4FDD\u8BC1\u6570\u636E\u9075\u5B88\u540C\u6837\u7684\u63A5\u53E3\u7EA6\u675F\u3002

                                            \u4F8B\u5982\u6570\u636E\u7684\u6765\u6E90\u662FCPU\u91C7\u96C6\u6570\u636E\uFF0C\u6216\u8005\u6587\u4EF6\uFF0C\u90A3\u4E48\u63A5\u6536\u7AEF\u662FMySQL\u6216\u8005es\u7B49\uFF0C\u4E2D\u95F4\u9700\u8981kafka\u6765\u8FDB\u884C\u7F13\u51B2\uFF0C\u56E0\u4E3A\u6570\u636E\u548C\u6587\u4EF6\u8981\u63A8\u9001\u5230oss\u8FDB\u884C\u5206\u6790\uFF0C\u800C\u53EA\u9700\u8981\u628A\u6587\u4EF6\u4FE1\u606F\u5199\u5165kafka\uFF0C\u6587\u4EF6\u7684\u5206\u6790\u901A\u5E38\u8F83\u6162\uFF0C\u8FD9\u6837\u6D88\u8D39\u7AEF\u8981\u82B1\u7684\u65F6\u95F4\u66F4\u591A\uFF0C\u8FD9\u6837\u5C31\u8FDB\u884C\u4E86\u7F13\u51B2\uFF0C\u89E3\u51B3\u4E86\u6D88\u8D39\u7AEF\u548C\u751F\u4EA7\u7AEF\u901F\u7387\u4E0D\u4E00\u81F4\u7684\u95EE\u9898\u3002

                                            \u89E3\u8026\u6307\u7684\u662F\u89E3\u751F\u4EA7\u7AEF\u548C\u6D88\u8D39\u7AEF\u7684\u8026\u5408\u3002

                                          • \u5F02\u6B65\u901A\u4FE1

                                            \u5141\u8BB8\u7528\u6237\u628A\u4E00\u4E2A\u6D88\u606F\u653E\u5165\u961F\u5217\uFF0C\u4F46\u5E76\u4E0D\u7ACB\u5373\u5904\u7406\u5B83\uFF0C\u7136\u540E\u5728\u9700\u8981\u7684\u65F6\u5019\u518D\u53BB\u5904\u7406\u4ED6\u4EEC\u3002

                                            image-20220826172354324

                                        \u4E24\u79CD\u6A21\u5F0F

                                        1. \u70B9\u5BF9\u70B9\u6A21\u5F0F\uFF1A

                                          \u4E00\u4E2A\u751F\u4EA7\u8005\u5BF9\u5E94\u4E8E\u4E00\u4E2A\u6D88\u8D39\u8005

                                        2. \u53D1\u5E03\u8BA2\u9605\u6A21\u5F0F

                                          • \u4E3B\u6D41\u3002

                                          • \u53EF\u4EE5\u6709\u591A\u4E2Atopic

                                          • \u6D88\u8D39\u8005\u6D88\u8D39\u6570\u636E\u4E4B\u540E\u4E0D\u5220\u9664\u6570\u636E\u3002

                                          • \u6BCF\u4E2A\u6D88\u8D39\u8005\u76F8\u4E92\u72EC\u7ACB\uFF0C\u90FD\u53EF\u4EE5\u6D88\u8D39\u5230\u6570\u636E\u3002

                                        \u4E8C\u3001\u57FA\u7840\u67B6\u6784

                                        \u7B80\u4ECB

                                        1. \u4E3A\u65B9\u4FBF\u6269\u5C55\uFF0C\u63D0\u9AD8\u541E\u5410\u91CF\uFF0C\u4E00\u4E2Atopic\u5206\u4E3A\u591A\u4E2Apartition

                                          \u8FD9\u662F\u5206\u533A\u7684\u65B9\u5F0F\u3002

                                          \u6BD4\u5982100T\u7684\u6570\u636E\u8981\u53D1\u5F80\u4E00\u4E2Atopic\uFF0C\u8FD9\u4E2Atopic\u53EF\u4EE5\u8FDB\u884C\u5206\u533A\u3002

                                        2. \u914D\u5408\u5206\u533A\u7684\u8BBE\u8BA1\uFF0C\u63D0\u51FA\u6D88\u8D39\u8005\u7EC4\u7684\u6982\u5FF5\uFF0C\u7EC4\u5185\u6BCF\u4E2A\u6D88\u8D39\u8005\u5E76\u884C\u6D88\u8D39\u3002

                                          \u4E00\u4E2Abroker\u5C31\u662F\u96C6\u7FA4\u91CC\u7684\u4E00\u53F0\u670D\u52A1\u5668\u3002

                                          \u6BCF\u4E2A\u6D88\u8D39\u8005\u8D1F\u8D23\u4E00\u4E2Apartition\u7684\u6570\u636E\u7684\u6D88\u8D39\u3002

                                          \u4E00\u4E2A\u6D88\u8D39\u8005\u7EC4\u8D1F\u8D23\u4E00\u4E2Atopic\u7684\u6D88\u8D39\u3002

                                          \u4E00\u4E2A\u6D88\u8D39\u8005\u7EC4\u6709\u591A\u4E2A\u6D88\u8D39\u8005\u3002

                                          \u4E00\u4E2Atopic\u53EF\u4EE5\u6709\u591A\u4E2Apartition\uFF0C\u5206\u522B\u5728\u4E0D\u540C\u7684broker\u4E0A\u3002

                                          \u751F\u4EA7\u8005\u53D1\u9001\u6570\u636E\u5C31\u662F\u53D1\u9001\u7ED9broker\uFF0C\u5373\u670D\u52A1\u5668\u3002

                                          \u4E00\u4E2Apartition\u7684\u6570\u636E\u53EA\u80FD\u7531\u4E00\u4E2A\u6D88\u8D39\u8005\u6765\u8FDB\u884C\u6D88\u8D39\u3002

                                          \u5982\u679C\u4E00\u4E2A\u5206\u533A\u7684\u6570\u636E\u7531\u591A\u4E2A\u6D88\u8D39\u8005\u6765\u8FDB\u884C\u6D88\u8D39\uFF0C\u5C31\u5BB9\u6613\u4EA7\u751F\u6570\u636E\u5B89\u5168\u95EE\u9898\u3002

                                          \u4E5F\u5C31\u662F\u8BF4\uFF0C\u4E00\u4E2Atopic\u53EF\u4EE5\u5206\u4E3A\u591A\u4E2Apartition\uFF08\u4E5F\u5C31\u662F\u8BF4\u4E00\u4E2Atopic\u5BF9\u5E94\u4E8E\u4E00\u4E2Abroker\u96C6\u7FA4\uFF09\uFF0C\u6BCF\u4E2Apartition\u7531\u4E00\u4E2A\u6D88\u8D39\u8005\u8FDB\u884C\u6D88\u8D39\uFF0C\u51E0\u4E2Apartition\u5C31\u5BF9\u5E94\u4E8E\u51E0\u4E2A\u6D88\u8D39\u8005\uFF0C\u8FD9\u4E9B\u6D88\u8D39\u8005\u7EC4\u6210\u4E00\u4E2A\u6D88\u8D39\u8005\u7EC4\uFF0C\u4E00\u4E2Atopic\u5C31\u5BF9\u5E94\u4E8E\u4E00\u4E2A\u6D88\u8D39\u8005\u7EC4\u5373\u591A\u4E2A\u6D88\u8D39\u8005\u3002

                                          \u6240\u4EE5\u4E0D\u8981\u7406\u89E3\u4E3A\u4E00\u4E2Atopic\u7684\u6570\u636E\u88AB\u6D88\u8D39\u8005\u7EC4\u7684\u6D88\u8D39\u8005\u5E76\u884C\u6D88\u8D39\u4F1A\u4EA7\u751F\u5B89\u5168\u95EE\u9898\uFF0C\u56E0\u4E3Atopic\u5206\u4E86\u533A\u3002

                                        3. \u4E3A\u63D0\u9AD8\u53EF\u7528\u6027\uFF0C\u4E3A\u6BCF\u4E2Apartition\u589E\u52A0\u82E5\u5E72\u526F\u672C

                                        4. zookeeper\u4F1A\u5B58\u50A8kafka\u96C6\u7FA4\uFF0C\u54EA\u4E9B\u670D\u52A1\u5668\u4E0A\u7EBF\u4E86\uFF0C\u8BB0\u5F55\u670D\u52A1\u5668\u8282\u70B9\u8FD0\u884C\u7684\u72B6\u6001

                                          \u8BB0\u5F55\u6BCF\u4E00\u4E2Apartition\uFF0C\u8C01\u662Fleader

                                        5. kafka2.8.0\u4EE5\u540E\u4E5F\u53EF\u4EE5\u914D\u7F6E\u4E0D\u91C7\u7528zookeeper

                                        6. \u5206\u533A\u6570\u5927\u4E8E\u4E00\u4E2A\u7EC4\u91CC\u6D88\u8D39\u8005\u6570\u91CF\u65F6\uFF0C\u6709\u7684\u6D88\u8D39\u8005\u5BF9\u5E94\u591A\u4E2A\u5206\u533A\uFF0C\u5F53\u5206\u533A\u6570\u7B49\u4E8E\u6D88\u8D39\u8005\u6570\u7684\u65F6\u5019\uFF0C\u6BCF\u4E2A\u6D88\u8D39\u8005\u5BF9\u5E94\u4E8E\u4E00\u4E2A\u5206\u533A\u3002

                                        \u6982\u5FF5

                                        image-20220830151744696

                                        1. topic

                                          \u4E3B\u9898\u3002\u6BCF\u6761\u53D1\u5E03\u5230kafka\u7684\u6D88\u606F\u90FD\u6709\u4E00\u4E2A\u7C7B\u522B\uFF0C\u8FD9\u4E2A\u7C7B\u522B\u88AB\u79F0\u4E3Atopic\u3002

                                          \u7269\u7406\u4E0A\u4E0D\u540Ctopic\u7684\u6D88\u606F\u5206\u5F00\u5B58\u50A8\uFF0C\u4E00\u4E2Atopic\u7684\u6D88\u606F\u4E5F\u4E0D\u5E76\u4E0D\u662F\u5B58\u50A8\u5728\u4E00\u53F0\u670D\u52A1\u5668\u4E0A\u3002

                                          \u903B\u8F91\u4E0A\u4E00\u4E2Atopic\u7684\u6D88\u606F\u867D\u7136\u4FDD\u5B58\u4E8E\u4E00\u4E2A\u6216\u591A\u4E2Abroker\u4E0A\uFF0C\u4F46\u7528\u6237\u53EA\u9700\u6307\u5B9A\u6D88\u606F\u7684topic\u5373\u53EF\u751F\u4EA7\u548C\u6D88\u8D39\u6570\u636E\u800C\u4E0D\u9700\u8981\u5173\u5FC3\u6570\u636E\u5B58\u4E8E\u4F55\u5904\u3002

                                        2. partition\uFF08\u5206\u533A\uFF09

                                          partition\u662F\u7269\u7406\u4E0A\u7684\u6982\u5FF5\uFF0Ctopic\u53EF\u4EE5\u8BA4\u4E3A\u662F\u903B\u8F91\u4E0A\u7684\u6982\u5FF5\u3002

                                          \u6BCF\u4E2Atopic\u5305\u542B\u4E00\u4E2A\u6216\u591A\u4E2Apartition\uFF0C\u521B\u5EFAtopic\u65F6\u53EF\u4EE5\u6307\u5B9A\u8BE5topic\u5BF9\u5E94\u7684partition\u6570\u91CF\u3002

                                          \u53EF\u4EE5\u8BA4\u4E3A\u662F\u771F\u5B9E\u5B58\u653E\u6570\u636E\u7684\u5730\u65B9\u3002

                                        3. Replicas of partition\uFF08\u5206\u533A\u5907\u4EFD\uFF09

                                          \u526F\u672C\u53EA\u662F\u4E00\u4E2A\u5206\u533A\u7684\u5907\u4EFD\uFF0C\u526F\u672C\u4ECE\u4E0D\u8BFB\u53D6\u6216\u5199\u5165\u6570\u636E\uFF0C\u4ED6\u4EEC\u7528\u4E8E\u9632\u6B62\u6570\u636E\u4E22\u5931\u3002

                                        4. broker

                                          kafka\u96C6\u7FA4\u5305\u542B\u4E00\u4E2A\u6216\u591A\u4E2A\u670D\u52A1\u5668\uFF0C\u8FD9\u79CD\u670D\u52A1\u5668\u8282\u70B9\u88AB\u79F0\u4E3Abroker\u3002

                                          broker\u5B58\u50A8topic\u7684\u6570\u636E\u3002\u5982\u679C\u67D0topic\u6709N\u4E2Apartition\uFF0C\u96C6\u7FA4\u6709N\u4E2Abroker\uFF0C\u90A3\u4E48\u6BCF\u4E2Abroker\u5B58\u50A8\u8BE5topic\u7684\u4E00\u4E2Apartition\u3002

                                          \u5982\u679C\u67D0topic\u6709N\u4E2Apartition\uFF0C\u96C6\u7FA4\u6709(N+M)\u4E2Abroker\uFF0C\u90A3\u4E48\u5176\u4E2D\u6709N\u4E2Abroker\u5B58\u50A8\u8BE5topic\u7684\u4E00\u4E2Apartition\uFF0C\u5269\u4E0B\u7684M\u4E2Abroker\u4E0D\u5B58\u50A8\u8BE5topic\u7684partition\u6570\u636E\u3002

                                          \u5982\u679C\u67D0topic\u6709N\u4E2Apartition\uFF0C\u96C6\u7FA4\u4E2Dbroker\u6570\u76EE\u5C11\u4E8EN\u4E2A\uFF0C\u90A3\u4E48\u4E00\u4E2Abroker\u5B58\u50A8\u8BE5topic\u7684\u4E00\u4E2A\u6216\u591A\u4E2Apartition\u3002\u5728\u5B9E\u9645\u751F\u4EA7\u73AF\u5883\u4E2D\uFF0C\u5C3D\u91CF\u907F\u514D\u8FD9\u79CD\u60C5\u51B5\u7684\u53D1\u751F\uFF0C\u8FD9\u79CD\u60C5\u51B5\u5BB9\u6613\u5BFC\u81F4Kafka\u96C6\u7FA4\u6570\u636E\u4E0D\u5747\u8861\u3002

                                        5. kafka cluster

                                          kafka \u96C6\u7FA4

                                        6. producers

                                          \u751F\u4EA7\u8005\u3002\u751F\u4EA7\u8005\u662F\u53D1\u9001\u7ED9\u4E00\u4E2A\u6216\u591A\u4E2Akafka\u4E3B\u9898\u7684\u6D88\u606F\u7684\u53D1\u5E03\u8005\u3002\u751F\u4EA7\u8005\u5411kafka broker\u53D1\u9001\u6570\u636E\u3002\u751F\u4EA7\u8005\u8FD8\u53EF\u4EE5\u5411\u4ED6\u4EEC\u9009\u62E9\u7684\u5206\u533A\u53D1\u9001\u6D88\u606F\u3002

                                        7. consumers

                                          \u6D88\u8D39\u8005\u3002\u6BCF\u4E2A\u6D88\u8D39\u8005\u5C5E\u4E8E\u4E00\u4E2A\u7279\u5B9A\u7684consumer group\u3002\u53EF\u4E3A\u6BCF\u4E2Aconsumer\u6307\u5B9Agroup name\uFF0C\u82E5\u4E0D\u6307\u5B9Agroup name\uFF0C\u5219\u5C5E\u4E8E\u9ED8\u8BA4\u7684group\u3002

                                        8. consumer group

                                          \u6D88\u8D39\u8005\u7EC4\u3002\u662F\u903B\u8F91\u4E0A\u7684\u6982\u5FF5\uFF0C\u662Fkafka\u5B9E\u73B0\u5355\u64AD\u548C\u5E7F\u64AD\u4E24\u79CD\u6D88\u606F\u6A21\u578B\u7684\u624B\u6BB5\u3002\u540C\u4E00\u4E2Atopic\u7684\u6570\u636E\uFF0C\u4F1A\u5E7F\u64AD\u7ED9\u4E0D\u540C\u7684\u6D88\u8D39\u8005\u7EC4\uFF0C\u540C\u4E00\u4E2Agroup\u4E2D\u7684consumer\uFF0C\u53EA\u6709\u4E00\u4E2Aconsumer\u80FD\u62FF\u5230\u8FD9\u4E2A\u6570\u636E\u3002\u6362\u53E5\u8BDD\u8BF4\uFF0C\u5BF9\u4E8E\u540C\u4E00\u4E2Atopic\uFF0C\u6BCF\u4E2Agroup\u90FD\u53EF\u4EE5\u62FF\u5230\u540C\u6837\u7684\u6240\u6709\u6570\u636E\uFF0C\u4F46\u662F\u6570\u636E\u53EA\u80FD\u88ABgroup\u4E2D\u7684\u4E00\u4E2Aconsumer\u6D88\u8D39\u3002

                                          group\u5185\u7684\u6D88\u8D39\u8005\u53EF\u4EE5\u4F7F\u7528\u591A\u7EBF\u7A0B\u6765\u5B9E\u73B0\u3002\u6D88\u8D39\u8005\u7EC4\u7684\u6D88\u8D39\u8005\u7684\u6570\u91CF\uFF0C\u901A\u5E38\u4E0D\u8D85\u8FC7partition\u7684\u6570\u91CF\uFF0C\u4E14\u4E8C\u8005\u6700\u597D\u4FDD\u6301\u6574\u6570\u500D\u5173\u7CFB\uFF0C\u56E0\u4E3Akafka\u5728\u8BBE\u8BA1\u65F6\u5047\u5B9A\u4E86\u4E00\u4E2Apartition\u53EA\u80FD\u88AB\u4E00\u4E2A\u6D88\u8D39\u8005\u6D88\u8D39\u3002

                                        \u4E09\u3001\u5FEB\u901F\u5165\u95E8

                                        \u90E8\u7F72kafka\u96C6\u7FA4

                                        1. \u53EF\u4EE5\u901A\u8FC7\u4E09\u53F0\u670D\u52A1\u5668\u7684\u65B9\u5F0F\uFF08\u4E09\u53F0\u865A\u62DF\u673A\uFF09

                                          \u4E5F\u53EF\u4EE5\u901A\u8FC7\u4E00\u53F0linux\u670D\u52A1\u5668\uFF0C\u4E09\u4E2A\u670D\u52A1\u7AEF\u53E3\u7684\u65B9\u5F0F\u6765\u6A21\u62DFkafka\u96C6\u7FA4\u3002

                                          \u6211\u91C7\u7528\u5728\u4E00\u53F0\u673A\u5668\u4E0A\u8BBE\u7F6E\u4E09\u4E2A\u8282\u70B9\u7684\u65B9\u5F0F\u3002

                                        2. \u4E3A\u6BCF\u4E2Abroker\u521B\u5EFA\u4E00\u4E2A\u914D\u7F6E\u6587\u4EF6

                                          cp config/server.properties config/server-1.properties
                                           cp config/server.properties config/server-2.properties
                                           
                                        3. \u4FEE\u6539server.properties

                                          broker.id=0
                                           listeners=PLAINTEXT://:9092
                                          diff --git a/assets/kafka.html.3dcdcb63.js b/assets/kafka.html.b40144f3.js
                                          similarity index 97%
                                          rename from assets/kafka.html.3dcdcb63.js
                                          rename to assets/kafka.html.b40144f3.js
                                          index 5ff4fc82..c0520da9 100644
                                          --- a/assets/kafka.html.3dcdcb63.js
                                          +++ b/assets/kafka.html.b40144f3.js
                                          @@ -1 +1 @@
                                          -const l={key:"v-4b84538b",path:"/java/%E6%B6%88%E6%81%AF%E9%98%9F%E5%88%97/Kafka/kafka.html",title:"kafka",lang:"zh-CN",frontmatter:{},excerpt:"",headers:[{level:2,title:"\u4E00\u3001\u6982\u8FF0",slug:"\u4E00\u3001\u6982\u8FF0",children:[{level:3,title:"\u5B9A\u4E49",slug:"\u5B9A\u4E49",children:[]},{level:3,title:"\u4E24\u79CD\u6A21\u5F0F",slug:"\u4E24\u79CD\u6A21\u5F0F",children:[]}]},{level:2,title:"\u4E8C\u3001\u57FA\u7840\u67B6\u6784",slug:"\u4E8C\u3001\u57FA\u7840\u67B6\u6784",children:[{level:3,title:"\u7B80\u4ECB",slug:"\u7B80\u4ECB",children:[]},{level:3,title:"\u6982\u5FF5",slug:"\u6982\u5FF5",children:[]}]},{level:2,title:"\u4E09\u3001\u5FEB\u901F\u5165\u95E8",slug:"\u4E09\u3001\u5FEB\u901F\u5165\u95E8",children:[{level:3,title:"\u90E8\u7F72kafka\u96C6\u7FA4",slug:"\u90E8\u7F72kafka\u96C6\u7FA4",children:[]},{level:3,title:"\u542F\u52A8kafka",slug:"\u542F\u52A8kafka",children:[]},{level:3,title:"\u505C\u6B62kafka",slug:"\u505C\u6B62kafka",children:[]},{level:3,title:"kafka\u811A\u672C",slug:"kafka\u811A\u672C",children:[{level:4,title:"topic\u811A\u672C",slug:"topic\u811A\u672C",children:[]},{level:4,title:"\u751F\u4EA7\u8005\u811A\u672C",slug:"\u751F\u4EA7\u8005\u811A\u672C",children:[]},{level:4,title:"\u6D88\u8D39\u8005\u811A\u672C",slug:"\u6D88\u8D39\u8005\u811A\u672C",children:[]}]}]},{level:2,title:"\u56DB\u3001kafka\u751F\u4EA7\u8005",slug:"\u56DB\u3001kafka\u751F\u4EA7\u8005",children:[{level:3,title:"\u751F\u4EA7\u8005\u53D1\u9001\u6D88\u606F\u6D41\u7A0B",slug:"\u751F\u4EA7\u8005\u53D1\u9001\u6D88\u606F\u6D41\u7A0B",children:[]},{level:3,title:"\u5F02\u6B65\u53D1\u9001",slug:"\u5F02\u6B65\u53D1\u9001",children:[{level:4,title:"\u6982\u5FF5",slug:"\u6982\u5FF5-1",children:[]},{level:4,title:"\u53D1\u540E\u5373\u5FD8",slug:"\u53D1\u540E\u5373\u5FD8",children:[]},{level:4,title:"\u5F02\u6B65\u56DE\u8C03",slug:"\u5F02\u6B65\u56DE\u8C03",children:[]}]},{level:3,title:"\u540C\u6B65\u53D1\u9001",slug:"\u540C\u6B65\u53D1\u9001",children:[]}]}],git:{updatedTime:1710173765e3,contributors:[{name:"shailene",email:"64005626+shaileneF@users.noreply.github.com",commits:1}]},filePathRelative:"java/\u6D88\u606F\u961F\u5217/Kafka/kafka.md"};export{l as data};
                                          +const l={key:"v-4b84538b",path:"/java/%E6%B6%88%E6%81%AF%E9%98%9F%E5%88%97/Kafka/kafka.html",title:"kafka",lang:"zh-CN",frontmatter:{},excerpt:"",headers:[{level:2,title:"\u4E00\u3001\u6982\u8FF0",slug:"\u4E00\u3001\u6982\u8FF0",children:[{level:3,title:"\u5B9A\u4E49",slug:"\u5B9A\u4E49",children:[]},{level:3,title:"\u4E24\u79CD\u6A21\u5F0F",slug:"\u4E24\u79CD\u6A21\u5F0F",children:[]}]},{level:2,title:"\u4E8C\u3001\u57FA\u7840\u67B6\u6784",slug:"\u4E8C\u3001\u57FA\u7840\u67B6\u6784",children:[{level:3,title:"\u7B80\u4ECB",slug:"\u7B80\u4ECB",children:[]},{level:3,title:"\u6982\u5FF5",slug:"\u6982\u5FF5",children:[]}]},{level:2,title:"\u4E09\u3001\u5FEB\u901F\u5165\u95E8",slug:"\u4E09\u3001\u5FEB\u901F\u5165\u95E8",children:[{level:3,title:"\u90E8\u7F72kafka\u96C6\u7FA4",slug:"\u90E8\u7F72kafka\u96C6\u7FA4",children:[]},{level:3,title:"\u542F\u52A8kafka",slug:"\u542F\u52A8kafka",children:[]},{level:3,title:"\u505C\u6B62kafka",slug:"\u505C\u6B62kafka",children:[]},{level:3,title:"kafka\u811A\u672C",slug:"kafka\u811A\u672C",children:[{level:4,title:"topic\u811A\u672C",slug:"topic\u811A\u672C",children:[]},{level:4,title:"\u751F\u4EA7\u8005\u811A\u672C",slug:"\u751F\u4EA7\u8005\u811A\u672C",children:[]},{level:4,title:"\u6D88\u8D39\u8005\u811A\u672C",slug:"\u6D88\u8D39\u8005\u811A\u672C",children:[]}]}]},{level:2,title:"\u56DB\u3001kafka\u751F\u4EA7\u8005",slug:"\u56DB\u3001kafka\u751F\u4EA7\u8005",children:[{level:3,title:"\u751F\u4EA7\u8005\u53D1\u9001\u6D88\u606F\u6D41\u7A0B",slug:"\u751F\u4EA7\u8005\u53D1\u9001\u6D88\u606F\u6D41\u7A0B",children:[]},{level:3,title:"\u5F02\u6B65\u53D1\u9001",slug:"\u5F02\u6B65\u53D1\u9001",children:[{level:4,title:"\u6982\u5FF5",slug:"\u6982\u5FF5-1",children:[]},{level:4,title:"\u53D1\u540E\u5373\u5FD8",slug:"\u53D1\u540E\u5373\u5FD8",children:[]},{level:4,title:"\u5F02\u6B65\u56DE\u8C03",slug:"\u5F02\u6B65\u56DE\u8C03",children:[]}]},{level:3,title:"\u540C\u6B65\u53D1\u9001",slug:"\u540C\u6B65\u53D1\u9001",children:[]}]}],git:{updatedTime:1710173784e3,contributors:[{name:"shailene",email:"64005626+shaileneF@users.noreply.github.com",commits:1}]},filePathRelative:"java/\u6D88\u606F\u961F\u5217/Kafka/kafka.md"};export{l as data};
                                          diff --git a/assets/redis.html.dabb0d1a.js b/assets/redis.html.bc33957c.js
                                          similarity index 99%
                                          rename from assets/redis.html.dabb0d1a.js
                                          rename to assets/redis.html.bc33957c.js
                                          index 3e6a30bb..92388dc6 100644
                                          --- a/assets/redis.html.dabb0d1a.js
                                          +++ b/assets/redis.html.bc33957c.js
                                          @@ -1 +1 @@
                                          -import{_ as i,e as l}from"./app.0d029894.js";var p="/study/assets/image-20210924154657194.b1793f57.png",s="/study/assets/image-20210924154857485.1fe6d993.png",e="/study/assets/image-20210924191312786.64a677aa.png",a="/study/assets/image-20210925141942564.ad02d929.png",r="/study/assets/image-20210925142429433.dbd2e1eb.png",t="/study/assets/image-20210925142535610.6b3053d9.png",o="/study/assets/image-20210925143336311.493c7c85.png",g="/study/assets/image-20210925144340051.43ae54c9.png",n="/study/assets/image-20210925144639022.4950be23.png",d="/study/assets/image-20210925172544739.d751a6cf.png",m="/study/assets/image-20210925190441846.24305e4d.png",u="/study/assets/image-20210925191433375.d56cbab4.png",h="/study/assets/image-20210925191646950.84255afa.png",c="/study/assets/image-20210925195502637.9a37a625.png",v="/study/assets/image-20210925195608432.7fa64057.png",_="/study/assets/image-20210925200445682.dab8449f.png",y="/study/assets/image-20210925200905092.3316e22d.png",f="/study/assets/image-20210925204019323.8431f96f.png",b="/study/assets/image-20210925204335000.eeffdad5.png",O="/study/assets/image-20210925210022015.af4d845a.png",R="/study/assets/image-20210925205850482.8539b02f.png",k="/study/assets/image-20210926144517840.8c9b0c24.png",B="/study/assets/image-20210926152144438.1cf8d670.png",C="/study/assets/image-20210926155427093.c735e3d2.png",D="/study/assets/image-20210926161504622.454a6918.png",x="/study/assets/image-20210926161655374.7d0a5eb6.png",A="/study/assets/image-20210926162118938.554927a1.png",F="/study/assets/image-20210926161702323.35302bd3.png",P="/study/assets/image-20210926162329910.d5dc7939.png",U="/study/assets/image-20210926175036430.74c46e51.png",I="/study/assets/image-20210926175243861.e8ff8293.png",N="/study/assets/image-20210926182752732.097181bf.png",q="/study/assets/image-20210926183819448.f5d87288.png",S="/study/assets/image-20210927134852367.857f1d55.png",L="/study/assets/image-20210927135455868.19d78690.png",J="/study/assets/image-20210927140106496.fb6fbb22.png",Q="/study/assets/image-20210927140511634.0b2efa1e.png",M="/study/assets/image-20210927142714546.0c709540.png",V="/study/assets/image-20210927144420196.19074161.png",E="/study/assets/image-20210927144744651.0ac7fb3c.png",H="/study/assets/image-20210927150430020.ea2f659b.png",T="/study/assets/image-20210927150454811.e22a5291.png",z="/study/assets/image-20210927150821002.f599fb55.png",G="/study/assets/image-20210927150909337.f0f0f580.png",X="/study/assets/image-20210927150919614.fad96e5d.png",j="/study/assets/image-20210927164805802.eb933ead.png",w="/study/assets/image-20210927171141356.3a7a3e4f.png",W="/study/assets/image-20210927171355993.a1c619fc.png",K="/study/assets/image-20210927181031834.1375d111.png",Y="/study/assets/image-20210927183727073.3521a3cf.png",Z="/study/assets/image-20210927185900890.6231c2c4.png",$="/study/assets/image-20210927195251095.005a5383.png",ii="/study/assets/image-20210927195555404.0d184600.png",li="/study/assets/image-20210927203826475.b350b9ce.png",pi="/study/assets/image-20210927204302988.3c76d300.png",si="/study/assets/image-20210927205344386.4bb13bf0.png",ei="/study/assets/image-20210927210554431.e1a88b41.png",ai="/study/assets/image-20210927225143454.829bb83d.png",ri="/study/assets/image-20210928000637897.d078edf9.png",ti="/study/assets/image-20210928143108618.f04fa6f7.png",oi="/study/assets/image-20210928145104155.d78e77f8.png",gi="/study/assets/image-20210928150733404.d32e4210.png";const ni={},di=l('

                                          Redis

                                          NoSQL\u6570\u636E\u5E93\u7B80\u4ECB

                                          \u6982\u8FF0

                                          1. \u57FA\u4E8Ekey-value\u952E\u503C\u5BF9\u7684NoSQL\u7684\u9AD8\u6027\u80FD\u6570\u636E\u5E93

                                            \u63D0\u4F9B\u4E86\u5404\u79CD\u6570\u636E\u7ED3\u6784\u7684\u5B58\u50A8\uFF0C\u5177\u6709\u9AD8\u6027\u80FD\u7684\u8BFB\u5199\u529F\u80FD

                                          2. \u5173\u7CFB\u578B\u6570\u636E\u5E93\u6BD4\u5982mysql\u7684\u6570\u636E\u662F\u4FDD\u5B58\u5728\u78C1\u76D8\u4E0A\u7684\uFF0C\u78C1\u76D8\u7684IO\u6027\u80FD\u4F4E\u4E0B\u3002

                                            cpu\u7684\u6570\u636E\u4EA4\u6362\u548C\u9AD8\u901F\u7F13\u5B58cache\u505A\uFF0Ccache\u7684\u6570\u636E\u4EA4\u6362\u548C\u5185\u5B58\u505A\uFF0C\u5185\u5B58\u7684\u6570\u636E\u4EA4\u6362\u548C\u786C\u76D8\u505A\u3002

                                          3. \u5173\u7CFB\u578B\u6570\u636E\u5E93\u7684\u4E24\u4E2A\u7F3A\u70B9

                                            • \u6027\u80FD\u74F6\u9888\uFF1A\u78C1\u76D8IO\u6027\u80FD\u4F4E\u4E0B
                                            • \u6269\u5C55\u74F6\u9888\uFF1A\u6570\u636E\u5173\u7CFB\u590D\u6742\uFF0C\u6269\u5C55\u6027\u5DEE\uFF0C\u4E0D\u4FBF\u4E8E\u5927\u89C4\u6A21\u96C6\u7FA4

                                            \u89E3\u51B3\u601D\u8DEF\uFF1A

                                            • \u964D\u4F4E\u78C1\u76D8IO\u6B21\u6570\uFF0C\u8D8A\u4F4E\u8D8A\u597D-----\u5185\u5B58\u5B58\u50A8
                                            • \u53BB\u9664\u6570\u636E\u95F4\u5173\u7CFB\uFF0C\u8D8A\u7B80\u5355\u8D8A\u597D----\u4E0D\u5B58\u50A8\u5173\u7CFB\uFF0C\u4EC5\u5B58\u50A8\u6570\u636E

                                            \u4EE5\u4E0A\u4E24\u70B9\uFF0C\u4FBF\u662FNoSQL

                                          4. NoSQL\u662F\u6CDB\u6307\uFF0C\u662F\u4F5C\u4E3A\u5173\u7CFB\u578B\u6570\u636E\u5E93\u7684\u8865\u5145\uFF0C\u5185\u5B58\u7684\u6570\u636E\u8FD8\u662F\u4ECE\u786C\u76D8\u6765\uFF0C\u5173\u7CFB\u578B\u6570\u636E\u5E93\u8FD8\u662F\u8981\u7528\u7684\uFF0C\u771F\u6B63\u7684\u6570\u636E\u80AF\u5B9A\u8981\u6301\u4E45\u5316\uFF0C\u6240\u4EE5NOSQL\u662F\u6CDB\u6307\uFF0C\u4E0D\u4EC5\u4EC5\u662Fsql\uFF0CNot-Only SQL\uFF0C\u662F\u4F5C\u4E3A\u5173\u7CFB\u578B\u6570\u636E\u5E93\u7684\u8865\u5145\uFF0CNosql\u6709\u81EA\u5DF1\u7684\u9002\u7528\u573A\u666F\uFF1A

                                            • \u9AD8\u5E76\u53D1
                                            • \u6D77\u91CF\u7528\u6237
                                          5. NoSQL\u7684\u7279\u5F81\uFF1A

                                            • \u53EF\u6269\u5BB9\uFF0C\u53EF\u4F38\u7F29

                                            • \u5927\u6570\u636E\u91CF\u4E0B\u9AD8\u6027\u80FD

                                            • \u7075\u6D3B\u7684\u6570\u636E\u6A21\u578B

                                              Nosql\u65E0\u9700\u5B9E\u73B0\u4E3A\u8981\u5B58\u50A8\u7684\u6570\u636E\u5EFA\u7ACB\u5B57\u6BB5\uFF0C\u968F\u65F6\u53EF\u4EE5\u5B58\u50A8\u81EA\u5B9A\u4E49\u7684\u6570\u636E\u683C\u5F0F

                                              \u800C\u5728\u5173\u7CFB\u578B\u6570\u636E\u5E93\u91CC\u589E\u5220\u5B57\u6BB5\u662F\u4E00\u4EF6\u975E\u5E38\u9EBB\u70E6\u7684\u4E8B\u60C5\u3002

                                              \u5982\u679C\u662F\u6570\u636E\u91CF\u975E\u5E38\u5927\u7684\u8868\uFF0C\u589E\u52A0\u5B57\u6BB5\u7B80\u76F4\u662F\u5669\u68A6\u3002

                                            • \u9AD8\u53EF\u7528

                                          6. \u6570\u636E\u5B58\u50A8\u7684\u74F6\u9888

                                            • \u6570\u636E\u91CF\u7684\u603B\u5927\u5C0F
                                            • \u6570\u636E\u7684\u7D22\u5F15\uFF0C\u4E00\u4E2A\u673A\u5668\u7684\u5185\u5B58\u653E\u4E0D\u4E0B\u65F6
                                            • \u8BFB\u5199\u6DF7\u5408\uFF0C\u4E00\u4E2A\u6570\u636E\u5E93\u5B9E\u4F8B\u4E0D\u80FD\u627F\u53D7
                                          7. dao\u5C42\u4E0D\u518D\u76F4\u63A5\u548C\u6570\u636E\u5E93\u8FDB\u884C\u4EA4\u4E92\uFF0C\u5728\u4E2D\u95F4\u6321\u4E86\u4E00\u5C42\u7F13\u5B58

                                            image-20210924154657194

                                          8. mysql\u4E3B\u4ECE\u8BFB\u5199\u5206\u79BB

                                            \u4ECE\u5E93\u8FC5\u901F\u5730\u8D4B\u503C\u4E3B\u5E93\u7684\u6570\u636E\uFF0C\u4E3A\u4E86\u4FDD\u8BC1\u6570\u636E\u7684\u5B8C\u6574\u6027\u548C\u5B89\u5168\u6027\u3002

                                            image-20210924154857485

                                            \u5BF9\u4E8E\u4E00\u4E2A\u6570\u636E\u5E93\u7684\u4FE1\u606F\uFF0C\u5199\u7684\u64CD\u4F5C\u90FD\u653E\u5728\u4E3B\u5E93\uFF0C\u8BFB\u7684\u64CD\u4F5C\u90FD\u653E\u5728\u4ECE\u5E93\uFF0C\u51CF\u8F7B\u6570\u636E\u5E93\u7684\u538B\u529B

                                            \u5206\u5E93\u5206\u79BB\u4E5F\u662F\u4E3A\u4E86\u51CF\u8F7B\u6570\u636E\u5E93\u7684\u538B\u529B

                                            mysql\u7ECF\u8FC7\u4E86\u4E3B\u4ECE\u8BFB\u5199\u5206\u79BB\uFF0C\u5206\u5E93\u5206\u8868\uFF0C\u4ECD\u7136\u6709\u74F6\u9888\uFF0C\u4E0D\u9002\u5408\u5B58\u50A8\u975E\u5E38\u5927\u7684\u6570\u636E

                                            mysql\u4E5F\u662F\u6709\u96C6\u7FA4\u7684\u3002

                                          9. NoSQL\u6570\u636E\u5E93\u7684\u4EA7\u751F\u5C31\u662F\u4E3A\u4E86\u89E3\u51B3\u5927\u89C4\u6A21\u6570\u636E\u96C6\u5408\u591A\u91CD\u6570\u636E\u79CD\u7C7B\u5E26\u6765\u7684\u6311\u6218\uFF0C\u5305\u62EC\u5927\u89C4\u6A21\u6570\u636E\u7684\u5B58\u50A8

                                          10. NoSQL\u6570\u636E\u5E93\u79CD\u7C7B\u7E41\u591A\uFF0C\u4F46\u662F\u4E00\u4E2A\u5171\u540C\u7684\u7279\u70B9\u5C31\u662F\u53BB\u6389\u5173\u7CFB\u578B\u6570\u636E\u5E93\u7684\u5173\u7CFB\u578B\u7279\u6027

                                            \u6570\u636E\u4E4B\u95F4\u65E0\u8054\u7CFB\uFF0C\u8FD9\u6837\u5C31\u975E\u5E38\u5BB9\u6613\u6269\u5C55\uFF0C\u4E5F\u5728\u67B6\u6784\u7684\u5C42\u9762\u4E0A\u5E26\u6765\u4E86\u53EF\u6269\u5C55\u7684\u80FD\u529B

                                          11. mysql\u4E5F\u6709\u7F13\u5B58\uFF0Cinnodb\u662F\u6570\u636E\u548C\u7D22\u5F15\u90FD\u8981\u8FDB\u884C\u7F13\u5B58\uFF0C\u800Cmyisam\u53EA\u7F13\u5B58\u7D22\u5F15\uFF0C\u4E0D\u7F13\u5B58\u771F\u5B9E\u6570\u636E

                                          12. 3V+3\u9AD8

                                            • velocity \u5B9E\u65F6
                                            • variety \u591A\u6837
                                            • volume \u6D77\u91CF
                                            • \u9AD8\u6027\u80FD
                                            • \u9AD8\u53EF\u7528\uFF08\u9AD8\u53EF\u6269\u5C55\uFF09\uFF08\u7406\u8BBA\u4E0A\u4E00\u53F0\u673A\u5668\u4E0D\u591F\uFF0C\u5E76\u884C\u5730\u518D\u52A0\u673A\u5668\uFF0C\u8FD9\u662F\u6A2A\u5411\u7684\u6269\u5C55\uFF09
                                            • \u9AD8\u5E76\u53D1

                                            3V\u662F\u5BF9\u95EE\u9898\u7684\u63CF\u8FF0

                                          13. \u5F53\u4E0B\u7684\u5E94\u7528\u662Fsql\u548Cnosql\u4E00\u8D77\u4F7F\u7528\uFF0C\u5E76\u4E0D\u662F\u5173\u7CFB\u578B\u6570\u636E\u5E93\u5C31\u4E0D\u7528\u4E86\uFF01

                                          14. \u4EC0\u4E48\u53EB\u5173\u7CFB\u578B\u6570\u636E\u5E93\u7684IOE

                                            \u53D6\u51FAIBM\u5C0F\u578B\u673A\uFF0COracle\u6570\u636E\u5E93\u53CAEMC\u5B58\u50A8\u8BBE\u5907

                                          15. \u5546\u54C1\u7684\u57FA\u672C\u4FE1\u606F\uFF0C\u5B58\u653E\u5728\u4F20\u7EDF\u7684\u5173\u7CFB\u578B\u6570\u636E\u5E93\uFF0C\u6BD4\u5982mysql

                                            \u5546\u54C1\u63CF\u8FF0\u3001\u8BE6\u60C5\u3001\u8BC4\u4EF7\u4FE1\u606F\uFF08\u591A\u6587\u5B57\u7C7B\uFF09\uFF0C\u5B58\u653E\u5728\u6587\u6863\u6570\u636E\u5E93mongodb

                                            \u5546\u54C1\u7684\u56FE\u7247\uFF0C\u5B58\u653E\u5728\u5206\u5E03\u5F0F\u6587\u4EF6\u7CFB\u7EDF\uFF0C\u6DD8\u5B9D\u81EA\u5DF1\u7684TFS\uFF0CGoogle\u7684GFS\uFF0CHadoop\u7684HDFS

                                            \u5546\u54C1\u7684\u5173\u952E\u5B57\uFF0C\u641C\u7D22\u5F15\u64CE\uFF0C\u57FA\u4E8Elucene\u3001solr\u3001elasticSearch\u5F00\u53D1\u7684\u7AD9\u5185\u641C\u7D22\u5F15\u64CE\uFF0C\u963F\u91CC\u7528\u7684ISearch

                                            \u5546\u54C1\u7684\u6CE2\u6BB5\u6027\u7684\u70ED\u70B9\u9AD8\u9891\u4FE1\u606F----\u7F13\u5B58\u6570\u636E\u5E93\uFF0C\u9700\u8981\u9AD8\u5E76\u53D1\u3001\u9AD8\u6027\u80FD\u3001\u9AD8\u53EF\u7528\u6216\u8005\u53EB\u9AD8\u53EF\u6269\u5C55\uFF0C\u6BD4\u5982redis\u3001Tair\u3001Memcache\u3002\u6240\u8C13\u7684\u7F13\u5B58\u5C31\u662F\u5728\u6570\u636E\u5E93\u5916\u9762\u518D\u5305\u4E00\u5C42\uFF0C\u5728dao\u5C42\u548C\u6570\u636E\u5E93\u4E4B\u95F4\u6DFB\u52A0\u4E00\u5C42\u7F13\u5B58

                                            \u4E00\u4E2A\u67E5\u8BE2\u7ED3\u679C\u662F\u4ECE\u591A\u6570\u636E\u6E90\u6765\u7684\u3002

                                          16. \u5927\u578B\u4E92\u8054\u7F51\u5E94\u7528\u7684\u96BE\u70B9\uFF1A

                                            • \u6570\u636E\u7C7B\u578B\u591A\u6837\u6027
                                            • \u6570\u636E\u6E90\u591A\u6837\u6027\u548C\u53D8\u5316\u91CD\u6784
                                            • \u6570\u636E\u6E90\u6539\u9020\u800C\u6570\u636E\u670D\u52A1\u5E73\u53F0\u4E0D\u9700\u8981\u5927\u9762\u79EF\u91CD\u6784

                                            \u89E3\u51B3\u65B9\u6848\uFF1A

                                            • \u7EDF\u4E00\u6570\u636E\u5E73\u53F0\u670D\u52A1\u5C42\uFF0C\u901A\u8FC7\u7F16\u7A0B\u8BED\u8A00\u9762\u5BF9\u63A5\u53E3\u7F16\u7A0B\uFF0C\u7EDF\u4E00\u9762\u5BF9\u4E00\u5C42\u6570\u636E\u670D\u52A1\u5C42\uFF0C\u6570\u636E\u670D\u52A1\u5C42\u7684\u540E\u9762\u662Fmysql\u3001mongodb\u3001\u5206\u5E03\u5F0F\u6587\u4EF6\u7CFB\u7EDF\u3001isearch\u3001redis\u7B49\u3002\u5C31\u7C7B\u4F3C\u4E8E\u6211\u4EEC\u9762\u5411JDBC\u7F16\u7A0B\uFF0CJDBC\u5C31\u50CF\u4E00\u4E2A\u63A5\u53E3\uFF0C\u6211\u4EEC\u9762\u5411\u63A5\u53E3\u7F16\u7A0B\uFF0C\u4E0D\u7528\u7BA1\u63A5\u53E3\u540E\u9762\u7684mysql\u3001oracle\u7B49\u6570\u636E\u5E93\u662F\u600E\u4E48\u5B9E\u73B0\u7684\uFF0C\u800C\u5404\u79CD\u6570\u636E\u5E93\u53C8\u662FJDBC\u8FD9\u4E2A\u63A5\u53E3\u7684\u5B9E\u73B0!!JDBC\u5C31\u76F8\u5F53\u4E8E\u5B9A\u4E49\u4E86\u4E00\u79CD\u89C4\u8303\uFF0C\u5404\u79CD\u6570\u636E\u5E93\u9762\u5BF9\u5B83\u6765\u505A\u5177\u4F53\u7684\u5B9E\u73B0\uFF0C\u6211\u4EEC\u9762\u5BF9JDBC\u505A\u4E0A\u5C42\u7684\u7F16\u7A0B\u4E1A\u52A1\u5DE5\u4F5C\u3002

                                              \u53EA\u9700\u8981\u7EDF\u4E00\u8FDE\u4E00\u4E2A\u5E73\u53F0\u3002

                                              \u6211\u4EEC\u6839\u636E\u7EDF\u4E00\u7684\u6570\u636E\u5E73\u53F0\u670D\u52A1\u5C42\uFF0C\u7EDF\u4E00\u8C03\u7528\u5B83\u63D0\u4F9B\u7ED9\u6211\u4EEC\u7684API

                                          NoSQL\u6570\u636E\u6A21\u578B\u7B80\u4ECB

                                          1. \u4E3A\u4EC0\u4E48\u8981\u7528\u805A\u5408\u6A21\u578B\u6765\u5904\u7406

                                            \u8868\u5C11\u7684\u65F6\u5019\uFF0C\u53EF\u4EE5\u7528\u5173\u8054\u67E5\u8BE2--join\uFF0C\u4E00\u6761sql\u5C31\u53EF\u4EE5\u641E\u5B9A\uFF0C\u4F46\u662F\u5230\u4E86\u4F01\u4E1A\u91CC\uFF0C\u5F88\u591A\u8868\uFF0C\u8FD9\u6837\u5F88\u9EBB\u70E6\uFF0C\u6BD4\u5982\u4E00\u5F20\u8868\u5728\u4E00\u53F7\u5E93\uFF0C\u53E6\u5916\u7684\u8868\u5728\u5176\u4ED6\u5E93\uFF0C\u5206\u5E93\u5206\u8868\u4E5F\u662F\u4E3A\u4E86\u51CF\u8F7B\u6570\u636E\u5E93\u7684\u538B\u529B\uFF0C\u8FD9\u79CD\u573A\u666F\u4E0B\uFF0C\u591A\u8868\u7684\u5173\u8054\u67E5\u8BE2\u5C31\u4E0D\u592A\u65B9\u4FBF\u4E86\u3002

                                            \u9AD8\u5E76\u53D1\u7684\u64CD\u4F5C\u662F\u4E0D\u592A\u5EFA\u8BAE\u6709\u5173\u8054\u67E5\u8BE2\u7684

                                          2. \u975E\u5173\u7CFB\u578B\u6570\u636E\u5E93NoSQL\u7684\u6570\u636E\u6A21\u578B\u662F\u805A\u5408\u6A21\u578B

                                            • key-value\u952E\u503C\u5BF9
                                            • \u56FE\u5F62\u7ED3\u6784
                                            • BSON
                                            • \u5217\u65CF
                                            • \u3002\u3002\u3002

                                          NoSQL\u6570\u636E\u5E93\u7684\u56DB\u5927\u5206\u7C7B

                                          1. KV\u952E\u503C\u5BF9

                                            image-20210924191312786

                                            \u5178\u578B\u5E94\u7528\u573A\u666F\uFF1A\u5185\u5BB9\u7F13\u5B58\uFF0C\u4E3B\u8981\u7528\u4E8E\u5904\u7406\u5927\u91CF\u6570\u636E\u7684\u9AD8\u8BBF\u95EE\u8D1F\u8F7D\uFF0C\u4E5F\u7528\u4E8E\u4E00\u4E9B\u65E5\u5FD7\u7CFB\u7EDF\u7B49\u7B49\u3002

                                          2. \u6587\u6863\u578B\u6570\u636E\u5E93\uFF0Cbson\u683C\u5F0F\u6BD4\u8F83\u591A

                                            • CouchDB

                                            • MongoDB

                                              MongoDB\u662F\u4E00\u4E2A\u57FA\u4E8E\u5206\u5E03\u5F0F\u6587\u4EF6\u5B58\u50A8\u7684\u6570\u636E\u5E93

                                              \u662F\u975E\u5173\u7CFB\u578B\u6570\u636E\u5E93\u4E2D\u6700\u50CF\u5173\u7CFB\u578B\u6570\u636E\u5E93\u7684

                                          3. \u5217\u5B58\u50A8\u6570\u636E\u5E93

                                            • HBase
                                            • \u5206\u5E03\u5F0F\u6587\u4EF6\u7CFB\u7EDF
                                          4. \u56FE\u5173\u7CFB\u6570\u636E\u5E93

                                            \u4E13\u6CE8\u4E8E\u6784\u5EFA\u5173\u7CFB\u56FE\u8C31

                                          5. \u56DB\u8005\u5BF9\u6BD4

                                          NoSQL\u6570\u636E\u5E93CAP\u539F\u7406

                                          1. CAP

                                            • Consistency \uFF08\u5F3A\u4E00\u81F4\u6027\uFF09
                                            • Availability \uFF08\u53EF\u7528\u6027\uFF09
                                            • Partition tolerance \uFF08\u5206\u533A\u5BB9\u9519\u6027\uFF09

                                            \u8FD9\u4E09\u4E2A\u7279\u6027\u53EA\u80FD\u6EE1\u8DB32\u4E2A

                                            \u4E00\u4E2A\u5206\u5E03\u5F0F\u7CFB\u7EDF\u4E0D\u53EF\u80FD\u540C\u65F6\u5F88\u597D\u5730\u6EE1\u8DB3\u4E00\u81F4\u6027\uFF0C\u53EF\u7528\u6027\uFF0C\u548C\u5206\u533A\u5BB9\u9519\u6027\u4E09\u4E2A\u9700\u6C42

                                            \u6700\u591A\u53EA\u80FD\u540C\u65F6\u6EE1\u8DB32\u4E2A

                                            redis\u662F\u6EE1\u8DB3CP

                                            \u5206\u533A\u5BB9\u9519\u6027\u662F\u6211\u4EEC\u5FC5\u987B\u9700\u8981\u5B9E\u73B0\u7684\uFF01\uFF01

                                          Redis\u7B80\u4ECB

                                          1. Redis\u662F\u7528C\u8BED\u8A00\u5F00\u53D1\u7684\u4E00\u4E2A\u5F00\u6E90\u7684\u9AD8\u6027\u80FD\u952E\u503C\u5BF9\uFF08key-value\uFF09\u6570\u636E\u5E93

                                          2. \u7279\u5F81\uFF1A

                                            • \u6570\u636E\u95F4\u6CA1\u6709\u5FC5\u7136\u7684\u5173\u8054\u5173\u7CFB

                                            • \u5185\u90E8\u91C7\u7528\u5355\u7EBF\u7A0B\u673A\u5236\u8FDB\u884C\u5DE5\u4F5C\uFF01\u80FD\u4FDD\u8BC1\u5F88\u591A\u5B89\u5168\u6027\u7684\u95EE\u9898

                                            • \u9AD8\u6027\u80FD

                                            • \u591A\u6570\u636E\u7C7B\u578B\u652F\u6301

                                              • \u5B57\u7B26\u4E32\u7C7B\u578B string
                                              • \u5217\u8868\u7C7B\u578B list
                                              • \u6563\u5217\u7C7B\u578B hash
                                              • \u96C6\u5408\u7C7B\u578B set
                                              • \u6709\u5E8F\u96C6\u5408\u7C7B\u578B sorted_set
                                            • \u6301\u4E45\u5316\u652F\u6301\uFF0C\u53EF\u4EE5\u8FDB\u884C\u6570\u636E\u707E\u96BE\u6062\u590D\uFF0C

                                              \u53EF\u80FD\u4F1A\u51FA\u73B0\u65AD\u7535\u7684\u60C5\u51B5\uFF0C\u90A3\u4E48\u5728\u5185\u5B58\u4E2D\u5B58\u7684\u6570\u636E\u9700\u8981\u6062\u590D

                                          3. \u5E94\u7528\uFF1A

                                            • \u4E3A\u70ED\u70B9\u6570\u636E\u52A0\u901F\u67E5\u8BE2
                                            • \u4EFB\u52A1\u961F\u5217\uFF0C\u5982\u79D2\u6740\u3001\u62A2\u8D2D\u3001\u8D2D\u7968\u6392\u961F\u7B49
                                            • \u5373\u65F6\u4FE1\u606F\u67E5\u8BE2\uFF0C\u5982\u5404\u7C7B\u6392\u884C\u699C\u3001\u5728\u7EBF\u4EBA\u6570\u4FE1\u606F
                                            • \u65F6\u6548\u6027\u4FE1\u606F\u63A7\u5236\uFF0C\u5982\u9A8C\u8BC1\u7801\u63A7\u5236\uFF08\u51E0\u5206\u949F\u5185\u6709\u6548\uFF09
                                            • \u5206\u5E03\u5F0F\u6570\u636E\u5171\u4EAB\uFF0C\u5982\u5206\u5E03\u5F0F\u96C6\u7FA4\u67B6\u6784\u4E2D\u7684session\u5206\u79BB
                                            • \u6D88\u606F\u961F\u5217
                                            • \u5206\u5E03\u5F0F\u9501

                                          Redis\u6570\u636E\u7C7B\u578B

                                          \u6570\u636E\u7C7B\u578B\u7684\u4ECB\u7ECD

                                          1. \u4F5C\u4E3A\u7F13\u5B58\u4F7F\u7528
                                            • \u539F\u59CB\u4E1A\u52A1\u529F\u80FD\u8BBE\u8BA1
                                              • \u79D2\u6740
                                              • 618\u6D3B\u52A8
                                              • \u53CC11\u6D3B\u52A8
                                              • \u6392\u961F\u8D2D\u7968
                                            • \u8FD0\u8425\u5E73\u53F0\u76D1\u63A7\u5230\u7684\u7A81\u53D1\u9AD8\u9891\u8BBF\u95EE\u6570\u636E
                                              • \u7A81\u53D1\u65F6\u653F\u8981\u95FB\uFF0C\u88AB\u5F3A\u52BF\u5173\u6CE8\u56F4\u89C2
                                            • \u9AD8\u9891\u3001\u590D\u6742\u7684\u7EDF\u8BA1\u6570\u636E\uFF0C\u9700\u8981\u5FEB\u901F\u54CD\u5E94\u7684\u6570\u636E\uFF01\uFF01
                                              • \u76F4\u64AD\u95F4\u5728\u7EBF\u4EBA\u6570
                                              • \u6253\u699C\u4EBA\u6570
                                          2. \u9644\u52A0\u529F\u80FD
                                            • \u7CFB\u7EDF\u529F\u80FD\u4F18\u5316\u6216\u5347\u7EA7
                                              • \u5355\u670D\u52A1\u5668\u5347\u7EA7\u96C6\u7FA4
                                              • session\u7BA1\u7406
                                              • token\u7BA1\u7406
                                          3. redis\u6570\u636E\u7C7B\u578B
                                            • string
                                            • hash
                                            • list
                                            • set
                                            • sorted_set

                                          string

                                          1. redis\u81EA\u8EAB\u662F\u4E00\u4E2AMap\uFF0C\u5176\u4E2D\u6240\u6709\u7684\u6570\u636E\u90FD\u662F\u91C7\u7528key\uFF1Avalue\u7684\u5F62\u5F0F\u5B58\u50A8

                                            \u5DE6\u8FB9\u7684key\u6C38\u8FDC\u90FD\u662F\u5B57\u7B26\u4E32\uFF01\uFF01

                                            \u6570\u636E\u7C7B\u578B\u6307\u7684\u662F\u53F3\u8FB9\u7684\uFF0C\u6307\u7684\u662Fvalue\u8FD9\u90E8\u5206\u6570\u636E\u5B58\u50A8\uFF01\uFF01

                                            \u6570\u636E\u7C7B\u578B\u6307\u7684\u662F\u5B58\u50A8\u7684\u6570\u636E\u7684\u7C7B\u578B\uFF0C\u4E5F\u5C31\u662Fvalue\u7684\u90E8\u5206\uFF0Ckey\u90E8\u5206\u6C38\u8FDC\u662F\u5B57\u7B26\u4E32

                                          2. \u5B58\u50A8\u7684\u6570\u636E\uFF1A\u5355\u4E2A\u6570\u636E\uFF0C\u6700\u7B80\u5355\u7684\u6570\u636E\u5B58\u50A8\u7C7B\u578B\uFF0C\u4E5F\u662F\u6700\u5E38\u7528\u7684\u6570\u636E\u5B58\u50A8\u7C7B\u578B

                                          3. \u5B58\u50A8\u6570\u636E\u7684\u683C\u5F0F\uFF1A\u4E00\u4E2A\u5B58\u50A8\u7A7A\u95F4\u4FDD\u5B58\u4E00\u4E2A\u6570\u636E

                                          4. \u5B58\u50A8\u5185\u5BB9\uFF1A\u901A\u5E38\u4F7F\u7528\u5B57\u7B26\u4E32\uFF0C\u5982\u679C\u5B57\u7B26\u4E32\u4EE5\u6574\u6570\u7684\u5F62\u5F0F\u5B58\u50A8\uFF0C\u53EF\u4EE5\u4F5C\u4E3A\u6570\u5B57\u64CD\u4F5C\u4F7F\u7528

                                          5. \u6709\u5355\u6570\u636E\u64CD\u4F5C\u548C\u591A\u6570\u636E\u64CD\u4F5C

                                            image-20210925141942564

                                          6. \u5728\u5927\u578B\u4F01\u4E1A\u7EA7\u5E94\u7528\u4E2D\uFF0C\u4E00\u5F20\u8868\u4FDD\u5B58\u7684\u6570\u636E\u91CF\u4E0D\u80FD\u8BA9\u5B83\u65E0\u9650\u5236\u6269\u5F20\uFF0C\u4F1A\u5206\u8868\uFF0C\u4F7F\u7528\u591A\u5F20\u8868\u5B58\u50A8\u540C\u7C7B\u578B\u6570\u636E\uFF0C\u751A\u81F3\u628A\u4E00\u4E2A\u5E93\u91CC\u7684\u8868\u5206\u79BB\u5230\u82E5\u5E72\u4E2A\u5E93\u91CC

                                            \u5206\u8868\u64CD\u4F5C\uFF0C\u5BF9\u5E94\u7684\u4E3B\u952Eid\u5FC5\u987B\u4FDD\u8BC1\u7EDF\u4E00\u6027\uFF0C\u4E0D\u80FD\u91CD\u590D

                                            image-20210925142429433

                                            redis\u53EF\u4EE5\u7528\u4E8E\u63A7\u5236\u6570\u636E\u5E93\u8868\u4E3B\u952Eid\uFF0C\u4E3A\u6570\u636E\u5E93\u8868\u4E3B\u952E\u63D0\u4F9B\u751F\u6210\u7B56\u7565\uFF0C\u4FDD\u969C\u6570\u636E\u5E93\u8868\u7684\u4E3B\u952E\u552F\u4E00\u6027

                                            \u6B64\u65B9\u6848\u9002\u7528\u4E8E\u6240\u6709\u6570\u636E\u5E93\uFF0C\u4E14\u652F\u6301\u6570\u636E\u5E93\u96C6\u7FA4\u3002

                                          7. string\u7C7B\u578B\u6570\u636E\u7684\u6269\u5C55\u64CD\u4F5C

                                            • image-20210925142535610

                                              string\u5728redis\u5185\u90E8\u5B58\u50A8\u9ED8\u8BA4\u5C31\u662F\u4E00\u4E2A\u5B57\u7B26\u4E32\uFF0C\u5F53\u9047\u5230\u589E\u51CF\u7C7B\u64CD\u4F5Cincr\uFF0Cdecr\u65F6\u4F1A\u8F6C\u6210\u6570\u503C\u578B\u8FDB\u884C\u8BA1\u7B97

                                              redis\u6240\u6709\u7684\u64CD\u4F5C\u90FD\u662F\u539F\u5B50\u6027\u7684\uFF0C\u91C7\u7528\u5355\u7EBF\u7A0B\u5904\u7406\u6240\u6709\u4E1A\u52A1\uFF0C\u547D\u4EE4\u90FD\u662F\u4E00\u4E2A\u4E00\u4E2A\u6267\u884C\u7684\uFF0C\u56E0\u6B64\u65E0\u9700\u8003\u8651\u5E76\u53D1\u5E26\u6765\u7684\u6570\u636E\u5F71\u54CD

                                              \u6CE8\u610F\uFF1A\u6309\u6570\u503C\u8FDB\u884C\u64CD\u4F5C\u7684\u6570\u636E\uFF0C\u5982\u679C\u539F\u59CB\u6570\u636E\u4E0D\u80FD\u8F6C\u6210\u6570\u503C\uFF0C\u6216\u8D85\u8D8A\u4E86redis\u6570\u503C\u4E0A\u9650\u8303\u56F4\uFF0C\u5C06\u62A5\u9519

                                            • image-20210925143336311

                                              redis\u63A7\u5236\u6570\u636E\u7684\u751F\u547D\u5468\u671F\uFF0C\u901A\u8FC7\u6570\u636E\u662F\u5426\u5931\u6548\u63A7\u5236\u4E1A\u52A1\u884C\u4E3A\uFF0C\u9002\u7528\u4E8E\u6240\u6709\u5177\u6709\u65F6\u6548\u6027\u9650\u5B9A\u63A7\u5236\u7684\u64CD\u4F5C

                                          8. string\u7C7B\u578B\u6570\u636E\u64CD\u4F5C\u7684\u6CE8\u610F\u4E8B\u9879

                                            • \u6570\u636E\u64CD\u4F5C\u4E0D\u6210\u529F\u7684\u53CD\u9988\u4E0E\u6570\u636E\u6B63\u5E38\u64CD\u4F5C\u4E4B\u95F4\u7684\u5DEE\u5F02

                                              • \u8868\u793A\u8FD0\u884C\u7ED3\u679C\u662F\u5426\u6210\u529F
                                                • (Integer)0---false \u5931\u8D25
                                                • (Integer)1----true \u6210\u529F
                                            • \u6570\u636E\u672A\u83B7\u53D6\u5230

                                              (nil) \u7B49\u540C\u4E8Enull

                                            • \u6570\u636E\u6700\u5927\u5B58\u50A8\u91CF

                                              512MB

                                            • \u6570\u503C\u8BA1\u7B97\u6700\u5927\u8303\u56F4\uFF08Java\u4E2D\u7684long\u7684\u6700\u5927\u503C\uFF09

                                              Java\u4E2D\u7684long\u7684\u6700\u5927\u503C

                                          9. string\u7C7B\u578B\u5E94\u7528\u573A\u666F

                                            • \u5728redis\u4E2D\u4E3A\u5927V\u7528\u6237\u8BBE\u5B9A\u7528\u6237\u4FE1\u606F\uFF0C\u4EE5\u7528\u6237\u4E3B\u952E\u548C\u5C5E\u6027\u503C\u4F5C\u4E3Akey\uFF0C\u540E\u53F0\u8BBE\u5B9A\u5B9A\u65F6\u5237\u65B0\u7B56\u7565\u5373\u53EF

                                              user:id:35035035:fans----12210947

                                              \u8868\u540D\uFF1A\u4E3B\u952E\u540D\uFF1A\u4E3B\u952E\u503C\uFF1A\u5C5E\u6027\u540D------\u5C5E\u6027\u503C

                                            • image-20210925144340051

                                            • redis\u5E94\u7528\u4E8E\u5404\u79CD\u7ED3\u6784\u578B\u548C\u975E\u7ED3\u6784\u578B\u9AD8\u70ED\u5EA6\u6570\u636E\u8BBF\u95EE\u52A0\u901F

                                          hash

                                          1. image-20210925144639022

                                          2. \u5B58\u50A8\u7ED3\u6784:\u4E00\u4E2A\u5B58\u50A8\u7A7A\u95F4\u4FDD\u5B58\u591A\u4E2A\u952E\u503C\u5BF9\u6570\u636E

                                            \u5E95\u5C42\u4F7F\u7528\u54C8\u5E0C\u8868\u7ED3\u6784\u5B9E\u73B0\u6570\u636E\u5B58\u50A8

                                          3. hash\u5B58\u50A8\u7ED3\u6784\u4F18\u5316

                                            • \u5982\u679Cfield\u6570\u91CF\u8F83\u5C11\uFF0C\u5B58\u50A8\u7ED3\u6784\u4F18\u5316\u4E3A\u7C7B\u6570\u7EC4\u7ED3\u6784
                                            • \u5982\u679Cfield\u6570\u91CF\u8F83\u591A\uFF0C\u5B58\u50A8\u7ED3\u6784\u4F7F\u7528HashMap\u7ED3\u6784
                                          4. hash\u7C7B\u578B\u6570\u636E\u6269\u5C55\u64CD\u4F5C

                                            • image-20210925172544739
                                          5. hash\u7C7B\u578B\u6570\u636E\u64CD\u4F5C\u7684\u6CE8\u610F\u4E8B\u9879

                                            • hash\u7C7B\u578B\u4E0B\u7684value\u53EA\u80FD\u5B58\u50A8\u5B57\u7B26\u4E32\uFF0C\u4E0D\u5141\u8BB8\u5B58\u50A8\u5176\u4ED6\u6570\u636E\u7C7B\u578B\uFF0C\u4E0D\u5B58\u5728\u5D4C\u5957\u73B0\u8C61\uFF0C\u5982\u679C\u6570\u636E\u672A\u83B7\u53D6\u5230\uFF0C\u5BF9\u5E94\u7684\u503C\u4E3Anil
                                            • \u6BCF\u4E2Ahash\u53EF\u4EE5\u5B58\u50A82\u768432\u6B21\u65B9-1\u4E2A\u952E\u503C\u5BF9
                                            • hash\u7C7B\u578B\u5341\u5206\u8D34\u8FD1\u5BF9\u8C61\u7684\u6570\u636E\u5B58\u50A8\u5F62\u5F0F\uFF0C\u5E76\u4E14\u53EF\u4EE5\u7075\u6D3B\u6DFB\u52A0\u548C\u5220\u9664\u5BF9\u8C61\u5C5E\u6027\uFF0C\u4F46hash\u8BBE\u8BA1\u521D\u8877\u4E0D\u662F\u4E3A\u4E86\u5B58\u50A8\u5927\u91CF\u5BF9\u8C61\u800C\u8BBE\u8BA1\u7684\uFF0C\u5207\u8BB0\u4E0D\u53EF\u6EE5\u7528\uFF0C\u66F4\u4E0D\u53EF\u4EE5\u5C06hash\u4F5C\u4E3A\u5BF9\u8C61\u5217\u8868\u4F7F\u7528
                                            • hgetall\u64CD\u4F5C\u53EF\u4EE5\u83B7\u53D6\u5168\u90E8\u5C5E\u6027\uFF0C\u5982\u679C\u5185\u90E8field\u8FC7\u591A\uFF0C\u904D\u5386\u6574\u4F53\u6570\u636E\u6548\u7387\u5C31\u4F1A\u4F4E\uFF0C\u5C31\u53EF\u80FD\u6210\u4E3A\u6570\u636E\u8BBF\u95EE\u7684\u74F6\u9888

                                          list

                                          1. \u6570\u636E\u5B58\u50A8\u9700\u6C42\uFF1A\u5B58\u50A8\u591A\u4E2A\u6570\u636E\uFF0C\u5E76\u5BF9\u6570\u636E\u8FDB\u5165\u5B58\u50A8\u7A7A\u95F4\u7684\u987A\u5E8F\u8FDB\u884C\u533A\u5206

                                          2. \u9700\u8981\u7684\u5B58\u50A8\u7ED3\u6784\uFF1A\u4E00\u4E2A\u5B58\u50A8\u7A7A\u95F4\u4FDD\u5B58\u591A\u4E2A\u6570\u636E\uFF0C\u4E14\u901A\u8FC7\u6570\u636E\u53EF\u4EE5\u4F53\u73B0\u8FDB\u884C\u987A\u5E8F

                                          3. list\u7C7B\u578B\uFF1A\u4FDD\u5B58\u591A\u4E2A\u6570\u636E\uFF0C\u5E95\u5C42\u4F7F\u7528\u53CC\u5411\u94FE\u8868\u5B58\u50A8\u7ED3\u6784\u5B9E\u73B0\u3002

                                          4. \u5DE6\u8FB9\u662Fkey\uFF0Cvalue\u662Flist

                                          5. list\u7C7B\u578B\u6570\u636E\u57FA\u672C\u7C7B\u578B

                                            • image-20210925190441846

                                            • image-20210925191433375

                                            • image-20210925191646950

                                          6. list\u7C7B\u578B\u6570\u636E\u64CD\u4F5C\u6CE8\u610F\u4E8B\u9879\uFF1A

                                            • list\u4E2D\u4FDD\u5B58\u7684\u6570\u636E\u90FD\u662Fstring\u7C7B\u578B\u7684\uFF0C\u6570\u636E\u603B\u5BB9\u91CF\u662F\u6709\u9650\u7684\u3002
                                            • list\u5177\u6709\u7D22\u5F15\u7684\u6982\u5FF5\uFF0C\u4F46\u662F\u64CD\u4F5C\u6570\u636E\u65F6\uFF0C\u901A\u5E38\u4EE5\u961F\u5217\u7684\u5F62\u5F0F\u8FDB\u884C\u5165\u961F\u51FA\u961F\u64CD\u4F5C\uFF0C\u6216\u4EE5\u6808\u7684\u5F62\u5F0F\u8FDB\u884C\u5165\u6808\u51FA\u6808\u64CD\u4F5C
                                            • \u83B7\u53D6\u5168\u90E8\u6570\u636E\uFF0C\u7ED3\u675F\u7D22\u5F15\u8BBE\u7F6E\u4E3A-1
                                          7. list\u7C7B\u578B\u5E94\u7528\u573A\u666F

                                            • \u5FAE\u535A\u7684\u4E2A\u4EBA\u7528\u6237\u7684\u5173\u6CE8\u5217\u8868\uFF0C\u5C06\u6700\u8FD1\u5173\u6CE8\u7684\u4EBA\u6392\u5728\u524D\u9762
                                            • \u7BA1\u7406\u591A\u53F0\u670D\u52A1\u5668\u7684\u65E5\u5FD7
                                              • \u4F9D\u8D56list\u7684\u6570\u636E\u5177\u6709\u987A\u5E8F\u7684\u7279\u5F81\u5BF9\u4FE1\u606F\u8FDB\u884C\u7BA1\u7406
                                              • \u4F7F\u7528\u961F\u5217\u6A21\u578B\u89E3\u51B3\u591A\u8DEF\u4FE1\u606F\u6C47\u603B\u5408\u5E76\u7684\u95EE\u9898
                                              • \u4F7F\u7528\u6808\u6A21\u578B\u89E3\u51B3\u6700\u65B0\u6D88\u606F\u7684\u95EE\u9898

                                          set\u7C7B\u578B

                                          1. \u4E0Ehash\u5B58\u50A8\u7ED3\u6784\u5B8C\u5168\u76F8\u540C\uFF0C\u4EC5\u5B58\u50A8\u952E\uFF0C\u4E0D\u5B58\u50A8\u503C\uFF08nil\uFF09\uFF0C\u5E76\u4E14\u503C\u662F\u4E0D\u5141\u8BB8\u91CD\u590D\u7684\uFF0Chash\u7ED3\u6784\u7684field\u672C\u8EAB\u5C31\u662F\u4E0D\u5141\u8BB8\u91CD\u590D\u7684

                                          2. set\u7C7B\u578B\u6570\u636E\u7684\u57FA\u672C\u64CD\u4F5C

                                            image-20210925195502637

                                            image-20210925195608432

                                          3. set\u7C7B\u578B\u6570\u636E\u7684\u6269\u5C55\u64CD\u4F5C

                                            image-20210925200445682

                                          4. redis\u7684set\u7C7B\u578B\u7ED3\u6784\u5E94\u7528\u4E8E\u968F\u673A\u63A8\u8350\u7C7B\u4FE1\u606F\u68C0\u7D22

                                          5. image-20210925200905092

                                          6. set\u7C7B\u578B\u6570\u636E\u64CD\u4F5C\u7684\u6CE8\u610F\u4E8B\u9879

                                            • set\u7C7B\u578B\u4E0D\u5141\u8BB8\u6570\u636E\u91CD\u590D\uFF0C\u5982\u679C\u6DFB\u52A0\u7684\u6570\u636E\u5728set\u4E2D\u5DF2\u7ECF\u5B58\u5728\uFF0C\u5C06\u53EA\u4FDD\u7559\u4E00\u4EFD
                                            • set\u867D\u7136\u4E0Ehash\u7684\u5B58\u50A8\u7ED3\u6784\u76F8\u540C\uFF0C\u4F46\u662F\u65E0\u6CD5\u542F\u7528hash\u4E2D\u5B58\u50A8\u503C\u5F97\u7684\u90A3\u4E00\u90E8\u5206

                                          sorted_set

                                          1. \u6570\u636E\u6392\u5E8F\u6709\u5229\u4E8E\u6570\u636E\u7684\u6709\u6548\u5C55\u793A\uFF0C\u9700\u8981\u63D0\u4F9B\u4E00\u79CD\u53EF\u4EE5\u6839\u636E\u81EA\u8EAB\u7279\u5F81\u8FDB\u884C\u6392\u5E8F\u7684\u65B9\u5F0F

                                          2. \u5B58\u50A8\u7ED3\u6784\uFF1A\u53EF\u4EE5\u4FDD\u5B58\u53EF\u6392\u5E8F\u7684\u6570\u636E\uFF0C\u5728set\u7684\u5B58\u50A8\u7ED3\u6784\u57FA\u7840\u4E0A\u6DFB\u52A0\u53EF\u6392\u5E8F\u5B57\u6BB5\uFF0C\u6709\u4E00\u5217\u4E13\u95E8\u7528\u6765\u5B58\u6392\u5E8F\u5B57\u6BB5\u3002

                                            \u6392\u5E8F\u5B57\u6BB5\u4E0D\u662F\u6570\u636E

                                          3. sorted_set\u7C7B\u578B\u6570\u636E\u7684\u57FA\u672C\u64CD\u4F5C

                                            image-20210925204019323

                                            image-20210925204335000

                                            image-20210925210022015

                                          4. image-20210925205850482

                                          5. sorted_set\u7C7B\u578B\u6570\u636E\u64CD\u4F5C\u7684\u6CE8\u610F\u4E8B\u9879

                                            • score\u4FDD\u5B58\u7684\u6570\u636E\u5B58\u50A8\u7A7A\u95F4\u662F64\u4F4D
                                            • score\u4FDD\u5B58\u7684\u6570\u636E\u4E5F\u53EF\u4EE5\u662F\u4E00\u4E2A\u53CC\u7CBE\u5EA6\u7684double\u503C\uFF0C\u57FA\u4E8E\u53CC\u7CBE\u5EA6\u6D6E\u70B9\u6570\u7684\u7279\u5F81\uFF0C\u53EF\u80FD\u4F1A\u4E22\u5931\u7CBE\u5EA6\uFF0C\u4F7F\u7528\u7684\u65F6\u5019\u8981\u614E\u91CD
                                            • sorted_set\u5E95\u5C42\u5B58\u50A8\u8FD8\u662F\u57FA\u4E8Eset\u7ED3\u6784\u7684\uFF0C\u56E0\u6B64\u6570\u636E\u4E0D\u80FD\u91CD\u590D\uFF0C\u5982\u679C\u91CD\u590D\u6DFB\u52A0\u76F8\u540C\u7684\u6570\u636E\uFF0Cscore\u503C\u5C06\u88AB\u53CD\u590D\u8986\u76D6\uFF0C\u4FDD\u7559\u6700\u540E\u4E00\u6B21\u4FEE\u6539\u7684\u7ED3\u679C\u3002
                                            • sorted_set\u53EF\u4EE5\u5E94\u7528\u4E8E\u5B9A\u65F6\u4EFB\u52A1\u6267\u884C\u987A\u5E8F\u7BA1\u7406\u6216\u4EFB\u52A1\u8FC7\u671F\u7BA1\u7406
                                          • \u5BF9\u4E8E\u5E26\u6709\u6743\u91CD\u7684\u4EFB\u52A1\uFF0C\u4F18\u5148\u5904\u7406\u6743\u91CD\u9AD8\u7684\u4EFB\u52A1\uFF0C\u91C7\u7528score\u8BB0\u5F55\u6743\u91CD\u5373\u53EF

                                          \u6301\u4E45\u5316

                                          \u7B80\u4ECB

                                          1. \u5C06\u5185\u5B58\u4E2D\u7684\u6570\u636E\u653E\u5230\u786C\u76D8\u4E2D\uFF0C\u8FD9\u53EB\u6301\u4E45\u5316\uFF0C\u5982\u679C\u5185\u5B58\u4E2D\u7684\u6570\u636E\u56E0\u4E3A\u65AD\u7535\u6216\u8005\u5176\u4ED6\u539F\u56E0\u4E22\u4E86\uFF0C\u518D\u628A\u786C\u76D8\u4E2D\u7684\u6570\u636E\u8BFB\u5230\u5185\u5B58\u4E2D\uFF0C\u8FD9\u5C31\u662F\u6570\u636E\u7684\u6062\u590D\u8FC7\u7A0B

                                          2. \u5229\u7528\u6C38\u4E45\u6027\u5B58\u50A8\u4ECB\u8D28\uFF08\u6BD4\u5982\u786C\u76D8\uFF09\u5C06\u6570\u636E\u8FDB\u884C\u4FDD\u5B58\uFF0C\u5728\u7279\u5B9A\u7684\u65F6\u95F4\u5C06\u4FDD\u5B58\u7684\u6570\u636E\u8FDB\u884C\u6062\u590D\u7684\u5DE5\u4F5C\u673A\u5236\u53EB\u505A\u6301\u4E45\u5316

                                          3. \u4E3A\u4EC0\u4E48\u8981\u8FDB\u884C\u6301\u4E45\u5316\uFF1F

                                            \u9632\u6B62\u6570\u636E\u7684\u610F\u5916\u4E22\u5931\uFF0C\u786E\u4FDD\u6570\u636E\u7684\u5B89\u5168\u6027

                                          4. \u6301\u4E45\u5316\u4FDD\u5B58\u7684\u4E1C\u897F\u5C31\u53EA\u6709\u6570\u636E\uFF01

                                          5. \u6301\u4E45\u5316\u7684\u65B9\u5F0F

                                            • \u5FEB\u7167----\u6BCF\u8FC7\u4E00\u5B9A\u65F6\u95F4\uFF0C\u5C31\u5C06\u5F53\u524D\u65F6\u523B\u7684\u6570\u636E\u4FDD\u5B58\u4E0B\u6765\u3002\u5173\u6CE8\u70B9\u5728\u6570\u636E----RDB
                                            • \u8FC7\u7A0B-----\u8BB0\u5F55\u6574\u4E2A\u6570\u636E\u7684\u64CD\u4F5C\u8FC7\u7A0B\uFF0C\u5C06\u64CD\u4F5C\u8FC7\u7A0B\u8FDB\u884C\u4FDD\u5B58\uFF0C\u65E5\u5FD7\u5F62\u5F0F\uFF0C\u5B58\u50A8\u64CD\u4F5C\u8FC7\u7A0B\uFF0C\u5B58\u50A8\u683C\u5F0F\u590D\u6742\uFF0C\u5173\u6CE8\u70B9\u5728\u6570\u636E\u7684\u64CD\u4F5C\u8FC7\u7A0B-----AOF

                                          RDB

                                          1. RDB\u542F\u52A8\u65B9\u5F0F1

                                            \u547D\u4EE4\uFF1Asave\uFF0C

                                            \u4F5C\u7528\uFF1A\u6BCF\u6267\u884C\u4E00\u6B21\uFF0C\u5C31\u4F1A\u4FDD\u5B58\u4E00\u6B21\u6570\u636E

                                          2. dumb.rdb\u662F\u6301\u4E45\u5316\u6570\u636E\u7684\u6587\u4EF6

                                          3. \u76F8\u5173\u547D\u4EE4\uFF1A

                                            image-20210926144517840

                                          4. \u7528RDB\u8FD9\u79CD\u65B9\u5F0F\uFF0C\u5728redis\u670D\u52A1\u542F\u52A8\u7684\u65F6\u5019\uFF0C\u4F1A\u628A\u6301\u4E45\u5316\u7684\u6570\u636E\u52A0\u8F7D\u4E0A\u6765\uFF01

                                          5. save\u6307\u4EE4\u7684\u6267\u884C\u4F1A\u963B\u585E\u5F53\u524Dredis\u670D\u52A1\u5668\uFF0Credis\u7684\u6BCF\u4E00\u6761\u6307\u4EE4\u662F\u539F\u5B50\u6027\u7684\uFF0Credis\u662F\u5355\u7EBF\u7A0B\u7684\uFF01\uFF01

                                            \u90A3\u4E48save\u6307\u4EE4\uFF0C\u963B\u585E\u670D\u52A1\u5668\uFF0C\u77E5\u9053\u5F53\u524DRDB\u8FC7\u7A0B\u5B8C\u6210\u4E3A\u6B62\uFF0C\u6709\u53EF\u80FD\u9020\u6210\u957F\u65F6\u95F4\u963B\u585E

                                            \u5F53\u6570\u636E\u91CF\u8FC7\u5927\u7684\u65F6\u5019\uFF0C\u5355\u7EBF\u7A0B\u7684\u8FD9\u79CDRDB\u5F62\u5F0F\u4F1A\u9020\u6210\u6548\u7387\u7684\u964D\u4F4E\uFF01

                                            \u5982\u4F55\u5904\u7406\uFF1A

                                            \u540E\u53F0\u6267\u884C

                                          6. RDB\u542F\u52A8\u65B9\u5F0F2----\u540E\u53F0\u6267\u884C

                                            \u547D\u4EE4\uFF1Abgsave

                                            \u4F5C\u7528\uFF1A\u624B\u52A8\u542F\u52A8\u540E\u53F0\u4FDD\u5B58\u6570\u636E\u7684\u64CD\u4F5C\uFF0C\u4F46\u4E0D\u662F\u7ACB\u5373\u6267\u884C\u3002

                                          7. bgsave\u6307\u4EE4\u5DE5\u4F5C\u539F\u7406\uFF1A

                                            • \u53D1\u9001\u6D88\u606F
                                            • \u8FD4\u56DE\u6D88\u606F\uFF0C\u4F46\u662F\u5E76\u4E0D\u771F\u6B63\u6267\u884C
                                            • \u8C03\u7528fork\u51FD\u6570\uFF0C\u751F\u6210\u5B50\u8FDB\u7A0B\uFF0C\u4E0D\u53C2\u4E0Eredis\u7684\u547D\u4EE4\u5E8F\u5217\uFF0C\u5355\u72EC\u751F\u6210\u5B50\u8FDB\u7A0B\u6765\u505A\u6570\u636E\u7684\u5B58\u50A8\uFF01

                                            bgsave\u547D\u4EE4\u662F\u9488\u5BF9save\u547D\u4EE4\u963B\u585Eredis\u670D\u52A1\u7684\u8FD9\u79CD\u7F3A\u70B9\u505A\u7684\u4F18\u5316

                                          8. RDB\u542F\u52A8\u65B9\u5F0F3

                                            \u81EA\u52A8\u6267\u884C

                                            redis\u670D\u52A1\u5668\u53D1\u8D77\u6307\u4EE4\uFF08\u57FA\u4E8E\u6761\u4EF6\uFF09\uFF0C\u800C\u4E0D\u662F\u7531\u7528\u6237\u8F93\u5165\u6307\u4EE4

                                            \u914D\u7F6E\uFF1Asave second changes---\u662F\u5199\u5728\u914D\u7F6E\u6587\u4EF6\u4E2D\u7684

                                            \u4F5C\u7528\uFF1A\u6EE1\u8DB3\u9650\u5B9A\u65F6\u95F4\u8303\u56F4\u5185key\u7684\u53D8\u5316\u6570\u91CF\u8FBE\u5230\u6307\u5B9A\u6570\u91CF\u5373\u8FDB\u884C\u6301\u4E45\u5316

                                            \u53C2\u6570\uFF1A

                                            • second---\u76D1\u63A7\u65F6\u95F4\u8303\u56F4
                                            • changes---\u76D1\u63A7key\u7684\u53D8\u5316\u91CF

                                            \u6BD4\u5982\u8BF4\u65F6\u95F4\u8303\u56F4\u5185\uFF0C2\u4E2Akey\u53D1\u751F\u4E86\u53D8\u5316\uFF0C\u4F1A\u81EA\u52A8\u6267\u884C\u4FDD\u5B58\uFF0C\u7136\u540E\u63A5\u4E0B\u6765\u5FC5\u987B\u53C8\u67092\u4E2Akey\u53D1\u751F\u53D8\u5316\uFF0C\u624D\u4F1A\u518D\u6B21\u6267\u884C\u4FDD\u5B58

                                            \u8FD9\u79CD\u914D\u7F6E\u6765\u6267\u884CRDB\u7684\u65B9\u5F0F\uFF0C\u540E\u53F0\u6267\u884C\u7684\u662Fbgsave\u6307\u4EE4\uFF01

                                          9. image-20210926152144438

                                          10. RDB\u4F18\u70B9

                                            • RDB\u662F\u4E00\u4E2A\u7D27\u51D1\u538B\u7F29\u7684\u4E8C\u8FDB\u5236\u6587\u4EF6\uFF0C\u5B58\u50A8\u6548\u7387\u8F83\u9AD8

                                            • RDB\u5185\u90E8\u5B58\u50A8\u7684\u662Fredis\u5728\u67D0\u4E2A\u65F6\u95F4\u70B9\u7684\u6570\u636E\u5FEB\u7167\uFF0C\u975E\u5E38\u9002\u5408\u7528\u4E8E\u6570\u636E\u5907\u4EFD\uFF0C\u5168\u91CF\u590D\u5236\u7B49\u573A\u666F

                                            • RDB\u6062\u590D\u6570\u636E\u7684\u901F\u5EA6\u8981\u6BD4AOF\u5FEB\u5F88\u591A

                                            • \u5E94\u7528\uFF1A\u670D\u52A1\u5668\u4E2D\u6BCFX\u5C0F\u65F6\u6267\u884Cbgsave\u5907\u4EFD\uFF0C\u5E76\u5C06RDB\u6587\u4EF6\u62F7\u8D1D\u81F3\u8FDC\u7A0B\u673A\u5668\u4E2D\uFF0C\u7528\u4E8E\u707E\u96BE\u6062\u590D\u3002

                                            RDB\u7F3A\u70B9\uFF1A

                                            • RDB\u65B9\u5F0F\u65E0\u8BBA\u662F\u6267\u884C\u6307\u4EE4\u8FD8\u662F\u5229\u7528\u914D\u7F6E\uFF0C\u65E0\u6CD5\u505A\u5230\u5B9E\u65F6\u6301\u4E45\u5316\uFF0C\u662F\u5B9A\u65F6\u7684\uFF01 \u5177\u6709\u8F83\u5927\u7684\u53EF\u80FD\u4E22\u5931\u6570\u636E
                                            • bgsave\u6307\u4EE4\u4E3A\u4E86\u4E0D\u963B\u585Eredis\u670D\u52A1\uFF0C\u8C03\u7528fork\u521B\u5EFA\u5B50\u8FDB\u7A0B\u6765\u6267\u884C\u6570\u636E\u7684\u6301\u4E45\u5316\uFF0C\u8981\u727A\u7272\u6389\u4E00\u4E9B\u6027\u80FD
                                            • redis\u4F17\u591A\u7248\u672C\u4E2D\u672A\u8FDB\u884CRDB\u6587\u4EF6\u683C\u5F0F\u7684\u7248\u672C\u7EDF\u4E00\uFF0C\u6709\u53EF\u80FD\u51FA\u73B0\u5404\u7248\u672C\u670D\u52A1\u4E4B\u95F4\u6570\u636E\u683C\u5F0F\u65E0\u6CD5\u517C\u5BB9\u7684\u73B0\u8C61\u3002
                                            • \u57FA\u4E8E\u5FEB\u7167\u601D\u60F3\uFF0C\u6BCF\u6B21\u8BFB\u5199\u90FD\u662F\u5168\u90E8\u6570\u636E\uFF01\u5B58\u50A8\u6570\u636E\u91CF\u5927\uFF0C\u6548\u7387\u8F83\u4F4E\uFF0C\u5927\u6570\u636E\u91CF\u4E0BIO\u6027\u80FD\u964D\u4F4E

                                          AOF

                                          1. \u548CRDB\u7684\u533A\u522B\uFF1A

                                            • \u4E0D\u5199\u5168\u6570\u636E\uFF0C\u4EC5\u8BB0\u5F55\u90E8\u5206\u6570\u636E
                                            • \u6539\u8BB0\u5F55\u6570\u636E\u4E3A\u8BB0\u5F55\u6570\u636E\u64CD\u4F5C
                                            • \u5BF9\u6240\u6709\u64CD\u4F5C\u5747\u8FDB\u884C\u8BB0\u5F55\uFF0C\u6392\u9664\u4E22\u5931\u6570\u636E\u7684\u98CE\u9669
                                          2. \u6982\u5FF5

                                            \u4EE5\u72EC\u7ACB\u65E5\u5FD7\u7684\u65B9\u5F0F\u8BB0\u5F55\u6BCF\u6B21\u5199\u547D\u4EE4\uFF08\u8BFB\u547D\u4EE4\uFF08get\uFF09\u662F\u4E0D\u8BB0\u5F55\u7684\u3002\uFF09\uFF0C\u91CD\u542F\u65F6\u518D\u91CD\u65B0\u6267\u884CAOF\u6587\u4EF6\u4E2D\u547D\u4EE4\u8FBE\u5230\u6062\u590D\u6570\u636E\u7684\u76EE\u7684\uFF0C\u4E0ERDB\u76F8\u6BD4\u53EF\u4EE5\u7B80\u5355\u63CF\u8FF0\u4E3A\u6539\u8BB0\u5F55\u6570\u636E\u4E3A\u8BB0\u5F55\u6570\u636E\u4EA7\u751F\u7684\u8FC7\u7A0B\u3002

                                          3. AOF\u7684\u4E3B\u8981\u4F5C\u7528\u662F\u89E3\u51B3\u4E86\u6570\u636E\u6301\u4E45\u5316\u7684\u5B9E\u65F6\u6027\uFF0C\u56E0\u4E3ARDB\u662F\u5B9A\u65F6\u5FEB\u7167\uFF0C\u4E0D\u5177\u6709\u5B9E\u65F6\u6027\uFF0C\u76EE\u524D\u5DF2\u7ECF\u662FRedis\u6301\u4E45\u5316\u7684\u4E3B\u6D41\u65B9\u5F0F\u3002

                                          4. \u5F53\u670D\u52A1\u5668\u63A5\u6536\u5230\u4E00\u6761\u5199\u547D\u4EE4\u65F6\uFF0C\u5E76\u6CA1\u6709\u9A6C\u4E0A\u8BB0\u5F55\uFF0C\u800C\u662F\u628A\u5B83\u653E\u5230\u4E00\u4E2A\u4E34\u65F6\u7684\u533A\u57DF\uFF0C\u8FD9\u4E2A\u4E34\u65F6\u7684\u533A\u57DF\uFF0C\u662FAOF\u6240\u8981\u64CD\u4F5C\u7684\u5199\u547D\u4EE4\u5BF9\u5E94\u7684\u5B58\u50A8\u7684\u7F13\u51B2\u533A\uFF0C\u6307\u4EE4\u653E\u5728\u7F13\u51B2\u533A\u3002\u8FD9\u4E9B\u7F13\u51B2\u533A\u7684\u6307\u4EE4\u6700\u7EC8\u662F\u751F\u6210AOF\u6587\u4EF6\u7684\u3002\u5230\u4E86\u4E00\u5B9A\u9636\u6BB5\uFF0C\u5168\u90E8\u5C06\u8FD9\u4E9B\u7F13\u51B2\u533A\u7684\u6307\u4EE4\u540C\u6B65\u5230AOF\u6587\u4EF6\u7684\u3002

                                          5. AOF\u5199\u6570\u636E\u7684\u4E09\u79CD\u7B56\u7565

                                            • always

                                              \u6BCF\u6B21\u5199\u5165\u64CD\u4F5C\u5747\u540C\u6B65\u5230AOF\u6587\u4EF6\u4E2D\uFF0C\u6570\u636E\u96F6\u8BEF\u5DEE\uFF0C\u6027\u80FD\u8F83\u4F4E

                                            • everysec

                                              \u6BCF\u79D2\u5C06\u7F13\u51B2\u533A\u4E2D\u7684\u6307\u4EE4\u540C\u6B65\u5230AOF\u6587\u4EF6\u4E2D\uFF0C\u6570\u636E\u51C6\u786E\u6027\u9AD8\uFF0C\u6027\u80FD\u8F83\u9AD8

                                              \u5728\u7CFB\u7EDF\u7A81\u7136\u5B95\u673A\u7684\u60C5\u51B5\u4E0B\u4E22\u59311\u79D2\u5185\u7684\u6570\u636E

                                            • no

                                              \u7531\u64CD\u4F5C\u7CFB\u7EDF\u63A7\u5236\u6BCF\u6B21\u540C\u6B65\u5230AOF\u6587\u4EF6\u7684\u5468\u671F\uFF0C\u6574\u4F53\u8FC7\u7A0B\u4E0D\u53EF\u63A7\u3002

                                            everysec\u662F\u9ED8\u8BA4\u914D\u7F6E

                                          6. AOF\u529F\u80FD\u5F00\u542F\uFF0C\u914D\u7F6E

                                            image-20210926155427093

                                          7. AOF\u91CD\u5199

                                            \u968F\u7740\u547D\u4EE4\u4E0D\u65AD\u5199\u5165AOF\uFF0C\u6587\u4EF6\u4F1A\u8D8A\u6765\u8D8A\u5927\uFF0C\u4E3A\u4E86\u89E3\u51B3\u8FD9\u4E2A\u95EE\u9898\uFF0CRedis\u5F15\u5165\u4E86AOF\u91CD\u5199\u673A\u5236\u538B\u7F29\u6587\u4EF6\u4F53\u79EF

                                            AOF\u91CD\u5199\u662F\u5C06Redis\u8FDB\u7A0B\u5185\u7684\u6570\u636E\u8F6C\u5316\u4E3A\u5199\u547D\u4EE4\u540C\u6B65\u5230\u65B0AOF\u6587\u4EF6\u7684\u8FC7\u7A0B\u3002\u7B80\u5355\u8BF4\u5C31\u662F\u5BF9\u540C\u4E00\u4E2A\u6570\u636E\u7684\u82E5\u5E72\u6761\u547D\u4EE4\u6267\u884C\u7ED3\u679C\u8F6C\u5316\u6210\u6700\u7EC8\u7ED3\u679C\u6570\u636E\u5BF9\u5E94\u7684\u6307\u4EE4\u8FDB\u884C\u8BB0\u5F55

                                          8. AOF\u91CD\u5199\u4F5C\u7528

                                            • \u964D\u4F4E\u78C1\u76D8\u5360\u7528\u91CF\uFF0C\u63D0\u9AD8\u78C1\u76D8\u5229\u7528\u7387
                                            • \u63D0\u9AD8\u6301\u4E45\u5316\u6548\u7387\uFF0C\u964D\u4F4E\u6301\u4E45\u5316\u5199\u65F6\u95F4\uFF0C\u63D0\u9AD8IO\u6027\u80FD
                                            • \u964D\u4F4E\u6570\u636E\u6062\u590D\u7528\u65F6\uFF0C\u63D0\u9AD8\u6570\u636E\u6062\u590D\u6548\u7387
                                          9. AOF\u91CD\u5199\u89C4\u5219\uFF1A

                                            • \u8FDB\u7A0B\u5185\u5DF2\u8D85\u65F6\u7684\u6570\u636E\u4E0D\u518D\u5199\u5165\u6587\u4EF6

                                            • \u5FFD\u7565\u65E0\u6548\u6307\u4EE4\uFF0C\u91CD\u5199\u65F6\u4F7F\u7528\u8FDB\u7A0B\u5185\u6570\u636E\u76F4\u63A5\u751F\u6210\uFF0C\u8FD9\u6837\u65B0\u7684AOF\u6587\u4EF6\u53EA\u4FDD\u7559\u6700\u7EC8\u6570\u636E\u7684\u5199\u5165\u547D\u4EE4\u3002

                                            • \u5BF9\u540C\u4E00\u6570\u636E\u7684\u591A\u6761\u5199\u547D\u4EE4\u5408\u5E76\u4E3A\u4E00\u6761\u547D\u4EE4

                                              image-20210926161504622

                                          10. AOF\u91CD\u5199\u65B9\u5F0F

                                            • \u624B\u52A8\u91CD\u5199

                                              image-20210926161655374

                                              image-20210926162118938

                                            • \u81EA\u52A8\u91CD\u5199

                                              image-20210926161702323

                                              \u4E5F\u662F\u5199\u5728\u914D\u7F6E\u6587\u4EF6\u91CC

                                              image-20210926162329910

                                          11. AOF\u91CD\u5199\u6D41\u7A0B

                                            image-20210926175036430

                                          12. RDB\u4E0EAOF\u533A\u522B

                                            image-20210926175243861

                                          \u4E8B\u52A1

                                          1. redis\u7684\u6BCF\u4E00\u6761\u6307\u4EE4\u662F\u539F\u5B50\u6027\u7684\u3002

                                            redis\u4E8B\u52A1\u5C31\u662F\u4E00\u4E2A\u547D\u4EE4\u6267\u884C\u7684\u961F\u5217\uFF01\u5C06\u4E00\u7CFB\u5217\u547D\u4EE4\u770B\u4F5C\u4E00\u4E2A\u6574\u4F53\u3002

                                            \u5F53\u6267\u884C\u65F6\uFF0C\u4E00\u6B21\u6027\u6309\u7167\u6DFB\u52A0\u987A\u5E8F\u4F9D\u6B21\u6267\u884C\uFF0C\u4E2D\u95F4\u4E0D\u4F1A\u88AB\u6253\u65AD\u6216\u8005\u5E72\u6270

                                          2. \u4E8B\u52A1\u7684\u57FA\u672C\u64CD\u4F5C

                                            image-20210926182752732

                                            \u6CE8\u610F\uFF1A\u52A0\u5165\u4E8B\u52A1\u7684\u547D\u4EE4\u6682\u65F6\u8FDB\u5165\u5230\u4EFB\u52A1\u961F\u5217\u4E2D\uFF0C\u5E76\u6CA1\u6709\u7ACB\u5373\u6267\u884C\uFF0C\u53EA\u6709\u6267\u884Cexec\u547D\u4EE4\u624D\u5F00\u59CB\u6267\u884C

                                            image-20210926183819448

                                          3. \u5982\u679C\u5F00\u542F\u4E8B\u52A1\u540E\uFF0C\u52A0\u5165\u961F\u5217\u7684\u547D\u4EE4\u5B58\u5728\u8BED\u6CD5\u9519\u8BEF\uFF0C\u90A3\u4E48\u8FD9\u4E2A\u4E8B\u52A1\u961F\u5217\u91CC\u9762\u6240\u6709\u7684\u547D\u4EE4\u90FD\u5C06\u4E0D\u6267\u884C\uFF01

                                            \u5982\u679C\u5F00\u542F\u4E8B\u52A1\u540E\uFF0C\u52A0\u5165\u961F\u5217\u7684\u547D\u4EE4\u8BED\u6CD5\u6B63\u786E\uFF0C\u4F46\u662F\u65E0\u6CD5\u6B63\u786E\u5730\u6267\u884C\uFF0C\u90A3\u4E48\u8FD9\u4E2A\u4E8B\u52A1\u961F\u5217\u91CC\u9762\uFF0C\u6B63\u786E\u7684\u547D\u4EE4\u4F1A\u6267\u884C\uFF0C\u8FD0\u884C\u9519\u8BEF\u7684\u547D\u4EE4\u4E0D\u4F1A\u6267\u884C

                                          \u9501

                                          1. \u57FA\u4E8E\u7279\u5B9A\u6761\u4EF6\u7684\u4E8B\u52A1\u6267\u884C--\u9501

                                            image-20210927134852367

                                            \u5FC5\u987B\u5728\u4E8B\u52A1\u5F00\u542F\u4E4B\u524D\uFF0C\u53BB\u4E0A\u76D1\u89C6\u9501--watch

                                          2. \u57FA\u4E8E\u7279\u5B9A\u6761\u4EF6\u7684\u4E8B\u52A1\u6267\u884C--\u5206\u5E03\u5F0F\u9501

                                            image-20210927135455868

                                            \u6709\u503C\u5219\u8BBE\u7F6E\u5931\u8D25\uFF0C\u6CA1\u6709\u503C\u5219\u8BBE\u7F6E\u6210\u529F\uFF0C\u8FD9\u4E2A\u503C\u6307\u7684\u662F\u6307\u4EE4\u7684\u90A3\u4E2Avalue\uFF0C\u4E5F\u5C31\u662F\u4E0A\u6CA1\u4E0A\u9501\uFF0C\u5982\u679C\u522B\u7684\u5BA2\u6237\u7AEF\u5DF2\u7ECF\u4E0A\u9501\u4E86\uFF0C\u90A3\u4E48value\u80AF\u5B9A\u6709\u503C\uFF0C\u90A3\u4E48\u5C31\u4E0D\u80FD\u591F\u8BBE\u7F6E\u9501\u4E86\uFF0C\u5982\u679C\u6CA1\u6709\u503C\uFF0C\u4EE3\u8868\u522B\u7684\u5BA2\u6237\u7AEF\u6CA1\u6709\u4E0A\u9501\uFF0C\u90A3\u4E48\u6B64\u5BA2\u6237\u7AEF\u5C31\u53EF\u4EE5\u4E0A\u9501\u3002

                                            \u5927\u5BB6\u4E5F\u5FC5\u987B\u9501\u540C\u4E00\u4E2A\u9501\uFF0C\u4E5F\u5C31\u662F\u53D6\u540C\u4E00\u4E2A\u540D\u5B57\uFF0C\u548CJava\u4E2D\u7684synchronized\u662F\u4E00\u4E2A\u610F\u601D\u3002

                                          3. \u6B7B\u9501\u89E3\u51B3\u65B9\u6848

                                            \u4F9D\u8D56\u5206\u5E03\u5F0F\u9501\u7684\u673A\u5236\uFF0C\u67D0\u4E2A\u7528\u6237\u64CD\u4F5C\u65F6\uFF0C\u5BF9\u5E94\u5BA2\u6237\u7AEF\u5728\u8BBE\u7F6E\u5206\u5E03\u5F0F\u9501\u6210\u529F\u4E4B\u540E\u5B95\u673A\u4E86\uFF0C\u5982\u4F55\u89E3\u51B3\uFF1F

                                            • image-20210927140106496

                                            • \u5728\u83B7\u5F97\u9501\u4E4B\u540E\uFF0C\u4F7F\u7528expire\u6DFB\u52A0\u9501\u7684\u65F6\u95F4\u9650\u5B9A\u3002

                                              \u8FD9\u4E2A\u9501\u7684\u65F6\u95F4\u9650\u5B9A\u4E00\u822C\u662F\u7F51\u7EDC\u5EF6\u65F6+\u4E1A\u52A1\u6267\u884C\u65F6\u95F4

                                              image-20210927140511634

                                          \u5220\u9664\u7B56\u7565

                                          1. Redis\u4E2D\u7684\u6570\u636E\u7279\u5F81

                                            redis\u662F\u4E00\u79CD\u5185\u5B58\u7EA7\u6570\u636E\u5E93\uFF0C\u6240\u6709\u6570\u636E\u5747\u5B58\u653E\u5728\u5185\u5B58\u4E2D\uFF0C\u5185\u5B58\u4E2D\u7684\u6570\u636E\u53EF\u4EE5\u901A\u8FC7TTL\u6307\u4EE4\u83B7\u53D6\u5176\u72B6\u6001

                                            • XX:\u5177\u6709\u65F6\u6548\u6027\u7684\u6570\u636E
                                            • -1\uFF1A\u6C38\u4E45\u6709\u6548\u7684\u6570\u636E
                                            • -2\uFF1A\u5DF2\u7ECF\u8FC7\u671F\u7684\u6570\u636E\u6216\u88AB\u5220\u9664\u7684\u6570\u636E\u6216\u672A\u5B9A\u4E49\u7684\u6570\u636E
                                          2. \u5DF2\u7ECF\u8FC7\u671F\u7684\u6570\u636E\u8FD8\u662F\u5728\u5185\u5B58\u4E2D\u653E\u7740\uFF0C\u5E76\u6CA1\u6709\u7ACB\u5373\u5220\u9664\uFF0Credis\u6709\u5220\u9664\u7B56\u7565\u6765\u63A7\u5236\u5220\u9664\u8FC7\u671F\u6570\u636E

                                          3. \u8FC7\u671F\u6570\u636E\u662F\u6307\u66FE\u7ECF\u8BBE\u7F6E\u4E86\u6709\u6548\u671F\u7684\u6570\u636E\uFF0C\u5230\u8FBE\u4E86\u6709\u6548\u671F\uFF0C\u7559\u4E0B\u6765\u7684\u6570\u636E\uFF0C\u8FD9\u4E9B\u5185\u5B58\u4E2D\u7684\u8FC7\u671F\u6570\u636E\u4E0D\u4F1A\u7ACB\u5373\u5220\u9664\u3002

                                          4. \u6570\u636E\u5220\u9664\u7B56\u7565\uFF1A

                                            • \u5B9A\u65F6\u5220\u9664
                                            • \u60F0\u6027\u5220\u9664
                                            • \u5B9A\u671F\u5220\u9664
                                          5. redis\u7684\u5B58\u50A8\u7A7A\u95F4\u4F1A\u5F00\u8F9F\u51FA\u4E00\u4E2Aexpires\u7A7A\u95F4\uFF0C\u7528\u4E8E\u5B58\u50A8\u8FC7\u671F\u6570\u636E\u7684\u6570\u636E\u5730\u5740\u548C\u8FC7\u671F\u65F6\u95F4\u4E24\u90E8\u5206

                                            image-20210927142714546

                                          6. \u5220\u9664\u7B56\u7565\u4E0D\u662F\u7ACB\u5373\u5BF9\u8FC7\u671F\u6570\u636E\u8FDB\u884C\u5220\u9664\uFF0C\u800C\u662F\u4E3A\u4E86\u5728\u5185\u5B58\u5360\u7528\uFF08redis\u7684\u6570\u636E\u90FD\u662F\u5B58\u50A8\u5728\u5185\u5B58\u4E2D\u7684\uFF09\u4E0ECPU\u5360\u7528\u4E4B\u95F4\u5BFB\u627E\u4E00\u79CD\u5E73\u8861\uFF0C\u56E0\u4E3ACPU\u8FD8\u8981\u6267\u884C\u5F88\u591A\u522B\u7684\u6307\u4EE4\uFF0C\u5220\u9664\u8FD9\u4E9B\u8FC7\u671F\u6570\u636E\u7684\u6307\u4EE4\u663E\u5F97\u6CA1\u6709\u90A3\u4E48\u91CD\u8981\uFF0C\u5728CPU\u5FD9\u7684\u65F6\u5019\uFF0C\u6240\u4EE5\u4E0D\u4F1A\u6025\u7740\u5220\u9664\u8FD9\u4E9B\u8FC7\u671F\u6570\u636E\uFF0C\u5C31\u6709\u5220\u9664\u6570\u636E\u7684\u7B56\u7565\uFF0C\u6765\u4FDD\u6301\u5185\u5B58\u7A7A\u95F4\u5360\u7528\u548CCPU\u4E4B\u95F4\u7684\u4E00\u79CD\u5E73\u8861\u3002

                                          7. \u5B9A\u65F6\uFF08\u5373\u65F6\uFF09\u5220\u9664---\u7ACB\u5373\u5220\u9664

                                            \u521B\u5EFA\u4E00\u4E2A\u5B9A\u65F6\u5668\uFF0C\u5F53key\u8BBE\u7F6E\u6709\u8FC7\u671F\u65F6\u95F4\uFF0C\u4E14\u8FC7\u671F\u65F6\u95F4\u5230\u8FBE\u65F6\uFF0C\u7531\u5B9A\u65F6\u5668\u4EFB\u52A1\u7ACB\u5373\u6267\u884C\u5BF9\u952E\u7684\u5220\u9664\u64CD\u4F5C

                                            \u4F18\u70B9

                                            • \u8282\u7EA6\u5185\u5B58\uFF0C\u5230\u65F6\u5C31\u5220\u9664\uFF0C\u5FEB\u901F\u91CA\u653E\u6389\u4E0D\u5FC5\u8981\u7684\u5185\u5B58\u5360\u7528

                                            \u7F3A\u70B9\uFF1A

                                            • CPU\u538B\u529B\u5F88\u5927\uFF0C\u65E0\u8BBACPU\u6B64\u65F6\u8D1F\u8F7D\u91CF\u591A\u9AD8\uFF0C\u5747\u5360\u7528CPU\u6765\u6267\u884C\u5220\u9664\u64CD\u4F5C\uFF0C\u4F1A\u5F71\u54CDredis\u670D\u52A1\u5668\u54CD\u5E94\u65F6\u95F4\u548C\u6307\u4EE4\u541E\u5410\u91CF

                                            \u603B\u7ED3\uFF1A\u7528\u5904\u7406\u5668\u6027\u80FD\u6362\u53D6\u5B58\u50A8\u7A7A\u95F4\uFF08\u62FF\u65F6\u95F4\u6362\u7A7A\u95F4\uFF09

                                          8. \u60F0\u6027\u5220\u9664

                                            \u6570\u636E\u5230\u8FBE\u8FC7\u671F\u65F6\u95F4\uFF0C\u4E0D\u505A\u5904\u7406\uFF0C\u7B49\u4E0B\u6B21\u8BBF\u95EE\u8BE5\u6570\u636E\u65F6\uFF0C

                                            • \u5982\u679C\u672A\u8FC7\u671F\uFF0C\u8FD4\u56DE\u6570\u636E

                                            • \u5982\u679C\u8FC7\u671F\uFF0C\u5220\u9664\uFF0C\u8FD4\u56DE\u4E0D\u5B58\u5728\uFF0C\u628Aexpires\u7A7A\u95F4\u91CC\u7684\u6570\u636E\u548C\u5185\u5B58\u7684\u771F\u6B63\u7684\u6570\u636E\u90FD\u5220\u6389

                                              \u901A\u8FC7expireIfNeeded()\u8FD9\u4E2A\u64CD\u4F5C\u6765\u505A\u7684\u3002

                                              \u5728\u4EFB\u4F55\u8C03\u7528\u83B7\u53D6\u6570\u636E\u7684\u64CD\u4F5C\u4E4B\u524D\uFF0C\u90FD\u4F1A\u6267\u884C\u8FD9\u4E2A\u64CD\u4F5C\u3002

                                            \u4F18\u70B9\uFF1A

                                            • \u8282\u7EA6CPU\u6027\u80FD\uFF0C\u53D1\u73B0\u5FC5\u987B\u5220\u9664\u7684\u65F6\u5019\u624D\u5220\u9664

                                            \u7F3A\u70B9\uFF1A

                                            • \u5185\u5B58\u7A7A\u95F4\u538B\u529B\u5F88\u5927\uFF0C\u51FA\u73B0\u957F\u671F\u5360\u7528\u5185\u5B58\u7684\u6570\u636E

                                            \u603B\u7ED3\uFF1A\u7528\u5B58\u50A8\u7A7A\u95F4\u6362\u53D6\u5904\u7406\u5668\u6027\u80FD\u3002

                                          9. \u5B9A\u671F\u5220\u9664

                                            \u76F8\u5BF9\u4E8E\u524D\u4E24\u79CD\u65B9\u6848\u90FD\u662F\u8D70\u6781\u7AEF\uFF0C\u4E00\u79CD\u62FF\u65F6\u95F4\u5373\u6548\u7387\u6362\u7A7A\u95F4\uFF0C\u53E6\u4E00\u79CD\u62FF\u7A7A\u95F4\u6362\u65F6\u95F4\u5373\u6548\u7387

                                            redis\u542F\u52A8\u670D\u52A1\u5668\u521D\u59CB\u5316\u7684\u65F6\u5019\uFF0C\u8BFB\u53D6\u914D\u7F6Eserve.hz\u7684\u503C\uFF0C\u9ED8\u8BA4\u4E3A10

                                            \u6BCF\u79D2\u949F\u6267\u884Cserver.hz\u6B21serverCron()\u8F6E\u8BE2

                                            serverCron()\u7EE7\u7EED\u5BF9\u6BCF\u4E00\u4E2A\u5E93\u8FDB\u884C\u8F6E\u8BE2databasesCron()

                                            databasesCron()\u4F1A\u6267\u884CactiveExpireCycle()

                                            activeExpireCycle()\u5BF9\u6BCF\u4E2Aexpires\u7A7A\u95F4\u8FDB\u884C\u68C0\u6D4B

                                            image-20210927144420196

                                            image-20210927144744651

                                            \u5468\u671F\u6027\u8F6E\u8BE2redis\u5E93\u4E2D\u7684\u65F6\u6548\u6027\u6570\u636E\uFF0C\u91C7\u7528\u968F\u673A\u62BD\u53D6\u7684\u7B56\u7565\uFF0C\u5229\u7528\u8FC7\u671F\u6570\u636E\u5360\u6BD4\u7684\u65B9\u5F0F\u63A7\u5236\u5220\u9664\u9891\u5EA6

                                            \u7279\u70B9\uFF1A

                                            • cpu\u6027\u80FD\u5360\u7528\u8BBE\u7F6E\u6709\u5CF0\u503C\uFF0C\u68C0\u6D4B\u9891\u5EA6\u53EF\u4EE5\u81EA\u5B9A\u4E49\u8BBE\u7F6E
                                            • \u5185\u5B58\u538B\u529B\u4E0D\u5927\uFF0C\u957F\u671F\u5360\u7528\u5185\u5B58\u7684\u51B7\u6570\u636E\u4F1A\u88AB\u6301\u7EED\u6E05\u7406

                                            \u603B\u7ED3\uFF1A\u5468\u671F\u6027\u62BD\u67E5\u5B58\u50A8\u7A7A\u95F4\uFF08\u968F\u673A\u62BD\u67E5\uFF09

                                          \u9010\u51FA\u7B97\u6CD5

                                          1. \u5F53\u65B0\u6570\u636E\u8FDB\u5165redis\u65F6\uFF0C\u53EF\u80FD\u4F1A\u51FA\u73B0\u5185\u5B58\u4E0D\u8DB3

                                            \u5220\u9664\u7B56\u7565\u63A7\u5236\u7684\u6216\u8005\u8BF4\u5220\u9664\u7684\u662F\u5177\u6709\u65F6\u6548\u6027\u7684\u6570\u636E

                                            \u5F53\u524D\u7684\u73B0\u8C61\u662F\u6240\u6709\u6570\u636E\u90FD\u6CA1\u6709\u5E26\u6709\u6548\u671F\uFF0C\u5168\u90E8\u90FD\u957F\u671F\u5B58\u5728\uFF0C\u8FD9\u4E2A\u65F6\u5019\u5220\u9664\u7B56\u7565\u4E0D\u8D77\u4F5C\u7528

                                          2. redis\u4F7F\u7528\u5185\u5B58\u5B58\u50A8\u6570\u636E\uFF0C\u5728\u6267\u884C\u6BCF\u4E00\u4E2A\u547D\u4EE4\u524D\uFF0C\u4F1A\u8C03\u7528freeMemoryIfNeeded()\u68C0\u6D4B\u5185\u5B58\u7A7A\u95F4\u662F\u5426\u5145\u8DB3\uFF0C\u5982\u679C\u5185\u5B58\u4E0D\u6EE1\u8DB3\u65B0\u52A0\u5165\u6570\u636E\u7684\u6700\u4F4E\u5B58\u50A8\u8981\u6C42\uFF0Credis\u8981\u4E34\u65F6\u5220\u9664\u4E00\u4E9B\u6570\u636E\u4E3A\u5F53\u524D\u6307\u4EE4\u6E05\u7406\u5B58\u50A8\u7A7A\u95F4\uFF0C\u6E05\u7406\u6570\u636E\u7684\u7B56\u7565\u6210\u4E3A\u9010\u51FA\u7B97\u6CD5

                                          3. \u9010\u51FA\u6570\u636E\u7684\u8FC7\u7A0B\u4E0D\u662F100%\u80FD\u6E05\u7406\u51FA\u8DB3\u591F\u7684\u7A7A\u95F4\u4F9B\u65B0\u6570\u636E\u5B58\u653E\uFF0C\u5982\u679C\u4E0D\u6210\u529F\u5219\u53CD\u590D\u6267\u884C\uFF0C\u5F53\u5BF9\u6240\u6709\u6570\u636E\u5C1D\u8BD5\u5B8C\u6BD5\u540E\uFF0C\u5982\u679C\u4E0D\u80FD\u8FBE\u5230\u5185\u5B58\u6E05\u7406\u7684\u8981\u6C42\uFF0C\u5C06\u51FA\u73B0\u9519\u8BEF\u4FE1\u606F

                                          4. \u5F71\u54CD\u6570\u636E\u9010\u51FA\u7684\u76F8\u5173\u914D\u7F6E

                                            \u6700\u5927\u53EF\u4F7F\u7528\u5185\u5B58---maxmemory

                                            \u5360\u7528\u8BA1\u7B97\u673A\u7269\u7406\u5185\u5B58\u7684\u6BD4\u4F8B\uFF0C\u9ED8\u8BA4\u503C\u662F0\uFF0C\u8868\u793A\u4E0D\u9650\u5236

                                            image-20210927150430020

                                            image-20210927150454811

                                          5. \u9010\u51FA\u7684\u6570\u636E\u76F8\u5173\u914D\u7F6E

                                            • image-20210927150821002
                                            • image-20210927150909337
                                            • image-20210927150919614

                                          Redis\u96C6\u7FA4

                                          \u4E3B\u4ECE\u590D\u5236

                                          1. \u4E92\u8054\u7F51\u4E09\u9AD8\u67B6\u6784

                                            • \u9AD8\u5E76\u53D1

                                            • \u9AD8\u6027\u80FD

                                            • \u9AD8\u53EF\u7528

                                              \u53EF\u7528\u6027\u662F\u670D\u52A1\u5668\u5DE5\u4F5C\u65F6\u95F4\u5360\u603B\u65F6\u95F4\u7684\u6BD4\u4F8B\uFF0C\u4E5F\u5C31\u662F\u53BB\u9664\u6389\u5B95\u673A\u65F6\u95F4\u4E4B\u540E\uFF0C\u670D\u52A1\u5668\u6B63\u5E38\u5DE5\u4F5C\u65F6\u95F4\u7684\u6BD4\u4F8B

                                          2. \u5355\u673Aredis\u7684\u98CE\u9669\u4E0E\u95EE\u9898

                                            • \u673A\u5668\u6545\u969C\uFF0C\u5BFC\u81F4\u786C\u76D8\u6545\u969C\u3001\u7CFB\u7EDF\u5D29\u6E83\uFF0C\u51FA\u73B0\u6570\u636E\u4E22\u5931\uFF0C\u53EF\u80FD\u5BF9\u4E1A\u52A1\u9020\u6210\u707E\u96BE\u6027\u6253\u51FB

                                            • \u5BB9\u91CF\u74F6\u9888

                                              redis\u7684\u6570\u636E\u662F\u653E\u5728\u5185\u5B58\u4E2D\u7684

                                            \u4E3A\u4E86\u907F\u514D\u5355\u4E2Aredis\u670D\u52A1\u5668\u6545\u969C\uFF0C\u51C6\u5907\u591A\u53F0\u670D\u52A1\u5668\uFF0C\u4E92\u76F8\u8FDE\u901A\uFF0C\u5C06\u6570\u636E\u590D\u5236\u591A\u4E2A\u526F\u672C\u4FDD\u5B58\u5728\u4E0D\u540C\u7684\u670D\u52A1\u5668\u4E0A\uFF0C\u8FDE\u63A5\u5728\u4E00\u8D77\uFF0C\u5E76\u4FDD\u8BC1\u6570\u636E\u662F\u540C\u6B65\u7684\uFF0C\u8FD9\u53EB\u4E3B\u4ECE\u540C\u6B65\u6216\u8005\u4E3B\u4ECE\u590D\u5236

                                            \u5373\u4F7F\u6709\u5176\u4E2D\u4E00\u53F0\u670D\u52A1\u5668\u5B95\u673A\uFF0C\u5176\u4ED6\u670D\u52A1\u5668\u4F9D\u7136\u53EF\u4EE5\u7EE7\u7EED\u63D0\u4F9B\u670D\u52A1\uFF0C\u5B9E\u73B0redis\u7684\u9AD8\u53EF\u7528\uFF0C\u540C\u65F6\u5B9E\u73B0\u6570\u636E\u7684\u5197\u4F59\u5907\u4EFD

                                            image-20210927164805802

                                          3. \u4E3B\u4ECE\u590D\u5236\u6838\u5FC3\u5DE5\u4F5C\uFF1Amaster\u7684\u6570\u636E\u590D\u5236\u5230slave\u4E2D

                                          4. \u4E3B\u4ECE\u590D\u5236\uFF1A

                                            \u5C06master\u4E2D\u7684\u6570\u636E\u5373\u65F6\u3001\u6709\u6548\u5730\u590D\u5236\u5230slave\u4E2D

                                            \u7279\u5F81\uFF1A

                                            \u4E00\u4E2Amaster\u53EF\u4EE5\u62E5\u6709\u591A\u4E2Aslave\uFF0C\u4E00\u4E2Aslave\u53EA\u5BF9\u5E94\u4E00\u4E2Amaster

                                          5. master\uFF1A

                                            • \u5199\u6570\u636E
                                            • \u6267\u884C\u5199\u64CD\u4F5C\u65F6\uFF0C\u5C06\u51FA\u73B0\u53D8\u5316\u7684\u6570\u636E\u81EA\u52A8\u540C\u6B65\u5230slave
                                            • \u8BFB\u6570\u636E\uFF08\u53EF\u5FFD\u7565\uFF09

                                            slave\uFF1A

                                            • \u8BFB\u6570\u636E
                                            • \u5199\u6570\u636E\uFF08\u7981\u6B62\uFF09
                                          6. \u9AD8\u53EF\u7528\u96C6\u7FA4

                                            \u5047\u5982\u67D0\u4E00\u53F0slave\u51FA\u95EE\u9898\u4E86\uFF0C\u5176\u4ED6\u7684slave\u4ECE\u673A\u53EF\u4EE5\u5BF9\u5916\u63D0\u4F9B\u8BF7\u6C42\uFF0C\u589E\u5F3A\u4E86\u53EF\u7528\u6027\uFF01\uFF01

                                            \u5047\u5982master\u51FA\u95EE\u9898\u4E86\uFF0C\u63A8\u9009\u4E00\u53F0slave\u6765\u5F53master\uFF0C\u589E\u5F3A\u4E86\u53EF\u7528\u6027\uFF01

                                            \u5047\u5982master\u538B\u529B\u5F88\u5927\uFF0C\u5728\u67D0\u4E00\u4E2Aslave\u4E0A\uFF0C\u8FFD\u52A0\u4E0B\u9762\u7684\u673A\u5668\uFF0C\u4E5F\u5C31\u662F\u4E00\u4E2A\u673A\u5668\u65E2\u53EF\u4EE5\u5F53master\u4E5F\u53EF\u4EE5\u5F53slave\uFF0Cmaster\u548Cslave\u662F\u4E00\u4E2A\u76F8\u5BF9\u7684\u6982\u5FF5

                                            \u8FD9\u4E9B\u90FD\u662F\u57FA\u4E8E\u4E3B\u4ECE\u590D\u5236\u7684\uFF0C\u5373\u4E3B\u673A\u548C\u4ECE\u673A\u91CC\u9762\u7684\u6570\u636E\u662F\u76F8\u540C\u7684\uFF0C\u662F\u7ECF\u8FC7\u590D\u5236\u6216\u8005\u8BF4\u514B\u9686\u7684\u3002

                                            \u4E5F\u53EF\u4EE5\u51C6\u5907\u591A\u4E2Amaster\uFF0C\u7EC4\u6210\u4E00\u4E2Amaster\u96C6\u7FA4\u3002

                                          7. \u4E3B\u4ECE\u590D\u5236\u7684\u4F5C\u7528\uFF1A

                                            • \u8BFB\u5199\u5206\u79BB\uFF1Amaster\u5199\uFF0Cslave\u8BFB\uFF0C\u63D0\u9AD8\u670D\u52A1\u5668\u7684\u8BFB\u5199\u8D1F\u8F7D\u80FD\u529B
                                            • \u8D1F\u8F7D\u5747\u8861\uFF1A\u57FA\u4E8E\u4E3B\u4ECE\u7ED3\u6784\uFF0C\u914D\u5408\u8BFB\u5199\u5206\u79BB\uFF0C\u7531slave\u5206\u62C5master\u8D1F\u8F7D\uFF0C\u5E76\u6839\u636E\u9700\u6C42\u7684\u53D8\u5316\uFF0C\u6539\u53D8slave\u7684\u6570\u91CF\uFF0C\u901A\u8FC7\u591A\u4E2A\u4ECE\u8282\u70B9\u5206\u62C5\u6570\u636E\u8BFB\u53D6\u8D1F\u8F7D\uFF0C\u5927\u5927\u63D0\u9AD8redis\u670D\u52A1\u5668\u7684\u5E76\u53D1\u91CF\u548C\u6570\u636E\u541E\u5410\u91CF\u3002
                                            • \u6545\u969C\u6062\u590D\uFF1A\u5F53master\u51FA\u73B0\u95EE\u9898\u65F6\uFF0C\u7531slave\u63D0\u4F9B\u670D\u52A1\uFF0C\u5B9E\u73B0\u5FEB\u901F\u7684\u6545\u969C\u6062\u590D
                                            • \u6570\u636E\u5197\u4F59\uFF1A\u5B9E\u73B0\u6570\u636E\u70ED\u5907\u4EFD\uFF0C\u662F\u6301\u4E45\u5316\u4E4B\u5916\u7684\u4E00\u79CD\u6570\u636E\u5197\u4F59\u7684\u65B9\u5F0F
                                            • \u9AD8\u53EF\u7528\u57FA\u77F3\uFF1A\u57FA\u4E8E\u4E3B\u4ECE\u590D\u5236\uFF0C\u6784\u5EFA\u54E8\u5175\u6A21\u5F0F\u548C\u96C6\u7FA4\uFF0C\u5B9E\u73B0Redis\u7684\u9AD8\u53EF\u7528\u65B9\u6848
                                          8. \u4E3B\u4ECE\u590D\u5236\u7684\u5DE5\u4F5C\u6D41\u7A0B

                                            • slave\u8FDE\u63A5master\uFF0Cmaster\u91CC\u6709\u6570\u636E\uFF0Cslave\u91CC\u6CA1\u6709\u6570\u636E

                                              image-20210927171141356

                                              • \u72B6\u6001\uFF1A

                                                slave\uFF1A\u4FDD\u5B58master\u7684\u5730\u5740\u4E0E\u7AEF\u53E3

                                                master\uFF1A\u4FDD\u5B58slave\u7684\u7AEF\u53E3

                                                \u603B\u4F53\uFF1Amaster\u4E0Eslave\u4E4B\u95F4\u521B\u5EFA\u4E86\u8FDE\u63A5\u7684socket

                                              • \u5EFA\u7ACB\u8FDE\u63A5\uFF0C\u7B2C\u4E00\u6B65\u53D1\u9001\u6307\u4EE4\u5C31\u6709\u4E09\u79CD\u65B9\u5F0F

                                                image-20210927171355993

                                                \u65B9\u5F0F\u4E00\u7684\u5BA2\u6237\u7AEF\u6307\u7684\u662Fslave\u7684\u5BA2\u6237\u7AEF

                                                \u65B9\u5F0F\u4E8C\u3001\u65B9\u5F0F\u4E09\u7684\u670D\u52A1\u5668\u6307\u7684\u90FD\u662Fslave\u670D\u52A1\u5668

                                            • \u6570\u636E\u540C\u6B65\u5DE5\u4F5C\uFF0C\u53CD\u590D\u540C\u6B65

                                              image-20210927181031834

                                              \u4E3B\u4ECE\u590D\u5236\u7684\u6570\u636E\u540C\u6B65\u9636\u6BB5\uFF0C\u65E2\u8981\u7528\u5230RDB\uFF0C\u4E5F\u8981\u7528\u5230AOF\uFF0CRDB\u548CAOF\u90FD\u662F\u6570\u636E\u6301\u4E45\u5316\u7684\u4E24\u79CD\u65B9\u5F0F\uFF0C\u4ECE\u673A\u8BF7\u6C42\u4E3B\u673A\u540C\u6B65\u6570\u636E\u65F6\uFF0C\u9996\u5148\u662F\u901A\u8FC7RDB\u7684\u65B9\u5F0F\uFF0CRDB\u7684bgsave\u662F\u901A\u8FC7\u8C03\u7528fork\u51FD\u6570\u53E6\u8D77\u5B50\u7EBF\u7A0B\u6765\u6267\u884C\u6570\u636E\u6301\u4E45\u5316\u5DE5\u4F5C\u5373\u751F\u6210RDB\u6587\u4EF6\uFF0C\u90A3\u4E48\u8FD9\u4E2A\u8FC7\u7A0B\u4E2D\u4ECD\u7136\u53EF\u80FD\u6709\u5176\u4ED6\u547D\u4EE4\u8FDB\u6765\uFF0C\u56E0\u4E3ARDB\u662F\u4E00\u79CD\u5F53\u524D\u6570\u636E\u5E93\u6570\u636E\u5FEB\u7167\u7684\u4E00\u79CD\u65B9\u5F0F\uFF0C\u90A3\u4E48\u5728\u751F\u6210RDB\u6587\u4EF6\u8FD8\u6709\u4ECE\u673A\u63A5\u6536RDB\u6587\u4EF6\u7684\u8FD9\u4E2A\u8FC7\u7A0B\u4E2D\uFF0C\u4ECD\u7136\u53EF\u80FD\u6709\u5176\u4ED6\u547D\u4EE4\uFF0C\u8FD9\u90E8\u5206\u547D\u4EE4\u6240\u6267\u884C\u7684\u7ED3\u679C\u7684\u6570\u636E\u6CA1\u6709\u8FDB\u5165RDB\u5FEB\u7167\u6587\u4EF6\uFF0C\u6240\u4EE5\u9700\u8981\u5355\u72EC\u590D\u5236\uFF0C\u4E5F\u5C31\u662F\u90E8\u5206\u590D\u5236\u3002

                                              \u6240\u4EE5\u6709\u5168\u91CF\u590D\u5236\u548C\u90E8\u5206\u590D\u5236

                                              \u5168\u91CF\u590D\u5236\u662F\u6307\u7B2C\u4E00\u4E2Aslave\u8FDE\u63A5\u65F6\uFF0C\u4E3B\u673A\u751F\u6210RDB\u6587\u4EF6\uFF0C\u5FEB\u7167\u6587\u4EF6\u91CC\u7684\u6570\u636E\uFF0C\u5728\u4ECE\u673A\u8FDB\u884C\u4E00\u4E2A\u5168\u91CF\u7684\u6062\u590D

                                              \u90E8\u5206\u590D\u5236\u662F\u6307\u5728\u751F\u6210RDB\u6587\u4EF6\u548C\u4ECE\u673A\u63A5\u6536RDB\u6587\u4EF6\u7684\u8FC7\u7A0B\u4E2D\u7684\u547D\u4EE4\uFF0C\u8FD9\u90E8\u5206\u547D\u4EE4\u901A\u8FC7AOF\u7684\u65B9\u5F0F\u8FDB\u884C\u6301\u4E45\u5316\u5E76\u4E14\u6062\u590D\uFF01\uFF01

                                              \u6240\u4EE5\u5168\u91CF\u590D\u5236----RDB\uFF0C\u90E8\u5206\u590D\u5236----AOF

                                              \u90A3\u4E48\u6709AOF\uFF0C\u5C31\u6709\u91CD\u5199\uFF0C\u56E0\u4E3Aaof\u6587\u4EF6\u7684\u547D\u4EE4\u9700\u8981\u91CD\u5199\uFF01\uFF01\u6709\u624B\u52A8\u91CD\u5199\u4E5F\u6709\u81EA\u52A8\u91CD\u5199\uFF0C\u5728\u8FD9\u91CC\u5C31\u662F\u624B\u52A8\u91CD\u5199\u3002\u90E8\u5206\u590D\u5236\u9700\u8981AOF\uFF0C\u90A3\u4E48\u5728\u7B2C\u4E00\u4E2Aslave\u8FDE\u63A5\u4E3B\u673A\u65F6\uFF0C\u521B\u5EFA\u547D\u4EE4\u7F13\u51B2\u533A\uFF0C\u63A5\u6536\u547D\u4EE4\uFF0C\u8FD9\u4E9B\u547D\u4EE4\u7528\u4E8E\u751F\u6210aof\u6587\u4EF6\u53D1\u7ED9\u4ECE\u673A\u8FDB\u884C\u6570\u636E\u7684\u6062\u590D\uFF01

                                              aof\uFF0C\u63A5\u6536\u7684\u6307\u4EE4\u9996\u5148\u8FDB\u5165\u547D\u4EE4\u7F13\u51B2\u533A\uFF0C\u8FD9\u4E0E\u4E4B\u524D\u7684\u601D\u8DEF\u4E5F\u662F\u4E00\u6837\u7684\u3002

                                            • \u547D\u4EE4\u4F20\u64AD\u9636\u6BB5

                                              \u5F53master\u6570\u636E\u5E93\u72B6\u6001\u88AB\u4FEE\u6539\u540E\uFF0C\u5BFC\u81F4\u4E3B\u4ECE\u670D\u52A1\u5668\u6570\u636E\u5E93\u72B6\u6001\u4E0D\u4E00\u81F4\uFF0C\u6B64\u65F6\u9700\u8981\u8BA9\u4E3B\u4ECE\u6570\u636E\u540C\u6B65\u5230\u4E00\u81F4\u7684\u72B6\u6001\uFF0C\u540C\u6B65\u7684\u52A8\u4F5C\u79F0\u4E3A\u547D\u4EE4\u4F20\u64AD

                                              master\u5C06\u63A5\u6536\u5230\u7684\u6570\u636E\u53D8\u66F4\u547D\u4EE4\u53D1\u9001\u7ED9slave\uFF0Cslave\u63A5\u6536\u547D\u4EE4\u540E\u6267\u884C\u547D\u4EE4

                                          9. \u4E3B\u4ECE\u590D\u5236\u7684\u6570\u636E\u540C\u6B65\u9636\u6BB5\u7684master\u8BF4\u660E\uFF1A

                                            • \u5982\u679Cmaster\u6570\u636E\u91CF\u5DE8\u5927\uFF0C\u6570\u636E\u540C\u6B65\u9636\u6BB5\u5E94\u8BE5\u6D41\u91CF\u9AD8\u5CF0\u671F\uFF0C\u907F\u514Dmaster\u963B\u585E\uFF0C\u5F71\u54CD\u4E1A\u52A1\u6B63\u5E38\u6267\u884C\u3002
                                            • \u590D\u5236\u7F13\u51B2\u533A\u5927\u5C0F\u8BBE\u7F6E\u4E0D\u5408\u7406\uFF0C\u4F1A\u5BFC\u81F4\u6570\u636E\u6EA2\u51FA\uFF0C\u5982\u8FDB\u884C\u5168\u91CF\u590D\u5236\u5468\u671F\u592A\u957F\uFF0C\u8FDB\u884C\u90E8\u5206\u590D\u5236\u65F6\uFF0C\u53D1\u73B0\u6570\u636E\u5DF2\u7ECF\u5B58\u5728\u4E22\u5931\u7684\u60C5\u51B5\uFF0C\u5FC5\u987B\u8FDB\u884C\u7B2C\u4E8C\u6B21\u5168\u91CF\u590D\u5236\uFF0C\u81F4\u4F7Fslave\u9677\u5165\u6B7B\u5FAA\u73AF\u72B6\u6001\u3002
                                            • master\u5EFA\u8BAE\u7559\u4E0B30%-50%\u7684\u5185\u5B58\u7528\u4E8E\u6267\u884Cbgsave\u547D\u4EE4\u548C\u521B\u5EFA\u7F13\u51B2\u533A
                                          10. \u4E3B\u4ECE\u590D\u5236\u7684\u6570\u636E\u540C\u6B65\u9636\u6BB5\u7684slave\u8BF4\u660E\uFF1A

                                            • \u4E3A\u907F\u514Dslave\u8FDB\u884C\u5168\u91CF\u590D\u5236\u3001\u90E8\u5206\u590D\u5236\u65F6\u670D\u52A1\u5668\u54CD\u5E94\u963B\u585E\u6216\u6570\u636E\u4E0D\u540C\u6B65\uFF0C\u5EFA\u8BAE\u5173\u95ED\u6B64\u671F\u95F4\u7684\u5BF9\u5916\u670D\u52A1
                                            • image-20210927183727073
                                            • slave\u8FC7\u591A\u65F6\uFF0C\u5EFA\u8BAE\u8C03\u6574\u62D3\u6251\u7ED3\u6784\uFF0C\u7531\u4E00\u4E3B\u591A\u4ECE\u7ED3\u6784\u53D8\u4E3A\u6811\u72B6\u7ED3\u6784\uFF0C\u4E2D\u95F4\u7684\u8282\u70B9\u65E2\u662Fmaster\uFF0C\u4E5F\u662Fslave\uFF0C\u6CE8\u610F\u4F7F\u7528\u6811\u72B6\u7ED3\u6784\u65F6\uFF0C\u7531\u4E8E\u5C42\u7EA7\u6DF1\u5EA6\uFF0C\u5BFC\u81F4\u6DF1\u5EA6\u8D8A\u9AD8\u7684slave\u4E0E\u6700\u9876\u5C42\u7684master\u95F4\u6570\u636E\u540C\u6B65\u5EF6\u8FDF\u8F83\u5927\uFF0C\u6570\u636E\u4E00\u81F4\u6027\u53D8\u5DEE\uFF0C\u5E94\u8C28\u614E\u9009\u62E9
                                          11. \u90E8\u5206\u590D\u5236\u7684\u4E09\u4E2A\u6838\u5FC3\u8981\u7D20

                                            • \u670D\u52A1\u5668\u7684\u8FD0\u884Cid

                                              \u670D\u52A1\u5668\u8FD0\u884Cid\u662F\u6BCF\u4E00\u53F0\u670D\u52A1\u5668\u6BCF\u6B21\u8FD0\u884C\u7684\u8EAB\u4EFD\u8BC6\u522B\u7801\uFF0C\u4E00\u53F0\u670D\u52A1\u5668\u591A\u6B21\u8FD0\u884C\u53EF\u4EE5\u751F\u6210\u591A\u4E2A\u8FD0\u884Cid

                                              \u5982\u679C\u60F3\u4E24\u6B21\u64CD\u4F5C\u5747\u5BF9\u662F\u7531\u540C\u4E00\u53F0\u4E3B\u670D\u52A1\u5668\u8FDB\u884C\uFF0C\u5FC5\u987B\u6BCF\u6B21\u64CD\u4F5C\u643A\u5E26\u5BF9\u5E94\u7684\u8FD0\u884Cid\uFF0C\u7528\u4E8E\u5BF9\u65B9\u8BC6\u522B

                                            • \u4E3B\u670D\u52A1\u5668\u7684\u590D\u5236\u79EF\u538B\u7F13\u51B2\u533A

                                              \u590D\u5236\u7F13\u51B2\u533A\u662F\u4E00\u4E2A\u5148\u8FDB\u5148\u51FA\u961F\u5217\uFF0C\u7528\u4E8E\u5B58\u50A8\u670D\u52A1\u5668\u6267\u884C\u8FC7\u7684\u547D\u4EE4\uFF0C\u6BCF\u6B21\u4F20\u64AD\u547D\u4EE4\uFF0Cmaster\u90FD\u4F1A\u5C06\u4F20\u64AD\u7684\u547D\u4EE4\u8BB0\u5F55\u4E0B\u6765\uFF0C\u5E76\u5B58\u50A8\u5728\u590D\u5236\u7F13\u51B2\u533A

                                              image-20210927185900890

                                              \u6982\u5FF5\uFF1A\u590D\u5236\u7F13\u51B2\u533A\uFF0C\u662F\u4E00\u4E2A\u5148\u8FDB\u5148\u51FA\u961F\u5217\uFF0C\u7528\u4E8E\u5B58\u50A8\u670D\u52A1\u5668\u6267\u884C\u8FC7\u7684\u547D\u4EE4\uFF0C\u6BCF\u6B21\u4F20\u64AD\u547D\u4EE4\uFF0Cmaster\u90FD\u4F1A\u5C06\u4F20\u64AD\u7684\u547D\u4EE4\u8BB0\u5F55\u4E0B\u6765\uFF0C\u5E76\u5B58\u50A8\u5728\u590D\u5236\u7F13\u51B2\u533A

                                              \u6BCF\u53F0\u670D\u52A1\u5668\u542F\u52A8\u65F6\uFF0C\u5982\u679C\u5F00\u542F\u6709AOF\uFF0C\u6216\u88AB\u8FDE\u63A5\u79F0\u4E3Amaster\u8282\u70B9\uFF0C\u5373\u521B\u5EFA\u590D\u5236\u7F13\u51B2\u533A

                                              \u4F5C\u7528\uFF1A\u7528\u4E8E\u4FDD\u5B58master\u670D\u52A1\u5668\u6536\u5230\u7684\u6240\u6709\u4FEE\u6539\u6307\u4EE4\uFF08\u4EC5\u5F71\u54CD\u6570\u636E\u53D8\u66F4\u7684\u6307\u4EE4\uFF0C\u4F8B\u5982set\uFF09

                                              \u5F53master\u670D\u52A1\u5668\u63A5\u6536\u5230\u4E3B\u5BA2\u6237\u7AEF\u7684\u6307\u4EE4\u65F6\uFF0C\u9664\u4E86\u5C06\u6307\u4EE4\u6267\u884C\uFF0C\u4F1A\u5C06\u6307\u4EE4\u5B58\u50A8\u5230\u7F13\u51B2\u533A\u4E2D\uFF01\uFF01\uFF01\u4E0D\u662F\u8BF4\u6307\u4EE4\u4EC5\u5B58\u50A8\u5230\u7F13\u51B2\u533A\u4E2D\u800C\u4E0D\u88AB\u670D\u52A1\u5668\u6267\u884C

                                            • \u4E3B\u4ECE\u670D\u52A1\u5668\u7684\u590D\u5236\u504F\u79FB\u91CFoffset

                                              \u6982\u5FF5\uFF1A\u4E00\u4E2A\u6570\u5B57\uFF0C\u63CF\u8FF0\u590D\u5236\u7F13\u51B2\u533A\u4E2D\u7684\u6307\u4EE4\u5B57\u8282\u4F4D\u7F6E

                                              \u5206\u7C7B\uFF1A

                                              • master\u590D\u5236\u504F\u79FB\u91CF\uFF0C\u8BB0\u5F55\u53D1\u9001\u7ED9\u6240\u6709slave\u7684\u6307\u4EE4\u5B57\u8282\u5BF9\u5E94\u7684\u4F4D\u7F6E\uFF08\u591A\u4E2A\uFF09
                                              • slave\u590D\u5236\u504F\u79FB\u91CF\uFF0C\u8BB0\u5F55slave\u63A5\u6536master\u53D1\u9001\u8FC7\u6765\u7684\u6307\u4EE4\u5B57\u8282\u5BF9\u5E94\u7684\u4F4D\u7F6E\uFF08\u4E00\u4E2A\uFF09
                                              • \u6570\u636E\u6765\u6E90\uFF0Cmaster\u7AEF\u53D1\u9001\u4F9D\u6B21\u8BB0\u5F55\u4E00\u6B21\uFF0Cslave\u7AEF\u63A5\u6536\u4E00\u6B21\u8BB0\u5F55\u4E00\u6B21
                                              • \u4F5C\u7528\uFF1A\u540C\u6B65\u4FE1\u606F\uFF0C\u6BD4\u5BF9master\u4E0Eslave\u7684\u5DEE\u5F02\uFF0C\u5F53slave\u65AD\u7EBF\u540E\uFF0C\u6062\u590D\u6570\u636E\u4F7F\u7528\uFF01\uFF01
                                          12. \u4E3B\u4ECE\u590D\u5236\u5DE5\u4F5C\u6D41\u7A0B

                                            image-20210927195251095

                                          13. \u5168\u91CF\u590D\u5236\u548C\u90E8\u5206\u590D\u5236\u4E24\u4E2A\u9636\u6BB5\u5B8C\u4E4B\u540E\u5230\u4F20\u64AD\u9636\u6BB5\uFF0C\u662F\u9760\u5FC3\u8DF3\u673A\u5236\uFF0C\u53CD\u590D\u6267\u884C\uFF0C\u53CD\u590D\u4F20\u64AD\uFF0C\u4F7F\u5F97\u4E3B\u4ECE\u540C\u6B65

                                            image-20210927195555404

                                            \u5F53slave\u591A\u6570\u6389\u7EBF\uFF0C\u6216\u5EF6\u8FDF\u8FC7\u9AD8\u65F6\uFF0Cmaster\u4E3A\u4FDD\u969C\u6570\u636E\u7A33\u5B9A\u6027\uFF0C\u5C06\u62D2\u7EDD\u6240\u6709\u4FE1\u606F\u540C\u6B65\u64CD\u4F5C

                                            image-20210927203826475

                                            image-20210927204302988

                                          14. \u4E3B\u4ECE\u590D\u5236\u5E38\u89C1\u95EE\u9898

                                            • \u9891\u7E41\u7684\u5168\u91CF\u590D\u5236---\u7B2C\u4E00\u79CD\u60C5\u51B5

                                              \u968F\u7740\u7CFB\u7EDF\u7684\u8FD0\u884C\uFF0Cmaster\u670D\u52A1\u5668\u7684\u6570\u636E\u91CF\u4F1A\u8D8A\u6765\u8D8A\u5927\uFF0C\u4E00\u65E6master\u91CD\u542F\uFF0Crunid\u5C06\u53D1\u751F\u53D8\u5316\uFF0C\u4F1A\u5BFC\u81F4\u5168\u90E8slave\u7684\u5168\u91CF\u590D\u5236\u64CD\u4F5C

                                              redis\u5185\u90E8\u4F18\u5316\uFF1A

                                              \u5728master\u5173\u95ED\u65F6\uFF0C\u901A\u8FC7RDB\u7684\u65B9\u5F0F\uFF08\u662F\u6709\u547D\u4EE4\u7684\uFF0C\u4E00\u822C\u662Fbgsave\uFF09\uFF0C\u8FDB\u884C\u6301\u4E45\u5316\uFF0C\u5C06runid\u4E0Eoffset\u4FDD\u5B58\u5230rdb\u6587\u4EF6\u4E2D

                                              \u91CD\u542F\u540E\uFF0C\u6062\u590Drunid\u4E0Eoffset\uFF0C\u4F7F\u6240\u6709slave\u8BA4\u4E3A\u8FD8\u662F\u4E4B\u524D\u7684master\uFF0C\u5728\u6570\u636E\u540C\u6B65\u9636\u6BB5\uFF0C\u5C31\u4E0D\u7528\u5168\u90E8slave\u90FD\u662F\u5168\u91CF\u590D\u5236\u64CD\u4F5C

                                            • \u9891\u7E41\u7684\u5168\u91CF\u590D\u5236---\u7B2C\u4E8C\u79CD\u60C5\u51B5

                                              image-20210927205344386

                                            • \u9891\u7E41\u7684\u7F51\u7EDC\u4E2D\u65AD----\u7B2C\u4E00\u79CD\u60C5\u51B5

                                          \u54E8\u5175

                                          1. \u4E3B\u673A\u5B95\u673A\u4E4B\u540E

                                            • \u5C06\u5B95\u673A\u7684master\u4E0B\u7EBF
                                            • \u627E\u4E00\u4E2Aslave\u4F5C\u4E3Amaster
                                            • \u901A\u77E5\u6240\u6709\u7684slave\u8FDE\u63A5\u65B0\u7684master
                                            • \u542F\u52A8\u65B0\u7684master\u4E0Eslave
                                            • \u5168\u96F6\u590D\u5236*N + \u90E8\u5206\u590D\u5236 *N
                                          2. \u54E8\u5175\u672C\u8EAB\u662F\u4E00\u4E2Aredis\u670D\u52A1\uFF0C\u591A\u4E2A\u54E8\u5175\u6784\u6210\u4E00\u4E2A\u5206\u5E03\u5F0F\u7CFB\u7EDF\uFF0C\u505A\u76D1\u63A7\u5DE5\u4F5C\uFF0C\u7528\u4E8E\u5BF9\u4E3B\u4ECE\u7ED3\u6784\u4E2D\u7684\u6BCF\u53F0\u670D\u52A1\u5668\u8FDB\u884C\u76D1\u63A7\uFF0C\u5F53\u51FA\u73B0\u6545\u969C\u65F6\u901A\u8FC7\u6295\u7968\u673A\u5236\u9009\u62E9\u65B0\u7684master\u5E76\u5C06\u6240\u6709slave\u8FDE\u63A5\u5230\u65B0\u7684master

                                          3. \u54E8\u5175\u8FD9\u4E2A\u5206\u5E03\u5F0F\u7CFB\u7EDF\u7684\u4F5C\u7528\uFF1A

                                            • \u76D1\u63A7

                                              \u4E0D\u65AD\u5730\u68C0\u67E5master\u548Cslave\u662F\u5426\u6B63\u5E38\u8FD0\u884C

                                              master\u5B58\u6D3B\u68C0\u6D4B\uFF0Cmaster\u4E0Eslave\u8FD0\u884C\u60C5\u51B5\u68C0\u6D4B

                                            • \u901A\u77E5

                                              \u5F53\u88AB\u76D1\u63A7\u7684\u670D\u52A1\u5668\u51FA\u73B0\u95EE\u9898\u65F6\uFF0C\u5411\u5176\u4ED6\u54E8\u5175\uFF08\u54E8\u5175\u4E4B\u95F4\u540C\u6B65\u4FE1\u606F\uFF09\uFF0C\u5BA2\u6237\u7AEF\u53D1\u9001\u901A\u77E5

                                            • \u81EA\u52A8\u6545\u969C\u8F6C\u79FB

                                              \u65AD\u5F00master\u4E0Eslave\u8FDE\u63A5\uFF0C\u9009\u53D6\u4E00\u4E2Aslave\u4F5C\u4E3Amaster\uFF0C\u5C06\u5176\u4ED6slave\u8FDE\u63A5\u5230\u65B0\u7684master\uFF0C\u5E76\u544A\u77E5\u5BA2\u6237\u7AEF\u65B0\u7684\u670D\u52A1\u5668\u5730\u5740

                                          4. \u54E8\u5175\u4E5F\u662F\u4E00\u4E2Aredis\u670D\u52A1\uFF0C\u53EA\u662F\u4E0D\u63D0\u4F9B\u6570\u636E\u670D\u52A1

                                            \u901A\u5E38\u54E8\u5175\u914D\u7F6E\u6570\u91CF\u4E3A\u5355\u6570

                                          5. \u542F\u52A8\u54E8\u5175\u547D\u4EE4

                                            image-20210927210554431

                                          6. \u54E8\u5175\u7684\u5DE5\u4F5C\u539F\u7406

                                            \u54E8\u5175\u4E3B\u8981\u505A\u7684\u4E8B\u60C5\u5C31\u662F\u4E3B\u4ECE\u5207\u6362

                                            \u4E3B\u4ECE\u5207\u6362---\u9009\u53D6slave\u505A\u4E3A\u65B0\u7684master\u7684\u8FC7\u7A0B

                                            • \u76D1\u63A7

                                              \u7528\u4E8E\u540C\u6B65\u5404\u4E2A\u8282\u70B9\u7684\u72B6\u6001\u4FE1\u606F

                                              • \u83B7\u53D6\u5404\u4E2A\u54E8\u5175\u7684\u72B6\u6001\uFF08\u5404\u4E2A\u54E8\u5175\u4E4B\u95F4\u7684\u72B6\u6001\u4E5F\u9700\u8981\u540C\u6B65\uFF01\uFF01\uFF09\uFF08\u901A\u8FC7PING,\u662F\u5426\u5728\u7EBF\uFF09
                                              • \u83B7\u53D6master\u7684\u72B6\u6001---master\u7684\u5C5E\u6027\uFF08runid\u3001role\uFF1Amaster\uFF09\u4EE5\u53CA\u5404\u4E2Aslave\u7684\u8BE6\u7EC6\u4FE1\u606F
                                              • \u83B7\u53D6\u6240\u6709slave\u7684\u72B6\u6001\uFF08\u6839\u636Emaster\u4E2D\u7684slave\u4FE1\u606F\uFF09
                                                • runid
                                                • role\uFF1Aslave
                                                • master_host master_port
                                                • offset
                                                • ...

                                              image-20210927225143454

                                              \u54E8\u5175\u4F1A\u5411master\u8981\u4FE1\u606F\uFF0C\u4F1A\u5411slave\u8981\u4FE1\u606F\uFF0C\u54E8\u5175\u4E4B\u95F4\u5F62\u6210\u4E00\u4E2A\u7F51\u7EDC\uFF0C\u6240\u6709\u54E8\u5175\u5728\u54E8\u5175\u8FD9\u4E2A\u7F51\u7EDC\u53D1\u5E03\u4FE1\u606F\u3001\u8BA2\u9605\u4FE1\u606F\u3001\u63A5\u6536\u4FE1\u606F

                                            • \u901A\u77E5

                                              \u7EF4\u62A4\u4FE1\u606F\u5BF9\u7B49\u7684\u9636\u6BB5\uFF0C\u54E8\u5175\u4E4B\u95F4\u4E92\u76F8\u901A\u77E5\uFF0C\u540C\u6B65\u4FE1\u606F

                                            • \u6545\u969C\u8F6C\u79FB

                                              • \u53D1\u73B0\u95EE\u9898

                                                \u6BD4\u5982\u4E00\u4E2A\u54E8\u5175\u53D1\u73B0master\u670D\u52A1\u5668\u6302\u6389\u4E86\uFF0C\u4F1A\u7ED9master\u6807\u8BB0\u4E00\u4E2A\u4E3B\u89C2\u6302\u6389\u7684\u72B6\u6001S_DOWN\uFF0C\u90A3\u4E48\u5176\u4ED6\u7684\u54E8\u5175\u4E5F\u90FD\u4F1A\u548Cmaster\u8FDB\u884C\u901A\u4FE1\uFF0C\u8D85\u8FC7\u534A\u6570\u4EE5\u4E0A\u7684\u54E8\u5175\u53D1\u73B0master\u6302\u6389\u4E86\uFF0C\u90A3\u4E48\u5C31\u4F1A\u8BA4\u4E3Amaster\u771F\u7684\u6302\u6389\u4E86\uFF0C\u4F1A\u7ED9master\u6807\u8BB0\u4E00\u4E2A\u5BA2\u89C2\u6302\u6389\u7684\u72B6\u6001O_DOWN\u3002

                                                \u91CD\u70B9\uFF1A\u54E8\u5175\u4E4B\u95F4\u4F1A\u8FDB\u884C\u901A\u4FE1\uFF0C\u540C\u6B65\u4FE1\u606F\uFF0C\u54E8\u5175\u4E4B\u95F4\u4F1A\u4E92\u76F8\u901A\u77E5\uFF01\uFF01\uFF01

                                              • \u7ADE\u9009\u5177\u6709\u51B3\u5B9A\u6743\u7684\u54E8\u5175

                                                \u662F\u901A\u8FC7\u6295\u7968\u673A\u5236\u5148\u9009\u53D6\u4E00\u4E2A\u54E8\u5175\u4F5C\u4E3A\u5177\u6709\u51B3\u5B9A\u6743\u7684\u54E8\u5175

                                                \u67D0\u4E2A\u54E8\u5175\u5148\u63A5\u5230\u6765\u81EA\u5176\u4ED6\u54EA\u4E2A\u54E8\u5175\u7684\u4FE1\u606F\uFF0C\u6309\u7167\u63A5\u6536\u4FE1\u606F\u7684\u987A\u5E8F\u5C31\u4F1A\u628A\u7968\u6295\u7ED9\u90A3\u4E2A\u54E8\u5175!----\u6295\u7968\u673A\u5236

                                              • \u4F18\u9009\u65B0master\uFF0C\u9009\u53D6slave\u670D\u52A1\u5668\u4F5C\u4E3Amaster\u7684\u539F\u5219

                                                • \u9009\u53D6\u5728\u7EBF\u7684
                                                • pass\u6389\u54CD\u5E94\u6162\u7684\u3002\u54E8\u5175\u4E0D\u505C\u5730\u5728\u548Cslave\u670D\u52A1\u5668\u901A\u4FE1\uFF0C\u6709\u7684slave\u56DE\u5F97\u5757\uFF0C\u6709\u7684slave\u56DE\u5F97\u6162
                                                • pass\u6389\u4E0E\u539Fmaster\u65AD\u5F00\u65F6\u95F4\u4E45\u7684
                                                • \u4F18\u5148\u539F\u5219
                                                  • \u4F18\u5148\u7EA7
                                                  • offset\uFF08slave\u4E0Emaster\u7684offset\u5DEE\u8DDD\u5C0F\u7684\u4F18\u5148\uFF09
                                                  • runid
                                              • \u53D1\u9001\u6307\u4EE4

                                                • \u5411\u65B0\u7684master\u53D1\u9001slaveof no one
                                                • \u5411\u5176\u4ED6slave\u53D1\u9001slaveof\u65B0\u7684master IP\u7AEF\u53E3
                                                • \u539Fmaster\u4F5C\u4E3Aslave\uFF0C\u6545\u969C\u6062\u590D\u540E\u8FDE\u63A5\uFF0Cslaveof\u65B0\u7684master\uFF01\uFF01(\u539Fmaster\u5982\u679C\u6062\u590D\u4E4B\u540E\u8FDE\u63A5\u4E86\u4E0A\u6765\u662F\u4F5C\u4E3Aslave\u7684\u8EAB\u4EFD\uFF01)

                                          \u96C6\u7FA4

                                          1. \u96C6\u7FA4\u4F5C\u7528\uFF1A

                                            \u5206\u6563\u5355\u53F0\u670D\u52A1\u5668\u7684\u8BBF\u95EE\u538B\u529B\uFF0C\u5B9E\u73B0\u8D1F\u8F7D\u5747\u8861

                                            \u5206\u6563\u5355\u53F0\u670D\u52A1\u5668\u7684\u5B58\u50A8\u538B\u529B\uFF0C\u5B9E\u73B0\u53EF\u6269\u5C55\u6027

                                            \u964D\u4F4E\u5355\u53F0\u670D\u52A1\u5668\u5B95\u673A\u5E26\u6765\u7684\u4E1A\u52A1\u707E\u96BE

                                          2. \u96C6\u7FA4\u5C31\u662F\u4F7F\u7528\u7F51\u7EDC\u5C06**\u82E5\u5E72\u53F0\u8BA1\u7B97\u673A\uFF08\u4E3B\u673A\uFF09**\u8054\u901A\u8D77\u6765\uFF0C\u5E76\u63D0\u4F9B\u7EDF\u4E00\u7684\u7BA1\u7406\u65B9\u5F0F\uFF0C\u4F7F\u5176\u5BF9\u5916\u5448\u73B0\u5355\u673A\u7684\u670D\u52A1\u6548\u679C

                                          3. \u6570\u636E\u5B58\u50A8\u8BBE\u8BA1

                                            • \u901A\u8FC7\u7B97\u6CD5\u8BBE\u8BA1\uFF0C\u8BA1\u7B97\u51FAkey\u5E94\u8BE5\u4FDD\u5B58\u7684\u4F4D\u7F6E

                                              key\u5148\u7ECF\u8FC7CRC16(key)---\u518D%16384---\u5F97\u5230\u4E00\u4E2A\u503C\uFF0C\u8FD9\u4E2A\u503C\u51B3\u5B9A\u8FD9\u4E2Akey\u5E94\u8BE5\u653E\u5728\u54EA\u4E2Aredis\u670D\u52A1\u5668

                                            • \u5C06\u6240\u6709\u7684\u5B58\u50A8\u7A7A\u95F4\u5207\u5272\u621016384\u4EFD\uFF0C\u6BCF\u53F0\u4E3B\u673A\u4FDD\u5B58\u4E00\u90E8\u5206

                                              \u6BCF\u4EFD\u4EE3\u8868\u7684\u662F\u4E00\u4E2A\u5B58\u50A8\u7A7A\u95F4\uFF0C\u8FD9\u4E2A\u5B58\u50A8\u7A7A\u95F4\u80FD\u5B58\u5F88\u591A\uFF0C\u8FD9\u4E00\u6B65\u53EA\u662F\u627E\u5230\u8FD9\u4E2A\u5B58\u50A8\u7A7A\u95F4

                                            • \u5C06key\u6309\u7167\u8BA1\u7B97\u51FA\u7684\u7ED3\u679C\u653E\u5230\u5BF9\u5E94\u7684\u5B58\u50A8\u7A7A\u95F4

                                            • \u4E00\u4E2A\u673A\u5668\u6301\u6709\u4E00\u5B9A\u7684\u69FD\uFF0C\u52A0\u673A\u5668\u7684\u65F6\u5019\uFF0C\u628A\u4ED6\u7684\u69FD\u5206\u4E00\u90E8\u5206\u7ED9\u65B0\u7684\u673A\u5668\uFF0C\u5982\u679C\u53BB\u673A\u5668\u7684\u8BDD\uFF0C\u628A\u69FD\u8FD4\u56DE\u5230\u73B0\u6709\u7684\u673A\u5668\u4E2D

                                          4. \u96C6\u7FA4\u5185\u90E8\u901A\u8BAF\u8BBE\u8BA1

                                            • \u4E0D\u540C\u4E3B\u673A\u4F1A\u4E92\u8054\uFF0C\u5404\u4E2A\u6570\u636E\u5E93\u76F8\u4E92\u901A\u4FE1\uFF0C\u4FDD\u5B58\u6BCF\u4E2A\u5E93\u4E2D\u69FD\u7684\u7F16\u53F7\u6570\u636E
                                            • \u4E00\u6B21\u547D\u4E2D\uFF0C\u76F4\u63A5\u8FD4\u56DE
                                            • \u672A\u547D\u4E2D\u7684\u8BDD\uFF0C\u5728\u672A\u547D\u4E2D\u7684\u8FD9\u53F0\u673A\u5668\u4E0A\u4E5F\u80FD\u627E\u5230\u5E94\u8BE5\u653E\u5230\u54EA\u4E2A\u5E93\u5373\u54EA\u53F0\u4E3B\u673A\u4E0A\uFF0C\u6240\u4EE5\u6700\u591A\u4E24\u6B21\u5C31\u53EF\u4EE5\u547D\u4E2D\uFF01

                                            image-20210928000637897

                                          5. \u642D\u5EFA\u597D\u96C6\u7FA4\u540E\uFF0C\u6DFB\u52A0\u6570\u636E\uFF0C\u4F1A\u81EA\u52A8\u5C06\u6570\u636E\u5B58\u653E\u5230\u5E94\u8BE5\u653E\u7684\u69FD\u91CC\uFF0C\u8FD9\u4E2A\u5E94\u8BE5\u653E\u7684\u69FD\uFF0C\u662F\u901A\u8FC7\u6211\u4EEC\u653E\u6570\u636E\u7684key\u7ECF\u8FC7CRC16,\u8FD8\u6709\u5BF916384\u53D6\u6A21\u8BA1\u7B97\u51FA\u6765\u7684\uFF0C\u8FD9\u4E2A\u5E94\u8BE5\u5B58\u50A8\u7684\u4F4D\u7F6E\u5373\u69FD\u4E0D\u4E00\u5B9A\u662F\u5BA2\u6237\u7AEF\u6240\u8FDE\u63A5\u7684\u90A3\u4E2A\u670D\u52A1\u5668\uFF0C\u6240\u4EE5\u642D\u5EFA\u597D\u96C6\u7FA4\u540E\uFF0C\u653E\u6570\u636E\u4F1A\u81EA\u52A8\u8FDB\u884C\u91CD\u5B9A\u5411\u3002

                                            image-20210928143108618

                                            \u547D\u4EE4\uFF1A\u5BA2\u6237\u7AEF\u8FDE\u63A5\u670D\u52A1\u5668\u7684\u65F6\u5019 \u8981\u52A0\u4E0A -c

                                          6. cluster\u914D\u7F6E

                                            image-20210928145104155

                                          \u7F13\u5B58\u7684\u95EE\u9898

                                          \u7F13\u5B58\u9884\u70ED

                                          1. \u95EE\u9898\uFF1A

                                            • \u670D\u52A1\u5668\u542F\u52A8\u540E\u8FC5\u901F\u5B95\u673A

                                            \u539F\u56E0\uFF1A

                                            • \u8BF7\u6C42\u6570\u91CF\u8F83\u9AD8
                                            • \u4E3B\u4ECE\u4E4B\u95F4\u6570\u636E\u541E\u5410\u91CF\u8F83\u5927\uFF0C\u6570\u636E\u540C\u6B65\u64CD\u4F5C\u9891\u5EA6\u8F83\u9AD8
                                          2. \u89E3\u51B3\u65B9\u6848

                                            \u524D\u7F6E\u51C6\u5907\u5DE5\u4F5C

                                            • \u65E5\u5E38\u4F8B\u884C\u7EDF\u8BA1\u6570\u636E\u8BBF\u95EE\u8BB0\u5F55\uFF0C\u7EDF\u8BA1\u8BBF\u95EE\u9891\u5EA6\u8F83\u9AD8\u7684\u70ED\u70B9\u6570\u636E
                                            • \u5229\u7528LRU\u6570\u636E\u5220\u9664\u7B56\u7565\uFF0C\u6784\u5EFA\u6570\u636E\u7559\u5B58\u961F\u5217
                                            • \u5C06\u7EDF\u8BA1\u7ED3\u679C\u4E2D\u7684\u6570\u636E\u5206\u7C7B\uFF0C\u6839\u636E\u7EA7\u522B\uFF0Credis\u4F18\u5148\u52A0\u8F7D\u7EA7\u522B\u8F83\u9AD8\u7684\u70ED\u70B9\u6570\u636E
                                            • \u5229\u7528\u5206\u5E03\u5F0F\u591A\u670D\u52A1\u5668\u540C\u65F6\u8FDB\u884C\u6570\u636E\u8BFB\u53D6\uFF0C\u63D0\u901F\u6570\u636E\u52A0\u8F7D\u8FC7\u7A0B

                                            \u5B9E\u65BD\uFF1A

                                            • \u4F7F\u7528\u811A\u672C\u7A0B\u5E8F\u56FA\u5B9A\u89E6\u53D1\u6570\u636E\u9884\u70ED\u8FC7\u7A0B
                                          3. \u603B\u7ED3\uFF1A

                                            \u7F13\u5B58\u9884\u70ED\u5C31\u662F\u7CFB\u7EDF\u542F\u52A8\u524D\uFF0C\u63D0\u524D\u5C06\u76F8\u5173\u7684\u7F13\u5B58\u6570\u636E\u76F4\u63A5\u52A0\u8F7D\u5230\u7F13\u5B58\u7CFB\u7EDF\uFF0C\u907F\u514D\u5728\u7528\u6237\u8BF7\u6C42\u7684\u65F6\u5019\uFF0C\u5148\u67E5\u8BE2\u6570\u636E\u5E93\uFF0C\u7136\u540E\u518D\u5C06\u6570\u636E\u7F13\u5B58\u7684\u95EE\u9898\u3002\u8FD9\u6837\u7528\u6237\u53EF\u4EE5\u76F4\u63A5\u67E5\u8BE2\u4E8B\u5148\u88AB\u9884\u70ED\u7684\u7F13\u5B58\u6570\u636E\uFF01\uFF01

                                            \u907F\u514D\u7528\u6237\u76F4\u63A5\u5954\u7740\u6570\u636E\u5E93\u6765\u67E5\u8BE2\uFF0C\u6240\u4EE5\u5C06\u70ED\u70B9\u6570\u636E\u5728\u7CFB\u7EDF\u542F\u52A8\u524D\u5C31\u52A0\u8F7D\u5230\u7F13\u5B58\u7CFB\u7EDF\uFF01\uFF01\u7528\u6237\u53EF\u4EE5\u76F4\u63A5\u67E5\u8BE2\u7F13\u5B58\uFF01

                                          \u7F13\u5B58\u96EA\u5D29

                                          1. \u95EE\u9898\uFF1A

                                            \u5728\u4E00\u4E2A\u8F83\u77ED\u7684\u65F6\u95F4\u5185\uFF0C\u7F13\u5B58\u4E2D\u8F83\u591A\u7684key\u96C6\u4E2D\u8FC7\u671F\uFF08\u5931\u6548\uFF09

                                            \u8BBF\u95EE\u8FC7\u671F\u6570\u636E\uFF0C\u90A3\u4E48\u5728redis\u4E2D\u65E0\u6CD5\u547D\u4E2D\uFF0C\u65E0\u6CD5\u5728redis\u4E2D\u67E5\u8BE2\u5230\u6570\u636E\uFF0C\u6240\u4EE5\u5C31\u4F1A\u53BB\u6570\u636E\u5E93\u67E5\u8BE2\uFF0C\u5927\u91CF\u7684\u8BF7\u6C42\u538B\u5230\u6570\u636E\u5E93\u90A3\u8FB9\uFF0C\u6570\u636E\u5E93\u4E0D\u80FD\u53CA\u65F6\u5904\u7406\uFF0Credis\u51FA\u73B0\u8D85\u65F6\u73B0\u8C61\uFF0Credis\u670D\u52A1\u5668\u8D44\u6E90\u88AB\u4E25\u91CD\u5360\u7528\uFF0Credis\u96C6\u7FA4\u670D\u52A1\u5668\u5D29\u6E83\uFF0C\u5E94\u7528\u670D\u52A1\u5668\u5D29\u6E83

                                            image-20210928150733404

                                          2. \u95EE\u9898\u5206\u6790

                                            • \u77ED\u65F6\u95F4\u5185\u5927\u91CFkey\u96C6\u4E2D\u8FC7\u671F
                                          3. \u89E3\u51B3\u65B9\u6848

                                            • \u66F4\u591A\u7684\u9875\u9762\u9759\u6001\u5316\u5904\u7406

                                            • \u6784\u5EFA\u591A\u7EA7\u7F13\u5B58\u67B6\u6784

                                              • Nginx\u7F13\u5B58+redis\u7F13\u5B58+ehcache\u7F13\u5B58
                                            • \u68C0\u6D4BMysql\u4E25\u91CD\u8017\u65F6\u4E1A\u52A1\u8FDB\u884C\u4F18\u5316

                                            • \u707E\u96BE\u9884\u8B66\u673A\u5236

                                              \u76D1\u63A7redis\u670D\u52A1\u5668\u6027\u80FD\u6307\u6807

                                              • cpu\u5360\u7528\u3001cpu\u4F7F\u7528\u7387
                                              • \u5185\u5B58\u5BB9\u91CF
                                              • \u67E5\u8BE2\u5E73\u5747\u54CD\u5E94\u65F6\u95F4
                                              • \u7EBF\u7A0B\u6570
                                            • \u9650\u6D41\u3001\u964D\u7EA7

                                              \u77ED\u65F6\u95F4\u8303\u56F4\u5185\u727A\u7272\u4E00\u4E9B\u5BA2\u6237\u4F53\u9A8C\uFF0C\u9650\u5236\u4E00\u90E8\u5206\u8BF7\u6C42\u8BBF\u95EE\uFF0C\u964D\u4F4E\u5E94\u7528\u670D\u52A1\u5668\u538B\u529B\uFF0C\u5F85\u4E1A\u52A1\u4F4E\u901F\u8FD0\u8F6C\u540E\uFF0C\u518D\u9010\u6B65\u653E\u5F00\u8BBF\u95EE

                                          4. \u89E3\u51B3\u65B9\u6848---\u4ECEkey\u8FC7\u671F\u7684\u89D2\u5EA6\uFF0C\u4ECE\u6839\u672C\u6765\u89E3\u51B3

                                            • LRU\u548CLFU\uFF08\u6700\u8FD1\u5F88\u5C11\u8BBF\u95EE\u7684\u6570\u636E\uFF09\u5207\u6362\uFF0C\u672C\u6765\u5C31\u5F88\u5C11\u8BBF\u95EE\u7684\u6570\u636E\uFF0C\u8FC7\u671F\u4E86\u6216\u8005\u88AB\u6E05\u9664\uFF0C\u90A3\u4E48\u5728\u77ED\u65F6\u95F4\u5185\u4E5F\u4E0D\u53EF\u80FD\u6709\u5927\u91CF\u8BBF\u95EE\u90FD\u6765\u8BF7\u6C42\u8FD9\u4E2A\u6570\u636E

                                            • \u6570\u636E\u6709\u6548\u671F\u7B56\u7565\u8C03\u6574

                                              • \u6839\u636E\u4E1A\u52A1\u6570\u636E\u6709\u6548\u671F\u8FDB\u884C\u5206\u7C7B\u9519\u5CF0
                                              • \u8FC7\u671F\u65F6\u95F4\u4F7F\u7528\u56FA\u5B9A\u65F6\u95F4+\u968F\u673A\u503C\u7684\u5F62\u5F0F\uFF0C\u7A00\u91CA\u96C6\u4E2D\u5230\u671F\u7684key\u7684\u6570\u91CF\uFF0C\u8BA9\u8FD9\u4E9B\u6570\u636E\u4E0D\u8981\u5728\u540C\u4E00\u65F6\u95F4\u5230\u671F
                                            • \u8D85\u70ED\u6570\u636E\u4F7F\u7528\u6C38\u4E45key

                                            • \u5B9A\u671F\u7EF4\u62A4\uFF08\u81EA\u52A8+\u4EBA\u5DE5\uFF09

                                              \u5BF9\u5373\u5C06\u8FC7\u671F\u7684\u6570\u636E\u505A\u8BBF\u95EE\u91CF\u5206\u6790\uFF0C\u786E\u8BA4\u662F\u5426\u5EF6\u65F6\uFF0C\u914D\u5408\u8BBF\u95EE\u91CF\u7EDF\u8BA1\uFF0C\u505A\u70ED\u70B9\u6570\u636E\u7684\u5EF6\u65F6

                                            • \u52A0\u9501--\u614E\u7528\uFF01

                                          5. \u603B\u7ED3\uFF1A

                                            \u7F13\u5B58\u96EA\u5D29\u5C31\u662F\u77AC\u95F4\u8FC7\u671F\u6570\u636E\u91CF\u592A\u5927\uFF0C\u5BFC\u81F4\u8BBF\u95EE\u8BF7\u6C42\u8D8A\u8FC7\u7F13\u5B58\u5BF9\u6570\u636E\u5E93\u670D\u52A1\u5668\u77AC\u95F4\u9020\u6210\u5F88\u5927\u538B\u529B\uFF0C\u5982\u80FD\u591F\u6709\u6548\u907F\u514D\u6570\u636E\u8FC7\u671F\u65F6\u95F4\u96C6\u4E2D\uFF0C\u53EF\u4EE5\u6709\u6548\u89E3\u51B3\u96EA\u5D29\u73B0\u8C61\u7684\u51FA\u73B0

                                            \u914D\u5408\u5176\u4ED6\u7B56\u7565\u4E00\u8D77\u4F7F\u7528\uFF0C\u5E76\u76D1\u63A7\u670D\u52A1\u5668\u7684\u8FD0\u884C\u6570\u636E\uFF0C\u6839\u636E\u8FD0\u884C\u8BB0\u5F55\u5FEB\u901F\u8C03\u6574\u3002

                                          \u7F13\u5B58\u51FB\u7A7F

                                          1. \u95EE\u9898

                                            redis\u4E2D\u67D0\u4E2Akey\u8FC7\u671F\uFF0C\u8BE5key\u8BBF\u95EE\u91CF\u5DE8\u5927

                                            \u591A\u4E2A\u6570\u636E\u8BF7\u6C42\u4ECE\u670D\u52A1\u5668\u76F4\u63A5\u5230redis\uFF0C\u5747\u672A\u547D\u4E2D

                                            redis\u5728\u77ED\u65F6\u95F4\u5185\u53D1\u8D77\u4E86\u5927\u91CF\u5BF9\u6570\u636E\u5E93\u4E2D\u540C\u4E00\u6570\u636E\u7684\u8BBF\u95EE

                                          2. \u5206\u6790

                                            • \u5355\u4E2Akey\u9AD8\u70ED
                                            • key\u8FC7\u671F
                                          3. \u89E3\u51B3\u65B9\u6848

                                            • \u9884\u5148\u8BBE\u5B9A

                                              \u4EE5\u7535\u5546\u4E3A\u4F8B\uFF0C\u82E5\u5E72\u6B3E\u4E3B\u6253\u5546\u54C1\uFF0C\u5728\u8D2D\u7269\u8282\u671F\u95F4\uFF0C\u52A0\u5927\u6B64\u7C7B\u4FE1\u606Fkey\u7684\u8FC7\u671F\u65F6\u957F

                                            • \u73B0\u573A\u8C03\u6574

                                              \u76D1\u63A7\u8BBF\u95EE\u91CF\uFF0C\u5BF9\u81EA\u7136\u6D41\u91CF\u6FC0\u589E\u7684\u6570\u636E\u5EF6\u957F\u8FC7\u671F\u65F6\u95F4\u6216\u8BBE\u7F6E\u4E3A\u6C38\u4E45\u6027key

                                            • \u540E\u53F0\u5237\u65B0\u6570\u636E

                                              \u542F\u52A8\u5B9A\u65F6\u4EFB\u52A1\uFF0C\u9AD8\u5CF0\u671F\u6765\u4E34\u4E4B\u524D\uFF0C\u5237\u65B0\u6570\u636E\u6709\u6548\u671F\uFF0C\u786E\u4FDD\u4E0D\u4E22\u5931

                                            • \u4E8C\u7EA7\u7F13\u5B58

                                              \u8BBE\u7F6E\u4E0D\u540C\u7684\u5931\u6548\u65F6\u95F4\uFF0C\u4FDD\u8BC1\u4E0D\u4F1A\u88AB\u540C\u65F6\u6DD8\u6C70\u5C31\u884C\u3002\u8BBE\u7F6E\u4E8C\u7EA7\u7F13\u5B58\u4E13\u95E8\u5904\u7406\u9AD8\u70ED\u6570\u636E

                                            • \u52A0\u9501

                                              \u5206\u5E03\u5F0F\u9501\uFF0C\u9632\u6B62\u88AB\u51FB\u7A7F\uFF0C\u52A0\u9501\u7684\u8BDD\u4F1A\u5F71\u54CD\u6027\u80FD\u3002\u52A0\u9501\u7684\u8BDD\u907F\u514D\u540C\u4E00\u65F6\u95F4\u5927\u91CF\u8BF7\u6C42\u90FD\u6765\u8BF7\u6C42\u8FD9\u4E2A\u9AD8\u70EDkey\uFF0C\u9020\u6210\u7F13\u5B58\u51FB\u7A7F

                                          \u7F13\u5B58\u7A7F\u900F

                                          1. \u95EE\u9898

                                            redis\u4E2D\u5927\u9762\u79EF\u51FA\u73B0\u672A\u547D\u4E2D

                                            \u51FA\u73B0\u975E\u6B63\u5E38URL\u8BBF\u95EE

                                            redis\u4E2D\u6CA1\u6709\u8FD9\u4E2A\u6570\u636E\uFF0C\u6570\u636E\u5E93\u4E2D\u4E5F\u4E0D\u5B58\u5728\u8FD9\u4E2A\u6570\u636E

                                          2. \u89E3\u51B3\u65B9\u6848

                                            • \u5BF9\u67E5\u8BE2\u7ED3\u679C\u4E3Anull\u7684\u6570\u636E\u8FDB\u884C\u7F13\u5B58\uFF0C\u8BBE\u5B9A\u77ED\u65F6\u9650

                                            • \u4F7F\u7528\u5E03\u9686\u8FC7\u6EE4\u5668\uFF0C\u5C06\u6570\u636E\u5E93\u4E2D\u7684\u6240\u6709key\u90FD\u5B58\u50A8\u5728\u5E03\u9686\u8FC7\u6EE4\u5668\u4E2D\uFF0C\u5728\u67E5\u8BE2Redis\u524D\u5148\u53BB\u5E03\u9686\u8FC7\u6EE4\u5668\u67E5\u8BE2key\u662F\u5426\u5B58\u5728\uFF0C\u5982\u679C\u4E0D\u5B58\u5728\u5C31\u76F4\u63A5\u8FD4\u56DE\uFF0C\u4E0D\u8BA9\u5176\u8BBF\u95EE\u6570\u636E\u5E93

                                              \u60F3\u529E\u6CD5\u5C06\u8FD9\u4E9B\u975E\u6CD5\u8BF7\u6C42\uFF0C\u8BF7\u6C42\u4E0D\u5B58\u5728\u7684\u6570\u636E\u8FD9\u4E9B\u8BF7\u6C42\uFF0C\u62E6\u622A\u5728redis\u4E4B\u5916\uFF0C\u90A3\u4E48\u5C31\u662F\u901A\u8FC7\u5E03\u9686\u8FC7\u6EE4\u5668

                                          \u9762\u8BD5\u95EE\u9898

                                          redis\u4E3A\u4EC0\u4E48\u91C7\u7528\u5355\u7EBF\u7A0B

                                          1. redis\u5E76\u4E0D\u662F\u771F\u6B63\u610F\u4E49\u4E0A\u7684\u5355\u7EBF\u7A0B\uFF0C\u53EF\u4EE5\u901A\u8FC7\u8C03\u7528fork\u751F\u6210\u5B50\u8FDB\u7A0B\uFF0C\u5728RDB,AOF\u6301\u4E45\u5316\u90FD\u6709\u7528\u5230\uFF0C\u8FD9\u4E2A\u8FDB\u7A0B\u4E0B\u9762\u786E\u5B9E\u662F\u53EA\u6709\u4E00\u4E2A\u7EBF\u7A0B\uFF01

                                          2. redis\u4F7F\u7528\u5355\u7EBF\u7A0B\u7684\u539F\u56E0

                                            • \u8FD9\u4E2A\u95EE\u9898\u548Cjava\u4E3A\u4EC0\u4E48\u542F\u7528\u591A\u7EBF\u7A0B\u8FDE\u8D77\u6765\u8BF4\u3002

                                              redis\u5904\u7406\u547D\u4EE4\u662F\u7EAF\u5185\u5B58\u64CD\u4F5C\uFF0C\u4E0D\u4E0E\u78C1\u76D8\u505AIO\uFF0Credis\u5904\u7406\u547D\u4EE4\u662F\u5F88\u5FEB\u7684\uFF0C\u4E0D\u9700\u8981\u963B\u585E\u7B49\u5F85\uFF0Credis\u4E2D\u4E5F\u5C31\u4E0D\u5B58\u5728\u5355\u7EBF\u7A0B\u60C5\u51B5\u4E0B\uFF0C\u4E00\u4E2A\u7EBF\u7A0B\u6267\u884C\u4EFB\u52A1\u7684\u65F6\u5019\u963B\u585E\u7B49\u5F85\uFF08\u5728Java\u4E2D\uFF0C\u4E00\u4E2A\u7EBF\u7A0B\u5982\u679C\u505A\u4E86IO\u64CD\u4F5C\uFF0C\u90A3\u4E48\u4F1AIO\u963B\u585E\u7B49\u5F85\uFF0C\u8FD9\u662FIO\u64CD\u4F5C\u7684\u7279\u6027\uFF0C\u8FD9\u79CD\u60C5\u51B5\u4E0B\u5982\u679C\u662F\u5355\u7EBF\u7A0BCPU\u53EA\u80FD\u7B49\u5F85\uFF0C\u5982\u679C\u662F\u591A\u7EBF\u7A0BCPU\u53EF\u4EE5\u53BB\u5E72\u522B\u7684\u4E8B\u60C5\uFF0C\u56E0\u4E3A\u8FD9\u4E2A\u7EBF\u7A0BIO\u963B\u585E\u7B49\u5F85\u4E86\uFF0C\u6240\u4EE5\u63D0\u9AD8\u4E86CPU\u7684\u6027\u80FD\uFF0C\u6CA1\u6709\u6D6A\u8D39CPU\u7684\u65F6\u95F4\uFF01\uFF09\uFF0CCPU\u4E5F\u53EA\u80FD\u5E72\u7B49\u7740\u7684\u60C5\u51B5\u3002

                                              \u5728redis\u573A\u666F\u4E2D\uFF0C\u5355\u7EBF\u7A0B\u6267\u884C\u547D\u4EE4\u5F88\u5FEB\uFF0C\u4E0D\u9700\u8981\u963B\u585E\u7B49\u5F85\uFF0C\u4E0D\u5B58\u5728cpu\u4F1A\u56E0\u4E3A\u7EBF\u7A0B\u7684\u963B\u585E\u7B49\u5F85\u800C\u5E72\u7B49\u7740\uFF0C\u6D6A\u8D39\u4E86\u65F6\u95F4\u964D\u4F4E\u4E86\u6548\u7387\u7684\u60C5\u51B5\u3002\u5982\u679C\u8FD9\u79CD\u60C5\u51B5\uFF0C\u542F\u7528\u591A\u7EBF\u7A0B\uFF0C\u53CD\u800C\u4F1A\u56E0\u4E3A\u7EBF\u7A0B\u7684\u4E0A\u4E0B\u6587\u5207\u6362\u6D6A\u8D39cpu\u65F6\u95F4

                                            • redis\u57FA\u4E8EReactor\u6A21\u5F0F\u5F00\u53D1\u4E86\u7F51\u7EDC\u4E8B\u4EF6\u5904\u7406\u5668\u3001\u6587\u4EF6\u4E8B\u4EF6\u5904\u7406\u5668\uFF0C\u6587\u4EF6\u4E8B\u4EF6\u5904\u7406\u5668\u662F\u5355\u7EBF\u7A0B\u7684\uFF0C\u6240\u4EE5redis\u624D\u53EB\u505A\u5355\u7EBF\u7A0B\u7684\u6A21\u578B\uFF08redis\u91CC\u9762\u5E76\u4E0D\u662F\u53EA\u6709\u4E00\u4E2A\u7EBF\u7A0B\uFF0C\u4E5F\u6709\u5176\u4ED6\u540E\u53F0\u7EBF\u7A0B\uFF0C\u901A\u8FC7fork\uFF09\uFF0C\u5B83\u91C7\u7528IO\u591A\u8DEF\u590D\u7528\u673A\u5236\u6765\u540C\u65F6\u76D1\u542C\u591A\u4E2ASocket

                                              \u591A\u4E2Asocket\u53EF\u80FD\u5E76\u53D1\u5730\u4EA7\u751F\u4E0D\u540C\u7684\u4E8B\u4EF6\uFF0CIO\u591A\u8DEF\u590D\u7528\u7A0B\u5E8F\u4F1A\u76D1\u542C\u591A\u4E2Asocket\uFF0C\u4F1A\u5C06socket\u653E\u5165\u4E00\u4E2A\u961F\u5217\u4E2D\u6392\u961F\uFF0C\u6BCF\u6B21\u4ECE\u961F\u5217\u4E2D\u6709\u5E8F\u3001\u540C\u6B65\u5730\u53D6\u51FA\u4E00\u4E2Asocket\u7ED9\u4E8B\u4EF6\u5206\u6D3E\u5668\uFF0C\u4E8B\u4EF6\u5206\u6D3E\u5668\u628Asocket\u7ED9\u5BF9\u5E94\u7684\u4E8B\u4EF6\u5904\u7406\u5668\uFF0C\u7136\u540E\u4E00\u4E2Asocket\u7684\u4E8B\u4EF6\u5904\u7406\u5B8C\u4E4B\u540E\uFF0CIO\u591A\u8DEF\u590D\u7528\u7A0B\u5E8F\u624D\u4F1A\u5C06\u961F\u5217\u4E2D\u7684\u4E0B\u4E00\u4E2Asocket\u7ED9\u4E8B\u4EF6\u5206\u6D3E\u5668\u3002\u6587\u4EF6\u4E8B\u4EF6\u5206\u6D3E\u5668\u4F1A\u6839\u636E\u6BCF\u4E2Asocket\u5F53\u524D\u4EA7\u751F\u7684\u4E8B\u4EF6\uFF0C\u6765\u9009\u62E9\u5BF9\u5E94\u7684\u4E8B\u4EF6\u5904\u7406\u5668\u6765\u5904\u7406\u3002\u8FD9\u4E2A\u8FC7\u7A0B\u662F\u6709\u5E8F\u5730\u3001\u540C\u6B65\u5730\uFF0C\u6240\u4EE5\u8BF4redis\u662F\u5355\u7EBF\u7A0B\u6A21\u578B\uFF01

                                          3. \u5BF9\u4E8EJava\u7A0B\u5E8F\uFF0C\u5373\u4F7F\u662F\u5355\u6838CPU\uFF0C\u4E5F\u8981\u4F7F\u7528\u591A\u7EBF\u7A0B\u7684\u539F\u56E0

                                            \u5373\u4F7F\u5355\u6838CPU\u5728\u5FAE\u89C2\u4E0A\u662F\u4E32\u884C\u6267\u884C\uFF0C\u5728\u5B8F\u89C2\u4E0A\u624D\u662F\u5E76\u884C\u7684\u6548\u679C\uFF0C\u5E76\u4E14\u5BF9\u4E8E\u5355\u6838CPU\uFF0C\u542F\u7528\u591A\u7EBF\u7A0B\u53CD\u800C\u66F4\u6162\uFF0C\u56E0\u4E3A\u4F1A\u6709\u4E0A\u4E0B\u6587\u5207\u6362\u6D88\u8017CPU\u6027\u80FD\uFF0C\u800C\u4E14\u53EF\u80FD\u51FA\u73B0\u6B7B\u9501\u6216\u8005\u8D44\u6E90\u9650\u5236\u7684\u95EE\u9898\u3002\u90A3\u4E48\u5355\u6838CPU\u542F\u7528\u591A\u7EBF\u7A0B\u7684\u539F\u56E0\u662F\u4EC0\u4E48\uFF1F\u6BD4\u5982\u7EBF\u7A0B\u6267\u884C\u4E86IO\u64CD\u4F5C\uFF0C\u8FD9\u4E2A\u7EBF\u7A0B\u672C\u8EAB\u5C31\u8981\u963B\u585E\uFF08\u8FD9\u4E2A\u7EBF\u7A0B\u963B\u585E\u7B49\u5F85\u7684\u65F6\u95F4\u5F80\u5F80\u662F\u5927\u4E8E\u7EBF\u7A0B\u4E0A\u4E0B\u6587\u5207\u6362\u6240\u6D88\u8017\u7684\u65F6\u95F4\u7684\uFF09\uFF0C\u8FD9\u4E2A\u65F6\u5019\u662F\u5355\u7EBF\u7A0B\uFF0CCPU\u53EA\u80FD\u7B49\u7740\uFF0C\u56E0\u4E3A\u7EBF\u7A0B\u963B\u585E\u4E86\uFF0C\u5982\u679C\u662F\u591A\u7EBF\u7A0B\uFF0CCPU\u5728IO\u963B\u585E\u7684\u65F6\u5019\u53EF\u4EE5\u6267\u884C\u53E6\u4E00\u4E2A\u7EBF\u7A0B\uFF08\u8FDB\u884C\u4E0A\u4E0B\u6587\u5207\u6362\uFF09\uFF0C\u53BB\u5E72\u522B\u7684\u4E8B\u60C5\uFF0C\u63D0\u9AD8\u4E86CPU\u7684\u5229\u7528\u7387\u3002 \u6240\u4EE5\u5355\u6838\u60C5\u51B5\u4E0B\u542F\u7528\u591A\u7EBF\u7A0B\u4E5F\u662F\u6709\u610F\u4E49\u7684\u3002\u5E76\u4E14\u5728\u591A\u6838\u60C5\u51B5\u4E0B\uFF0C\u4E5F\u4E0D\u5B8C\u5168\u662F\u4E00\u4E2A\u6838\u5BF9\u5E94\u4E8E\u4E00\u4E2A\u7EBF\u7A0B\uFF0C\u56E0\u4E3A\u7A0B\u5E8F\u8DD1\u7684\u7EBF\u7A0B\u7684\u6570\u91CF\u8FDC\u8FDC\u5927\u4E8Ecpu\u7684\u6838\u5FC3\u6570\u91CF\uFF0Ccpu\u5373\u4F7F\u662F\u591A\u6838\u7684\uFF0C\u4ECD\u7136\u662F\u6709\u4E00\u5B9A\u7684\u8C03\u5EA6\u7B56\u7565\u53BB\u6267\u884C\u7EBF\u7A0B\uFF0C\u6BD4\u5982\u5148\u6765\u5148\u6267\u884C\u3001\u4F18\u5148\u7B56\u7565\u3001\u65F6\u95F4\u7247\u8F6E\u8F6C\u7B56\u7565\u7B49\u3002

                                            Java\u4E2D\u4E3A\u4EC0\u4E48\u7528\u591A\u7EBF\u7A0B\uFF0C\u56E0\u4E3AJava\u4E2D\u7684\u7EBF\u7A0B\u5904\u7406\u4EFB\u52A1\u7684\u65F6\u95F4\u5F80\u5F80\u6BD4\u8F83\u957F\uFF0C\u5904\u7406\u4EFB\u52A1\u7684\u65F6\u5019\u5F80\u5F80\u6709IO\uFF0C\u6216\u8005\u8BF4\u548C\u4E0B\u6E38\u4EFB\u52A1\u6253\u4EA4\u9053\uFF0C\u603B\u4E4B\u5904\u7406\u65F6\u95F4\u7B97\u662F\u6BD4\u8F83\u957F\u7684\uFF0C\u5728\u7EBF\u7A0B\u505A\u4E00\u4EF6\u4EFB\u52A1\u7684\u65F6\u5019\uFF0C\u53EF\u80FD\u672C\u8EAB\u5C31\u8981\u963B\u585E\uFF0C\u5F53\u4E00\u4E2A\u7EBF\u7A0B\u51FA\u73B0\u963B\u585E\u72B6\u6001\u6BD4\u5982\u4E00\u4E2A\u7EBF\u7A0B\u6267\u884C\u4E86IO\u64CD\u4F5C\uFF08IO\u7684\u4E00\u4E2A\u7279\u6027\u5C31\u662F\u963B\u585E\u7B49\u5F85\uFF09\uFF0CCPU\u4E0D\u7528\u7B49\u7740\uFF0C\u53EF\u4EE5\u53BB\u6267\u884C\u53E6\u4E00\u4E2A\u4EFB\u52A1\uFF0C\u5373\u7ED9\u5230\u65F6\u95F4\u7247\u7ED9\u53E6\u4E00\u4E2A\u7EBF\u7A0B\uFF0C\u907F\u514DCPU\u65F6\u95F4\u7684\u6D6A\u8D39\u3002\u63D0\u9AD8cpu\u7684\u5229\u7528\u7387

                                            \u5728Java\u7A0B\u5E8F\u4E2D\uFF0C\u5355\u6838CPU\u7528\u591A\u7EBF\u7A0B\u53EF\u80FD\u6BD4\u5355\u7EBF\u7A0B\u8FD8\u6162\uFF0C\u56E0\u4E3A\u6D89\u53CA\u5230\u4E0A\u4E0B\u6587\u5207\u6362\uFF0C\u8D44\u6E90\u9650\u5236\uFF0C\u6B7B\u9501\u7684\u95EE\u9898\u3002\u5355\u6838cpu\u542F\u7528\u591A\u7EBF\u7A0B\uFF0C\u5728\u5FAE\u89C2\u4E0A\u4ECD\u7136\u662F\u4E32\u884C\u7684\uFF0C\u91C7\u7528\u65F6\u95F4\u7247\u8F6E\u8F6C\u7684\u673A\u5236\uFF0C\u5728\u5B8F\u89C2\u4E0A\u770B\u8D77\u6765\u662F\u5E76\u53D1\u7684\u3002\u591A\u6838CPU\u542F\u7528\u591A\u7EBF\u7A0B\uFF0C\u80FD\u5B9E\u73B0\u771F\u6B63\u5E76\u884C\u6267\u884C\u4EFB\u52A1\u7684\u6548\u679C\u3002

                                            \u963B\u585E\u7684\u4E00\u5B9A\u662F\u7EBF\u7A0B\uFF0C\u56E0\u4E3A\u963B\u585E\u662F\u7EBF\u7A0B\u7684\u72B6\u6001

                                          ',60);function mi(ui,hi){return di}var vi=i(ni,[["render",mi],["__file","redis.html.vue"]]);export{vi as default}; +import{_ as i,e as l}from"./app.f8791b52.js";var p="/study/assets/image-20210924154657194.b1793f57.png",s="/study/assets/image-20210924154857485.1fe6d993.png",e="/study/assets/image-20210924191312786.64a677aa.png",a="/study/assets/image-20210925141942564.ad02d929.png",r="/study/assets/image-20210925142429433.dbd2e1eb.png",t="/study/assets/image-20210925142535610.6b3053d9.png",o="/study/assets/image-20210925143336311.493c7c85.png",g="/study/assets/image-20210925144340051.43ae54c9.png",n="/study/assets/image-20210925144639022.4950be23.png",d="/study/assets/image-20210925172544739.d751a6cf.png",m="/study/assets/image-20210925190441846.24305e4d.png",u="/study/assets/image-20210925191433375.d56cbab4.png",h="/study/assets/image-20210925191646950.84255afa.png",c="/study/assets/image-20210925195502637.9a37a625.png",v="/study/assets/image-20210925195608432.7fa64057.png",_="/study/assets/image-20210925200445682.dab8449f.png",y="/study/assets/image-20210925200905092.3316e22d.png",f="/study/assets/image-20210925204019323.8431f96f.png",b="/study/assets/image-20210925204335000.eeffdad5.png",O="/study/assets/image-20210925210022015.af4d845a.png",R="/study/assets/image-20210925205850482.8539b02f.png",k="/study/assets/image-20210926144517840.8c9b0c24.png",B="/study/assets/image-20210926152144438.1cf8d670.png",C="/study/assets/image-20210926155427093.c735e3d2.png",D="/study/assets/image-20210926161504622.454a6918.png",x="/study/assets/image-20210926161655374.7d0a5eb6.png",A="/study/assets/image-20210926162118938.554927a1.png",F="/study/assets/image-20210926161702323.35302bd3.png",P="/study/assets/image-20210926162329910.d5dc7939.png",U="/study/assets/image-20210926175036430.74c46e51.png",I="/study/assets/image-20210926175243861.e8ff8293.png",N="/study/assets/image-20210926182752732.097181bf.png",q="/study/assets/image-20210926183819448.f5d87288.png",S="/study/assets/image-20210927134852367.857f1d55.png",L="/study/assets/image-20210927135455868.19d78690.png",J="/study/assets/image-20210927140106496.fb6fbb22.png",Q="/study/assets/image-20210927140511634.0b2efa1e.png",M="/study/assets/image-20210927142714546.0c709540.png",V="/study/assets/image-20210927144420196.19074161.png",E="/study/assets/image-20210927144744651.0ac7fb3c.png",H="/study/assets/image-20210927150430020.ea2f659b.png",T="/study/assets/image-20210927150454811.e22a5291.png",z="/study/assets/image-20210927150821002.f599fb55.png",G="/study/assets/image-20210927150909337.f0f0f580.png",X="/study/assets/image-20210927150919614.fad96e5d.png",j="/study/assets/image-20210927164805802.eb933ead.png",w="/study/assets/image-20210927171141356.3a7a3e4f.png",W="/study/assets/image-20210927171355993.a1c619fc.png",K="/study/assets/image-20210927181031834.1375d111.png",Y="/study/assets/image-20210927183727073.3521a3cf.png",Z="/study/assets/image-20210927185900890.6231c2c4.png",$="/study/assets/image-20210927195251095.005a5383.png",ii="/study/assets/image-20210927195555404.0d184600.png",li="/study/assets/image-20210927203826475.b350b9ce.png",pi="/study/assets/image-20210927204302988.3c76d300.png",si="/study/assets/image-20210927205344386.4bb13bf0.png",ei="/study/assets/image-20210927210554431.e1a88b41.png",ai="/study/assets/image-20210927225143454.829bb83d.png",ri="/study/assets/image-20210928000637897.d078edf9.png",ti="/study/assets/image-20210928143108618.f04fa6f7.png",oi="/study/assets/image-20210928145104155.d78e77f8.png",gi="/study/assets/image-20210928150733404.d32e4210.png";const ni={},di=l('

                                          Redis

                                          NoSQL\u6570\u636E\u5E93\u7B80\u4ECB

                                          \u6982\u8FF0

                                          1. \u57FA\u4E8Ekey-value\u952E\u503C\u5BF9\u7684NoSQL\u7684\u9AD8\u6027\u80FD\u6570\u636E\u5E93

                                            \u63D0\u4F9B\u4E86\u5404\u79CD\u6570\u636E\u7ED3\u6784\u7684\u5B58\u50A8\uFF0C\u5177\u6709\u9AD8\u6027\u80FD\u7684\u8BFB\u5199\u529F\u80FD

                                          2. \u5173\u7CFB\u578B\u6570\u636E\u5E93\u6BD4\u5982mysql\u7684\u6570\u636E\u662F\u4FDD\u5B58\u5728\u78C1\u76D8\u4E0A\u7684\uFF0C\u78C1\u76D8\u7684IO\u6027\u80FD\u4F4E\u4E0B\u3002

                                            cpu\u7684\u6570\u636E\u4EA4\u6362\u548C\u9AD8\u901F\u7F13\u5B58cache\u505A\uFF0Ccache\u7684\u6570\u636E\u4EA4\u6362\u548C\u5185\u5B58\u505A\uFF0C\u5185\u5B58\u7684\u6570\u636E\u4EA4\u6362\u548C\u786C\u76D8\u505A\u3002

                                          3. \u5173\u7CFB\u578B\u6570\u636E\u5E93\u7684\u4E24\u4E2A\u7F3A\u70B9

                                            • \u6027\u80FD\u74F6\u9888\uFF1A\u78C1\u76D8IO\u6027\u80FD\u4F4E\u4E0B
                                            • \u6269\u5C55\u74F6\u9888\uFF1A\u6570\u636E\u5173\u7CFB\u590D\u6742\uFF0C\u6269\u5C55\u6027\u5DEE\uFF0C\u4E0D\u4FBF\u4E8E\u5927\u89C4\u6A21\u96C6\u7FA4

                                            \u89E3\u51B3\u601D\u8DEF\uFF1A

                                            • \u964D\u4F4E\u78C1\u76D8IO\u6B21\u6570\uFF0C\u8D8A\u4F4E\u8D8A\u597D-----\u5185\u5B58\u5B58\u50A8
                                            • \u53BB\u9664\u6570\u636E\u95F4\u5173\u7CFB\uFF0C\u8D8A\u7B80\u5355\u8D8A\u597D----\u4E0D\u5B58\u50A8\u5173\u7CFB\uFF0C\u4EC5\u5B58\u50A8\u6570\u636E

                                            \u4EE5\u4E0A\u4E24\u70B9\uFF0C\u4FBF\u662FNoSQL

                                          4. NoSQL\u662F\u6CDB\u6307\uFF0C\u662F\u4F5C\u4E3A\u5173\u7CFB\u578B\u6570\u636E\u5E93\u7684\u8865\u5145\uFF0C\u5185\u5B58\u7684\u6570\u636E\u8FD8\u662F\u4ECE\u786C\u76D8\u6765\uFF0C\u5173\u7CFB\u578B\u6570\u636E\u5E93\u8FD8\u662F\u8981\u7528\u7684\uFF0C\u771F\u6B63\u7684\u6570\u636E\u80AF\u5B9A\u8981\u6301\u4E45\u5316\uFF0C\u6240\u4EE5NOSQL\u662F\u6CDB\u6307\uFF0C\u4E0D\u4EC5\u4EC5\u662Fsql\uFF0CNot-Only SQL\uFF0C\u662F\u4F5C\u4E3A\u5173\u7CFB\u578B\u6570\u636E\u5E93\u7684\u8865\u5145\uFF0CNosql\u6709\u81EA\u5DF1\u7684\u9002\u7528\u573A\u666F\uFF1A

                                            • \u9AD8\u5E76\u53D1
                                            • \u6D77\u91CF\u7528\u6237
                                          5. NoSQL\u7684\u7279\u5F81\uFF1A

                                            • \u53EF\u6269\u5BB9\uFF0C\u53EF\u4F38\u7F29

                                            • \u5927\u6570\u636E\u91CF\u4E0B\u9AD8\u6027\u80FD

                                            • \u7075\u6D3B\u7684\u6570\u636E\u6A21\u578B

                                              Nosql\u65E0\u9700\u5B9E\u73B0\u4E3A\u8981\u5B58\u50A8\u7684\u6570\u636E\u5EFA\u7ACB\u5B57\u6BB5\uFF0C\u968F\u65F6\u53EF\u4EE5\u5B58\u50A8\u81EA\u5B9A\u4E49\u7684\u6570\u636E\u683C\u5F0F

                                              \u800C\u5728\u5173\u7CFB\u578B\u6570\u636E\u5E93\u91CC\u589E\u5220\u5B57\u6BB5\u662F\u4E00\u4EF6\u975E\u5E38\u9EBB\u70E6\u7684\u4E8B\u60C5\u3002

                                              \u5982\u679C\u662F\u6570\u636E\u91CF\u975E\u5E38\u5927\u7684\u8868\uFF0C\u589E\u52A0\u5B57\u6BB5\u7B80\u76F4\u662F\u5669\u68A6\u3002

                                            • \u9AD8\u53EF\u7528

                                          6. \u6570\u636E\u5B58\u50A8\u7684\u74F6\u9888

                                            • \u6570\u636E\u91CF\u7684\u603B\u5927\u5C0F
                                            • \u6570\u636E\u7684\u7D22\u5F15\uFF0C\u4E00\u4E2A\u673A\u5668\u7684\u5185\u5B58\u653E\u4E0D\u4E0B\u65F6
                                            • \u8BFB\u5199\u6DF7\u5408\uFF0C\u4E00\u4E2A\u6570\u636E\u5E93\u5B9E\u4F8B\u4E0D\u80FD\u627F\u53D7
                                          7. dao\u5C42\u4E0D\u518D\u76F4\u63A5\u548C\u6570\u636E\u5E93\u8FDB\u884C\u4EA4\u4E92\uFF0C\u5728\u4E2D\u95F4\u6321\u4E86\u4E00\u5C42\u7F13\u5B58

                                            image-20210924154657194

                                          8. mysql\u4E3B\u4ECE\u8BFB\u5199\u5206\u79BB

                                            \u4ECE\u5E93\u8FC5\u901F\u5730\u8D4B\u503C\u4E3B\u5E93\u7684\u6570\u636E\uFF0C\u4E3A\u4E86\u4FDD\u8BC1\u6570\u636E\u7684\u5B8C\u6574\u6027\u548C\u5B89\u5168\u6027\u3002

                                            image-20210924154857485

                                            \u5BF9\u4E8E\u4E00\u4E2A\u6570\u636E\u5E93\u7684\u4FE1\u606F\uFF0C\u5199\u7684\u64CD\u4F5C\u90FD\u653E\u5728\u4E3B\u5E93\uFF0C\u8BFB\u7684\u64CD\u4F5C\u90FD\u653E\u5728\u4ECE\u5E93\uFF0C\u51CF\u8F7B\u6570\u636E\u5E93\u7684\u538B\u529B

                                            \u5206\u5E93\u5206\u79BB\u4E5F\u662F\u4E3A\u4E86\u51CF\u8F7B\u6570\u636E\u5E93\u7684\u538B\u529B

                                            mysql\u7ECF\u8FC7\u4E86\u4E3B\u4ECE\u8BFB\u5199\u5206\u79BB\uFF0C\u5206\u5E93\u5206\u8868\uFF0C\u4ECD\u7136\u6709\u74F6\u9888\uFF0C\u4E0D\u9002\u5408\u5B58\u50A8\u975E\u5E38\u5927\u7684\u6570\u636E

                                            mysql\u4E5F\u662F\u6709\u96C6\u7FA4\u7684\u3002

                                          9. NoSQL\u6570\u636E\u5E93\u7684\u4EA7\u751F\u5C31\u662F\u4E3A\u4E86\u89E3\u51B3\u5927\u89C4\u6A21\u6570\u636E\u96C6\u5408\u591A\u91CD\u6570\u636E\u79CD\u7C7B\u5E26\u6765\u7684\u6311\u6218\uFF0C\u5305\u62EC\u5927\u89C4\u6A21\u6570\u636E\u7684\u5B58\u50A8

                                          10. NoSQL\u6570\u636E\u5E93\u79CD\u7C7B\u7E41\u591A\uFF0C\u4F46\u662F\u4E00\u4E2A\u5171\u540C\u7684\u7279\u70B9\u5C31\u662F\u53BB\u6389\u5173\u7CFB\u578B\u6570\u636E\u5E93\u7684\u5173\u7CFB\u578B\u7279\u6027

                                            \u6570\u636E\u4E4B\u95F4\u65E0\u8054\u7CFB\uFF0C\u8FD9\u6837\u5C31\u975E\u5E38\u5BB9\u6613\u6269\u5C55\uFF0C\u4E5F\u5728\u67B6\u6784\u7684\u5C42\u9762\u4E0A\u5E26\u6765\u4E86\u53EF\u6269\u5C55\u7684\u80FD\u529B

                                          11. mysql\u4E5F\u6709\u7F13\u5B58\uFF0Cinnodb\u662F\u6570\u636E\u548C\u7D22\u5F15\u90FD\u8981\u8FDB\u884C\u7F13\u5B58\uFF0C\u800Cmyisam\u53EA\u7F13\u5B58\u7D22\u5F15\uFF0C\u4E0D\u7F13\u5B58\u771F\u5B9E\u6570\u636E

                                          12. 3V+3\u9AD8

                                            • velocity \u5B9E\u65F6
                                            • variety \u591A\u6837
                                            • volume \u6D77\u91CF
                                            • \u9AD8\u6027\u80FD
                                            • \u9AD8\u53EF\u7528\uFF08\u9AD8\u53EF\u6269\u5C55\uFF09\uFF08\u7406\u8BBA\u4E0A\u4E00\u53F0\u673A\u5668\u4E0D\u591F\uFF0C\u5E76\u884C\u5730\u518D\u52A0\u673A\u5668\uFF0C\u8FD9\u662F\u6A2A\u5411\u7684\u6269\u5C55\uFF09
                                            • \u9AD8\u5E76\u53D1

                                            3V\u662F\u5BF9\u95EE\u9898\u7684\u63CF\u8FF0

                                          13. \u5F53\u4E0B\u7684\u5E94\u7528\u662Fsql\u548Cnosql\u4E00\u8D77\u4F7F\u7528\uFF0C\u5E76\u4E0D\u662F\u5173\u7CFB\u578B\u6570\u636E\u5E93\u5C31\u4E0D\u7528\u4E86\uFF01

                                          14. \u4EC0\u4E48\u53EB\u5173\u7CFB\u578B\u6570\u636E\u5E93\u7684IOE

                                            \u53D6\u51FAIBM\u5C0F\u578B\u673A\uFF0COracle\u6570\u636E\u5E93\u53CAEMC\u5B58\u50A8\u8BBE\u5907

                                          15. \u5546\u54C1\u7684\u57FA\u672C\u4FE1\u606F\uFF0C\u5B58\u653E\u5728\u4F20\u7EDF\u7684\u5173\u7CFB\u578B\u6570\u636E\u5E93\uFF0C\u6BD4\u5982mysql

                                            \u5546\u54C1\u63CF\u8FF0\u3001\u8BE6\u60C5\u3001\u8BC4\u4EF7\u4FE1\u606F\uFF08\u591A\u6587\u5B57\u7C7B\uFF09\uFF0C\u5B58\u653E\u5728\u6587\u6863\u6570\u636E\u5E93mongodb

                                            \u5546\u54C1\u7684\u56FE\u7247\uFF0C\u5B58\u653E\u5728\u5206\u5E03\u5F0F\u6587\u4EF6\u7CFB\u7EDF\uFF0C\u6DD8\u5B9D\u81EA\u5DF1\u7684TFS\uFF0CGoogle\u7684GFS\uFF0CHadoop\u7684HDFS

                                            \u5546\u54C1\u7684\u5173\u952E\u5B57\uFF0C\u641C\u7D22\u5F15\u64CE\uFF0C\u57FA\u4E8Elucene\u3001solr\u3001elasticSearch\u5F00\u53D1\u7684\u7AD9\u5185\u641C\u7D22\u5F15\u64CE\uFF0C\u963F\u91CC\u7528\u7684ISearch

                                            \u5546\u54C1\u7684\u6CE2\u6BB5\u6027\u7684\u70ED\u70B9\u9AD8\u9891\u4FE1\u606F----\u7F13\u5B58\u6570\u636E\u5E93\uFF0C\u9700\u8981\u9AD8\u5E76\u53D1\u3001\u9AD8\u6027\u80FD\u3001\u9AD8\u53EF\u7528\u6216\u8005\u53EB\u9AD8\u53EF\u6269\u5C55\uFF0C\u6BD4\u5982redis\u3001Tair\u3001Memcache\u3002\u6240\u8C13\u7684\u7F13\u5B58\u5C31\u662F\u5728\u6570\u636E\u5E93\u5916\u9762\u518D\u5305\u4E00\u5C42\uFF0C\u5728dao\u5C42\u548C\u6570\u636E\u5E93\u4E4B\u95F4\u6DFB\u52A0\u4E00\u5C42\u7F13\u5B58

                                            \u4E00\u4E2A\u67E5\u8BE2\u7ED3\u679C\u662F\u4ECE\u591A\u6570\u636E\u6E90\u6765\u7684\u3002

                                          16. \u5927\u578B\u4E92\u8054\u7F51\u5E94\u7528\u7684\u96BE\u70B9\uFF1A

                                            • \u6570\u636E\u7C7B\u578B\u591A\u6837\u6027
                                            • \u6570\u636E\u6E90\u591A\u6837\u6027\u548C\u53D8\u5316\u91CD\u6784
                                            • \u6570\u636E\u6E90\u6539\u9020\u800C\u6570\u636E\u670D\u52A1\u5E73\u53F0\u4E0D\u9700\u8981\u5927\u9762\u79EF\u91CD\u6784

                                            \u89E3\u51B3\u65B9\u6848\uFF1A

                                            • \u7EDF\u4E00\u6570\u636E\u5E73\u53F0\u670D\u52A1\u5C42\uFF0C\u901A\u8FC7\u7F16\u7A0B\u8BED\u8A00\u9762\u5BF9\u63A5\u53E3\u7F16\u7A0B\uFF0C\u7EDF\u4E00\u9762\u5BF9\u4E00\u5C42\u6570\u636E\u670D\u52A1\u5C42\uFF0C\u6570\u636E\u670D\u52A1\u5C42\u7684\u540E\u9762\u662Fmysql\u3001mongodb\u3001\u5206\u5E03\u5F0F\u6587\u4EF6\u7CFB\u7EDF\u3001isearch\u3001redis\u7B49\u3002\u5C31\u7C7B\u4F3C\u4E8E\u6211\u4EEC\u9762\u5411JDBC\u7F16\u7A0B\uFF0CJDBC\u5C31\u50CF\u4E00\u4E2A\u63A5\u53E3\uFF0C\u6211\u4EEC\u9762\u5411\u63A5\u53E3\u7F16\u7A0B\uFF0C\u4E0D\u7528\u7BA1\u63A5\u53E3\u540E\u9762\u7684mysql\u3001oracle\u7B49\u6570\u636E\u5E93\u662F\u600E\u4E48\u5B9E\u73B0\u7684\uFF0C\u800C\u5404\u79CD\u6570\u636E\u5E93\u53C8\u662FJDBC\u8FD9\u4E2A\u63A5\u53E3\u7684\u5B9E\u73B0!!JDBC\u5C31\u76F8\u5F53\u4E8E\u5B9A\u4E49\u4E86\u4E00\u79CD\u89C4\u8303\uFF0C\u5404\u79CD\u6570\u636E\u5E93\u9762\u5BF9\u5B83\u6765\u505A\u5177\u4F53\u7684\u5B9E\u73B0\uFF0C\u6211\u4EEC\u9762\u5BF9JDBC\u505A\u4E0A\u5C42\u7684\u7F16\u7A0B\u4E1A\u52A1\u5DE5\u4F5C\u3002

                                              \u53EA\u9700\u8981\u7EDF\u4E00\u8FDE\u4E00\u4E2A\u5E73\u53F0\u3002

                                              \u6211\u4EEC\u6839\u636E\u7EDF\u4E00\u7684\u6570\u636E\u5E73\u53F0\u670D\u52A1\u5C42\uFF0C\u7EDF\u4E00\u8C03\u7528\u5B83\u63D0\u4F9B\u7ED9\u6211\u4EEC\u7684API

                                          NoSQL\u6570\u636E\u6A21\u578B\u7B80\u4ECB

                                          1. \u4E3A\u4EC0\u4E48\u8981\u7528\u805A\u5408\u6A21\u578B\u6765\u5904\u7406

                                            \u8868\u5C11\u7684\u65F6\u5019\uFF0C\u53EF\u4EE5\u7528\u5173\u8054\u67E5\u8BE2--join\uFF0C\u4E00\u6761sql\u5C31\u53EF\u4EE5\u641E\u5B9A\uFF0C\u4F46\u662F\u5230\u4E86\u4F01\u4E1A\u91CC\uFF0C\u5F88\u591A\u8868\uFF0C\u8FD9\u6837\u5F88\u9EBB\u70E6\uFF0C\u6BD4\u5982\u4E00\u5F20\u8868\u5728\u4E00\u53F7\u5E93\uFF0C\u53E6\u5916\u7684\u8868\u5728\u5176\u4ED6\u5E93\uFF0C\u5206\u5E93\u5206\u8868\u4E5F\u662F\u4E3A\u4E86\u51CF\u8F7B\u6570\u636E\u5E93\u7684\u538B\u529B\uFF0C\u8FD9\u79CD\u573A\u666F\u4E0B\uFF0C\u591A\u8868\u7684\u5173\u8054\u67E5\u8BE2\u5C31\u4E0D\u592A\u65B9\u4FBF\u4E86\u3002

                                            \u9AD8\u5E76\u53D1\u7684\u64CD\u4F5C\u662F\u4E0D\u592A\u5EFA\u8BAE\u6709\u5173\u8054\u67E5\u8BE2\u7684

                                          2. \u975E\u5173\u7CFB\u578B\u6570\u636E\u5E93NoSQL\u7684\u6570\u636E\u6A21\u578B\u662F\u805A\u5408\u6A21\u578B

                                            • key-value\u952E\u503C\u5BF9
                                            • \u56FE\u5F62\u7ED3\u6784
                                            • BSON
                                            • \u5217\u65CF
                                            • \u3002\u3002\u3002

                                          NoSQL\u6570\u636E\u5E93\u7684\u56DB\u5927\u5206\u7C7B

                                          1. KV\u952E\u503C\u5BF9

                                            image-20210924191312786

                                            \u5178\u578B\u5E94\u7528\u573A\u666F\uFF1A\u5185\u5BB9\u7F13\u5B58\uFF0C\u4E3B\u8981\u7528\u4E8E\u5904\u7406\u5927\u91CF\u6570\u636E\u7684\u9AD8\u8BBF\u95EE\u8D1F\u8F7D\uFF0C\u4E5F\u7528\u4E8E\u4E00\u4E9B\u65E5\u5FD7\u7CFB\u7EDF\u7B49\u7B49\u3002

                                          2. \u6587\u6863\u578B\u6570\u636E\u5E93\uFF0Cbson\u683C\u5F0F\u6BD4\u8F83\u591A

                                            • CouchDB

                                            • MongoDB

                                              MongoDB\u662F\u4E00\u4E2A\u57FA\u4E8E\u5206\u5E03\u5F0F\u6587\u4EF6\u5B58\u50A8\u7684\u6570\u636E\u5E93

                                              \u662F\u975E\u5173\u7CFB\u578B\u6570\u636E\u5E93\u4E2D\u6700\u50CF\u5173\u7CFB\u578B\u6570\u636E\u5E93\u7684

                                          3. \u5217\u5B58\u50A8\u6570\u636E\u5E93

                                            • HBase
                                            • \u5206\u5E03\u5F0F\u6587\u4EF6\u7CFB\u7EDF
                                          4. \u56FE\u5173\u7CFB\u6570\u636E\u5E93

                                            \u4E13\u6CE8\u4E8E\u6784\u5EFA\u5173\u7CFB\u56FE\u8C31

                                          5. \u56DB\u8005\u5BF9\u6BD4

                                          NoSQL\u6570\u636E\u5E93CAP\u539F\u7406

                                          1. CAP

                                            • Consistency \uFF08\u5F3A\u4E00\u81F4\u6027\uFF09
                                            • Availability \uFF08\u53EF\u7528\u6027\uFF09
                                            • Partition tolerance \uFF08\u5206\u533A\u5BB9\u9519\u6027\uFF09

                                            \u8FD9\u4E09\u4E2A\u7279\u6027\u53EA\u80FD\u6EE1\u8DB32\u4E2A

                                            \u4E00\u4E2A\u5206\u5E03\u5F0F\u7CFB\u7EDF\u4E0D\u53EF\u80FD\u540C\u65F6\u5F88\u597D\u5730\u6EE1\u8DB3\u4E00\u81F4\u6027\uFF0C\u53EF\u7528\u6027\uFF0C\u548C\u5206\u533A\u5BB9\u9519\u6027\u4E09\u4E2A\u9700\u6C42

                                            \u6700\u591A\u53EA\u80FD\u540C\u65F6\u6EE1\u8DB32\u4E2A

                                            redis\u662F\u6EE1\u8DB3CP

                                            \u5206\u533A\u5BB9\u9519\u6027\u662F\u6211\u4EEC\u5FC5\u987B\u9700\u8981\u5B9E\u73B0\u7684\uFF01\uFF01

                                          Redis\u7B80\u4ECB

                                          1. Redis\u662F\u7528C\u8BED\u8A00\u5F00\u53D1\u7684\u4E00\u4E2A\u5F00\u6E90\u7684\u9AD8\u6027\u80FD\u952E\u503C\u5BF9\uFF08key-value\uFF09\u6570\u636E\u5E93

                                          2. \u7279\u5F81\uFF1A

                                            • \u6570\u636E\u95F4\u6CA1\u6709\u5FC5\u7136\u7684\u5173\u8054\u5173\u7CFB

                                            • \u5185\u90E8\u91C7\u7528\u5355\u7EBF\u7A0B\u673A\u5236\u8FDB\u884C\u5DE5\u4F5C\uFF01\u80FD\u4FDD\u8BC1\u5F88\u591A\u5B89\u5168\u6027\u7684\u95EE\u9898

                                            • \u9AD8\u6027\u80FD

                                            • \u591A\u6570\u636E\u7C7B\u578B\u652F\u6301

                                              • \u5B57\u7B26\u4E32\u7C7B\u578B string
                                              • \u5217\u8868\u7C7B\u578B list
                                              • \u6563\u5217\u7C7B\u578B hash
                                              • \u96C6\u5408\u7C7B\u578B set
                                              • \u6709\u5E8F\u96C6\u5408\u7C7B\u578B sorted_set
                                            • \u6301\u4E45\u5316\u652F\u6301\uFF0C\u53EF\u4EE5\u8FDB\u884C\u6570\u636E\u707E\u96BE\u6062\u590D\uFF0C

                                              \u53EF\u80FD\u4F1A\u51FA\u73B0\u65AD\u7535\u7684\u60C5\u51B5\uFF0C\u90A3\u4E48\u5728\u5185\u5B58\u4E2D\u5B58\u7684\u6570\u636E\u9700\u8981\u6062\u590D

                                          3. \u5E94\u7528\uFF1A

                                            • \u4E3A\u70ED\u70B9\u6570\u636E\u52A0\u901F\u67E5\u8BE2
                                            • \u4EFB\u52A1\u961F\u5217\uFF0C\u5982\u79D2\u6740\u3001\u62A2\u8D2D\u3001\u8D2D\u7968\u6392\u961F\u7B49
                                            • \u5373\u65F6\u4FE1\u606F\u67E5\u8BE2\uFF0C\u5982\u5404\u7C7B\u6392\u884C\u699C\u3001\u5728\u7EBF\u4EBA\u6570\u4FE1\u606F
                                            • \u65F6\u6548\u6027\u4FE1\u606F\u63A7\u5236\uFF0C\u5982\u9A8C\u8BC1\u7801\u63A7\u5236\uFF08\u51E0\u5206\u949F\u5185\u6709\u6548\uFF09
                                            • \u5206\u5E03\u5F0F\u6570\u636E\u5171\u4EAB\uFF0C\u5982\u5206\u5E03\u5F0F\u96C6\u7FA4\u67B6\u6784\u4E2D\u7684session\u5206\u79BB
                                            • \u6D88\u606F\u961F\u5217
                                            • \u5206\u5E03\u5F0F\u9501

                                          Redis\u6570\u636E\u7C7B\u578B

                                          \u6570\u636E\u7C7B\u578B\u7684\u4ECB\u7ECD

                                          1. \u4F5C\u4E3A\u7F13\u5B58\u4F7F\u7528
                                            • \u539F\u59CB\u4E1A\u52A1\u529F\u80FD\u8BBE\u8BA1
                                              • \u79D2\u6740
                                              • 618\u6D3B\u52A8
                                              • \u53CC11\u6D3B\u52A8
                                              • \u6392\u961F\u8D2D\u7968
                                            • \u8FD0\u8425\u5E73\u53F0\u76D1\u63A7\u5230\u7684\u7A81\u53D1\u9AD8\u9891\u8BBF\u95EE\u6570\u636E
                                              • \u7A81\u53D1\u65F6\u653F\u8981\u95FB\uFF0C\u88AB\u5F3A\u52BF\u5173\u6CE8\u56F4\u89C2
                                            • \u9AD8\u9891\u3001\u590D\u6742\u7684\u7EDF\u8BA1\u6570\u636E\uFF0C\u9700\u8981\u5FEB\u901F\u54CD\u5E94\u7684\u6570\u636E\uFF01\uFF01
                                              • \u76F4\u64AD\u95F4\u5728\u7EBF\u4EBA\u6570
                                              • \u6253\u699C\u4EBA\u6570
                                          2. \u9644\u52A0\u529F\u80FD
                                            • \u7CFB\u7EDF\u529F\u80FD\u4F18\u5316\u6216\u5347\u7EA7
                                              • \u5355\u670D\u52A1\u5668\u5347\u7EA7\u96C6\u7FA4
                                              • session\u7BA1\u7406
                                              • token\u7BA1\u7406
                                          3. redis\u6570\u636E\u7C7B\u578B
                                            • string
                                            • hash
                                            • list
                                            • set
                                            • sorted_set

                                          string

                                          1. redis\u81EA\u8EAB\u662F\u4E00\u4E2AMap\uFF0C\u5176\u4E2D\u6240\u6709\u7684\u6570\u636E\u90FD\u662F\u91C7\u7528key\uFF1Avalue\u7684\u5F62\u5F0F\u5B58\u50A8

                                            \u5DE6\u8FB9\u7684key\u6C38\u8FDC\u90FD\u662F\u5B57\u7B26\u4E32\uFF01\uFF01

                                            \u6570\u636E\u7C7B\u578B\u6307\u7684\u662F\u53F3\u8FB9\u7684\uFF0C\u6307\u7684\u662Fvalue\u8FD9\u90E8\u5206\u6570\u636E\u5B58\u50A8\uFF01\uFF01

                                            \u6570\u636E\u7C7B\u578B\u6307\u7684\u662F\u5B58\u50A8\u7684\u6570\u636E\u7684\u7C7B\u578B\uFF0C\u4E5F\u5C31\u662Fvalue\u7684\u90E8\u5206\uFF0Ckey\u90E8\u5206\u6C38\u8FDC\u662F\u5B57\u7B26\u4E32

                                          2. \u5B58\u50A8\u7684\u6570\u636E\uFF1A\u5355\u4E2A\u6570\u636E\uFF0C\u6700\u7B80\u5355\u7684\u6570\u636E\u5B58\u50A8\u7C7B\u578B\uFF0C\u4E5F\u662F\u6700\u5E38\u7528\u7684\u6570\u636E\u5B58\u50A8\u7C7B\u578B

                                          3. \u5B58\u50A8\u6570\u636E\u7684\u683C\u5F0F\uFF1A\u4E00\u4E2A\u5B58\u50A8\u7A7A\u95F4\u4FDD\u5B58\u4E00\u4E2A\u6570\u636E

                                          4. \u5B58\u50A8\u5185\u5BB9\uFF1A\u901A\u5E38\u4F7F\u7528\u5B57\u7B26\u4E32\uFF0C\u5982\u679C\u5B57\u7B26\u4E32\u4EE5\u6574\u6570\u7684\u5F62\u5F0F\u5B58\u50A8\uFF0C\u53EF\u4EE5\u4F5C\u4E3A\u6570\u5B57\u64CD\u4F5C\u4F7F\u7528

                                          5. \u6709\u5355\u6570\u636E\u64CD\u4F5C\u548C\u591A\u6570\u636E\u64CD\u4F5C

                                            image-20210925141942564

                                          6. \u5728\u5927\u578B\u4F01\u4E1A\u7EA7\u5E94\u7528\u4E2D\uFF0C\u4E00\u5F20\u8868\u4FDD\u5B58\u7684\u6570\u636E\u91CF\u4E0D\u80FD\u8BA9\u5B83\u65E0\u9650\u5236\u6269\u5F20\uFF0C\u4F1A\u5206\u8868\uFF0C\u4F7F\u7528\u591A\u5F20\u8868\u5B58\u50A8\u540C\u7C7B\u578B\u6570\u636E\uFF0C\u751A\u81F3\u628A\u4E00\u4E2A\u5E93\u91CC\u7684\u8868\u5206\u79BB\u5230\u82E5\u5E72\u4E2A\u5E93\u91CC

                                            \u5206\u8868\u64CD\u4F5C\uFF0C\u5BF9\u5E94\u7684\u4E3B\u952Eid\u5FC5\u987B\u4FDD\u8BC1\u7EDF\u4E00\u6027\uFF0C\u4E0D\u80FD\u91CD\u590D

                                            image-20210925142429433

                                            redis\u53EF\u4EE5\u7528\u4E8E\u63A7\u5236\u6570\u636E\u5E93\u8868\u4E3B\u952Eid\uFF0C\u4E3A\u6570\u636E\u5E93\u8868\u4E3B\u952E\u63D0\u4F9B\u751F\u6210\u7B56\u7565\uFF0C\u4FDD\u969C\u6570\u636E\u5E93\u8868\u7684\u4E3B\u952E\u552F\u4E00\u6027

                                            \u6B64\u65B9\u6848\u9002\u7528\u4E8E\u6240\u6709\u6570\u636E\u5E93\uFF0C\u4E14\u652F\u6301\u6570\u636E\u5E93\u96C6\u7FA4\u3002

                                          7. string\u7C7B\u578B\u6570\u636E\u7684\u6269\u5C55\u64CD\u4F5C

                                            • image-20210925142535610

                                              string\u5728redis\u5185\u90E8\u5B58\u50A8\u9ED8\u8BA4\u5C31\u662F\u4E00\u4E2A\u5B57\u7B26\u4E32\uFF0C\u5F53\u9047\u5230\u589E\u51CF\u7C7B\u64CD\u4F5Cincr\uFF0Cdecr\u65F6\u4F1A\u8F6C\u6210\u6570\u503C\u578B\u8FDB\u884C\u8BA1\u7B97

                                              redis\u6240\u6709\u7684\u64CD\u4F5C\u90FD\u662F\u539F\u5B50\u6027\u7684\uFF0C\u91C7\u7528\u5355\u7EBF\u7A0B\u5904\u7406\u6240\u6709\u4E1A\u52A1\uFF0C\u547D\u4EE4\u90FD\u662F\u4E00\u4E2A\u4E00\u4E2A\u6267\u884C\u7684\uFF0C\u56E0\u6B64\u65E0\u9700\u8003\u8651\u5E76\u53D1\u5E26\u6765\u7684\u6570\u636E\u5F71\u54CD

                                              \u6CE8\u610F\uFF1A\u6309\u6570\u503C\u8FDB\u884C\u64CD\u4F5C\u7684\u6570\u636E\uFF0C\u5982\u679C\u539F\u59CB\u6570\u636E\u4E0D\u80FD\u8F6C\u6210\u6570\u503C\uFF0C\u6216\u8D85\u8D8A\u4E86redis\u6570\u503C\u4E0A\u9650\u8303\u56F4\uFF0C\u5C06\u62A5\u9519

                                            • image-20210925143336311

                                              redis\u63A7\u5236\u6570\u636E\u7684\u751F\u547D\u5468\u671F\uFF0C\u901A\u8FC7\u6570\u636E\u662F\u5426\u5931\u6548\u63A7\u5236\u4E1A\u52A1\u884C\u4E3A\uFF0C\u9002\u7528\u4E8E\u6240\u6709\u5177\u6709\u65F6\u6548\u6027\u9650\u5B9A\u63A7\u5236\u7684\u64CD\u4F5C

                                          8. string\u7C7B\u578B\u6570\u636E\u64CD\u4F5C\u7684\u6CE8\u610F\u4E8B\u9879

                                            • \u6570\u636E\u64CD\u4F5C\u4E0D\u6210\u529F\u7684\u53CD\u9988\u4E0E\u6570\u636E\u6B63\u5E38\u64CD\u4F5C\u4E4B\u95F4\u7684\u5DEE\u5F02

                                              • \u8868\u793A\u8FD0\u884C\u7ED3\u679C\u662F\u5426\u6210\u529F
                                                • (Integer)0---false \u5931\u8D25
                                                • (Integer)1----true \u6210\u529F
                                            • \u6570\u636E\u672A\u83B7\u53D6\u5230

                                              (nil) \u7B49\u540C\u4E8Enull

                                            • \u6570\u636E\u6700\u5927\u5B58\u50A8\u91CF

                                              512MB

                                            • \u6570\u503C\u8BA1\u7B97\u6700\u5927\u8303\u56F4\uFF08Java\u4E2D\u7684long\u7684\u6700\u5927\u503C\uFF09

                                              Java\u4E2D\u7684long\u7684\u6700\u5927\u503C

                                          9. string\u7C7B\u578B\u5E94\u7528\u573A\u666F

                                            • \u5728redis\u4E2D\u4E3A\u5927V\u7528\u6237\u8BBE\u5B9A\u7528\u6237\u4FE1\u606F\uFF0C\u4EE5\u7528\u6237\u4E3B\u952E\u548C\u5C5E\u6027\u503C\u4F5C\u4E3Akey\uFF0C\u540E\u53F0\u8BBE\u5B9A\u5B9A\u65F6\u5237\u65B0\u7B56\u7565\u5373\u53EF

                                              user:id:35035035:fans----12210947

                                              \u8868\u540D\uFF1A\u4E3B\u952E\u540D\uFF1A\u4E3B\u952E\u503C\uFF1A\u5C5E\u6027\u540D------\u5C5E\u6027\u503C

                                            • image-20210925144340051

                                            • redis\u5E94\u7528\u4E8E\u5404\u79CD\u7ED3\u6784\u578B\u548C\u975E\u7ED3\u6784\u578B\u9AD8\u70ED\u5EA6\u6570\u636E\u8BBF\u95EE\u52A0\u901F

                                          hash

                                          1. image-20210925144639022

                                          2. \u5B58\u50A8\u7ED3\u6784:\u4E00\u4E2A\u5B58\u50A8\u7A7A\u95F4\u4FDD\u5B58\u591A\u4E2A\u952E\u503C\u5BF9\u6570\u636E

                                            \u5E95\u5C42\u4F7F\u7528\u54C8\u5E0C\u8868\u7ED3\u6784\u5B9E\u73B0\u6570\u636E\u5B58\u50A8

                                          3. hash\u5B58\u50A8\u7ED3\u6784\u4F18\u5316

                                            • \u5982\u679Cfield\u6570\u91CF\u8F83\u5C11\uFF0C\u5B58\u50A8\u7ED3\u6784\u4F18\u5316\u4E3A\u7C7B\u6570\u7EC4\u7ED3\u6784
                                            • \u5982\u679Cfield\u6570\u91CF\u8F83\u591A\uFF0C\u5B58\u50A8\u7ED3\u6784\u4F7F\u7528HashMap\u7ED3\u6784
                                          4. hash\u7C7B\u578B\u6570\u636E\u6269\u5C55\u64CD\u4F5C

                                            • image-20210925172544739
                                          5. hash\u7C7B\u578B\u6570\u636E\u64CD\u4F5C\u7684\u6CE8\u610F\u4E8B\u9879

                                            • hash\u7C7B\u578B\u4E0B\u7684value\u53EA\u80FD\u5B58\u50A8\u5B57\u7B26\u4E32\uFF0C\u4E0D\u5141\u8BB8\u5B58\u50A8\u5176\u4ED6\u6570\u636E\u7C7B\u578B\uFF0C\u4E0D\u5B58\u5728\u5D4C\u5957\u73B0\u8C61\uFF0C\u5982\u679C\u6570\u636E\u672A\u83B7\u53D6\u5230\uFF0C\u5BF9\u5E94\u7684\u503C\u4E3Anil
                                            • \u6BCF\u4E2Ahash\u53EF\u4EE5\u5B58\u50A82\u768432\u6B21\u65B9-1\u4E2A\u952E\u503C\u5BF9
                                            • hash\u7C7B\u578B\u5341\u5206\u8D34\u8FD1\u5BF9\u8C61\u7684\u6570\u636E\u5B58\u50A8\u5F62\u5F0F\uFF0C\u5E76\u4E14\u53EF\u4EE5\u7075\u6D3B\u6DFB\u52A0\u548C\u5220\u9664\u5BF9\u8C61\u5C5E\u6027\uFF0C\u4F46hash\u8BBE\u8BA1\u521D\u8877\u4E0D\u662F\u4E3A\u4E86\u5B58\u50A8\u5927\u91CF\u5BF9\u8C61\u800C\u8BBE\u8BA1\u7684\uFF0C\u5207\u8BB0\u4E0D\u53EF\u6EE5\u7528\uFF0C\u66F4\u4E0D\u53EF\u4EE5\u5C06hash\u4F5C\u4E3A\u5BF9\u8C61\u5217\u8868\u4F7F\u7528
                                            • hgetall\u64CD\u4F5C\u53EF\u4EE5\u83B7\u53D6\u5168\u90E8\u5C5E\u6027\uFF0C\u5982\u679C\u5185\u90E8field\u8FC7\u591A\uFF0C\u904D\u5386\u6574\u4F53\u6570\u636E\u6548\u7387\u5C31\u4F1A\u4F4E\uFF0C\u5C31\u53EF\u80FD\u6210\u4E3A\u6570\u636E\u8BBF\u95EE\u7684\u74F6\u9888

                                          list

                                          1. \u6570\u636E\u5B58\u50A8\u9700\u6C42\uFF1A\u5B58\u50A8\u591A\u4E2A\u6570\u636E\uFF0C\u5E76\u5BF9\u6570\u636E\u8FDB\u5165\u5B58\u50A8\u7A7A\u95F4\u7684\u987A\u5E8F\u8FDB\u884C\u533A\u5206

                                          2. \u9700\u8981\u7684\u5B58\u50A8\u7ED3\u6784\uFF1A\u4E00\u4E2A\u5B58\u50A8\u7A7A\u95F4\u4FDD\u5B58\u591A\u4E2A\u6570\u636E\uFF0C\u4E14\u901A\u8FC7\u6570\u636E\u53EF\u4EE5\u4F53\u73B0\u8FDB\u884C\u987A\u5E8F

                                          3. list\u7C7B\u578B\uFF1A\u4FDD\u5B58\u591A\u4E2A\u6570\u636E\uFF0C\u5E95\u5C42\u4F7F\u7528\u53CC\u5411\u94FE\u8868\u5B58\u50A8\u7ED3\u6784\u5B9E\u73B0\u3002

                                          4. \u5DE6\u8FB9\u662Fkey\uFF0Cvalue\u662Flist

                                          5. list\u7C7B\u578B\u6570\u636E\u57FA\u672C\u7C7B\u578B

                                            • image-20210925190441846

                                            • image-20210925191433375

                                            • image-20210925191646950

                                          6. list\u7C7B\u578B\u6570\u636E\u64CD\u4F5C\u6CE8\u610F\u4E8B\u9879\uFF1A

                                            • list\u4E2D\u4FDD\u5B58\u7684\u6570\u636E\u90FD\u662Fstring\u7C7B\u578B\u7684\uFF0C\u6570\u636E\u603B\u5BB9\u91CF\u662F\u6709\u9650\u7684\u3002
                                            • list\u5177\u6709\u7D22\u5F15\u7684\u6982\u5FF5\uFF0C\u4F46\u662F\u64CD\u4F5C\u6570\u636E\u65F6\uFF0C\u901A\u5E38\u4EE5\u961F\u5217\u7684\u5F62\u5F0F\u8FDB\u884C\u5165\u961F\u51FA\u961F\u64CD\u4F5C\uFF0C\u6216\u4EE5\u6808\u7684\u5F62\u5F0F\u8FDB\u884C\u5165\u6808\u51FA\u6808\u64CD\u4F5C
                                            • \u83B7\u53D6\u5168\u90E8\u6570\u636E\uFF0C\u7ED3\u675F\u7D22\u5F15\u8BBE\u7F6E\u4E3A-1
                                          7. list\u7C7B\u578B\u5E94\u7528\u573A\u666F

                                            • \u5FAE\u535A\u7684\u4E2A\u4EBA\u7528\u6237\u7684\u5173\u6CE8\u5217\u8868\uFF0C\u5C06\u6700\u8FD1\u5173\u6CE8\u7684\u4EBA\u6392\u5728\u524D\u9762
                                            • \u7BA1\u7406\u591A\u53F0\u670D\u52A1\u5668\u7684\u65E5\u5FD7
                                              • \u4F9D\u8D56list\u7684\u6570\u636E\u5177\u6709\u987A\u5E8F\u7684\u7279\u5F81\u5BF9\u4FE1\u606F\u8FDB\u884C\u7BA1\u7406
                                              • \u4F7F\u7528\u961F\u5217\u6A21\u578B\u89E3\u51B3\u591A\u8DEF\u4FE1\u606F\u6C47\u603B\u5408\u5E76\u7684\u95EE\u9898
                                              • \u4F7F\u7528\u6808\u6A21\u578B\u89E3\u51B3\u6700\u65B0\u6D88\u606F\u7684\u95EE\u9898

                                          set\u7C7B\u578B

                                          1. \u4E0Ehash\u5B58\u50A8\u7ED3\u6784\u5B8C\u5168\u76F8\u540C\uFF0C\u4EC5\u5B58\u50A8\u952E\uFF0C\u4E0D\u5B58\u50A8\u503C\uFF08nil\uFF09\uFF0C\u5E76\u4E14\u503C\u662F\u4E0D\u5141\u8BB8\u91CD\u590D\u7684\uFF0Chash\u7ED3\u6784\u7684field\u672C\u8EAB\u5C31\u662F\u4E0D\u5141\u8BB8\u91CD\u590D\u7684

                                          2. set\u7C7B\u578B\u6570\u636E\u7684\u57FA\u672C\u64CD\u4F5C

                                            image-20210925195502637

                                            image-20210925195608432

                                          3. set\u7C7B\u578B\u6570\u636E\u7684\u6269\u5C55\u64CD\u4F5C

                                            image-20210925200445682

                                          4. redis\u7684set\u7C7B\u578B\u7ED3\u6784\u5E94\u7528\u4E8E\u968F\u673A\u63A8\u8350\u7C7B\u4FE1\u606F\u68C0\u7D22

                                          5. image-20210925200905092

                                          6. set\u7C7B\u578B\u6570\u636E\u64CD\u4F5C\u7684\u6CE8\u610F\u4E8B\u9879

                                            • set\u7C7B\u578B\u4E0D\u5141\u8BB8\u6570\u636E\u91CD\u590D\uFF0C\u5982\u679C\u6DFB\u52A0\u7684\u6570\u636E\u5728set\u4E2D\u5DF2\u7ECF\u5B58\u5728\uFF0C\u5C06\u53EA\u4FDD\u7559\u4E00\u4EFD
                                            • set\u867D\u7136\u4E0Ehash\u7684\u5B58\u50A8\u7ED3\u6784\u76F8\u540C\uFF0C\u4F46\u662F\u65E0\u6CD5\u542F\u7528hash\u4E2D\u5B58\u50A8\u503C\u5F97\u7684\u90A3\u4E00\u90E8\u5206

                                          sorted_set

                                          1. \u6570\u636E\u6392\u5E8F\u6709\u5229\u4E8E\u6570\u636E\u7684\u6709\u6548\u5C55\u793A\uFF0C\u9700\u8981\u63D0\u4F9B\u4E00\u79CD\u53EF\u4EE5\u6839\u636E\u81EA\u8EAB\u7279\u5F81\u8FDB\u884C\u6392\u5E8F\u7684\u65B9\u5F0F

                                          2. \u5B58\u50A8\u7ED3\u6784\uFF1A\u53EF\u4EE5\u4FDD\u5B58\u53EF\u6392\u5E8F\u7684\u6570\u636E\uFF0C\u5728set\u7684\u5B58\u50A8\u7ED3\u6784\u57FA\u7840\u4E0A\u6DFB\u52A0\u53EF\u6392\u5E8F\u5B57\u6BB5\uFF0C\u6709\u4E00\u5217\u4E13\u95E8\u7528\u6765\u5B58\u6392\u5E8F\u5B57\u6BB5\u3002

                                            \u6392\u5E8F\u5B57\u6BB5\u4E0D\u662F\u6570\u636E

                                          3. sorted_set\u7C7B\u578B\u6570\u636E\u7684\u57FA\u672C\u64CD\u4F5C

                                            image-20210925204019323

                                            image-20210925204335000

                                            image-20210925210022015

                                          4. image-20210925205850482

                                          5. sorted_set\u7C7B\u578B\u6570\u636E\u64CD\u4F5C\u7684\u6CE8\u610F\u4E8B\u9879

                                            • score\u4FDD\u5B58\u7684\u6570\u636E\u5B58\u50A8\u7A7A\u95F4\u662F64\u4F4D
                                            • score\u4FDD\u5B58\u7684\u6570\u636E\u4E5F\u53EF\u4EE5\u662F\u4E00\u4E2A\u53CC\u7CBE\u5EA6\u7684double\u503C\uFF0C\u57FA\u4E8E\u53CC\u7CBE\u5EA6\u6D6E\u70B9\u6570\u7684\u7279\u5F81\uFF0C\u53EF\u80FD\u4F1A\u4E22\u5931\u7CBE\u5EA6\uFF0C\u4F7F\u7528\u7684\u65F6\u5019\u8981\u614E\u91CD
                                            • sorted_set\u5E95\u5C42\u5B58\u50A8\u8FD8\u662F\u57FA\u4E8Eset\u7ED3\u6784\u7684\uFF0C\u56E0\u6B64\u6570\u636E\u4E0D\u80FD\u91CD\u590D\uFF0C\u5982\u679C\u91CD\u590D\u6DFB\u52A0\u76F8\u540C\u7684\u6570\u636E\uFF0Cscore\u503C\u5C06\u88AB\u53CD\u590D\u8986\u76D6\uFF0C\u4FDD\u7559\u6700\u540E\u4E00\u6B21\u4FEE\u6539\u7684\u7ED3\u679C\u3002
                                            • sorted_set\u53EF\u4EE5\u5E94\u7528\u4E8E\u5B9A\u65F6\u4EFB\u52A1\u6267\u884C\u987A\u5E8F\u7BA1\u7406\u6216\u4EFB\u52A1\u8FC7\u671F\u7BA1\u7406
                                          • \u5BF9\u4E8E\u5E26\u6709\u6743\u91CD\u7684\u4EFB\u52A1\uFF0C\u4F18\u5148\u5904\u7406\u6743\u91CD\u9AD8\u7684\u4EFB\u52A1\uFF0C\u91C7\u7528score\u8BB0\u5F55\u6743\u91CD\u5373\u53EF

                                          \u6301\u4E45\u5316

                                          \u7B80\u4ECB

                                          1. \u5C06\u5185\u5B58\u4E2D\u7684\u6570\u636E\u653E\u5230\u786C\u76D8\u4E2D\uFF0C\u8FD9\u53EB\u6301\u4E45\u5316\uFF0C\u5982\u679C\u5185\u5B58\u4E2D\u7684\u6570\u636E\u56E0\u4E3A\u65AD\u7535\u6216\u8005\u5176\u4ED6\u539F\u56E0\u4E22\u4E86\uFF0C\u518D\u628A\u786C\u76D8\u4E2D\u7684\u6570\u636E\u8BFB\u5230\u5185\u5B58\u4E2D\uFF0C\u8FD9\u5C31\u662F\u6570\u636E\u7684\u6062\u590D\u8FC7\u7A0B

                                          2. \u5229\u7528\u6C38\u4E45\u6027\u5B58\u50A8\u4ECB\u8D28\uFF08\u6BD4\u5982\u786C\u76D8\uFF09\u5C06\u6570\u636E\u8FDB\u884C\u4FDD\u5B58\uFF0C\u5728\u7279\u5B9A\u7684\u65F6\u95F4\u5C06\u4FDD\u5B58\u7684\u6570\u636E\u8FDB\u884C\u6062\u590D\u7684\u5DE5\u4F5C\u673A\u5236\u53EB\u505A\u6301\u4E45\u5316

                                          3. \u4E3A\u4EC0\u4E48\u8981\u8FDB\u884C\u6301\u4E45\u5316\uFF1F

                                            \u9632\u6B62\u6570\u636E\u7684\u610F\u5916\u4E22\u5931\uFF0C\u786E\u4FDD\u6570\u636E\u7684\u5B89\u5168\u6027

                                          4. \u6301\u4E45\u5316\u4FDD\u5B58\u7684\u4E1C\u897F\u5C31\u53EA\u6709\u6570\u636E\uFF01

                                          5. \u6301\u4E45\u5316\u7684\u65B9\u5F0F

                                            • \u5FEB\u7167----\u6BCF\u8FC7\u4E00\u5B9A\u65F6\u95F4\uFF0C\u5C31\u5C06\u5F53\u524D\u65F6\u523B\u7684\u6570\u636E\u4FDD\u5B58\u4E0B\u6765\u3002\u5173\u6CE8\u70B9\u5728\u6570\u636E----RDB
                                            • \u8FC7\u7A0B-----\u8BB0\u5F55\u6574\u4E2A\u6570\u636E\u7684\u64CD\u4F5C\u8FC7\u7A0B\uFF0C\u5C06\u64CD\u4F5C\u8FC7\u7A0B\u8FDB\u884C\u4FDD\u5B58\uFF0C\u65E5\u5FD7\u5F62\u5F0F\uFF0C\u5B58\u50A8\u64CD\u4F5C\u8FC7\u7A0B\uFF0C\u5B58\u50A8\u683C\u5F0F\u590D\u6742\uFF0C\u5173\u6CE8\u70B9\u5728\u6570\u636E\u7684\u64CD\u4F5C\u8FC7\u7A0B-----AOF

                                          RDB

                                          1. RDB\u542F\u52A8\u65B9\u5F0F1

                                            \u547D\u4EE4\uFF1Asave\uFF0C

                                            \u4F5C\u7528\uFF1A\u6BCF\u6267\u884C\u4E00\u6B21\uFF0C\u5C31\u4F1A\u4FDD\u5B58\u4E00\u6B21\u6570\u636E

                                          2. dumb.rdb\u662F\u6301\u4E45\u5316\u6570\u636E\u7684\u6587\u4EF6

                                          3. \u76F8\u5173\u547D\u4EE4\uFF1A

                                            image-20210926144517840

                                          4. \u7528RDB\u8FD9\u79CD\u65B9\u5F0F\uFF0C\u5728redis\u670D\u52A1\u542F\u52A8\u7684\u65F6\u5019\uFF0C\u4F1A\u628A\u6301\u4E45\u5316\u7684\u6570\u636E\u52A0\u8F7D\u4E0A\u6765\uFF01

                                          5. save\u6307\u4EE4\u7684\u6267\u884C\u4F1A\u963B\u585E\u5F53\u524Dredis\u670D\u52A1\u5668\uFF0Credis\u7684\u6BCF\u4E00\u6761\u6307\u4EE4\u662F\u539F\u5B50\u6027\u7684\uFF0Credis\u662F\u5355\u7EBF\u7A0B\u7684\uFF01\uFF01

                                            \u90A3\u4E48save\u6307\u4EE4\uFF0C\u963B\u585E\u670D\u52A1\u5668\uFF0C\u77E5\u9053\u5F53\u524DRDB\u8FC7\u7A0B\u5B8C\u6210\u4E3A\u6B62\uFF0C\u6709\u53EF\u80FD\u9020\u6210\u957F\u65F6\u95F4\u963B\u585E

                                            \u5F53\u6570\u636E\u91CF\u8FC7\u5927\u7684\u65F6\u5019\uFF0C\u5355\u7EBF\u7A0B\u7684\u8FD9\u79CDRDB\u5F62\u5F0F\u4F1A\u9020\u6210\u6548\u7387\u7684\u964D\u4F4E\uFF01

                                            \u5982\u4F55\u5904\u7406\uFF1A

                                            \u540E\u53F0\u6267\u884C

                                          6. RDB\u542F\u52A8\u65B9\u5F0F2----\u540E\u53F0\u6267\u884C

                                            \u547D\u4EE4\uFF1Abgsave

                                            \u4F5C\u7528\uFF1A\u624B\u52A8\u542F\u52A8\u540E\u53F0\u4FDD\u5B58\u6570\u636E\u7684\u64CD\u4F5C\uFF0C\u4F46\u4E0D\u662F\u7ACB\u5373\u6267\u884C\u3002

                                          7. bgsave\u6307\u4EE4\u5DE5\u4F5C\u539F\u7406\uFF1A

                                            • \u53D1\u9001\u6D88\u606F
                                            • \u8FD4\u56DE\u6D88\u606F\uFF0C\u4F46\u662F\u5E76\u4E0D\u771F\u6B63\u6267\u884C
                                            • \u8C03\u7528fork\u51FD\u6570\uFF0C\u751F\u6210\u5B50\u8FDB\u7A0B\uFF0C\u4E0D\u53C2\u4E0Eredis\u7684\u547D\u4EE4\u5E8F\u5217\uFF0C\u5355\u72EC\u751F\u6210\u5B50\u8FDB\u7A0B\u6765\u505A\u6570\u636E\u7684\u5B58\u50A8\uFF01

                                            bgsave\u547D\u4EE4\u662F\u9488\u5BF9save\u547D\u4EE4\u963B\u585Eredis\u670D\u52A1\u7684\u8FD9\u79CD\u7F3A\u70B9\u505A\u7684\u4F18\u5316

                                          8. RDB\u542F\u52A8\u65B9\u5F0F3

                                            \u81EA\u52A8\u6267\u884C

                                            redis\u670D\u52A1\u5668\u53D1\u8D77\u6307\u4EE4\uFF08\u57FA\u4E8E\u6761\u4EF6\uFF09\uFF0C\u800C\u4E0D\u662F\u7531\u7528\u6237\u8F93\u5165\u6307\u4EE4

                                            \u914D\u7F6E\uFF1Asave second changes---\u662F\u5199\u5728\u914D\u7F6E\u6587\u4EF6\u4E2D\u7684

                                            \u4F5C\u7528\uFF1A\u6EE1\u8DB3\u9650\u5B9A\u65F6\u95F4\u8303\u56F4\u5185key\u7684\u53D8\u5316\u6570\u91CF\u8FBE\u5230\u6307\u5B9A\u6570\u91CF\u5373\u8FDB\u884C\u6301\u4E45\u5316

                                            \u53C2\u6570\uFF1A

                                            • second---\u76D1\u63A7\u65F6\u95F4\u8303\u56F4
                                            • changes---\u76D1\u63A7key\u7684\u53D8\u5316\u91CF

                                            \u6BD4\u5982\u8BF4\u65F6\u95F4\u8303\u56F4\u5185\uFF0C2\u4E2Akey\u53D1\u751F\u4E86\u53D8\u5316\uFF0C\u4F1A\u81EA\u52A8\u6267\u884C\u4FDD\u5B58\uFF0C\u7136\u540E\u63A5\u4E0B\u6765\u5FC5\u987B\u53C8\u67092\u4E2Akey\u53D1\u751F\u53D8\u5316\uFF0C\u624D\u4F1A\u518D\u6B21\u6267\u884C\u4FDD\u5B58

                                            \u8FD9\u79CD\u914D\u7F6E\u6765\u6267\u884CRDB\u7684\u65B9\u5F0F\uFF0C\u540E\u53F0\u6267\u884C\u7684\u662Fbgsave\u6307\u4EE4\uFF01

                                          9. image-20210926152144438

                                          10. RDB\u4F18\u70B9

                                            • RDB\u662F\u4E00\u4E2A\u7D27\u51D1\u538B\u7F29\u7684\u4E8C\u8FDB\u5236\u6587\u4EF6\uFF0C\u5B58\u50A8\u6548\u7387\u8F83\u9AD8

                                            • RDB\u5185\u90E8\u5B58\u50A8\u7684\u662Fredis\u5728\u67D0\u4E2A\u65F6\u95F4\u70B9\u7684\u6570\u636E\u5FEB\u7167\uFF0C\u975E\u5E38\u9002\u5408\u7528\u4E8E\u6570\u636E\u5907\u4EFD\uFF0C\u5168\u91CF\u590D\u5236\u7B49\u573A\u666F

                                            • RDB\u6062\u590D\u6570\u636E\u7684\u901F\u5EA6\u8981\u6BD4AOF\u5FEB\u5F88\u591A

                                            • \u5E94\u7528\uFF1A\u670D\u52A1\u5668\u4E2D\u6BCFX\u5C0F\u65F6\u6267\u884Cbgsave\u5907\u4EFD\uFF0C\u5E76\u5C06RDB\u6587\u4EF6\u62F7\u8D1D\u81F3\u8FDC\u7A0B\u673A\u5668\u4E2D\uFF0C\u7528\u4E8E\u707E\u96BE\u6062\u590D\u3002

                                            RDB\u7F3A\u70B9\uFF1A

                                            • RDB\u65B9\u5F0F\u65E0\u8BBA\u662F\u6267\u884C\u6307\u4EE4\u8FD8\u662F\u5229\u7528\u914D\u7F6E\uFF0C\u65E0\u6CD5\u505A\u5230\u5B9E\u65F6\u6301\u4E45\u5316\uFF0C\u662F\u5B9A\u65F6\u7684\uFF01 \u5177\u6709\u8F83\u5927\u7684\u53EF\u80FD\u4E22\u5931\u6570\u636E
                                            • bgsave\u6307\u4EE4\u4E3A\u4E86\u4E0D\u963B\u585Eredis\u670D\u52A1\uFF0C\u8C03\u7528fork\u521B\u5EFA\u5B50\u8FDB\u7A0B\u6765\u6267\u884C\u6570\u636E\u7684\u6301\u4E45\u5316\uFF0C\u8981\u727A\u7272\u6389\u4E00\u4E9B\u6027\u80FD
                                            • redis\u4F17\u591A\u7248\u672C\u4E2D\u672A\u8FDB\u884CRDB\u6587\u4EF6\u683C\u5F0F\u7684\u7248\u672C\u7EDF\u4E00\uFF0C\u6709\u53EF\u80FD\u51FA\u73B0\u5404\u7248\u672C\u670D\u52A1\u4E4B\u95F4\u6570\u636E\u683C\u5F0F\u65E0\u6CD5\u517C\u5BB9\u7684\u73B0\u8C61\u3002
                                            • \u57FA\u4E8E\u5FEB\u7167\u601D\u60F3\uFF0C\u6BCF\u6B21\u8BFB\u5199\u90FD\u662F\u5168\u90E8\u6570\u636E\uFF01\u5B58\u50A8\u6570\u636E\u91CF\u5927\uFF0C\u6548\u7387\u8F83\u4F4E\uFF0C\u5927\u6570\u636E\u91CF\u4E0BIO\u6027\u80FD\u964D\u4F4E

                                          AOF

                                          1. \u548CRDB\u7684\u533A\u522B\uFF1A

                                            • \u4E0D\u5199\u5168\u6570\u636E\uFF0C\u4EC5\u8BB0\u5F55\u90E8\u5206\u6570\u636E
                                            • \u6539\u8BB0\u5F55\u6570\u636E\u4E3A\u8BB0\u5F55\u6570\u636E\u64CD\u4F5C
                                            • \u5BF9\u6240\u6709\u64CD\u4F5C\u5747\u8FDB\u884C\u8BB0\u5F55\uFF0C\u6392\u9664\u4E22\u5931\u6570\u636E\u7684\u98CE\u9669
                                          2. \u6982\u5FF5

                                            \u4EE5\u72EC\u7ACB\u65E5\u5FD7\u7684\u65B9\u5F0F\u8BB0\u5F55\u6BCF\u6B21\u5199\u547D\u4EE4\uFF08\u8BFB\u547D\u4EE4\uFF08get\uFF09\u662F\u4E0D\u8BB0\u5F55\u7684\u3002\uFF09\uFF0C\u91CD\u542F\u65F6\u518D\u91CD\u65B0\u6267\u884CAOF\u6587\u4EF6\u4E2D\u547D\u4EE4\u8FBE\u5230\u6062\u590D\u6570\u636E\u7684\u76EE\u7684\uFF0C\u4E0ERDB\u76F8\u6BD4\u53EF\u4EE5\u7B80\u5355\u63CF\u8FF0\u4E3A\u6539\u8BB0\u5F55\u6570\u636E\u4E3A\u8BB0\u5F55\u6570\u636E\u4EA7\u751F\u7684\u8FC7\u7A0B\u3002

                                          3. AOF\u7684\u4E3B\u8981\u4F5C\u7528\u662F\u89E3\u51B3\u4E86\u6570\u636E\u6301\u4E45\u5316\u7684\u5B9E\u65F6\u6027\uFF0C\u56E0\u4E3ARDB\u662F\u5B9A\u65F6\u5FEB\u7167\uFF0C\u4E0D\u5177\u6709\u5B9E\u65F6\u6027\uFF0C\u76EE\u524D\u5DF2\u7ECF\u662FRedis\u6301\u4E45\u5316\u7684\u4E3B\u6D41\u65B9\u5F0F\u3002

                                          4. \u5F53\u670D\u52A1\u5668\u63A5\u6536\u5230\u4E00\u6761\u5199\u547D\u4EE4\u65F6\uFF0C\u5E76\u6CA1\u6709\u9A6C\u4E0A\u8BB0\u5F55\uFF0C\u800C\u662F\u628A\u5B83\u653E\u5230\u4E00\u4E2A\u4E34\u65F6\u7684\u533A\u57DF\uFF0C\u8FD9\u4E2A\u4E34\u65F6\u7684\u533A\u57DF\uFF0C\u662FAOF\u6240\u8981\u64CD\u4F5C\u7684\u5199\u547D\u4EE4\u5BF9\u5E94\u7684\u5B58\u50A8\u7684\u7F13\u51B2\u533A\uFF0C\u6307\u4EE4\u653E\u5728\u7F13\u51B2\u533A\u3002\u8FD9\u4E9B\u7F13\u51B2\u533A\u7684\u6307\u4EE4\u6700\u7EC8\u662F\u751F\u6210AOF\u6587\u4EF6\u7684\u3002\u5230\u4E86\u4E00\u5B9A\u9636\u6BB5\uFF0C\u5168\u90E8\u5C06\u8FD9\u4E9B\u7F13\u51B2\u533A\u7684\u6307\u4EE4\u540C\u6B65\u5230AOF\u6587\u4EF6\u7684\u3002

                                          5. AOF\u5199\u6570\u636E\u7684\u4E09\u79CD\u7B56\u7565

                                            • always

                                              \u6BCF\u6B21\u5199\u5165\u64CD\u4F5C\u5747\u540C\u6B65\u5230AOF\u6587\u4EF6\u4E2D\uFF0C\u6570\u636E\u96F6\u8BEF\u5DEE\uFF0C\u6027\u80FD\u8F83\u4F4E

                                            • everysec

                                              \u6BCF\u79D2\u5C06\u7F13\u51B2\u533A\u4E2D\u7684\u6307\u4EE4\u540C\u6B65\u5230AOF\u6587\u4EF6\u4E2D\uFF0C\u6570\u636E\u51C6\u786E\u6027\u9AD8\uFF0C\u6027\u80FD\u8F83\u9AD8

                                              \u5728\u7CFB\u7EDF\u7A81\u7136\u5B95\u673A\u7684\u60C5\u51B5\u4E0B\u4E22\u59311\u79D2\u5185\u7684\u6570\u636E

                                            • no

                                              \u7531\u64CD\u4F5C\u7CFB\u7EDF\u63A7\u5236\u6BCF\u6B21\u540C\u6B65\u5230AOF\u6587\u4EF6\u7684\u5468\u671F\uFF0C\u6574\u4F53\u8FC7\u7A0B\u4E0D\u53EF\u63A7\u3002

                                            everysec\u662F\u9ED8\u8BA4\u914D\u7F6E

                                          6. AOF\u529F\u80FD\u5F00\u542F\uFF0C\u914D\u7F6E

                                            image-20210926155427093

                                          7. AOF\u91CD\u5199

                                            \u968F\u7740\u547D\u4EE4\u4E0D\u65AD\u5199\u5165AOF\uFF0C\u6587\u4EF6\u4F1A\u8D8A\u6765\u8D8A\u5927\uFF0C\u4E3A\u4E86\u89E3\u51B3\u8FD9\u4E2A\u95EE\u9898\uFF0CRedis\u5F15\u5165\u4E86AOF\u91CD\u5199\u673A\u5236\u538B\u7F29\u6587\u4EF6\u4F53\u79EF

                                            AOF\u91CD\u5199\u662F\u5C06Redis\u8FDB\u7A0B\u5185\u7684\u6570\u636E\u8F6C\u5316\u4E3A\u5199\u547D\u4EE4\u540C\u6B65\u5230\u65B0AOF\u6587\u4EF6\u7684\u8FC7\u7A0B\u3002\u7B80\u5355\u8BF4\u5C31\u662F\u5BF9\u540C\u4E00\u4E2A\u6570\u636E\u7684\u82E5\u5E72\u6761\u547D\u4EE4\u6267\u884C\u7ED3\u679C\u8F6C\u5316\u6210\u6700\u7EC8\u7ED3\u679C\u6570\u636E\u5BF9\u5E94\u7684\u6307\u4EE4\u8FDB\u884C\u8BB0\u5F55

                                          8. AOF\u91CD\u5199\u4F5C\u7528

                                            • \u964D\u4F4E\u78C1\u76D8\u5360\u7528\u91CF\uFF0C\u63D0\u9AD8\u78C1\u76D8\u5229\u7528\u7387
                                            • \u63D0\u9AD8\u6301\u4E45\u5316\u6548\u7387\uFF0C\u964D\u4F4E\u6301\u4E45\u5316\u5199\u65F6\u95F4\uFF0C\u63D0\u9AD8IO\u6027\u80FD
                                            • \u964D\u4F4E\u6570\u636E\u6062\u590D\u7528\u65F6\uFF0C\u63D0\u9AD8\u6570\u636E\u6062\u590D\u6548\u7387
                                          9. AOF\u91CD\u5199\u89C4\u5219\uFF1A

                                            • \u8FDB\u7A0B\u5185\u5DF2\u8D85\u65F6\u7684\u6570\u636E\u4E0D\u518D\u5199\u5165\u6587\u4EF6

                                            • \u5FFD\u7565\u65E0\u6548\u6307\u4EE4\uFF0C\u91CD\u5199\u65F6\u4F7F\u7528\u8FDB\u7A0B\u5185\u6570\u636E\u76F4\u63A5\u751F\u6210\uFF0C\u8FD9\u6837\u65B0\u7684AOF\u6587\u4EF6\u53EA\u4FDD\u7559\u6700\u7EC8\u6570\u636E\u7684\u5199\u5165\u547D\u4EE4\u3002

                                            • \u5BF9\u540C\u4E00\u6570\u636E\u7684\u591A\u6761\u5199\u547D\u4EE4\u5408\u5E76\u4E3A\u4E00\u6761\u547D\u4EE4

                                              image-20210926161504622

                                          10. AOF\u91CD\u5199\u65B9\u5F0F

                                            • \u624B\u52A8\u91CD\u5199

                                              image-20210926161655374

                                              image-20210926162118938

                                            • \u81EA\u52A8\u91CD\u5199

                                              image-20210926161702323

                                              \u4E5F\u662F\u5199\u5728\u914D\u7F6E\u6587\u4EF6\u91CC

                                              image-20210926162329910

                                          11. AOF\u91CD\u5199\u6D41\u7A0B

                                            image-20210926175036430

                                          12. RDB\u4E0EAOF\u533A\u522B

                                            image-20210926175243861

                                          \u4E8B\u52A1

                                          1. redis\u7684\u6BCF\u4E00\u6761\u6307\u4EE4\u662F\u539F\u5B50\u6027\u7684\u3002

                                            redis\u4E8B\u52A1\u5C31\u662F\u4E00\u4E2A\u547D\u4EE4\u6267\u884C\u7684\u961F\u5217\uFF01\u5C06\u4E00\u7CFB\u5217\u547D\u4EE4\u770B\u4F5C\u4E00\u4E2A\u6574\u4F53\u3002

                                            \u5F53\u6267\u884C\u65F6\uFF0C\u4E00\u6B21\u6027\u6309\u7167\u6DFB\u52A0\u987A\u5E8F\u4F9D\u6B21\u6267\u884C\uFF0C\u4E2D\u95F4\u4E0D\u4F1A\u88AB\u6253\u65AD\u6216\u8005\u5E72\u6270

                                          2. \u4E8B\u52A1\u7684\u57FA\u672C\u64CD\u4F5C

                                            image-20210926182752732

                                            \u6CE8\u610F\uFF1A\u52A0\u5165\u4E8B\u52A1\u7684\u547D\u4EE4\u6682\u65F6\u8FDB\u5165\u5230\u4EFB\u52A1\u961F\u5217\u4E2D\uFF0C\u5E76\u6CA1\u6709\u7ACB\u5373\u6267\u884C\uFF0C\u53EA\u6709\u6267\u884Cexec\u547D\u4EE4\u624D\u5F00\u59CB\u6267\u884C

                                            image-20210926183819448

                                          3. \u5982\u679C\u5F00\u542F\u4E8B\u52A1\u540E\uFF0C\u52A0\u5165\u961F\u5217\u7684\u547D\u4EE4\u5B58\u5728\u8BED\u6CD5\u9519\u8BEF\uFF0C\u90A3\u4E48\u8FD9\u4E2A\u4E8B\u52A1\u961F\u5217\u91CC\u9762\u6240\u6709\u7684\u547D\u4EE4\u90FD\u5C06\u4E0D\u6267\u884C\uFF01

                                            \u5982\u679C\u5F00\u542F\u4E8B\u52A1\u540E\uFF0C\u52A0\u5165\u961F\u5217\u7684\u547D\u4EE4\u8BED\u6CD5\u6B63\u786E\uFF0C\u4F46\u662F\u65E0\u6CD5\u6B63\u786E\u5730\u6267\u884C\uFF0C\u90A3\u4E48\u8FD9\u4E2A\u4E8B\u52A1\u961F\u5217\u91CC\u9762\uFF0C\u6B63\u786E\u7684\u547D\u4EE4\u4F1A\u6267\u884C\uFF0C\u8FD0\u884C\u9519\u8BEF\u7684\u547D\u4EE4\u4E0D\u4F1A\u6267\u884C

                                          \u9501

                                          1. \u57FA\u4E8E\u7279\u5B9A\u6761\u4EF6\u7684\u4E8B\u52A1\u6267\u884C--\u9501

                                            image-20210927134852367

                                            \u5FC5\u987B\u5728\u4E8B\u52A1\u5F00\u542F\u4E4B\u524D\uFF0C\u53BB\u4E0A\u76D1\u89C6\u9501--watch

                                          2. \u57FA\u4E8E\u7279\u5B9A\u6761\u4EF6\u7684\u4E8B\u52A1\u6267\u884C--\u5206\u5E03\u5F0F\u9501

                                            image-20210927135455868

                                            \u6709\u503C\u5219\u8BBE\u7F6E\u5931\u8D25\uFF0C\u6CA1\u6709\u503C\u5219\u8BBE\u7F6E\u6210\u529F\uFF0C\u8FD9\u4E2A\u503C\u6307\u7684\u662F\u6307\u4EE4\u7684\u90A3\u4E2Avalue\uFF0C\u4E5F\u5C31\u662F\u4E0A\u6CA1\u4E0A\u9501\uFF0C\u5982\u679C\u522B\u7684\u5BA2\u6237\u7AEF\u5DF2\u7ECF\u4E0A\u9501\u4E86\uFF0C\u90A3\u4E48value\u80AF\u5B9A\u6709\u503C\uFF0C\u90A3\u4E48\u5C31\u4E0D\u80FD\u591F\u8BBE\u7F6E\u9501\u4E86\uFF0C\u5982\u679C\u6CA1\u6709\u503C\uFF0C\u4EE3\u8868\u522B\u7684\u5BA2\u6237\u7AEF\u6CA1\u6709\u4E0A\u9501\uFF0C\u90A3\u4E48\u6B64\u5BA2\u6237\u7AEF\u5C31\u53EF\u4EE5\u4E0A\u9501\u3002

                                            \u5927\u5BB6\u4E5F\u5FC5\u987B\u9501\u540C\u4E00\u4E2A\u9501\uFF0C\u4E5F\u5C31\u662F\u53D6\u540C\u4E00\u4E2A\u540D\u5B57\uFF0C\u548CJava\u4E2D\u7684synchronized\u662F\u4E00\u4E2A\u610F\u601D\u3002

                                          3. \u6B7B\u9501\u89E3\u51B3\u65B9\u6848

                                            \u4F9D\u8D56\u5206\u5E03\u5F0F\u9501\u7684\u673A\u5236\uFF0C\u67D0\u4E2A\u7528\u6237\u64CD\u4F5C\u65F6\uFF0C\u5BF9\u5E94\u5BA2\u6237\u7AEF\u5728\u8BBE\u7F6E\u5206\u5E03\u5F0F\u9501\u6210\u529F\u4E4B\u540E\u5B95\u673A\u4E86\uFF0C\u5982\u4F55\u89E3\u51B3\uFF1F

                                            • image-20210927140106496

                                            • \u5728\u83B7\u5F97\u9501\u4E4B\u540E\uFF0C\u4F7F\u7528expire\u6DFB\u52A0\u9501\u7684\u65F6\u95F4\u9650\u5B9A\u3002

                                              \u8FD9\u4E2A\u9501\u7684\u65F6\u95F4\u9650\u5B9A\u4E00\u822C\u662F\u7F51\u7EDC\u5EF6\u65F6+\u4E1A\u52A1\u6267\u884C\u65F6\u95F4

                                              image-20210927140511634

                                          \u5220\u9664\u7B56\u7565

                                          1. Redis\u4E2D\u7684\u6570\u636E\u7279\u5F81

                                            redis\u662F\u4E00\u79CD\u5185\u5B58\u7EA7\u6570\u636E\u5E93\uFF0C\u6240\u6709\u6570\u636E\u5747\u5B58\u653E\u5728\u5185\u5B58\u4E2D\uFF0C\u5185\u5B58\u4E2D\u7684\u6570\u636E\u53EF\u4EE5\u901A\u8FC7TTL\u6307\u4EE4\u83B7\u53D6\u5176\u72B6\u6001

                                            • XX:\u5177\u6709\u65F6\u6548\u6027\u7684\u6570\u636E
                                            • -1\uFF1A\u6C38\u4E45\u6709\u6548\u7684\u6570\u636E
                                            • -2\uFF1A\u5DF2\u7ECF\u8FC7\u671F\u7684\u6570\u636E\u6216\u88AB\u5220\u9664\u7684\u6570\u636E\u6216\u672A\u5B9A\u4E49\u7684\u6570\u636E
                                          2. \u5DF2\u7ECF\u8FC7\u671F\u7684\u6570\u636E\u8FD8\u662F\u5728\u5185\u5B58\u4E2D\u653E\u7740\uFF0C\u5E76\u6CA1\u6709\u7ACB\u5373\u5220\u9664\uFF0Credis\u6709\u5220\u9664\u7B56\u7565\u6765\u63A7\u5236\u5220\u9664\u8FC7\u671F\u6570\u636E

                                          3. \u8FC7\u671F\u6570\u636E\u662F\u6307\u66FE\u7ECF\u8BBE\u7F6E\u4E86\u6709\u6548\u671F\u7684\u6570\u636E\uFF0C\u5230\u8FBE\u4E86\u6709\u6548\u671F\uFF0C\u7559\u4E0B\u6765\u7684\u6570\u636E\uFF0C\u8FD9\u4E9B\u5185\u5B58\u4E2D\u7684\u8FC7\u671F\u6570\u636E\u4E0D\u4F1A\u7ACB\u5373\u5220\u9664\u3002

                                          4. \u6570\u636E\u5220\u9664\u7B56\u7565\uFF1A

                                            • \u5B9A\u65F6\u5220\u9664
                                            • \u60F0\u6027\u5220\u9664
                                            • \u5B9A\u671F\u5220\u9664
                                          5. redis\u7684\u5B58\u50A8\u7A7A\u95F4\u4F1A\u5F00\u8F9F\u51FA\u4E00\u4E2Aexpires\u7A7A\u95F4\uFF0C\u7528\u4E8E\u5B58\u50A8\u8FC7\u671F\u6570\u636E\u7684\u6570\u636E\u5730\u5740\u548C\u8FC7\u671F\u65F6\u95F4\u4E24\u90E8\u5206

                                            image-20210927142714546

                                          6. \u5220\u9664\u7B56\u7565\u4E0D\u662F\u7ACB\u5373\u5BF9\u8FC7\u671F\u6570\u636E\u8FDB\u884C\u5220\u9664\uFF0C\u800C\u662F\u4E3A\u4E86\u5728\u5185\u5B58\u5360\u7528\uFF08redis\u7684\u6570\u636E\u90FD\u662F\u5B58\u50A8\u5728\u5185\u5B58\u4E2D\u7684\uFF09\u4E0ECPU\u5360\u7528\u4E4B\u95F4\u5BFB\u627E\u4E00\u79CD\u5E73\u8861\uFF0C\u56E0\u4E3ACPU\u8FD8\u8981\u6267\u884C\u5F88\u591A\u522B\u7684\u6307\u4EE4\uFF0C\u5220\u9664\u8FD9\u4E9B\u8FC7\u671F\u6570\u636E\u7684\u6307\u4EE4\u663E\u5F97\u6CA1\u6709\u90A3\u4E48\u91CD\u8981\uFF0C\u5728CPU\u5FD9\u7684\u65F6\u5019\uFF0C\u6240\u4EE5\u4E0D\u4F1A\u6025\u7740\u5220\u9664\u8FD9\u4E9B\u8FC7\u671F\u6570\u636E\uFF0C\u5C31\u6709\u5220\u9664\u6570\u636E\u7684\u7B56\u7565\uFF0C\u6765\u4FDD\u6301\u5185\u5B58\u7A7A\u95F4\u5360\u7528\u548CCPU\u4E4B\u95F4\u7684\u4E00\u79CD\u5E73\u8861\u3002

                                          7. \u5B9A\u65F6\uFF08\u5373\u65F6\uFF09\u5220\u9664---\u7ACB\u5373\u5220\u9664

                                            \u521B\u5EFA\u4E00\u4E2A\u5B9A\u65F6\u5668\uFF0C\u5F53key\u8BBE\u7F6E\u6709\u8FC7\u671F\u65F6\u95F4\uFF0C\u4E14\u8FC7\u671F\u65F6\u95F4\u5230\u8FBE\u65F6\uFF0C\u7531\u5B9A\u65F6\u5668\u4EFB\u52A1\u7ACB\u5373\u6267\u884C\u5BF9\u952E\u7684\u5220\u9664\u64CD\u4F5C

                                            \u4F18\u70B9

                                            • \u8282\u7EA6\u5185\u5B58\uFF0C\u5230\u65F6\u5C31\u5220\u9664\uFF0C\u5FEB\u901F\u91CA\u653E\u6389\u4E0D\u5FC5\u8981\u7684\u5185\u5B58\u5360\u7528

                                            \u7F3A\u70B9\uFF1A

                                            • CPU\u538B\u529B\u5F88\u5927\uFF0C\u65E0\u8BBACPU\u6B64\u65F6\u8D1F\u8F7D\u91CF\u591A\u9AD8\uFF0C\u5747\u5360\u7528CPU\u6765\u6267\u884C\u5220\u9664\u64CD\u4F5C\uFF0C\u4F1A\u5F71\u54CDredis\u670D\u52A1\u5668\u54CD\u5E94\u65F6\u95F4\u548C\u6307\u4EE4\u541E\u5410\u91CF

                                            \u603B\u7ED3\uFF1A\u7528\u5904\u7406\u5668\u6027\u80FD\u6362\u53D6\u5B58\u50A8\u7A7A\u95F4\uFF08\u62FF\u65F6\u95F4\u6362\u7A7A\u95F4\uFF09

                                          8. \u60F0\u6027\u5220\u9664

                                            \u6570\u636E\u5230\u8FBE\u8FC7\u671F\u65F6\u95F4\uFF0C\u4E0D\u505A\u5904\u7406\uFF0C\u7B49\u4E0B\u6B21\u8BBF\u95EE\u8BE5\u6570\u636E\u65F6\uFF0C

                                            • \u5982\u679C\u672A\u8FC7\u671F\uFF0C\u8FD4\u56DE\u6570\u636E

                                            • \u5982\u679C\u8FC7\u671F\uFF0C\u5220\u9664\uFF0C\u8FD4\u56DE\u4E0D\u5B58\u5728\uFF0C\u628Aexpires\u7A7A\u95F4\u91CC\u7684\u6570\u636E\u548C\u5185\u5B58\u7684\u771F\u6B63\u7684\u6570\u636E\u90FD\u5220\u6389

                                              \u901A\u8FC7expireIfNeeded()\u8FD9\u4E2A\u64CD\u4F5C\u6765\u505A\u7684\u3002

                                              \u5728\u4EFB\u4F55\u8C03\u7528\u83B7\u53D6\u6570\u636E\u7684\u64CD\u4F5C\u4E4B\u524D\uFF0C\u90FD\u4F1A\u6267\u884C\u8FD9\u4E2A\u64CD\u4F5C\u3002

                                            \u4F18\u70B9\uFF1A

                                            • \u8282\u7EA6CPU\u6027\u80FD\uFF0C\u53D1\u73B0\u5FC5\u987B\u5220\u9664\u7684\u65F6\u5019\u624D\u5220\u9664

                                            \u7F3A\u70B9\uFF1A

                                            • \u5185\u5B58\u7A7A\u95F4\u538B\u529B\u5F88\u5927\uFF0C\u51FA\u73B0\u957F\u671F\u5360\u7528\u5185\u5B58\u7684\u6570\u636E

                                            \u603B\u7ED3\uFF1A\u7528\u5B58\u50A8\u7A7A\u95F4\u6362\u53D6\u5904\u7406\u5668\u6027\u80FD\u3002

                                          9. \u5B9A\u671F\u5220\u9664

                                            \u76F8\u5BF9\u4E8E\u524D\u4E24\u79CD\u65B9\u6848\u90FD\u662F\u8D70\u6781\u7AEF\uFF0C\u4E00\u79CD\u62FF\u65F6\u95F4\u5373\u6548\u7387\u6362\u7A7A\u95F4\uFF0C\u53E6\u4E00\u79CD\u62FF\u7A7A\u95F4\u6362\u65F6\u95F4\u5373\u6548\u7387

                                            redis\u542F\u52A8\u670D\u52A1\u5668\u521D\u59CB\u5316\u7684\u65F6\u5019\uFF0C\u8BFB\u53D6\u914D\u7F6Eserve.hz\u7684\u503C\uFF0C\u9ED8\u8BA4\u4E3A10

                                            \u6BCF\u79D2\u949F\u6267\u884Cserver.hz\u6B21serverCron()\u8F6E\u8BE2

                                            serverCron()\u7EE7\u7EED\u5BF9\u6BCF\u4E00\u4E2A\u5E93\u8FDB\u884C\u8F6E\u8BE2databasesCron()

                                            databasesCron()\u4F1A\u6267\u884CactiveExpireCycle()

                                            activeExpireCycle()\u5BF9\u6BCF\u4E2Aexpires\u7A7A\u95F4\u8FDB\u884C\u68C0\u6D4B

                                            image-20210927144420196

                                            image-20210927144744651

                                            \u5468\u671F\u6027\u8F6E\u8BE2redis\u5E93\u4E2D\u7684\u65F6\u6548\u6027\u6570\u636E\uFF0C\u91C7\u7528\u968F\u673A\u62BD\u53D6\u7684\u7B56\u7565\uFF0C\u5229\u7528\u8FC7\u671F\u6570\u636E\u5360\u6BD4\u7684\u65B9\u5F0F\u63A7\u5236\u5220\u9664\u9891\u5EA6

                                            \u7279\u70B9\uFF1A

                                            • cpu\u6027\u80FD\u5360\u7528\u8BBE\u7F6E\u6709\u5CF0\u503C\uFF0C\u68C0\u6D4B\u9891\u5EA6\u53EF\u4EE5\u81EA\u5B9A\u4E49\u8BBE\u7F6E
                                            • \u5185\u5B58\u538B\u529B\u4E0D\u5927\uFF0C\u957F\u671F\u5360\u7528\u5185\u5B58\u7684\u51B7\u6570\u636E\u4F1A\u88AB\u6301\u7EED\u6E05\u7406

                                            \u603B\u7ED3\uFF1A\u5468\u671F\u6027\u62BD\u67E5\u5B58\u50A8\u7A7A\u95F4\uFF08\u968F\u673A\u62BD\u67E5\uFF09

                                          \u9010\u51FA\u7B97\u6CD5

                                          1. \u5F53\u65B0\u6570\u636E\u8FDB\u5165redis\u65F6\uFF0C\u53EF\u80FD\u4F1A\u51FA\u73B0\u5185\u5B58\u4E0D\u8DB3

                                            \u5220\u9664\u7B56\u7565\u63A7\u5236\u7684\u6216\u8005\u8BF4\u5220\u9664\u7684\u662F\u5177\u6709\u65F6\u6548\u6027\u7684\u6570\u636E

                                            \u5F53\u524D\u7684\u73B0\u8C61\u662F\u6240\u6709\u6570\u636E\u90FD\u6CA1\u6709\u5E26\u6709\u6548\u671F\uFF0C\u5168\u90E8\u90FD\u957F\u671F\u5B58\u5728\uFF0C\u8FD9\u4E2A\u65F6\u5019\u5220\u9664\u7B56\u7565\u4E0D\u8D77\u4F5C\u7528

                                          2. redis\u4F7F\u7528\u5185\u5B58\u5B58\u50A8\u6570\u636E\uFF0C\u5728\u6267\u884C\u6BCF\u4E00\u4E2A\u547D\u4EE4\u524D\uFF0C\u4F1A\u8C03\u7528freeMemoryIfNeeded()\u68C0\u6D4B\u5185\u5B58\u7A7A\u95F4\u662F\u5426\u5145\u8DB3\uFF0C\u5982\u679C\u5185\u5B58\u4E0D\u6EE1\u8DB3\u65B0\u52A0\u5165\u6570\u636E\u7684\u6700\u4F4E\u5B58\u50A8\u8981\u6C42\uFF0Credis\u8981\u4E34\u65F6\u5220\u9664\u4E00\u4E9B\u6570\u636E\u4E3A\u5F53\u524D\u6307\u4EE4\u6E05\u7406\u5B58\u50A8\u7A7A\u95F4\uFF0C\u6E05\u7406\u6570\u636E\u7684\u7B56\u7565\u6210\u4E3A\u9010\u51FA\u7B97\u6CD5

                                          3. \u9010\u51FA\u6570\u636E\u7684\u8FC7\u7A0B\u4E0D\u662F100%\u80FD\u6E05\u7406\u51FA\u8DB3\u591F\u7684\u7A7A\u95F4\u4F9B\u65B0\u6570\u636E\u5B58\u653E\uFF0C\u5982\u679C\u4E0D\u6210\u529F\u5219\u53CD\u590D\u6267\u884C\uFF0C\u5F53\u5BF9\u6240\u6709\u6570\u636E\u5C1D\u8BD5\u5B8C\u6BD5\u540E\uFF0C\u5982\u679C\u4E0D\u80FD\u8FBE\u5230\u5185\u5B58\u6E05\u7406\u7684\u8981\u6C42\uFF0C\u5C06\u51FA\u73B0\u9519\u8BEF\u4FE1\u606F

                                          4. \u5F71\u54CD\u6570\u636E\u9010\u51FA\u7684\u76F8\u5173\u914D\u7F6E

                                            \u6700\u5927\u53EF\u4F7F\u7528\u5185\u5B58---maxmemory

                                            \u5360\u7528\u8BA1\u7B97\u673A\u7269\u7406\u5185\u5B58\u7684\u6BD4\u4F8B\uFF0C\u9ED8\u8BA4\u503C\u662F0\uFF0C\u8868\u793A\u4E0D\u9650\u5236

                                            image-20210927150430020

                                            image-20210927150454811

                                          5. \u9010\u51FA\u7684\u6570\u636E\u76F8\u5173\u914D\u7F6E

                                            • image-20210927150821002
                                            • image-20210927150909337
                                            • image-20210927150919614

                                          Redis\u96C6\u7FA4

                                          \u4E3B\u4ECE\u590D\u5236

                                          1. \u4E92\u8054\u7F51\u4E09\u9AD8\u67B6\u6784

                                            • \u9AD8\u5E76\u53D1

                                            • \u9AD8\u6027\u80FD

                                            • \u9AD8\u53EF\u7528

                                              \u53EF\u7528\u6027\u662F\u670D\u52A1\u5668\u5DE5\u4F5C\u65F6\u95F4\u5360\u603B\u65F6\u95F4\u7684\u6BD4\u4F8B\uFF0C\u4E5F\u5C31\u662F\u53BB\u9664\u6389\u5B95\u673A\u65F6\u95F4\u4E4B\u540E\uFF0C\u670D\u52A1\u5668\u6B63\u5E38\u5DE5\u4F5C\u65F6\u95F4\u7684\u6BD4\u4F8B

                                          2. \u5355\u673Aredis\u7684\u98CE\u9669\u4E0E\u95EE\u9898

                                            • \u673A\u5668\u6545\u969C\uFF0C\u5BFC\u81F4\u786C\u76D8\u6545\u969C\u3001\u7CFB\u7EDF\u5D29\u6E83\uFF0C\u51FA\u73B0\u6570\u636E\u4E22\u5931\uFF0C\u53EF\u80FD\u5BF9\u4E1A\u52A1\u9020\u6210\u707E\u96BE\u6027\u6253\u51FB

                                            • \u5BB9\u91CF\u74F6\u9888

                                              redis\u7684\u6570\u636E\u662F\u653E\u5728\u5185\u5B58\u4E2D\u7684

                                            \u4E3A\u4E86\u907F\u514D\u5355\u4E2Aredis\u670D\u52A1\u5668\u6545\u969C\uFF0C\u51C6\u5907\u591A\u53F0\u670D\u52A1\u5668\uFF0C\u4E92\u76F8\u8FDE\u901A\uFF0C\u5C06\u6570\u636E\u590D\u5236\u591A\u4E2A\u526F\u672C\u4FDD\u5B58\u5728\u4E0D\u540C\u7684\u670D\u52A1\u5668\u4E0A\uFF0C\u8FDE\u63A5\u5728\u4E00\u8D77\uFF0C\u5E76\u4FDD\u8BC1\u6570\u636E\u662F\u540C\u6B65\u7684\uFF0C\u8FD9\u53EB\u4E3B\u4ECE\u540C\u6B65\u6216\u8005\u4E3B\u4ECE\u590D\u5236

                                            \u5373\u4F7F\u6709\u5176\u4E2D\u4E00\u53F0\u670D\u52A1\u5668\u5B95\u673A\uFF0C\u5176\u4ED6\u670D\u52A1\u5668\u4F9D\u7136\u53EF\u4EE5\u7EE7\u7EED\u63D0\u4F9B\u670D\u52A1\uFF0C\u5B9E\u73B0redis\u7684\u9AD8\u53EF\u7528\uFF0C\u540C\u65F6\u5B9E\u73B0\u6570\u636E\u7684\u5197\u4F59\u5907\u4EFD

                                            image-20210927164805802

                                          3. \u4E3B\u4ECE\u590D\u5236\u6838\u5FC3\u5DE5\u4F5C\uFF1Amaster\u7684\u6570\u636E\u590D\u5236\u5230slave\u4E2D

                                          4. \u4E3B\u4ECE\u590D\u5236\uFF1A

                                            \u5C06master\u4E2D\u7684\u6570\u636E\u5373\u65F6\u3001\u6709\u6548\u5730\u590D\u5236\u5230slave\u4E2D

                                            \u7279\u5F81\uFF1A

                                            \u4E00\u4E2Amaster\u53EF\u4EE5\u62E5\u6709\u591A\u4E2Aslave\uFF0C\u4E00\u4E2Aslave\u53EA\u5BF9\u5E94\u4E00\u4E2Amaster

                                          5. master\uFF1A

                                            • \u5199\u6570\u636E
                                            • \u6267\u884C\u5199\u64CD\u4F5C\u65F6\uFF0C\u5C06\u51FA\u73B0\u53D8\u5316\u7684\u6570\u636E\u81EA\u52A8\u540C\u6B65\u5230slave
                                            • \u8BFB\u6570\u636E\uFF08\u53EF\u5FFD\u7565\uFF09

                                            slave\uFF1A

                                            • \u8BFB\u6570\u636E
                                            • \u5199\u6570\u636E\uFF08\u7981\u6B62\uFF09
                                          6. \u9AD8\u53EF\u7528\u96C6\u7FA4

                                            \u5047\u5982\u67D0\u4E00\u53F0slave\u51FA\u95EE\u9898\u4E86\uFF0C\u5176\u4ED6\u7684slave\u4ECE\u673A\u53EF\u4EE5\u5BF9\u5916\u63D0\u4F9B\u8BF7\u6C42\uFF0C\u589E\u5F3A\u4E86\u53EF\u7528\u6027\uFF01\uFF01

                                            \u5047\u5982master\u51FA\u95EE\u9898\u4E86\uFF0C\u63A8\u9009\u4E00\u53F0slave\u6765\u5F53master\uFF0C\u589E\u5F3A\u4E86\u53EF\u7528\u6027\uFF01

                                            \u5047\u5982master\u538B\u529B\u5F88\u5927\uFF0C\u5728\u67D0\u4E00\u4E2Aslave\u4E0A\uFF0C\u8FFD\u52A0\u4E0B\u9762\u7684\u673A\u5668\uFF0C\u4E5F\u5C31\u662F\u4E00\u4E2A\u673A\u5668\u65E2\u53EF\u4EE5\u5F53master\u4E5F\u53EF\u4EE5\u5F53slave\uFF0Cmaster\u548Cslave\u662F\u4E00\u4E2A\u76F8\u5BF9\u7684\u6982\u5FF5

                                            \u8FD9\u4E9B\u90FD\u662F\u57FA\u4E8E\u4E3B\u4ECE\u590D\u5236\u7684\uFF0C\u5373\u4E3B\u673A\u548C\u4ECE\u673A\u91CC\u9762\u7684\u6570\u636E\u662F\u76F8\u540C\u7684\uFF0C\u662F\u7ECF\u8FC7\u590D\u5236\u6216\u8005\u8BF4\u514B\u9686\u7684\u3002

                                            \u4E5F\u53EF\u4EE5\u51C6\u5907\u591A\u4E2Amaster\uFF0C\u7EC4\u6210\u4E00\u4E2Amaster\u96C6\u7FA4\u3002

                                          7. \u4E3B\u4ECE\u590D\u5236\u7684\u4F5C\u7528\uFF1A

                                            • \u8BFB\u5199\u5206\u79BB\uFF1Amaster\u5199\uFF0Cslave\u8BFB\uFF0C\u63D0\u9AD8\u670D\u52A1\u5668\u7684\u8BFB\u5199\u8D1F\u8F7D\u80FD\u529B
                                            • \u8D1F\u8F7D\u5747\u8861\uFF1A\u57FA\u4E8E\u4E3B\u4ECE\u7ED3\u6784\uFF0C\u914D\u5408\u8BFB\u5199\u5206\u79BB\uFF0C\u7531slave\u5206\u62C5master\u8D1F\u8F7D\uFF0C\u5E76\u6839\u636E\u9700\u6C42\u7684\u53D8\u5316\uFF0C\u6539\u53D8slave\u7684\u6570\u91CF\uFF0C\u901A\u8FC7\u591A\u4E2A\u4ECE\u8282\u70B9\u5206\u62C5\u6570\u636E\u8BFB\u53D6\u8D1F\u8F7D\uFF0C\u5927\u5927\u63D0\u9AD8redis\u670D\u52A1\u5668\u7684\u5E76\u53D1\u91CF\u548C\u6570\u636E\u541E\u5410\u91CF\u3002
                                            • \u6545\u969C\u6062\u590D\uFF1A\u5F53master\u51FA\u73B0\u95EE\u9898\u65F6\uFF0C\u7531slave\u63D0\u4F9B\u670D\u52A1\uFF0C\u5B9E\u73B0\u5FEB\u901F\u7684\u6545\u969C\u6062\u590D
                                            • \u6570\u636E\u5197\u4F59\uFF1A\u5B9E\u73B0\u6570\u636E\u70ED\u5907\u4EFD\uFF0C\u662F\u6301\u4E45\u5316\u4E4B\u5916\u7684\u4E00\u79CD\u6570\u636E\u5197\u4F59\u7684\u65B9\u5F0F
                                            • \u9AD8\u53EF\u7528\u57FA\u77F3\uFF1A\u57FA\u4E8E\u4E3B\u4ECE\u590D\u5236\uFF0C\u6784\u5EFA\u54E8\u5175\u6A21\u5F0F\u548C\u96C6\u7FA4\uFF0C\u5B9E\u73B0Redis\u7684\u9AD8\u53EF\u7528\u65B9\u6848
                                          8. \u4E3B\u4ECE\u590D\u5236\u7684\u5DE5\u4F5C\u6D41\u7A0B

                                            • slave\u8FDE\u63A5master\uFF0Cmaster\u91CC\u6709\u6570\u636E\uFF0Cslave\u91CC\u6CA1\u6709\u6570\u636E

                                              image-20210927171141356

                                              • \u72B6\u6001\uFF1A

                                                slave\uFF1A\u4FDD\u5B58master\u7684\u5730\u5740\u4E0E\u7AEF\u53E3

                                                master\uFF1A\u4FDD\u5B58slave\u7684\u7AEF\u53E3

                                                \u603B\u4F53\uFF1Amaster\u4E0Eslave\u4E4B\u95F4\u521B\u5EFA\u4E86\u8FDE\u63A5\u7684socket

                                              • \u5EFA\u7ACB\u8FDE\u63A5\uFF0C\u7B2C\u4E00\u6B65\u53D1\u9001\u6307\u4EE4\u5C31\u6709\u4E09\u79CD\u65B9\u5F0F

                                                image-20210927171355993

                                                \u65B9\u5F0F\u4E00\u7684\u5BA2\u6237\u7AEF\u6307\u7684\u662Fslave\u7684\u5BA2\u6237\u7AEF

                                                \u65B9\u5F0F\u4E8C\u3001\u65B9\u5F0F\u4E09\u7684\u670D\u52A1\u5668\u6307\u7684\u90FD\u662Fslave\u670D\u52A1\u5668

                                            • \u6570\u636E\u540C\u6B65\u5DE5\u4F5C\uFF0C\u53CD\u590D\u540C\u6B65

                                              image-20210927181031834

                                              \u4E3B\u4ECE\u590D\u5236\u7684\u6570\u636E\u540C\u6B65\u9636\u6BB5\uFF0C\u65E2\u8981\u7528\u5230RDB\uFF0C\u4E5F\u8981\u7528\u5230AOF\uFF0CRDB\u548CAOF\u90FD\u662F\u6570\u636E\u6301\u4E45\u5316\u7684\u4E24\u79CD\u65B9\u5F0F\uFF0C\u4ECE\u673A\u8BF7\u6C42\u4E3B\u673A\u540C\u6B65\u6570\u636E\u65F6\uFF0C\u9996\u5148\u662F\u901A\u8FC7RDB\u7684\u65B9\u5F0F\uFF0CRDB\u7684bgsave\u662F\u901A\u8FC7\u8C03\u7528fork\u51FD\u6570\u53E6\u8D77\u5B50\u7EBF\u7A0B\u6765\u6267\u884C\u6570\u636E\u6301\u4E45\u5316\u5DE5\u4F5C\u5373\u751F\u6210RDB\u6587\u4EF6\uFF0C\u90A3\u4E48\u8FD9\u4E2A\u8FC7\u7A0B\u4E2D\u4ECD\u7136\u53EF\u80FD\u6709\u5176\u4ED6\u547D\u4EE4\u8FDB\u6765\uFF0C\u56E0\u4E3ARDB\u662F\u4E00\u79CD\u5F53\u524D\u6570\u636E\u5E93\u6570\u636E\u5FEB\u7167\u7684\u4E00\u79CD\u65B9\u5F0F\uFF0C\u90A3\u4E48\u5728\u751F\u6210RDB\u6587\u4EF6\u8FD8\u6709\u4ECE\u673A\u63A5\u6536RDB\u6587\u4EF6\u7684\u8FD9\u4E2A\u8FC7\u7A0B\u4E2D\uFF0C\u4ECD\u7136\u53EF\u80FD\u6709\u5176\u4ED6\u547D\u4EE4\uFF0C\u8FD9\u90E8\u5206\u547D\u4EE4\u6240\u6267\u884C\u7684\u7ED3\u679C\u7684\u6570\u636E\u6CA1\u6709\u8FDB\u5165RDB\u5FEB\u7167\u6587\u4EF6\uFF0C\u6240\u4EE5\u9700\u8981\u5355\u72EC\u590D\u5236\uFF0C\u4E5F\u5C31\u662F\u90E8\u5206\u590D\u5236\u3002

                                              \u6240\u4EE5\u6709\u5168\u91CF\u590D\u5236\u548C\u90E8\u5206\u590D\u5236

                                              \u5168\u91CF\u590D\u5236\u662F\u6307\u7B2C\u4E00\u4E2Aslave\u8FDE\u63A5\u65F6\uFF0C\u4E3B\u673A\u751F\u6210RDB\u6587\u4EF6\uFF0C\u5FEB\u7167\u6587\u4EF6\u91CC\u7684\u6570\u636E\uFF0C\u5728\u4ECE\u673A\u8FDB\u884C\u4E00\u4E2A\u5168\u91CF\u7684\u6062\u590D

                                              \u90E8\u5206\u590D\u5236\u662F\u6307\u5728\u751F\u6210RDB\u6587\u4EF6\u548C\u4ECE\u673A\u63A5\u6536RDB\u6587\u4EF6\u7684\u8FC7\u7A0B\u4E2D\u7684\u547D\u4EE4\uFF0C\u8FD9\u90E8\u5206\u547D\u4EE4\u901A\u8FC7AOF\u7684\u65B9\u5F0F\u8FDB\u884C\u6301\u4E45\u5316\u5E76\u4E14\u6062\u590D\uFF01\uFF01

                                              \u6240\u4EE5\u5168\u91CF\u590D\u5236----RDB\uFF0C\u90E8\u5206\u590D\u5236----AOF

                                              \u90A3\u4E48\u6709AOF\uFF0C\u5C31\u6709\u91CD\u5199\uFF0C\u56E0\u4E3Aaof\u6587\u4EF6\u7684\u547D\u4EE4\u9700\u8981\u91CD\u5199\uFF01\uFF01\u6709\u624B\u52A8\u91CD\u5199\u4E5F\u6709\u81EA\u52A8\u91CD\u5199\uFF0C\u5728\u8FD9\u91CC\u5C31\u662F\u624B\u52A8\u91CD\u5199\u3002\u90E8\u5206\u590D\u5236\u9700\u8981AOF\uFF0C\u90A3\u4E48\u5728\u7B2C\u4E00\u4E2Aslave\u8FDE\u63A5\u4E3B\u673A\u65F6\uFF0C\u521B\u5EFA\u547D\u4EE4\u7F13\u51B2\u533A\uFF0C\u63A5\u6536\u547D\u4EE4\uFF0C\u8FD9\u4E9B\u547D\u4EE4\u7528\u4E8E\u751F\u6210aof\u6587\u4EF6\u53D1\u7ED9\u4ECE\u673A\u8FDB\u884C\u6570\u636E\u7684\u6062\u590D\uFF01

                                              aof\uFF0C\u63A5\u6536\u7684\u6307\u4EE4\u9996\u5148\u8FDB\u5165\u547D\u4EE4\u7F13\u51B2\u533A\uFF0C\u8FD9\u4E0E\u4E4B\u524D\u7684\u601D\u8DEF\u4E5F\u662F\u4E00\u6837\u7684\u3002

                                            • \u547D\u4EE4\u4F20\u64AD\u9636\u6BB5

                                              \u5F53master\u6570\u636E\u5E93\u72B6\u6001\u88AB\u4FEE\u6539\u540E\uFF0C\u5BFC\u81F4\u4E3B\u4ECE\u670D\u52A1\u5668\u6570\u636E\u5E93\u72B6\u6001\u4E0D\u4E00\u81F4\uFF0C\u6B64\u65F6\u9700\u8981\u8BA9\u4E3B\u4ECE\u6570\u636E\u540C\u6B65\u5230\u4E00\u81F4\u7684\u72B6\u6001\uFF0C\u540C\u6B65\u7684\u52A8\u4F5C\u79F0\u4E3A\u547D\u4EE4\u4F20\u64AD

                                              master\u5C06\u63A5\u6536\u5230\u7684\u6570\u636E\u53D8\u66F4\u547D\u4EE4\u53D1\u9001\u7ED9slave\uFF0Cslave\u63A5\u6536\u547D\u4EE4\u540E\u6267\u884C\u547D\u4EE4

                                          9. \u4E3B\u4ECE\u590D\u5236\u7684\u6570\u636E\u540C\u6B65\u9636\u6BB5\u7684master\u8BF4\u660E\uFF1A

                                            • \u5982\u679Cmaster\u6570\u636E\u91CF\u5DE8\u5927\uFF0C\u6570\u636E\u540C\u6B65\u9636\u6BB5\u5E94\u8BE5\u6D41\u91CF\u9AD8\u5CF0\u671F\uFF0C\u907F\u514Dmaster\u963B\u585E\uFF0C\u5F71\u54CD\u4E1A\u52A1\u6B63\u5E38\u6267\u884C\u3002
                                            • \u590D\u5236\u7F13\u51B2\u533A\u5927\u5C0F\u8BBE\u7F6E\u4E0D\u5408\u7406\uFF0C\u4F1A\u5BFC\u81F4\u6570\u636E\u6EA2\u51FA\uFF0C\u5982\u8FDB\u884C\u5168\u91CF\u590D\u5236\u5468\u671F\u592A\u957F\uFF0C\u8FDB\u884C\u90E8\u5206\u590D\u5236\u65F6\uFF0C\u53D1\u73B0\u6570\u636E\u5DF2\u7ECF\u5B58\u5728\u4E22\u5931\u7684\u60C5\u51B5\uFF0C\u5FC5\u987B\u8FDB\u884C\u7B2C\u4E8C\u6B21\u5168\u91CF\u590D\u5236\uFF0C\u81F4\u4F7Fslave\u9677\u5165\u6B7B\u5FAA\u73AF\u72B6\u6001\u3002
                                            • master\u5EFA\u8BAE\u7559\u4E0B30%-50%\u7684\u5185\u5B58\u7528\u4E8E\u6267\u884Cbgsave\u547D\u4EE4\u548C\u521B\u5EFA\u7F13\u51B2\u533A
                                          10. \u4E3B\u4ECE\u590D\u5236\u7684\u6570\u636E\u540C\u6B65\u9636\u6BB5\u7684slave\u8BF4\u660E\uFF1A

                                            • \u4E3A\u907F\u514Dslave\u8FDB\u884C\u5168\u91CF\u590D\u5236\u3001\u90E8\u5206\u590D\u5236\u65F6\u670D\u52A1\u5668\u54CD\u5E94\u963B\u585E\u6216\u6570\u636E\u4E0D\u540C\u6B65\uFF0C\u5EFA\u8BAE\u5173\u95ED\u6B64\u671F\u95F4\u7684\u5BF9\u5916\u670D\u52A1
                                            • image-20210927183727073
                                            • slave\u8FC7\u591A\u65F6\uFF0C\u5EFA\u8BAE\u8C03\u6574\u62D3\u6251\u7ED3\u6784\uFF0C\u7531\u4E00\u4E3B\u591A\u4ECE\u7ED3\u6784\u53D8\u4E3A\u6811\u72B6\u7ED3\u6784\uFF0C\u4E2D\u95F4\u7684\u8282\u70B9\u65E2\u662Fmaster\uFF0C\u4E5F\u662Fslave\uFF0C\u6CE8\u610F\u4F7F\u7528\u6811\u72B6\u7ED3\u6784\u65F6\uFF0C\u7531\u4E8E\u5C42\u7EA7\u6DF1\u5EA6\uFF0C\u5BFC\u81F4\u6DF1\u5EA6\u8D8A\u9AD8\u7684slave\u4E0E\u6700\u9876\u5C42\u7684master\u95F4\u6570\u636E\u540C\u6B65\u5EF6\u8FDF\u8F83\u5927\uFF0C\u6570\u636E\u4E00\u81F4\u6027\u53D8\u5DEE\uFF0C\u5E94\u8C28\u614E\u9009\u62E9
                                          11. \u90E8\u5206\u590D\u5236\u7684\u4E09\u4E2A\u6838\u5FC3\u8981\u7D20

                                            • \u670D\u52A1\u5668\u7684\u8FD0\u884Cid

                                              \u670D\u52A1\u5668\u8FD0\u884Cid\u662F\u6BCF\u4E00\u53F0\u670D\u52A1\u5668\u6BCF\u6B21\u8FD0\u884C\u7684\u8EAB\u4EFD\u8BC6\u522B\u7801\uFF0C\u4E00\u53F0\u670D\u52A1\u5668\u591A\u6B21\u8FD0\u884C\u53EF\u4EE5\u751F\u6210\u591A\u4E2A\u8FD0\u884Cid

                                              \u5982\u679C\u60F3\u4E24\u6B21\u64CD\u4F5C\u5747\u5BF9\u662F\u7531\u540C\u4E00\u53F0\u4E3B\u670D\u52A1\u5668\u8FDB\u884C\uFF0C\u5FC5\u987B\u6BCF\u6B21\u64CD\u4F5C\u643A\u5E26\u5BF9\u5E94\u7684\u8FD0\u884Cid\uFF0C\u7528\u4E8E\u5BF9\u65B9\u8BC6\u522B

                                            • \u4E3B\u670D\u52A1\u5668\u7684\u590D\u5236\u79EF\u538B\u7F13\u51B2\u533A

                                              \u590D\u5236\u7F13\u51B2\u533A\u662F\u4E00\u4E2A\u5148\u8FDB\u5148\u51FA\u961F\u5217\uFF0C\u7528\u4E8E\u5B58\u50A8\u670D\u52A1\u5668\u6267\u884C\u8FC7\u7684\u547D\u4EE4\uFF0C\u6BCF\u6B21\u4F20\u64AD\u547D\u4EE4\uFF0Cmaster\u90FD\u4F1A\u5C06\u4F20\u64AD\u7684\u547D\u4EE4\u8BB0\u5F55\u4E0B\u6765\uFF0C\u5E76\u5B58\u50A8\u5728\u590D\u5236\u7F13\u51B2\u533A

                                              image-20210927185900890

                                              \u6982\u5FF5\uFF1A\u590D\u5236\u7F13\u51B2\u533A\uFF0C\u662F\u4E00\u4E2A\u5148\u8FDB\u5148\u51FA\u961F\u5217\uFF0C\u7528\u4E8E\u5B58\u50A8\u670D\u52A1\u5668\u6267\u884C\u8FC7\u7684\u547D\u4EE4\uFF0C\u6BCF\u6B21\u4F20\u64AD\u547D\u4EE4\uFF0Cmaster\u90FD\u4F1A\u5C06\u4F20\u64AD\u7684\u547D\u4EE4\u8BB0\u5F55\u4E0B\u6765\uFF0C\u5E76\u5B58\u50A8\u5728\u590D\u5236\u7F13\u51B2\u533A

                                              \u6BCF\u53F0\u670D\u52A1\u5668\u542F\u52A8\u65F6\uFF0C\u5982\u679C\u5F00\u542F\u6709AOF\uFF0C\u6216\u88AB\u8FDE\u63A5\u79F0\u4E3Amaster\u8282\u70B9\uFF0C\u5373\u521B\u5EFA\u590D\u5236\u7F13\u51B2\u533A

                                              \u4F5C\u7528\uFF1A\u7528\u4E8E\u4FDD\u5B58master\u670D\u52A1\u5668\u6536\u5230\u7684\u6240\u6709\u4FEE\u6539\u6307\u4EE4\uFF08\u4EC5\u5F71\u54CD\u6570\u636E\u53D8\u66F4\u7684\u6307\u4EE4\uFF0C\u4F8B\u5982set\uFF09

                                              \u5F53master\u670D\u52A1\u5668\u63A5\u6536\u5230\u4E3B\u5BA2\u6237\u7AEF\u7684\u6307\u4EE4\u65F6\uFF0C\u9664\u4E86\u5C06\u6307\u4EE4\u6267\u884C\uFF0C\u4F1A\u5C06\u6307\u4EE4\u5B58\u50A8\u5230\u7F13\u51B2\u533A\u4E2D\uFF01\uFF01\uFF01\u4E0D\u662F\u8BF4\u6307\u4EE4\u4EC5\u5B58\u50A8\u5230\u7F13\u51B2\u533A\u4E2D\u800C\u4E0D\u88AB\u670D\u52A1\u5668\u6267\u884C

                                            • \u4E3B\u4ECE\u670D\u52A1\u5668\u7684\u590D\u5236\u504F\u79FB\u91CFoffset

                                              \u6982\u5FF5\uFF1A\u4E00\u4E2A\u6570\u5B57\uFF0C\u63CF\u8FF0\u590D\u5236\u7F13\u51B2\u533A\u4E2D\u7684\u6307\u4EE4\u5B57\u8282\u4F4D\u7F6E

                                              \u5206\u7C7B\uFF1A

                                              • master\u590D\u5236\u504F\u79FB\u91CF\uFF0C\u8BB0\u5F55\u53D1\u9001\u7ED9\u6240\u6709slave\u7684\u6307\u4EE4\u5B57\u8282\u5BF9\u5E94\u7684\u4F4D\u7F6E\uFF08\u591A\u4E2A\uFF09
                                              • slave\u590D\u5236\u504F\u79FB\u91CF\uFF0C\u8BB0\u5F55slave\u63A5\u6536master\u53D1\u9001\u8FC7\u6765\u7684\u6307\u4EE4\u5B57\u8282\u5BF9\u5E94\u7684\u4F4D\u7F6E\uFF08\u4E00\u4E2A\uFF09
                                              • \u6570\u636E\u6765\u6E90\uFF0Cmaster\u7AEF\u53D1\u9001\u4F9D\u6B21\u8BB0\u5F55\u4E00\u6B21\uFF0Cslave\u7AEF\u63A5\u6536\u4E00\u6B21\u8BB0\u5F55\u4E00\u6B21
                                              • \u4F5C\u7528\uFF1A\u540C\u6B65\u4FE1\u606F\uFF0C\u6BD4\u5BF9master\u4E0Eslave\u7684\u5DEE\u5F02\uFF0C\u5F53slave\u65AD\u7EBF\u540E\uFF0C\u6062\u590D\u6570\u636E\u4F7F\u7528\uFF01\uFF01
                                          12. \u4E3B\u4ECE\u590D\u5236\u5DE5\u4F5C\u6D41\u7A0B

                                            image-20210927195251095

                                          13. \u5168\u91CF\u590D\u5236\u548C\u90E8\u5206\u590D\u5236\u4E24\u4E2A\u9636\u6BB5\u5B8C\u4E4B\u540E\u5230\u4F20\u64AD\u9636\u6BB5\uFF0C\u662F\u9760\u5FC3\u8DF3\u673A\u5236\uFF0C\u53CD\u590D\u6267\u884C\uFF0C\u53CD\u590D\u4F20\u64AD\uFF0C\u4F7F\u5F97\u4E3B\u4ECE\u540C\u6B65

                                            image-20210927195555404

                                            \u5F53slave\u591A\u6570\u6389\u7EBF\uFF0C\u6216\u5EF6\u8FDF\u8FC7\u9AD8\u65F6\uFF0Cmaster\u4E3A\u4FDD\u969C\u6570\u636E\u7A33\u5B9A\u6027\uFF0C\u5C06\u62D2\u7EDD\u6240\u6709\u4FE1\u606F\u540C\u6B65\u64CD\u4F5C

                                            image-20210927203826475

                                            image-20210927204302988

                                          14. \u4E3B\u4ECE\u590D\u5236\u5E38\u89C1\u95EE\u9898

                                            • \u9891\u7E41\u7684\u5168\u91CF\u590D\u5236---\u7B2C\u4E00\u79CD\u60C5\u51B5

                                              \u968F\u7740\u7CFB\u7EDF\u7684\u8FD0\u884C\uFF0Cmaster\u670D\u52A1\u5668\u7684\u6570\u636E\u91CF\u4F1A\u8D8A\u6765\u8D8A\u5927\uFF0C\u4E00\u65E6master\u91CD\u542F\uFF0Crunid\u5C06\u53D1\u751F\u53D8\u5316\uFF0C\u4F1A\u5BFC\u81F4\u5168\u90E8slave\u7684\u5168\u91CF\u590D\u5236\u64CD\u4F5C

                                              redis\u5185\u90E8\u4F18\u5316\uFF1A

                                              \u5728master\u5173\u95ED\u65F6\uFF0C\u901A\u8FC7RDB\u7684\u65B9\u5F0F\uFF08\u662F\u6709\u547D\u4EE4\u7684\uFF0C\u4E00\u822C\u662Fbgsave\uFF09\uFF0C\u8FDB\u884C\u6301\u4E45\u5316\uFF0C\u5C06runid\u4E0Eoffset\u4FDD\u5B58\u5230rdb\u6587\u4EF6\u4E2D

                                              \u91CD\u542F\u540E\uFF0C\u6062\u590Drunid\u4E0Eoffset\uFF0C\u4F7F\u6240\u6709slave\u8BA4\u4E3A\u8FD8\u662F\u4E4B\u524D\u7684master\uFF0C\u5728\u6570\u636E\u540C\u6B65\u9636\u6BB5\uFF0C\u5C31\u4E0D\u7528\u5168\u90E8slave\u90FD\u662F\u5168\u91CF\u590D\u5236\u64CD\u4F5C

                                            • \u9891\u7E41\u7684\u5168\u91CF\u590D\u5236---\u7B2C\u4E8C\u79CD\u60C5\u51B5

                                              image-20210927205344386

                                            • \u9891\u7E41\u7684\u7F51\u7EDC\u4E2D\u65AD----\u7B2C\u4E00\u79CD\u60C5\u51B5

                                          \u54E8\u5175

                                          1. \u4E3B\u673A\u5B95\u673A\u4E4B\u540E

                                            • \u5C06\u5B95\u673A\u7684master\u4E0B\u7EBF
                                            • \u627E\u4E00\u4E2Aslave\u4F5C\u4E3Amaster
                                            • \u901A\u77E5\u6240\u6709\u7684slave\u8FDE\u63A5\u65B0\u7684master
                                            • \u542F\u52A8\u65B0\u7684master\u4E0Eslave
                                            • \u5168\u96F6\u590D\u5236*N + \u90E8\u5206\u590D\u5236 *N
                                          2. \u54E8\u5175\u672C\u8EAB\u662F\u4E00\u4E2Aredis\u670D\u52A1\uFF0C\u591A\u4E2A\u54E8\u5175\u6784\u6210\u4E00\u4E2A\u5206\u5E03\u5F0F\u7CFB\u7EDF\uFF0C\u505A\u76D1\u63A7\u5DE5\u4F5C\uFF0C\u7528\u4E8E\u5BF9\u4E3B\u4ECE\u7ED3\u6784\u4E2D\u7684\u6BCF\u53F0\u670D\u52A1\u5668\u8FDB\u884C\u76D1\u63A7\uFF0C\u5F53\u51FA\u73B0\u6545\u969C\u65F6\u901A\u8FC7\u6295\u7968\u673A\u5236\u9009\u62E9\u65B0\u7684master\u5E76\u5C06\u6240\u6709slave\u8FDE\u63A5\u5230\u65B0\u7684master

                                          3. \u54E8\u5175\u8FD9\u4E2A\u5206\u5E03\u5F0F\u7CFB\u7EDF\u7684\u4F5C\u7528\uFF1A

                                            • \u76D1\u63A7

                                              \u4E0D\u65AD\u5730\u68C0\u67E5master\u548Cslave\u662F\u5426\u6B63\u5E38\u8FD0\u884C

                                              master\u5B58\u6D3B\u68C0\u6D4B\uFF0Cmaster\u4E0Eslave\u8FD0\u884C\u60C5\u51B5\u68C0\u6D4B

                                            • \u901A\u77E5

                                              \u5F53\u88AB\u76D1\u63A7\u7684\u670D\u52A1\u5668\u51FA\u73B0\u95EE\u9898\u65F6\uFF0C\u5411\u5176\u4ED6\u54E8\u5175\uFF08\u54E8\u5175\u4E4B\u95F4\u540C\u6B65\u4FE1\u606F\uFF09\uFF0C\u5BA2\u6237\u7AEF\u53D1\u9001\u901A\u77E5

                                            • \u81EA\u52A8\u6545\u969C\u8F6C\u79FB

                                              \u65AD\u5F00master\u4E0Eslave\u8FDE\u63A5\uFF0C\u9009\u53D6\u4E00\u4E2Aslave\u4F5C\u4E3Amaster\uFF0C\u5C06\u5176\u4ED6slave\u8FDE\u63A5\u5230\u65B0\u7684master\uFF0C\u5E76\u544A\u77E5\u5BA2\u6237\u7AEF\u65B0\u7684\u670D\u52A1\u5668\u5730\u5740

                                          4. \u54E8\u5175\u4E5F\u662F\u4E00\u4E2Aredis\u670D\u52A1\uFF0C\u53EA\u662F\u4E0D\u63D0\u4F9B\u6570\u636E\u670D\u52A1

                                            \u901A\u5E38\u54E8\u5175\u914D\u7F6E\u6570\u91CF\u4E3A\u5355\u6570

                                          5. \u542F\u52A8\u54E8\u5175\u547D\u4EE4

                                            image-20210927210554431

                                          6. \u54E8\u5175\u7684\u5DE5\u4F5C\u539F\u7406

                                            \u54E8\u5175\u4E3B\u8981\u505A\u7684\u4E8B\u60C5\u5C31\u662F\u4E3B\u4ECE\u5207\u6362

                                            \u4E3B\u4ECE\u5207\u6362---\u9009\u53D6slave\u505A\u4E3A\u65B0\u7684master\u7684\u8FC7\u7A0B

                                            • \u76D1\u63A7

                                              \u7528\u4E8E\u540C\u6B65\u5404\u4E2A\u8282\u70B9\u7684\u72B6\u6001\u4FE1\u606F

                                              • \u83B7\u53D6\u5404\u4E2A\u54E8\u5175\u7684\u72B6\u6001\uFF08\u5404\u4E2A\u54E8\u5175\u4E4B\u95F4\u7684\u72B6\u6001\u4E5F\u9700\u8981\u540C\u6B65\uFF01\uFF01\uFF09\uFF08\u901A\u8FC7PING,\u662F\u5426\u5728\u7EBF\uFF09
                                              • \u83B7\u53D6master\u7684\u72B6\u6001---master\u7684\u5C5E\u6027\uFF08runid\u3001role\uFF1Amaster\uFF09\u4EE5\u53CA\u5404\u4E2Aslave\u7684\u8BE6\u7EC6\u4FE1\u606F
                                              • \u83B7\u53D6\u6240\u6709slave\u7684\u72B6\u6001\uFF08\u6839\u636Emaster\u4E2D\u7684slave\u4FE1\u606F\uFF09
                                                • runid
                                                • role\uFF1Aslave
                                                • master_host master_port
                                                • offset
                                                • ...

                                              image-20210927225143454

                                              \u54E8\u5175\u4F1A\u5411master\u8981\u4FE1\u606F\uFF0C\u4F1A\u5411slave\u8981\u4FE1\u606F\uFF0C\u54E8\u5175\u4E4B\u95F4\u5F62\u6210\u4E00\u4E2A\u7F51\u7EDC\uFF0C\u6240\u6709\u54E8\u5175\u5728\u54E8\u5175\u8FD9\u4E2A\u7F51\u7EDC\u53D1\u5E03\u4FE1\u606F\u3001\u8BA2\u9605\u4FE1\u606F\u3001\u63A5\u6536\u4FE1\u606F

                                            • \u901A\u77E5

                                              \u7EF4\u62A4\u4FE1\u606F\u5BF9\u7B49\u7684\u9636\u6BB5\uFF0C\u54E8\u5175\u4E4B\u95F4\u4E92\u76F8\u901A\u77E5\uFF0C\u540C\u6B65\u4FE1\u606F

                                            • \u6545\u969C\u8F6C\u79FB

                                              • \u53D1\u73B0\u95EE\u9898

                                                \u6BD4\u5982\u4E00\u4E2A\u54E8\u5175\u53D1\u73B0master\u670D\u52A1\u5668\u6302\u6389\u4E86\uFF0C\u4F1A\u7ED9master\u6807\u8BB0\u4E00\u4E2A\u4E3B\u89C2\u6302\u6389\u7684\u72B6\u6001S_DOWN\uFF0C\u90A3\u4E48\u5176\u4ED6\u7684\u54E8\u5175\u4E5F\u90FD\u4F1A\u548Cmaster\u8FDB\u884C\u901A\u4FE1\uFF0C\u8D85\u8FC7\u534A\u6570\u4EE5\u4E0A\u7684\u54E8\u5175\u53D1\u73B0master\u6302\u6389\u4E86\uFF0C\u90A3\u4E48\u5C31\u4F1A\u8BA4\u4E3Amaster\u771F\u7684\u6302\u6389\u4E86\uFF0C\u4F1A\u7ED9master\u6807\u8BB0\u4E00\u4E2A\u5BA2\u89C2\u6302\u6389\u7684\u72B6\u6001O_DOWN\u3002

                                                \u91CD\u70B9\uFF1A\u54E8\u5175\u4E4B\u95F4\u4F1A\u8FDB\u884C\u901A\u4FE1\uFF0C\u540C\u6B65\u4FE1\u606F\uFF0C\u54E8\u5175\u4E4B\u95F4\u4F1A\u4E92\u76F8\u901A\u77E5\uFF01\uFF01\uFF01

                                              • \u7ADE\u9009\u5177\u6709\u51B3\u5B9A\u6743\u7684\u54E8\u5175

                                                \u662F\u901A\u8FC7\u6295\u7968\u673A\u5236\u5148\u9009\u53D6\u4E00\u4E2A\u54E8\u5175\u4F5C\u4E3A\u5177\u6709\u51B3\u5B9A\u6743\u7684\u54E8\u5175

                                                \u67D0\u4E2A\u54E8\u5175\u5148\u63A5\u5230\u6765\u81EA\u5176\u4ED6\u54EA\u4E2A\u54E8\u5175\u7684\u4FE1\u606F\uFF0C\u6309\u7167\u63A5\u6536\u4FE1\u606F\u7684\u987A\u5E8F\u5C31\u4F1A\u628A\u7968\u6295\u7ED9\u90A3\u4E2A\u54E8\u5175!----\u6295\u7968\u673A\u5236

                                              • \u4F18\u9009\u65B0master\uFF0C\u9009\u53D6slave\u670D\u52A1\u5668\u4F5C\u4E3Amaster\u7684\u539F\u5219

                                                • \u9009\u53D6\u5728\u7EBF\u7684
                                                • pass\u6389\u54CD\u5E94\u6162\u7684\u3002\u54E8\u5175\u4E0D\u505C\u5730\u5728\u548Cslave\u670D\u52A1\u5668\u901A\u4FE1\uFF0C\u6709\u7684slave\u56DE\u5F97\u5757\uFF0C\u6709\u7684slave\u56DE\u5F97\u6162
                                                • pass\u6389\u4E0E\u539Fmaster\u65AD\u5F00\u65F6\u95F4\u4E45\u7684
                                                • \u4F18\u5148\u539F\u5219
                                                  • \u4F18\u5148\u7EA7
                                                  • offset\uFF08slave\u4E0Emaster\u7684offset\u5DEE\u8DDD\u5C0F\u7684\u4F18\u5148\uFF09
                                                  • runid
                                              • \u53D1\u9001\u6307\u4EE4

                                                • \u5411\u65B0\u7684master\u53D1\u9001slaveof no one
                                                • \u5411\u5176\u4ED6slave\u53D1\u9001slaveof\u65B0\u7684master IP\u7AEF\u53E3
                                                • \u539Fmaster\u4F5C\u4E3Aslave\uFF0C\u6545\u969C\u6062\u590D\u540E\u8FDE\u63A5\uFF0Cslaveof\u65B0\u7684master\uFF01\uFF01(\u539Fmaster\u5982\u679C\u6062\u590D\u4E4B\u540E\u8FDE\u63A5\u4E86\u4E0A\u6765\u662F\u4F5C\u4E3Aslave\u7684\u8EAB\u4EFD\uFF01)

                                          \u96C6\u7FA4

                                          1. \u96C6\u7FA4\u4F5C\u7528\uFF1A

                                            \u5206\u6563\u5355\u53F0\u670D\u52A1\u5668\u7684\u8BBF\u95EE\u538B\u529B\uFF0C\u5B9E\u73B0\u8D1F\u8F7D\u5747\u8861

                                            \u5206\u6563\u5355\u53F0\u670D\u52A1\u5668\u7684\u5B58\u50A8\u538B\u529B\uFF0C\u5B9E\u73B0\u53EF\u6269\u5C55\u6027

                                            \u964D\u4F4E\u5355\u53F0\u670D\u52A1\u5668\u5B95\u673A\u5E26\u6765\u7684\u4E1A\u52A1\u707E\u96BE

                                          2. \u96C6\u7FA4\u5C31\u662F\u4F7F\u7528\u7F51\u7EDC\u5C06**\u82E5\u5E72\u53F0\u8BA1\u7B97\u673A\uFF08\u4E3B\u673A\uFF09**\u8054\u901A\u8D77\u6765\uFF0C\u5E76\u63D0\u4F9B\u7EDF\u4E00\u7684\u7BA1\u7406\u65B9\u5F0F\uFF0C\u4F7F\u5176\u5BF9\u5916\u5448\u73B0\u5355\u673A\u7684\u670D\u52A1\u6548\u679C

                                          3. \u6570\u636E\u5B58\u50A8\u8BBE\u8BA1

                                            • \u901A\u8FC7\u7B97\u6CD5\u8BBE\u8BA1\uFF0C\u8BA1\u7B97\u51FAkey\u5E94\u8BE5\u4FDD\u5B58\u7684\u4F4D\u7F6E

                                              key\u5148\u7ECF\u8FC7CRC16(key)---\u518D%16384---\u5F97\u5230\u4E00\u4E2A\u503C\uFF0C\u8FD9\u4E2A\u503C\u51B3\u5B9A\u8FD9\u4E2Akey\u5E94\u8BE5\u653E\u5728\u54EA\u4E2Aredis\u670D\u52A1\u5668

                                            • \u5C06\u6240\u6709\u7684\u5B58\u50A8\u7A7A\u95F4\u5207\u5272\u621016384\u4EFD\uFF0C\u6BCF\u53F0\u4E3B\u673A\u4FDD\u5B58\u4E00\u90E8\u5206

                                              \u6BCF\u4EFD\u4EE3\u8868\u7684\u662F\u4E00\u4E2A\u5B58\u50A8\u7A7A\u95F4\uFF0C\u8FD9\u4E2A\u5B58\u50A8\u7A7A\u95F4\u80FD\u5B58\u5F88\u591A\uFF0C\u8FD9\u4E00\u6B65\u53EA\u662F\u627E\u5230\u8FD9\u4E2A\u5B58\u50A8\u7A7A\u95F4

                                            • \u5C06key\u6309\u7167\u8BA1\u7B97\u51FA\u7684\u7ED3\u679C\u653E\u5230\u5BF9\u5E94\u7684\u5B58\u50A8\u7A7A\u95F4

                                            • \u4E00\u4E2A\u673A\u5668\u6301\u6709\u4E00\u5B9A\u7684\u69FD\uFF0C\u52A0\u673A\u5668\u7684\u65F6\u5019\uFF0C\u628A\u4ED6\u7684\u69FD\u5206\u4E00\u90E8\u5206\u7ED9\u65B0\u7684\u673A\u5668\uFF0C\u5982\u679C\u53BB\u673A\u5668\u7684\u8BDD\uFF0C\u628A\u69FD\u8FD4\u56DE\u5230\u73B0\u6709\u7684\u673A\u5668\u4E2D

                                          4. \u96C6\u7FA4\u5185\u90E8\u901A\u8BAF\u8BBE\u8BA1

                                            • \u4E0D\u540C\u4E3B\u673A\u4F1A\u4E92\u8054\uFF0C\u5404\u4E2A\u6570\u636E\u5E93\u76F8\u4E92\u901A\u4FE1\uFF0C\u4FDD\u5B58\u6BCF\u4E2A\u5E93\u4E2D\u69FD\u7684\u7F16\u53F7\u6570\u636E
                                            • \u4E00\u6B21\u547D\u4E2D\uFF0C\u76F4\u63A5\u8FD4\u56DE
                                            • \u672A\u547D\u4E2D\u7684\u8BDD\uFF0C\u5728\u672A\u547D\u4E2D\u7684\u8FD9\u53F0\u673A\u5668\u4E0A\u4E5F\u80FD\u627E\u5230\u5E94\u8BE5\u653E\u5230\u54EA\u4E2A\u5E93\u5373\u54EA\u53F0\u4E3B\u673A\u4E0A\uFF0C\u6240\u4EE5\u6700\u591A\u4E24\u6B21\u5C31\u53EF\u4EE5\u547D\u4E2D\uFF01

                                            image-20210928000637897

                                          5. \u642D\u5EFA\u597D\u96C6\u7FA4\u540E\uFF0C\u6DFB\u52A0\u6570\u636E\uFF0C\u4F1A\u81EA\u52A8\u5C06\u6570\u636E\u5B58\u653E\u5230\u5E94\u8BE5\u653E\u7684\u69FD\u91CC\uFF0C\u8FD9\u4E2A\u5E94\u8BE5\u653E\u7684\u69FD\uFF0C\u662F\u901A\u8FC7\u6211\u4EEC\u653E\u6570\u636E\u7684key\u7ECF\u8FC7CRC16,\u8FD8\u6709\u5BF916384\u53D6\u6A21\u8BA1\u7B97\u51FA\u6765\u7684\uFF0C\u8FD9\u4E2A\u5E94\u8BE5\u5B58\u50A8\u7684\u4F4D\u7F6E\u5373\u69FD\u4E0D\u4E00\u5B9A\u662F\u5BA2\u6237\u7AEF\u6240\u8FDE\u63A5\u7684\u90A3\u4E2A\u670D\u52A1\u5668\uFF0C\u6240\u4EE5\u642D\u5EFA\u597D\u96C6\u7FA4\u540E\uFF0C\u653E\u6570\u636E\u4F1A\u81EA\u52A8\u8FDB\u884C\u91CD\u5B9A\u5411\u3002

                                            image-20210928143108618

                                            \u547D\u4EE4\uFF1A\u5BA2\u6237\u7AEF\u8FDE\u63A5\u670D\u52A1\u5668\u7684\u65F6\u5019 \u8981\u52A0\u4E0A -c

                                          6. cluster\u914D\u7F6E

                                            image-20210928145104155

                                          \u7F13\u5B58\u7684\u95EE\u9898

                                          \u7F13\u5B58\u9884\u70ED

                                          1. \u95EE\u9898\uFF1A

                                            • \u670D\u52A1\u5668\u542F\u52A8\u540E\u8FC5\u901F\u5B95\u673A

                                            \u539F\u56E0\uFF1A

                                            • \u8BF7\u6C42\u6570\u91CF\u8F83\u9AD8
                                            • \u4E3B\u4ECE\u4E4B\u95F4\u6570\u636E\u541E\u5410\u91CF\u8F83\u5927\uFF0C\u6570\u636E\u540C\u6B65\u64CD\u4F5C\u9891\u5EA6\u8F83\u9AD8
                                          2. \u89E3\u51B3\u65B9\u6848

                                            \u524D\u7F6E\u51C6\u5907\u5DE5\u4F5C

                                            • \u65E5\u5E38\u4F8B\u884C\u7EDF\u8BA1\u6570\u636E\u8BBF\u95EE\u8BB0\u5F55\uFF0C\u7EDF\u8BA1\u8BBF\u95EE\u9891\u5EA6\u8F83\u9AD8\u7684\u70ED\u70B9\u6570\u636E
                                            • \u5229\u7528LRU\u6570\u636E\u5220\u9664\u7B56\u7565\uFF0C\u6784\u5EFA\u6570\u636E\u7559\u5B58\u961F\u5217
                                            • \u5C06\u7EDF\u8BA1\u7ED3\u679C\u4E2D\u7684\u6570\u636E\u5206\u7C7B\uFF0C\u6839\u636E\u7EA7\u522B\uFF0Credis\u4F18\u5148\u52A0\u8F7D\u7EA7\u522B\u8F83\u9AD8\u7684\u70ED\u70B9\u6570\u636E
                                            • \u5229\u7528\u5206\u5E03\u5F0F\u591A\u670D\u52A1\u5668\u540C\u65F6\u8FDB\u884C\u6570\u636E\u8BFB\u53D6\uFF0C\u63D0\u901F\u6570\u636E\u52A0\u8F7D\u8FC7\u7A0B

                                            \u5B9E\u65BD\uFF1A

                                            • \u4F7F\u7528\u811A\u672C\u7A0B\u5E8F\u56FA\u5B9A\u89E6\u53D1\u6570\u636E\u9884\u70ED\u8FC7\u7A0B
                                          3. \u603B\u7ED3\uFF1A

                                            \u7F13\u5B58\u9884\u70ED\u5C31\u662F\u7CFB\u7EDF\u542F\u52A8\u524D\uFF0C\u63D0\u524D\u5C06\u76F8\u5173\u7684\u7F13\u5B58\u6570\u636E\u76F4\u63A5\u52A0\u8F7D\u5230\u7F13\u5B58\u7CFB\u7EDF\uFF0C\u907F\u514D\u5728\u7528\u6237\u8BF7\u6C42\u7684\u65F6\u5019\uFF0C\u5148\u67E5\u8BE2\u6570\u636E\u5E93\uFF0C\u7136\u540E\u518D\u5C06\u6570\u636E\u7F13\u5B58\u7684\u95EE\u9898\u3002\u8FD9\u6837\u7528\u6237\u53EF\u4EE5\u76F4\u63A5\u67E5\u8BE2\u4E8B\u5148\u88AB\u9884\u70ED\u7684\u7F13\u5B58\u6570\u636E\uFF01\uFF01

                                            \u907F\u514D\u7528\u6237\u76F4\u63A5\u5954\u7740\u6570\u636E\u5E93\u6765\u67E5\u8BE2\uFF0C\u6240\u4EE5\u5C06\u70ED\u70B9\u6570\u636E\u5728\u7CFB\u7EDF\u542F\u52A8\u524D\u5C31\u52A0\u8F7D\u5230\u7F13\u5B58\u7CFB\u7EDF\uFF01\uFF01\u7528\u6237\u53EF\u4EE5\u76F4\u63A5\u67E5\u8BE2\u7F13\u5B58\uFF01

                                          \u7F13\u5B58\u96EA\u5D29

                                          1. \u95EE\u9898\uFF1A

                                            \u5728\u4E00\u4E2A\u8F83\u77ED\u7684\u65F6\u95F4\u5185\uFF0C\u7F13\u5B58\u4E2D\u8F83\u591A\u7684key\u96C6\u4E2D\u8FC7\u671F\uFF08\u5931\u6548\uFF09

                                            \u8BBF\u95EE\u8FC7\u671F\u6570\u636E\uFF0C\u90A3\u4E48\u5728redis\u4E2D\u65E0\u6CD5\u547D\u4E2D\uFF0C\u65E0\u6CD5\u5728redis\u4E2D\u67E5\u8BE2\u5230\u6570\u636E\uFF0C\u6240\u4EE5\u5C31\u4F1A\u53BB\u6570\u636E\u5E93\u67E5\u8BE2\uFF0C\u5927\u91CF\u7684\u8BF7\u6C42\u538B\u5230\u6570\u636E\u5E93\u90A3\u8FB9\uFF0C\u6570\u636E\u5E93\u4E0D\u80FD\u53CA\u65F6\u5904\u7406\uFF0Credis\u51FA\u73B0\u8D85\u65F6\u73B0\u8C61\uFF0Credis\u670D\u52A1\u5668\u8D44\u6E90\u88AB\u4E25\u91CD\u5360\u7528\uFF0Credis\u96C6\u7FA4\u670D\u52A1\u5668\u5D29\u6E83\uFF0C\u5E94\u7528\u670D\u52A1\u5668\u5D29\u6E83

                                            image-20210928150733404

                                          2. \u95EE\u9898\u5206\u6790

                                            • \u77ED\u65F6\u95F4\u5185\u5927\u91CFkey\u96C6\u4E2D\u8FC7\u671F
                                          3. \u89E3\u51B3\u65B9\u6848

                                            • \u66F4\u591A\u7684\u9875\u9762\u9759\u6001\u5316\u5904\u7406

                                            • \u6784\u5EFA\u591A\u7EA7\u7F13\u5B58\u67B6\u6784

                                              • Nginx\u7F13\u5B58+redis\u7F13\u5B58+ehcache\u7F13\u5B58
                                            • \u68C0\u6D4BMysql\u4E25\u91CD\u8017\u65F6\u4E1A\u52A1\u8FDB\u884C\u4F18\u5316

                                            • \u707E\u96BE\u9884\u8B66\u673A\u5236

                                              \u76D1\u63A7redis\u670D\u52A1\u5668\u6027\u80FD\u6307\u6807

                                              • cpu\u5360\u7528\u3001cpu\u4F7F\u7528\u7387
                                              • \u5185\u5B58\u5BB9\u91CF
                                              • \u67E5\u8BE2\u5E73\u5747\u54CD\u5E94\u65F6\u95F4
                                              • \u7EBF\u7A0B\u6570
                                            • \u9650\u6D41\u3001\u964D\u7EA7

                                              \u77ED\u65F6\u95F4\u8303\u56F4\u5185\u727A\u7272\u4E00\u4E9B\u5BA2\u6237\u4F53\u9A8C\uFF0C\u9650\u5236\u4E00\u90E8\u5206\u8BF7\u6C42\u8BBF\u95EE\uFF0C\u964D\u4F4E\u5E94\u7528\u670D\u52A1\u5668\u538B\u529B\uFF0C\u5F85\u4E1A\u52A1\u4F4E\u901F\u8FD0\u8F6C\u540E\uFF0C\u518D\u9010\u6B65\u653E\u5F00\u8BBF\u95EE

                                          4. \u89E3\u51B3\u65B9\u6848---\u4ECEkey\u8FC7\u671F\u7684\u89D2\u5EA6\uFF0C\u4ECE\u6839\u672C\u6765\u89E3\u51B3

                                            • LRU\u548CLFU\uFF08\u6700\u8FD1\u5F88\u5C11\u8BBF\u95EE\u7684\u6570\u636E\uFF09\u5207\u6362\uFF0C\u672C\u6765\u5C31\u5F88\u5C11\u8BBF\u95EE\u7684\u6570\u636E\uFF0C\u8FC7\u671F\u4E86\u6216\u8005\u88AB\u6E05\u9664\uFF0C\u90A3\u4E48\u5728\u77ED\u65F6\u95F4\u5185\u4E5F\u4E0D\u53EF\u80FD\u6709\u5927\u91CF\u8BBF\u95EE\u90FD\u6765\u8BF7\u6C42\u8FD9\u4E2A\u6570\u636E

                                            • \u6570\u636E\u6709\u6548\u671F\u7B56\u7565\u8C03\u6574

                                              • \u6839\u636E\u4E1A\u52A1\u6570\u636E\u6709\u6548\u671F\u8FDB\u884C\u5206\u7C7B\u9519\u5CF0
                                              • \u8FC7\u671F\u65F6\u95F4\u4F7F\u7528\u56FA\u5B9A\u65F6\u95F4+\u968F\u673A\u503C\u7684\u5F62\u5F0F\uFF0C\u7A00\u91CA\u96C6\u4E2D\u5230\u671F\u7684key\u7684\u6570\u91CF\uFF0C\u8BA9\u8FD9\u4E9B\u6570\u636E\u4E0D\u8981\u5728\u540C\u4E00\u65F6\u95F4\u5230\u671F
                                            • \u8D85\u70ED\u6570\u636E\u4F7F\u7528\u6C38\u4E45key

                                            • \u5B9A\u671F\u7EF4\u62A4\uFF08\u81EA\u52A8+\u4EBA\u5DE5\uFF09

                                              \u5BF9\u5373\u5C06\u8FC7\u671F\u7684\u6570\u636E\u505A\u8BBF\u95EE\u91CF\u5206\u6790\uFF0C\u786E\u8BA4\u662F\u5426\u5EF6\u65F6\uFF0C\u914D\u5408\u8BBF\u95EE\u91CF\u7EDF\u8BA1\uFF0C\u505A\u70ED\u70B9\u6570\u636E\u7684\u5EF6\u65F6

                                            • \u52A0\u9501--\u614E\u7528\uFF01

                                          5. \u603B\u7ED3\uFF1A

                                            \u7F13\u5B58\u96EA\u5D29\u5C31\u662F\u77AC\u95F4\u8FC7\u671F\u6570\u636E\u91CF\u592A\u5927\uFF0C\u5BFC\u81F4\u8BBF\u95EE\u8BF7\u6C42\u8D8A\u8FC7\u7F13\u5B58\u5BF9\u6570\u636E\u5E93\u670D\u52A1\u5668\u77AC\u95F4\u9020\u6210\u5F88\u5927\u538B\u529B\uFF0C\u5982\u80FD\u591F\u6709\u6548\u907F\u514D\u6570\u636E\u8FC7\u671F\u65F6\u95F4\u96C6\u4E2D\uFF0C\u53EF\u4EE5\u6709\u6548\u89E3\u51B3\u96EA\u5D29\u73B0\u8C61\u7684\u51FA\u73B0

                                            \u914D\u5408\u5176\u4ED6\u7B56\u7565\u4E00\u8D77\u4F7F\u7528\uFF0C\u5E76\u76D1\u63A7\u670D\u52A1\u5668\u7684\u8FD0\u884C\u6570\u636E\uFF0C\u6839\u636E\u8FD0\u884C\u8BB0\u5F55\u5FEB\u901F\u8C03\u6574\u3002

                                          \u7F13\u5B58\u51FB\u7A7F

                                          1. \u95EE\u9898

                                            redis\u4E2D\u67D0\u4E2Akey\u8FC7\u671F\uFF0C\u8BE5key\u8BBF\u95EE\u91CF\u5DE8\u5927

                                            \u591A\u4E2A\u6570\u636E\u8BF7\u6C42\u4ECE\u670D\u52A1\u5668\u76F4\u63A5\u5230redis\uFF0C\u5747\u672A\u547D\u4E2D

                                            redis\u5728\u77ED\u65F6\u95F4\u5185\u53D1\u8D77\u4E86\u5927\u91CF\u5BF9\u6570\u636E\u5E93\u4E2D\u540C\u4E00\u6570\u636E\u7684\u8BBF\u95EE

                                          2. \u5206\u6790

                                            • \u5355\u4E2Akey\u9AD8\u70ED
                                            • key\u8FC7\u671F
                                          3. \u89E3\u51B3\u65B9\u6848

                                            • \u9884\u5148\u8BBE\u5B9A

                                              \u4EE5\u7535\u5546\u4E3A\u4F8B\uFF0C\u82E5\u5E72\u6B3E\u4E3B\u6253\u5546\u54C1\uFF0C\u5728\u8D2D\u7269\u8282\u671F\u95F4\uFF0C\u52A0\u5927\u6B64\u7C7B\u4FE1\u606Fkey\u7684\u8FC7\u671F\u65F6\u957F

                                            • \u73B0\u573A\u8C03\u6574

                                              \u76D1\u63A7\u8BBF\u95EE\u91CF\uFF0C\u5BF9\u81EA\u7136\u6D41\u91CF\u6FC0\u589E\u7684\u6570\u636E\u5EF6\u957F\u8FC7\u671F\u65F6\u95F4\u6216\u8BBE\u7F6E\u4E3A\u6C38\u4E45\u6027key

                                            • \u540E\u53F0\u5237\u65B0\u6570\u636E

                                              \u542F\u52A8\u5B9A\u65F6\u4EFB\u52A1\uFF0C\u9AD8\u5CF0\u671F\u6765\u4E34\u4E4B\u524D\uFF0C\u5237\u65B0\u6570\u636E\u6709\u6548\u671F\uFF0C\u786E\u4FDD\u4E0D\u4E22\u5931

                                            • \u4E8C\u7EA7\u7F13\u5B58

                                              \u8BBE\u7F6E\u4E0D\u540C\u7684\u5931\u6548\u65F6\u95F4\uFF0C\u4FDD\u8BC1\u4E0D\u4F1A\u88AB\u540C\u65F6\u6DD8\u6C70\u5C31\u884C\u3002\u8BBE\u7F6E\u4E8C\u7EA7\u7F13\u5B58\u4E13\u95E8\u5904\u7406\u9AD8\u70ED\u6570\u636E

                                            • \u52A0\u9501

                                              \u5206\u5E03\u5F0F\u9501\uFF0C\u9632\u6B62\u88AB\u51FB\u7A7F\uFF0C\u52A0\u9501\u7684\u8BDD\u4F1A\u5F71\u54CD\u6027\u80FD\u3002\u52A0\u9501\u7684\u8BDD\u907F\u514D\u540C\u4E00\u65F6\u95F4\u5927\u91CF\u8BF7\u6C42\u90FD\u6765\u8BF7\u6C42\u8FD9\u4E2A\u9AD8\u70EDkey\uFF0C\u9020\u6210\u7F13\u5B58\u51FB\u7A7F

                                          \u7F13\u5B58\u7A7F\u900F

                                          1. \u95EE\u9898

                                            redis\u4E2D\u5927\u9762\u79EF\u51FA\u73B0\u672A\u547D\u4E2D

                                            \u51FA\u73B0\u975E\u6B63\u5E38URL\u8BBF\u95EE

                                            redis\u4E2D\u6CA1\u6709\u8FD9\u4E2A\u6570\u636E\uFF0C\u6570\u636E\u5E93\u4E2D\u4E5F\u4E0D\u5B58\u5728\u8FD9\u4E2A\u6570\u636E

                                          2. \u89E3\u51B3\u65B9\u6848

                                            • \u5BF9\u67E5\u8BE2\u7ED3\u679C\u4E3Anull\u7684\u6570\u636E\u8FDB\u884C\u7F13\u5B58\uFF0C\u8BBE\u5B9A\u77ED\u65F6\u9650

                                            • \u4F7F\u7528\u5E03\u9686\u8FC7\u6EE4\u5668\uFF0C\u5C06\u6570\u636E\u5E93\u4E2D\u7684\u6240\u6709key\u90FD\u5B58\u50A8\u5728\u5E03\u9686\u8FC7\u6EE4\u5668\u4E2D\uFF0C\u5728\u67E5\u8BE2Redis\u524D\u5148\u53BB\u5E03\u9686\u8FC7\u6EE4\u5668\u67E5\u8BE2key\u662F\u5426\u5B58\u5728\uFF0C\u5982\u679C\u4E0D\u5B58\u5728\u5C31\u76F4\u63A5\u8FD4\u56DE\uFF0C\u4E0D\u8BA9\u5176\u8BBF\u95EE\u6570\u636E\u5E93

                                              \u60F3\u529E\u6CD5\u5C06\u8FD9\u4E9B\u975E\u6CD5\u8BF7\u6C42\uFF0C\u8BF7\u6C42\u4E0D\u5B58\u5728\u7684\u6570\u636E\u8FD9\u4E9B\u8BF7\u6C42\uFF0C\u62E6\u622A\u5728redis\u4E4B\u5916\uFF0C\u90A3\u4E48\u5C31\u662F\u901A\u8FC7\u5E03\u9686\u8FC7\u6EE4\u5668

                                          \u9762\u8BD5\u95EE\u9898

                                          redis\u4E3A\u4EC0\u4E48\u91C7\u7528\u5355\u7EBF\u7A0B

                                          1. redis\u5E76\u4E0D\u662F\u771F\u6B63\u610F\u4E49\u4E0A\u7684\u5355\u7EBF\u7A0B\uFF0C\u53EF\u4EE5\u901A\u8FC7\u8C03\u7528fork\u751F\u6210\u5B50\u8FDB\u7A0B\uFF0C\u5728RDB,AOF\u6301\u4E45\u5316\u90FD\u6709\u7528\u5230\uFF0C\u8FD9\u4E2A\u8FDB\u7A0B\u4E0B\u9762\u786E\u5B9E\u662F\u53EA\u6709\u4E00\u4E2A\u7EBF\u7A0B\uFF01

                                          2. redis\u4F7F\u7528\u5355\u7EBF\u7A0B\u7684\u539F\u56E0

                                            • \u8FD9\u4E2A\u95EE\u9898\u548Cjava\u4E3A\u4EC0\u4E48\u542F\u7528\u591A\u7EBF\u7A0B\u8FDE\u8D77\u6765\u8BF4\u3002

                                              redis\u5904\u7406\u547D\u4EE4\u662F\u7EAF\u5185\u5B58\u64CD\u4F5C\uFF0C\u4E0D\u4E0E\u78C1\u76D8\u505AIO\uFF0Credis\u5904\u7406\u547D\u4EE4\u662F\u5F88\u5FEB\u7684\uFF0C\u4E0D\u9700\u8981\u963B\u585E\u7B49\u5F85\uFF0Credis\u4E2D\u4E5F\u5C31\u4E0D\u5B58\u5728\u5355\u7EBF\u7A0B\u60C5\u51B5\u4E0B\uFF0C\u4E00\u4E2A\u7EBF\u7A0B\u6267\u884C\u4EFB\u52A1\u7684\u65F6\u5019\u963B\u585E\u7B49\u5F85\uFF08\u5728Java\u4E2D\uFF0C\u4E00\u4E2A\u7EBF\u7A0B\u5982\u679C\u505A\u4E86IO\u64CD\u4F5C\uFF0C\u90A3\u4E48\u4F1AIO\u963B\u585E\u7B49\u5F85\uFF0C\u8FD9\u662FIO\u64CD\u4F5C\u7684\u7279\u6027\uFF0C\u8FD9\u79CD\u60C5\u51B5\u4E0B\u5982\u679C\u662F\u5355\u7EBF\u7A0BCPU\u53EA\u80FD\u7B49\u5F85\uFF0C\u5982\u679C\u662F\u591A\u7EBF\u7A0BCPU\u53EF\u4EE5\u53BB\u5E72\u522B\u7684\u4E8B\u60C5\uFF0C\u56E0\u4E3A\u8FD9\u4E2A\u7EBF\u7A0BIO\u963B\u585E\u7B49\u5F85\u4E86\uFF0C\u6240\u4EE5\u63D0\u9AD8\u4E86CPU\u7684\u6027\u80FD\uFF0C\u6CA1\u6709\u6D6A\u8D39CPU\u7684\u65F6\u95F4\uFF01\uFF09\uFF0CCPU\u4E5F\u53EA\u80FD\u5E72\u7B49\u7740\u7684\u60C5\u51B5\u3002

                                              \u5728redis\u573A\u666F\u4E2D\uFF0C\u5355\u7EBF\u7A0B\u6267\u884C\u547D\u4EE4\u5F88\u5FEB\uFF0C\u4E0D\u9700\u8981\u963B\u585E\u7B49\u5F85\uFF0C\u4E0D\u5B58\u5728cpu\u4F1A\u56E0\u4E3A\u7EBF\u7A0B\u7684\u963B\u585E\u7B49\u5F85\u800C\u5E72\u7B49\u7740\uFF0C\u6D6A\u8D39\u4E86\u65F6\u95F4\u964D\u4F4E\u4E86\u6548\u7387\u7684\u60C5\u51B5\u3002\u5982\u679C\u8FD9\u79CD\u60C5\u51B5\uFF0C\u542F\u7528\u591A\u7EBF\u7A0B\uFF0C\u53CD\u800C\u4F1A\u56E0\u4E3A\u7EBF\u7A0B\u7684\u4E0A\u4E0B\u6587\u5207\u6362\u6D6A\u8D39cpu\u65F6\u95F4

                                            • redis\u57FA\u4E8EReactor\u6A21\u5F0F\u5F00\u53D1\u4E86\u7F51\u7EDC\u4E8B\u4EF6\u5904\u7406\u5668\u3001\u6587\u4EF6\u4E8B\u4EF6\u5904\u7406\u5668\uFF0C\u6587\u4EF6\u4E8B\u4EF6\u5904\u7406\u5668\u662F\u5355\u7EBF\u7A0B\u7684\uFF0C\u6240\u4EE5redis\u624D\u53EB\u505A\u5355\u7EBF\u7A0B\u7684\u6A21\u578B\uFF08redis\u91CC\u9762\u5E76\u4E0D\u662F\u53EA\u6709\u4E00\u4E2A\u7EBF\u7A0B\uFF0C\u4E5F\u6709\u5176\u4ED6\u540E\u53F0\u7EBF\u7A0B\uFF0C\u901A\u8FC7fork\uFF09\uFF0C\u5B83\u91C7\u7528IO\u591A\u8DEF\u590D\u7528\u673A\u5236\u6765\u540C\u65F6\u76D1\u542C\u591A\u4E2ASocket

                                              \u591A\u4E2Asocket\u53EF\u80FD\u5E76\u53D1\u5730\u4EA7\u751F\u4E0D\u540C\u7684\u4E8B\u4EF6\uFF0CIO\u591A\u8DEF\u590D\u7528\u7A0B\u5E8F\u4F1A\u76D1\u542C\u591A\u4E2Asocket\uFF0C\u4F1A\u5C06socket\u653E\u5165\u4E00\u4E2A\u961F\u5217\u4E2D\u6392\u961F\uFF0C\u6BCF\u6B21\u4ECE\u961F\u5217\u4E2D\u6709\u5E8F\u3001\u540C\u6B65\u5730\u53D6\u51FA\u4E00\u4E2Asocket\u7ED9\u4E8B\u4EF6\u5206\u6D3E\u5668\uFF0C\u4E8B\u4EF6\u5206\u6D3E\u5668\u628Asocket\u7ED9\u5BF9\u5E94\u7684\u4E8B\u4EF6\u5904\u7406\u5668\uFF0C\u7136\u540E\u4E00\u4E2Asocket\u7684\u4E8B\u4EF6\u5904\u7406\u5B8C\u4E4B\u540E\uFF0CIO\u591A\u8DEF\u590D\u7528\u7A0B\u5E8F\u624D\u4F1A\u5C06\u961F\u5217\u4E2D\u7684\u4E0B\u4E00\u4E2Asocket\u7ED9\u4E8B\u4EF6\u5206\u6D3E\u5668\u3002\u6587\u4EF6\u4E8B\u4EF6\u5206\u6D3E\u5668\u4F1A\u6839\u636E\u6BCF\u4E2Asocket\u5F53\u524D\u4EA7\u751F\u7684\u4E8B\u4EF6\uFF0C\u6765\u9009\u62E9\u5BF9\u5E94\u7684\u4E8B\u4EF6\u5904\u7406\u5668\u6765\u5904\u7406\u3002\u8FD9\u4E2A\u8FC7\u7A0B\u662F\u6709\u5E8F\u5730\u3001\u540C\u6B65\u5730\uFF0C\u6240\u4EE5\u8BF4redis\u662F\u5355\u7EBF\u7A0B\u6A21\u578B\uFF01

                                          3. \u5BF9\u4E8EJava\u7A0B\u5E8F\uFF0C\u5373\u4F7F\u662F\u5355\u6838CPU\uFF0C\u4E5F\u8981\u4F7F\u7528\u591A\u7EBF\u7A0B\u7684\u539F\u56E0

                                            \u5373\u4F7F\u5355\u6838CPU\u5728\u5FAE\u89C2\u4E0A\u662F\u4E32\u884C\u6267\u884C\uFF0C\u5728\u5B8F\u89C2\u4E0A\u624D\u662F\u5E76\u884C\u7684\u6548\u679C\uFF0C\u5E76\u4E14\u5BF9\u4E8E\u5355\u6838CPU\uFF0C\u542F\u7528\u591A\u7EBF\u7A0B\u53CD\u800C\u66F4\u6162\uFF0C\u56E0\u4E3A\u4F1A\u6709\u4E0A\u4E0B\u6587\u5207\u6362\u6D88\u8017CPU\u6027\u80FD\uFF0C\u800C\u4E14\u53EF\u80FD\u51FA\u73B0\u6B7B\u9501\u6216\u8005\u8D44\u6E90\u9650\u5236\u7684\u95EE\u9898\u3002\u90A3\u4E48\u5355\u6838CPU\u542F\u7528\u591A\u7EBF\u7A0B\u7684\u539F\u56E0\u662F\u4EC0\u4E48\uFF1F\u6BD4\u5982\u7EBF\u7A0B\u6267\u884C\u4E86IO\u64CD\u4F5C\uFF0C\u8FD9\u4E2A\u7EBF\u7A0B\u672C\u8EAB\u5C31\u8981\u963B\u585E\uFF08\u8FD9\u4E2A\u7EBF\u7A0B\u963B\u585E\u7B49\u5F85\u7684\u65F6\u95F4\u5F80\u5F80\u662F\u5927\u4E8E\u7EBF\u7A0B\u4E0A\u4E0B\u6587\u5207\u6362\u6240\u6D88\u8017\u7684\u65F6\u95F4\u7684\uFF09\uFF0C\u8FD9\u4E2A\u65F6\u5019\u662F\u5355\u7EBF\u7A0B\uFF0CCPU\u53EA\u80FD\u7B49\u7740\uFF0C\u56E0\u4E3A\u7EBF\u7A0B\u963B\u585E\u4E86\uFF0C\u5982\u679C\u662F\u591A\u7EBF\u7A0B\uFF0CCPU\u5728IO\u963B\u585E\u7684\u65F6\u5019\u53EF\u4EE5\u6267\u884C\u53E6\u4E00\u4E2A\u7EBF\u7A0B\uFF08\u8FDB\u884C\u4E0A\u4E0B\u6587\u5207\u6362\uFF09\uFF0C\u53BB\u5E72\u522B\u7684\u4E8B\u60C5\uFF0C\u63D0\u9AD8\u4E86CPU\u7684\u5229\u7528\u7387\u3002 \u6240\u4EE5\u5355\u6838\u60C5\u51B5\u4E0B\u542F\u7528\u591A\u7EBF\u7A0B\u4E5F\u662F\u6709\u610F\u4E49\u7684\u3002\u5E76\u4E14\u5728\u591A\u6838\u60C5\u51B5\u4E0B\uFF0C\u4E5F\u4E0D\u5B8C\u5168\u662F\u4E00\u4E2A\u6838\u5BF9\u5E94\u4E8E\u4E00\u4E2A\u7EBF\u7A0B\uFF0C\u56E0\u4E3A\u7A0B\u5E8F\u8DD1\u7684\u7EBF\u7A0B\u7684\u6570\u91CF\u8FDC\u8FDC\u5927\u4E8Ecpu\u7684\u6838\u5FC3\u6570\u91CF\uFF0Ccpu\u5373\u4F7F\u662F\u591A\u6838\u7684\uFF0C\u4ECD\u7136\u662F\u6709\u4E00\u5B9A\u7684\u8C03\u5EA6\u7B56\u7565\u53BB\u6267\u884C\u7EBF\u7A0B\uFF0C\u6BD4\u5982\u5148\u6765\u5148\u6267\u884C\u3001\u4F18\u5148\u7B56\u7565\u3001\u65F6\u95F4\u7247\u8F6E\u8F6C\u7B56\u7565\u7B49\u3002

                                            Java\u4E2D\u4E3A\u4EC0\u4E48\u7528\u591A\u7EBF\u7A0B\uFF0C\u56E0\u4E3AJava\u4E2D\u7684\u7EBF\u7A0B\u5904\u7406\u4EFB\u52A1\u7684\u65F6\u95F4\u5F80\u5F80\u6BD4\u8F83\u957F\uFF0C\u5904\u7406\u4EFB\u52A1\u7684\u65F6\u5019\u5F80\u5F80\u6709IO\uFF0C\u6216\u8005\u8BF4\u548C\u4E0B\u6E38\u4EFB\u52A1\u6253\u4EA4\u9053\uFF0C\u603B\u4E4B\u5904\u7406\u65F6\u95F4\u7B97\u662F\u6BD4\u8F83\u957F\u7684\uFF0C\u5728\u7EBF\u7A0B\u505A\u4E00\u4EF6\u4EFB\u52A1\u7684\u65F6\u5019\uFF0C\u53EF\u80FD\u672C\u8EAB\u5C31\u8981\u963B\u585E\uFF0C\u5F53\u4E00\u4E2A\u7EBF\u7A0B\u51FA\u73B0\u963B\u585E\u72B6\u6001\u6BD4\u5982\u4E00\u4E2A\u7EBF\u7A0B\u6267\u884C\u4E86IO\u64CD\u4F5C\uFF08IO\u7684\u4E00\u4E2A\u7279\u6027\u5C31\u662F\u963B\u585E\u7B49\u5F85\uFF09\uFF0CCPU\u4E0D\u7528\u7B49\u7740\uFF0C\u53EF\u4EE5\u53BB\u6267\u884C\u53E6\u4E00\u4E2A\u4EFB\u52A1\uFF0C\u5373\u7ED9\u5230\u65F6\u95F4\u7247\u7ED9\u53E6\u4E00\u4E2A\u7EBF\u7A0B\uFF0C\u907F\u514DCPU\u65F6\u95F4\u7684\u6D6A\u8D39\u3002\u63D0\u9AD8cpu\u7684\u5229\u7528\u7387

                                            \u5728Java\u7A0B\u5E8F\u4E2D\uFF0C\u5355\u6838CPU\u7528\u591A\u7EBF\u7A0B\u53EF\u80FD\u6BD4\u5355\u7EBF\u7A0B\u8FD8\u6162\uFF0C\u56E0\u4E3A\u6D89\u53CA\u5230\u4E0A\u4E0B\u6587\u5207\u6362\uFF0C\u8D44\u6E90\u9650\u5236\uFF0C\u6B7B\u9501\u7684\u95EE\u9898\u3002\u5355\u6838cpu\u542F\u7528\u591A\u7EBF\u7A0B\uFF0C\u5728\u5FAE\u89C2\u4E0A\u4ECD\u7136\u662F\u4E32\u884C\u7684\uFF0C\u91C7\u7528\u65F6\u95F4\u7247\u8F6E\u8F6C\u7684\u673A\u5236\uFF0C\u5728\u5B8F\u89C2\u4E0A\u770B\u8D77\u6765\u662F\u5E76\u53D1\u7684\u3002\u591A\u6838CPU\u542F\u7528\u591A\u7EBF\u7A0B\uFF0C\u80FD\u5B9E\u73B0\u771F\u6B63\u5E76\u884C\u6267\u884C\u4EFB\u52A1\u7684\u6548\u679C\u3002

                                            \u963B\u585E\u7684\u4E00\u5B9A\u662F\u7EBF\u7A0B\uFF0C\u56E0\u4E3A\u963B\u585E\u662F\u7EBF\u7A0B\u7684\u72B6\u6001

                                          ',60);function mi(ui,hi){return di}var vi=i(ni,[["render",mi],["__file","redis.html.vue"]]);export{vi as default}; diff --git a/assets/redis.html.f8eb0a54.js b/assets/redis.html.d8140978.js similarity index 97% rename from assets/redis.html.f8eb0a54.js rename to assets/redis.html.d8140978.js index 5cf09391..714745f9 100644 --- a/assets/redis.html.f8eb0a54.js +++ b/assets/redis.html.d8140978.js @@ -1 +1 @@ -const l={key:"v-456aa1eb",path:"/java/%E6%95%B0%E6%8D%AE%E5%BA%93/redis/redis.html",title:"Redis",lang:"zh-CN",frontmatter:{},excerpt:"",headers:[{level:2,title:"NoSQL\u6570\u636E\u5E93\u7B80\u4ECB",slug:"nosql\u6570\u636E\u5E93\u7B80\u4ECB",children:[{level:3,title:"\u6982\u8FF0",slug:"\u6982\u8FF0",children:[]},{level:3,title:"NoSQL\u6570\u636E\u6A21\u578B\u7B80\u4ECB",slug:"nosql\u6570\u636E\u6A21\u578B\u7B80\u4ECB",children:[]},{level:3,title:"NoSQL\u6570\u636E\u5E93\u7684\u56DB\u5927\u5206\u7C7B",slug:"nosql\u6570\u636E\u5E93\u7684\u56DB\u5927\u5206\u7C7B",children:[]},{level:3,title:"NoSQL\u6570\u636E\u5E93CAP\u539F\u7406",slug:"nosql\u6570\u636E\u5E93cap\u539F\u7406",children:[]}]},{level:2,title:"Redis\u7B80\u4ECB",slug:"redis\u7B80\u4ECB",children:[]},{level:2,title:"Redis\u6570\u636E\u7C7B\u578B",slug:"redis\u6570\u636E\u7C7B\u578B",children:[{level:3,title:"\u6570\u636E\u7C7B\u578B\u7684\u4ECB\u7ECD",slug:"\u6570\u636E\u7C7B\u578B\u7684\u4ECB\u7ECD",children:[]},{level:3,title:"string",slug:"string",children:[]},{level:3,title:"hash",slug:"hash",children:[]},{level:3,title:"list",slug:"list",children:[]},{level:3,title:"set\u7C7B\u578B",slug:"set\u7C7B\u578B",children:[]},{level:3,title:"sorted_set",slug:"sorted-set",children:[]}]},{level:2,title:"\u6301\u4E45\u5316",slug:"\u6301\u4E45\u5316",children:[{level:3,title:"\u7B80\u4ECB",slug:"\u7B80\u4ECB",children:[]},{level:3,title:"RDB",slug:"rdb",children:[]},{level:3,title:"AOF",slug:"aof",children:[]}]},{level:2,title:"\u4E8B\u52A1",slug:"\u4E8B\u52A1",children:[]},{level:2,title:"\u9501",slug:"\u9501",children:[]},{level:2,title:"\u5220\u9664\u7B56\u7565",slug:"\u5220\u9664\u7B56\u7565",children:[]},{level:2,title:"\u9010\u51FA\u7B97\u6CD5",slug:"\u9010\u51FA\u7B97\u6CD5",children:[]},{level:2,title:"Redis\u96C6\u7FA4",slug:"redis\u96C6\u7FA4",children:[{level:3,title:"\u4E3B\u4ECE\u590D\u5236",slug:"\u4E3B\u4ECE\u590D\u5236",children:[]},{level:3,title:"\u54E8\u5175",slug:"\u54E8\u5175",children:[]},{level:3,title:"\u96C6\u7FA4",slug:"\u96C6\u7FA4",children:[]}]},{level:2,title:"\u7F13\u5B58\u7684\u95EE\u9898",slug:"\u7F13\u5B58\u7684\u95EE\u9898",children:[{level:3,title:"\u7F13\u5B58\u9884\u70ED",slug:"\u7F13\u5B58\u9884\u70ED",children:[]},{level:3,title:"\u7F13\u5B58\u96EA\u5D29",slug:"\u7F13\u5B58\u96EA\u5D29",children:[]},{level:3,title:"\u7F13\u5B58\u51FB\u7A7F",slug:"\u7F13\u5B58\u51FB\u7A7F",children:[]},{level:3,title:"\u7F13\u5B58\u7A7F\u900F",slug:"\u7F13\u5B58\u7A7F\u900F",children:[]}]},{level:2,title:"\u9762\u8BD5\u95EE\u9898",slug:"\u9762\u8BD5\u95EE\u9898",children:[{level:3,title:"redis\u4E3A\u4EC0\u4E48\u91C7\u7528\u5355\u7EBF\u7A0B",slug:"redis\u4E3A\u4EC0\u4E48\u91C7\u7528\u5355\u7EBF\u7A0B",children:[]}]}],git:{updatedTime:1710173765e3,contributors:[{name:"shailene",email:"64005626+shaileneF@users.noreply.github.com",commits:1}]},filePathRelative:"java/\u6570\u636E\u5E93/redis/redis.md"};export{l as data}; +const l={key:"v-456aa1eb",path:"/java/%E6%95%B0%E6%8D%AE%E5%BA%93/redis/redis.html",title:"Redis",lang:"zh-CN",frontmatter:{},excerpt:"",headers:[{level:2,title:"NoSQL\u6570\u636E\u5E93\u7B80\u4ECB",slug:"nosql\u6570\u636E\u5E93\u7B80\u4ECB",children:[{level:3,title:"\u6982\u8FF0",slug:"\u6982\u8FF0",children:[]},{level:3,title:"NoSQL\u6570\u636E\u6A21\u578B\u7B80\u4ECB",slug:"nosql\u6570\u636E\u6A21\u578B\u7B80\u4ECB",children:[]},{level:3,title:"NoSQL\u6570\u636E\u5E93\u7684\u56DB\u5927\u5206\u7C7B",slug:"nosql\u6570\u636E\u5E93\u7684\u56DB\u5927\u5206\u7C7B",children:[]},{level:3,title:"NoSQL\u6570\u636E\u5E93CAP\u539F\u7406",slug:"nosql\u6570\u636E\u5E93cap\u539F\u7406",children:[]}]},{level:2,title:"Redis\u7B80\u4ECB",slug:"redis\u7B80\u4ECB",children:[]},{level:2,title:"Redis\u6570\u636E\u7C7B\u578B",slug:"redis\u6570\u636E\u7C7B\u578B",children:[{level:3,title:"\u6570\u636E\u7C7B\u578B\u7684\u4ECB\u7ECD",slug:"\u6570\u636E\u7C7B\u578B\u7684\u4ECB\u7ECD",children:[]},{level:3,title:"string",slug:"string",children:[]},{level:3,title:"hash",slug:"hash",children:[]},{level:3,title:"list",slug:"list",children:[]},{level:3,title:"set\u7C7B\u578B",slug:"set\u7C7B\u578B",children:[]},{level:3,title:"sorted_set",slug:"sorted-set",children:[]}]},{level:2,title:"\u6301\u4E45\u5316",slug:"\u6301\u4E45\u5316",children:[{level:3,title:"\u7B80\u4ECB",slug:"\u7B80\u4ECB",children:[]},{level:3,title:"RDB",slug:"rdb",children:[]},{level:3,title:"AOF",slug:"aof",children:[]}]},{level:2,title:"\u4E8B\u52A1",slug:"\u4E8B\u52A1",children:[]},{level:2,title:"\u9501",slug:"\u9501",children:[]},{level:2,title:"\u5220\u9664\u7B56\u7565",slug:"\u5220\u9664\u7B56\u7565",children:[]},{level:2,title:"\u9010\u51FA\u7B97\u6CD5",slug:"\u9010\u51FA\u7B97\u6CD5",children:[]},{level:2,title:"Redis\u96C6\u7FA4",slug:"redis\u96C6\u7FA4",children:[{level:3,title:"\u4E3B\u4ECE\u590D\u5236",slug:"\u4E3B\u4ECE\u590D\u5236",children:[]},{level:3,title:"\u54E8\u5175",slug:"\u54E8\u5175",children:[]},{level:3,title:"\u96C6\u7FA4",slug:"\u96C6\u7FA4",children:[]}]},{level:2,title:"\u7F13\u5B58\u7684\u95EE\u9898",slug:"\u7F13\u5B58\u7684\u95EE\u9898",children:[{level:3,title:"\u7F13\u5B58\u9884\u70ED",slug:"\u7F13\u5B58\u9884\u70ED",children:[]},{level:3,title:"\u7F13\u5B58\u96EA\u5D29",slug:"\u7F13\u5B58\u96EA\u5D29",children:[]},{level:3,title:"\u7F13\u5B58\u51FB\u7A7F",slug:"\u7F13\u5B58\u51FB\u7A7F",children:[]},{level:3,title:"\u7F13\u5B58\u7A7F\u900F",slug:"\u7F13\u5B58\u7A7F\u900F",children:[]}]},{level:2,title:"\u9762\u8BD5\u95EE\u9898",slug:"\u9762\u8BD5\u95EE\u9898",children:[{level:3,title:"redis\u4E3A\u4EC0\u4E48\u91C7\u7528\u5355\u7EBF\u7A0B",slug:"redis\u4E3A\u4EC0\u4E48\u91C7\u7528\u5355\u7EBF\u7A0B",children:[]}]}],git:{updatedTime:1710173784e3,contributors:[{name:"shailene",email:"64005626+shaileneF@users.noreply.github.com",commits:1}]},filePathRelative:"java/\u6570\u636E\u5E93/redis/redis.md"};export{l as data}; diff --git a/assets/spring.html.7e52750f.js b/assets/spring.html.b4a95f59.js similarity index 98% rename from assets/spring.html.7e52750f.js rename to assets/spring.html.b4a95f59.js index efa445bd..1e9b9a57 100644 --- a/assets/spring.html.7e52750f.js +++ b/assets/spring.html.b4a95f59.js @@ -1 +1 @@ -const l={key:"v-21b5c2ea",path:"/java/%E6%A1%86%E6%9E%B6/spring/spring.html",title:"Spring",lang:"zh-CN",frontmatter:{},excerpt:"",headers:[{level:2,title:"\u7B2C\u4E00\u7AE0\uFF1ASpring \u6982\u5FF5",slug:"\u7B2C\u4E00\u7AE0-spring-\u6982\u5FF5",children:[{level:3,title:"Spring\u6846\u67B6\u6982\u8FF0",slug:"spring\u6846\u67B6\u6982\u8FF0",children:[]}]},{level:2,title:"\u7B2C\u4E8C\u7AE0\uFF1AIoC\u63A7\u5236\u53CD\u8F6C",slug:"\u7B2C\u4E8C\u7AE0-ioc\u63A7\u5236\u53CD\u8F6C",children:[{level:3,title:"\u6982\u8FF0",slug:"\u6982\u8FF0",children:[]},{level:3,title:"Spring\u901A\u8FC7IoC\u521B\u5EFA\u5BF9\u8C61\u7684\u5B9E\u73B0\u6B65\u9AA4",slug:"spring\u901A\u8FC7ioc\u521B\u5EFA\u5BF9\u8C61\u7684\u5B9E\u73B0\u6B65\u9AA4",children:[{level:4,title:"\u603B\u4F53\u6B65\u9AA4",slug:"\u603B\u4F53\u6B65\u9AA4",children:[]},{level:4,title:"\u521B\u5EFAspring\u9700\u8981\u4F7F\u7528\u7684\u914D\u7F6E\u6587\u4EF6",slug:"\u521B\u5EFAspring\u9700\u8981\u4F7F\u7528\u7684\u914D\u7F6E\u6587\u4EF6",children:[]},{level:4,title:"\u901A\u8FC7IoC\u521B\u5EFA\u5BF9\u8C61\u5728Java\u4EE3\u7801\u4E2D\u7684\u6B65\u9AA4",slug:"\u901A\u8FC7ioc\u521B\u5EFA\u5BF9\u8C61\u5728java\u4EE3\u7801\u4E2D\u7684\u6B65\u9AA4",children:[]}]},{level:3,title:"\u57FA\u4E8EXML\u7684\u4F9D\u8D56\u6CE8\u5165\uFF08DI\uFF09",slug:"\u57FA\u4E8Exml\u7684\u4F9D\u8D56\u6CE8\u5165-di",children:[{level:4,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-1",children:[]},{level:4,title:"set\u6CE8\u5165",slug:"set\u6CE8\u5165",children:[{level:5,title:"1. \u7B80\u5355\u7C7B\u578B\u7684set\u6CE8\u5165",slug:"_1-\u7B80\u5355\u7C7B\u578B\u7684set\u6CE8\u5165",children:[]},{level:5,title:"2. \u5F15\u7528\u7C7B\u578B\u7684set\u6CE8\u5165",slug:"_2-\u5F15\u7528\u7C7B\u578B\u7684set\u6CE8\u5165",children:[]},{level:5,title:"3.set\u6CE8\u5165\u7684\u6CE8\u610F\u4E8B\u9879",slug:"_3-set\u6CE8\u5165\u7684\u6CE8\u610F\u4E8B\u9879",children:[]}]},{level:4,title:"\u6784\u9020\u6CE8\u5165",slug:"\u6784\u9020\u6CE8\u5165",children:[]},{level:4,title:"\u5F15\u7528\u7C7B\u578B\u5C5E\u6027\u81EA\u52A8\u6CE8\u5165",slug:"\u5F15\u7528\u7C7B\u578B\u5C5E\u6027\u81EA\u52A8\u6CE8\u5165",children:[]},{level:4,title:"\u591A\u4E2A\u914D\u7F6E\u6587\u4EF6",slug:"\u591A\u4E2A\u914D\u7F6E\u6587\u4EF6",children:[]}]},{level:3,title:"\u57FA\u4E8E\u6CE8\u89E3\u7684\u4F9D\u8D56\u6CE8\u5165\uFF08DI\uFF09",slug:"\u57FA\u4E8E\u6CE8\u89E3\u7684\u4F9D\u8D56\u6CE8\u5165-di",children:[{level:4,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-2",children:[]},{level:4,title:"\u4F7F\u7528\u6CE8\u89E3\u7684\u6B65\u9AA4",slug:"\u4F7F\u7528\u6CE8\u89E3\u7684\u6B65\u9AA4",children:[]},{level:4,title:"\u91CD\u8981\u6CE8\u89E3",slug:"\u91CD\u8981\u6CE8\u89E3",children:[]},{level:4,title:"\u6307\u5B9A\u591A\u4E2A\u5305\u7684\u4E09\u79CD\u65B9\u5F0F",slug:"\u6307\u5B9A\u591A\u4E2A\u5305\u7684\u4E09\u79CD\u65B9\u5F0F",children:[]}]},{level:3,title:"IoC\u603B\u7ED3",slug:"ioc\u603B\u7ED3",children:[]}]},{level:2,title:"\u7B2C\u4E09\u7AE0\uFF1AAOP\u9762\u5411\u5207\u9762\u7F16\u7A0B",slug:"\u7B2C\u4E09\u7AE0-aop\u9762\u5411\u5207\u9762\u7F16\u7A0B",children:[{level:3,title:"\u52A8\u6001\u4EE3\u7406",slug:"\u52A8\u6001\u4EE3\u7406",children:[]},{level:3,title:"AOP\u7F16\u7A0B\u672F\u8BED",slug:"aop\u7F16\u7A0B\u672F\u8BED",children:[]},{level:3,title:"AOP\u7684\u5B9E\u73B0",slug:"aop\u7684\u5B9E\u73B0",children:[]},{level:3,title:"aspectj\u5B9E\u73B0aop\u7684\u6B65\u9AA4",slug:"aspectj\u5B9E\u73B0aop\u7684\u6B65\u9AA4",children:[{level:4,title:"AspectJ\u57FA\u4E8E\u6CE8\u89E3\u7684AOP\u5B9E\u73B0",slug:"aspectj\u57FA\u4E8E\u6CE8\u89E3\u7684aop\u5B9E\u73B0",children:[]},{level:4,title:"aspectj\u6846\u67B6\u7684\u51E0\u79CD\u6CE8\u89E3\u548C\u53C2\u6570",slug:"aspectj\u6846\u67B6\u7684\u51E0\u79CD\u6CE8\u89E3\u548C\u53C2\u6570",children:[]}]}]},{level:2,title:"\u7B2C\u56DB\u7AE0\uFF1ASpring\u96C6\u6210MyBatis",slug:"\u7B2C\u56DB\u7AE0-spring\u96C6\u6210mybatis",children:[{level:3,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-3",children:[]},{level:3,title:"spring\u548Cmybatis\u96C6\u6210\u6B65\u9AA4",slug:"spring\u548Cmybatis\u96C6\u6210\u6B65\u9AA4",children:[]},{level:3,title:"spring\u7684\u914D\u7F6E\u6587\u4EF6",slug:"spring\u7684\u914D\u7F6E\u6587\u4EF6",children:[]}]},{level:2,title:"\u7B2C\u4E94\u7AE0\uFF1A\u4E8B\u52A1\u7BA1\u7406",slug:"\u7B2C\u4E94\u7AE0-\u4E8B\u52A1\u7BA1\u7406",children:[{level:3,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-4",children:[]},{level:3,title:"spring\u7684\u4E8B\u52A1\u5904\u7406\u5B9E\u73B0",slug:"spring\u7684\u4E8B\u52A1\u5904\u7406\u5B9E\u73B0",children:[]},{level:3,title:"spring\u6846\u67B6\u4E2D\u63D0\u4F9B\u7684\u4E8B\u52A1\u5904\u7406\u65B9\u6848",slug:"spring\u6846\u67B6\u4E2D\u63D0\u4F9B\u7684\u4E8B\u52A1\u5904\u7406\u65B9\u6848",children:[{level:4,title:"1. \u4E2D\u5C0F\u578B\u9879\u76EE @Transactional---spring\u81EA\u5DF1\u5B9E\u73B0\u7684aop",slug:"_1-\u4E2D\u5C0F\u578B\u9879\u76EE-transactional-spring\u81EA\u5DF1\u5B9E\u73B0\u7684aop",children:[]},{level:4,title:"2. \u5927\u578B\u9879\u76EE---AspectJ\u5B9E\u73B0AOP\uFF0C\u57FA\u4E8E\u914D\u7F6E\u7BA1\u7406\u4E8B\u52A1",slug:"_2-\u5927\u578B\u9879\u76EE-aspectj\u5B9E\u73B0aop-\u57FA\u4E8E\u914D\u7F6E\u7BA1\u7406\u4E8B\u52A1",children:[]}]}]},{level:2,title:"\u7B2C\u516D\u7AE0\uFF1A\u5728web\u9879\u76EE\u4E2D\u4F7F\u7528\u5BB9\u5668\u5BF9\u8C61",slug:"\u7B2C\u516D\u7AE0-\u5728web\u9879\u76EE\u4E2D\u4F7F\u7528\u5BB9\u5668\u5BF9\u8C61",children:[]}],git:{updatedTime:1710173765e3,contributors:[{name:"shailene",email:"64005626+shaileneF@users.noreply.github.com",commits:1}]},filePathRelative:"java/\u6846\u67B6/spring/spring.md"};export{l as data}; +const l={key:"v-21b5c2ea",path:"/java/%E6%A1%86%E6%9E%B6/spring/spring.html",title:"Spring",lang:"zh-CN",frontmatter:{},excerpt:"",headers:[{level:2,title:"\u7B2C\u4E00\u7AE0\uFF1ASpring \u6982\u5FF5",slug:"\u7B2C\u4E00\u7AE0-spring-\u6982\u5FF5",children:[{level:3,title:"Spring\u6846\u67B6\u6982\u8FF0",slug:"spring\u6846\u67B6\u6982\u8FF0",children:[]}]},{level:2,title:"\u7B2C\u4E8C\u7AE0\uFF1AIoC\u63A7\u5236\u53CD\u8F6C",slug:"\u7B2C\u4E8C\u7AE0-ioc\u63A7\u5236\u53CD\u8F6C",children:[{level:3,title:"\u6982\u8FF0",slug:"\u6982\u8FF0",children:[]},{level:3,title:"Spring\u901A\u8FC7IoC\u521B\u5EFA\u5BF9\u8C61\u7684\u5B9E\u73B0\u6B65\u9AA4",slug:"spring\u901A\u8FC7ioc\u521B\u5EFA\u5BF9\u8C61\u7684\u5B9E\u73B0\u6B65\u9AA4",children:[{level:4,title:"\u603B\u4F53\u6B65\u9AA4",slug:"\u603B\u4F53\u6B65\u9AA4",children:[]},{level:4,title:"\u521B\u5EFAspring\u9700\u8981\u4F7F\u7528\u7684\u914D\u7F6E\u6587\u4EF6",slug:"\u521B\u5EFAspring\u9700\u8981\u4F7F\u7528\u7684\u914D\u7F6E\u6587\u4EF6",children:[]},{level:4,title:"\u901A\u8FC7IoC\u521B\u5EFA\u5BF9\u8C61\u5728Java\u4EE3\u7801\u4E2D\u7684\u6B65\u9AA4",slug:"\u901A\u8FC7ioc\u521B\u5EFA\u5BF9\u8C61\u5728java\u4EE3\u7801\u4E2D\u7684\u6B65\u9AA4",children:[]}]},{level:3,title:"\u57FA\u4E8EXML\u7684\u4F9D\u8D56\u6CE8\u5165\uFF08DI\uFF09",slug:"\u57FA\u4E8Exml\u7684\u4F9D\u8D56\u6CE8\u5165-di",children:[{level:4,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-1",children:[]},{level:4,title:"set\u6CE8\u5165",slug:"set\u6CE8\u5165",children:[{level:5,title:"1. \u7B80\u5355\u7C7B\u578B\u7684set\u6CE8\u5165",slug:"_1-\u7B80\u5355\u7C7B\u578B\u7684set\u6CE8\u5165",children:[]},{level:5,title:"2. \u5F15\u7528\u7C7B\u578B\u7684set\u6CE8\u5165",slug:"_2-\u5F15\u7528\u7C7B\u578B\u7684set\u6CE8\u5165",children:[]},{level:5,title:"3.set\u6CE8\u5165\u7684\u6CE8\u610F\u4E8B\u9879",slug:"_3-set\u6CE8\u5165\u7684\u6CE8\u610F\u4E8B\u9879",children:[]}]},{level:4,title:"\u6784\u9020\u6CE8\u5165",slug:"\u6784\u9020\u6CE8\u5165",children:[]},{level:4,title:"\u5F15\u7528\u7C7B\u578B\u5C5E\u6027\u81EA\u52A8\u6CE8\u5165",slug:"\u5F15\u7528\u7C7B\u578B\u5C5E\u6027\u81EA\u52A8\u6CE8\u5165",children:[]},{level:4,title:"\u591A\u4E2A\u914D\u7F6E\u6587\u4EF6",slug:"\u591A\u4E2A\u914D\u7F6E\u6587\u4EF6",children:[]}]},{level:3,title:"\u57FA\u4E8E\u6CE8\u89E3\u7684\u4F9D\u8D56\u6CE8\u5165\uFF08DI\uFF09",slug:"\u57FA\u4E8E\u6CE8\u89E3\u7684\u4F9D\u8D56\u6CE8\u5165-di",children:[{level:4,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-2",children:[]},{level:4,title:"\u4F7F\u7528\u6CE8\u89E3\u7684\u6B65\u9AA4",slug:"\u4F7F\u7528\u6CE8\u89E3\u7684\u6B65\u9AA4",children:[]},{level:4,title:"\u91CD\u8981\u6CE8\u89E3",slug:"\u91CD\u8981\u6CE8\u89E3",children:[]},{level:4,title:"\u6307\u5B9A\u591A\u4E2A\u5305\u7684\u4E09\u79CD\u65B9\u5F0F",slug:"\u6307\u5B9A\u591A\u4E2A\u5305\u7684\u4E09\u79CD\u65B9\u5F0F",children:[]}]},{level:3,title:"IoC\u603B\u7ED3",slug:"ioc\u603B\u7ED3",children:[]}]},{level:2,title:"\u7B2C\u4E09\u7AE0\uFF1AAOP\u9762\u5411\u5207\u9762\u7F16\u7A0B",slug:"\u7B2C\u4E09\u7AE0-aop\u9762\u5411\u5207\u9762\u7F16\u7A0B",children:[{level:3,title:"\u52A8\u6001\u4EE3\u7406",slug:"\u52A8\u6001\u4EE3\u7406",children:[]},{level:3,title:"AOP\u7F16\u7A0B\u672F\u8BED",slug:"aop\u7F16\u7A0B\u672F\u8BED",children:[]},{level:3,title:"AOP\u7684\u5B9E\u73B0",slug:"aop\u7684\u5B9E\u73B0",children:[]},{level:3,title:"aspectj\u5B9E\u73B0aop\u7684\u6B65\u9AA4",slug:"aspectj\u5B9E\u73B0aop\u7684\u6B65\u9AA4",children:[{level:4,title:"AspectJ\u57FA\u4E8E\u6CE8\u89E3\u7684AOP\u5B9E\u73B0",slug:"aspectj\u57FA\u4E8E\u6CE8\u89E3\u7684aop\u5B9E\u73B0",children:[]},{level:4,title:"aspectj\u6846\u67B6\u7684\u51E0\u79CD\u6CE8\u89E3\u548C\u53C2\u6570",slug:"aspectj\u6846\u67B6\u7684\u51E0\u79CD\u6CE8\u89E3\u548C\u53C2\u6570",children:[]}]}]},{level:2,title:"\u7B2C\u56DB\u7AE0\uFF1ASpring\u96C6\u6210MyBatis",slug:"\u7B2C\u56DB\u7AE0-spring\u96C6\u6210mybatis",children:[{level:3,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-3",children:[]},{level:3,title:"spring\u548Cmybatis\u96C6\u6210\u6B65\u9AA4",slug:"spring\u548Cmybatis\u96C6\u6210\u6B65\u9AA4",children:[]},{level:3,title:"spring\u7684\u914D\u7F6E\u6587\u4EF6",slug:"spring\u7684\u914D\u7F6E\u6587\u4EF6",children:[]}]},{level:2,title:"\u7B2C\u4E94\u7AE0\uFF1A\u4E8B\u52A1\u7BA1\u7406",slug:"\u7B2C\u4E94\u7AE0-\u4E8B\u52A1\u7BA1\u7406",children:[{level:3,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-4",children:[]},{level:3,title:"spring\u7684\u4E8B\u52A1\u5904\u7406\u5B9E\u73B0",slug:"spring\u7684\u4E8B\u52A1\u5904\u7406\u5B9E\u73B0",children:[]},{level:3,title:"spring\u6846\u67B6\u4E2D\u63D0\u4F9B\u7684\u4E8B\u52A1\u5904\u7406\u65B9\u6848",slug:"spring\u6846\u67B6\u4E2D\u63D0\u4F9B\u7684\u4E8B\u52A1\u5904\u7406\u65B9\u6848",children:[{level:4,title:"1. \u4E2D\u5C0F\u578B\u9879\u76EE @Transactional---spring\u81EA\u5DF1\u5B9E\u73B0\u7684aop",slug:"_1-\u4E2D\u5C0F\u578B\u9879\u76EE-transactional-spring\u81EA\u5DF1\u5B9E\u73B0\u7684aop",children:[]},{level:4,title:"2. \u5927\u578B\u9879\u76EE---AspectJ\u5B9E\u73B0AOP\uFF0C\u57FA\u4E8E\u914D\u7F6E\u7BA1\u7406\u4E8B\u52A1",slug:"_2-\u5927\u578B\u9879\u76EE-aspectj\u5B9E\u73B0aop-\u57FA\u4E8E\u914D\u7F6E\u7BA1\u7406\u4E8B\u52A1",children:[]}]}]},{level:2,title:"\u7B2C\u516D\u7AE0\uFF1A\u5728web\u9879\u76EE\u4E2D\u4F7F\u7528\u5BB9\u5668\u5BF9\u8C61",slug:"\u7B2C\u516D\u7AE0-\u5728web\u9879\u76EE\u4E2D\u4F7F\u7528\u5BB9\u5668\u5BF9\u8C61",children:[]}],git:{updatedTime:1710173784e3,contributors:[{name:"shailene",email:"64005626+shaileneF@users.noreply.github.com",commits:1}]},filePathRelative:"java/\u6846\u67B6/spring/spring.md"};export{l as data}; diff --git a/assets/spring.html.d98785fc.js b/assets/spring.html.e77939c3.js similarity index 99% rename from assets/spring.html.d98785fc.js rename to assets/spring.html.e77939c3.js index 0ce80899..6dc05d96 100644 --- a/assets/spring.html.d98785fc.js +++ b/assets/spring.html.e77939c3.js @@ -1,4 +1,4 @@ -import{_ as n,e as a}from"./app.0d029894.js";var s="/study/assets/image-20210913172634214.099034b8.png",t="/study/assets/image-20210820161439568.c766732a.png",p="/study/assets/image-20210913180612194.86f6f78d.png",o="/study/assets/image-20210912214209011.3bd39a1b.png",e="/study/assets/image-20211231213322621.361e0b9d.png",l="/study/assets/image-20210913205505062.8b5e7731.png",c="/study/assets/image-20210914141532997.787552e5.png",i="/study/assets/image-20210914141854791.a2ba4f0d.png",u="/study/assets/image-20210914135813503.3286f3a6.png",r="/study/assets/image-20210914155725037.c25e6599.png",k="/study/assets/image-20210914161402217.9eb201ce.png",g="/study/assets/image-20210914161928143.130b737e.png",m="/study/assets/image-20220101163100726.6e91a800.png",d="/study/assets/image-20210914164717403.62335ee7.png",v="/study/assets/image-20210914165054779.e8bfc54d.png",y="/study/assets/image-20210914165406757.fd681be7.png",q="/study/assets/image-20220101164217927.cbcad780.png",b="/study/assets/image-20210914170534218.bf134c09.png",h="/study/assets/image-20210914185104374.b1e72428.png",x="/study/assets/image-20210915144734649.4f36e089.png",S="/study/assets/image-20210915145208219.5869e448.png",f="/study/assets/image-20210915145224129.5abe73b2.png",w="/study/assets/image-20210915171254252.cddac429.png",I="/study/assets/image-20210915171535746.2c16fd99.png",_="/study/assets/image-20210915173011593.8c826cd2.png",j="/study/assets/image-20210915173119067.017e4db1.png",A="/study/assets/image-20210915173256547.6e422433.png",C="/study/assets/image-20210915202014308.7324d149.png",P="/study/assets/image-20210915202317516.d3ddf7eb.png",O="/study/assets/image-20210915202930102.92610496.png",T="/study/assets/image-20210915203044632.61a76a2a.png",D="/study/assets/image-20210915205025934.eab06104.png",M="/study/assets/image-20210915205640183.bda81bdf.png",E="/study/assets/image-20220103151659626.bddc4150.png",R="/study/assets/image-20210915210756808.1a37ba95.png",J="/study/assets/image-20210917211042496.1393e26f.png",N="/study/assets/image-20220103172512509.4c4d1262.png",B="/study/assets/image-20210918000618311.68e97631.png",F="/study/assets/image-20210918000851651.00e7c62f.png",G="/study/assets/image-20210918001051062.a6a89749.png",H="/study/assets/image-20210918002432273.06fa7933.png",L="/study/assets/image-20210918020320640.8d2fc58c.png",U="/study/assets/image-20210918020555438.de7f4326.png",X="/study/assets/image-20210918020706229.5370b248.png",Q="/study/assets/image-20210918021222839.20498914.png",V="/study/assets/image-20210918154449165.3e91cd5a.png",$="/study/assets/image-20210918171200551.40cb41d3.png",W="/study/assets/image-20210918174507560.1c837099.png",Y="/study/assets/image-20210918182446699.da3c4737.png",z="/study/assets/image-20220103214831001.f88a2a76.png",K="/study/assets/image-20210918183205489.3ae66716.png",Z="/study/assets/image-20210918183317069.a1ce059d.png",nn="/study/assets/image-20210918183544691.a2d8717e.png",an="/study/assets/image-20210918183810733.6cc847c9.png";const sn={},tn=a('

                                          Spring

                                          \u7B2C\u4E00\u7AE0\uFF1ASpring \u6982\u5FF5

                                          Spring\u6846\u67B6\u6982\u8FF0

                                          1. Spring\u662F\u8F7B\u91CF\u7EA7\u7684\u5F00\u6E90\u7684JavaEE\u6846\u67B6

                                            \u89E3\u51B3\u4F01\u4E1A\u5F00\u53D1\u7684\u96BE\u5EA6\uFF0C\u51CF\u8F7B\u5BF9\u9879\u76EE\u6A21\u5757\u4E4B\u95F4\u7684\u7BA1\u7406\uFF0C\u7C7B\u548C\u7C7B\u4E4B\u95F4\u7684\u7BA1\u7406\uFF0C\u4EA4\u7ED9Spring\u6765\u5904\u7406\uFF0C\u5E2E\u52A9\u5F00\u53D1\u4EBA\u5458\u521B\u5EFA\u5BF9\u8C61\uFF0C\u7BA1\u7406\u5BF9\u8C61\u4E4B\u95F4\u7684\u5173\u7CFB

                                          2. spring\u7684\u76EE\u7684\u5C31\u662F\u89E3\u8026\u5408\uFF0C\u8BA9\u5173\u7CFB\u53D8\u5F97\u677E\u6563\u3002\u4E00\u4E2A\u6A21\u5757\u7684\u53D8\u5316\u5BF9\u53E6\u4E00\u4E2A\u6A21\u5757\u5F71\u54CD\u6700\u5C0F\uFF01\uFF01

                                          3. \u4F9D\u8D56\uFF1A\u7C7BA\u4E2D\u4F7F\u7528\u7C7BB\u7684\u5C5E\u6027\u6216\u65B9\u6CD5\uFF0C\u53EB\u505AA\u4F9D\u8D56\u4E8EB\u3002

                                          4. \u6846\u67B6\u5C31\u662F\u534A\u6210\u54C1\uFF0C\u9700\u8981\u7ED3\u5408\u6846\u67B6\uFF0C\u52A0\u4E0A\u6211\u4EEC\u81EA\u5DF1\u7684\u4EE3\u7801\uFF0C\u6765\u5B8C\u6210\u5F00\u53D1\u3002

                                            \u6846\u67B6\u63D0\u4F9B\u4E86\u5F88\u591A\u5DE5\u5177\uFF0C\u73B0\u6709\u7684\u5DE5\u5177\u548C\u529F\u80FD\uFF0C\u7EC4\u4EF6

                                            \u6211\u4EEC\u5728\u6846\u67B6\u7684\u57FA\u7840\u4E4B\u4E0A\u8FDB\u884C\u5F00\u53D1\uFF0C\u81EA\u5DF1\u5199\u7684\u9879\u76EE\u7684\u529F\u80FD\uFF0C\u53EF\u5229\u7528\u6846\u67B6\u4E2D\u5DF2\u6709\u7684\u529F\u80FD

                                            \u8981\u7528\u6846\u67B6\uFF0C\u90A3\u4E48\u9700\u8981\u8FDB\u884Cjar\u5305\u7684\u5BFC\u5165\uFF0C\u4F9D\u8D56\u7684\u6DFB\u52A0\u3002\u800CSpring\u6846\u67B6\u9700\u8981\u6211\u4EEC\u6DFB\u52A0\u7684\u4F9D\u8D56\u5F88\u5C11\uFF0C\u6240\u4EE5\u662F\u8F7B\u91CF\u7EA7\u7684\uFF0C\u540C\u7406\uFF0CMybatis\u4E5F\u662F\u8F7B\u91CF\u7EA7\u7684\uFF0C\u56E0\u4E3A\u6DFB\u52A0\u7684\u4F9D\u8D56\u5F88\u5C11\uFF0C\u914D\u7F6E\u7B80\u5355\u3002

                                            spring\u6846\u67B6\u8FD0\u884C\u5360\u7528\u7684\u8D44\u6E90\u5C11\uFF0C\u8FD0\u884C\u6548\u7387\u9AD8\uFF0C\u4E0D\u4F9D\u8D56\u5176\u4ED6jar\uFF0CSpring\u6838\u5FC3\u529F\u80FD\u7684\u6240\u9700jar\u603B\u5171\u57283M\u5DE6\u53F3

                                          5. \u6846\u67B6\u8981\u5B8C\u6210\u4E00\u4E2A\u529F\u80FD\uFF0C\u9700\u8981\u4E00\u5B9A\u7684\u6B65\u9AA4\u652F\u6301\u7684\u3002

                                          6. Spring\u7684\u76EE\u7684\u662F\u89E3\u51B3\u4F01\u4E1A\u5E94\u7528\u5F00\u53D1\u7684\u590D\u6742\u6027\u3002

                                          7. Spring\u6709\u5F88\u591A\u7EC4\u6210\u90E8\u5206\uFF0C\u4F46\u662F\u6709\u4E24\u4E2A\u6838\u5FC3\u7EC4\u6210\u90E8\u5206

                                            • IOC

                                              \u63A7\u5236\u53CD\u8F6C\uFF0C\u4E4B\u524D\u539F\u59CB\u65B9\u5F0F\u521B\u5EFA\u5BF9\u8C61\uFF0C\u9700\u8981new\u4E00\u4E2A\u7C7B\uFF0C\u628A\u5BF9\u8C61\u521B\u5EFA\uFF0C\u6216\u8005\u8FD8\u6709\u53CD\u5C04\u7684new Instance\uFF0C\u53CD\u5C04\u901A\u8FC7\u6784\u9020\u5668\u521B\u5EFA\u3002\u73B0\u5728\u901A\u8FC7IOC\uFF0C\u628A\u521B\u5EFA\u5BF9\u8C61\u7684\u8FC7\u7A0B\u4EA4\u7ED9Spring\u8FDB\u884C\u7BA1\u7406

                                            • AOP

                                              \u9762\u5411\u5207\u9762\uFF08\u9762\u5411\u65B9\u9762\uFF09,\u6BD4\u5982\u5728\u7A0B\u5E8F\u4E2D\u60F3\u52A0\u529F\u80FD\u6216\u8005\u6269\u5C55\u529F\u80FD\uFF0C\u5728\u4E0D\u4FEE\u6539\u539F\u4EE3\u7801\u7684\u60C5\u51B5\u4E0B\uFF0C\u8FDB\u884C\u529F\u80FD\u7684\u589E\u5F3A\u3002\u4E0D\u6539\u539F\u4EE3\u7801

                                          8. Spring\u6846\u67B6\u7684\u7279\u70B9

                                            • \u8F7B\u91CF\u7EA7

                                            • \u65B9\u4FBF\u89E3\u8026\uFF0C\u7B80\u5316\u5F00\u53D1\uFF0C\u9488\u5BF9\u63A5\u53E3\u7F16\u7A0B

                                            • AOP\u7F16\u7A0B\u652F\u6301\uFF0C\u4E0D\u6539\u53D8\u539F\u4EE3\u7801\u7684\u65B9\u5F0F\uFF0C\u8FDB\u884C\u529F\u80FD\u7684\u589E\u5F3A

                                            • \u65B9\u4FBF\u7A0B\u5E8F\u7684\u6D4B\u8BD5

                                            • \u65B9\u4FBF\u96C6\u6210\u5404\u79CD\u4F18\u79C0\u6846\u67B6

                                          9. Spring\u7684\u6838\u5FC3\u6280\u672F\uFF0Cioc\u3001aop\u5B9E\u73B0\u6A21\u5757\u4E4B\u95F4\u3001\u7C7B\u4E4B\u95F4\u7684\u89E3\u8026\u5408\uFF0C\u6240\u4EE5aop\u624D\u80FD\u652F\u6301\u5728\u4E0D\u6539\u53D8\u539F\u4EE3\u7801\u7684\u65B9\u5F0F\u8FDB\u884C\u529F\u80FD\u589E\u5F3A\u3002

                                          10. SpringFramework\u5185\u90E8\u6A21\u5757

                                            • \u6570\u636E\u8BBF\u95EE\u6A21\u5757
                                            • web\u5E94\u7528\u6A21\u5757
                                            • AOP\u6A21\u5757
                                            • \u96C6\u6210\u529F\u80FD\u6A21\u5757
                                            • IOC\u6838\u5FC3\u5BB9\u6613\u6A21\u5757
                                            • \u6D4B\u8BD5\u6A21\u5757

                                            image-20210913172634214

                                          \u7B2C\u4E8C\u7AE0\uFF1AIoC\u63A7\u5236\u53CD\u8F6C

                                          \u6982\u8FF0

                                          1. IoC---Inversion of Control\uFF0C\u63A7\u5236\u53CD\u8F6C\uFF0C\u662F\u4E00\u4E2A\u6982\u5FF5\uFF0C\u4E00\u4E2A\u601D\u60F3

                                            \u6307\u5C06\u4F20\u7EDF\u4E0A\u7531\u7A0B\u5E8F\u4EE3\u7801\u76F4\u63A5\u64CD\u63A7\u7684\u5BF9\u8C61\u8C03\u7528\u6743\u4EA4\u7ED9\u4EE3\u7801\u4E4B\u5916\u7684\u5BB9\u5668\uFF08\u8FD9\u4E2A\u5BB9\u5668\u5728Java\u4EE3\u7801\u4E2D\u9700\u8981\u88AB\u521B\u5EFA\u51FA\u6765\uFF09\uFF0C\u901A\u8FC7\u5916\u90E8\u5BB9\u5668\u6765\u5B9E\u73B0\u5BF9\u8C61\u7684\u88C5\u914D\u548C\u7BA1\u7406\u3002

                                            \u63A7\u5236\u53CD\u8F6C\u5C31\u662F\u5BF9\u5BF9\u8C61\u63A7\u5236\u6743\u7684\u8F6C\u79FB\uFF0C\u4ECE\u7A0B\u5E8F\u4EE3\u7801\u672C\u8EAB\u53CD\u8F6C\u5230\u4E86\u5916\u90E8\u5BB9\u5668\u3002

                                            \u901A\u8FC7\u5BB9\u5668\u5B9E\u73B0\u5BF9\u8C61\u7684\u521B\u5EFA\uFF0C\u5C5E\u6027\u8D4B\u503C\uFF0C\u4F9D\u8D56\u7684\u7BA1\u7406\uFF08\u5BF9\u8C61\u4E4B\u95F4\u7684\u5173\u7CFB\u7BA1\u7406\uFF09

                                          2. IOC\u63CF\u8FF0\u7684\uFF1A\u628A\u5BF9\u8C61\u7684\u521B\u5EFA\u3001\u5C5E\u6027\u8D4B\u503C\u3001\u7BA1\u7406\u5DE5\u4F5C\u90FD\u4EA4\u7ED9\u4EE3\u7801\u4E4B\u5916\u7684\u5BB9\u5668\u5B9E\u73B0\u3002

                                          3. spring\u5BB9\u5668\u4E2D\u7684\u5BF9\u8C61\u9ED8\u8BA4\u90FD\u662F\u5355\u4F8B\u7684\uFF0C\u5728\u5BB9\u5668\u4E2D\u53EB\u8FD9\u4E2A\u540D\u79F0\u7684\u5BF9\u8C61\u53EA\u6709\u4E00\u4E2A\u3002

                                          4. IoC\u662F\u4E00\u79CD\u6982\u5FF5\uFF0C\u4E00\u79CD\u601D\u60F3\uFF0C\u5176\u5B9E\u73B0\u65B9\u5F0F\u591A\u79CD\u591A\u6837\uFF0C\u5F53\u524D\u6BD4\u8F83\u6D41\u884C\u7684\u5B9E\u73B0\u65B9\u5F0F\u662F\u4F9D\u8D56\u6CE8\u5165

                                          5. \u4F9D\u8D56\uFF1A

                                            classA\u4E2D\u542B\u6709classB\u7684\u5B9E\u4F8B\uFF0C\u5728classA\u4E2D\u8C03\u7528classB\u7684\u65B9\u6CD5\u5B8C\u6210\u529F\u80FD\uFF0C\u5373classA\u5BF9classB\u6709\u4F9D\u8D56\u3002

                                          6. \u63A7\u5236\u53CD\u8F6C

                                            \u63A7\u5236\uFF1A\u521B\u5EFA\u5BF9\u8C61\uFF0C\u5BF9\u8C61\u7684\u5C5E\u6027\u8D4B\u503C\uFF0C\u5BF9\u8C61\u4E4B\u95F4\u7684\u5173\u7CFB\u7BA1\u7406

                                            \u53CD\u8F6C\uFF1A\u7531\u4EE3\u7801\u5B9E\u73B0\u63A7\u5236\uFF0C\u4EA4\u7ED9\u5916\u90E8\u5BB9\u5668\u6765\u5B9E\u73B0\u63A7\u5236

                                            \u6B63\u8F6C\uFF1A\u7531\u5F00\u53D1\u4EBA\u5458\uFF0C\u5728\u4EE3\u7801\u4E2D\uFF0C\u4F7F\u7528new\u6784\u9020\u65B9\u6CD5\u521B\u5EFA\u5BF9\u8C61\uFF0C\u5F00\u53D1\u4EBA\u5458\u4E3B\u52A8\u7BA1\u7406\u5BF9\u8C61\u3002

                                            \u5BB9\u5668\uFF1A\u662F\u4E00\u4E2A\u670D\u52A1\u5668\u8F6F\u4EF6\uFF0C\u4E00\u4E2A\u6846\u67B6---spring

                                          7. IOC\u7684\u5B9E\u73B0\uFF1A

                                            \u4F9D\u8D56\u6CE8\u5165\uFF1ADI\uFF0CDependency Injection\uFF0C\u8FD9\u4E9B\u5DE5\u4F5C\u7531\u5BB9\u5668\u81EA\u884C\u5B8C\u6210

                                            \u4F9D\u8D56\u6CE8\u5165\u662F\u6307\u7A0B\u5E8F\u8FD0\u884C\u8FC7\u7A0B\u4E2D\uFF0C\u82E5\u9700\u8981\u8C03\u7528\u53E6\u4E00\u4E2A\u5BF9\u8C61\u534F\u52A9\u65F6\uFF0C\u65E0\u9700\u5728\u4EE3\u7801\u4E2D\u521B\u5EFA\u88AB\u8C03\u7528\u8005\uFF0C\u800C\u662F\u4F9D\u8D56\u4E8E\u5916\u90E8\u5BB9\u5668\uFF0C\u7531\u5916\u90E8\u5BB9\u5668\u521B\u5EFA\u540E\u4F20\u9012\u7ED9\u7A0B\u5E8F\u3002

                                            Spring\u7684\u4F9D\u8D56\u6CE8\u5165\u5BF9\u8C03\u7528\u8005\u548C\u88AB\u8C03\u7528\u8005\u51E0\u4E4E\u6CA1\u6709\u4EFB\u4F55\u8981\u6C42\uFF0C\u5B8C\u5168\u652F\u6301\u5BF9\u8C61\u4E4B\u95F4\u4F9D\u8D56\u5173\u7CFB\u7684\u7BA1\u7406

                                          8. \u4E3A\u4EC0\u4E48\u8981\u4F7F\u7528ioc

                                            \u76EE\u7684\u662F\u51CF\u5C11\u4EE3\u7801\u7684\u6539\u52A8\uFF0C\u4E5F\u80FD\u5B9E\u73B0\u4E0D\u540C\u7684\u529F\u80FD\uFF0C\u89E3\u8026\u5408\uFF0C\u8BA9\u5BF9\u8C61\u7684\u7BA1\u7406\u66F4\u677E\u6563\u3002

                                          9. Java\u4E2D\u521B\u5EFA\u5BF9\u8C61\u6709\u54EA\u4E9B\u65B9\u5F0F

                                            • new\u7684\u5E38\u89C4\u65B9\u5F0F
                                            • new\u7684\u53D8\u5F62\uFF1AXxxBuilder\u3001XxxFactory\u7684\u9759\u6001\u65B9\u6CD5
                                            • \u53CD\u5C04\uFF0C\u8C03\u7528newInstance()
                                            • \u53CD\u5C04\uFF0C\u8C03\u7528\u65E0\u53C2\u7684\u6216\u5E26\u53C2\u7684\u6784\u9020\u5668
                                            • \u514B\u9686\uFF0C\u5B9E\u73B0Cloneable\u63A5\u53E3\uFF0C\u5B9E\u73B0clone()\u65B9\u6CD5
                                            • \u4F7F\u7528\u53CD\u5E8F\u5217\u5316
                                            • \u52A8\u6001\u4EE3\u7406
                                            • IoC\u4F9D\u8D56\u6CE8\u5165\uFF0C\u7531\u5BB9\u5668\u521B\u5EFA\u5BF9\u8C61\uFF0C\u7136\u540E\u4F20\u9012\u7ED9\u7A0B\u5E8F

                                            image-20210913175809348

                                            \u5728\u6B64\u57FA\u7840\u4E0A\uFF0C\u518D\u52A0\u4E00\u79CD\u65B9\u5F0F\uFF1A

                                            IoC\uFF1A\u5916\u90E8\u5BB9\u5668\u521B\u5EFA\u5BF9\u8C61\uFF01

                                            \u9664\u4E86IoC\uFF0C\u5176\u4ED6\u521B\u5EFA\u5BF9\u8C61\u7684\u65B9\u5F0F\u90FD\u8981\u5728\u6211\u4EEC\u7684\u7A0B\u5E8F\u4E2D\u5199\u4EE3\u7801\u6765\u521B\u5EFA\u5BF9\u8C61\uFF0C\u4F46\u662FIoC\u4E0D\u9700\u8981\uFF0C\u7531\u5916\u90E8\u5BB9\u5668\u521B\u5EFA\u5BF9\u8C61\uFF0C\u5E76\u4E14IoC\u662F\u4E00\u4E2A\u601D\u60F3\uFF0C\u6709\u5F88\u5927\u7684\u529F\u80FD\uFF0C\u4ED6\u4E0D\u4EC5\u4EC5\u662F\u521B\u5EFA\u5BF9\u8C61\uFF0C\u8FD8\u53EF\u4EE5\u7BA1\u7406\u5BF9\u8C61\u4E4B\u95F4\u7684\u5173\u7CFB\uFF08\u7BA1\u7406\u4F9D\u8D56\uFF09\uFF0C\u5C5E\u6027\u8D4B\u503C

                                          10. ioc\u7684\u4F53\u73B0\uFF1A

                                            servlet\uFF1A

                                            • \u521B\u5EFA\u7C7B\u7EE7\u627FHttpServlet

                                            • \u5728web.xml\u6CE8\u518Cservlet

                                              image-20210913180612194

                                            • \u4F46\u662F\u6CA1\u6709\u521B\u5EFA\u8FC7Servlet\u5BF9\u8C61\uFF0C\u6CA1\u6709MyServlet myServlet = new MyServlet();

                                            • Servlet\u7C7B\u7684\u5BF9\u8C61\u662FTomcat\u670D\u52A1\u5668\u521B\u5EFA\u7684

                                              \u6240\u4EE5Tomcat\u4E5F\u79F0\u4E3A\u5BB9\u5668\uFF0C\u91CC\u9762\u5B58\u653E\u7684\u6709Servlet\u5BF9\u8C61\uFF0C\u76D1\u542C\u5668\u5BF9\u8C61\uFF0C\u8FC7\u6EE4\u5668\u5BF9\u8C61\uFF0C\u8FD9\u662FTomcat\u7684\u4E09\u5927\u7EC4\u4EF6\uFF0CServlet\u662F\u6838\u5FC3\u7EC4\u4EF6

                                              Tomcat\u4F5C\u4E3A\u5BB9\u5668\uFF0C\u5B8C\u6210\u4E86\u5BF9\u8C61\u7684\u521B\u5EFA\uFF0C\u6211\u4EEC\u53EA\u9700\u8981\u5728web.xml\u6587\u4EF6\u4E2D\u4FEE\u6539\u5C31\u53EF\u4EE5\u4E86\uFF0C\u4E0D\u7528\u5728\u4EE3\u7801\u91CC\u521B\u5EFA\u5BF9\u8C61\uFF0C\u8FD9\u5C31\u662FIOC\u7684\u4F53\u73B0\u3002

                                            IOC\u662F\u5728\u7A0B\u5E8F\u7684\u4EE3\u7801\u4E4B\u5916\u5B8C\u6210\u5BF9\u8C61\u7684\u521B\u5EFA\u7684\uFF01\uFF01\uFF01

                                          11. IoC\u7684\u6280\u672F\u5B9E\u73B0

                                            DI\uFF0C\u5373\u4F9D\u8D56\u6CE8\u5165\uFF0C\u662FIoC\u7684\u6280\u672F\u5B9E\u73B0

                                            \u6211\u4EEC\u53EA\u9700\u8981\u5728\u63D0\u4F9B\u8981\u4F7F\u7528\u7684\u5BF9\u8C61\u7684\u540D\u79F0\u5C31\u53EF\u4EE5\u4E86\uFF0C\u81F3\u4E8E\u5BF9\u8C61\u5982\u4F55\u5728\u5BB9\u5668\u4E2D\u521B\u5EFA\uFF0C\u7ED9\u5C5E\u6027\u8D4B\u503C\uFF0C\u67E5\u627E\u90FD\u7531\u4EE3\u7801\u5916\u90E8\u3001\u5BB9\u5668\u5185\u90E8\u5B9E\u73B0\u3002

                                            Spring\u662F\u4F7F\u7528\u4E86DI\u5B9E\u73B0\u4E86IoC\u7684\u529F\u80FD\uFF0CSpring\u5E95\u5C42\u521B\u5EFA\u5BF9\u8C61\uFF0C\u4F7F\u7528\u7684\u662F\u53CD\u5C04\u673A\u5236\uFF08\u6839\u672C\uFF09

                                          12. \u4EC0\u4E48\u6837\u7684\u5BF9\u8C61\u653E\u5165\u5230\u5BB9\u5668\u4E2D\u521B\u5EFA\uFF1F

                                            dao\u7C7B\uFF0Cservice\u7C7B\uFF0Ccontroller\u7C7B\uFF0C\u5DE5\u5177\u7C7B\uFF08\u53EF\u77E5\u8FD9\u4E9B\u90FD\u662F\u529F\u80FD\u6027\u7C7B\uFF0C\u5728\u6846\u67B6\u4E2D\u62C5\u4EFB\u4E00\u5B9A\u4F5C\u7528\u7684\u7C7B\uFF09

                                            spring\u5BB9\u5668\u4E2D\u7684\u5BF9\u8C61\u9ED8\u8BA4\u90FD\u662F\u5355\u4F8B\u7684\uFF0C\u5728\u5BB9\u5668\u4E2D\u53EB\u8FD9\u4E2A\u540D\u79F0\u7684\u5BF9\u8C61\u53EA\u6709\u4E00\u4E2A\u3002

                                            \u4E00\u4E2A<bean>\u6807\u7B7E\u5BF9\u5E94\u4E8E\u4E00\u4E2A\u5BF9\u8C61\u3002

                                          13. \u4E0D\u653E\u5165\u5230spring\u5BB9\u5668\u4E2D\u7684\u5BF9\u8C61

                                            • \u5B9E\u4F53\u7C7B\u7684\u5BF9\u8C61\uFF0C\u56E0\u4E3A\u5B9E\u4F53\u7C7B\u5BF9\u8C61\u7684\u5C5E\u6027\u6570\u636E\u662F\u6765\u81EA\u4E8E\u6570\u636E\u5E93\u7684\uFF0C\u5728\u6570\u636E\u5E93\u8BBF\u95EE\u8FC7\u7A0B\u4E2D\u6216\u8005\u8BF4\u67E5\u8BE2\u8FC7\u7A0B\u4E2D\u4FBF\u53EF\u4EE5\u521B\u5EFA\u5BF9\u8C61\uFF0C\u6BD4\u5982\u7531mybatis\u6846\u67B6\u5B8C\u6210\uFF0C\u5BF9\u5E94\u4E8Ejdbc\u7684\u8FD9\u4E2A\u64CD\u4F5C

                                              image-20210914151017506

                                              \u4F46\u662Fmybatis\u5E76\u4E0D\u9700\u8981\u5199\u4EE5\u4E0A\u8FD9\u51E0\u884C\u4EE3\u7801\uFF0C\u53EA\u662F\u5BF9\u5E94\u4E8Ejdbc\u91CC\u662F\u8FD9\u6837\u64CD\u4F5C\uFF0C\u6240\u4EE5\u6211\u4EEC\u4E0D\u9700\u8981\u628A\u5B9E\u4F53\u7C7B\u5BF9\u8C61\u653E\u5230spring\u5BB9\u5668\u4E2D\uFF0C\u5728\u67E5\u8BE2\u8FC7\u7A0B\u4E2D\u4FBF\u4F1A\u7531mybatis\u6765\u5E2E\u6211\u4EEC\u521B\u5EFA\u5B9E\u4F53\u5BF9\u8C61

                                            • servlet\u3001listener\u3001filter\u7B49\uFF0C\u8FD9\u4E9B\u5BF9\u8C61\u4EA4\u7ED9tomcat\u6765\u521B\u5EFA

                                              \u6240\u4EE5\u9762\u8BD5\u7684\u65F6\u5019\u8BF4\u5230IOC\uFF0C\u4E0D\u53EA\u662F\u51FA\u73B0\u5728spring\u6846\u67B6\u4E2D\uFF0C\u8FD9\u662F\u4E00\u79CD\u601D\u60F3\uFF0C\u53EF\u4EE5\u8BF4tomcat\u670D\u52A1\u5668\u4E5F\u7528\u5230\u3002\u800Ctomcat\u672C\u8EAB\u53C8\u662F\u4E00\u4E2A\u5BB9\u5668\u3002

                                          14. \u5BF9\u8C61\u600E\u4E48\u653E\u5165spring\u5BB9\u5668\u4E2D\u521B\u5EFA\uFF0C\u5E76\u4E14\u7ED9\u5BF9\u8C61\u7684\u5C5E\u6027\u8D4B\u503C\uFF0C\u5373\u5B8C\u6210\u4F9D\u8D56\u6CE8\u5165\u64CD\u4F5C\u3002

                                            • xml\u914D\u7F6E\u6587\u4EF6\u65B9\u5F0F
                                              • set\u6CE8\u5165
                                                • \u7B80\u5355\u7C7B\u578B
                                                • \u5F15\u7528\u7C7B\u578B
                                            • \u6CE8\u89E3\u65B9\u5F0F
                                          15. ioc\u80FD\u591F\u5B9E\u73B0\u4E1A\u52A1\u5BF9\u8C61\u4E4B\u95F4\u7684\u89E3\u8026\u5408\uFF0C\u4F8B\u5982service\u548Cdao\u5BF9\u8C61\u4E4B\u95F4\u7684\u89E3\u8026\u5408

                                          Spring\u901A\u8FC7IoC\u521B\u5EFA\u5BF9\u8C61\u7684\u5B9E\u73B0\u6B65\u9AA4

                                          \u603B\u4F53\u6B65\u9AA4

                                          1. \u521B\u5EFAmaven\u9879\u76EE

                                          2. \u52A0\u5165maven \u4F9D\u8D56

                                            spring\u7684\u4F9D\u8D56\uFF0C\u7248\u672C5.2.5

                                            junit\u4F9D\u8D56\uFF0C\u5355\u5143\u6D4B\u8BD5

                                          3. \u521B\u5EFA\u7C7B\uFF08\u53EF\u4EE5\u6709\u63A5\u53E3\u548C\u5B9E\u73B0\u7C7B\uFF09\uFF08Spring\u4E2D\uFF0C\u5B9E\u4F53\u7C7B\u7684\u5BF9\u8C61\u7684\u521B\u5EFA\u4E0D\u4EA4\u7ED9\u5BB9\u5668\uFF08\u6CA1\u6709\u5FC5\u8981\uFF09\uFF0C\u800C\u662Fmybatis\u521B\u5EFA\uFF0C\u56E0\u4E3A\u4E00\u4E2A\u5B9E\u4F53\u7C7B\u662F\u5BF9\u5E94\u4E8E\u6570\u636E\u5E93\u4E2D\u4E00\u4E2A\u8868\uFF0C\u4E00\u4E2A\u5B9E\u4F53\u7C7B\u5BF9\u8C61\u662F\u5BF9\u5E94\u4E8E\u6570\u636E\u5E93\u4E2D\u8868\u7684\u4E00\u884C\uFF01\uFF01\uFF09

                                            \u4EA4\u7ED9spring\u5BB9\u5668\u521B\u5EFA\u7684\u5BF9\u8C61\u662Fservice\u7C7B\u3001dao\u7C7B\u3001controller\u7C7B\u3001\u5DE5\u5177\u7C7B\u7684\u5BF9\u8C61\uFF01\uFF01

                                            \u548C\u6CA1\u6709\u4F7F\u7528\u6846\u67B6\u4E00\u6837\uFF0C\u5C31\u662F\u666E\u901A\u7684\u7C7B

                                          4. \u521B\u5EFAspring\u9700\u8981\u4F7F\u7528\u7684\u914D\u7F6E\u6587\u4EF6\uFF0C\u628A\u7B2C\u4E09\u6B65\u521B\u5EFA\u7684\u7C7B\u7684\u4FE1\u606F\u4EA4\u7ED9spring

                                            \u58F0\u660E\u7C7B\u7684\u4FE1\u606F\uFF0C\u8FD9\u4E9B\u7C7B\u7684\u5BF9\u8C61\u7531spring\u521B\u5EFA\u548C\u7BA1\u7406\uFF0C\u4F7F\u7528<bean>

                                          5. \u6D4B\u8BD5spring\u521B\u5EFA\u7684\u5BF9\u8C61\u3002

                                          6. \u6CE8\u610F\uFF1A

                                            • spring\u4E2D\uFF0C\u7C7B\u4E0D\u662F\u4E0D\u9700\u8981\u5199\uFF0C\u7C7B\u662F\u9700\u8981\u5199\u7684\uFF0C\u53EA\u662F\u7C7B\u7684\u521B\u5EFA\u4EA4\u7ED9spring\u5BB9\u5668\uFF08\u5E95\u5C42\u4F7F\u7528\u53CD\u5C04\u673A\u5236\uFF09

                                              \u5BB9\u5668\u5BF9\u8C61\u7684\u521B\u5EFA\u662F\u5728\u8BFB\u53D6\u914D\u7F6E\u6587\u4EF6\u7684\u65F6\u5019\uFF0C\u8BFB\u53D6\u5B8C\uFF0C\u90A3\u4E48\u5BB9\u5668\u5BF9\u8C61\u521B\u5EFA\u597D\u4E86\uFF0C\u5E76\u4E14\u914D\u7F6E\u6587\u4EF6\u4E2D\u58F0\u660E\u7684\u5BF9\u8C61\u4E5F\u521B\u5EFA\u597D\u4E86

                                            • mybatis\u4E2D\uFF0CDao\u63A5\u53E3\u7684\u5B9E\u73B0\u7C7B\u4E0D\u9700\u8981\u5199\uFF0C\u4E5F\u5C31\u662F\u4E0D\u4EC5\u5BF9\u8C61\u76F4\u63A5\u4EA4\u7ED9mybatis\u521B\u5EFA\uFF0C\u8FDE\u7C7B\u4E5F\u4E0D\u9700\u8981\u5199\uFF08\u5E95\u5C42\u662F\u52A8\u6001\u4EE3\u7406\uFF09\u3002mybatis\u901A\u8FC7\u52A8\u6001\u4EE3\u7406\u521B\u5EFA\u63A5\u53E3\u7684\u5B9E\u73B0\u7C7B\u7684\u5BF9\u8C61\u3002

                                            • \u5728spring\u4E2D\uFF0C\u7C7B\u5F97\u81EA\u5DF1\u5199\uFF08\u4E0D\u8981\u548C\u4E4B\u524Dmybatis\u7684dao\u63A5\u53E3\u7684\u5B9E\u73B0\u7C7B\u641E\u6DF7\u6DC6\uFF0C\u90A3\u4E2A\u4E0D\u9700\u8981\u5199\uFF09\uFF01\uFF01\u5E76\u4E14\u8981\u628A\u7C7B\u7684\u4FE1\u606F\u4EA4\u7ED9\u5BB9\u5668\uFF08\u53EF\u4EE5\u7406\u89E3\u4E3A\u914D\u7F6E\u6587\u4EF6\u3002\uFF09\u628A\u7C7B\u7684\u4FE1\u606F\u4EA4\u7ED9\u914D\u7F6E\u6587\u4EF6\u3002\u5728\u914D\u7F6E\u6587\u4EF6\u4E2D\u58F0\u660E\u7C7B\u7684\u4FE1\u606F\u3002

                                          \u521B\u5EFAspring\u9700\u8981\u4F7F\u7528\u7684\u914D\u7F6E\u6587\u4EF6

                                          <?xml version="1.0" encoding="UTF-8"?>
                                          +import{_ as n,e as a}from"./app.f8791b52.js";var s="/study/assets/image-20210913172634214.099034b8.png",t="/study/assets/image-20210820161439568.c766732a.png",p="/study/assets/image-20210913180612194.86f6f78d.png",o="/study/assets/image-20210912214209011.3bd39a1b.png",e="/study/assets/image-20211231213322621.361e0b9d.png",l="/study/assets/image-20210913205505062.8b5e7731.png",c="/study/assets/image-20210914141532997.787552e5.png",i="/study/assets/image-20210914141854791.a2ba4f0d.png",u="/study/assets/image-20210914135813503.3286f3a6.png",r="/study/assets/image-20210914155725037.c25e6599.png",k="/study/assets/image-20210914161402217.9eb201ce.png",g="/study/assets/image-20210914161928143.130b737e.png",m="/study/assets/image-20220101163100726.6e91a800.png",d="/study/assets/image-20210914164717403.62335ee7.png",v="/study/assets/image-20210914165054779.e8bfc54d.png",y="/study/assets/image-20210914165406757.fd681be7.png",q="/study/assets/image-20220101164217927.cbcad780.png",b="/study/assets/image-20210914170534218.bf134c09.png",h="/study/assets/image-20210914185104374.b1e72428.png",x="/study/assets/image-20210915144734649.4f36e089.png",S="/study/assets/image-20210915145208219.5869e448.png",f="/study/assets/image-20210915145224129.5abe73b2.png",w="/study/assets/image-20210915171254252.cddac429.png",I="/study/assets/image-20210915171535746.2c16fd99.png",_="/study/assets/image-20210915173011593.8c826cd2.png",j="/study/assets/image-20210915173119067.017e4db1.png",A="/study/assets/image-20210915173256547.6e422433.png",C="/study/assets/image-20210915202014308.7324d149.png",P="/study/assets/image-20210915202317516.d3ddf7eb.png",O="/study/assets/image-20210915202930102.92610496.png",T="/study/assets/image-20210915203044632.61a76a2a.png",D="/study/assets/image-20210915205025934.eab06104.png",M="/study/assets/image-20210915205640183.bda81bdf.png",E="/study/assets/image-20220103151659626.bddc4150.png",R="/study/assets/image-20210915210756808.1a37ba95.png",J="/study/assets/image-20210917211042496.1393e26f.png",N="/study/assets/image-20220103172512509.4c4d1262.png",B="/study/assets/image-20210918000618311.68e97631.png",F="/study/assets/image-20210918000851651.00e7c62f.png",G="/study/assets/image-20210918001051062.a6a89749.png",H="/study/assets/image-20210918002432273.06fa7933.png",L="/study/assets/image-20210918020320640.8d2fc58c.png",U="/study/assets/image-20210918020555438.de7f4326.png",X="/study/assets/image-20210918020706229.5370b248.png",Q="/study/assets/image-20210918021222839.20498914.png",V="/study/assets/image-20210918154449165.3e91cd5a.png",$="/study/assets/image-20210918171200551.40cb41d3.png",W="/study/assets/image-20210918174507560.1c837099.png",Y="/study/assets/image-20210918182446699.da3c4737.png",z="/study/assets/image-20220103214831001.f88a2a76.png",K="/study/assets/image-20210918183205489.3ae66716.png",Z="/study/assets/image-20210918183317069.a1ce059d.png",nn="/study/assets/image-20210918183544691.a2d8717e.png",an="/study/assets/image-20210918183810733.6cc847c9.png";const sn={},tn=a('

                                          Spring

                                          \u7B2C\u4E00\u7AE0\uFF1ASpring \u6982\u5FF5

                                          Spring\u6846\u67B6\u6982\u8FF0

                                          1. Spring\u662F\u8F7B\u91CF\u7EA7\u7684\u5F00\u6E90\u7684JavaEE\u6846\u67B6

                                            \u89E3\u51B3\u4F01\u4E1A\u5F00\u53D1\u7684\u96BE\u5EA6\uFF0C\u51CF\u8F7B\u5BF9\u9879\u76EE\u6A21\u5757\u4E4B\u95F4\u7684\u7BA1\u7406\uFF0C\u7C7B\u548C\u7C7B\u4E4B\u95F4\u7684\u7BA1\u7406\uFF0C\u4EA4\u7ED9Spring\u6765\u5904\u7406\uFF0C\u5E2E\u52A9\u5F00\u53D1\u4EBA\u5458\u521B\u5EFA\u5BF9\u8C61\uFF0C\u7BA1\u7406\u5BF9\u8C61\u4E4B\u95F4\u7684\u5173\u7CFB

                                          2. spring\u7684\u76EE\u7684\u5C31\u662F\u89E3\u8026\u5408\uFF0C\u8BA9\u5173\u7CFB\u53D8\u5F97\u677E\u6563\u3002\u4E00\u4E2A\u6A21\u5757\u7684\u53D8\u5316\u5BF9\u53E6\u4E00\u4E2A\u6A21\u5757\u5F71\u54CD\u6700\u5C0F\uFF01\uFF01

                                          3. \u4F9D\u8D56\uFF1A\u7C7BA\u4E2D\u4F7F\u7528\u7C7BB\u7684\u5C5E\u6027\u6216\u65B9\u6CD5\uFF0C\u53EB\u505AA\u4F9D\u8D56\u4E8EB\u3002

                                          4. \u6846\u67B6\u5C31\u662F\u534A\u6210\u54C1\uFF0C\u9700\u8981\u7ED3\u5408\u6846\u67B6\uFF0C\u52A0\u4E0A\u6211\u4EEC\u81EA\u5DF1\u7684\u4EE3\u7801\uFF0C\u6765\u5B8C\u6210\u5F00\u53D1\u3002

                                            \u6846\u67B6\u63D0\u4F9B\u4E86\u5F88\u591A\u5DE5\u5177\uFF0C\u73B0\u6709\u7684\u5DE5\u5177\u548C\u529F\u80FD\uFF0C\u7EC4\u4EF6

                                            \u6211\u4EEC\u5728\u6846\u67B6\u7684\u57FA\u7840\u4E4B\u4E0A\u8FDB\u884C\u5F00\u53D1\uFF0C\u81EA\u5DF1\u5199\u7684\u9879\u76EE\u7684\u529F\u80FD\uFF0C\u53EF\u5229\u7528\u6846\u67B6\u4E2D\u5DF2\u6709\u7684\u529F\u80FD

                                            \u8981\u7528\u6846\u67B6\uFF0C\u90A3\u4E48\u9700\u8981\u8FDB\u884Cjar\u5305\u7684\u5BFC\u5165\uFF0C\u4F9D\u8D56\u7684\u6DFB\u52A0\u3002\u800CSpring\u6846\u67B6\u9700\u8981\u6211\u4EEC\u6DFB\u52A0\u7684\u4F9D\u8D56\u5F88\u5C11\uFF0C\u6240\u4EE5\u662F\u8F7B\u91CF\u7EA7\u7684\uFF0C\u540C\u7406\uFF0CMybatis\u4E5F\u662F\u8F7B\u91CF\u7EA7\u7684\uFF0C\u56E0\u4E3A\u6DFB\u52A0\u7684\u4F9D\u8D56\u5F88\u5C11\uFF0C\u914D\u7F6E\u7B80\u5355\u3002

                                            spring\u6846\u67B6\u8FD0\u884C\u5360\u7528\u7684\u8D44\u6E90\u5C11\uFF0C\u8FD0\u884C\u6548\u7387\u9AD8\uFF0C\u4E0D\u4F9D\u8D56\u5176\u4ED6jar\uFF0CSpring\u6838\u5FC3\u529F\u80FD\u7684\u6240\u9700jar\u603B\u5171\u57283M\u5DE6\u53F3

                                          5. \u6846\u67B6\u8981\u5B8C\u6210\u4E00\u4E2A\u529F\u80FD\uFF0C\u9700\u8981\u4E00\u5B9A\u7684\u6B65\u9AA4\u652F\u6301\u7684\u3002

                                          6. Spring\u7684\u76EE\u7684\u662F\u89E3\u51B3\u4F01\u4E1A\u5E94\u7528\u5F00\u53D1\u7684\u590D\u6742\u6027\u3002

                                          7. Spring\u6709\u5F88\u591A\u7EC4\u6210\u90E8\u5206\uFF0C\u4F46\u662F\u6709\u4E24\u4E2A\u6838\u5FC3\u7EC4\u6210\u90E8\u5206

                                            • IOC

                                              \u63A7\u5236\u53CD\u8F6C\uFF0C\u4E4B\u524D\u539F\u59CB\u65B9\u5F0F\u521B\u5EFA\u5BF9\u8C61\uFF0C\u9700\u8981new\u4E00\u4E2A\u7C7B\uFF0C\u628A\u5BF9\u8C61\u521B\u5EFA\uFF0C\u6216\u8005\u8FD8\u6709\u53CD\u5C04\u7684new Instance\uFF0C\u53CD\u5C04\u901A\u8FC7\u6784\u9020\u5668\u521B\u5EFA\u3002\u73B0\u5728\u901A\u8FC7IOC\uFF0C\u628A\u521B\u5EFA\u5BF9\u8C61\u7684\u8FC7\u7A0B\u4EA4\u7ED9Spring\u8FDB\u884C\u7BA1\u7406

                                            • AOP

                                              \u9762\u5411\u5207\u9762\uFF08\u9762\u5411\u65B9\u9762\uFF09,\u6BD4\u5982\u5728\u7A0B\u5E8F\u4E2D\u60F3\u52A0\u529F\u80FD\u6216\u8005\u6269\u5C55\u529F\u80FD\uFF0C\u5728\u4E0D\u4FEE\u6539\u539F\u4EE3\u7801\u7684\u60C5\u51B5\u4E0B\uFF0C\u8FDB\u884C\u529F\u80FD\u7684\u589E\u5F3A\u3002\u4E0D\u6539\u539F\u4EE3\u7801

                                          8. Spring\u6846\u67B6\u7684\u7279\u70B9

                                            • \u8F7B\u91CF\u7EA7

                                            • \u65B9\u4FBF\u89E3\u8026\uFF0C\u7B80\u5316\u5F00\u53D1\uFF0C\u9488\u5BF9\u63A5\u53E3\u7F16\u7A0B

                                            • AOP\u7F16\u7A0B\u652F\u6301\uFF0C\u4E0D\u6539\u53D8\u539F\u4EE3\u7801\u7684\u65B9\u5F0F\uFF0C\u8FDB\u884C\u529F\u80FD\u7684\u589E\u5F3A

                                            • \u65B9\u4FBF\u7A0B\u5E8F\u7684\u6D4B\u8BD5

                                            • \u65B9\u4FBF\u96C6\u6210\u5404\u79CD\u4F18\u79C0\u6846\u67B6

                                          9. Spring\u7684\u6838\u5FC3\u6280\u672F\uFF0Cioc\u3001aop\u5B9E\u73B0\u6A21\u5757\u4E4B\u95F4\u3001\u7C7B\u4E4B\u95F4\u7684\u89E3\u8026\u5408\uFF0C\u6240\u4EE5aop\u624D\u80FD\u652F\u6301\u5728\u4E0D\u6539\u53D8\u539F\u4EE3\u7801\u7684\u65B9\u5F0F\u8FDB\u884C\u529F\u80FD\u589E\u5F3A\u3002

                                          10. SpringFramework\u5185\u90E8\u6A21\u5757

                                            • \u6570\u636E\u8BBF\u95EE\u6A21\u5757
                                            • web\u5E94\u7528\u6A21\u5757
                                            • AOP\u6A21\u5757
                                            • \u96C6\u6210\u529F\u80FD\u6A21\u5757
                                            • IOC\u6838\u5FC3\u5BB9\u6613\u6A21\u5757
                                            • \u6D4B\u8BD5\u6A21\u5757

                                            image-20210913172634214

                                          \u7B2C\u4E8C\u7AE0\uFF1AIoC\u63A7\u5236\u53CD\u8F6C

                                          \u6982\u8FF0

                                          1. IoC---Inversion of Control\uFF0C\u63A7\u5236\u53CD\u8F6C\uFF0C\u662F\u4E00\u4E2A\u6982\u5FF5\uFF0C\u4E00\u4E2A\u601D\u60F3

                                            \u6307\u5C06\u4F20\u7EDF\u4E0A\u7531\u7A0B\u5E8F\u4EE3\u7801\u76F4\u63A5\u64CD\u63A7\u7684\u5BF9\u8C61\u8C03\u7528\u6743\u4EA4\u7ED9\u4EE3\u7801\u4E4B\u5916\u7684\u5BB9\u5668\uFF08\u8FD9\u4E2A\u5BB9\u5668\u5728Java\u4EE3\u7801\u4E2D\u9700\u8981\u88AB\u521B\u5EFA\u51FA\u6765\uFF09\uFF0C\u901A\u8FC7\u5916\u90E8\u5BB9\u5668\u6765\u5B9E\u73B0\u5BF9\u8C61\u7684\u88C5\u914D\u548C\u7BA1\u7406\u3002

                                            \u63A7\u5236\u53CD\u8F6C\u5C31\u662F\u5BF9\u5BF9\u8C61\u63A7\u5236\u6743\u7684\u8F6C\u79FB\uFF0C\u4ECE\u7A0B\u5E8F\u4EE3\u7801\u672C\u8EAB\u53CD\u8F6C\u5230\u4E86\u5916\u90E8\u5BB9\u5668\u3002

                                            \u901A\u8FC7\u5BB9\u5668\u5B9E\u73B0\u5BF9\u8C61\u7684\u521B\u5EFA\uFF0C\u5C5E\u6027\u8D4B\u503C\uFF0C\u4F9D\u8D56\u7684\u7BA1\u7406\uFF08\u5BF9\u8C61\u4E4B\u95F4\u7684\u5173\u7CFB\u7BA1\u7406\uFF09

                                          2. IOC\u63CF\u8FF0\u7684\uFF1A\u628A\u5BF9\u8C61\u7684\u521B\u5EFA\u3001\u5C5E\u6027\u8D4B\u503C\u3001\u7BA1\u7406\u5DE5\u4F5C\u90FD\u4EA4\u7ED9\u4EE3\u7801\u4E4B\u5916\u7684\u5BB9\u5668\u5B9E\u73B0\u3002

                                          3. spring\u5BB9\u5668\u4E2D\u7684\u5BF9\u8C61\u9ED8\u8BA4\u90FD\u662F\u5355\u4F8B\u7684\uFF0C\u5728\u5BB9\u5668\u4E2D\u53EB\u8FD9\u4E2A\u540D\u79F0\u7684\u5BF9\u8C61\u53EA\u6709\u4E00\u4E2A\u3002

                                          4. IoC\u662F\u4E00\u79CD\u6982\u5FF5\uFF0C\u4E00\u79CD\u601D\u60F3\uFF0C\u5176\u5B9E\u73B0\u65B9\u5F0F\u591A\u79CD\u591A\u6837\uFF0C\u5F53\u524D\u6BD4\u8F83\u6D41\u884C\u7684\u5B9E\u73B0\u65B9\u5F0F\u662F\u4F9D\u8D56\u6CE8\u5165

                                          5. \u4F9D\u8D56\uFF1A

                                            classA\u4E2D\u542B\u6709classB\u7684\u5B9E\u4F8B\uFF0C\u5728classA\u4E2D\u8C03\u7528classB\u7684\u65B9\u6CD5\u5B8C\u6210\u529F\u80FD\uFF0C\u5373classA\u5BF9classB\u6709\u4F9D\u8D56\u3002

                                          6. \u63A7\u5236\u53CD\u8F6C

                                            \u63A7\u5236\uFF1A\u521B\u5EFA\u5BF9\u8C61\uFF0C\u5BF9\u8C61\u7684\u5C5E\u6027\u8D4B\u503C\uFF0C\u5BF9\u8C61\u4E4B\u95F4\u7684\u5173\u7CFB\u7BA1\u7406

                                            \u53CD\u8F6C\uFF1A\u7531\u4EE3\u7801\u5B9E\u73B0\u63A7\u5236\uFF0C\u4EA4\u7ED9\u5916\u90E8\u5BB9\u5668\u6765\u5B9E\u73B0\u63A7\u5236

                                            \u6B63\u8F6C\uFF1A\u7531\u5F00\u53D1\u4EBA\u5458\uFF0C\u5728\u4EE3\u7801\u4E2D\uFF0C\u4F7F\u7528new\u6784\u9020\u65B9\u6CD5\u521B\u5EFA\u5BF9\u8C61\uFF0C\u5F00\u53D1\u4EBA\u5458\u4E3B\u52A8\u7BA1\u7406\u5BF9\u8C61\u3002

                                            \u5BB9\u5668\uFF1A\u662F\u4E00\u4E2A\u670D\u52A1\u5668\u8F6F\u4EF6\uFF0C\u4E00\u4E2A\u6846\u67B6---spring

                                          7. IOC\u7684\u5B9E\u73B0\uFF1A

                                            \u4F9D\u8D56\u6CE8\u5165\uFF1ADI\uFF0CDependency Injection\uFF0C\u8FD9\u4E9B\u5DE5\u4F5C\u7531\u5BB9\u5668\u81EA\u884C\u5B8C\u6210

                                            \u4F9D\u8D56\u6CE8\u5165\u662F\u6307\u7A0B\u5E8F\u8FD0\u884C\u8FC7\u7A0B\u4E2D\uFF0C\u82E5\u9700\u8981\u8C03\u7528\u53E6\u4E00\u4E2A\u5BF9\u8C61\u534F\u52A9\u65F6\uFF0C\u65E0\u9700\u5728\u4EE3\u7801\u4E2D\u521B\u5EFA\u88AB\u8C03\u7528\u8005\uFF0C\u800C\u662F\u4F9D\u8D56\u4E8E\u5916\u90E8\u5BB9\u5668\uFF0C\u7531\u5916\u90E8\u5BB9\u5668\u521B\u5EFA\u540E\u4F20\u9012\u7ED9\u7A0B\u5E8F\u3002

                                            Spring\u7684\u4F9D\u8D56\u6CE8\u5165\u5BF9\u8C03\u7528\u8005\u548C\u88AB\u8C03\u7528\u8005\u51E0\u4E4E\u6CA1\u6709\u4EFB\u4F55\u8981\u6C42\uFF0C\u5B8C\u5168\u652F\u6301\u5BF9\u8C61\u4E4B\u95F4\u4F9D\u8D56\u5173\u7CFB\u7684\u7BA1\u7406

                                          8. \u4E3A\u4EC0\u4E48\u8981\u4F7F\u7528ioc

                                            \u76EE\u7684\u662F\u51CF\u5C11\u4EE3\u7801\u7684\u6539\u52A8\uFF0C\u4E5F\u80FD\u5B9E\u73B0\u4E0D\u540C\u7684\u529F\u80FD\uFF0C\u89E3\u8026\u5408\uFF0C\u8BA9\u5BF9\u8C61\u7684\u7BA1\u7406\u66F4\u677E\u6563\u3002

                                          9. Java\u4E2D\u521B\u5EFA\u5BF9\u8C61\u6709\u54EA\u4E9B\u65B9\u5F0F

                                            • new\u7684\u5E38\u89C4\u65B9\u5F0F
                                            • new\u7684\u53D8\u5F62\uFF1AXxxBuilder\u3001XxxFactory\u7684\u9759\u6001\u65B9\u6CD5
                                            • \u53CD\u5C04\uFF0C\u8C03\u7528newInstance()
                                            • \u53CD\u5C04\uFF0C\u8C03\u7528\u65E0\u53C2\u7684\u6216\u5E26\u53C2\u7684\u6784\u9020\u5668
                                            • \u514B\u9686\uFF0C\u5B9E\u73B0Cloneable\u63A5\u53E3\uFF0C\u5B9E\u73B0clone()\u65B9\u6CD5
                                            • \u4F7F\u7528\u53CD\u5E8F\u5217\u5316
                                            • \u52A8\u6001\u4EE3\u7406
                                            • IoC\u4F9D\u8D56\u6CE8\u5165\uFF0C\u7531\u5BB9\u5668\u521B\u5EFA\u5BF9\u8C61\uFF0C\u7136\u540E\u4F20\u9012\u7ED9\u7A0B\u5E8F

                                            image-20210913175809348

                                            \u5728\u6B64\u57FA\u7840\u4E0A\uFF0C\u518D\u52A0\u4E00\u79CD\u65B9\u5F0F\uFF1A

                                            IoC\uFF1A\u5916\u90E8\u5BB9\u5668\u521B\u5EFA\u5BF9\u8C61\uFF01

                                            \u9664\u4E86IoC\uFF0C\u5176\u4ED6\u521B\u5EFA\u5BF9\u8C61\u7684\u65B9\u5F0F\u90FD\u8981\u5728\u6211\u4EEC\u7684\u7A0B\u5E8F\u4E2D\u5199\u4EE3\u7801\u6765\u521B\u5EFA\u5BF9\u8C61\uFF0C\u4F46\u662FIoC\u4E0D\u9700\u8981\uFF0C\u7531\u5916\u90E8\u5BB9\u5668\u521B\u5EFA\u5BF9\u8C61\uFF0C\u5E76\u4E14IoC\u662F\u4E00\u4E2A\u601D\u60F3\uFF0C\u6709\u5F88\u5927\u7684\u529F\u80FD\uFF0C\u4ED6\u4E0D\u4EC5\u4EC5\u662F\u521B\u5EFA\u5BF9\u8C61\uFF0C\u8FD8\u53EF\u4EE5\u7BA1\u7406\u5BF9\u8C61\u4E4B\u95F4\u7684\u5173\u7CFB\uFF08\u7BA1\u7406\u4F9D\u8D56\uFF09\uFF0C\u5C5E\u6027\u8D4B\u503C

                                          10. ioc\u7684\u4F53\u73B0\uFF1A

                                            servlet\uFF1A

                                            • \u521B\u5EFA\u7C7B\u7EE7\u627FHttpServlet

                                            • \u5728web.xml\u6CE8\u518Cservlet

                                              image-20210913180612194

                                            • \u4F46\u662F\u6CA1\u6709\u521B\u5EFA\u8FC7Servlet\u5BF9\u8C61\uFF0C\u6CA1\u6709MyServlet myServlet = new MyServlet();

                                            • Servlet\u7C7B\u7684\u5BF9\u8C61\u662FTomcat\u670D\u52A1\u5668\u521B\u5EFA\u7684

                                              \u6240\u4EE5Tomcat\u4E5F\u79F0\u4E3A\u5BB9\u5668\uFF0C\u91CC\u9762\u5B58\u653E\u7684\u6709Servlet\u5BF9\u8C61\uFF0C\u76D1\u542C\u5668\u5BF9\u8C61\uFF0C\u8FC7\u6EE4\u5668\u5BF9\u8C61\uFF0C\u8FD9\u662FTomcat\u7684\u4E09\u5927\u7EC4\u4EF6\uFF0CServlet\u662F\u6838\u5FC3\u7EC4\u4EF6

                                              Tomcat\u4F5C\u4E3A\u5BB9\u5668\uFF0C\u5B8C\u6210\u4E86\u5BF9\u8C61\u7684\u521B\u5EFA\uFF0C\u6211\u4EEC\u53EA\u9700\u8981\u5728web.xml\u6587\u4EF6\u4E2D\u4FEE\u6539\u5C31\u53EF\u4EE5\u4E86\uFF0C\u4E0D\u7528\u5728\u4EE3\u7801\u91CC\u521B\u5EFA\u5BF9\u8C61\uFF0C\u8FD9\u5C31\u662FIOC\u7684\u4F53\u73B0\u3002

                                            IOC\u662F\u5728\u7A0B\u5E8F\u7684\u4EE3\u7801\u4E4B\u5916\u5B8C\u6210\u5BF9\u8C61\u7684\u521B\u5EFA\u7684\uFF01\uFF01\uFF01

                                          11. IoC\u7684\u6280\u672F\u5B9E\u73B0

                                            DI\uFF0C\u5373\u4F9D\u8D56\u6CE8\u5165\uFF0C\u662FIoC\u7684\u6280\u672F\u5B9E\u73B0

                                            \u6211\u4EEC\u53EA\u9700\u8981\u5728\u63D0\u4F9B\u8981\u4F7F\u7528\u7684\u5BF9\u8C61\u7684\u540D\u79F0\u5C31\u53EF\u4EE5\u4E86\uFF0C\u81F3\u4E8E\u5BF9\u8C61\u5982\u4F55\u5728\u5BB9\u5668\u4E2D\u521B\u5EFA\uFF0C\u7ED9\u5C5E\u6027\u8D4B\u503C\uFF0C\u67E5\u627E\u90FD\u7531\u4EE3\u7801\u5916\u90E8\u3001\u5BB9\u5668\u5185\u90E8\u5B9E\u73B0\u3002

                                            Spring\u662F\u4F7F\u7528\u4E86DI\u5B9E\u73B0\u4E86IoC\u7684\u529F\u80FD\uFF0CSpring\u5E95\u5C42\u521B\u5EFA\u5BF9\u8C61\uFF0C\u4F7F\u7528\u7684\u662F\u53CD\u5C04\u673A\u5236\uFF08\u6839\u672C\uFF09

                                          12. \u4EC0\u4E48\u6837\u7684\u5BF9\u8C61\u653E\u5165\u5230\u5BB9\u5668\u4E2D\u521B\u5EFA\uFF1F

                                            dao\u7C7B\uFF0Cservice\u7C7B\uFF0Ccontroller\u7C7B\uFF0C\u5DE5\u5177\u7C7B\uFF08\u53EF\u77E5\u8FD9\u4E9B\u90FD\u662F\u529F\u80FD\u6027\u7C7B\uFF0C\u5728\u6846\u67B6\u4E2D\u62C5\u4EFB\u4E00\u5B9A\u4F5C\u7528\u7684\u7C7B\uFF09

                                            spring\u5BB9\u5668\u4E2D\u7684\u5BF9\u8C61\u9ED8\u8BA4\u90FD\u662F\u5355\u4F8B\u7684\uFF0C\u5728\u5BB9\u5668\u4E2D\u53EB\u8FD9\u4E2A\u540D\u79F0\u7684\u5BF9\u8C61\u53EA\u6709\u4E00\u4E2A\u3002

                                            \u4E00\u4E2A<bean>\u6807\u7B7E\u5BF9\u5E94\u4E8E\u4E00\u4E2A\u5BF9\u8C61\u3002

                                          13. \u4E0D\u653E\u5165\u5230spring\u5BB9\u5668\u4E2D\u7684\u5BF9\u8C61

                                            • \u5B9E\u4F53\u7C7B\u7684\u5BF9\u8C61\uFF0C\u56E0\u4E3A\u5B9E\u4F53\u7C7B\u5BF9\u8C61\u7684\u5C5E\u6027\u6570\u636E\u662F\u6765\u81EA\u4E8E\u6570\u636E\u5E93\u7684\uFF0C\u5728\u6570\u636E\u5E93\u8BBF\u95EE\u8FC7\u7A0B\u4E2D\u6216\u8005\u8BF4\u67E5\u8BE2\u8FC7\u7A0B\u4E2D\u4FBF\u53EF\u4EE5\u521B\u5EFA\u5BF9\u8C61\uFF0C\u6BD4\u5982\u7531mybatis\u6846\u67B6\u5B8C\u6210\uFF0C\u5BF9\u5E94\u4E8Ejdbc\u7684\u8FD9\u4E2A\u64CD\u4F5C

                                              image-20210914151017506

                                              \u4F46\u662Fmybatis\u5E76\u4E0D\u9700\u8981\u5199\u4EE5\u4E0A\u8FD9\u51E0\u884C\u4EE3\u7801\uFF0C\u53EA\u662F\u5BF9\u5E94\u4E8Ejdbc\u91CC\u662F\u8FD9\u6837\u64CD\u4F5C\uFF0C\u6240\u4EE5\u6211\u4EEC\u4E0D\u9700\u8981\u628A\u5B9E\u4F53\u7C7B\u5BF9\u8C61\u653E\u5230spring\u5BB9\u5668\u4E2D\uFF0C\u5728\u67E5\u8BE2\u8FC7\u7A0B\u4E2D\u4FBF\u4F1A\u7531mybatis\u6765\u5E2E\u6211\u4EEC\u521B\u5EFA\u5B9E\u4F53\u5BF9\u8C61

                                            • servlet\u3001listener\u3001filter\u7B49\uFF0C\u8FD9\u4E9B\u5BF9\u8C61\u4EA4\u7ED9tomcat\u6765\u521B\u5EFA

                                              \u6240\u4EE5\u9762\u8BD5\u7684\u65F6\u5019\u8BF4\u5230IOC\uFF0C\u4E0D\u53EA\u662F\u51FA\u73B0\u5728spring\u6846\u67B6\u4E2D\uFF0C\u8FD9\u662F\u4E00\u79CD\u601D\u60F3\uFF0C\u53EF\u4EE5\u8BF4tomcat\u670D\u52A1\u5668\u4E5F\u7528\u5230\u3002\u800Ctomcat\u672C\u8EAB\u53C8\u662F\u4E00\u4E2A\u5BB9\u5668\u3002

                                          14. \u5BF9\u8C61\u600E\u4E48\u653E\u5165spring\u5BB9\u5668\u4E2D\u521B\u5EFA\uFF0C\u5E76\u4E14\u7ED9\u5BF9\u8C61\u7684\u5C5E\u6027\u8D4B\u503C\uFF0C\u5373\u5B8C\u6210\u4F9D\u8D56\u6CE8\u5165\u64CD\u4F5C\u3002

                                            • xml\u914D\u7F6E\u6587\u4EF6\u65B9\u5F0F
                                              • set\u6CE8\u5165
                                                • \u7B80\u5355\u7C7B\u578B
                                                • \u5F15\u7528\u7C7B\u578B
                                            • \u6CE8\u89E3\u65B9\u5F0F
                                          15. ioc\u80FD\u591F\u5B9E\u73B0\u4E1A\u52A1\u5BF9\u8C61\u4E4B\u95F4\u7684\u89E3\u8026\u5408\uFF0C\u4F8B\u5982service\u548Cdao\u5BF9\u8C61\u4E4B\u95F4\u7684\u89E3\u8026\u5408

                                          Spring\u901A\u8FC7IoC\u521B\u5EFA\u5BF9\u8C61\u7684\u5B9E\u73B0\u6B65\u9AA4

                                          \u603B\u4F53\u6B65\u9AA4

                                          1. \u521B\u5EFAmaven\u9879\u76EE

                                          2. \u52A0\u5165maven \u4F9D\u8D56

                                            spring\u7684\u4F9D\u8D56\uFF0C\u7248\u672C5.2.5

                                            junit\u4F9D\u8D56\uFF0C\u5355\u5143\u6D4B\u8BD5

                                          3. \u521B\u5EFA\u7C7B\uFF08\u53EF\u4EE5\u6709\u63A5\u53E3\u548C\u5B9E\u73B0\u7C7B\uFF09\uFF08Spring\u4E2D\uFF0C\u5B9E\u4F53\u7C7B\u7684\u5BF9\u8C61\u7684\u521B\u5EFA\u4E0D\u4EA4\u7ED9\u5BB9\u5668\uFF08\u6CA1\u6709\u5FC5\u8981\uFF09\uFF0C\u800C\u662Fmybatis\u521B\u5EFA\uFF0C\u56E0\u4E3A\u4E00\u4E2A\u5B9E\u4F53\u7C7B\u662F\u5BF9\u5E94\u4E8E\u6570\u636E\u5E93\u4E2D\u4E00\u4E2A\u8868\uFF0C\u4E00\u4E2A\u5B9E\u4F53\u7C7B\u5BF9\u8C61\u662F\u5BF9\u5E94\u4E8E\u6570\u636E\u5E93\u4E2D\u8868\u7684\u4E00\u884C\uFF01\uFF01\uFF09

                                            \u4EA4\u7ED9spring\u5BB9\u5668\u521B\u5EFA\u7684\u5BF9\u8C61\u662Fservice\u7C7B\u3001dao\u7C7B\u3001controller\u7C7B\u3001\u5DE5\u5177\u7C7B\u7684\u5BF9\u8C61\uFF01\uFF01

                                            \u548C\u6CA1\u6709\u4F7F\u7528\u6846\u67B6\u4E00\u6837\uFF0C\u5C31\u662F\u666E\u901A\u7684\u7C7B

                                          4. \u521B\u5EFAspring\u9700\u8981\u4F7F\u7528\u7684\u914D\u7F6E\u6587\u4EF6\uFF0C\u628A\u7B2C\u4E09\u6B65\u521B\u5EFA\u7684\u7C7B\u7684\u4FE1\u606F\u4EA4\u7ED9spring

                                            \u58F0\u660E\u7C7B\u7684\u4FE1\u606F\uFF0C\u8FD9\u4E9B\u7C7B\u7684\u5BF9\u8C61\u7531spring\u521B\u5EFA\u548C\u7BA1\u7406\uFF0C\u4F7F\u7528<bean>

                                          5. \u6D4B\u8BD5spring\u521B\u5EFA\u7684\u5BF9\u8C61\u3002

                                          6. \u6CE8\u610F\uFF1A

                                            • spring\u4E2D\uFF0C\u7C7B\u4E0D\u662F\u4E0D\u9700\u8981\u5199\uFF0C\u7C7B\u662F\u9700\u8981\u5199\u7684\uFF0C\u53EA\u662F\u7C7B\u7684\u521B\u5EFA\u4EA4\u7ED9spring\u5BB9\u5668\uFF08\u5E95\u5C42\u4F7F\u7528\u53CD\u5C04\u673A\u5236\uFF09

                                              \u5BB9\u5668\u5BF9\u8C61\u7684\u521B\u5EFA\u662F\u5728\u8BFB\u53D6\u914D\u7F6E\u6587\u4EF6\u7684\u65F6\u5019\uFF0C\u8BFB\u53D6\u5B8C\uFF0C\u90A3\u4E48\u5BB9\u5668\u5BF9\u8C61\u521B\u5EFA\u597D\u4E86\uFF0C\u5E76\u4E14\u914D\u7F6E\u6587\u4EF6\u4E2D\u58F0\u660E\u7684\u5BF9\u8C61\u4E5F\u521B\u5EFA\u597D\u4E86

                                            • mybatis\u4E2D\uFF0CDao\u63A5\u53E3\u7684\u5B9E\u73B0\u7C7B\u4E0D\u9700\u8981\u5199\uFF0C\u4E5F\u5C31\u662F\u4E0D\u4EC5\u5BF9\u8C61\u76F4\u63A5\u4EA4\u7ED9mybatis\u521B\u5EFA\uFF0C\u8FDE\u7C7B\u4E5F\u4E0D\u9700\u8981\u5199\uFF08\u5E95\u5C42\u662F\u52A8\u6001\u4EE3\u7406\uFF09\u3002mybatis\u901A\u8FC7\u52A8\u6001\u4EE3\u7406\u521B\u5EFA\u63A5\u53E3\u7684\u5B9E\u73B0\u7C7B\u7684\u5BF9\u8C61\u3002

                                            • \u5728spring\u4E2D\uFF0C\u7C7B\u5F97\u81EA\u5DF1\u5199\uFF08\u4E0D\u8981\u548C\u4E4B\u524Dmybatis\u7684dao\u63A5\u53E3\u7684\u5B9E\u73B0\u7C7B\u641E\u6DF7\u6DC6\uFF0C\u90A3\u4E2A\u4E0D\u9700\u8981\u5199\uFF09\uFF01\uFF01\u5E76\u4E14\u8981\u628A\u7C7B\u7684\u4FE1\u606F\u4EA4\u7ED9\u5BB9\u5668\uFF08\u53EF\u4EE5\u7406\u89E3\u4E3A\u914D\u7F6E\u6587\u4EF6\u3002\uFF09\u628A\u7C7B\u7684\u4FE1\u606F\u4EA4\u7ED9\u914D\u7F6E\u6587\u4EF6\u3002\u5728\u914D\u7F6E\u6587\u4EF6\u4E2D\u58F0\u660E\u7C7B\u7684\u4FE1\u606F\u3002

                                          \u521B\u5EFAspring\u9700\u8981\u4F7F\u7528\u7684\u914D\u7F6E\u6587\u4EF6

                                          <?xml version="1.0" encoding="UTF-8"?>
                                           <beans xmlns="http://www.springframework.org/schema/beans"
                                                  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                                  xsi:schemaLocation="http://www.springframework.org/schema/beans
                                          diff --git a/assets/springMVC.html.c1022e1c.js b/assets/springMVC.html.5bc788ed.js
                                          similarity index 99%
                                          rename from assets/springMVC.html.c1022e1c.js
                                          rename to assets/springMVC.html.5bc788ed.js
                                          index 8eeda96a..067c067a 100644
                                          --- a/assets/springMVC.html.c1022e1c.js
                                          +++ b/assets/springMVC.html.5bc788ed.js
                                          @@ -1,4 +1,4 @@
                                          -import{_ as s,e as n}from"./app.0d029894.js";var a="/study/assets/image-20210919142829981.0d2ed9a3.png",t="/study/assets/image-20210919150621163.bbafeab1.png",p="/study/assets/image-20210919164639662.38b2d152.png",e="/study/assets/image-20210919170054085.2a66fc39.png",l="/study/assets/image-20210919171204648.c186de28.png",o="/study/assets/image-20220104183916856.93992c7e.png",i="/study/assets/image-20210919182247070.3567124b.png",r="/study/assets/image-20210919182437190.4279cf61.png",c="/study/assets/image-20210919190234487.a92cbab4.png",g="/study/assets/image-20210919190342317.5d4fc335.png",u="/study/assets/image-20210919191148781.d9121321.png",d="/study/assets/image-20210919200724445.2e150d89.png",m="/study/assets/image-20210920140127871.fba79dc3.png",v="/study/assets/image-20210919202649206.e6e9b2a9.png",k="/study/assets/image-20210919203342232.52e7bce3.png",h="/study/assets/image-20210919203954551.2c437c4f.png",x="/study/assets/image-20220105155912701.7a086829.png",S="/study/assets/image-20220105160320190.962b5c7e.png",b="/study/assets/image-20220105161557655.ad8eb607.png",f="/study/assets/image-20220105164452466.8784a7e2.png",_="/study/assets/image-20210920163153323.fbe5ba8d.png",q="/study/assets/image-20210920163451874.9f5b470c.png",w="/study/assets/image-20210920163503962.c91a1d5b.png",y="/study/assets/image-20210920164452868.152d771f.png",C="/study/assets/image-20220105180230245.704c8aff.png",j="/study/assets/image-20210920175243206.002abab9.png",M="/study/assets/image-20210920181532578.686b43b4.png",R="/study/assets/image-20210920181757832.41bdba81.png",D="/study/assets/image-20210920183131910.feeceeb6.png",H="/study/assets/image-20210920181853129.9ba774cf.png",V="/study/assets/image-20210920222737796.c1095b11.png",A="/study/assets/image-20210920225628379.a811029b.png",E="/study/assets/image-20210920230143754.3d2367af.png",I="/study/assets/image-20220105200647952.997d7e2d.png",O="/study/assets/image-20220105201211270.1f2aef8f.png",J="/study/assets/image-20210921001040805.943686c2.png",L="/study/assets/image-20210920235208614.255f4d78.png",B="/study/assets/image-20210921000533055.7dab9109.png",N="/study/assets/image-20210921154408642.f9e369bc.png",W="/study/assets/image-20220105213801557.e5311a3b.png",F="/study/assets/image-20210921155010180.16a85e10.png",X="/study/assets/image-20210921155520211.0719a985.png",P="/study/assets/image-20210921160111005.590da383.png",T="/study/assets/image-20210921160602922.e1c4fed8.png",U="/study/assets/image-20210921165533405.1ea01b00.png",Q="/study/assets/image-20210921165714849.a735a846.png",$="/study/assets/image-20210921174059063.559abe02.png",G="/study/assets/image-20220106173346685.20a3dcca.png",z="/study/assets/image-20210921183533644.43bd27af.png",K="/study/assets/image-20210921184133610.2edc8895.png",Y="/study/assets/image-20210921184311653.2efc74bf.png",Z="/study/assets/image-20210921185032302.16d72f7b.png",ss="/study/assets/image-20210921185147330.dbd304f0.png",ns="/study/assets/image-20210921184643169.39d779cf.png",as="/study/assets/image-20220106192731365.4eec5c14.png",ts="/study/assets/image-20210921202019817.4ba844df.png";const ps={},es=n('

                                          SpringMVC

                                          \u7B2C1\u7AE0 SpringMVC\u6982\u8FF0

                                          \u6982\u8FF0

                                          1. springMVC:\u57FA\u4E8Espring\u7684\u6846\u67B6\uFF0C\u5B9E\u9645\u4E0A\u5C31\u662Fspring\u7684\u4E00\u4E2A\u6A21\u5757

                                            \u8FD9\u4E2A\u6A21\u5757\u4E13\u95E8\u505Aweb\u5F00\u53D1

                                            \u57FA\u4E8Eweb\u5F00\u53D1\u7684\u6846\u67B6\u7684\u5E95\u5C42\u90FD\u662F\u57FA\u4E8Eservlet

                                            springMVC\u53EF\u4EE5\u7406\u89E3\u6210\u662Fservlet\u7684\u4E00\u4E2A\u5347\u7EA7\uFF0C\u5C31\u50CF\u628Amybatis\u7406\u89E3\u6210JDBC\u7684\u5347\u7EA7

                                            \u76F4\u63A5\u7528servlet\u4E0D\u65B9\u4FBF\uFF0C\u6240\u4EE5\u6211\u4EEC\u7528\u6846\u67B6\u6765\u8BA9web\u5F00\u53D1\u66F4\u52A0\u6D41\u7545\u7B80\u5355

                                            servlet\u662F\u5728controller\u5C42\uFF0C\u662Ftomcat\u670D\u52A1\u5668\u7684\u6838\u5FC3\u7EC4\u4EF6\u4E4B\u4E00\uFF0C\u7528\u4E8E\u63A5\u53D7\u8BF7\u6C42\uFF0C\u8C03\u7528\u4E1A\u52A1\u5C42\u5904\u7406\u8BF7\u6C42\uFF0C\u8FD4\u56DE\u8BF7\u6C42

                                          2. springMVC\u6846\u67B6\u662F\u5728servlet\u57FA\u7840\u4E0A\u52A0\u5165\u4E00\u4E9B\u529F\u80FD\uFF0C\u8BA9\u6211\u4EEC\u505Aweb\u5F00\u53D1\u66F4\u52A0\u65B9\u4FBF\u3002

                                          3. springMVC\u5B9E\u9645\u4E0A\u5C31\u662F\u4E00\u4E2Aspring\uFF0Cspring\u662F\u4E00\u4E2A\u5BB9\u5668\uFF0C\u901A\u8FC7ioc\u7BA1\u7406\u5BF9\u8C61\uFF0C\u4F7F\u7528<bean>\u6807\u7B7E\u6216\u8005\u6CE8\u89E3\u7684\u5F62\u5F0F\u7BA1\u7406\u5BF9\u8C61

                                            springMVC\u80FD\u591F\u521B\u5EFA\u5BF9\u8C61\uFF0C\u653E\u5165\u5230\u5BB9\u5668\u4E2D\uFF08springMVC\u7684\u5BB9\u5668\uFF09\uFF0CspringMVC\u5BB9\u5668\u4E2D\u653E\u7684\u662F\u63A7\u5236\u5668\u5BF9\u8C61\uFF0C\u7528\u7684\u662F@Controller\u6CE8\u89E3

                                          4. \u5728web\u5F00\u53D1\u4E2D\uFF0Cspring\u5BB9\u5668applicationContext\u662F\u901A\u8FC7\u76D1\u542C\u5668\u7ED3\u5408ServletContext\u6765\u5B58\u50A8\u8FD9\u4E2A\u5BB9\u5668\uFF0C\u4F7Fspring\u5BB9\u5668\u6210\u4E3A\u4E00\u4E2A\u5355\u4F8B\u521B\u5EFA\uFF0C\u5E76\u4E14\u53EF\u4EE5\u901A\u8FC7servletContext\u5168\u5C40\u4F5C\u7528\u57DF\u6765\u83B7\u53D6\u5230\u8FD9\u4E2A\u5BB9\u5668

                                          5. \u6211\u4EEC\u8981\u505A\u7684\u5C31\u662F\u4F7F\u7528@Controller\u521B\u5EFA\u63A7\u5236\u5668\u5BF9\u8C61\uFF0C\u628A\u5BF9\u8C61\u653E\u5165\u5230spring MVC\u5BB9\u5668\u4E2D\uFF0C\u628A\u521B\u5EFA\u7684\u5BF9\u8C61\u4F5C\u4E3A\u63A7\u5236\u5668\u4F7F\u7528\uFF0C\u8FD9\u4E2A\u63A7\u5236\u5668\u5BF9\u8C61\u80FD\u591F\u63A5\u6536\u7528\u6237\u7684\u8BF7\u6C42\uFF0C\u663E\u793A\u5904\u7406\u7684\u7ED3\u679C\uFF0C\u5C31\u5F53\u4F5C\u4E00\u4E2Aservlet\u4F7F\u7528\u3002

                                            \u4F7F\u7528@Controller\u8FD9\u4E2A\u6CE8\u89E3\u521B\u5EFA\u7684\u5C31\u662F\u4E00\u4E2A\u666E\u901A\u7C7B\u7684\u5BF9\u8C61---\u4F5C\u4E3A\u63A7\u5236\u5668\u5BF9\u8C61\uFF0C\u4E0D\u662FServlet\uFF0C\u4F46\u662Fspringmvc\u8D4B\u4E88\u4E86\u63A7\u5236\u5668\u5BF9\u8C61\u4E00\u4E9B\u989D\u5916\u7684\u529F\u80FD\uFF0C\u8BA9\u5B83\u53EF\u4EE5\u50CFservlet\u4E00\u6837\u5DE5\u4F5C\u3002\u52A0\u4E86\u8FD9\u4E2A@Controller\u6CE8\u89E3\uFF0C\u5C31\u80FD\u8BA9\u8FD9\u4E2A\u7C7B\u5B8C\u6210servlet\u7684\u529F\u80FD\u3002

                                            \u4E0D\u662Fservlet\u7684\u539F\u56E0\u662Fservlet\u7C7B\u90FD\u8981\u7EE7\u627F\u4E8EHttpServlet\u7C7B\u3002

                                          6. web\u5F00\u53D1\u7684\u5E95\u5C42\u90FD\u662Fservlet

                                            springmvc\u4E2D\u6709\u4E00\u4E2A\u5BF9\u8C61\u662Fservlet\uFF1ADispatcherServlet---\u4E2D\u592E\u8C03\u5EA6\u5668

                                            DispatcherServlet\uFF1A\u8D1F\u8D23\u63A5\u6536\u7528\u6237\u7684\u6240\u6709\u8BF7\u6C42\uFF0C\u7528\u6237\u628A\u8BF7\u6C42\u7ED9\u4E86DispatcherServlet\uFF0C\u4E4B\u540EDispatcherServlet\u628A\u8BF7\u6C42\u8F6C\u53D1\u7ED9\u6211\u4EEC\u7684Controller\u5BF9\u8C61\uFF0C\u6700\u540E\u662FController\u5BF9\u8C61\u5904\u7406\u8BF7\u6C42\u3002

                                            Controller\u5BF9\u8C61\u662F\u7531springMVC\u5BB9\u5668\u5E2E\u6211\u4EEC\u521B\u5EFA\u7684\uFF0C\u7528\u7684\u5C31\u662FIOC\u6280\u672F

                                          7. xxx.jsp-----DispatcherServlet(Servlet)----\u8F6C\u53D1\u3001\u5206\u914D\u7ED9Controller\u5BF9\u8C61\uFF08@Controller\u6CE8\u89E3\u521B\u5EFA\u7684\u5BF9\u8C61\uFF08ioc\u4E2D\u7684\u6CE8\u89E3\u6CE8\u5165\uFF09\uFF09-----Controller\u7C7B\u5904\u7406\u8BF7\u6C42\u3002

                                            \u6BD4\u4E4B\u524D\u7684\u8FC7\u7A0B\u591A\u4E86\u4E00\u4E2A\u8F6C\u53D1\uFF0C DispatcherServlet\u4E0D\u5904\u7406\u8BF7\u6C42\uFF0C \u800C\u662F\u8F6C\u53D1\u8BF7\u6C42\u7ED9Controller\u5BF9\u8C61

                                          8. image-20210919142829981

                                          \u642D\u5EFAspringmvc\u9879\u76EE\u6B65\u9AA4

                                          1. \u65B0\u5EFAmaven-web\u5DE5\u7A0B

                                          2. \u52A0\u5165\u4F9D\u8D56

                                            • spring-webmvc\u4F9D\u8D56----\u4EE3\u8868springmvc\u6846\u67B6\uFF0C\u4F1A\u95F4\u63A5\u5730\u628Aspring\u7684\u4F9D\u8D56\u90FD\u52A0\u5165\u5230\u9879\u76EE\u4E2D\uFF0C\u56E0\u4E3Aspringmvc\u662F\u57FA\u4E8Espring\u7684

                                            • servlet\u4F9D\u8D56\uFF0C\u5E95\u5C42\u8FD8\u662F\u57FA\u4E8Eservlet

                                                <dependency>
                                            +import{_ as s,e as n}from"./app.f8791b52.js";var a="/study/assets/image-20210919142829981.0d2ed9a3.png",t="/study/assets/image-20210919150621163.bbafeab1.png",p="/study/assets/image-20210919164639662.38b2d152.png",e="/study/assets/image-20210919170054085.2a66fc39.png",l="/study/assets/image-20210919171204648.c186de28.png",o="/study/assets/image-20220104183916856.93992c7e.png",i="/study/assets/image-20210919182247070.3567124b.png",r="/study/assets/image-20210919182437190.4279cf61.png",c="/study/assets/image-20210919190234487.a92cbab4.png",g="/study/assets/image-20210919190342317.5d4fc335.png",u="/study/assets/image-20210919191148781.d9121321.png",d="/study/assets/image-20210919200724445.2e150d89.png",m="/study/assets/image-20210920140127871.fba79dc3.png",v="/study/assets/image-20210919202649206.e6e9b2a9.png",k="/study/assets/image-20210919203342232.52e7bce3.png",h="/study/assets/image-20210919203954551.2c437c4f.png",x="/study/assets/image-20220105155912701.7a086829.png",S="/study/assets/image-20220105160320190.962b5c7e.png",b="/study/assets/image-20220105161557655.ad8eb607.png",f="/study/assets/image-20220105164452466.8784a7e2.png",_="/study/assets/image-20210920163153323.fbe5ba8d.png",q="/study/assets/image-20210920163451874.9f5b470c.png",w="/study/assets/image-20210920163503962.c91a1d5b.png",y="/study/assets/image-20210920164452868.152d771f.png",C="/study/assets/image-20220105180230245.704c8aff.png",j="/study/assets/image-20210920175243206.002abab9.png",M="/study/assets/image-20210920181532578.686b43b4.png",R="/study/assets/image-20210920181757832.41bdba81.png",D="/study/assets/image-20210920183131910.feeceeb6.png",H="/study/assets/image-20210920181853129.9ba774cf.png",V="/study/assets/image-20210920222737796.c1095b11.png",A="/study/assets/image-20210920225628379.a811029b.png",E="/study/assets/image-20210920230143754.3d2367af.png",I="/study/assets/image-20220105200647952.997d7e2d.png",O="/study/assets/image-20220105201211270.1f2aef8f.png",J="/study/assets/image-20210921001040805.943686c2.png",L="/study/assets/image-20210920235208614.255f4d78.png",B="/study/assets/image-20210921000533055.7dab9109.png",N="/study/assets/image-20210921154408642.f9e369bc.png",W="/study/assets/image-20220105213801557.e5311a3b.png",F="/study/assets/image-20210921155010180.16a85e10.png",X="/study/assets/image-20210921155520211.0719a985.png",P="/study/assets/image-20210921160111005.590da383.png",T="/study/assets/image-20210921160602922.e1c4fed8.png",U="/study/assets/image-20210921165533405.1ea01b00.png",Q="/study/assets/image-20210921165714849.a735a846.png",$="/study/assets/image-20210921174059063.559abe02.png",G="/study/assets/image-20220106173346685.20a3dcca.png",z="/study/assets/image-20210921183533644.43bd27af.png",K="/study/assets/image-20210921184133610.2edc8895.png",Y="/study/assets/image-20210921184311653.2efc74bf.png",Z="/study/assets/image-20210921185032302.16d72f7b.png",ss="/study/assets/image-20210921185147330.dbd304f0.png",ns="/study/assets/image-20210921184643169.39d779cf.png",as="/study/assets/image-20220106192731365.4eec5c14.png",ts="/study/assets/image-20210921202019817.4ba844df.png";const ps={},es=n('

                                            SpringMVC

                                            \u7B2C1\u7AE0 SpringMVC\u6982\u8FF0

                                            \u6982\u8FF0

                                            1. springMVC:\u57FA\u4E8Espring\u7684\u6846\u67B6\uFF0C\u5B9E\u9645\u4E0A\u5C31\u662Fspring\u7684\u4E00\u4E2A\u6A21\u5757

                                              \u8FD9\u4E2A\u6A21\u5757\u4E13\u95E8\u505Aweb\u5F00\u53D1

                                              \u57FA\u4E8Eweb\u5F00\u53D1\u7684\u6846\u67B6\u7684\u5E95\u5C42\u90FD\u662F\u57FA\u4E8Eservlet

                                              springMVC\u53EF\u4EE5\u7406\u89E3\u6210\u662Fservlet\u7684\u4E00\u4E2A\u5347\u7EA7\uFF0C\u5C31\u50CF\u628Amybatis\u7406\u89E3\u6210JDBC\u7684\u5347\u7EA7

                                              \u76F4\u63A5\u7528servlet\u4E0D\u65B9\u4FBF\uFF0C\u6240\u4EE5\u6211\u4EEC\u7528\u6846\u67B6\u6765\u8BA9web\u5F00\u53D1\u66F4\u52A0\u6D41\u7545\u7B80\u5355

                                              servlet\u662F\u5728controller\u5C42\uFF0C\u662Ftomcat\u670D\u52A1\u5668\u7684\u6838\u5FC3\u7EC4\u4EF6\u4E4B\u4E00\uFF0C\u7528\u4E8E\u63A5\u53D7\u8BF7\u6C42\uFF0C\u8C03\u7528\u4E1A\u52A1\u5C42\u5904\u7406\u8BF7\u6C42\uFF0C\u8FD4\u56DE\u8BF7\u6C42

                                            2. springMVC\u6846\u67B6\u662F\u5728servlet\u57FA\u7840\u4E0A\u52A0\u5165\u4E00\u4E9B\u529F\u80FD\uFF0C\u8BA9\u6211\u4EEC\u505Aweb\u5F00\u53D1\u66F4\u52A0\u65B9\u4FBF\u3002

                                            3. springMVC\u5B9E\u9645\u4E0A\u5C31\u662F\u4E00\u4E2Aspring\uFF0Cspring\u662F\u4E00\u4E2A\u5BB9\u5668\uFF0C\u901A\u8FC7ioc\u7BA1\u7406\u5BF9\u8C61\uFF0C\u4F7F\u7528<bean>\u6807\u7B7E\u6216\u8005\u6CE8\u89E3\u7684\u5F62\u5F0F\u7BA1\u7406\u5BF9\u8C61

                                              springMVC\u80FD\u591F\u521B\u5EFA\u5BF9\u8C61\uFF0C\u653E\u5165\u5230\u5BB9\u5668\u4E2D\uFF08springMVC\u7684\u5BB9\u5668\uFF09\uFF0CspringMVC\u5BB9\u5668\u4E2D\u653E\u7684\u662F\u63A7\u5236\u5668\u5BF9\u8C61\uFF0C\u7528\u7684\u662F@Controller\u6CE8\u89E3

                                            4. \u5728web\u5F00\u53D1\u4E2D\uFF0Cspring\u5BB9\u5668applicationContext\u662F\u901A\u8FC7\u76D1\u542C\u5668\u7ED3\u5408ServletContext\u6765\u5B58\u50A8\u8FD9\u4E2A\u5BB9\u5668\uFF0C\u4F7Fspring\u5BB9\u5668\u6210\u4E3A\u4E00\u4E2A\u5355\u4F8B\u521B\u5EFA\uFF0C\u5E76\u4E14\u53EF\u4EE5\u901A\u8FC7servletContext\u5168\u5C40\u4F5C\u7528\u57DF\u6765\u83B7\u53D6\u5230\u8FD9\u4E2A\u5BB9\u5668

                                            5. \u6211\u4EEC\u8981\u505A\u7684\u5C31\u662F\u4F7F\u7528@Controller\u521B\u5EFA\u63A7\u5236\u5668\u5BF9\u8C61\uFF0C\u628A\u5BF9\u8C61\u653E\u5165\u5230spring MVC\u5BB9\u5668\u4E2D\uFF0C\u628A\u521B\u5EFA\u7684\u5BF9\u8C61\u4F5C\u4E3A\u63A7\u5236\u5668\u4F7F\u7528\uFF0C\u8FD9\u4E2A\u63A7\u5236\u5668\u5BF9\u8C61\u80FD\u591F\u63A5\u6536\u7528\u6237\u7684\u8BF7\u6C42\uFF0C\u663E\u793A\u5904\u7406\u7684\u7ED3\u679C\uFF0C\u5C31\u5F53\u4F5C\u4E00\u4E2Aservlet\u4F7F\u7528\u3002

                                              \u4F7F\u7528@Controller\u8FD9\u4E2A\u6CE8\u89E3\u521B\u5EFA\u7684\u5C31\u662F\u4E00\u4E2A\u666E\u901A\u7C7B\u7684\u5BF9\u8C61---\u4F5C\u4E3A\u63A7\u5236\u5668\u5BF9\u8C61\uFF0C\u4E0D\u662FServlet\uFF0C\u4F46\u662Fspringmvc\u8D4B\u4E88\u4E86\u63A7\u5236\u5668\u5BF9\u8C61\u4E00\u4E9B\u989D\u5916\u7684\u529F\u80FD\uFF0C\u8BA9\u5B83\u53EF\u4EE5\u50CFservlet\u4E00\u6837\u5DE5\u4F5C\u3002\u52A0\u4E86\u8FD9\u4E2A@Controller\u6CE8\u89E3\uFF0C\u5C31\u80FD\u8BA9\u8FD9\u4E2A\u7C7B\u5B8C\u6210servlet\u7684\u529F\u80FD\u3002

                                              \u4E0D\u662Fservlet\u7684\u539F\u56E0\u662Fservlet\u7C7B\u90FD\u8981\u7EE7\u627F\u4E8EHttpServlet\u7C7B\u3002

                                            6. web\u5F00\u53D1\u7684\u5E95\u5C42\u90FD\u662Fservlet

                                              springmvc\u4E2D\u6709\u4E00\u4E2A\u5BF9\u8C61\u662Fservlet\uFF1ADispatcherServlet---\u4E2D\u592E\u8C03\u5EA6\u5668

                                              DispatcherServlet\uFF1A\u8D1F\u8D23\u63A5\u6536\u7528\u6237\u7684\u6240\u6709\u8BF7\u6C42\uFF0C\u7528\u6237\u628A\u8BF7\u6C42\u7ED9\u4E86DispatcherServlet\uFF0C\u4E4B\u540EDispatcherServlet\u628A\u8BF7\u6C42\u8F6C\u53D1\u7ED9\u6211\u4EEC\u7684Controller\u5BF9\u8C61\uFF0C\u6700\u540E\u662FController\u5BF9\u8C61\u5904\u7406\u8BF7\u6C42\u3002

                                              Controller\u5BF9\u8C61\u662F\u7531springMVC\u5BB9\u5668\u5E2E\u6211\u4EEC\u521B\u5EFA\u7684\uFF0C\u7528\u7684\u5C31\u662FIOC\u6280\u672F

                                            7. xxx.jsp-----DispatcherServlet(Servlet)----\u8F6C\u53D1\u3001\u5206\u914D\u7ED9Controller\u5BF9\u8C61\uFF08@Controller\u6CE8\u89E3\u521B\u5EFA\u7684\u5BF9\u8C61\uFF08ioc\u4E2D\u7684\u6CE8\u89E3\u6CE8\u5165\uFF09\uFF09-----Controller\u7C7B\u5904\u7406\u8BF7\u6C42\u3002

                                              \u6BD4\u4E4B\u524D\u7684\u8FC7\u7A0B\u591A\u4E86\u4E00\u4E2A\u8F6C\u53D1\uFF0C DispatcherServlet\u4E0D\u5904\u7406\u8BF7\u6C42\uFF0C \u800C\u662F\u8F6C\u53D1\u8BF7\u6C42\u7ED9Controller\u5BF9\u8C61

                                            8. image-20210919142829981

                                            \u642D\u5EFAspringmvc\u9879\u76EE\u6B65\u9AA4

                                            1. \u65B0\u5EFAmaven-web\u5DE5\u7A0B

                                            2. \u52A0\u5165\u4F9D\u8D56

                                              • spring-webmvc\u4F9D\u8D56----\u4EE3\u8868springmvc\u6846\u67B6\uFF0C\u4F1A\u95F4\u63A5\u5730\u628Aspring\u7684\u4F9D\u8D56\u90FD\u52A0\u5165\u5230\u9879\u76EE\u4E2D\uFF0C\u56E0\u4E3Aspringmvc\u662F\u57FA\u4E8Espring\u7684

                                              • servlet\u4F9D\u8D56\uFF0C\u5E95\u5C42\u8FD8\u662F\u57FA\u4E8Eservlet

                                                  <dependency>
                                                     <groupId>javax.servlet</groupId>
                                                     <artifactId>javax.servlet-api</artifactId>
                                                     <version>3.1.0</version>
                                              diff --git a/assets/springMVC.html.72533e36.js b/assets/springMVC.html.841e0238.js
                                              similarity index 98%
                                              rename from assets/springMVC.html.72533e36.js
                                              rename to assets/springMVC.html.841e0238.js
                                              index 598a29bf..0ccee4e7 100644
                                              --- a/assets/springMVC.html.72533e36.js
                                              +++ b/assets/springMVC.html.841e0238.js
                                              @@ -1 +1 @@
                                              -const l={key:"v-0788dc22",path:"/java/%E6%A1%86%E6%9E%B6/springmvc/springMVC.html",title:"SpringMVC",lang:"zh-CN",frontmatter:{},excerpt:"",headers:[{level:2,title:"\u7B2C1\u7AE0 SpringMVC\u6982\u8FF0",slug:"\u7B2C1\u7AE0-springmvc\u6982\u8FF0",children:[{level:3,title:"\u6982\u8FF0",slug:"\u6982\u8FF0",children:[]},{level:3,title:"\u642D\u5EFAspringmvc\u9879\u76EE\u6B65\u9AA4",slug:"\u642D\u5EFAspringmvc\u9879\u76EE\u6B65\u9AA4",children:[]},{level:3,title:"springmvc\u8BF7\u6C42\u7684\u5904\u7406\u6D41\u7A0B",slug:"springmvc\u8BF7\u6C42\u7684\u5904\u7406\u6D41\u7A0B",children:[]},{level:3,title:"DispatcherServlet\u7684\u4F5C\u7528",slug:"dispatcherservlet\u7684\u4F5C\u7528",children:[]}]},{level:2,title:"\u7B2C2\u7AE0 SpringMVC\u6CE8\u89E3\u5F0F\u5F00\u53D1",slug:"\u7B2C2\u7AE0-springmvc\u6CE8\u89E3\u5F0F\u5F00\u53D1",children:[{level:3,title:"@RequestMapping",slug:"requestmapping",children:[]},{level:3,title:"\u63A5\u6536\u7528\u6237\u63D0\u4EA4\u7684\u53C2\u6570",slug:"\u63A5\u6536\u7528\u6237\u63D0\u4EA4\u7684\u53C2\u6570",children:[{level:4,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-1",children:[]},{level:4,title:"\u9010\u4E2A\u63A5\u6536\u8BF7\u6C42\u53C2\u6570",slug:"\u9010\u4E2A\u63A5\u6536\u8BF7\u6C42\u53C2\u6570",children:[]},{level:4,title:"\u7528\u4E00\u4E2A\u5BF9\u8C61\u6765\u63A5\u6536\u8BF7\u6C42\u53C2\u6570",slug:"\u7528\u4E00\u4E2A\u5BF9\u8C61\u6765\u63A5\u6536\u8BF7\u6C42\u53C2\u6570",children:[]}]},{level:3,title:"\u63A7\u5236\u5668\u65B9\u6CD5\u7684\u8FD4\u56DE\u503C",slug:"\u63A7\u5236\u5668\u65B9\u6CD5\u7684\u8FD4\u56DE\u503C",children:[{level:4,title:"\u8FD4\u56DEModelAndView",slug:"\u8FD4\u56DEmodelandview",children:[]},{level:4,title:"\u8FD4\u56DEString",slug:"\u8FD4\u56DEstring",children:[]},{level:4,title:"\u8FD4\u56DEvoid",slug:"\u8FD4\u56DEvoid",children:[]},{level:4,title:"\u8FD4\u56DE\u5BF9\u8C61Object----\u9700\u52A0@ResponseBody",slug:"\u8FD4\u56DE\u5BF9\u8C61object-\u9700\u52A0-responsebody",children:[]}]},{level:3,title:"\u89E3\u8BFB",slug:"\u89E3\u8BFB-url-pattern",children:[]},{level:3,title:"\u8BBF\u95EE\u5730\u5740",slug:"\u8BBF\u95EE\u5730\u5740",children:[]}]},{level:2,title:"\u7B2C3\u7AE0 SSM\u6574\u5408\u5F00\u53D1",slug:"\u7B2C3\u7AE0-ssm\u6574\u5408\u5F00\u53D1",children:[{level:3,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-2",children:[]},{level:3,title:"\u6574\u5408\u5F00\u53D1\u6B65\u9AA4",slug:"\u6574\u5408\u5F00\u53D1\u6B65\u9AA4",children:[]}]},{level:2,title:"\u7B2C4\u7AE0 SpringMVC\u6838\u5FC3\u6280\u672F",slug:"\u7B2C4\u7AE0-springmvc\u6838\u5FC3\u6280\u672F",children:[{level:3,title:"\u8BF7\u6C42\u91CD\u5B9A\u5411\u548C\u8F6C\u53D1",slug:"\u8BF7\u6C42\u91CD\u5B9A\u5411\u548C\u8F6C\u53D1",children:[]},{level:3,title:"\u5F02\u5E38\u5904\u7406",slug:"\u5F02\u5E38\u5904\u7406",children:[{level:4,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-3",children:[]},{level:4,title:"\u5F02\u5E38\u5904\u7406\u6B65\u9AA4",slug:"\u5F02\u5E38\u5904\u7406\u6B65\u9AA4",children:[]}]},{level:3,title:"\u62E6\u622A\u5668",slug:"\u62E6\u622A\u5668",children:[{level:4,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-4",children:[]},{level:4,title:"\u62E6\u622A\u5668\u7684\u4F7F\u7528\u6B65\u9AA4",slug:"\u62E6\u622A\u5668\u7684\u4F7F\u7528\u6B65\u9AA4",children:[]},{level:4,title:"HandlerInterceptor\u63A5\u53E3\u7684\u4E09\u4E2A\u65B9\u6CD5",slug:"handlerinterceptor\u63A5\u53E3\u7684\u4E09\u4E2A\u65B9\u6CD5",children:[]},{level:4,title:"\u591A\u4E2A\u62E6\u622A\u5668\u7684\u4E09\u4E2A\u65B9\u6CD5\u6267\u884C\u987A\u5E8F",slug:"\u591A\u4E2A\u62E6\u622A\u5668\u7684\u4E09\u4E2A\u65B9\u6CD5\u6267\u884C\u987A\u5E8F",children:[]},{level:4,title:"\u62E6\u622A\u5668\u548C\u8FC7\u6EE4\u5668\u7684\u533A\u522B",slug:"\u62E6\u622A\u5668\u548C\u8FC7\u6EE4\u5668\u7684\u533A\u522B",children:[]}]},{level:3,title:"springmvc\u5185\u90E8\u8BF7\u6C42\u7684\u5904\u7406\u6D41\u7A0B",slug:"springmvc\u5185\u90E8\u8BF7\u6C42\u7684\u5904\u7406\u6D41\u7A0B",children:[]}]}],git:{updatedTime:1710173765e3,contributors:[{name:"shailene",email:"64005626+shaileneF@users.noreply.github.com",commits:1}]},filePathRelative:"java/\u6846\u67B6/springmvc/springMVC.md"};export{l as data};
                                              +const l={key:"v-0788dc22",path:"/java/%E6%A1%86%E6%9E%B6/springmvc/springMVC.html",title:"SpringMVC",lang:"zh-CN",frontmatter:{},excerpt:"",headers:[{level:2,title:"\u7B2C1\u7AE0 SpringMVC\u6982\u8FF0",slug:"\u7B2C1\u7AE0-springmvc\u6982\u8FF0",children:[{level:3,title:"\u6982\u8FF0",slug:"\u6982\u8FF0",children:[]},{level:3,title:"\u642D\u5EFAspringmvc\u9879\u76EE\u6B65\u9AA4",slug:"\u642D\u5EFAspringmvc\u9879\u76EE\u6B65\u9AA4",children:[]},{level:3,title:"springmvc\u8BF7\u6C42\u7684\u5904\u7406\u6D41\u7A0B",slug:"springmvc\u8BF7\u6C42\u7684\u5904\u7406\u6D41\u7A0B",children:[]},{level:3,title:"DispatcherServlet\u7684\u4F5C\u7528",slug:"dispatcherservlet\u7684\u4F5C\u7528",children:[]}]},{level:2,title:"\u7B2C2\u7AE0 SpringMVC\u6CE8\u89E3\u5F0F\u5F00\u53D1",slug:"\u7B2C2\u7AE0-springmvc\u6CE8\u89E3\u5F0F\u5F00\u53D1",children:[{level:3,title:"@RequestMapping",slug:"requestmapping",children:[]},{level:3,title:"\u63A5\u6536\u7528\u6237\u63D0\u4EA4\u7684\u53C2\u6570",slug:"\u63A5\u6536\u7528\u6237\u63D0\u4EA4\u7684\u53C2\u6570",children:[{level:4,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-1",children:[]},{level:4,title:"\u9010\u4E2A\u63A5\u6536\u8BF7\u6C42\u53C2\u6570",slug:"\u9010\u4E2A\u63A5\u6536\u8BF7\u6C42\u53C2\u6570",children:[]},{level:4,title:"\u7528\u4E00\u4E2A\u5BF9\u8C61\u6765\u63A5\u6536\u8BF7\u6C42\u53C2\u6570",slug:"\u7528\u4E00\u4E2A\u5BF9\u8C61\u6765\u63A5\u6536\u8BF7\u6C42\u53C2\u6570",children:[]}]},{level:3,title:"\u63A7\u5236\u5668\u65B9\u6CD5\u7684\u8FD4\u56DE\u503C",slug:"\u63A7\u5236\u5668\u65B9\u6CD5\u7684\u8FD4\u56DE\u503C",children:[{level:4,title:"\u8FD4\u56DEModelAndView",slug:"\u8FD4\u56DEmodelandview",children:[]},{level:4,title:"\u8FD4\u56DEString",slug:"\u8FD4\u56DEstring",children:[]},{level:4,title:"\u8FD4\u56DEvoid",slug:"\u8FD4\u56DEvoid",children:[]},{level:4,title:"\u8FD4\u56DE\u5BF9\u8C61Object----\u9700\u52A0@ResponseBody",slug:"\u8FD4\u56DE\u5BF9\u8C61object-\u9700\u52A0-responsebody",children:[]}]},{level:3,title:"\u89E3\u8BFB",slug:"\u89E3\u8BFB-url-pattern",children:[]},{level:3,title:"\u8BBF\u95EE\u5730\u5740",slug:"\u8BBF\u95EE\u5730\u5740",children:[]}]},{level:2,title:"\u7B2C3\u7AE0 SSM\u6574\u5408\u5F00\u53D1",slug:"\u7B2C3\u7AE0-ssm\u6574\u5408\u5F00\u53D1",children:[{level:3,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-2",children:[]},{level:3,title:"\u6574\u5408\u5F00\u53D1\u6B65\u9AA4",slug:"\u6574\u5408\u5F00\u53D1\u6B65\u9AA4",children:[]}]},{level:2,title:"\u7B2C4\u7AE0 SpringMVC\u6838\u5FC3\u6280\u672F",slug:"\u7B2C4\u7AE0-springmvc\u6838\u5FC3\u6280\u672F",children:[{level:3,title:"\u8BF7\u6C42\u91CD\u5B9A\u5411\u548C\u8F6C\u53D1",slug:"\u8BF7\u6C42\u91CD\u5B9A\u5411\u548C\u8F6C\u53D1",children:[]},{level:3,title:"\u5F02\u5E38\u5904\u7406",slug:"\u5F02\u5E38\u5904\u7406",children:[{level:4,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-3",children:[]},{level:4,title:"\u5F02\u5E38\u5904\u7406\u6B65\u9AA4",slug:"\u5F02\u5E38\u5904\u7406\u6B65\u9AA4",children:[]}]},{level:3,title:"\u62E6\u622A\u5668",slug:"\u62E6\u622A\u5668",children:[{level:4,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-4",children:[]},{level:4,title:"\u62E6\u622A\u5668\u7684\u4F7F\u7528\u6B65\u9AA4",slug:"\u62E6\u622A\u5668\u7684\u4F7F\u7528\u6B65\u9AA4",children:[]},{level:4,title:"HandlerInterceptor\u63A5\u53E3\u7684\u4E09\u4E2A\u65B9\u6CD5",slug:"handlerinterceptor\u63A5\u53E3\u7684\u4E09\u4E2A\u65B9\u6CD5",children:[]},{level:4,title:"\u591A\u4E2A\u62E6\u622A\u5668\u7684\u4E09\u4E2A\u65B9\u6CD5\u6267\u884C\u987A\u5E8F",slug:"\u591A\u4E2A\u62E6\u622A\u5668\u7684\u4E09\u4E2A\u65B9\u6CD5\u6267\u884C\u987A\u5E8F",children:[]},{level:4,title:"\u62E6\u622A\u5668\u548C\u8FC7\u6EE4\u5668\u7684\u533A\u522B",slug:"\u62E6\u622A\u5668\u548C\u8FC7\u6EE4\u5668\u7684\u533A\u522B",children:[]}]},{level:3,title:"springmvc\u5185\u90E8\u8BF7\u6C42\u7684\u5904\u7406\u6D41\u7A0B",slug:"springmvc\u5185\u90E8\u8BF7\u6C42\u7684\u5904\u7406\u6D41\u7A0B",children:[]}]}],git:{updatedTime:1710173784e3,contributors:[{name:"shailene",email:"64005626+shaileneF@users.noreply.github.com",commits:1}]},filePathRelative:"java/\u6846\u67B6/springmvc/springMVC.md"};export{l as data};
                                              diff --git a/assets/springboot.html.a6d2266b.js b/assets/springboot.html.0a246b01.js
                                              similarity index 99%
                                              rename from assets/springboot.html.a6d2266b.js
                                              rename to assets/springboot.html.0a246b01.js
                                              index 0e47bec6..702ef7f5 100644
                                              --- a/assets/springboot.html.a6d2266b.js
                                              +++ b/assets/springboot.html.0a246b01.js
                                              @@ -1,4 +1,4 @@
                                              -import{_ as n,e as a}from"./app.0d029894.js";var s="/study/assets/image-20220109172015393.b2bea150.png",t="/study/assets/image-20220109172632702.edecdf0b.png",p="/study/assets/image-20220109191345685.2be380c3.png",e="/study/assets/image-20220109191851866.c2bdaf08.png",o="/study/assets/image-20220109192058645.fce5cd05.png",c="/study/assets/image-20220109193243155.07ecb077.png",l="/study/assets/image-20220109194501005.68d38648.png",i="/study/assets/image-20220109194529828.67f05266.png",u="/study/assets/image-20220109195902935.da3776f5.png",r="/study/assets/image-20220109200259743.b2c2c661.png",k="/study/assets/image-20220109200749417.15d86ec0.png",g="/study/assets/image-20220109202039561.470d01ea.png",d="/study/assets/image-20220109202809633.6e045374.png",m="/study/assets/image-20220109214455395.943cc1df.png",h="/study/assets/image-20220109214513064.b7ed74b1.png",v="/study/assets/image-20220110134309826.49d78a20.png",b="/study/assets/image-20220111124346613.14263164.png",y="/study/assets/image-20220111153801895.186e5ba2.png",f="/study/assets/image-20220111151328661.5f3e1e4c.png",x="/study/assets/image-20220111154507023.79fc45d7.png",q="/study/assets/image-20220111170450011.7b66f4e4.png",S="/study/assets/image-20220111170831002.a69e43f3.png",w="/study/assets/image-20220111175339693.d4f59267.png",j="/study/assets/image-20220111233229358.7cf7e94e.png",C="/study/assets/image-20220111233512942.704a28ce.png",R="/study/assets/image-20220111235040462.c28afe51.png",I="/study/assets/image-20220111235708371.a06c2a63.png",_="/study/assets/image-20220112000104419.c08264a0.png",M="/study/assets/image-20220113145837923.f60d14a7.png",T="/study/assets/image-20220113145907602.d857b8bc.png",B="/study/assets/image-20220112002815522.62106216.png",A="/study/assets/image-20220113135215392.03542f08.png",E="/study/assets/image-20220113164317002.a9702162.png",P="/study/assets/image-20220113173851104.7b106e72.png",L="/study/assets/image-20220114165603471.fa1a6bbb.png",F="/study/assets/image-20220114181707180.fd14d8d4.png",O="/study/assets/image-20220114195307270-16421611874871.f6e8c921.png",V="/study/assets/image-20220114195521639.7abad8d8.png",D="/study/assets/image-20220114215634437.d7c65f27.png",N="/study/assets/image-20220114215743231.5ea68115.png",J="/study/assets/image-20220114221736263-16421698566172.c35128dc.png",H="/study/assets/image-20220114224001635.3681ff58.png",X="/study/assets/image-20220114224606159.c8c16643.png",U="/study/assets/image-20220114225619386.ea4ab6b4.png",$="/study/assets/image-20220114230144044.7b3ae1d7.png";const z={},G=a(`

                                              SpringBoot

                                              \u7B2C1\u7AE0 XML\u548CJavaConfig

                                              \u6982\u8FF0

                                              1. spring\u548CspringMVC\u90FD\u6709\u4E00\u4E2A\u5BB9\u5668\u7684\u6982\u5FF5\uFF0C\u90FD\u9700\u8981\u5199\u5927\u91CF\u7684\u914D\u7F6E\u6587\u4EF6\u3002

                                                \u914D\u7F6E\u6587\u4EF6\u8D8A\u591A\uFF0C\u5728\u4F7F\u7528\u4E0A\u8D8A\u9EBB\u70E6\uFF0C\u8D8A\u5BB9\u6613\u51FA\u9519\u3002

                                              2. springboot\u53EF\u4EE5\u8BA9\u6211\u4EEC\u5C11\u5199\u914D\u7F6E\u3002\u901A\u8FC7springboot\u6846\u67B6\uFF0C\u6211\u4EEC\u53EF\u4EE5\u5F88\u5C11\u5199\u914D\u7F6E\u6587\u4EF6\uFF0C\u6211\u4EEC\u53EF\u4EE5\u76F4\u63A5\u5728\u9879\u76EE\u4E2D\u4F7F\u7528\u3002

                                                \u53EF\u4EE5\u7406\u89E3\u4E3A\uFF0C\u7528springboot\u80FD\u591F\u5B9E\u73B0spring\u3001spirngMVC\u7684\u529F\u80FD\uFF0C\u800C\u4E0D\u7528\u518D\u5199\u4E4B\u524D\u90A3\u4E9B\u914D\u7F6E\u6587\u4EF6\u5C31\u53EF\u4EE5\u4F7F\u7528\u4E86\u3002

                                                \u53EF\u4EE5\u7406\u89E3\u4E3A\u662F\u66F4\u52A0\u5FEB\u901F\u7684spring\u548CspringMVC

                                              3. \u4E3A\u4EC0\u4E48\u8981\u4F7F\u7528springboot

                                                \u56E0\u4E3Aspring\u3001springMVC\u9700\u8981\u4F7F\u7528\u5927\u91CF\u7684\u914D\u7F6E\u6587\u4EF6\uFF08xml\u6587\u4EF6\uFF0C\u5373\u4F7F\u662F\u91C7\u7528\u6CE8\u89E3\uFF0C\u4E5F\u9700\u8981\u914D\u7F6E\u6587\u4EF6\u91CC\u5199\u7EC4\u4EF6\u626B\u63CF\u5668\u4E4B\u7C7B\u7684\uFF09\uFF0C\u8FD8\u9700\u8981\u914D\u7F6E\u5404\u79CD\u5BF9\u8C61\uFF0C\u628A\u4F7F\u7528\u7684\u5BF9\u8C61\u653E\u5165\u5230spring\u548Cspringmvc\u5BB9\u5668\u4E2D\u624D\u80FD\u4F7F\u7528\u5BF9\u8C61\u3002

                                                \u90A3\u4E48\u5C31\u9700\u8981\u4E86\u89E3\u5176\u4ED6\u6846\u67B6\u7684\u914D\u7F6E\u89C4\u5219\u3002

                                                springboot\u76F8\u5F53\u4E8E\u662F\u4E0D\u9700\u8981\u914D\u7F6E\u6587\u4EF6\u7684spring + springMVC\u3002\u5E76\u4E14\u5E38\u7528\u7684\u6846\u67B6\u548C\u7B2C\u4E09\u65B9\u5E93\u90FD\u5DF2\u7ECF\u914D\u7F6E\u597D\u4E86\uFF0C\u5F00\u7BB1\u5373\u7528\u3002

                                                \u4F7F\u7528springboot\u5F00\u53D1\u6548\u7387\u9AD8\u3002

                                              JavaConfig

                                              1. spring\u672C\u6765\u662F\u4F7F\u7528XML\u914D\u7F6E\u6587\u4EF6\u4F5C\u4E3A\u5BB9\u5668\u914D\u7F6E\u6587\u4EF6\uFF0C\u57283.0\u4EE5\u540E\u52A0\u5165\u4E86JavaConfig\uFF0C\u4F7F\u7528Java\u7C7B\u505A\u914D\u7F6E\u6587\u4EF6\u4F7F\u7528\u3002

                                              2. JavaConfig\u662Fspring\u63D0\u4F9B\u7684Java\u7C7B\u914D\u7F6E\u5BB9\u5668\uFF0C\u662F\u914D\u7F6Espring\u5BB9\u5668\u7684\u7EAFJava\u65B9\u6CD5\u3002

                                                \u4E5F\u5C31\u662F\u73B0\u5728\u914D\u7F6Espring\u5BB9\u5668\uFF0C\u4E0D\u9700\u8981\u5199xml\u914D\u7F6E\u6587\u4EF6\u4E86\uFF0C\u7528Java\u7C7B\u6765\u5F53\u4F5C\u914D\u7F6E\u6587\u4EF6\u3002

                                              3. \u5728\u8FD9\u4E2AJava\u914D\u7F6E\u7C7B\u53EF\u4EE5\u521B\u5EFAJava\u5BF9\u8C61\uFF0C\u628A\u5BF9\u8C61\u653E\u5165spring\u5BB9\u5668\u4E2D\uFF01

                                              4. Java\u914D\u7F6E\u7C7B\u9700\u8981\u4E24\u4E2A\u6CE8\u89E3\u7684\u652F\u6301\u3002

                                                • @Configuration---\u653E\u5728\u7C7B\u4E0A\u9762

                                                  \u4F5C\u7528\uFF1A\u653E\u5728\u4E00\u4E2A\u7C7B\u7684\u4E0A\u9762\uFF0C\u8868\u793A\u8FD9\u4E2A\u7C7B\u4F5C\u4E3A\u914D\u7F6E\u6587\u4EF6\u4F7F\u7528\uFF0C\u8FD9\u4E2A\u7C7B\u5C31\u76F8\u5F53\u4E8EXML\u6587\u4EF6\u4E86\u3002

                                                • @Bean----\u653E\u5728\u65B9\u6CD5\u4E0A\u9762

                                                  \u4F5C\u7528\uFF1A\u58F0\u660E\u5BF9\u8C61\uFF0C\u628A\u5BF9\u8C61\u6CE8\u5165\u5230\u5BB9\u5668\u4E2D\u3002

                                                \u4F7F\u7528\u65B9\u5F0F\uFF1A

                                                /**
                                                +import{_ as n,e as a}from"./app.f8791b52.js";var s="/study/assets/image-20220109172015393.b2bea150.png",t="/study/assets/image-20220109172632702.edecdf0b.png",p="/study/assets/image-20220109191345685.2be380c3.png",e="/study/assets/image-20220109191851866.c2bdaf08.png",o="/study/assets/image-20220109192058645.fce5cd05.png",c="/study/assets/image-20220109193243155.07ecb077.png",l="/study/assets/image-20220109194501005.68d38648.png",i="/study/assets/image-20220109194529828.67f05266.png",u="/study/assets/image-20220109195902935.da3776f5.png",r="/study/assets/image-20220109200259743.b2c2c661.png",k="/study/assets/image-20220109200749417.15d86ec0.png",g="/study/assets/image-20220109202039561.470d01ea.png",d="/study/assets/image-20220109202809633.6e045374.png",m="/study/assets/image-20220109214455395.943cc1df.png",h="/study/assets/image-20220109214513064.b7ed74b1.png",v="/study/assets/image-20220110134309826.49d78a20.png",b="/study/assets/image-20220111124346613.14263164.png",y="/study/assets/image-20220111153801895.186e5ba2.png",f="/study/assets/image-20220111151328661.5f3e1e4c.png",x="/study/assets/image-20220111154507023.79fc45d7.png",q="/study/assets/image-20220111170450011.7b66f4e4.png",S="/study/assets/image-20220111170831002.a69e43f3.png",w="/study/assets/image-20220111175339693.d4f59267.png",j="/study/assets/image-20220111233229358.7cf7e94e.png",C="/study/assets/image-20220111233512942.704a28ce.png",R="/study/assets/image-20220111235040462.c28afe51.png",I="/study/assets/image-20220111235708371.a06c2a63.png",_="/study/assets/image-20220112000104419.c08264a0.png",M="/study/assets/image-20220113145837923.f60d14a7.png",T="/study/assets/image-20220113145907602.d857b8bc.png",B="/study/assets/image-20220112002815522.62106216.png",A="/study/assets/image-20220113135215392.03542f08.png",E="/study/assets/image-20220113164317002.a9702162.png",P="/study/assets/image-20220113173851104.7b106e72.png",L="/study/assets/image-20220114165603471.fa1a6bbb.png",F="/study/assets/image-20220114181707180.fd14d8d4.png",O="/study/assets/image-20220114195307270-16421611874871.f6e8c921.png",V="/study/assets/image-20220114195521639.7abad8d8.png",D="/study/assets/image-20220114215634437.d7c65f27.png",N="/study/assets/image-20220114215743231.5ea68115.png",J="/study/assets/image-20220114221736263-16421698566172.c35128dc.png",H="/study/assets/image-20220114224001635.3681ff58.png",X="/study/assets/image-20220114224606159.c8c16643.png",U="/study/assets/image-20220114225619386.ea4ab6b4.png",$="/study/assets/image-20220114230144044.7b3ae1d7.png";const z={},G=a(`

                                                SpringBoot

                                                \u7B2C1\u7AE0 XML\u548CJavaConfig

                                                \u6982\u8FF0

                                                1. spring\u548CspringMVC\u90FD\u6709\u4E00\u4E2A\u5BB9\u5668\u7684\u6982\u5FF5\uFF0C\u90FD\u9700\u8981\u5199\u5927\u91CF\u7684\u914D\u7F6E\u6587\u4EF6\u3002

                                                  \u914D\u7F6E\u6587\u4EF6\u8D8A\u591A\uFF0C\u5728\u4F7F\u7528\u4E0A\u8D8A\u9EBB\u70E6\uFF0C\u8D8A\u5BB9\u6613\u51FA\u9519\u3002

                                                2. springboot\u53EF\u4EE5\u8BA9\u6211\u4EEC\u5C11\u5199\u914D\u7F6E\u3002\u901A\u8FC7springboot\u6846\u67B6\uFF0C\u6211\u4EEC\u53EF\u4EE5\u5F88\u5C11\u5199\u914D\u7F6E\u6587\u4EF6\uFF0C\u6211\u4EEC\u53EF\u4EE5\u76F4\u63A5\u5728\u9879\u76EE\u4E2D\u4F7F\u7528\u3002

                                                  \u53EF\u4EE5\u7406\u89E3\u4E3A\uFF0C\u7528springboot\u80FD\u591F\u5B9E\u73B0spring\u3001spirngMVC\u7684\u529F\u80FD\uFF0C\u800C\u4E0D\u7528\u518D\u5199\u4E4B\u524D\u90A3\u4E9B\u914D\u7F6E\u6587\u4EF6\u5C31\u53EF\u4EE5\u4F7F\u7528\u4E86\u3002

                                                  \u53EF\u4EE5\u7406\u89E3\u4E3A\u662F\u66F4\u52A0\u5FEB\u901F\u7684spring\u548CspringMVC

                                                3. \u4E3A\u4EC0\u4E48\u8981\u4F7F\u7528springboot

                                                  \u56E0\u4E3Aspring\u3001springMVC\u9700\u8981\u4F7F\u7528\u5927\u91CF\u7684\u914D\u7F6E\u6587\u4EF6\uFF08xml\u6587\u4EF6\uFF0C\u5373\u4F7F\u662F\u91C7\u7528\u6CE8\u89E3\uFF0C\u4E5F\u9700\u8981\u914D\u7F6E\u6587\u4EF6\u91CC\u5199\u7EC4\u4EF6\u626B\u63CF\u5668\u4E4B\u7C7B\u7684\uFF09\uFF0C\u8FD8\u9700\u8981\u914D\u7F6E\u5404\u79CD\u5BF9\u8C61\uFF0C\u628A\u4F7F\u7528\u7684\u5BF9\u8C61\u653E\u5165\u5230spring\u548Cspringmvc\u5BB9\u5668\u4E2D\u624D\u80FD\u4F7F\u7528\u5BF9\u8C61\u3002

                                                  \u90A3\u4E48\u5C31\u9700\u8981\u4E86\u89E3\u5176\u4ED6\u6846\u67B6\u7684\u914D\u7F6E\u89C4\u5219\u3002

                                                  springboot\u76F8\u5F53\u4E8E\u662F\u4E0D\u9700\u8981\u914D\u7F6E\u6587\u4EF6\u7684spring + springMVC\u3002\u5E76\u4E14\u5E38\u7528\u7684\u6846\u67B6\u548C\u7B2C\u4E09\u65B9\u5E93\u90FD\u5DF2\u7ECF\u914D\u7F6E\u597D\u4E86\uFF0C\u5F00\u7BB1\u5373\u7528\u3002

                                                  \u4F7F\u7528springboot\u5F00\u53D1\u6548\u7387\u9AD8\u3002

                                                JavaConfig

                                                1. spring\u672C\u6765\u662F\u4F7F\u7528XML\u914D\u7F6E\u6587\u4EF6\u4F5C\u4E3A\u5BB9\u5668\u914D\u7F6E\u6587\u4EF6\uFF0C\u57283.0\u4EE5\u540E\u52A0\u5165\u4E86JavaConfig\uFF0C\u4F7F\u7528Java\u7C7B\u505A\u914D\u7F6E\u6587\u4EF6\u4F7F\u7528\u3002

                                                2. JavaConfig\u662Fspring\u63D0\u4F9B\u7684Java\u7C7B\u914D\u7F6E\u5BB9\u5668\uFF0C\u662F\u914D\u7F6Espring\u5BB9\u5668\u7684\u7EAFJava\u65B9\u6CD5\u3002

                                                  \u4E5F\u5C31\u662F\u73B0\u5728\u914D\u7F6Espring\u5BB9\u5668\uFF0C\u4E0D\u9700\u8981\u5199xml\u914D\u7F6E\u6587\u4EF6\u4E86\uFF0C\u7528Java\u7C7B\u6765\u5F53\u4F5C\u914D\u7F6E\u6587\u4EF6\u3002

                                                3. \u5728\u8FD9\u4E2AJava\u914D\u7F6E\u7C7B\u53EF\u4EE5\u521B\u5EFAJava\u5BF9\u8C61\uFF0C\u628A\u5BF9\u8C61\u653E\u5165spring\u5BB9\u5668\u4E2D\uFF01

                                                4. Java\u914D\u7F6E\u7C7B\u9700\u8981\u4E24\u4E2A\u6CE8\u89E3\u7684\u652F\u6301\u3002

                                                  • @Configuration---\u653E\u5728\u7C7B\u4E0A\u9762

                                                    \u4F5C\u7528\uFF1A\u653E\u5728\u4E00\u4E2A\u7C7B\u7684\u4E0A\u9762\uFF0C\u8868\u793A\u8FD9\u4E2A\u7C7B\u4F5C\u4E3A\u914D\u7F6E\u6587\u4EF6\u4F7F\u7528\uFF0C\u8FD9\u4E2A\u7C7B\u5C31\u76F8\u5F53\u4E8EXML\u6587\u4EF6\u4E86\u3002

                                                  • @Bean----\u653E\u5728\u65B9\u6CD5\u4E0A\u9762

                                                    \u4F5C\u7528\uFF1A\u58F0\u660E\u5BF9\u8C61\uFF0C\u628A\u5BF9\u8C61\u6CE8\u5165\u5230\u5BB9\u5668\u4E2D\u3002

                                                  \u4F7F\u7528\u65B9\u5F0F\uFF1A

                                                  /**
                                                    * @Configuration: \u8868\u793A\u5F53\u524D\u7C7B\u662F\u4F5C\u4E3A\u914D\u7F6E\u6587\u4EF6\u4F7F\u7528\u7684\uFF0C \u5C31\u662F\u7528\u6765\u914D\u7F6Espring\u5BB9\u5668\u7684\uFF0C\u4E5F\u5C31\u662F\u914D\u7F6Espring\u5BB9\u5668\u4E2D\u7684\u5BF9\u8C61\u7684\u3002
                                                    * \u4F4D\u7F6E\uFF1A\u5199\u5728\u7C7B\u7684\u4E0A\u9762\u3002
                                                    * SpringConfig\u8FD9\u4E2A\u7C7B\u5C31\u76F8\u5F53\u4E8Ebean.xml
                                                  diff --git a/assets/springboot.html.a07c26b1.js b/assets/springboot.html.4daae716.js
                                                  similarity index 99%
                                                  rename from assets/springboot.html.a07c26b1.js
                                                  rename to assets/springboot.html.4daae716.js
                                                  index 4f8c7e7e..2427e38b 100644
                                                  --- a/assets/springboot.html.a07c26b1.js
                                                  +++ b/assets/springboot.html.4daae716.js
                                                  @@ -1,4 +1,4 @@
                                                  -import{_ as n,e as s}from"./app.0d029894.js";var a="/study/assets/image-20211007005513089.d08420fa.png",p="/study/assets/image-20211007005926535.75151aa0.png",t="/study/assets/image-20211007010839779.f0840933.png",o="/study/assets/image-20211007012036725.c3171f38.png",e="/study/assets/image-20211007012636111.7c237183.png",i="/study/assets/image-20211007170017159.0dcaaea8.png",l="/study/assets/image-20211007173613033.ccde91ee.png",c="/study/assets/image-20211007175026160.b2767134.png",r="/study/assets/image-20211007191020426.20ff3b77.png",u="/study/assets/image-20211007191113896.c09bc8bf.png",g="/study/assets/image-20211007191512056.fe4cbd18.png",k="/study/assets/image-20211007191601616.56b51d6f.png",m="/study/assets/image-20211007231310887.5470fe9f.png",d="/study/assets/image-20211008004343664.59a79138.png",f="/study/assets/image-20211008181155963.09e2daef.png",b="/study/assets/image-20211008183710429.e98d0629.png",h="/study/assets/image-20211008184239530.5fb6fb5f.png",x="/study/assets/image-20211008225543585.df2cb9e4.png",v="/study/assets/image-20211008225917153.a54e93dd.png",y="/study/assets/image-20211008232101965.42e3b6ff.png";const C={},_=s('

                                                  \u4E00\u4E9B\u539F\u7406

                                                  \u57FA\u7840\u5165\u95E8

                                                  spring\u4E0Espringboot

                                                  1. \u4E00\u4E2A\u9879\u76EE\u6216\u8005\u8BF4\u5927\u578B\u5E94\u7528\uFF0C\u529F\u80FD\u6A21\u5757\u4F17\u591A\uFF0C\u6211\u4EEC\u5E94\u8BE5\u628A\u4E00\u4E2A\u5927\u7684\u9879\u76EE\u62C6\u5206\u6210\u4E00\u4E2A\u4E00\u4E2A\u5FAE\u5C0F\u7684\u529F\u80FD\u6A21\u5757\uFF0C\u6BCF\u4E00\u4E2A\u5FAE\u5C0F\u7684\u529F\u80FD\u6A21\u5757\u6211\u4EEC\u79F0\u4E4B\u4E3A\u4E00\u4E2A\u5FAE\u670D\u52A1\uFF0Cspring\u5C31\u53EF\u4EE5\u5FEB\u901F\u5730\u5E2E\u6211\u4EEC\u521B\u5EFA\u548C\u5F00\u53D1\u4E00\u4E2A\u5FAE\u670D\u52A1

                                                  2. \u4E3A\u4EC0\u4E48\u7528springboot

                                                    springboot\u80FD\u5FEB\u901F\u521B\u5EFA\u51FA\u751F\u4EA7\u7EA7\u522B\u7684spring\u5E94\u7528\uFF0C\u8BA9\u5F00\u53D1\u53D8\u5F97\u7B80\u5355

                                                  3. springboot\u7684\u4F18\u70B9

                                                    • \u521B\u5EFA\u72EC\u7ACBspring\u5E94\u7528

                                                    • \u5185\u5D4Cweb\u670D\u52A1\u5668\uFF08\u5D4C\u5165\u5F0F\u7684\u5185\u90E8\u5BB9\u5668tomcat\u3001jetty\u7B49\uFF09

                                                      \u4EE5\u524D\u8981\u5F00\u53D1web\u5E94\u7528\uFF0C\u8FD9\u4E2Aweb\u5E94\u7528\u6700\u7EC8\u4F1A\u88AB\u6253\u5305\u6210\u4E00\u4E2Awar\u5305\uFF0C\u8FD9\u4E2Awar\u5305\u6700\u7EC8\u4F1A\u88AB\u90E8\u7F72\u5230tomcat\u4E0A\uFF0C\u6240\u4EE5\u6211\u4EEC\u7684\u73AF\u5883\u8FD8\u5F97\u88C5tomcat\uFF0C\u8FD8\u8981\u90E8\u7F72tomcat\uFF0C\u81EA\u5DF1\u4E0B\u8F7D\uFF0C\u6216\u8005\u901A\u8FC7IDEA\u4E0B\u8F7D\u914D\u7F6E\u3002

                                                      \u800C\u901A\u8FC7springboot\u8FDB\u884Cweb\u5F00\u53D1\uFF0C\u76EE\u6807\u73AF\u5883\u5373\u4F7F\u6CA1\u6709tomcat\u4E5F\u6CA1\u6709\u5173\u7CFB\uFF0C\u6211\u4EEC\u521B\u5EFA\u7684\u5E94\u7528\u91CC\u9762\u5DF2\u7ECF\u5E26\u4E86tomcat\u670D\u52A1\u5668\uFF0C\u5DF2\u7ECF\u96C6\u6210\u4E86\u3002

                                                    • \u81EA\u52A8starter\u4F9D\u8D56\uFF0C\u7B80\u5316\u6784\u5EFA\u914D\u7F6E

                                                      \u4EE5\u524D\u4F9D\u8D56\u7684jar\u5305\u7684\u7248\u672C\u5FC5\u987B\u63A7\u5236\u597D\uFF0C\u90FD\u662F\u81EA\u5DF1\u53BB\u63A7\u5236\u3001\u6DFB\u52A0\u4F9D\u8D56\uFF0C\u73B0\u5728springboot\u7ED9\u6211\u4EEC\u63D0\u4F9B\u4E86starter\u542F\u52A8\u5668\uFF0C\u5047\u5982\u6211\u4EEC\u60F3\u8981\u5F00\u53D1web\u5E94\u7528\uFF0C\u6211\u4EEC\u53EA\u9700\u8981\u6DFB\u52A0\u4E00\u4E2Aweb\u7684\u542F\u52A8\u5668\u4F9D\u8D56\uFF0C\u4E0D\u9700\u8981\u7BA1\u7406\u5176\u4ED6web\u5F00\u53D1\u9700\u8981\u7684jar\u5305\uFF0Cspringboot\u81EA\u52A8\u7BA1\u7406jar\u5305\uFF0C\u5E76\u4E14\u4FDD\u8BC1jar\u5305\u7684\u7248\u672C

                                                    • \u81EA\u52A8\u914D\u7F6Espring\u4EE5\u53CA\u7B2C\u4E09\u65B9\u529F\u80FD

                                                      \u4E0D\u7528\u50CF\u4EE5\u524D\u6574\u5408mybatis\u3001spring\u3001springmvc\u8981\u5199\u4E00\u5927\u5806\u914D\u7F6E

                                                      \u8FD9\u4E9B\u914D\u7F6E\u73B0\u5728springboot\u81EA\u52A8\u914D\u7F6E

                                                      \u4E13\u6CE8\u6211\u4EEC\u7684\u4E1A\u52A1\u903B\u8F91

                                                    • \u63D0\u4F9B\u751F\u4EA7\u7EA7\u522B\u7684\u76D1\u63A7\u3001\u5065\u5EB7\u68C0\u67E5\u53CA\u5916\u90E8\u5316\u914D\u7F6E

                                                    • \u65E0\u4EE3\u7801\u751F\u6210\uFF0C\u65E0\u9700\u7F16\u5199xml\uFF08\u81EA\u52A8\u5316\u914D\u7F6E\uFF0C\u6211\u4EEC\u4E0D\u9700\u8981\u5199\u4E00\u5927\u5806\u914D\u7F6E\u3002\u5E76\u4E14\u4E0D\u9700\u8981\u5199\u914D\u7F6E\u4E0D\u662F\u8BF4springboot\u7ED9\u6211\u4EEC\u81EA\u52A8\u751F\u6210\u90A3\u4E9B\u914D\u7F6E\u6587\u4EF6\uFF0C\u6CA1\u6709\u4EFB\u4F55\u4EE3\u7801\u751F\u6210\uFF0C\u5C31\u662F\u57FA\u4E8Espring\u5E95\u5C42\u7684\u88C5\u914D\u548C\u4F9D\u8D56\u6CE8\u5165\u529F\u80FD\uFF09

                                                    \u603B\u7ED3\uFF1A\u81EA\u52A8\u914D\u7F6E\u3001\u7B80\u5316\u5F00\u53D1\u3001\u5185\u5D4Cweb\u670D\u52A1\u5668\uFF0C\u6574\u5408\u6574\u4E2Aspring\u751F\u6001\u5708\u3001\u6280\u672F\u6808\u7684\u4E00\u7AD9\u5F0F\u6846\u67B6\uFF0Cspring boot\u662F\u7B80\u5316spring\u6280\u672F\u6808\u7684\u5FEB\u901F\u5F00\u53D1\u811A\u624B\u67B6

                                                  4. springboot\u7684\u7F3A\u70B9

                                                    • \u7248\u672C\u8FED\u4EE3\u5757\uFF0C\u9700\u8981\u65F6\u523B\u5173\u6CE8\u53D8\u5316\uFF0C\u4E5F\u4E0D\u80FD\u7B97\u4F5C\u662F\u7F3A\u70B9
                                                    • \u5C01\u88C5\u592A\u6DF1\uFF0C\u5185\u90E8\u539F\u7406\u590D\u6742\uFF0C\u4E0D\u5BB9\u6613\u7CBE\u901A

                                                  \u5FAE\u670D\u52A1

                                                  1. \u4EC0\u4E48\u662F\u5206\u5E03\u5F0F\uFF1A

                                                    \u5206\u5E03\u5F0F\u662F\u4E2A\u5DE5\u4F5C\u65B9\u5F0F\uFF0C\u7531\u591A\u53F0\u670D\u52A1\u5668\u5171\u540C\u5B8C\u6210\u4E00\u4EF6\u6BD4\u8F83\u590D\u6742\u7684\u4E8B\uFF0C\u8FD9\u591A\u53F0\u670D\u52A1\u5668\u5171\u540C\u63D0\u4F9B\u670D\u52A1\uFF0C\u5448\u73B0\u51FA\u4E00\u53F0\u5355\u673A\u670D\u52A1\u5668\u63D0\u4F9B\u670D\u52A1\u7684\u6548\u679C\u3002\u5F3A\u8C03\u591A\u53F0\u670D\u52A1\u5668\u5171\u540C\u63D0\u4F9B\u670D\u52A1

                                                    \u628A\u539F\u6765\u4E00\u4E2A\u5927\u5757\u7CFB\u7EDF\uFF0C\u6839\u636E\u529F\u80FD\uFF0C\u5206\u6210\u591A\u4E2A\u5B50\u7CFB\u7EDF\u6216\u8005\u8BF4\u5B50\u6A21\u5757\uFF0C\u8FD9\u4E9B\u5B50\u7CFB\u7EDF\u6216\u8005\u8BF4\u5B50\u6A21\u5757\u5206\u522B\u90E8\u7F72\u5728\u4E0D\u540C\u7684\u670D\u52A1\u5668\uFF08\u96C6\u7FA4\u4E0A\uFF09\uFF0C\u5171\u540C\u63D0\u4F9B\u670D\u52A1\uFF0C\u5B50\u670D\u52A1\u90E8\u7F72\u5728\u4E0D\u540C\u7684\u670D\u52A1\u5668\u6216\u96C6\u7FA4\u4E0A\uFF0C\u5171\u540C\u5B8C\u6210\u4E00\u4EF6\u4E8B\u60C5\uFF0C\u53EF\u4EE5\u7406\u89E3\u4E3A\u5206\u5E03\u5F0F\u3002

                                                    \u5C06\u4E00\u4E2A\u5927\u7684\u4E1A\u52A1\u6216\u8005\u8BF4\u7CFB\u7EDF\u62C6\u5206\u6210\u591A\u4E2A\u5B50\u4E1A\u52A1\u6216\u8005\u8BF4\u5B50\u7CFB\u7EDF\u3001\u5B50\u6A21\u5757\uFF0C\u8FD9\u4E9B\u5B50\u4E1A\u52A1\u3001\u5B50\u7CFB\u7EDF\u3001\u5B50\u670D\u52A1\u5206\u522B\u90E8\u7F72\u5728\u4E0D\u540C\u7684\u670D\u52A1\u5668\uFF08\u6216\u8005\u96C6\u7FA4\uFF09\u4E0A\uFF0C\u5171\u540C\u5BF9\u5916\u5448\u73B0\u5355\u673A\u7684\u670D\u52A1\u6548\u679C\u3002\u662F\u4E00\u79CD\u5DE5\u4F5C\u65B9\u5F0F

                                                    \u597D\u5904\uFF1A

                                                    • \u964D\u4F4E\u6A21\u5757\u4E4B\u95F4\u7684\u8026\u5408\u6027
                                                    • \u63D0\u9AD8\u5404\u4E2A\u5B50\u6A21\u5757\u3001\u5B50\u7CFB\u7EDF\u7684\u590D\u7528\u6027
                                                  2. \u4EC0\u4E48\u662F\u96C6\u7FA4\uFF1A

                                                    \u5206\u5E03\u5F0F\u5F3A\u8C03\u5DE5\u4F5C\u65B9\u5F0F\uFF0C\u4E5F\u53EF\u4EE5\u8BA4\u4E3A\u662F\u4E00\u79CD\u601D\u60F3\uFF0C\u5C31\u50CFAOP\u3001IOC\u90FD\u53EF\u4EE5\u8BA4\u4E3A\u662F\u601D\u60F3\uFF0C\u662F\u4E00\u79CD\u65B9\u5F0F\u3002

                                                    \u800C\u96C6\u7FA4\uFF0C\u662F\u7269\u7406\u5C42\u9762\u7684\u591A\u53F0\u670D\u52A1\u5668\uFF0C\u591A\u53F0\u670D\u52A1\u5668\u5408\u8D77\u6765\u4F5C\u4E3A\u6574\u4F53\u5B8C\u6210\u4E1A\u52A1

                                                    \u5206\u5E03\u5F0F\u5F3A\u8C03\u62C6\uFF0C\u5927\u7684\u4E1A\u52A1\u62C6\u6210\u5C0F\u7684\u3002

                                                    \u96C6\u7FA4\u5F3A\u8C03\u5408\uFF0C\u591A\u4E2A\u670D\u52A1\u5668\u5408\u8D77\u6765\u5B8C\u6210\u4E1A\u52A1\uFF0C\u8BF4\u7684\u662F\u7269\u7406\u5C42\u9762\uFF0C\u800C\u5206\u5E03\u5F0F\u53EF\u4EE5\u770B\u4F5C\u662F\u5DE5\u4F5C\u65B9\u5F0F\u6216\u8005\u601D\u60F3\u3002

                                                    \u4ED6\u4EEC\u4E0D\u80FD\u5206\u5F00\u6765\u770B\uFF0C\u4E0D\u662F\u5E76\u884C\u7684\u6982\u5FF5\uFF0C\u96C6\u7FA4\u548C\u5206\u5E03\u5F0F\u662F\u5171\u540C\u5B58\u5728\u7684\u3002

                                                  3. \u4EC0\u4E48\u662F\u5FAE\u670D\u52A1

                                                    \u662F\u4E00\u79CD\u67B6\u6784\u98CE\u683C\u3002

                                                    \u628A\u4E00\u4E2A\u5E94\u7528\u62C6\u5206\u4E3A\u4E00\u7EC4\u5C0F\u578B\u670D\u52A1\uFF0C\u8FD9\u6BCF\u4E2A\u5C0F\u670D\u52A1\u6216\u8005\u8BF4\u5C0F\u6A21\u5757\u53EF\u4EE5\u72EC\u7ACB\u90E8\u7F72\uFF0C\u4E5F\u5C31\u662F\u90E8\u7F72\u5728\u4E0D\u540C\u7684\u670D\u52A1\u5668\u4E0A\uFF01\uFF01\u5176\u5B9E\u5C31\u662F\u8BF4\u7684\u5206\u5E03\u5F0F\u7684\u6982\u5FF5

                                                    \u5404\u4E2A\u5C0F\u670D\u52A1\u4E4B\u95F4\u4F7F\u7528\u8F7B\u91CF\u7EA7HTTP\u4EA4\u4E92

                                                    \u670D\u52A1\u56F4\u7ED5\u4E1A\u52A1\u529F\u80FD\u62C6\u5206

                                                    \u5404\u4E2A\u5C0F\u670D\u52A1\u53EF\u4EE5\u7531\u5168\u81EA\u52A8\u90E8\u7F72\u673A\u5236\u72EC\u7ACB\u90E8\u7F72

                                                    \u53BB\u4E2D\u5FC3\u5316\uFF0C\u670D\u52A1\u81EA\u6CBB\uFF0C\u670D\u52A1\u53EF\u4EE5\u4F7F\u7528\u4E0D\u540C\u7684\u8BED\u8A00\uFF0C\u4E0D\u540C\u7684\u5B58\u50A8\u6280\u672F

                                                    \u5F3A\u8C03\u72EC\u7ACB\u3001\u5206\u5E03\u5F0F\u3001\u5927\u6A21\u5757\u5206\u4E3A\u5C0F\u6A21\u5757\uFF0C\u5C0F\u6A21\u5757\u90E8\u7F72\u5230\u72EC\u7ACB\u7684\u670D\u52A1\u5668\uFF01\uFF01\uFF01

                                                  4. \u5206\u5E03\u5F0F\u7684\u56F0\u96BE---\u6D89\u53CA\u5230\u670D\u52A1\u5668\u4E4B\u95F4\u7684\u901A\u4FE1\uFF0C\u914D\u7F6E\u7684\u540C\u6B65\u7B49\u95EE\u9898\uFF0C\u6839\u672C\u539F\u56E0\u5C31\u662F\u56E0\u4E3A\u5404\u4E2A\u5FAE\u670D\u52A1\u90E8\u7F72\u5728\u4E0D\u540C\u7684\u670D\u52A1\u5668\uFF01\uFF01

                                                    • \u8FDC\u7A0B\u8C03\u7528

                                                    • \u8D1F\u8F7D\u5747\u8861

                                                    • \u670D\u52A1\u5BB9\u9519

                                                    • \u670D\u52A1\u53D1\u73B0

                                                    • \u914D\u7F6E\u7BA1\u7406

                                                    • \u670D\u52A1\u76D1\u63A7

                                                    • \u94FE\u8DEF\u8FFD\u8E2A

                                                      a\u670D\u52A1\u5668\u7684\u670D\u52A1\u8C03b\uFF0Cb\u8C03c\uFF0Cc\u8C03d\uFF0Cd\u51FA\u4E86\u95EE\u9898\uFF0C\u600E\u4E48\u8FFD\u8E2A

                                                    • \u65E5\u5FD7\u7BA1\u7406

                                                    \u5206\u5E03\u5F0F\u7684\u89E3\u51B3\uFF1A

                                                    springboot + springcloud\u3002\u901A\u8FC7springcloud\u5C06\u8FD9\u4E9B\u670D\u52A1\u7F51\u72B6\u7684\u6784\u5EFA\u8D77\u6765

                                                    springboot\u5E2E\u6211\u4EEC\u5FEB\u901F\u5730\u6784\u5EFA\u51FA\u4E00\u4E2A\u5E94\u7528\u3002

                                                    \u8FD9\u4E9B\u5E94\u7528\u901A\u8FC7springcloud\u6784\u5EFA\u8D77\u6765

                                                  \u4E86\u89E3\u81EA\u52A8\u914D\u7F6E\u539F\u7406

                                                  \u4F9D\u8D56\u7BA1\u7406

                                                  • \u7236\u9879\u76EE\u505A\u4F9D\u8D56\u7BA1\u7406

                                                    1. \u6211\u4EEC\u5F15\u5165\u4E86\u7236\u9879\u76EE\uFF0C\u5BFC\u5165\u4E86\u4E00\u4E2Aspring-boot-starter-web\u4F9D\u8D56

                                                      \u7236\u9879\u76EE\u4E00\u822C\u662F\u505A\u4F9D\u8D56\u7BA1\u7406\uFF0C\u5B50\u9879\u76EE\u53EA\u8981\u7EE7\u627F\u4E86\u7236\u9879\u76EE\uFF0C\u5B50\u9879\u76EE\u5C31\u4E0D\u9700\u8981\u5199\u7248\u672C\u53F7\u4E86

                                                      image-20211007005513089

                                                      \u7236\u9879\u76EE\u7684\u4E3B\u8981\u529F\u80FD\u5C31\u662F\u505A\u4F9D\u8D56\u7BA1\u7406\uFF0C\u5BF9\u4F9D\u8D56\u7684\u7248\u672C\u63A7\u5236\uFF0C\u70B9\u8FDBdependencies\u91CC\u53BB\uFF0C\u53D1\u73B0\u6240\u9700\u8981\u4F9D\u8D56\u7684jar\u5305\u90FD\u89C4\u5B9A\u4E86\u7248\u672C\u53F7\uFF0C\u8FD9\u4E9B\u9700\u8981\u4F9D\u8D56\u7684jar\u5305\u4F1A\u81EA\u52A8\u88ABspringboot\u5F15\u5165\u3002

                                                      \u51E0\u4E4E\u58F0\u660E\u4E86\u6240\u6709\u5F00\u53D1\u4E2D\u5E38\u7528\u7684jar\u7684\u7248\u672C\u53F7

                                                      \u8FD9\u4E2A\u4E5F\u53EF\u4EE5\u79F0\u4E3A\u81EA\u52A8\u7248\u672C\u4EF2\u88C1\u673A\u5236

                                                    2. \u5F15\u5165\u4F9D\u8D56\u9ED8\u8BA4\u90FD\u53EF\u4EE5\u4E0D\u5C51\u7248\u672C\u53F7

                                                      \u5F15\u5165\u975E\u7248\u672C\u4EF2\u88C1\u7684\u4F9D\u8D56\uFF0C\u8981\u5199\u7248\u672C\u53F7

                                                    3. \u5982\u679C\u8BF4\u6211\u4EEC\u9700\u8981\u4F9D\u8D56\u7684jar\u5305\u7248\u672C\u548Cspringboot\u91CC\u7236\u9879\u76EE\u89C4\u5B9A\u7684\u7248\u672C\u53F7\u4E0D\u4E00\u81F4\uFF0C\u90A3\u4E48\u5728pom\u6587\u4EF6\u91CC\u5199properties\u6807\u7B7E\uFF0C\u91CD\u65B0\u89C4\u5B9A\u7248\u672C

                                                      \u6BD4\u5982\uFF1A

                                                      image-20211007005926535

                                                      • \u67E5\u770Bspring-boot-dependencies\u91CC\u9762\u89C4\u5B9A\u7684\u5F53\u524D\u4F9D\u8D56\u7684\u7248\u672C\u7528\u7684key
                                                      • \u5728\u5F53\u524D\u9879\u76EE\u7684pom\u6587\u4EF6\u8FDB\u884C\u91CD\u5199
                                                  • \u5F00\u53D1\u5BFC\u5165starter\u573A\u666F\u542F\u52A8\u5668

                                                    1. starter\u662F\u4E00\u7EC4\u4F9D\u8D56\u7684\u96C6\u5408\u63CF\u8FF0\uFF0C\u4E00\u822C\u5F15\u5165\u4E00\u4E2Astarter\uFF0C\u5F00\u53D1\u6240\u9700\u8981\u7684\u5B8C\u6574\u4F9D\u8D56\u5C31\u88AB\u5F15\u5165\u4E86

                                                      \u89C1\u5230\u5F88\u591Aspring-boot-starter-*\uFF1A *\u4EE3\u8868\u67D0\u79CD\u573A\u666F

                                                      \u53EA\u8981\u5F15\u5165starter\uFF0C\u8FD9\u4E2A\u573A\u666F\u7684\u6240\u6709\u5E38\u89C4\u9700\u8981\u7684\u4F9D\u8D56\u90FD\u81EA\u52A8\u5F15\u5165

                                                      <dependency>
                                                      +import{_ as n,e as s}from"./app.f8791b52.js";var a="/study/assets/image-20211007005513089.d08420fa.png",p="/study/assets/image-20211007005926535.75151aa0.png",t="/study/assets/image-20211007010839779.f0840933.png",o="/study/assets/image-20211007012036725.c3171f38.png",e="/study/assets/image-20211007012636111.7c237183.png",i="/study/assets/image-20211007170017159.0dcaaea8.png",l="/study/assets/image-20211007173613033.ccde91ee.png",c="/study/assets/image-20211007175026160.b2767134.png",r="/study/assets/image-20211007191020426.20ff3b77.png",u="/study/assets/image-20211007191113896.c09bc8bf.png",g="/study/assets/image-20211007191512056.fe4cbd18.png",k="/study/assets/image-20211007191601616.56b51d6f.png",m="/study/assets/image-20211007231310887.5470fe9f.png",d="/study/assets/image-20211008004343664.59a79138.png",f="/study/assets/image-20211008181155963.09e2daef.png",b="/study/assets/image-20211008183710429.e98d0629.png",h="/study/assets/image-20211008184239530.5fb6fb5f.png",x="/study/assets/image-20211008225543585.df2cb9e4.png",v="/study/assets/image-20211008225917153.a54e93dd.png",y="/study/assets/image-20211008232101965.42e3b6ff.png";const C={},_=s('

                                                      \u4E00\u4E9B\u539F\u7406

                                                      \u57FA\u7840\u5165\u95E8

                                                      spring\u4E0Espringboot

                                                      1. \u4E00\u4E2A\u9879\u76EE\u6216\u8005\u8BF4\u5927\u578B\u5E94\u7528\uFF0C\u529F\u80FD\u6A21\u5757\u4F17\u591A\uFF0C\u6211\u4EEC\u5E94\u8BE5\u628A\u4E00\u4E2A\u5927\u7684\u9879\u76EE\u62C6\u5206\u6210\u4E00\u4E2A\u4E00\u4E2A\u5FAE\u5C0F\u7684\u529F\u80FD\u6A21\u5757\uFF0C\u6BCF\u4E00\u4E2A\u5FAE\u5C0F\u7684\u529F\u80FD\u6A21\u5757\u6211\u4EEC\u79F0\u4E4B\u4E3A\u4E00\u4E2A\u5FAE\u670D\u52A1\uFF0Cspring\u5C31\u53EF\u4EE5\u5FEB\u901F\u5730\u5E2E\u6211\u4EEC\u521B\u5EFA\u548C\u5F00\u53D1\u4E00\u4E2A\u5FAE\u670D\u52A1

                                                      2. \u4E3A\u4EC0\u4E48\u7528springboot

                                                        springboot\u80FD\u5FEB\u901F\u521B\u5EFA\u51FA\u751F\u4EA7\u7EA7\u522B\u7684spring\u5E94\u7528\uFF0C\u8BA9\u5F00\u53D1\u53D8\u5F97\u7B80\u5355

                                                      3. springboot\u7684\u4F18\u70B9

                                                        • \u521B\u5EFA\u72EC\u7ACBspring\u5E94\u7528

                                                        • \u5185\u5D4Cweb\u670D\u52A1\u5668\uFF08\u5D4C\u5165\u5F0F\u7684\u5185\u90E8\u5BB9\u5668tomcat\u3001jetty\u7B49\uFF09

                                                          \u4EE5\u524D\u8981\u5F00\u53D1web\u5E94\u7528\uFF0C\u8FD9\u4E2Aweb\u5E94\u7528\u6700\u7EC8\u4F1A\u88AB\u6253\u5305\u6210\u4E00\u4E2Awar\u5305\uFF0C\u8FD9\u4E2Awar\u5305\u6700\u7EC8\u4F1A\u88AB\u90E8\u7F72\u5230tomcat\u4E0A\uFF0C\u6240\u4EE5\u6211\u4EEC\u7684\u73AF\u5883\u8FD8\u5F97\u88C5tomcat\uFF0C\u8FD8\u8981\u90E8\u7F72tomcat\uFF0C\u81EA\u5DF1\u4E0B\u8F7D\uFF0C\u6216\u8005\u901A\u8FC7IDEA\u4E0B\u8F7D\u914D\u7F6E\u3002

                                                          \u800C\u901A\u8FC7springboot\u8FDB\u884Cweb\u5F00\u53D1\uFF0C\u76EE\u6807\u73AF\u5883\u5373\u4F7F\u6CA1\u6709tomcat\u4E5F\u6CA1\u6709\u5173\u7CFB\uFF0C\u6211\u4EEC\u521B\u5EFA\u7684\u5E94\u7528\u91CC\u9762\u5DF2\u7ECF\u5E26\u4E86tomcat\u670D\u52A1\u5668\uFF0C\u5DF2\u7ECF\u96C6\u6210\u4E86\u3002

                                                        • \u81EA\u52A8starter\u4F9D\u8D56\uFF0C\u7B80\u5316\u6784\u5EFA\u914D\u7F6E

                                                          \u4EE5\u524D\u4F9D\u8D56\u7684jar\u5305\u7684\u7248\u672C\u5FC5\u987B\u63A7\u5236\u597D\uFF0C\u90FD\u662F\u81EA\u5DF1\u53BB\u63A7\u5236\u3001\u6DFB\u52A0\u4F9D\u8D56\uFF0C\u73B0\u5728springboot\u7ED9\u6211\u4EEC\u63D0\u4F9B\u4E86starter\u542F\u52A8\u5668\uFF0C\u5047\u5982\u6211\u4EEC\u60F3\u8981\u5F00\u53D1web\u5E94\u7528\uFF0C\u6211\u4EEC\u53EA\u9700\u8981\u6DFB\u52A0\u4E00\u4E2Aweb\u7684\u542F\u52A8\u5668\u4F9D\u8D56\uFF0C\u4E0D\u9700\u8981\u7BA1\u7406\u5176\u4ED6web\u5F00\u53D1\u9700\u8981\u7684jar\u5305\uFF0Cspringboot\u81EA\u52A8\u7BA1\u7406jar\u5305\uFF0C\u5E76\u4E14\u4FDD\u8BC1jar\u5305\u7684\u7248\u672C

                                                        • \u81EA\u52A8\u914D\u7F6Espring\u4EE5\u53CA\u7B2C\u4E09\u65B9\u529F\u80FD

                                                          \u4E0D\u7528\u50CF\u4EE5\u524D\u6574\u5408mybatis\u3001spring\u3001springmvc\u8981\u5199\u4E00\u5927\u5806\u914D\u7F6E

                                                          \u8FD9\u4E9B\u914D\u7F6E\u73B0\u5728springboot\u81EA\u52A8\u914D\u7F6E

                                                          \u4E13\u6CE8\u6211\u4EEC\u7684\u4E1A\u52A1\u903B\u8F91

                                                        • \u63D0\u4F9B\u751F\u4EA7\u7EA7\u522B\u7684\u76D1\u63A7\u3001\u5065\u5EB7\u68C0\u67E5\u53CA\u5916\u90E8\u5316\u914D\u7F6E

                                                        • \u65E0\u4EE3\u7801\u751F\u6210\uFF0C\u65E0\u9700\u7F16\u5199xml\uFF08\u81EA\u52A8\u5316\u914D\u7F6E\uFF0C\u6211\u4EEC\u4E0D\u9700\u8981\u5199\u4E00\u5927\u5806\u914D\u7F6E\u3002\u5E76\u4E14\u4E0D\u9700\u8981\u5199\u914D\u7F6E\u4E0D\u662F\u8BF4springboot\u7ED9\u6211\u4EEC\u81EA\u52A8\u751F\u6210\u90A3\u4E9B\u914D\u7F6E\u6587\u4EF6\uFF0C\u6CA1\u6709\u4EFB\u4F55\u4EE3\u7801\u751F\u6210\uFF0C\u5C31\u662F\u57FA\u4E8Espring\u5E95\u5C42\u7684\u88C5\u914D\u548C\u4F9D\u8D56\u6CE8\u5165\u529F\u80FD\uFF09

                                                        \u603B\u7ED3\uFF1A\u81EA\u52A8\u914D\u7F6E\u3001\u7B80\u5316\u5F00\u53D1\u3001\u5185\u5D4Cweb\u670D\u52A1\u5668\uFF0C\u6574\u5408\u6574\u4E2Aspring\u751F\u6001\u5708\u3001\u6280\u672F\u6808\u7684\u4E00\u7AD9\u5F0F\u6846\u67B6\uFF0Cspring boot\u662F\u7B80\u5316spring\u6280\u672F\u6808\u7684\u5FEB\u901F\u5F00\u53D1\u811A\u624B\u67B6

                                                      4. springboot\u7684\u7F3A\u70B9

                                                        • \u7248\u672C\u8FED\u4EE3\u5757\uFF0C\u9700\u8981\u65F6\u523B\u5173\u6CE8\u53D8\u5316\uFF0C\u4E5F\u4E0D\u80FD\u7B97\u4F5C\u662F\u7F3A\u70B9
                                                        • \u5C01\u88C5\u592A\u6DF1\uFF0C\u5185\u90E8\u539F\u7406\u590D\u6742\uFF0C\u4E0D\u5BB9\u6613\u7CBE\u901A

                                                      \u5FAE\u670D\u52A1

                                                      1. \u4EC0\u4E48\u662F\u5206\u5E03\u5F0F\uFF1A

                                                        \u5206\u5E03\u5F0F\u662F\u4E2A\u5DE5\u4F5C\u65B9\u5F0F\uFF0C\u7531\u591A\u53F0\u670D\u52A1\u5668\u5171\u540C\u5B8C\u6210\u4E00\u4EF6\u6BD4\u8F83\u590D\u6742\u7684\u4E8B\uFF0C\u8FD9\u591A\u53F0\u670D\u52A1\u5668\u5171\u540C\u63D0\u4F9B\u670D\u52A1\uFF0C\u5448\u73B0\u51FA\u4E00\u53F0\u5355\u673A\u670D\u52A1\u5668\u63D0\u4F9B\u670D\u52A1\u7684\u6548\u679C\u3002\u5F3A\u8C03\u591A\u53F0\u670D\u52A1\u5668\u5171\u540C\u63D0\u4F9B\u670D\u52A1

                                                        \u628A\u539F\u6765\u4E00\u4E2A\u5927\u5757\u7CFB\u7EDF\uFF0C\u6839\u636E\u529F\u80FD\uFF0C\u5206\u6210\u591A\u4E2A\u5B50\u7CFB\u7EDF\u6216\u8005\u8BF4\u5B50\u6A21\u5757\uFF0C\u8FD9\u4E9B\u5B50\u7CFB\u7EDF\u6216\u8005\u8BF4\u5B50\u6A21\u5757\u5206\u522B\u90E8\u7F72\u5728\u4E0D\u540C\u7684\u670D\u52A1\u5668\uFF08\u96C6\u7FA4\u4E0A\uFF09\uFF0C\u5171\u540C\u63D0\u4F9B\u670D\u52A1\uFF0C\u5B50\u670D\u52A1\u90E8\u7F72\u5728\u4E0D\u540C\u7684\u670D\u52A1\u5668\u6216\u96C6\u7FA4\u4E0A\uFF0C\u5171\u540C\u5B8C\u6210\u4E00\u4EF6\u4E8B\u60C5\uFF0C\u53EF\u4EE5\u7406\u89E3\u4E3A\u5206\u5E03\u5F0F\u3002

                                                        \u5C06\u4E00\u4E2A\u5927\u7684\u4E1A\u52A1\u6216\u8005\u8BF4\u7CFB\u7EDF\u62C6\u5206\u6210\u591A\u4E2A\u5B50\u4E1A\u52A1\u6216\u8005\u8BF4\u5B50\u7CFB\u7EDF\u3001\u5B50\u6A21\u5757\uFF0C\u8FD9\u4E9B\u5B50\u4E1A\u52A1\u3001\u5B50\u7CFB\u7EDF\u3001\u5B50\u670D\u52A1\u5206\u522B\u90E8\u7F72\u5728\u4E0D\u540C\u7684\u670D\u52A1\u5668\uFF08\u6216\u8005\u96C6\u7FA4\uFF09\u4E0A\uFF0C\u5171\u540C\u5BF9\u5916\u5448\u73B0\u5355\u673A\u7684\u670D\u52A1\u6548\u679C\u3002\u662F\u4E00\u79CD\u5DE5\u4F5C\u65B9\u5F0F

                                                        \u597D\u5904\uFF1A

                                                        • \u964D\u4F4E\u6A21\u5757\u4E4B\u95F4\u7684\u8026\u5408\u6027
                                                        • \u63D0\u9AD8\u5404\u4E2A\u5B50\u6A21\u5757\u3001\u5B50\u7CFB\u7EDF\u7684\u590D\u7528\u6027
                                                      2. \u4EC0\u4E48\u662F\u96C6\u7FA4\uFF1A

                                                        \u5206\u5E03\u5F0F\u5F3A\u8C03\u5DE5\u4F5C\u65B9\u5F0F\uFF0C\u4E5F\u53EF\u4EE5\u8BA4\u4E3A\u662F\u4E00\u79CD\u601D\u60F3\uFF0C\u5C31\u50CFAOP\u3001IOC\u90FD\u53EF\u4EE5\u8BA4\u4E3A\u662F\u601D\u60F3\uFF0C\u662F\u4E00\u79CD\u65B9\u5F0F\u3002

                                                        \u800C\u96C6\u7FA4\uFF0C\u662F\u7269\u7406\u5C42\u9762\u7684\u591A\u53F0\u670D\u52A1\u5668\uFF0C\u591A\u53F0\u670D\u52A1\u5668\u5408\u8D77\u6765\u4F5C\u4E3A\u6574\u4F53\u5B8C\u6210\u4E1A\u52A1

                                                        \u5206\u5E03\u5F0F\u5F3A\u8C03\u62C6\uFF0C\u5927\u7684\u4E1A\u52A1\u62C6\u6210\u5C0F\u7684\u3002

                                                        \u96C6\u7FA4\u5F3A\u8C03\u5408\uFF0C\u591A\u4E2A\u670D\u52A1\u5668\u5408\u8D77\u6765\u5B8C\u6210\u4E1A\u52A1\uFF0C\u8BF4\u7684\u662F\u7269\u7406\u5C42\u9762\uFF0C\u800C\u5206\u5E03\u5F0F\u53EF\u4EE5\u770B\u4F5C\u662F\u5DE5\u4F5C\u65B9\u5F0F\u6216\u8005\u601D\u60F3\u3002

                                                        \u4ED6\u4EEC\u4E0D\u80FD\u5206\u5F00\u6765\u770B\uFF0C\u4E0D\u662F\u5E76\u884C\u7684\u6982\u5FF5\uFF0C\u96C6\u7FA4\u548C\u5206\u5E03\u5F0F\u662F\u5171\u540C\u5B58\u5728\u7684\u3002

                                                      3. \u4EC0\u4E48\u662F\u5FAE\u670D\u52A1

                                                        \u662F\u4E00\u79CD\u67B6\u6784\u98CE\u683C\u3002

                                                        \u628A\u4E00\u4E2A\u5E94\u7528\u62C6\u5206\u4E3A\u4E00\u7EC4\u5C0F\u578B\u670D\u52A1\uFF0C\u8FD9\u6BCF\u4E2A\u5C0F\u670D\u52A1\u6216\u8005\u8BF4\u5C0F\u6A21\u5757\u53EF\u4EE5\u72EC\u7ACB\u90E8\u7F72\uFF0C\u4E5F\u5C31\u662F\u90E8\u7F72\u5728\u4E0D\u540C\u7684\u670D\u52A1\u5668\u4E0A\uFF01\uFF01\u5176\u5B9E\u5C31\u662F\u8BF4\u7684\u5206\u5E03\u5F0F\u7684\u6982\u5FF5

                                                        \u5404\u4E2A\u5C0F\u670D\u52A1\u4E4B\u95F4\u4F7F\u7528\u8F7B\u91CF\u7EA7HTTP\u4EA4\u4E92

                                                        \u670D\u52A1\u56F4\u7ED5\u4E1A\u52A1\u529F\u80FD\u62C6\u5206

                                                        \u5404\u4E2A\u5C0F\u670D\u52A1\u53EF\u4EE5\u7531\u5168\u81EA\u52A8\u90E8\u7F72\u673A\u5236\u72EC\u7ACB\u90E8\u7F72

                                                        \u53BB\u4E2D\u5FC3\u5316\uFF0C\u670D\u52A1\u81EA\u6CBB\uFF0C\u670D\u52A1\u53EF\u4EE5\u4F7F\u7528\u4E0D\u540C\u7684\u8BED\u8A00\uFF0C\u4E0D\u540C\u7684\u5B58\u50A8\u6280\u672F

                                                        \u5F3A\u8C03\u72EC\u7ACB\u3001\u5206\u5E03\u5F0F\u3001\u5927\u6A21\u5757\u5206\u4E3A\u5C0F\u6A21\u5757\uFF0C\u5C0F\u6A21\u5757\u90E8\u7F72\u5230\u72EC\u7ACB\u7684\u670D\u52A1\u5668\uFF01\uFF01\uFF01

                                                      4. \u5206\u5E03\u5F0F\u7684\u56F0\u96BE---\u6D89\u53CA\u5230\u670D\u52A1\u5668\u4E4B\u95F4\u7684\u901A\u4FE1\uFF0C\u914D\u7F6E\u7684\u540C\u6B65\u7B49\u95EE\u9898\uFF0C\u6839\u672C\u539F\u56E0\u5C31\u662F\u56E0\u4E3A\u5404\u4E2A\u5FAE\u670D\u52A1\u90E8\u7F72\u5728\u4E0D\u540C\u7684\u670D\u52A1\u5668\uFF01\uFF01

                                                        • \u8FDC\u7A0B\u8C03\u7528

                                                        • \u8D1F\u8F7D\u5747\u8861

                                                        • \u670D\u52A1\u5BB9\u9519

                                                        • \u670D\u52A1\u53D1\u73B0

                                                        • \u914D\u7F6E\u7BA1\u7406

                                                        • \u670D\u52A1\u76D1\u63A7

                                                        • \u94FE\u8DEF\u8FFD\u8E2A

                                                          a\u670D\u52A1\u5668\u7684\u670D\u52A1\u8C03b\uFF0Cb\u8C03c\uFF0Cc\u8C03d\uFF0Cd\u51FA\u4E86\u95EE\u9898\uFF0C\u600E\u4E48\u8FFD\u8E2A

                                                        • \u65E5\u5FD7\u7BA1\u7406

                                                        \u5206\u5E03\u5F0F\u7684\u89E3\u51B3\uFF1A

                                                        springboot + springcloud\u3002\u901A\u8FC7springcloud\u5C06\u8FD9\u4E9B\u670D\u52A1\u7F51\u72B6\u7684\u6784\u5EFA\u8D77\u6765

                                                        springboot\u5E2E\u6211\u4EEC\u5FEB\u901F\u5730\u6784\u5EFA\u51FA\u4E00\u4E2A\u5E94\u7528\u3002

                                                        \u8FD9\u4E9B\u5E94\u7528\u901A\u8FC7springcloud\u6784\u5EFA\u8D77\u6765

                                                      \u4E86\u89E3\u81EA\u52A8\u914D\u7F6E\u539F\u7406

                                                      \u4F9D\u8D56\u7BA1\u7406

                                                      • \u7236\u9879\u76EE\u505A\u4F9D\u8D56\u7BA1\u7406

                                                        1. \u6211\u4EEC\u5F15\u5165\u4E86\u7236\u9879\u76EE\uFF0C\u5BFC\u5165\u4E86\u4E00\u4E2Aspring-boot-starter-web\u4F9D\u8D56

                                                          \u7236\u9879\u76EE\u4E00\u822C\u662F\u505A\u4F9D\u8D56\u7BA1\u7406\uFF0C\u5B50\u9879\u76EE\u53EA\u8981\u7EE7\u627F\u4E86\u7236\u9879\u76EE\uFF0C\u5B50\u9879\u76EE\u5C31\u4E0D\u9700\u8981\u5199\u7248\u672C\u53F7\u4E86

                                                          image-20211007005513089

                                                          \u7236\u9879\u76EE\u7684\u4E3B\u8981\u529F\u80FD\u5C31\u662F\u505A\u4F9D\u8D56\u7BA1\u7406\uFF0C\u5BF9\u4F9D\u8D56\u7684\u7248\u672C\u63A7\u5236\uFF0C\u70B9\u8FDBdependencies\u91CC\u53BB\uFF0C\u53D1\u73B0\u6240\u9700\u8981\u4F9D\u8D56\u7684jar\u5305\u90FD\u89C4\u5B9A\u4E86\u7248\u672C\u53F7\uFF0C\u8FD9\u4E9B\u9700\u8981\u4F9D\u8D56\u7684jar\u5305\u4F1A\u81EA\u52A8\u88ABspringboot\u5F15\u5165\u3002

                                                          \u51E0\u4E4E\u58F0\u660E\u4E86\u6240\u6709\u5F00\u53D1\u4E2D\u5E38\u7528\u7684jar\u7684\u7248\u672C\u53F7

                                                          \u8FD9\u4E2A\u4E5F\u53EF\u4EE5\u79F0\u4E3A\u81EA\u52A8\u7248\u672C\u4EF2\u88C1\u673A\u5236

                                                        2. \u5F15\u5165\u4F9D\u8D56\u9ED8\u8BA4\u90FD\u53EF\u4EE5\u4E0D\u5C51\u7248\u672C\u53F7

                                                          \u5F15\u5165\u975E\u7248\u672C\u4EF2\u88C1\u7684\u4F9D\u8D56\uFF0C\u8981\u5199\u7248\u672C\u53F7

                                                        3. \u5982\u679C\u8BF4\u6211\u4EEC\u9700\u8981\u4F9D\u8D56\u7684jar\u5305\u7248\u672C\u548Cspringboot\u91CC\u7236\u9879\u76EE\u89C4\u5B9A\u7684\u7248\u672C\u53F7\u4E0D\u4E00\u81F4\uFF0C\u90A3\u4E48\u5728pom\u6587\u4EF6\u91CC\u5199properties\u6807\u7B7E\uFF0C\u91CD\u65B0\u89C4\u5B9A\u7248\u672C

                                                          \u6BD4\u5982\uFF1A

                                                          image-20211007005926535

                                                          • \u67E5\u770Bspring-boot-dependencies\u91CC\u9762\u89C4\u5B9A\u7684\u5F53\u524D\u4F9D\u8D56\u7684\u7248\u672C\u7528\u7684key
                                                          • \u5728\u5F53\u524D\u9879\u76EE\u7684pom\u6587\u4EF6\u8FDB\u884C\u91CD\u5199
                                                      • \u5F00\u53D1\u5BFC\u5165starter\u573A\u666F\u542F\u52A8\u5668

                                                        1. starter\u662F\u4E00\u7EC4\u4F9D\u8D56\u7684\u96C6\u5408\u63CF\u8FF0\uFF0C\u4E00\u822C\u5F15\u5165\u4E00\u4E2Astarter\uFF0C\u5F00\u53D1\u6240\u9700\u8981\u7684\u5B8C\u6574\u4F9D\u8D56\u5C31\u88AB\u5F15\u5165\u4E86

                                                          \u89C1\u5230\u5F88\u591Aspring-boot-starter-*\uFF1A *\u4EE3\u8868\u67D0\u79CD\u573A\u666F

                                                          \u53EA\u8981\u5F15\u5165starter\uFF0C\u8FD9\u4E2A\u573A\u666F\u7684\u6240\u6709\u5E38\u89C4\u9700\u8981\u7684\u4F9D\u8D56\u90FD\u81EA\u52A8\u5F15\u5165

                                                          <dependency>
                                                                <groupId>org.springframework.boot</groupId>
                                                                <artifactId>spring-boot-starter-web</artifactId>
                                                           </dependency>
                                                          diff --git a/assets/springboot.html.b6bef083.js b/assets/springboot.html.5534c4e6.js
                                                          similarity index 99%
                                                          rename from assets/springboot.html.b6bef083.js
                                                          rename to assets/springboot.html.5534c4e6.js
                                                          index bb92177b..0fd46298 100644
                                                          --- a/assets/springboot.html.b6bef083.js
                                                          +++ b/assets/springboot.html.5534c4e6.js
                                                          @@ -1 +1 @@
                                                          -const l={key:"v-068e11cb",path:"/java/%E6%A1%86%E6%9E%B6/springboot/springboot.html",title:"SpringBoot",lang:"zh-CN",frontmatter:{},excerpt:"",headers:[{level:2,title:"\u7B2C1\u7AE0 XML\u548CJavaConfig",slug:"\u7B2C1\u7AE0-xml\u548Cjavaconfig",children:[{level:3,title:"\u6982\u8FF0",slug:"\u6982\u8FF0",children:[]},{level:3,title:"JavaConfig",slug:"javaconfig",children:[]},{level:3,title:"\u4E24\u4E2A\u6CE8\u89E3\u4ECB\u7ECD",slug:"\u4E24\u4E2A\u6CE8\u89E3\u4ECB\u7ECD",children:[{level:4,title:"@ImportResource",slug:"importresource",children:[]},{level:4,title:"@PropertyResource",slug:"propertyresource",children:[]}]}]},{level:2,title:"\u7B2C2\u7AE0 springboot\u5165\u95E8",slug:"\u7B2C2\u7AE0-springboot\u5165\u95E8",children:[{level:3,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-1",children:[]},{level:3,title:"\u4F7F\u7528springboot",slug:"\u4F7F\u7528springboot",children:[{level:4,title:"\u7B2C\u4E00\u79CD\u65B9\u5F0F\uFF1A \u4F7F\u7528springboot\u63D0\u4F9B\u7684\u521D\u59CB\u5316\u5668",slug:"\u7B2C\u4E00\u79CD\u65B9\u5F0F-\u4F7F\u7528springboot\u63D0\u4F9B\u7684\u521D\u59CB\u5316\u5668",children:[]},{level:4,title:"\u7B2C\u4E8C\u79CD\u65B9\u5F0F\uFF1A\u4F7F\u7528maven\u6784\u5EFAspringboot\u9879\u76EE",slug:"\u7B2C\u4E8C\u79CD\u65B9\u5F0F-\u4F7F\u7528maven\u6784\u5EFAspringboot\u9879\u76EE",children:[]}]},{level:3,title:"@SpringBootApplication\u6CE8\u89E3",slug:"springbootapplication\u6CE8\u89E3",children:[{level:4,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-2",children:[]},{level:4,title:"@SpringBootConfiguration",slug:"springbootconfiguration",children:[]},{level:4,title:"@EnableAutoConfiguration",slug:"enableautoconfiguration",children:[]},{level:4,title:"@ComponentScan",slug:"componentscan",children:[]}]},{level:3,title:"springboot\u914D\u7F6E\u6587\u4EF6",slug:"springboot\u914D\u7F6E\u6587\u4EF6",children:[{level:4,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-3",children:[]},{level:4,title:"properties\u683C\u5F0F",slug:"properties\u683C\u5F0F",children:[]},{level:4,title:"yml\u683C\u5F0F",slug:"yml\u683C\u5F0F",children:[]},{level:4,title:"\u591A\u73AF\u5883\u914D\u7F6E",slug:"\u591A\u73AF\u5883\u914D\u7F6E",children:[]},{level:4,title:"springboot\u81EA\u5B9A\u4E49\u914D\u7F6E",slug:"springboot\u81EA\u5B9A\u4E49\u914D\u7F6E",children:[]}]},{level:3,title:"springboot\u4E2D\u4F7F\u7528jsp",slug:"springboot\u4E2D\u4F7F\u7528jsp",children:[]},{level:3,title:"springboot\u4E2D\u4F7F\u7528ApplicationContext",slug:"springboot\u4E2D\u4F7F\u7528applicationcontext",children:[]},{level:3,title:"springboot\u4E2D\u4F7F\u7528CommandLineRunner\u63A5\u53E3",slug:"springboot\u4E2D\u4F7F\u7528commandlinerunner\u63A5\u53E3",children:[]}]},{level:2,title:"\u7B2C3\u7AE0 springboot\u548Cweb\u7EC4\u4EF6",slug:"\u7B2C3\u7AE0-springboot\u548Cweb\u7EC4\u4EF6",children:[{level:3,title:"springboot\u4E2D\u4F7F\u7528\u62E6\u622A\u5668",slug:"springboot\u4E2D\u4F7F\u7528\u62E6\u622A\u5668",children:[]},{level:3,title:"springboot\u4E2D\u4F7F\u7528servlet",slug:"springboot\u4E2D\u4F7F\u7528servlet",children:[]},{level:3,title:"springboot\u4E2D\u4F7F\u7528\u8FC7\u6EE4\u5668",slug:"springboot\u4E2D\u4F7F\u7528\u8FC7\u6EE4\u5668",children:[]}]},{level:2,title:"\u7B2C4\u7AE0 ORM\u64CD\u4F5CMySQL",slug:"\u7B2C4\u7AE0-orm\u64CD\u4F5Cmysql",children:[{level:3,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-4",children:[]},{level:3,title:"\u4F7F\u7528",slug:"\u4F7F\u7528",children:[{level:4,title:"\u6B65\u9AA4",slug:"\u6B65\u9AA4",children:[]},{level:4,title:"\u7B2C\u4E00\u79CD\u65B9\u5F0F\uFF1A@Mapper\u6CE8\u89E3",slug:"\u7B2C\u4E00\u79CD\u65B9\u5F0F-mapper\u6CE8\u89E3",children:[]},{level:4,title:"\u7B2C\u4E8C\u79CD\u65B9\u5F0F\uFF1A@MapperScan\u6CE8\u89E3",slug:"\u7B2C\u4E8C\u79CD\u65B9\u5F0F-mapperscan\u6CE8\u89E3",children:[]},{level:4,title:"dao\u63A5\u53E3\u548Cmapper\u6587\u4EF6\u5206\u5F00\u5B58\u50A8",slug:"dao\u63A5\u53E3\u548Cmapper\u6587\u4EF6\u5206\u5F00\u5B58\u50A8",children:[]}]},{level:3,title:"\u4E8B\u52A1\u652F\u6301",slug:"\u4E8B\u52A1\u652F\u6301",children:[]}]},{level:2,title:"\u7B2C5\u7AE0 \u63A5\u53E3\u67B6\u6784\u98CE\u683C-RESTful",slug:"\u7B2C5\u7AE0-\u63A5\u53E3\u67B6\u6784\u98CE\u683C-restful",children:[{level:3,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-5",children:[]},{level:3,title:"RESTful\u7684\u6CE8\u89E3",slug:"restful\u7684\u6CE8\u89E3",children:[{level:4,title:"@PathVariable",slug:"pathvariable",children:[]},{level:4,title:"@GetMapping",slug:"getmapping",children:[]},{level:4,title:"@PostMapping",slug:"postmapping",children:[]},{level:4,title:"@PutMapping",slug:"putmapping",children:[]},{level:4,title:"@DeleteMapping",slug:"deletemapping",children:[]},{level:4,title:"@RestController",slug:"restcontroller",children:[]}]},{level:3,title:"postman",slug:"postman",children:[]}]},{level:2,title:"\u7B2C6\u7AE0 springboot\u96C6\u6210redis",slug:"\u7B2C6\u7AE0-springboot\u96C6\u6210redis",children:[{level:3,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-6",children:[]},{level:3,title:"\u6B65\u9AA4",slug:"\u6B65\u9AA4-1",children:[]},{level:3,title:"\u5E8F\u5217\u5316",slug:"\u5E8F\u5217\u5316",children:[]}]},{level:2,title:"\u7B2C7\u7AE0 springboot\u96C6\u6210dubbo",slug:"\u7B2C7\u7AE0-springboot\u96C6\u6210dubbo",children:[{level:3,title:"\u5B9E\u73B0\u6B65\u9AA4",slug:"\u5B9E\u73B0\u6B65\u9AA4",children:[{level:4,title:"\u516C\u5171\u9879\u76EE",slug:"\u516C\u5171\u9879\u76EE",children:[]},{level:4,title:"\u670D\u52A1\u63D0\u4F9B\u8005\u9879\u76EE",slug:"\u670D\u52A1\u63D0\u4F9B\u8005\u9879\u76EE",children:[]},{level:4,title:"\u670D\u52A1\u6D88\u8D39\u8005\u9879\u76EE",slug:"\u670D\u52A1\u6D88\u8D39\u8005\u9879\u76EE",children:[]}]}]},{level:2,title:"\u7B2C8\u7AE0 springboot\u9879\u76EE\u6253\u5305",slug:"\u7B2C8\u7AE0-springboot\u9879\u76EE\u6253\u5305",children:[{level:3,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-7",children:[]},{level:3,title:"\u6253\u5305\u4E3Awar\u5305",slug:"\u6253\u5305\u4E3Awar\u5305",children:[]},{level:3,title:"\u6253\u5305\u4E3Ajar\u5305",slug:"\u6253\u5305\u4E3Ajar\u5305",children:[]},{level:3,title:"jar\u5305\u548Cwar\u5305\u7684\u533A\u522B",slug:"jar\u5305\u548Cwar\u5305\u7684\u533A\u522B",children:[]}]},{level:2,title:"\u7B2C9\u7AE0 \u6A21\u677F\u5F15\u64CEThymeleaf",slug:"\u7B2C9\u7AE0-\u6A21\u677F\u5F15\u64CEthymeleaf",children:[{level:3,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-8",children:[]},{level:3,title:"\u4F7F\u7528",slug:"\u4F7F\u7528-1",children:[]},{level:3,title:"thymeleaf\u8BED\u6CD5",slug:"thymeleaf\u8BED\u6CD5",children:[{level:4,title:"\u6807\u51C6\u53D8\u91CF\u8868\u8FBE\u5F0F",slug:"\u6807\u51C6\u53D8\u91CF\u8868\u8FBE\u5F0F",children:[]},{level:4,title:"\u9009\u62E9\u53D8\u91CF\u8868\u8FBE\u5F0F",slug:"\u9009\u62E9\u53D8\u91CF\u8868\u8FBE\u5F0F",children:[]},{level:4,title:"\u94FE\u63A5\u8868\u8FBE\u5F0F",slug:"\u94FE\u63A5\u8868\u8FBE\u5F0F",children:[]},{level:4,title:"\u5C5E\u6027",slug:"\u5C5E\u6027",children:[]}]}]},{level:2,title:"\u6CE8\u89E3\u603B\u7ED3\uFF1A",slug:"\u6CE8\u89E3\u603B\u7ED3",children:[{level:3,title:"spring+springMVC+springboot",slug:"spring-springmvc-springboot",children:[{level:4,title:"\u521B\u5EFA\u5BF9\u8C61\u7684\u6CE8\u89E3",slug:"\u521B\u5EFA\u5BF9\u8C61\u7684\u6CE8\u89E3",children:[]},{level:4,title:"\u8D4B\u503C\u7684\u6CE8\u89E3",slug:"\u8D4B\u503C\u7684\u6CE8\u89E3",children:[]},{level:4,title:"\u5176\u4ED6\u6CE8\u89E3",slug:"\u5176\u4ED6\u6CE8\u89E3",children:[]},{level:4,title:"springboot\u4E2D\u7684\u6CE8\u89E3",slug:"springboot\u4E2D\u7684\u6CE8\u89E3",children:[]}]},{level:3,title:"mybatis\u76F8\u5173\u7684\u6CE8\u89E3",slug:"mybatis\u76F8\u5173\u7684\u6CE8\u89E3",children:[]},{level:3,title:"dubbo\u76F8\u5173\u7684\u6CE8\u89E3",slug:"dubbo\u76F8\u5173\u7684\u6CE8\u89E3",children:[]}]}],git:{updatedTime:1710173765e3,contributors:[{name:"shailene",email:"64005626+shaileneF@users.noreply.github.com",commits:1}]},filePathRelative:"java/\u6846\u67B6/springboot/springboot.md"};export{l as data};
                                                          +const l={key:"v-068e11cb",path:"/java/%E6%A1%86%E6%9E%B6/springboot/springboot.html",title:"SpringBoot",lang:"zh-CN",frontmatter:{},excerpt:"",headers:[{level:2,title:"\u7B2C1\u7AE0 XML\u548CJavaConfig",slug:"\u7B2C1\u7AE0-xml\u548Cjavaconfig",children:[{level:3,title:"\u6982\u8FF0",slug:"\u6982\u8FF0",children:[]},{level:3,title:"JavaConfig",slug:"javaconfig",children:[]},{level:3,title:"\u4E24\u4E2A\u6CE8\u89E3\u4ECB\u7ECD",slug:"\u4E24\u4E2A\u6CE8\u89E3\u4ECB\u7ECD",children:[{level:4,title:"@ImportResource",slug:"importresource",children:[]},{level:4,title:"@PropertyResource",slug:"propertyresource",children:[]}]}]},{level:2,title:"\u7B2C2\u7AE0 springboot\u5165\u95E8",slug:"\u7B2C2\u7AE0-springboot\u5165\u95E8",children:[{level:3,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-1",children:[]},{level:3,title:"\u4F7F\u7528springboot",slug:"\u4F7F\u7528springboot",children:[{level:4,title:"\u7B2C\u4E00\u79CD\u65B9\u5F0F\uFF1A \u4F7F\u7528springboot\u63D0\u4F9B\u7684\u521D\u59CB\u5316\u5668",slug:"\u7B2C\u4E00\u79CD\u65B9\u5F0F-\u4F7F\u7528springboot\u63D0\u4F9B\u7684\u521D\u59CB\u5316\u5668",children:[]},{level:4,title:"\u7B2C\u4E8C\u79CD\u65B9\u5F0F\uFF1A\u4F7F\u7528maven\u6784\u5EFAspringboot\u9879\u76EE",slug:"\u7B2C\u4E8C\u79CD\u65B9\u5F0F-\u4F7F\u7528maven\u6784\u5EFAspringboot\u9879\u76EE",children:[]}]},{level:3,title:"@SpringBootApplication\u6CE8\u89E3",slug:"springbootapplication\u6CE8\u89E3",children:[{level:4,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-2",children:[]},{level:4,title:"@SpringBootConfiguration",slug:"springbootconfiguration",children:[]},{level:4,title:"@EnableAutoConfiguration",slug:"enableautoconfiguration",children:[]},{level:4,title:"@ComponentScan",slug:"componentscan",children:[]}]},{level:3,title:"springboot\u914D\u7F6E\u6587\u4EF6",slug:"springboot\u914D\u7F6E\u6587\u4EF6",children:[{level:4,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-3",children:[]},{level:4,title:"properties\u683C\u5F0F",slug:"properties\u683C\u5F0F",children:[]},{level:4,title:"yml\u683C\u5F0F",slug:"yml\u683C\u5F0F",children:[]},{level:4,title:"\u591A\u73AF\u5883\u914D\u7F6E",slug:"\u591A\u73AF\u5883\u914D\u7F6E",children:[]},{level:4,title:"springboot\u81EA\u5B9A\u4E49\u914D\u7F6E",slug:"springboot\u81EA\u5B9A\u4E49\u914D\u7F6E",children:[]}]},{level:3,title:"springboot\u4E2D\u4F7F\u7528jsp",slug:"springboot\u4E2D\u4F7F\u7528jsp",children:[]},{level:3,title:"springboot\u4E2D\u4F7F\u7528ApplicationContext",slug:"springboot\u4E2D\u4F7F\u7528applicationcontext",children:[]},{level:3,title:"springboot\u4E2D\u4F7F\u7528CommandLineRunner\u63A5\u53E3",slug:"springboot\u4E2D\u4F7F\u7528commandlinerunner\u63A5\u53E3",children:[]}]},{level:2,title:"\u7B2C3\u7AE0 springboot\u548Cweb\u7EC4\u4EF6",slug:"\u7B2C3\u7AE0-springboot\u548Cweb\u7EC4\u4EF6",children:[{level:3,title:"springboot\u4E2D\u4F7F\u7528\u62E6\u622A\u5668",slug:"springboot\u4E2D\u4F7F\u7528\u62E6\u622A\u5668",children:[]},{level:3,title:"springboot\u4E2D\u4F7F\u7528servlet",slug:"springboot\u4E2D\u4F7F\u7528servlet",children:[]},{level:3,title:"springboot\u4E2D\u4F7F\u7528\u8FC7\u6EE4\u5668",slug:"springboot\u4E2D\u4F7F\u7528\u8FC7\u6EE4\u5668",children:[]}]},{level:2,title:"\u7B2C4\u7AE0 ORM\u64CD\u4F5CMySQL",slug:"\u7B2C4\u7AE0-orm\u64CD\u4F5Cmysql",children:[{level:3,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-4",children:[]},{level:3,title:"\u4F7F\u7528",slug:"\u4F7F\u7528",children:[{level:4,title:"\u6B65\u9AA4",slug:"\u6B65\u9AA4",children:[]},{level:4,title:"\u7B2C\u4E00\u79CD\u65B9\u5F0F\uFF1A@Mapper\u6CE8\u89E3",slug:"\u7B2C\u4E00\u79CD\u65B9\u5F0F-mapper\u6CE8\u89E3",children:[]},{level:4,title:"\u7B2C\u4E8C\u79CD\u65B9\u5F0F\uFF1A@MapperScan\u6CE8\u89E3",slug:"\u7B2C\u4E8C\u79CD\u65B9\u5F0F-mapperscan\u6CE8\u89E3",children:[]},{level:4,title:"dao\u63A5\u53E3\u548Cmapper\u6587\u4EF6\u5206\u5F00\u5B58\u50A8",slug:"dao\u63A5\u53E3\u548Cmapper\u6587\u4EF6\u5206\u5F00\u5B58\u50A8",children:[]}]},{level:3,title:"\u4E8B\u52A1\u652F\u6301",slug:"\u4E8B\u52A1\u652F\u6301",children:[]}]},{level:2,title:"\u7B2C5\u7AE0 \u63A5\u53E3\u67B6\u6784\u98CE\u683C-RESTful",slug:"\u7B2C5\u7AE0-\u63A5\u53E3\u67B6\u6784\u98CE\u683C-restful",children:[{level:3,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-5",children:[]},{level:3,title:"RESTful\u7684\u6CE8\u89E3",slug:"restful\u7684\u6CE8\u89E3",children:[{level:4,title:"@PathVariable",slug:"pathvariable",children:[]},{level:4,title:"@GetMapping",slug:"getmapping",children:[]},{level:4,title:"@PostMapping",slug:"postmapping",children:[]},{level:4,title:"@PutMapping",slug:"putmapping",children:[]},{level:4,title:"@DeleteMapping",slug:"deletemapping",children:[]},{level:4,title:"@RestController",slug:"restcontroller",children:[]}]},{level:3,title:"postman",slug:"postman",children:[]}]},{level:2,title:"\u7B2C6\u7AE0 springboot\u96C6\u6210redis",slug:"\u7B2C6\u7AE0-springboot\u96C6\u6210redis",children:[{level:3,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-6",children:[]},{level:3,title:"\u6B65\u9AA4",slug:"\u6B65\u9AA4-1",children:[]},{level:3,title:"\u5E8F\u5217\u5316",slug:"\u5E8F\u5217\u5316",children:[]}]},{level:2,title:"\u7B2C7\u7AE0 springboot\u96C6\u6210dubbo",slug:"\u7B2C7\u7AE0-springboot\u96C6\u6210dubbo",children:[{level:3,title:"\u5B9E\u73B0\u6B65\u9AA4",slug:"\u5B9E\u73B0\u6B65\u9AA4",children:[{level:4,title:"\u516C\u5171\u9879\u76EE",slug:"\u516C\u5171\u9879\u76EE",children:[]},{level:4,title:"\u670D\u52A1\u63D0\u4F9B\u8005\u9879\u76EE",slug:"\u670D\u52A1\u63D0\u4F9B\u8005\u9879\u76EE",children:[]},{level:4,title:"\u670D\u52A1\u6D88\u8D39\u8005\u9879\u76EE",slug:"\u670D\u52A1\u6D88\u8D39\u8005\u9879\u76EE",children:[]}]}]},{level:2,title:"\u7B2C8\u7AE0 springboot\u9879\u76EE\u6253\u5305",slug:"\u7B2C8\u7AE0-springboot\u9879\u76EE\u6253\u5305",children:[{level:3,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-7",children:[]},{level:3,title:"\u6253\u5305\u4E3Awar\u5305",slug:"\u6253\u5305\u4E3Awar\u5305",children:[]},{level:3,title:"\u6253\u5305\u4E3Ajar\u5305",slug:"\u6253\u5305\u4E3Ajar\u5305",children:[]},{level:3,title:"jar\u5305\u548Cwar\u5305\u7684\u533A\u522B",slug:"jar\u5305\u548Cwar\u5305\u7684\u533A\u522B",children:[]}]},{level:2,title:"\u7B2C9\u7AE0 \u6A21\u677F\u5F15\u64CEThymeleaf",slug:"\u7B2C9\u7AE0-\u6A21\u677F\u5F15\u64CEthymeleaf",children:[{level:3,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-8",children:[]},{level:3,title:"\u4F7F\u7528",slug:"\u4F7F\u7528-1",children:[]},{level:3,title:"thymeleaf\u8BED\u6CD5",slug:"thymeleaf\u8BED\u6CD5",children:[{level:4,title:"\u6807\u51C6\u53D8\u91CF\u8868\u8FBE\u5F0F",slug:"\u6807\u51C6\u53D8\u91CF\u8868\u8FBE\u5F0F",children:[]},{level:4,title:"\u9009\u62E9\u53D8\u91CF\u8868\u8FBE\u5F0F",slug:"\u9009\u62E9\u53D8\u91CF\u8868\u8FBE\u5F0F",children:[]},{level:4,title:"\u94FE\u63A5\u8868\u8FBE\u5F0F",slug:"\u94FE\u63A5\u8868\u8FBE\u5F0F",children:[]},{level:4,title:"\u5C5E\u6027",slug:"\u5C5E\u6027",children:[]}]}]},{level:2,title:"\u6CE8\u89E3\u603B\u7ED3\uFF1A",slug:"\u6CE8\u89E3\u603B\u7ED3",children:[{level:3,title:"spring+springMVC+springboot",slug:"spring-springmvc-springboot",children:[{level:4,title:"\u521B\u5EFA\u5BF9\u8C61\u7684\u6CE8\u89E3",slug:"\u521B\u5EFA\u5BF9\u8C61\u7684\u6CE8\u89E3",children:[]},{level:4,title:"\u8D4B\u503C\u7684\u6CE8\u89E3",slug:"\u8D4B\u503C\u7684\u6CE8\u89E3",children:[]},{level:4,title:"\u5176\u4ED6\u6CE8\u89E3",slug:"\u5176\u4ED6\u6CE8\u89E3",children:[]},{level:4,title:"springboot\u4E2D\u7684\u6CE8\u89E3",slug:"springboot\u4E2D\u7684\u6CE8\u89E3",children:[]}]},{level:3,title:"mybatis\u76F8\u5173\u7684\u6CE8\u89E3",slug:"mybatis\u76F8\u5173\u7684\u6CE8\u89E3",children:[]},{level:3,title:"dubbo\u76F8\u5173\u7684\u6CE8\u89E3",slug:"dubbo\u76F8\u5173\u7684\u6CE8\u89E3",children:[]}]}],git:{updatedTime:1710173784e3,contributors:[{name:"shailene",email:"64005626+shaileneF@users.noreply.github.com",commits:1}]},filePathRelative:"java/\u6846\u67B6/springboot/springboot.md"};export{l as data};
                                                          diff --git a/assets/springboot.html.18996c7f.js b/assets/springboot.html.6fe03d84.js
                                                          similarity index 96%
                                                          rename from assets/springboot.html.18996c7f.js
                                                          rename to assets/springboot.html.6fe03d84.js
                                                          index 0496e617..697aacf4 100644
                                                          --- a/assets/springboot.html.18996c7f.js
                                                          +++ b/assets/springboot.html.6fe03d84.js
                                                          @@ -1 +1 @@
                                                          -const e={key:"v-92381d18",path:"/java/%E6%A1%86%E6%9E%B6/springboot%E5%8E%9F%E7%90%86/springboot.html",title:"\u4E00\u4E9B\u539F\u7406",lang:"zh-CN",frontmatter:{},excerpt:"",headers:[{level:2,title:"\u57FA\u7840\u5165\u95E8",slug:"\u57FA\u7840\u5165\u95E8",children:[{level:3,title:"spring\u4E0Espringboot",slug:"spring\u4E0Espringboot",children:[]},{level:3,title:"\u5FAE\u670D\u52A1",slug:"\u5FAE\u670D\u52A1",children:[]},{level:3,title:"\u4E86\u89E3\u81EA\u52A8\u914D\u7F6E\u539F\u7406",slug:"\u4E86\u89E3\u81EA\u52A8\u914D\u7F6E\u539F\u7406",children:[{level:4,title:"\u4F9D\u8D56\u7BA1\u7406",slug:"\u4F9D\u8D56\u7BA1\u7406",children:[]},{level:4,title:"\u81EA\u52A8\u914D\u7F6E",slug:"\u81EA\u52A8\u914D\u7F6E",children:[]},{level:4,title:"\u5BB9\u5668\u529F\u80FD\u548C\u6CE8\u89E3",slug:"\u5BB9\u5668\u529F\u80FD\u548C\u6CE8\u89E3",children:[]},{level:4,title:"\u914D\u7F6E\u7ED1\u5B9AJavaBean",slug:"\u914D\u7F6E\u7ED1\u5B9Ajavabean",children:[]},{level:4,title:"\u81EA\u52A8\u914D\u7F6E\u539F\u7406",slug:"\u81EA\u52A8\u914D\u7F6E\u539F\u7406",children:[]}]},{level:3,title:"\u5F00\u53D1\u5C0F\u6280\u5DE7",slug:"\u5F00\u53D1\u5C0F\u6280\u5DE7",children:[]}]},{level:2,title:"\u6838\u5FC3\u529F\u80FD-web\u5F00\u53D1",slug:"\u6838\u5FC3\u529F\u80FD-web\u5F00\u53D1",children:[{level:3,title:"\u6982\u8FF0",slug:"\u6982\u8FF0",children:[]},{level:3,title:"\u9759\u6001\u8D44\u6E90\u8BF7\u6C42",slug:"\u9759\u6001\u8D44\u6E90\u8BF7\u6C42",children:[]},{level:3,title:"\u9759\u6001\u8D44\u6E90\u914D\u7F6E\u539F\u7406",slug:"\u9759\u6001\u8D44\u6E90\u914D\u7F6E\u539F\u7406",children:[]},{level:3,title:"\u6B22\u8FCE\u9875\u652F\u6301",slug:"\u6B22\u8FCE\u9875\u652F\u6301",children:[]}]}],git:{updatedTime:1710173765e3,contributors:[{name:"shailene",email:"64005626+shaileneF@users.noreply.github.com",commits:1}]},filePathRelative:"java/\u6846\u67B6/springboot\u539F\u7406/springboot.md"};export{e as data};
                                                          +const e={key:"v-92381d18",path:"/java/%E6%A1%86%E6%9E%B6/springboot%E5%8E%9F%E7%90%86/springboot.html",title:"\u4E00\u4E9B\u539F\u7406",lang:"zh-CN",frontmatter:{},excerpt:"",headers:[{level:2,title:"\u57FA\u7840\u5165\u95E8",slug:"\u57FA\u7840\u5165\u95E8",children:[{level:3,title:"spring\u4E0Espringboot",slug:"spring\u4E0Espringboot",children:[]},{level:3,title:"\u5FAE\u670D\u52A1",slug:"\u5FAE\u670D\u52A1",children:[]},{level:3,title:"\u4E86\u89E3\u81EA\u52A8\u914D\u7F6E\u539F\u7406",slug:"\u4E86\u89E3\u81EA\u52A8\u914D\u7F6E\u539F\u7406",children:[{level:4,title:"\u4F9D\u8D56\u7BA1\u7406",slug:"\u4F9D\u8D56\u7BA1\u7406",children:[]},{level:4,title:"\u81EA\u52A8\u914D\u7F6E",slug:"\u81EA\u52A8\u914D\u7F6E",children:[]},{level:4,title:"\u5BB9\u5668\u529F\u80FD\u548C\u6CE8\u89E3",slug:"\u5BB9\u5668\u529F\u80FD\u548C\u6CE8\u89E3",children:[]},{level:4,title:"\u914D\u7F6E\u7ED1\u5B9AJavaBean",slug:"\u914D\u7F6E\u7ED1\u5B9Ajavabean",children:[]},{level:4,title:"\u81EA\u52A8\u914D\u7F6E\u539F\u7406",slug:"\u81EA\u52A8\u914D\u7F6E\u539F\u7406",children:[]}]},{level:3,title:"\u5F00\u53D1\u5C0F\u6280\u5DE7",slug:"\u5F00\u53D1\u5C0F\u6280\u5DE7",children:[]}]},{level:2,title:"\u6838\u5FC3\u529F\u80FD-web\u5F00\u53D1",slug:"\u6838\u5FC3\u529F\u80FD-web\u5F00\u53D1",children:[{level:3,title:"\u6982\u8FF0",slug:"\u6982\u8FF0",children:[]},{level:3,title:"\u9759\u6001\u8D44\u6E90\u8BF7\u6C42",slug:"\u9759\u6001\u8D44\u6E90\u8BF7\u6C42",children:[]},{level:3,title:"\u9759\u6001\u8D44\u6E90\u914D\u7F6E\u539F\u7406",slug:"\u9759\u6001\u8D44\u6E90\u914D\u7F6E\u539F\u7406",children:[]},{level:3,title:"\u6B22\u8FCE\u9875\u652F\u6301",slug:"\u6B22\u8FCE\u9875\u652F\u6301",children:[]}]}],git:{updatedTime:1710173784e3,contributors:[{name:"shailene",email:"64005626+shaileneF@users.noreply.github.com",commits:1}]},filePathRelative:"java/\u6846\u67B6/springboot\u539F\u7406/springboot.md"};export{e as data};
                                                          diff --git "a/assets/springcloud\357\274\210\344\270\212\357\274\211.html.d3af961f.js" "b/assets/springcloud\357\274\210\344\270\212\357\274\211.html.0fdc4fcf.js"
                                                          similarity index 99%
                                                          rename from "assets/springcloud\357\274\210\344\270\212\357\274\211.html.d3af961f.js"
                                                          rename to "assets/springcloud\357\274\210\344\270\212\357\274\211.html.0fdc4fcf.js"
                                                          index ec9c4a26..4515270e 100644
                                                          --- "a/assets/springcloud\357\274\210\344\270\212\357\274\211.html.d3af961f.js"
                                                          +++ "b/assets/springcloud\357\274\210\344\270\212\357\274\211.html.0fdc4fcf.js"
                                                          @@ -1,4 +1,4 @@
                                                          -import{_ as n,e as a}from"./app.0d029894.js";var s="/study/assets/image-20220115172730196.493e323f.png",t="/study/assets/image-20220116000044126.2b82a99b.png",p="/study/assets/image-20220116171911224.4e873e42.png",o="/study/assets/image-20220116182526923.c28b4c49.png",e="/study/assets/image-20220116194121874.9f7c9976.png",c="/study/assets/image-20220116194349759.b2e621a1.png",l="/study/assets/image-20220116195548421.28054b6a.png",u="/study/assets/image-20220401221336007.5422e6bd.png",k="/study/assets/image-20220402155939273.3ae7a926.png",i="/study/assets/image-20220402215540554.1a77fa86.png",g="/study/assets/image-20220407210154833.dda87a99.png",r="/study/assets/image-20220407211107036.515e2b1e.png",d="/study/assets/image-20220407231949582.37dcf8e5.png",m="/study/assets/image-20220408221424683.f0bf7cc2.png",y="/study/assets/image-20220412162714377.5ed3193c.png";const v={},f=a('

                                                          SpringCloud\u4E0A

                                                          \u4E00\u3001\u7B80\u4ECB

                                                          \u6982\u8FF0

                                                          1. springcloud \u662F\u5206\u5E03\u5F0F\u5FAE\u670D\u52A1\u67B6\u6784\u7684\u4E00\u7AD9\u5F0F\u89E3\u51B3\u65B9\u6848\uFF0C\u662F\u591A\u79CD\u5FAE\u670D\u52A1\u67B6\u6784\u843D\u5730\u6280\u672F\u7684\u96C6\u5408\u4F53\uFF0C\u4FD7\u79F0\u5FAE\u670D\u52A1\u5168\u5BB6\u6876\u3002

                                                          2. \u5206\u5E03\u5F0F\u662F\u6307\u5C06\u4E0D\u540C\u7684\u4E1A\u52A1\u5206\u5E03\u5728\u4E0D\u540C\u7684\u5730\u65B9\uFF0C\u5206\u5E03\u5F0F\u4E3B\u8981\u662F\u9488\u5BF9\u4E8E\u4E1A\u52A1\uFF08\u5FAE\u670D\u52A1\uFF09\u6765\u8BF4\uFF0C\u591A\u4E2A\u5FAE\u670D\u52A1\u5408\u8D77\u6765\u6784\u6210\u4E00\u4E2A\u5206\u5E03\u5F0F\u7CFB\u7EDF\u3002

                                                            \u5206\u5E03\u5F0F\u7CFB\u7EDF\u4E2D\u67D0\u4E00\u4E2A\u4E1A\u52A1\u5373\u5FAE\u670D\u52A1\uFF0C\u53EF\u4EE5\u7528\u96C6\u7FA4\u7684\u65B9\u5F0F\u5B9E\u73B0\uFF0C\u5373\u5C06\u540C\u4E00\u4E2A\u5FAE\u670D\u52A1\u90E8\u7F72\u5728\u591A\u53F0\u670D\u52A1\u5668\u4E0A\uFF0C\u907F\u514D\u5355\u70B9\u6545\u969C\u3002

                                                            \u5206\u5E03\u5F0F\u7CFB\u7EDF\u4E2D\uFF0CA\u670D\u52A1\u9700\u8981\u8C03\u7528B\u670D\u52A1\uFF0CB\u670D\u52A1\u5728\u591A\u53F0\u673A\u5668\u4E2D\u90FD\u5B58\u5728\uFF0CA\u8C03\u7528\u4EFB\u610F\u4E00\u4E2A\u670D\u52A1\u5668\u5747\u53EF\u5B8C\u6210\u529F\u80FD\u3002

                                                            \u96C6\u7FA4\u6307\u7684\u662F\u5C06\u51E0\u53F0\u670D\u52A1\u5668\u96C6\u4E2D\u5728\u4E00\u8D77\uFF0C\u5B9E\u73B0\u540C\u4E00\u4E1A\u52A1\u3002

                                                          3. \u670D\u52A1\u6CE8\u518C\u4E0E\u53D1\u73B0\uFF1AEureka

                                                            \u670D\u52A1\u8D1F\u8F7D\u4E0E\u8C03\u7528\uFF1ARibbon\u3001feign

                                                            \u670D\u52A1\u7194\u65AD\u964D\u7EA7\uFF1AHystrix

                                                            \u670D\u52A1\u7F51\u5173\uFF1Azuul

                                                            \u670D\u52A1\u5206\u5E03\u5F0F\u914D\u7F6E\uFF1Aspringcloud config

                                                            \u670D\u52A1\u5F00\u53D1\uFF1Aspringboot

                                                          4. springboot\u662F\u4EE5\u6570\u5B57\u4F5C\u4E3A\u7248\u672C\uFF0Cspringcloud\u662F\u4EE5\u5B57\u6BCD\u4F5C\u4E3A\u7248\u672C

                                                          5. dubbo\u505A\u670D\u52A1\u8C03\u7528\uFF0Cdubbo\u6846\u67B6\u91CC\u6709\u670D\u52A1\u63D0\u4F9B\u8005\u3001\u670D\u52A1\u6D88\u8D39\u8005\u3001\u6CE8\u518C\u4E2D\u5FC3\u3001\u76D1\u63A7\u4E2D\u5FC3\u3001\u8D1F\u8F7D\u5747\u8861\u3002

                                                            \u4EE5\u524D\u901A\u8FC7dubbo\u505A\u670D\u52A1\u8C03\u7528\uFF0Czookeeper\u505A\u6CE8\u518C\u4E2D\u5FC3\u3002

                                                            \u73B0\u5728\u662F\u7528springcloud\uFF0C\u91CC\u9762\u96C6\u6210\u4E86\u5FAE\u670D\u52A1\u5206\u5E03\u5F0F\u7684\u8BB8\u591A\u843D\u5730\u6280\u672F\uFF0C\u662F\u8BB8\u591A\u5206\u5E03\u5F0F\u6280\u672F\u7684\u96C6\u5408\u4F53\uFF0C\u53EF\u4EE5\u8FD9\u4E48\u7406\u89E3\uFF0C\u6BD4\u5982\u96C6\u6210\u4E86Eureka\u4F5C\u4E3A\u6CE8\u518C\u4E2D\u5FC3\u7B49\u3002\u8FD9\u662Fspringcloud\u548Cdubbo\u7684\u533A\u522B\u3002

                                                          6. Eureka\u76EE\u524D\u505C\u66F4\u4E0D\u505C\u7528\uFF0C\u53EF\u4EE5\u7528zookeeper\u3001Consul\u3001Nacos\u4EE3\u66FF

                                                          7. springcloud\u96C6\u6210\u7684\u5206\u5E03\u5F0F\u6280\u672F

                                                            \u670D\u52A1\u6CE8\u518C\u4E2D\u5FC3\uFF1A

                                                            • Eureka
                                                            • zookeeper
                                                            • consul
                                                            • nacos

                                                            \u670D\u52A1\u8C03\u7528\uFF1A

                                                            • Ribbon
                                                            • LoadBalancer
                                                            • Feign\uFF08\u4E0D\u4F7F\u7528\u4E86\uFF09
                                                            • openFeign

                                                            \u670D\u52A1\u7194\u65AD\u964D\u7EA7\uFF1A

                                                            • Hystrix
                                                            • resilience4j
                                                            • AlibabaSentinel

                                                            \u670D\u52A1\u7F51\u5173\uFF1A

                                                            • zuul
                                                            • gateway

                                                            \u670D\u52A1\u914D\u7F6E\uFF1A

                                                            • config
                                                            • apolo
                                                            • Nacos

                                                            \u670D\u52A1\u603B\u7EBF\uFF1A

                                                            • Bus
                                                            • nacos

                                                            image-20220115172730196

                                                          \u4E8C\u3001\u793A\u4F8B\u9879\u76EE\u6784\u5EFA

                                                          \u6B65\u9AA4

                                                          \u5EFA\u7236\u5DE5\u7A0B

                                                          1. \u9996\u5148\u5EFA\u7ACB\u4E00\u4E2Amaven\u7236\u5DE5\u7A0B

                                                          2. pom\u6587\u4EF6

                                                            <?xml version="1.0" encoding="UTF-8"?>
                                                            +import{_ as n,e as a}from"./app.f8791b52.js";var s="/study/assets/image-20220115172730196.493e323f.png",t="/study/assets/image-20220116000044126.2b82a99b.png",p="/study/assets/image-20220116171911224.4e873e42.png",o="/study/assets/image-20220116182526923.c28b4c49.png",e="/study/assets/image-20220116194121874.9f7c9976.png",c="/study/assets/image-20220116194349759.b2e621a1.png",l="/study/assets/image-20220116195548421.28054b6a.png",u="/study/assets/image-20220401221336007.5422e6bd.png",k="/study/assets/image-20220402155939273.3ae7a926.png",i="/study/assets/image-20220402215540554.1a77fa86.png",g="/study/assets/image-20220407210154833.dda87a99.png",r="/study/assets/image-20220407211107036.515e2b1e.png",d="/study/assets/image-20220407231949582.37dcf8e5.png",m="/study/assets/image-20220408221424683.f0bf7cc2.png",y="/study/assets/image-20220412162714377.5ed3193c.png";const v={},f=a('

                                                            SpringCloud\u4E0A

                                                            \u4E00\u3001\u7B80\u4ECB

                                                            \u6982\u8FF0

                                                            1. springcloud \u662F\u5206\u5E03\u5F0F\u5FAE\u670D\u52A1\u67B6\u6784\u7684\u4E00\u7AD9\u5F0F\u89E3\u51B3\u65B9\u6848\uFF0C\u662F\u591A\u79CD\u5FAE\u670D\u52A1\u67B6\u6784\u843D\u5730\u6280\u672F\u7684\u96C6\u5408\u4F53\uFF0C\u4FD7\u79F0\u5FAE\u670D\u52A1\u5168\u5BB6\u6876\u3002

                                                            2. \u5206\u5E03\u5F0F\u662F\u6307\u5C06\u4E0D\u540C\u7684\u4E1A\u52A1\u5206\u5E03\u5728\u4E0D\u540C\u7684\u5730\u65B9\uFF0C\u5206\u5E03\u5F0F\u4E3B\u8981\u662F\u9488\u5BF9\u4E8E\u4E1A\u52A1\uFF08\u5FAE\u670D\u52A1\uFF09\u6765\u8BF4\uFF0C\u591A\u4E2A\u5FAE\u670D\u52A1\u5408\u8D77\u6765\u6784\u6210\u4E00\u4E2A\u5206\u5E03\u5F0F\u7CFB\u7EDF\u3002

                                                              \u5206\u5E03\u5F0F\u7CFB\u7EDF\u4E2D\u67D0\u4E00\u4E2A\u4E1A\u52A1\u5373\u5FAE\u670D\u52A1\uFF0C\u53EF\u4EE5\u7528\u96C6\u7FA4\u7684\u65B9\u5F0F\u5B9E\u73B0\uFF0C\u5373\u5C06\u540C\u4E00\u4E2A\u5FAE\u670D\u52A1\u90E8\u7F72\u5728\u591A\u53F0\u670D\u52A1\u5668\u4E0A\uFF0C\u907F\u514D\u5355\u70B9\u6545\u969C\u3002

                                                              \u5206\u5E03\u5F0F\u7CFB\u7EDF\u4E2D\uFF0CA\u670D\u52A1\u9700\u8981\u8C03\u7528B\u670D\u52A1\uFF0CB\u670D\u52A1\u5728\u591A\u53F0\u673A\u5668\u4E2D\u90FD\u5B58\u5728\uFF0CA\u8C03\u7528\u4EFB\u610F\u4E00\u4E2A\u670D\u52A1\u5668\u5747\u53EF\u5B8C\u6210\u529F\u80FD\u3002

                                                              \u96C6\u7FA4\u6307\u7684\u662F\u5C06\u51E0\u53F0\u670D\u52A1\u5668\u96C6\u4E2D\u5728\u4E00\u8D77\uFF0C\u5B9E\u73B0\u540C\u4E00\u4E1A\u52A1\u3002

                                                            3. \u670D\u52A1\u6CE8\u518C\u4E0E\u53D1\u73B0\uFF1AEureka

                                                              \u670D\u52A1\u8D1F\u8F7D\u4E0E\u8C03\u7528\uFF1ARibbon\u3001feign

                                                              \u670D\u52A1\u7194\u65AD\u964D\u7EA7\uFF1AHystrix

                                                              \u670D\u52A1\u7F51\u5173\uFF1Azuul

                                                              \u670D\u52A1\u5206\u5E03\u5F0F\u914D\u7F6E\uFF1Aspringcloud config

                                                              \u670D\u52A1\u5F00\u53D1\uFF1Aspringboot

                                                            4. springboot\u662F\u4EE5\u6570\u5B57\u4F5C\u4E3A\u7248\u672C\uFF0Cspringcloud\u662F\u4EE5\u5B57\u6BCD\u4F5C\u4E3A\u7248\u672C

                                                            5. dubbo\u505A\u670D\u52A1\u8C03\u7528\uFF0Cdubbo\u6846\u67B6\u91CC\u6709\u670D\u52A1\u63D0\u4F9B\u8005\u3001\u670D\u52A1\u6D88\u8D39\u8005\u3001\u6CE8\u518C\u4E2D\u5FC3\u3001\u76D1\u63A7\u4E2D\u5FC3\u3001\u8D1F\u8F7D\u5747\u8861\u3002

                                                              \u4EE5\u524D\u901A\u8FC7dubbo\u505A\u670D\u52A1\u8C03\u7528\uFF0Czookeeper\u505A\u6CE8\u518C\u4E2D\u5FC3\u3002

                                                              \u73B0\u5728\u662F\u7528springcloud\uFF0C\u91CC\u9762\u96C6\u6210\u4E86\u5FAE\u670D\u52A1\u5206\u5E03\u5F0F\u7684\u8BB8\u591A\u843D\u5730\u6280\u672F\uFF0C\u662F\u8BB8\u591A\u5206\u5E03\u5F0F\u6280\u672F\u7684\u96C6\u5408\u4F53\uFF0C\u53EF\u4EE5\u8FD9\u4E48\u7406\u89E3\uFF0C\u6BD4\u5982\u96C6\u6210\u4E86Eureka\u4F5C\u4E3A\u6CE8\u518C\u4E2D\u5FC3\u7B49\u3002\u8FD9\u662Fspringcloud\u548Cdubbo\u7684\u533A\u522B\u3002

                                                            6. Eureka\u76EE\u524D\u505C\u66F4\u4E0D\u505C\u7528\uFF0C\u53EF\u4EE5\u7528zookeeper\u3001Consul\u3001Nacos\u4EE3\u66FF

                                                            7. springcloud\u96C6\u6210\u7684\u5206\u5E03\u5F0F\u6280\u672F

                                                              \u670D\u52A1\u6CE8\u518C\u4E2D\u5FC3\uFF1A

                                                              • Eureka
                                                              • zookeeper
                                                              • consul
                                                              • nacos

                                                              \u670D\u52A1\u8C03\u7528\uFF1A

                                                              • Ribbon
                                                              • LoadBalancer
                                                              • Feign\uFF08\u4E0D\u4F7F\u7528\u4E86\uFF09
                                                              • openFeign

                                                              \u670D\u52A1\u7194\u65AD\u964D\u7EA7\uFF1A

                                                              • Hystrix
                                                              • resilience4j
                                                              • AlibabaSentinel

                                                              \u670D\u52A1\u7F51\u5173\uFF1A

                                                              • zuul
                                                              • gateway

                                                              \u670D\u52A1\u914D\u7F6E\uFF1A

                                                              • config
                                                              • apolo
                                                              • Nacos

                                                              \u670D\u52A1\u603B\u7EBF\uFF1A

                                                              • Bus
                                                              • nacos

                                                              image-20220115172730196

                                                            \u4E8C\u3001\u793A\u4F8B\u9879\u76EE\u6784\u5EFA

                                                            \u6B65\u9AA4

                                                            \u5EFA\u7236\u5DE5\u7A0B

                                                            1. \u9996\u5148\u5EFA\u7ACB\u4E00\u4E2Amaven\u7236\u5DE5\u7A0B

                                                            2. pom\u6587\u4EF6

                                                              <?xml version="1.0" encoding="UTF-8"?>
                                                               
                                                               <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                                                 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
                                                              diff --git "a/assets/springcloud\357\274\210\344\270\212\357\274\211.html.41b01bda.js" "b/assets/springcloud\357\274\210\344\270\212\357\274\211.html.902088db.js"
                                                              similarity index 98%
                                                              rename from "assets/springcloud\357\274\210\344\270\212\357\274\211.html.41b01bda.js"
                                                              rename to "assets/springcloud\357\274\210\344\270\212\357\274\211.html.902088db.js"
                                                              index ebc5af00..30c66403 100644
                                                              --- "a/assets/springcloud\357\274\210\344\270\212\357\274\211.html.41b01bda.js"
                                                              +++ "b/assets/springcloud\357\274\210\344\270\212\357\274\211.html.902088db.js"
                                                              @@ -1 +1 @@
                                                              -const e={key:"v-1dbd0fce",path:"/java/%E5%88%86%E5%B8%83%E5%BC%8F/springcloud/springcloud%EF%BC%88%E4%B8%8A%EF%BC%89.html",title:"SpringCloud\u4E0A",lang:"zh-CN",frontmatter:{},excerpt:"",headers:[{level:2,title:"\u4E00\u3001\u7B80\u4ECB",slug:"\u4E00\u3001\u7B80\u4ECB",children:[{level:3,title:"\u6982\u8FF0",slug:"\u6982\u8FF0",children:[]}]},{level:2,title:"\u4E8C\u3001\u793A\u4F8B\u9879\u76EE\u6784\u5EFA",slug:"\u4E8C\u3001\u793A\u4F8B\u9879\u76EE\u6784\u5EFA",children:[{level:3,title:"\u6B65\u9AA4",slug:"\u6B65\u9AA4",children:[{level:4,title:"\u5EFA\u7236\u5DE5\u7A0B",slug:"\u5EFA\u7236\u5DE5\u7A0B",children:[]},{level:4,title:"\u6784\u5EFA\u5B50\u5DE5\u7A0B\u5FAE\u670D\u52A1\u63D0\u4F9B\u8005",slug:"\u6784\u5EFA\u5B50\u5DE5\u7A0B\u5FAE\u670D\u52A1\u63D0\u4F9B\u8005",children:[]},{level:4,title:"\u6784\u5EFA\u5B50\u5DE5\u7A0B\u5FAE\u670D\u52A1\u6D88\u8D39\u8005",slug:"\u6784\u5EFA\u5B50\u5DE5\u7A0B\u5FAE\u670D\u52A1\u6D88\u8D39\u8005",children:[]},{level:4,title:"\u6784\u5EFA\u516C\u5171\u5B9E\u4F53\u7C7B\u9879\u76EE",slug:"\u6784\u5EFA\u516C\u5171\u5B9E\u4F53\u7C7B\u9879\u76EE",children:[]}]}]},{level:2,title:"\u4E09\u3001\u670D\u52A1\u6CE8\u518C\u4E2D\u5FC3",slug:"\u4E09\u3001\u670D\u52A1\u6CE8\u518C\u4E2D\u5FC3",children:[{level:3,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-1",children:[]},{level:3,title:"Eureka",slug:"eureka",children:[{level:4,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-2",children:[]},{level:4,title:"Eureka Server\u548CEureka Client",slug:"eureka-server\u548Ceureka-client",children:[]},{level:4,title:"\u4F7F\u7528",slug:"\u4F7F\u7528",children:[{level:5,title:"eureka server",slug:"eureka-server",children:[]},{level:5,title:"\u5FAE\u670D\u52A1\u63D0\u4F9B\u8005\u5165\u9A7B\u8FDBeureka server",slug:"\u5FAE\u670D\u52A1\u63D0\u4F9B\u8005\u5165\u9A7B\u8FDBeureka-server",children:[]},{level:5,title:"\u5FAE\u670D\u52A1\u6D88\u8D39\u8005\u5165\u9A7B\u8FDBeureka server",slug:"\u5FAE\u670D\u52A1\u6D88\u8D39\u8005\u5165\u9A7B\u8FDBeureka-server",children:[]}]},{level:4,title:"eureka\u4F7F\u7528\u6B65\u9AA4\u7B80\u8FF0",slug:"eureka\u4F7F\u7528\u6B65\u9AA4\u7B80\u8FF0",children:[]},{level:4,title:"eureka\u96C6\u7FA4",slug:"eureka\u96C6\u7FA4",children:[]},{level:4,title:"eureka server\u96C6\u7FA4\u6784\u5EFA\u6B65\u9AA4",slug:"eureka-server\u96C6\u7FA4\u6784\u5EFA\u6B65\u9AA4",children:[]},{level:4,title:"\u670D\u52A1\u53D1\u73B0Discovery",slug:"\u670D\u52A1\u53D1\u73B0discovery",children:[]},{level:4,title:"eureka\u81EA\u6211\u4FDD\u62A4\u673A\u5236",slug:"eureka\u81EA\u6211\u4FDD\u62A4\u673A\u5236",children:[]}]},{level:3,title:"zookeeper",slug:"zookeeper",children:[{level:4,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-3",children:[]},{level:4,title:"\u4F7F\u7528",slug:"\u4F7F\u7528-1",children:[{level:5,title:"\u5FAE\u670D\u52A1\u63D0\u4F9B\u8005",slug:"\u5FAE\u670D\u52A1\u63D0\u4F9B\u8005",children:[]},{level:5,title:"\u5FAE\u670D\u52A1\u6D88\u8D39\u8005",slug:"\u5FAE\u670D\u52A1\u6D88\u8D39\u8005",children:[]}]},{level:4,title:"zookeeper\u7684\u4F5C\u7528",slug:"zookeeper\u7684\u4F5C\u7528",children:[]}]},{level:3,title:"consul",slug:"consul",children:[{level:4,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-4",children:[]},{level:4,title:"\u4F7F\u7528",slug:"\u4F7F\u7528-2",children:[]},{level:4,title:"\u5FAE\u670D\u52A1\u63D0\u4F9B\u8005",slug:"\u5FAE\u670D\u52A1\u63D0\u4F9B\u8005-1",children:[]},{level:4,title:"\u5FAE\u670D\u52A1\u6D88\u8D39\u8005",slug:"\u5FAE\u670D\u52A1\u6D88\u8D39\u8005-1",children:[]}]},{level:3,title:"Eureka\u3001Zookeeper\u3001Consul\u7684\u5F02\u540C",slug:"eureka\u3001zookeeper\u3001consul\u7684\u5F02\u540C",children:[]},{level:3,title:"Nacos",slug:"nacos",children:[]}]},{level:2,title:"\u56DB\u3001\u670D\u52A1\u8C03\u7528",slug:"\u56DB\u3001\u670D\u52A1\u8C03\u7528",children:[{level:3,title:"Ribbon",slug:"ribbon",children:[{level:4,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-5",children:[]},{level:4,title:"RestTemplate",slug:"resttemplate",children:[]},{level:4,title:"IRule\u63A5\u53E3",slug:"irule\u63A5\u53E3",children:[]}]},{level:3,title:"OpenFeign",slug:"openfeign",children:[{level:4,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-6",children:[]},{level:4,title:"\u4F7F\u7528",slug:"\u4F7F\u7528-3",children:[]},{level:4,title:"\u8D85\u65F6\u63A7\u5236",slug:"\u8D85\u65F6\u63A7\u5236",children:[]},{level:4,title:"\u65E5\u5FD7\u6253\u5370",slug:"\u65E5\u5FD7\u6253\u5370",children:[]}]}]},{level:2,title:"\u4E94\u3001\u670D\u52A1\u7194\u65AD\u964D\u7EA7",slug:"\u4E94\u3001\u670D\u52A1\u7194\u65AD\u964D\u7EA7",children:[{level:3,title:"\u5206\u5E03\u5F0F\u7CFB\u7EDF\u9762\u4E34\u7684\u95EE\u9898",slug:"\u5206\u5E03\u5F0F\u7CFB\u7EDF\u9762\u4E34\u7684\u95EE\u9898",children:[]},{level:3,title:"\u670D\u52A1\u964D\u7EA7-fallback",slug:"\u670D\u52A1\u964D\u7EA7-fallback",children:[]},{level:3,title:"\u670D\u52A1\u7194\u65AD-break",slug:"\u670D\u52A1\u7194\u65AD-break",children:[]},{level:3,title:"\u670D\u52A1\u9650\u6D41-flow limit",slug:"\u670D\u52A1\u9650\u6D41-flow-limit",children:[]},{level:3,title:"Hystrix",slug:"hystrix",children:[{level:4,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-7",children:[]},{level:4,title:"\u4F7F\u7528",slug:"\u4F7F\u7528-4",children:[{level:5,title:"\u5FAE\u670D\u52A1\u63D0\u4F9B\u8005",slug:"\u5FAE\u670D\u52A1\u63D0\u4F9B\u8005-2",children:[]},{level:5,title:"\u5FAE\u670D\u52A1\u6D88\u8D39\u8005",slug:"\u5FAE\u670D\u52A1\u6D88\u8D39\u8005-2",children:[]}]},{level:4,title:"\u670D\u52A1\u964D\u7EA7",slug:"\u670D\u52A1\u964D\u7EA7",children:[{level:5,title:"\u63D0\u4F9B\u8005",slug:"\u63D0\u4F9B\u8005",children:[]},{level:5,title:"\u6D88\u8D39\u8005",slug:"\u6D88\u8D39\u8005",children:[]},{level:5,title:"\u95EE\u9898",slug:"\u95EE\u9898",children:[]}]},{level:4,title:"\u670D\u52A1\u7194\u65AD",slug:"\u670D\u52A1\u7194\u65AD",children:[{level:5,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-8",children:[]},{level:5,title:"\u670D\u52A1\u63D0\u4F9B\u8005",slug:"\u670D\u52A1\u63D0\u4F9B\u8005",children:[]},{level:5,title:"\u7194\u65AD\u7C7B\u578B",slug:"\u7194\u65AD\u7C7B\u578B",children:[]},{level:5,title:"\u65AD\u8DEF\u5668",slug:"\u65AD\u8DEF\u5668",children:[]}]}]}]}],git:{updatedTime:1710173765e3,contributors:[{name:"shailene",email:"64005626+shaileneF@users.noreply.github.com",commits:1}]},filePathRelative:"java/\u5206\u5E03\u5F0F/springcloud/springcloud\uFF08\u4E0A\uFF09.md"};export{e as data};
                                                              +const e={key:"v-1dbd0fce",path:"/java/%E5%88%86%E5%B8%83%E5%BC%8F/springcloud/springcloud%EF%BC%88%E4%B8%8A%EF%BC%89.html",title:"SpringCloud\u4E0A",lang:"zh-CN",frontmatter:{},excerpt:"",headers:[{level:2,title:"\u4E00\u3001\u7B80\u4ECB",slug:"\u4E00\u3001\u7B80\u4ECB",children:[{level:3,title:"\u6982\u8FF0",slug:"\u6982\u8FF0",children:[]}]},{level:2,title:"\u4E8C\u3001\u793A\u4F8B\u9879\u76EE\u6784\u5EFA",slug:"\u4E8C\u3001\u793A\u4F8B\u9879\u76EE\u6784\u5EFA",children:[{level:3,title:"\u6B65\u9AA4",slug:"\u6B65\u9AA4",children:[{level:4,title:"\u5EFA\u7236\u5DE5\u7A0B",slug:"\u5EFA\u7236\u5DE5\u7A0B",children:[]},{level:4,title:"\u6784\u5EFA\u5B50\u5DE5\u7A0B\u5FAE\u670D\u52A1\u63D0\u4F9B\u8005",slug:"\u6784\u5EFA\u5B50\u5DE5\u7A0B\u5FAE\u670D\u52A1\u63D0\u4F9B\u8005",children:[]},{level:4,title:"\u6784\u5EFA\u5B50\u5DE5\u7A0B\u5FAE\u670D\u52A1\u6D88\u8D39\u8005",slug:"\u6784\u5EFA\u5B50\u5DE5\u7A0B\u5FAE\u670D\u52A1\u6D88\u8D39\u8005",children:[]},{level:4,title:"\u6784\u5EFA\u516C\u5171\u5B9E\u4F53\u7C7B\u9879\u76EE",slug:"\u6784\u5EFA\u516C\u5171\u5B9E\u4F53\u7C7B\u9879\u76EE",children:[]}]}]},{level:2,title:"\u4E09\u3001\u670D\u52A1\u6CE8\u518C\u4E2D\u5FC3",slug:"\u4E09\u3001\u670D\u52A1\u6CE8\u518C\u4E2D\u5FC3",children:[{level:3,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-1",children:[]},{level:3,title:"Eureka",slug:"eureka",children:[{level:4,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-2",children:[]},{level:4,title:"Eureka Server\u548CEureka Client",slug:"eureka-server\u548Ceureka-client",children:[]},{level:4,title:"\u4F7F\u7528",slug:"\u4F7F\u7528",children:[{level:5,title:"eureka server",slug:"eureka-server",children:[]},{level:5,title:"\u5FAE\u670D\u52A1\u63D0\u4F9B\u8005\u5165\u9A7B\u8FDBeureka server",slug:"\u5FAE\u670D\u52A1\u63D0\u4F9B\u8005\u5165\u9A7B\u8FDBeureka-server",children:[]},{level:5,title:"\u5FAE\u670D\u52A1\u6D88\u8D39\u8005\u5165\u9A7B\u8FDBeureka server",slug:"\u5FAE\u670D\u52A1\u6D88\u8D39\u8005\u5165\u9A7B\u8FDBeureka-server",children:[]}]},{level:4,title:"eureka\u4F7F\u7528\u6B65\u9AA4\u7B80\u8FF0",slug:"eureka\u4F7F\u7528\u6B65\u9AA4\u7B80\u8FF0",children:[]},{level:4,title:"eureka\u96C6\u7FA4",slug:"eureka\u96C6\u7FA4",children:[]},{level:4,title:"eureka server\u96C6\u7FA4\u6784\u5EFA\u6B65\u9AA4",slug:"eureka-server\u96C6\u7FA4\u6784\u5EFA\u6B65\u9AA4",children:[]},{level:4,title:"\u670D\u52A1\u53D1\u73B0Discovery",slug:"\u670D\u52A1\u53D1\u73B0discovery",children:[]},{level:4,title:"eureka\u81EA\u6211\u4FDD\u62A4\u673A\u5236",slug:"eureka\u81EA\u6211\u4FDD\u62A4\u673A\u5236",children:[]}]},{level:3,title:"zookeeper",slug:"zookeeper",children:[{level:4,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-3",children:[]},{level:4,title:"\u4F7F\u7528",slug:"\u4F7F\u7528-1",children:[{level:5,title:"\u5FAE\u670D\u52A1\u63D0\u4F9B\u8005",slug:"\u5FAE\u670D\u52A1\u63D0\u4F9B\u8005",children:[]},{level:5,title:"\u5FAE\u670D\u52A1\u6D88\u8D39\u8005",slug:"\u5FAE\u670D\u52A1\u6D88\u8D39\u8005",children:[]}]},{level:4,title:"zookeeper\u7684\u4F5C\u7528",slug:"zookeeper\u7684\u4F5C\u7528",children:[]}]},{level:3,title:"consul",slug:"consul",children:[{level:4,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-4",children:[]},{level:4,title:"\u4F7F\u7528",slug:"\u4F7F\u7528-2",children:[]},{level:4,title:"\u5FAE\u670D\u52A1\u63D0\u4F9B\u8005",slug:"\u5FAE\u670D\u52A1\u63D0\u4F9B\u8005-1",children:[]},{level:4,title:"\u5FAE\u670D\u52A1\u6D88\u8D39\u8005",slug:"\u5FAE\u670D\u52A1\u6D88\u8D39\u8005-1",children:[]}]},{level:3,title:"Eureka\u3001Zookeeper\u3001Consul\u7684\u5F02\u540C",slug:"eureka\u3001zookeeper\u3001consul\u7684\u5F02\u540C",children:[]},{level:3,title:"Nacos",slug:"nacos",children:[]}]},{level:2,title:"\u56DB\u3001\u670D\u52A1\u8C03\u7528",slug:"\u56DB\u3001\u670D\u52A1\u8C03\u7528",children:[{level:3,title:"Ribbon",slug:"ribbon",children:[{level:4,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-5",children:[]},{level:4,title:"RestTemplate",slug:"resttemplate",children:[]},{level:4,title:"IRule\u63A5\u53E3",slug:"irule\u63A5\u53E3",children:[]}]},{level:3,title:"OpenFeign",slug:"openfeign",children:[{level:4,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-6",children:[]},{level:4,title:"\u4F7F\u7528",slug:"\u4F7F\u7528-3",children:[]},{level:4,title:"\u8D85\u65F6\u63A7\u5236",slug:"\u8D85\u65F6\u63A7\u5236",children:[]},{level:4,title:"\u65E5\u5FD7\u6253\u5370",slug:"\u65E5\u5FD7\u6253\u5370",children:[]}]}]},{level:2,title:"\u4E94\u3001\u670D\u52A1\u7194\u65AD\u964D\u7EA7",slug:"\u4E94\u3001\u670D\u52A1\u7194\u65AD\u964D\u7EA7",children:[{level:3,title:"\u5206\u5E03\u5F0F\u7CFB\u7EDF\u9762\u4E34\u7684\u95EE\u9898",slug:"\u5206\u5E03\u5F0F\u7CFB\u7EDF\u9762\u4E34\u7684\u95EE\u9898",children:[]},{level:3,title:"\u670D\u52A1\u964D\u7EA7-fallback",slug:"\u670D\u52A1\u964D\u7EA7-fallback",children:[]},{level:3,title:"\u670D\u52A1\u7194\u65AD-break",slug:"\u670D\u52A1\u7194\u65AD-break",children:[]},{level:3,title:"\u670D\u52A1\u9650\u6D41-flow limit",slug:"\u670D\u52A1\u9650\u6D41-flow-limit",children:[]},{level:3,title:"Hystrix",slug:"hystrix",children:[{level:4,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-7",children:[]},{level:4,title:"\u4F7F\u7528",slug:"\u4F7F\u7528-4",children:[{level:5,title:"\u5FAE\u670D\u52A1\u63D0\u4F9B\u8005",slug:"\u5FAE\u670D\u52A1\u63D0\u4F9B\u8005-2",children:[]},{level:5,title:"\u5FAE\u670D\u52A1\u6D88\u8D39\u8005",slug:"\u5FAE\u670D\u52A1\u6D88\u8D39\u8005-2",children:[]}]},{level:4,title:"\u670D\u52A1\u964D\u7EA7",slug:"\u670D\u52A1\u964D\u7EA7",children:[{level:5,title:"\u63D0\u4F9B\u8005",slug:"\u63D0\u4F9B\u8005",children:[]},{level:5,title:"\u6D88\u8D39\u8005",slug:"\u6D88\u8D39\u8005",children:[]},{level:5,title:"\u95EE\u9898",slug:"\u95EE\u9898",children:[]}]},{level:4,title:"\u670D\u52A1\u7194\u65AD",slug:"\u670D\u52A1\u7194\u65AD",children:[{level:5,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-8",children:[]},{level:5,title:"\u670D\u52A1\u63D0\u4F9B\u8005",slug:"\u670D\u52A1\u63D0\u4F9B\u8005",children:[]},{level:5,title:"\u7194\u65AD\u7C7B\u578B",slug:"\u7194\u65AD\u7C7B\u578B",children:[]},{level:5,title:"\u65AD\u8DEF\u5668",slug:"\u65AD\u8DEF\u5668",children:[]}]}]}]}],git:{updatedTime:1710173784e3,contributors:[{name:"shailene",email:"64005626+shaileneF@users.noreply.github.com",commits:1}]},filePathRelative:"java/\u5206\u5E03\u5F0F/springcloud/springcloud\uFF08\u4E0A\uFF09.md"};export{e as data};
                                                              diff --git "a/assets/springcloud\357\274\210\344\270\213\357\274\211.html.6063447d.js" "b/assets/springcloud\357\274\210\344\270\213\357\274\211.html.87e1b4ab.js"
                                                              similarity index 99%
                                                              rename from "assets/springcloud\357\274\210\344\270\213\357\274\211.html.6063447d.js"
                                                              rename to "assets/springcloud\357\274\210\344\270\213\357\274\211.html.87e1b4ab.js"
                                                              index 29a3d24b..1e659ae9 100644
                                                              --- "a/assets/springcloud\357\274\210\344\270\213\357\274\211.html.6063447d.js"
                                                              +++ "b/assets/springcloud\357\274\210\344\270\213\357\274\211.html.87e1b4ab.js"
                                                              @@ -1,4 +1,4 @@
                                                              -import{_ as o,r as e,o as c,c as l,a as n,b as t,F as u,e as a,d as p}from"./app.0d029894.js";var i="/study/assets/image-20220412183425220.f3243c73.png",k="/study/assets/image-20220412224900162.1ade3bd3.png",r="/study/assets/image-20220413155206740.8a60d22a.png",g="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASoAAABECAIAAAC50e/mAAALxklEQVR4nO2df0xb1xXHzzU4CX5NyIoZNQn2g5KGBKaBWco0DF0XiU4KNMpEEqmkTtj+SNNVjfgjrNKaUpZGmmilKJuqEE0bIz9LgpapDtNGlbaAqcoqG7ZCAgsF2yQ4CSZtSJ6BOPjuj2cb2zwbnNg8Y85H/sPvvfvjvKv7fffcc599ycTEBCAIIgYSsQ1AkOULyg9BRAPlhyCigfJDENFA+SGIaMSLbQAAwOidcfvUlOcwPi4u+em1TMIqEU1CkEUgKka/m7dt31hGPZ+B4ZEvjL2mm7ceoyhqPvPK84XqAs0rp8zttYV5r54xUQoA3t8RJEqIitFvLk5KB4ZHnE5nRlrqwnNRqq/ZeQLeOGfUqig1N2ojZyCChIEolR/PdfPN6+abgpeeTlyz5Qcb/c9aTIPwXMkLSgAgRLXvdOc+obyU6msKfgMf6H9XTMJrMIKERDidzzt37pw+ffrevXtzLw0NDZ0/f37Ka4IXEczD1yJbAYKEk3DKj+O4u3fvXrhwwU+BQ0NDOp3uwYMH09PTYazOj/bawvxD/yLk+h92FeU9X/lXMxWc75lOVeb/+K3LhFw+VMRPEfnznkmjukDjnYsvpP1Upd95BHlywim/9PT0srIyu93urUBeezKZbNeuXYmJifMWIpXG52xIL1Tn5GxIXyGVLrz24ppOw/svUbrhzQsd3f9u2KcSdixZbYPhy9+XUlr6foexS39OqwIA2n5EvfNKyUW9sUtv+PLsQTixQ3vWozTyv/qDw78ydum7T+9hCfqrSNgIc+QzIyPDW4Ghag8AsjPZdSnyp2QJ61Lkm59Vhtc8QSg1N/7pn2Uf/IVXLCGqve8d2DRw5XOLJ8FLx98pXARLkOVG+EMvvAJ1Ot1HH300NTUVkvYAQP69RK/va8NungCWjtYB6D9UdNn7JIFMM4AKAAA2pi/GYwBZfkQk8ulRYKjaA4AHnD1x9VOu73Z7JMwTpPT9DgyEIotMpJbdMzIytm/fHqr2AKBv0MxNTgEANznVN2iOjHW+KNlMgEGTZf6UCBJWIvjWC8uyoWoPAO5zdr3h60+7uvWGr+9zERz9PHojRPPLN57r/7DinXZXrIWaz7xSq49c1QjCE6XL7g7Ho8gVToim9oOf5x+qUH8IWb8+e06rYrUNf4PKX7inf/S51y6dwlgLEnFINPzZxFdfD9y9F5oZwm+9IMiSIipGv6wM5aOZ0Ia7+LiosBxBnoSo6MSrmQSxTUAQEYiKHxwhyPIE5YcgooHyQxDRQPkhiGig/BBENFB+CCIaKD8EEQ2UH4KIBsoPQUQD5YcgohE/MjIitg0IskzB0Q9BRAPlhyCigfJDENFA+SGIaKD8EEQ0UH4IIhooPwQRjaj4s4nw4qAw6oi7/RCmQAIAq8CZsgJSpTNS/BNdJMqIKflRgP6p+KuTcdNO732I4ganYaUkfnPCTNaqR6hBJHqIHefzIYXPJqTdnMRXey6mnbSbk3w2IX2IG4RFAWP12R1vN3KU+n1fbsTI6EcB9PeltxzzjG23HER/X/riGuF0nK6i+2IPVVarj2iZORuJjdVnD3wBSQd7N+UHq4XTVRibMrNOv5sc7q3IKG3vf/XAuPuBSX9youi14vBWEXb4JvU+k3SwN0tttt8Qy6LoIkbk1z8VP6/2eG45SP9U/KZVwn8rSpW5jKnVZtUyvlvK09HGEX2ujO0RzLUI8P04qapX4xY/NdR01ENwBfKKhap5HhkRhTrL5zyMWNV7fSrBxFFg8GISC/JzULg6GQfg473cvvafe5Zvpu59K5OnKH74PJP0fc+lq5NxmSsfCUdiTJkJmmbLxx0q325tN7Rymky5Xhz5UUONsQmUdb2q1FmjSX5tUb4o5iBhIxbmflaHb6yF0mu68998qiNxcYnr2emJb69+fM7pnPFcn3ZSqyMuUGnyl6sZ/Unz6GyBlLZbmkD58lbPmbnTlYVMYOhoo3FPtl7r+lwz+CSmhhrPJaOu3fx2dkd9OwBQarJcamZ2H/XWnn/J1GR+25W3Y0/NGKUAwOkqOvceGJfA+PEcvTbbqDPNNSPQBEzg0G3M3IoeozUEE4RksKeQMV2F3/klRCyMfrcdvofXer67MfyjfW+uYNbwZ+jMIyKJ88uiXBGgOIU2TVM3YjCrUln+hP3ySZtmv0YB/e4k8i3loJ/1USltt+lBXqVlCOEClEoNNZ3Hm5OqetX5BADoaGN3dY5xd4u6jAWPb+meWI7VZw9YANYDAIC1bdwECTsEnTVwW9gAr/dqUgmlJsvhbf2HM2RHtEzZ2cJSf1+OGmr0xwaVdb1qd2LjYVAf0XrfEX87AJ5Dk/0GyHcUBaroMVpDkJAM5ifnxFLXv/5E0alonwMHIhZGv0mnz118ZxqUb8j2aA8AyJwNIfyy+CHfUs41NfCPdkrbLU098i1FPinUlUq2Z9zg3n7QeMUG5XJ1wAIpbe8/1izb2eLpVSR178bduXwtfBXeV+X7W9I8G+pahzjIlSlmi7q2x3/8Ycpq+bGREFa5oxxMQ4I7s/EDqbzqzGzi16sZU6vNCqDeKoceu9VzO7mM5watbeMmlwHCFQVtDSJpHtib42fwAglmMJ/AWZ61vyhYEdFNLIx+AjyhH6KuVLLbRi5XJpexYLxiY6vVvtIihJUX5Fq62rhSlQzMlkvNzO6WYKFO6/AkQEKqzwgmS80EGLRbAUDg6iyKDAYGvaou3nSmD1wh1tlUfGDWTXkAM9rGTWA/nuOzd6EEEqxAUovlGuj/qgPyi+2jg6DZv3HdSWNXG1eqAkMrx5ZsdOt/bkXBW0Mo9LJgAhsMfGyMzZA9TrnRQizIL0HiBJj1LdeymUOf/yOt4Ker1ri2hufGrEyyYk6WgHj1J7BdamYKWhhC/BQtyy9hmlptVq0S2sZNuUmvB3MOnwhFegL0jHs5w37w0UIbuHo5NdTojwUrL9DaiWxdLnQNc1Rp6+qR7yiSKYaZpiE7ANzsYQqOMoQEqSiirTHvYs/SJRaczxSp7+Gm3NWpSuOpP17/5O8m/Sfd50/+98KfH01NBskyF1npfrmpznKywWIqTysV6kyKF5LYnnGD2W5o5dgSuUIgiVfi9ASAyVGfvbLto4MAmTKF4FWL3RV3AEKKlW43Vbhw4xUb5CrrXCOMfXRQOFkAMzzI8ksYU6vN2DZuKper+Rtsthk7bPrcpHzVPBWF1BoLJ6jBMUAsyE8hnVkp8Xo6EpKzfc+zPyudefiQG7OuTUtXa9+IXzW7h9lKCVFIZwQK8oLv9ONfNDO7KwUdJ37yw3U1WLp65DsElunnlma/uM0T7aSGmu6LPfKqd5MJIaRYrgGu6beecKvt5OzyOgDISo8q2eb+V/d4x2PtN2dXQYjENW2jo40DTf6rI57uK2DGaKOxvt2VTvFCEttj/2qI02xNJoR3AWyXTk56ySlQRSG1xrws1OClTyw4n1ICmxNmujmvDktIyua8lM15guk3Jyzo9WtZfomsCVwPfkHUW+XHDtigPMtvZihpHtjbPOA+5F9PYcrOFqbWdLqnMdSZ672Ol/xaH0D2wFs5/P9eJR1sSbuxzTJ7N6zqvT6loabTnQC851T5tXk7B7uP5+gBqLJaXVVuPObJWJxVVd55fJv+Ish2tqjLWKbsbB5UdHvMUFarjxR5apEX5HZfbJYffNfTAkxTHew+6gozBq4oSGuEREgGxwCkr69PbBvCAAX4bGL+l84A4BkpDfTSWciVUpPl8DbL+vC//BW5kiPHUrRZdGLB+QQAAqBZ7XhGOk/A8xkp1awOj/YAXBF55csReBhb28ZN4L/aEeVErjVilxiRHwCsIPDiGkce4/SZB7pZKSF5jPPFNY4V4Quh2T6u4zT7g7yMsnA4XcXsSx60vb+6jmOrlU/gxS0+YWyN5UOMOJ/eLMLPbYP/NuLx8F5PWxK/ZvAQidZYJsSg/BBkqRA7zieCLDlQfggiGig/BBENlB+CiAbKD0FEA+WHIKKB8kMQ0UD5IYhokImJCbFtQJBlyv8BHaMKA2JtWF8AAAAASUVORK5CYII=",d="/study/assets/image-20220413173122373.3a494ea5.png",m="/study/assets/image-20220413173159980.c734ee27.png",y="/study/assets/image-20220413223635965.58bf4466.png",h="/study/assets/image-20220422151353040.d8cb3d62.png",b="/study/assets/image-20220422151406381.c900dd5e.png",f="/study/assets/image-20220422151416281.3ba7586e.png",v="/study/assets/image-20220422151957201.a8f50731.png",x="/study/assets/image-20220422164048905.7dd5375c.png",I="/study/assets/image-20220422173458808.2ad904ce.png",w="/study/assets/image-20220422174318322.0b819b44.png",q="/study/assets/image-20220422205146287.0b59800d.png",S="/study/assets/image-20220427192401949.74683871.png",P="/study/assets/image-20220427221615036.08db776a.png",A="/study/assets/image-20220427223205012.8d83f656.png",j="/study/assets/image-20220427224110964.47cf1505.png",_="/study/assets/image-20220427224143741.3feb690c.png",C="/study/assets/image-20220427232304944.f6fcd8c1.png",R="/study/assets/image-20220428184814381.b91e2f3e.png",E="/study/assets/image-20220428184927825.02eed2e4.png",M="/study/assets/image-20220428191323625.4581e964.png",B="/study/assets/image-20220428191620215.2fa15300.png",N="/study/assets/image-20220428191752846.1f2cc21d.png",U="/study/assets/image-20220428235324056.79f162bd.png",H="/study/assets/image-20220429000459359.3e44b670.png",G="/study/assets/image-20220429000950900.4d890588.png",L="/study/assets/image-20220429005351780.edeb1a66.png",O="/study/assets/image-20220429010249375.f254d54d.png",Q="/study/assets/image-20220429012930432.f2927921.png",z="/study/assets/image-20220429013822810.d1fe4a7a.png",F="/study/assets/image-20220429014054421.03d4198f.png",T="/study/assets/image-20220429014913106.17a9453d.png",K="/study/assets/image-20220429015602259.f8ddb78d.png",X="/study/assets/image-20220429154831580.8452e50e.png",D="/study/assets/image-20220429164904026.4bfd3aa5.png";const V={},J=a('

                                                              spring cloud\u4E0B

                                                              \u516D\u3001\u670D\u52A1\u7F51\u5173

                                                              \u6982\u8FF0

                                                              1. \u670D\u52A1\u7F51\u5173\u8FDB\u884C\u65E5\u5FD7\u3001\u9650\u6D41\u3001\u6743\u9650\u3001\u5B89\u5168\u7B49\u7B49\u64CD\u4F5C\u3002

                                                              zuul

                                                              1. springcloud\u4E2D\u96C6\u6210\u7684zuul\u7248\u672C\uFF0C\u91C7\u7528\u7684\u662Ftomcat\u5BB9\u5668\uFF0C\u4F7F\u7528\u7684\u662F\u4F20\u7EDF\u7684servlet io\u5904\u7406\u6A21\u578B\u3002

                                                              2. servlet\u662Ftomcat\u7684\u6838\u5FC3\u7EC4\u4EF6\u4E4B\u4E00\uFF0C\u53E6\u5916\u4E24\u4E2A\u7EC4\u4EF6\u662F\u76D1\u542C\u5668\u548C\u8FC7\u6EE4\u5668\u3002

                                                              3. servlet\u662F\u7531servlet container\u8FDB\u884C\u751F\u547D\u5468\u671F\u7BA1\u7406

                                                              4. servlet\u7684\u751F\u547D\u5468\u671F\uFF1A

                                                                • container\u542F\u52A8\u65F6\u6784\u9020servlet\u5BF9\u8C61\u5E76\u8C03\u7528**servlet init()**\u8FDB\u884C\u521D\u59CB\u5316
                                                                • container\u8FD0\u884C\u65F6\u63A5\u53D7\u8BF7\u6C42\uFF0C\u5E76\u4E3A\u6BCF\u4E2A\u8BF7\u6C42\u5206\u914D\u4E00\u4E2A\u7EBF\u7A0B\uFF08\u4E00\u822C\u4ECE\u7EBF\u7A0B\u6C60\u4E2D\u83B7\u53D6\u7A7A\u95F2\u7EBF\u7A0B\uFF09\uFF0C\u7136\u540E\u8C03\u7528service()
                                                                • container\u5173\u95ED\u65F6\u8C03\u7528**servlet destroy()**\u6D88\u8D39servlet\u3002
                                                              5. servlet\u662F\u4E00\u4E2A\u7B80\u5355\u7684\u7F51\u7EDCIO\u6A21\u578B\uFF0C\u5F53\u8BF7\u6C42\u8FDB\u5165servlet container\u65F6\uFF0Cservlet container\u5C31\u4F1A\u4E3A\u5176\u7ED1\u5B9A\u4E00\u4E2A\u7EBF\u7A0B\uFF0C\u5728\u5E76\u53D1\u4E0D\u9AD8\u7684\u573A\u666F\u4E0B\uFF0C\u8FD9\u79CD\u6A21\u578B\u662F\u9002\u7528\u7684\uFF0C\u4F46\u662F\u4E00\u65E6\u9AD8\u5E76\u53D1\uFF0C\u7EBF\u7A0B\u6570\u91CF\u5C31\u4F1A\u4E0A\u6DA8\uFF0C\u800C\u7EBF\u7A0B\u8D44\u6E90\u4EE3\u4EF7\u662F\u6602\u8D35\u7684\uFF08\u4E0A\u4E0B\u6587\u5207\u6362\u9020\u6210\u5185\u5B58\u6D88\u8017\u5927\uFF09\uFF0C\u4E25\u91CD\u5F71\u54CD\u8BF7\u6C42\u7684\u5904\u7406\u65F6\u95F4\u3002\u5728\u4E00\u4E9B\u7B80\u5355\u4E1A\u52A1\u573A\u666F\u4E0B\uFF0C\u4E0D\u5E0C\u671B\u4E3A\u6BCF\u4E2A\u8BF7\u6C42\u5206\u914D\u4E00\u4E2A\u7EBF\u7A0B\uFF0C\u53EA\u9700\u89811\u4E2A\u6216\u51E0\u4E2A\u7EBF\u7A0B\u5C31\u80FD\u5E94\u5BF9\u6781\u5927\u5E76\u53D1\u8BF7\u6C42\uFF0C\u8FD9\u79CD\u4E1A\u52A1\u573A\u666F\u4E0Bservlet\u6A21\u578B\u6CA1\u6709\u4F18\u52BF\u3002

                                                                \u6240\u4EE5Zuul 1.X\u662F\u57FA\u4E8Eservlet\u7684\u4E00\u4E2A\u963B\u585E\u5F0F\u5904\u7406\u6A21\u578B\uFF0C\u5373spring\u5B9E\u73B0\u4E86\u5904\u7406\u6240\u6709request\u8BF7\u6C42\u7684\u4E00\u4E2Aservlet\uFF08DispatcherServlet\uFF09\uFF0C\u662F\u963B\u585E\u5F0F\u5904\u7406\u6A21\u578B\u3002

                                                              6. \u4F20\u7EDF\u7684Web\u6846\u67B6\uFF0C\u6BD4\u5982\u8BF4strust2\uFF0Cspringmvc\u7B49\u90FD\u662F\u57FA\u4E8EServlet API\u4E0Eservlet\u5BB9\u5668\u57FA\u7840\u4E4B\u4E0A\u8FD0\u884C\u7684\u3002

                                                                \u5728servlet3.1\u4E4B\u540E\u6709\u4E86\u5F02\u6B65\u975E\u963B\u585E\u7684\u652F\u6301\uFF0C\u800Cwebflux\u662F\u4E00\u4E2A\u5178\u578B\u5F02\u6B65\u975E\u963B\u585E\u7684\u6846\u67B6\uFF0C\u4ED6\u7684\u6838\u5FC3\u662F\u57FA\u4E8EReactor\u7684\u76F8\u5173API\u5B9E\u73B0\u7684\u3002

                                                                Spring WebFlux\u662Fspring5.0\u5F15\u5165\u7684\u65B0\u7684\u54CD\u5E94\u5F0F\u6846\u67B6\uFF0C\u533A\u522B\u4E8ESpring MVC\uFF0C\u5B83\u4E0D\u9700\u8981\u4F9D\u8D56\u4E8EServlet API\uFF0C\u5B83\u662F\u5B8C\u5168\u5F02\u6B65\u975E\u963B\u585E\u7684\uFF0C\u5E76\u4E14\u57FA\u4E8EReactor\u6765\u5B9E\u73B0\u54CD\u5E94\u5F0F\u6D41\u89C4\u8303\u3002

                                                              gateway

                                                              \u6982\u8FF0

                                                              1. springcloud gateway\u662Fspringcloud\u751F\u6001\u7CFB\u7EDF\u4E2D\u7684\u7F51\u5173\uFF0C\u76EE\u6807\u662F\u66FF\u4EE3zuul\u3002

                                                              2. springcloud gateway\u662F\u57FA\u4E8EWebFlux\u6846\u67B6\u5B9E\u73B0\u7684\uFF0CWebFlux\u6846\u67B6\u662F\u975E\u963B\u585E\u5F0F\u7684web\u6846\u67B6\uFF0C\u800CWebFlux\u6846\u67B6\u5E95\u5C42\u5219\u4F7F\u7528\u4E86\u9AD8\u6027\u80FD\u7684Reactor\u6A21\u5F0F\u901A\u4FE1\u6846\u67B6Netty\u3002

                                                              3. Springcloud gateway\u7684\u76EE\u6807\u662F\u63D0\u4F9B\u7EDF\u4E00\u7684\u8DEF\u7531\u65B9\u5F0F\uFF0C\u4E14\u57FA\u4E8EFilter\u94FE\u7684\u65B9\u5F0F\u63D0\u4F9B\u4E86\u7F51\u5173\u57FA\u672C\u7684\u529F\u80FD\uFF0C\u5982\u5B89\u5168\u3001\u76D1\u63A7\u548C\u9650\u6D41\u3002

                                                                image-20220412183425220

                                                              4. \u53EF\u4EE5\u7406\u89E3\u4E3A\u7F51\u5173\u662F\u6240\u6709\u5FAE\u670D\u52A1\u7684\u5165\u53E3\u3002

                                                              5. gateway\u662F\u57FA\u4E8E\u5F02\u6B65\u975E\u963B\u585E\u6A21\u578B\u5F00\u53D1\u7684\u3002

                                                              \u7279\u6027

                                                              1. \u52A8\u6001\u8DEF\u7531\uFF1A\u80FD\u591F\u5339\u914D\u4EFB\u4F55\u8BF7\u6C42\u5C5E\u6027
                                                              2. \u53EF\u4EE5\u5BF9\u8DEF\u7531\u6307\u5B9APredicate\uFF08\u65AD\u8A00\uFF09\u548CFilter\uFF08\u8FC7\u6EE4\u5668\uFF09
                                                              3. \u96C6\u6210Hystrix\u7684\u65AD\u8DEF\u5668\u529F\u80FD
                                                              4. \u96C6\u6210Springcloud\u670D\u52A1\u53D1\u73B0\u529F\u80FD
                                                              5. \u8BF7\u6C42\u9650\u6D41\u529F\u80FD
                                                              6. \u652F\u6301\u8DEF\u5F84\u91CD\u5199

                                                              \u4E09\u5927\u6838\u5FC3\u6982\u5FF5

                                                              1. \u8DEF\u7531\uFF08Route\uFF09

                                                                \u8DEF\u7531\u662F\u6784\u5EFA\u7F51\u5173\u7684\u57FA\u672C\u6A21\u5757\uFF0C\u5B83\u7531ID\uFF0C\u76EE\u6807URI\uFF0C\u4E00\u7CFB\u5217\u7684\u65AD\u8A00\u548C\u8FC7\u6EE4\u5668\u7EC4\u6210\uFF0C\u5982\u679C\u65AD\u8A00\u4E3Atrue\u5219\u5339\u914D\u8BE5\u8DEF\u7531\u3002

                                                              2. \u65AD\u8A00\uFF08Predicate\uFF09

                                                                \u5F00\u53D1\u4EBA\u5458\u53EF\u4EE5\u5339\u914DHTTP\u8BF7\u6C42\u4E2D\u7684\u6240\u6709\u5185\u5BB9\uFF08\u4F8B\u5982\u8BF7\u6C42\u5934\u6216\u8BF7\u6C42\u53C2\u6570\uFF09\uFF0C\u5982\u679C\u8BF7\u6C42\u4E0E\u65AD\u8A00\u76F8\u5339\u914D\u5219\u8FDB\u884C\u8DEF\u7531\u3002

                                                                predicate\u5C31\u53EF\u4EE5\u7406\u89E3\u4E3A\u5339\u914D\u6761\u4EF6\uFF0C\u5B9A\u4F4D\u5230\u771F\u6B63\u7684\u670D\u52A1\u8282\u70B9\u3002

                                                                Springcloud gateway\u5305\u62EC\u8BB8\u591A\u5185\u7F6E\u7684RoutePredicateFactories\uFF0C\u6240\u6709\u8FD9\u4E9BPredicate\u90FD\u4E0EHttp\u8BF7\u6C42\u7684\u4E0D\u540C\u5C5E\u6027\u5339\u914D\uFF0C\u591A\u4E2APredicate\u5DE5\u5382\u53EF\u4EE5\u8FDB\u884C\u7EC4\u5408\u3002

                                                              3. \u8FC7\u6EE4\u5668\uFF08Filter\uFF09

                                                                \u4F7F\u7528\u8FC7\u6EE4\u5668\uFF0C\u53EF\u4EE5\u5728\u8BF7\u6C42\u88AB\u8DEF\u7531\u524D\u6216\u8005\u540E\u5BF9\u8BF7\u6C42\u8FDB\u884C\u4FEE\u6539\u3002

                                                              gateway\u5DE5\u4F5C\u6D41\u7A0B

                                                              1. \u5BA2\u6237\u7AEF\u5411spring cloud gateway\u53D1\u51FA\u8BF7\u6C42\uFF0C\u7136\u540E\u5728gateway handler mapping\u4E2D\u627E\u5230\u4E0E\u8BF7\u6C42\u76F8\u5339\u914D\u7684\u8DEF\u7531\uFF0C\u5C06\u5176\u53D1\u9001\u5230gateway web handler\u3002

                                                                handler\u518D\u901A\u8FC7\u6307\u5B9A\u7684\u8FC7\u6EE4\u5668\u94FE\u5C06\u8BF7\u6C42\u53D1\u9001\u5230\u6211\u4EEC\u5B9E\u9645\u7684\u670D\u52A1\u6267\u884C\u4E1A\u52A1\u903B\u8F91\u3002

                                                                \u8FC7\u6EE4\u5668\u53EF\u80FD\u4F1A\u5728\u53D1\u9001\u4EE3\u7406\u8BF7\u6C42\u4E4B\u524D\u6216\u4E4B\u540E\u6267\u884C\u8FC7\u6EE4\u5668\u903B\u8F91\u3002

                                                                \u201Cpre\u201D\u7C7B\u578B\u7684\u8FC7\u6EE4\u5668\u53EF\u4EE5\u505A\u53C2\u6570\u6821\u9A8C\u3001\u6743\u9650\u6821\u9A8C\u3001\u6D41\u91CF\u76D1\u63A7\u3001\u65E5\u5FD7\u8F93\u51FA\u3001\u534F\u8BAE\u8F6C\u6362\u7B49\u3002

                                                                \u201Cpost\u201D\u7C7B\u578B\u7684\u8FC7\u6EE4\u5668\u4E2D\u53EF\u4EE5\u505A\u54CD\u5E94\u5185\u5BB9\u3001\u54CD\u5E94\u5934\u7684\u4FEE\u6539\uFF0C\u65E5\u5FD7\u8F93\u51FA\uFF0C\u6D41\u91CF\u76D1\u63A7\u7B49\u3002

                                                              \u7F51\u5173\u914D\u7F6E

                                                              \u5728application.yml\u4E2D\u914D\u7F6E
                                                              1. \u5EFAmodule

                                                              2. \u4FEE\u6539pom

                                                                \u8981\u6CE8\u610F\u7F51\u5173\u4F5C\u4E3A\u4E00\u79CD\u5FAE\u670D\u52A1\uFF0C\u4E5F\u8981\u6CE8\u518C\u8FDB\u6CE8\u518C\u4E2D\u5FC3

                                                                <dependencies>
                                                                +import{_ as o,r as e,o as c,c as l,a as n,b as t,F as u,e as a,d as p}from"./app.f8791b52.js";var i="/study/assets/image-20220412183425220.f3243c73.png",k="/study/assets/image-20220412224900162.1ade3bd3.png",r="/study/assets/image-20220413155206740.8a60d22a.png",g="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASoAAABECAIAAAC50e/mAAALxklEQVR4nO2df0xb1xXHzzU4CX5NyIoZNQn2g5KGBKaBWco0DF0XiU4KNMpEEqmkTtj+SNNVjfgjrNKaUpZGmmilKJuqEE0bIz9LgpapDtNGlbaAqcoqG7ZCAgsF2yQ4CSZtSJ6BOPjuj2cb2zwbnNg8Y85H/sPvvfvjvKv7fffcc599ycTEBCAIIgYSsQ1AkOULyg9BRAPlhyCigfJDENFA+SGIaMSLbQAAwOidcfvUlOcwPi4u+em1TMIqEU1CkEUgKka/m7dt31hGPZ+B4ZEvjL2mm7ceoyhqPvPK84XqAs0rp8zttYV5r54xUQoA3t8RJEqIitFvLk5KB4ZHnE5nRlrqwnNRqq/ZeQLeOGfUqig1N2ojZyCChIEolR/PdfPN6+abgpeeTlyz5Qcb/c9aTIPwXMkLSgAgRLXvdOc+obyU6msKfgMf6H9XTMJrMIKERDidzzt37pw+ffrevXtzLw0NDZ0/f37Ka4IXEczD1yJbAYKEk3DKj+O4u3fvXrhwwU+BQ0NDOp3uwYMH09PTYazOj/bawvxD/yLk+h92FeU9X/lXMxWc75lOVeb/+K3LhFw+VMRPEfnznkmjukDjnYsvpP1Upd95BHlywim/9PT0srIyu93urUBeezKZbNeuXYmJifMWIpXG52xIL1Tn5GxIXyGVLrz24ppOw/svUbrhzQsd3f9u2KcSdixZbYPhy9+XUlr6foexS39OqwIA2n5EvfNKyUW9sUtv+PLsQTixQ3vWozTyv/qDw78ydum7T+9hCfqrSNgIc+QzIyPDW4Ghag8AsjPZdSnyp2QJ61Lkm59Vhtc8QSg1N/7pn2Uf/IVXLCGqve8d2DRw5XOLJ8FLx98pXARLkOVG+EMvvAJ1Ot1HH300NTUVkvYAQP69RK/va8NungCWjtYB6D9UdNn7JIFMM4AKAAA2pi/GYwBZfkQk8ulRYKjaA4AHnD1x9VOu73Z7JMwTpPT9DgyEIotMpJbdMzIytm/fHqr2AKBv0MxNTgEANznVN2iOjHW+KNlMgEGTZf6UCBJWIvjWC8uyoWoPAO5zdr3h60+7uvWGr+9zERz9PHojRPPLN57r/7DinXZXrIWaz7xSq49c1QjCE6XL7g7Ho8gVToim9oOf5x+qUH8IWb8+e06rYrUNf4PKX7inf/S51y6dwlgLEnFINPzZxFdfD9y9F5oZwm+9IMiSIipGv6wM5aOZ0Ia7+LiosBxBnoSo6MSrmQSxTUAQEYiKHxwhyPIE5YcgooHyQxDRQPkhiGig/BBENFB+CCIaKD8EEQ2UH4KIBsoPQUQD5YcgohE/MjIitg0IskzB0Q9BRAPlhyCigfJDENFA+SGIaKD8EEQ0UH4IIhooPwQRjaj4s4nw4qAw6oi7/RCmQAIAq8CZsgJSpTNS/BNdJMqIKflRgP6p+KuTcdNO732I4ganYaUkfnPCTNaqR6hBJHqIHefzIYXPJqTdnMRXey6mnbSbk3w2IX2IG4RFAWP12R1vN3KU+n1fbsTI6EcB9PeltxzzjG23HER/X/riGuF0nK6i+2IPVVarj2iZORuJjdVnD3wBSQd7N+UHq4XTVRibMrNOv5sc7q3IKG3vf/XAuPuBSX9youi14vBWEXb4JvU+k3SwN0tttt8Qy6LoIkbk1z8VP6/2eG45SP9U/KZVwn8rSpW5jKnVZtUyvlvK09HGEX2ujO0RzLUI8P04qapX4xY/NdR01ENwBfKKhap5HhkRhTrL5zyMWNV7fSrBxFFg8GISC/JzULg6GQfg473cvvafe5Zvpu59K5OnKH74PJP0fc+lq5NxmSsfCUdiTJkJmmbLxx0q325tN7Rymky5Xhz5UUONsQmUdb2q1FmjSX5tUb4o5iBhIxbmflaHb6yF0mu68998qiNxcYnr2emJb69+fM7pnPFcn3ZSqyMuUGnyl6sZ/Unz6GyBlLZbmkD58lbPmbnTlYVMYOhoo3FPtl7r+lwz+CSmhhrPJaOu3fx2dkd9OwBQarJcamZ2H/XWnn/J1GR+25W3Y0/NGKUAwOkqOvceGJfA+PEcvTbbqDPNNSPQBEzg0G3M3IoeozUEE4RksKeQMV2F3/klRCyMfrcdvofXer67MfyjfW+uYNbwZ+jMIyKJ88uiXBGgOIU2TVM3YjCrUln+hP3ySZtmv0YB/e4k8i3loJ/1USltt+lBXqVlCOEClEoNNZ3Hm5OqetX5BADoaGN3dY5xd4u6jAWPb+meWI7VZw9YANYDAIC1bdwECTsEnTVwW9gAr/dqUgmlJsvhbf2HM2RHtEzZ2cJSf1+OGmr0xwaVdb1qd2LjYVAf0XrfEX87AJ5Dk/0GyHcUBaroMVpDkJAM5ifnxFLXv/5E0alonwMHIhZGv0mnz118ZxqUb8j2aA8AyJwNIfyy+CHfUs41NfCPdkrbLU098i1FPinUlUq2Z9zg3n7QeMUG5XJ1wAIpbe8/1izb2eLpVSR178bduXwtfBXeV+X7W9I8G+pahzjIlSlmi7q2x3/8Ycpq+bGREFa5oxxMQ4I7s/EDqbzqzGzi16sZU6vNCqDeKoceu9VzO7mM5watbeMmlwHCFQVtDSJpHtib42fwAglmMJ/AWZ61vyhYEdFNLIx+AjyhH6KuVLLbRi5XJpexYLxiY6vVvtIihJUX5Fq62rhSlQzMlkvNzO6WYKFO6/AkQEKqzwgmS80EGLRbAUDg6iyKDAYGvaou3nSmD1wh1tlUfGDWTXkAM9rGTWA/nuOzd6EEEqxAUovlGuj/qgPyi+2jg6DZv3HdSWNXG1eqAkMrx5ZsdOt/bkXBW0Mo9LJgAhsMfGyMzZA9TrnRQizIL0HiBJj1LdeymUOf/yOt4Ker1ri2hufGrEyyYk6WgHj1J7BdamYKWhhC/BQtyy9hmlptVq0S2sZNuUmvB3MOnwhFegL0jHs5w37w0UIbuHo5NdTojwUrL9DaiWxdLnQNc1Rp6+qR7yiSKYaZpiE7ANzsYQqOMoQEqSiirTHvYs/SJRaczxSp7+Gm3NWpSuOpP17/5O8m/Sfd50/+98KfH01NBskyF1npfrmpznKywWIqTysV6kyKF5LYnnGD2W5o5dgSuUIgiVfi9ASAyVGfvbLto4MAmTKF4FWL3RV3AEKKlW43Vbhw4xUb5CrrXCOMfXRQOFkAMzzI8ksYU6vN2DZuKper+Rtsthk7bPrcpHzVPBWF1BoLJ6jBMUAsyE8hnVkp8Xo6EpKzfc+zPyudefiQG7OuTUtXa9+IXzW7h9lKCVFIZwQK8oLv9ONfNDO7KwUdJ37yw3U1WLp65DsElunnlma/uM0T7aSGmu6LPfKqd5MJIaRYrgGu6beecKvt5OzyOgDISo8q2eb+V/d4x2PtN2dXQYjENW2jo40DTf6rI57uK2DGaKOxvt2VTvFCEttj/2qI02xNJoR3AWyXTk56ySlQRSG1xrws1OClTyw4n1ICmxNmujmvDktIyua8lM15guk3Jyzo9WtZfomsCVwPfkHUW+XHDtigPMtvZihpHtjbPOA+5F9PYcrOFqbWdLqnMdSZ672Ol/xaH0D2wFs5/P9eJR1sSbuxzTJ7N6zqvT6loabTnQC851T5tXk7B7uP5+gBqLJaXVVuPObJWJxVVd55fJv+Ish2tqjLWKbsbB5UdHvMUFarjxR5apEX5HZfbJYffNfTAkxTHew+6gozBq4oSGuEREgGxwCkr69PbBvCAAX4bGL+l84A4BkpDfTSWciVUpPl8DbL+vC//BW5kiPHUrRZdGLB+QQAAqBZ7XhGOk/A8xkp1awOj/YAXBF55csReBhb28ZN4L/aEeVErjVilxiRHwCsIPDiGkce4/SZB7pZKSF5jPPFNY4V4Quh2T6u4zT7g7yMsnA4XcXsSx60vb+6jmOrlU/gxS0+YWyN5UOMOJ/eLMLPbYP/NuLx8F5PWxK/ZvAQidZYJsSg/BBkqRA7zieCLDlQfggiGig/BBENlB+CiAbKD0FEA+WHIKKB8kMQ0UD5IYhokImJCbFtQJBlyv8BHaMKA2JtWF8AAAAASUVORK5CYII=",d="/study/assets/image-20220413173122373.3a494ea5.png",m="/study/assets/image-20220413173159980.c734ee27.png",y="/study/assets/image-20220413223635965.58bf4466.png",h="/study/assets/image-20220422151353040.d8cb3d62.png",b="/study/assets/image-20220422151406381.c900dd5e.png",f="/study/assets/image-20220422151416281.3ba7586e.png",v="/study/assets/image-20220422151957201.a8f50731.png",x="/study/assets/image-20220422164048905.7dd5375c.png",I="/study/assets/image-20220422173458808.2ad904ce.png",w="/study/assets/image-20220422174318322.0b819b44.png",q="/study/assets/image-20220422205146287.0b59800d.png",S="/study/assets/image-20220427192401949.74683871.png",P="/study/assets/image-20220427221615036.08db776a.png",A="/study/assets/image-20220427223205012.8d83f656.png",j="/study/assets/image-20220427224110964.47cf1505.png",_="/study/assets/image-20220427224143741.3feb690c.png",C="/study/assets/image-20220427232304944.f6fcd8c1.png",R="/study/assets/image-20220428184814381.b91e2f3e.png",E="/study/assets/image-20220428184927825.02eed2e4.png",M="/study/assets/image-20220428191323625.4581e964.png",B="/study/assets/image-20220428191620215.2fa15300.png",N="/study/assets/image-20220428191752846.1f2cc21d.png",U="/study/assets/image-20220428235324056.79f162bd.png",H="/study/assets/image-20220429000459359.3e44b670.png",G="/study/assets/image-20220429000950900.4d890588.png",L="/study/assets/image-20220429005351780.edeb1a66.png",O="/study/assets/image-20220429010249375.f254d54d.png",Q="/study/assets/image-20220429012930432.f2927921.png",z="/study/assets/image-20220429013822810.d1fe4a7a.png",F="/study/assets/image-20220429014054421.03d4198f.png",T="/study/assets/image-20220429014913106.17a9453d.png",K="/study/assets/image-20220429015602259.f8ddb78d.png",X="/study/assets/image-20220429154831580.8452e50e.png",D="/study/assets/image-20220429164904026.4bfd3aa5.png";const V={},J=a('

                                                                spring cloud\u4E0B

                                                                \u516D\u3001\u670D\u52A1\u7F51\u5173

                                                                \u6982\u8FF0

                                                                1. \u670D\u52A1\u7F51\u5173\u8FDB\u884C\u65E5\u5FD7\u3001\u9650\u6D41\u3001\u6743\u9650\u3001\u5B89\u5168\u7B49\u7B49\u64CD\u4F5C\u3002

                                                                zuul

                                                                1. springcloud\u4E2D\u96C6\u6210\u7684zuul\u7248\u672C\uFF0C\u91C7\u7528\u7684\u662Ftomcat\u5BB9\u5668\uFF0C\u4F7F\u7528\u7684\u662F\u4F20\u7EDF\u7684servlet io\u5904\u7406\u6A21\u578B\u3002

                                                                2. servlet\u662Ftomcat\u7684\u6838\u5FC3\u7EC4\u4EF6\u4E4B\u4E00\uFF0C\u53E6\u5916\u4E24\u4E2A\u7EC4\u4EF6\u662F\u76D1\u542C\u5668\u548C\u8FC7\u6EE4\u5668\u3002

                                                                3. servlet\u662F\u7531servlet container\u8FDB\u884C\u751F\u547D\u5468\u671F\u7BA1\u7406

                                                                4. servlet\u7684\u751F\u547D\u5468\u671F\uFF1A

                                                                  • container\u542F\u52A8\u65F6\u6784\u9020servlet\u5BF9\u8C61\u5E76\u8C03\u7528**servlet init()**\u8FDB\u884C\u521D\u59CB\u5316
                                                                  • container\u8FD0\u884C\u65F6\u63A5\u53D7\u8BF7\u6C42\uFF0C\u5E76\u4E3A\u6BCF\u4E2A\u8BF7\u6C42\u5206\u914D\u4E00\u4E2A\u7EBF\u7A0B\uFF08\u4E00\u822C\u4ECE\u7EBF\u7A0B\u6C60\u4E2D\u83B7\u53D6\u7A7A\u95F2\u7EBF\u7A0B\uFF09\uFF0C\u7136\u540E\u8C03\u7528service()
                                                                  • container\u5173\u95ED\u65F6\u8C03\u7528**servlet destroy()**\u6D88\u8D39servlet\u3002
                                                                5. servlet\u662F\u4E00\u4E2A\u7B80\u5355\u7684\u7F51\u7EDCIO\u6A21\u578B\uFF0C\u5F53\u8BF7\u6C42\u8FDB\u5165servlet container\u65F6\uFF0Cservlet container\u5C31\u4F1A\u4E3A\u5176\u7ED1\u5B9A\u4E00\u4E2A\u7EBF\u7A0B\uFF0C\u5728\u5E76\u53D1\u4E0D\u9AD8\u7684\u573A\u666F\u4E0B\uFF0C\u8FD9\u79CD\u6A21\u578B\u662F\u9002\u7528\u7684\uFF0C\u4F46\u662F\u4E00\u65E6\u9AD8\u5E76\u53D1\uFF0C\u7EBF\u7A0B\u6570\u91CF\u5C31\u4F1A\u4E0A\u6DA8\uFF0C\u800C\u7EBF\u7A0B\u8D44\u6E90\u4EE3\u4EF7\u662F\u6602\u8D35\u7684\uFF08\u4E0A\u4E0B\u6587\u5207\u6362\u9020\u6210\u5185\u5B58\u6D88\u8017\u5927\uFF09\uFF0C\u4E25\u91CD\u5F71\u54CD\u8BF7\u6C42\u7684\u5904\u7406\u65F6\u95F4\u3002\u5728\u4E00\u4E9B\u7B80\u5355\u4E1A\u52A1\u573A\u666F\u4E0B\uFF0C\u4E0D\u5E0C\u671B\u4E3A\u6BCF\u4E2A\u8BF7\u6C42\u5206\u914D\u4E00\u4E2A\u7EBF\u7A0B\uFF0C\u53EA\u9700\u89811\u4E2A\u6216\u51E0\u4E2A\u7EBF\u7A0B\u5C31\u80FD\u5E94\u5BF9\u6781\u5927\u5E76\u53D1\u8BF7\u6C42\uFF0C\u8FD9\u79CD\u4E1A\u52A1\u573A\u666F\u4E0Bservlet\u6A21\u578B\u6CA1\u6709\u4F18\u52BF\u3002

                                                                  \u6240\u4EE5Zuul 1.X\u662F\u57FA\u4E8Eservlet\u7684\u4E00\u4E2A\u963B\u585E\u5F0F\u5904\u7406\u6A21\u578B\uFF0C\u5373spring\u5B9E\u73B0\u4E86\u5904\u7406\u6240\u6709request\u8BF7\u6C42\u7684\u4E00\u4E2Aservlet\uFF08DispatcherServlet\uFF09\uFF0C\u662F\u963B\u585E\u5F0F\u5904\u7406\u6A21\u578B\u3002

                                                                6. \u4F20\u7EDF\u7684Web\u6846\u67B6\uFF0C\u6BD4\u5982\u8BF4strust2\uFF0Cspringmvc\u7B49\u90FD\u662F\u57FA\u4E8EServlet API\u4E0Eservlet\u5BB9\u5668\u57FA\u7840\u4E4B\u4E0A\u8FD0\u884C\u7684\u3002

                                                                  \u5728servlet3.1\u4E4B\u540E\u6709\u4E86\u5F02\u6B65\u975E\u963B\u585E\u7684\u652F\u6301\uFF0C\u800Cwebflux\u662F\u4E00\u4E2A\u5178\u578B\u5F02\u6B65\u975E\u963B\u585E\u7684\u6846\u67B6\uFF0C\u4ED6\u7684\u6838\u5FC3\u662F\u57FA\u4E8EReactor\u7684\u76F8\u5173API\u5B9E\u73B0\u7684\u3002

                                                                  Spring WebFlux\u662Fspring5.0\u5F15\u5165\u7684\u65B0\u7684\u54CD\u5E94\u5F0F\u6846\u67B6\uFF0C\u533A\u522B\u4E8ESpring MVC\uFF0C\u5B83\u4E0D\u9700\u8981\u4F9D\u8D56\u4E8EServlet API\uFF0C\u5B83\u662F\u5B8C\u5168\u5F02\u6B65\u975E\u963B\u585E\u7684\uFF0C\u5E76\u4E14\u57FA\u4E8EReactor\u6765\u5B9E\u73B0\u54CD\u5E94\u5F0F\u6D41\u89C4\u8303\u3002

                                                                gateway

                                                                \u6982\u8FF0

                                                                1. springcloud gateway\u662Fspringcloud\u751F\u6001\u7CFB\u7EDF\u4E2D\u7684\u7F51\u5173\uFF0C\u76EE\u6807\u662F\u66FF\u4EE3zuul\u3002

                                                                2. springcloud gateway\u662F\u57FA\u4E8EWebFlux\u6846\u67B6\u5B9E\u73B0\u7684\uFF0CWebFlux\u6846\u67B6\u662F\u975E\u963B\u585E\u5F0F\u7684web\u6846\u67B6\uFF0C\u800CWebFlux\u6846\u67B6\u5E95\u5C42\u5219\u4F7F\u7528\u4E86\u9AD8\u6027\u80FD\u7684Reactor\u6A21\u5F0F\u901A\u4FE1\u6846\u67B6Netty\u3002

                                                                3. Springcloud gateway\u7684\u76EE\u6807\u662F\u63D0\u4F9B\u7EDF\u4E00\u7684\u8DEF\u7531\u65B9\u5F0F\uFF0C\u4E14\u57FA\u4E8EFilter\u94FE\u7684\u65B9\u5F0F\u63D0\u4F9B\u4E86\u7F51\u5173\u57FA\u672C\u7684\u529F\u80FD\uFF0C\u5982\u5B89\u5168\u3001\u76D1\u63A7\u548C\u9650\u6D41\u3002

                                                                  image-20220412183425220

                                                                4. \u53EF\u4EE5\u7406\u89E3\u4E3A\u7F51\u5173\u662F\u6240\u6709\u5FAE\u670D\u52A1\u7684\u5165\u53E3\u3002

                                                                5. gateway\u662F\u57FA\u4E8E\u5F02\u6B65\u975E\u963B\u585E\u6A21\u578B\u5F00\u53D1\u7684\u3002

                                                                \u7279\u6027

                                                                1. \u52A8\u6001\u8DEF\u7531\uFF1A\u80FD\u591F\u5339\u914D\u4EFB\u4F55\u8BF7\u6C42\u5C5E\u6027
                                                                2. \u53EF\u4EE5\u5BF9\u8DEF\u7531\u6307\u5B9APredicate\uFF08\u65AD\u8A00\uFF09\u548CFilter\uFF08\u8FC7\u6EE4\u5668\uFF09
                                                                3. \u96C6\u6210Hystrix\u7684\u65AD\u8DEF\u5668\u529F\u80FD
                                                                4. \u96C6\u6210Springcloud\u670D\u52A1\u53D1\u73B0\u529F\u80FD
                                                                5. \u8BF7\u6C42\u9650\u6D41\u529F\u80FD
                                                                6. \u652F\u6301\u8DEF\u5F84\u91CD\u5199

                                                                \u4E09\u5927\u6838\u5FC3\u6982\u5FF5

                                                                1. \u8DEF\u7531\uFF08Route\uFF09

                                                                  \u8DEF\u7531\u662F\u6784\u5EFA\u7F51\u5173\u7684\u57FA\u672C\u6A21\u5757\uFF0C\u5B83\u7531ID\uFF0C\u76EE\u6807URI\uFF0C\u4E00\u7CFB\u5217\u7684\u65AD\u8A00\u548C\u8FC7\u6EE4\u5668\u7EC4\u6210\uFF0C\u5982\u679C\u65AD\u8A00\u4E3Atrue\u5219\u5339\u914D\u8BE5\u8DEF\u7531\u3002

                                                                2. \u65AD\u8A00\uFF08Predicate\uFF09

                                                                  \u5F00\u53D1\u4EBA\u5458\u53EF\u4EE5\u5339\u914DHTTP\u8BF7\u6C42\u4E2D\u7684\u6240\u6709\u5185\u5BB9\uFF08\u4F8B\u5982\u8BF7\u6C42\u5934\u6216\u8BF7\u6C42\u53C2\u6570\uFF09\uFF0C\u5982\u679C\u8BF7\u6C42\u4E0E\u65AD\u8A00\u76F8\u5339\u914D\u5219\u8FDB\u884C\u8DEF\u7531\u3002

                                                                  predicate\u5C31\u53EF\u4EE5\u7406\u89E3\u4E3A\u5339\u914D\u6761\u4EF6\uFF0C\u5B9A\u4F4D\u5230\u771F\u6B63\u7684\u670D\u52A1\u8282\u70B9\u3002

                                                                  Springcloud gateway\u5305\u62EC\u8BB8\u591A\u5185\u7F6E\u7684RoutePredicateFactories\uFF0C\u6240\u6709\u8FD9\u4E9BPredicate\u90FD\u4E0EHttp\u8BF7\u6C42\u7684\u4E0D\u540C\u5C5E\u6027\u5339\u914D\uFF0C\u591A\u4E2APredicate\u5DE5\u5382\u53EF\u4EE5\u8FDB\u884C\u7EC4\u5408\u3002

                                                                3. \u8FC7\u6EE4\u5668\uFF08Filter\uFF09

                                                                  \u4F7F\u7528\u8FC7\u6EE4\u5668\uFF0C\u53EF\u4EE5\u5728\u8BF7\u6C42\u88AB\u8DEF\u7531\u524D\u6216\u8005\u540E\u5BF9\u8BF7\u6C42\u8FDB\u884C\u4FEE\u6539\u3002

                                                                gateway\u5DE5\u4F5C\u6D41\u7A0B

                                                                1. \u5BA2\u6237\u7AEF\u5411spring cloud gateway\u53D1\u51FA\u8BF7\u6C42\uFF0C\u7136\u540E\u5728gateway handler mapping\u4E2D\u627E\u5230\u4E0E\u8BF7\u6C42\u76F8\u5339\u914D\u7684\u8DEF\u7531\uFF0C\u5C06\u5176\u53D1\u9001\u5230gateway web handler\u3002

                                                                  handler\u518D\u901A\u8FC7\u6307\u5B9A\u7684\u8FC7\u6EE4\u5668\u94FE\u5C06\u8BF7\u6C42\u53D1\u9001\u5230\u6211\u4EEC\u5B9E\u9645\u7684\u670D\u52A1\u6267\u884C\u4E1A\u52A1\u903B\u8F91\u3002

                                                                  \u8FC7\u6EE4\u5668\u53EF\u80FD\u4F1A\u5728\u53D1\u9001\u4EE3\u7406\u8BF7\u6C42\u4E4B\u524D\u6216\u4E4B\u540E\u6267\u884C\u8FC7\u6EE4\u5668\u903B\u8F91\u3002

                                                                  \u201Cpre\u201D\u7C7B\u578B\u7684\u8FC7\u6EE4\u5668\u53EF\u4EE5\u505A\u53C2\u6570\u6821\u9A8C\u3001\u6743\u9650\u6821\u9A8C\u3001\u6D41\u91CF\u76D1\u63A7\u3001\u65E5\u5FD7\u8F93\u51FA\u3001\u534F\u8BAE\u8F6C\u6362\u7B49\u3002

                                                                  \u201Cpost\u201D\u7C7B\u578B\u7684\u8FC7\u6EE4\u5668\u4E2D\u53EF\u4EE5\u505A\u54CD\u5E94\u5185\u5BB9\u3001\u54CD\u5E94\u5934\u7684\u4FEE\u6539\uFF0C\u65E5\u5FD7\u8F93\u51FA\uFF0C\u6D41\u91CF\u76D1\u63A7\u7B49\u3002

                                                                \u7F51\u5173\u914D\u7F6E

                                                                \u5728application.yml\u4E2D\u914D\u7F6E
                                                                1. \u5EFAmodule

                                                                2. \u4FEE\u6539pom

                                                                  \u8981\u6CE8\u610F\u7F51\u5173\u4F5C\u4E3A\u4E00\u79CD\u5FAE\u670D\u52A1\uFF0C\u4E5F\u8981\u6CE8\u518C\u8FDB\u6CE8\u518C\u4E2D\u5FC3

                                                                  <dependencies>
                                                                           <dependency>
                                                                               <groupId>org.springframework.cloud</groupId>
                                                                               <artifactId>spring-cloud-starter-gateway</artifactId>
                                                                  diff --git "a/assets/springcloud\357\274\210\344\270\213\357\274\211.html.d60a3245.js" "b/assets/springcloud\357\274\210\344\270\213\357\274\211.html.8ea03a64.js"
                                                                  similarity index 99%
                                                                  rename from "assets/springcloud\357\274\210\344\270\213\357\274\211.html.d60a3245.js"
                                                                  rename to "assets/springcloud\357\274\210\344\270\213\357\274\211.html.8ea03a64.js"
                                                                  index cf8e523b..3005c31e 100644
                                                                  --- "a/assets/springcloud\357\274\210\344\270\213\357\274\211.html.d60a3245.js"
                                                                  +++ "b/assets/springcloud\357\274\210\344\270\213\357\274\211.html.8ea03a64.js"
                                                                  @@ -1 +1 @@
                                                                  -const l={key:"v-77987a0f",path:"/java/%E5%88%86%E5%B8%83%E5%BC%8F/springcloud/springcloud%EF%BC%88%E4%B8%8B%EF%BC%89.html",title:"spring cloud\u4E0B",lang:"zh-CN",frontmatter:{},excerpt:"",headers:[{level:2,title:"\u516D\u3001\u670D\u52A1\u7F51\u5173",slug:"\u516D\u3001\u670D\u52A1\u7F51\u5173",children:[{level:3,title:"\u6982\u8FF0",slug:"\u6982\u8FF0",children:[]},{level:3,title:"zuul",slug:"zuul",children:[]},{level:3,title:"gateway",slug:"gateway",children:[{level:4,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-1",children:[]},{level:4,title:"\u7279\u6027",slug:"\u7279\u6027",children:[]},{level:4,title:"\u4E09\u5927\u6838\u5FC3\u6982\u5FF5",slug:"\u4E09\u5927\u6838\u5FC3\u6982\u5FF5",children:[]},{level:4,title:"gateway\u5DE5\u4F5C\u6D41\u7A0B",slug:"gateway\u5DE5\u4F5C\u6D41\u7A0B",children:[]},{level:4,title:"\u7F51\u5173\u914D\u7F6E",slug:"\u7F51\u5173\u914D\u7F6E",children:[{level:5,title:"\u5728application.yml\u4E2D\u914D\u7F6E",slug:"\u5728application-yml\u4E2D\u914D\u7F6E",children:[]},{level:5,title:"\u4EE3\u7801\u4E2D\u6CE8\u5165RouteLocator\u7684Bean",slug:"\u4EE3\u7801\u4E2D\u6CE8\u5165routelocator\u7684bean",children:[]}]},{level:4,title:"\u52A8\u6001\u8DEF\u7531",slug:"\u52A8\u6001\u8DEF\u7531",children:[]},{level:4,title:"Predicate",slug:"predicate",children:[]},{level:4,title:"Filter",slug:"filter",children:[{level:5,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-2",children:[]},{level:5,title:"\u81EA\u5B9A\u4E49\u8FC7\u6EE4\u5668",slug:"\u81EA\u5B9A\u4E49\u8FC7\u6EE4\u5668",children:[]}]}]}]},{level:2,title:"\u4E03\u3001\u670D\u52A1\u914D\u7F6E",slug:"\u4E03\u3001\u670D\u52A1\u914D\u7F6E",children:[{level:3,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-3",children:[]},{level:3,title:"Config Server",slug:"config-server",children:[{level:4,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-4",children:[]},{level:4,title:"\u4F5C\u7528",slug:"\u4F5C\u7528",children:[]}]},{level:3,title:"\u4F7F\u7528springcloud config",slug:"\u4F7F\u7528springcloud-config",children:[{level:4,title:"\u914D\u7F6E\u4E2D\u5FC3\uFF08\u670D\u52A1\u7AEF\uFF09",slug:"\u914D\u7F6E\u4E2D\u5FC3-\u670D\u52A1\u7AEF",children:[]},{level:4,title:"\u5BA2\u6237\u7AEF",slug:"\u5BA2\u6237\u7AEF",children:[]},{level:4,title:"\u95EE\u9898",slug:"\u95EE\u9898",children:[]},{level:4,title:"\u89E3\u51B3",slug:"\u89E3\u51B3",children:[]}]}]},{level:2,title:"\u516B\u3001\u670D\u52A1\u603B\u7EBF",slug:"\u516B\u3001\u670D\u52A1\u603B\u7EBF",children:[{level:3,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-5",children:[]},{level:3,title:"Spring cloud Bus",slug:"spring-cloud-bus",children:[{level:4,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-6",children:[]},{level:4,title:"\u901A\u8FC7bus\u5B9E\u73B0\u5168\u5C40\u5E7F\u64AD",slug:"\u901A\u8FC7bus\u5B9E\u73B0\u5168\u5C40\u5E7F\u64AD",children:[]},{level:4,title:"\u8BBE\u8BA1\u601D\u60F3",slug:"\u8BBE\u8BA1\u601D\u60F3",children:[]},{level:4,title:"\u8BBE\u8BA1\u5B9E\u73B0",slug:"\u8BBE\u8BA1\u5B9E\u73B0",children:[{level:5,title:"cloud-config-center-3344\u914D\u7F6E\u4E2D\u5FC3\u670D\u52A1\u7AEF",slug:"cloud-config-center-3344\u914D\u7F6E\u4E2D\u5FC3\u670D\u52A1\u7AEF",children:[]},{level:5,title:"config client",slug:"config-client",children:[]},{level:5,title:"\u6D4B\u8BD5",slug:"\u6D4B\u8BD5",children:[]}]},{level:4,title:"\u52A8\u6001\u5237\u65B0\u5B9A\u70B9\u901A\u77E5",slug:"\u52A8\u6001\u5237\u65B0\u5B9A\u70B9\u901A\u77E5",children:[]}]}]},{level:2,title:"\u4E5D\u3001\u6D88\u606F\u9A71\u52A8",slug:"\u4E5D\u3001\u6D88\u606F\u9A71\u52A8",children:[{level:3,title:"spring cloud stream",slug:"spring-cloud-stream",children:[]},{level:3,title:"\u8BBE\u8BA1\u601D\u60F3",slug:"\u8BBE\u8BA1\u601D\u60F3-1",children:[]},{level:3,title:"\u6807\u51C6\u6D41\u7A0B\u5957\u8DEF\u53CA\u6CE8\u89E3",slug:"\u6807\u51C6\u6D41\u7A0B\u5957\u8DEF\u53CA\u6CE8\u89E3",children:[]},{level:3,title:"\u6848\u4F8B\u8BF4\u660E",slug:"\u6848\u4F8B\u8BF4\u660E",children:[{level:4,title:"\u65B0\u5EFA\u4E09\u4E2A\u5B50module",slug:"\u65B0\u5EFA\u4E09\u4E2A\u5B50module",children:[]},{level:4,title:"\u751F\u4EA7\u8005",slug:"\u751F\u4EA7\u8005",children:[]},{level:4,title:"\u6D88\u8D39\u8005",slug:"\u6D88\u8D39\u8005",children:[]}]},{level:3,title:"\u5206\u7EC4\u6D88\u8D39",slug:"\u5206\u7EC4\u6D88\u8D39",children:[]},{level:3,title:"\u6301\u4E45\u5316",slug:"\u6301\u4E45\u5316",children:[]}]},{level:2,title:"Spring Cloud Alibaba",slug:"spring-cloud-alibaba",children:[]},{level:2,title:"\u5341\u3001Nacos",slug:"\u5341\u3001nacos",children:[{level:3,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-7",children:[]},{level:3,title:"nacos\u505A\u6CE8\u518C\u4E2D\u5FC3",slug:"nacos\u505A\u6CE8\u518C\u4E2D\u5FC3",children:[{level:4,title:"\u670D\u52A1\u63D0\u4F9B\u8005",slug:"\u670D\u52A1\u63D0\u4F9B\u8005",children:[]},{level:4,title:"\u670D\u52A1\u6D88\u8D39\u8005",slug:"\u670D\u52A1\u6D88\u8D39\u8005",children:[]}]},{level:3,title:"nacos\u505A\u914D\u7F6E\u4E2D\u5FC3",slug:"nacos\u505A\u914D\u7F6E\u4E2D\u5FC3",children:[{level:4,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-8",children:[]},{level:4,title:"\u57FA\u7840\u914D\u7F6E",slug:"\u57FA\u7840\u914D\u7F6E",children:[]},{level:4,title:"\u5206\u7C7B\u914D\u7F6E",slug:"\u5206\u7C7B\u914D\u7F6E",children:[]}]},{level:3,title:"nacos\u96C6\u7FA4\u548C\u6301\u4E45\u5316\u914D\u7F6E",slug:"nacos\u96C6\u7FA4\u548C\u6301\u4E45\u5316\u914D\u7F6E",children:[{level:4,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-9",children:[]},{level:4,title:"\u914D\u7F6E",slug:"\u914D\u7F6E",children:[]}]}]},{level:2,title:"Sentinel\u5B9E\u73B0\u7194\u65AD\u4E0E\u9650\u6D41",slug:"sentinel\u5B9E\u73B0\u7194\u65AD\u4E0E\u9650\u6D41",children:[{level:3,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-10",children:[]},{level:3,title:"\u5FAE\u670D\u52A1\u96C6\u6210sentinel",slug:"\u5FAE\u670D\u52A1\u96C6\u6210sentinel",children:[]},{level:3,title:"\u6D41\u63A7\u89C4\u5219",slug:"\u6D41\u63A7\u89C4\u5219",children:[]},{level:3,title:"\u7194\u65AD\u964D\u7EA7",slug:"\u7194\u65AD\u964D\u7EA7",children:[]},{level:3,title:"\u70ED\u70B9\u89C4\u5219",slug:"\u70ED\u70B9\u89C4\u5219",children:[]},{level:3,title:"@SentinelResource",slug:"sentinelresource",children:[]},{level:3,title:"\u670D\u52A1\u7194\u65AD\u529F\u80FD",slug:"\u670D\u52A1\u7194\u65AD\u529F\u80FD",children:[]}]}],git:{updatedTime:1710173765e3,contributors:[{name:"shailene",email:"64005626+shaileneF@users.noreply.github.com",commits:1}]},filePathRelative:"java/\u5206\u5E03\u5F0F/springcloud/springcloud\uFF08\u4E0B\uFF09.md"};export{l as data};
                                                                  +const l={key:"v-77987a0f",path:"/java/%E5%88%86%E5%B8%83%E5%BC%8F/springcloud/springcloud%EF%BC%88%E4%B8%8B%EF%BC%89.html",title:"spring cloud\u4E0B",lang:"zh-CN",frontmatter:{},excerpt:"",headers:[{level:2,title:"\u516D\u3001\u670D\u52A1\u7F51\u5173",slug:"\u516D\u3001\u670D\u52A1\u7F51\u5173",children:[{level:3,title:"\u6982\u8FF0",slug:"\u6982\u8FF0",children:[]},{level:3,title:"zuul",slug:"zuul",children:[]},{level:3,title:"gateway",slug:"gateway",children:[{level:4,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-1",children:[]},{level:4,title:"\u7279\u6027",slug:"\u7279\u6027",children:[]},{level:4,title:"\u4E09\u5927\u6838\u5FC3\u6982\u5FF5",slug:"\u4E09\u5927\u6838\u5FC3\u6982\u5FF5",children:[]},{level:4,title:"gateway\u5DE5\u4F5C\u6D41\u7A0B",slug:"gateway\u5DE5\u4F5C\u6D41\u7A0B",children:[]},{level:4,title:"\u7F51\u5173\u914D\u7F6E",slug:"\u7F51\u5173\u914D\u7F6E",children:[{level:5,title:"\u5728application.yml\u4E2D\u914D\u7F6E",slug:"\u5728application-yml\u4E2D\u914D\u7F6E",children:[]},{level:5,title:"\u4EE3\u7801\u4E2D\u6CE8\u5165RouteLocator\u7684Bean",slug:"\u4EE3\u7801\u4E2D\u6CE8\u5165routelocator\u7684bean",children:[]}]},{level:4,title:"\u52A8\u6001\u8DEF\u7531",slug:"\u52A8\u6001\u8DEF\u7531",children:[]},{level:4,title:"Predicate",slug:"predicate",children:[]},{level:4,title:"Filter",slug:"filter",children:[{level:5,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-2",children:[]},{level:5,title:"\u81EA\u5B9A\u4E49\u8FC7\u6EE4\u5668",slug:"\u81EA\u5B9A\u4E49\u8FC7\u6EE4\u5668",children:[]}]}]}]},{level:2,title:"\u4E03\u3001\u670D\u52A1\u914D\u7F6E",slug:"\u4E03\u3001\u670D\u52A1\u914D\u7F6E",children:[{level:3,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-3",children:[]},{level:3,title:"Config Server",slug:"config-server",children:[{level:4,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-4",children:[]},{level:4,title:"\u4F5C\u7528",slug:"\u4F5C\u7528",children:[]}]},{level:3,title:"\u4F7F\u7528springcloud config",slug:"\u4F7F\u7528springcloud-config",children:[{level:4,title:"\u914D\u7F6E\u4E2D\u5FC3\uFF08\u670D\u52A1\u7AEF\uFF09",slug:"\u914D\u7F6E\u4E2D\u5FC3-\u670D\u52A1\u7AEF",children:[]},{level:4,title:"\u5BA2\u6237\u7AEF",slug:"\u5BA2\u6237\u7AEF",children:[]},{level:4,title:"\u95EE\u9898",slug:"\u95EE\u9898",children:[]},{level:4,title:"\u89E3\u51B3",slug:"\u89E3\u51B3",children:[]}]}]},{level:2,title:"\u516B\u3001\u670D\u52A1\u603B\u7EBF",slug:"\u516B\u3001\u670D\u52A1\u603B\u7EBF",children:[{level:3,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-5",children:[]},{level:3,title:"Spring cloud Bus",slug:"spring-cloud-bus",children:[{level:4,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-6",children:[]},{level:4,title:"\u901A\u8FC7bus\u5B9E\u73B0\u5168\u5C40\u5E7F\u64AD",slug:"\u901A\u8FC7bus\u5B9E\u73B0\u5168\u5C40\u5E7F\u64AD",children:[]},{level:4,title:"\u8BBE\u8BA1\u601D\u60F3",slug:"\u8BBE\u8BA1\u601D\u60F3",children:[]},{level:4,title:"\u8BBE\u8BA1\u5B9E\u73B0",slug:"\u8BBE\u8BA1\u5B9E\u73B0",children:[{level:5,title:"cloud-config-center-3344\u914D\u7F6E\u4E2D\u5FC3\u670D\u52A1\u7AEF",slug:"cloud-config-center-3344\u914D\u7F6E\u4E2D\u5FC3\u670D\u52A1\u7AEF",children:[]},{level:5,title:"config client",slug:"config-client",children:[]},{level:5,title:"\u6D4B\u8BD5",slug:"\u6D4B\u8BD5",children:[]}]},{level:4,title:"\u52A8\u6001\u5237\u65B0\u5B9A\u70B9\u901A\u77E5",slug:"\u52A8\u6001\u5237\u65B0\u5B9A\u70B9\u901A\u77E5",children:[]}]}]},{level:2,title:"\u4E5D\u3001\u6D88\u606F\u9A71\u52A8",slug:"\u4E5D\u3001\u6D88\u606F\u9A71\u52A8",children:[{level:3,title:"spring cloud stream",slug:"spring-cloud-stream",children:[]},{level:3,title:"\u8BBE\u8BA1\u601D\u60F3",slug:"\u8BBE\u8BA1\u601D\u60F3-1",children:[]},{level:3,title:"\u6807\u51C6\u6D41\u7A0B\u5957\u8DEF\u53CA\u6CE8\u89E3",slug:"\u6807\u51C6\u6D41\u7A0B\u5957\u8DEF\u53CA\u6CE8\u89E3",children:[]},{level:3,title:"\u6848\u4F8B\u8BF4\u660E",slug:"\u6848\u4F8B\u8BF4\u660E",children:[{level:4,title:"\u65B0\u5EFA\u4E09\u4E2A\u5B50module",slug:"\u65B0\u5EFA\u4E09\u4E2A\u5B50module",children:[]},{level:4,title:"\u751F\u4EA7\u8005",slug:"\u751F\u4EA7\u8005",children:[]},{level:4,title:"\u6D88\u8D39\u8005",slug:"\u6D88\u8D39\u8005",children:[]}]},{level:3,title:"\u5206\u7EC4\u6D88\u8D39",slug:"\u5206\u7EC4\u6D88\u8D39",children:[]},{level:3,title:"\u6301\u4E45\u5316",slug:"\u6301\u4E45\u5316",children:[]}]},{level:2,title:"Spring Cloud Alibaba",slug:"spring-cloud-alibaba",children:[]},{level:2,title:"\u5341\u3001Nacos",slug:"\u5341\u3001nacos",children:[{level:3,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-7",children:[]},{level:3,title:"nacos\u505A\u6CE8\u518C\u4E2D\u5FC3",slug:"nacos\u505A\u6CE8\u518C\u4E2D\u5FC3",children:[{level:4,title:"\u670D\u52A1\u63D0\u4F9B\u8005",slug:"\u670D\u52A1\u63D0\u4F9B\u8005",children:[]},{level:4,title:"\u670D\u52A1\u6D88\u8D39\u8005",slug:"\u670D\u52A1\u6D88\u8D39\u8005",children:[]}]},{level:3,title:"nacos\u505A\u914D\u7F6E\u4E2D\u5FC3",slug:"nacos\u505A\u914D\u7F6E\u4E2D\u5FC3",children:[{level:4,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-8",children:[]},{level:4,title:"\u57FA\u7840\u914D\u7F6E",slug:"\u57FA\u7840\u914D\u7F6E",children:[]},{level:4,title:"\u5206\u7C7B\u914D\u7F6E",slug:"\u5206\u7C7B\u914D\u7F6E",children:[]}]},{level:3,title:"nacos\u96C6\u7FA4\u548C\u6301\u4E45\u5316\u914D\u7F6E",slug:"nacos\u96C6\u7FA4\u548C\u6301\u4E45\u5316\u914D\u7F6E",children:[{level:4,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-9",children:[]},{level:4,title:"\u914D\u7F6E",slug:"\u914D\u7F6E",children:[]}]}]},{level:2,title:"Sentinel\u5B9E\u73B0\u7194\u65AD\u4E0E\u9650\u6D41",slug:"sentinel\u5B9E\u73B0\u7194\u65AD\u4E0E\u9650\u6D41",children:[{level:3,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-10",children:[]},{level:3,title:"\u5FAE\u670D\u52A1\u96C6\u6210sentinel",slug:"\u5FAE\u670D\u52A1\u96C6\u6210sentinel",children:[]},{level:3,title:"\u6D41\u63A7\u89C4\u5219",slug:"\u6D41\u63A7\u89C4\u5219",children:[]},{level:3,title:"\u7194\u65AD\u964D\u7EA7",slug:"\u7194\u65AD\u964D\u7EA7",children:[]},{level:3,title:"\u70ED\u70B9\u89C4\u5219",slug:"\u70ED\u70B9\u89C4\u5219",children:[]},{level:3,title:"@SentinelResource",slug:"sentinelresource",children:[]},{level:3,title:"\u670D\u52A1\u7194\u65AD\u529F\u80FD",slug:"\u670D\u52A1\u7194\u65AD\u529F\u80FD",children:[]}]}],git:{updatedTime:1710173784e3,contributors:[{name:"shailene",email:"64005626+shaileneF@users.noreply.github.com",commits:1}]},filePathRelative:"java/\u5206\u5E03\u5F0F/springcloud/springcloud\uFF08\u4E0B\uFF09.md"};export{l as data};
                                                                  diff --git "a/assets/vue\345\237\272\347\241\200.html.308c7ebe.js" "b/assets/vue\345\237\272\347\241\200.html.4ed4544f.js"
                                                                  similarity index 97%
                                                                  rename from "assets/vue\345\237\272\347\241\200.html.308c7ebe.js"
                                                                  rename to "assets/vue\345\237\272\347\241\200.html.4ed4544f.js"
                                                                  index 6685c939..44c91525 100644
                                                                  --- "a/assets/vue\345\237\272\347\241\200.html.308c7ebe.js"
                                                                  +++ "b/assets/vue\345\237\272\347\241\200.html.4ed4544f.js"
                                                                  @@ -1 +1 @@
                                                                  -const e={key:"v-3a6a4d07",path:"/%E5%89%8D%E7%AB%AF/vue%E5%9F%BA%E7%A1%80/vue%E5%9F%BA%E7%A1%80.html",title:"vue\u5B66\u4E60\u7B14\u8BB0",lang:"zh-CN",frontmatter:{},excerpt:"",headers:[{level:2,title:"vue\u6838\u5FC3",slug:"vue\u6838\u5FC3",children:[{level:3,title:"vue\u5B89\u88C5",slug:"vue\u5B89\u88C5",children:[]},{level:3,title:"\u521D\u8BC6vue",slug:"\u521D\u8BC6vue",children:[]},{level:3,title:"\u6A21\u677F\u8BED\u6CD5",slug:"\u6A21\u677F\u8BED\u6CD5",children:[]},{level:3,title:"\u6570\u636E\u7ED1\u5B9A",slug:"\u6570\u636E\u7ED1\u5B9A",children:[]},{level:3,title:"el\u4E0Edata\u7684\u4E24\u79CD\u5199\u6CD5",slug:"el\u4E0Edata\u7684\u4E24\u79CD\u5199\u6CD5",children:[]},{level:3,title:"MVVM\u6A21\u578B",slug:"mvvm\u6A21\u578B",children:[]},{level:3,title:"\u6570\u636E\u4EE3\u7406",slug:"\u6570\u636E\u4EE3\u7406",children:[]},{level:3,title:"\u4E8B\u4EF6\u5904\u7406",slug:"\u4E8B\u4EF6\u5904\u7406",children:[{level:4,title:"\u4E00\u4E2A\u6700\u7B80\u5355\u7684\u4E8B\u4EF6\u7ED1\u5B9A",slug:"\u4E00\u4E2A\u6700\u7B80\u5355\u7684\u4E8B\u4EF6\u7ED1\u5B9A",children:[]},{level:4,title:"\u952E\u76D8\u4E8B\u4EF6",slug:"\u952E\u76D8\u4E8B\u4EF6",children:[]}]},{level:3,title:"\u8BA1\u7B97\u5C5E\u6027",slug:"\u8BA1\u7B97\u5C5E\u6027",children:[]},{level:3,title:"\u76D1\u89C6\u5C5E\u6027",slug:"\u76D1\u89C6\u5C5E\u6027",children:[]},{level:3,title:"class\u4E0Estyle\u7ED1\u5B9A",slug:"class\u4E0Estyle\u7ED1\u5B9A",children:[]},{level:3,title:"\u6761\u4EF6\u6E32\u67D3",slug:"\u6761\u4EF6\u6E32\u67D3",children:[]},{level:3,title:"\u5217\u8868\u6E32\u67D3",slug:"\u5217\u8868\u6E32\u67D3",children:[]},{level:3,title:"\u6570\u636E\u76D1\u6D4B",slug:"\u6570\u636E\u76D1\u6D4B",children:[]},{level:3,title:"\u6536\u96C6\u8868\u5355\u6570\u636E",slug:"\u6536\u96C6\u8868\u5355\u6570\u636E",children:[]},{level:3,title:"cookie\u7B80\u7565\u56FE\u793A",slug:"cookie\u7B80\u7565\u56FE\u793A",children:[]},{level:3,title:"\u751F\u547D\u5468\u671F",slug:"\u751F\u547D\u5468\u671F",children:[]}]}],git:{updatedTime:1710173765e3,contributors:[{name:"shailene",email:"64005626+shaileneF@users.noreply.github.com",commits:1}]},filePathRelative:"\u524D\u7AEF/vue\u57FA\u7840/vue\u57FA\u7840.md"};export{e as data};
                                                                  +const e={key:"v-3a6a4d07",path:"/%E5%89%8D%E7%AB%AF/vue%E5%9F%BA%E7%A1%80/vue%E5%9F%BA%E7%A1%80.html",title:"vue\u5B66\u4E60\u7B14\u8BB0",lang:"zh-CN",frontmatter:{},excerpt:"",headers:[{level:2,title:"vue\u6838\u5FC3",slug:"vue\u6838\u5FC3",children:[{level:3,title:"vue\u5B89\u88C5",slug:"vue\u5B89\u88C5",children:[]},{level:3,title:"\u521D\u8BC6vue",slug:"\u521D\u8BC6vue",children:[]},{level:3,title:"\u6A21\u677F\u8BED\u6CD5",slug:"\u6A21\u677F\u8BED\u6CD5",children:[]},{level:3,title:"\u6570\u636E\u7ED1\u5B9A",slug:"\u6570\u636E\u7ED1\u5B9A",children:[]},{level:3,title:"el\u4E0Edata\u7684\u4E24\u79CD\u5199\u6CD5",slug:"el\u4E0Edata\u7684\u4E24\u79CD\u5199\u6CD5",children:[]},{level:3,title:"MVVM\u6A21\u578B",slug:"mvvm\u6A21\u578B",children:[]},{level:3,title:"\u6570\u636E\u4EE3\u7406",slug:"\u6570\u636E\u4EE3\u7406",children:[]},{level:3,title:"\u4E8B\u4EF6\u5904\u7406",slug:"\u4E8B\u4EF6\u5904\u7406",children:[{level:4,title:"\u4E00\u4E2A\u6700\u7B80\u5355\u7684\u4E8B\u4EF6\u7ED1\u5B9A",slug:"\u4E00\u4E2A\u6700\u7B80\u5355\u7684\u4E8B\u4EF6\u7ED1\u5B9A",children:[]},{level:4,title:"\u952E\u76D8\u4E8B\u4EF6",slug:"\u952E\u76D8\u4E8B\u4EF6",children:[]}]},{level:3,title:"\u8BA1\u7B97\u5C5E\u6027",slug:"\u8BA1\u7B97\u5C5E\u6027",children:[]},{level:3,title:"\u76D1\u89C6\u5C5E\u6027",slug:"\u76D1\u89C6\u5C5E\u6027",children:[]},{level:3,title:"class\u4E0Estyle\u7ED1\u5B9A",slug:"class\u4E0Estyle\u7ED1\u5B9A",children:[]},{level:3,title:"\u6761\u4EF6\u6E32\u67D3",slug:"\u6761\u4EF6\u6E32\u67D3",children:[]},{level:3,title:"\u5217\u8868\u6E32\u67D3",slug:"\u5217\u8868\u6E32\u67D3",children:[]},{level:3,title:"\u6570\u636E\u76D1\u6D4B",slug:"\u6570\u636E\u76D1\u6D4B",children:[]},{level:3,title:"\u6536\u96C6\u8868\u5355\u6570\u636E",slug:"\u6536\u96C6\u8868\u5355\u6570\u636E",children:[]},{level:3,title:"cookie\u7B80\u7565\u56FE\u793A",slug:"cookie\u7B80\u7565\u56FE\u793A",children:[]},{level:3,title:"\u751F\u547D\u5468\u671F",slug:"\u751F\u547D\u5468\u671F",children:[]}]}],git:{updatedTime:1710173784e3,contributors:[{name:"shailene",email:"64005626+shaileneF@users.noreply.github.com",commits:1}]},filePathRelative:"\u524D\u7AEF/vue\u57FA\u7840/vue\u57FA\u7840.md"};export{e as data};
                                                                  diff --git "a/assets/vue\345\237\272\347\241\200.html.62eeae42.js" "b/assets/vue\345\237\272\347\241\200.html.5a7cad2c.js"
                                                                  similarity index 99%
                                                                  rename from "assets/vue\345\237\272\347\241\200.html.62eeae42.js"
                                                                  rename to "assets/vue\345\237\272\347\241\200.html.5a7cad2c.js"
                                                                  index 9f03d3ac..5b806dab 100644
                                                                  --- "a/assets/vue\345\237\272\347\241\200.html.62eeae42.js"
                                                                  +++ "b/assets/vue\345\237\272\347\241\200.html.5a7cad2c.js"
                                                                  @@ -1,4 +1,4 @@
                                                                  -import{_ as t,o as p,c as o,a as n,t as e,F as c,e as a}from"./app.0d029894.js";var l="/study/assets/image-20230607200511206.5d36c846.png",u="/study/assets/image-20230608111033405.b2f64153.png",k="/study/assets/image-20230705144854542.613e7116.png";const i={},r=a(`

                                                                  vue\u5B66\u4E60\u7B14\u8BB0

                                                                  vue\u6838\u5FC3

                                                                  vue\u5B89\u88C5

                                                                  1. npm\u5B89\u88C5vue-cli\uFF0C\u5373vue\u811A\u624B\u67B6
                                                                  2. \u901A\u8FC7CDN\u4F7F\u7528vue
                                                                  3. \u76F4\u63A5\u4E0B\u8F7D\u5E76\u7528 <script> \u6807\u7B7E\u5F15\u5165\uFF0CVue \u4F1A\u88AB\u6CE8\u518C\u4E3A\u4E00\u4E2A\u5168\u5C40\u53D8\u91CF\u3002

                                                                  \u521D\u8BC6vue

                                                                  <!DOCTYPE html>
                                                                  +import{_ as t,o as p,c as o,a as n,t as e,F as c,e as a}from"./app.f8791b52.js";var l="/study/assets/image-20230607200511206.5d36c846.png",u="/study/assets/image-20230608111033405.b2f64153.png",k="/study/assets/image-20230705144854542.613e7116.png";const i={},r=a(`

                                                                  vue\u5B66\u4E60\u7B14\u8BB0

                                                                  vue\u6838\u5FC3

                                                                  vue\u5B89\u88C5

                                                                  1. npm\u5B89\u88C5vue-cli\uFF0C\u5373vue\u811A\u624B\u67B6
                                                                  2. \u901A\u8FC7CDN\u4F7F\u7528vue
                                                                  3. \u76F4\u63A5\u4E0B\u8F7D\u5E76\u7528 <script> \u6807\u7B7E\u5F15\u5165\uFF0CVue \u4F1A\u88AB\u6CE8\u518C\u4E3A\u4E00\u4E2A\u5168\u5C40\u53D8\u91CF\u3002

                                                                  \u521D\u8BC6vue

                                                                  <!DOCTYPE html>
                                                                   <html lang="en">
                                                                   
                                                                   <head>
                                                                  diff --git "a/assets/vue\347\273\204\344\273\266.html.900eca1b.js" "b/assets/vue\347\273\204\344\273\266.html.2d08ae6e.js"
                                                                  similarity index 97%
                                                                  rename from "assets/vue\347\273\204\344\273\266.html.900eca1b.js"
                                                                  rename to "assets/vue\347\273\204\344\273\266.html.2d08ae6e.js"
                                                                  index 7ec76452..35ce13af 100644
                                                                  --- "a/assets/vue\347\273\204\344\273\266.html.900eca1b.js"
                                                                  +++ "b/assets/vue\347\273\204\344\273\266.html.2d08ae6e.js"
                                                                  @@ -1 +1 @@
                                                                  -const e={key:"v-12a323e6",path:"/%E5%89%8D%E7%AB%AF/vue%E7%BB%84%E4%BB%B6/vue%E7%BB%84%E4%BB%B6.html",title:"Vue\u5B66\u4E60\u7B14\u8BB0",lang:"zh-CN",frontmatter:{},excerpt:"",headers:[{level:2,title:"\u7EC4\u4EF6\u5316\u7F16\u7A0B",slug:"\u7EC4\u4EF6\u5316\u7F16\u7A0B",children:[{level:3,title:"\u7EC4\u4EF6",slug:"\u7EC4\u4EF6",children:[]},{level:3,title:"\u6A21\u5757",slug:"\u6A21\u5757",children:[]},{level:3,title:"\u975E\u5355\u6587\u4EF6\u7EC4\u4EF6",slug:"\u975E\u5355\u6587\u4EF6\u7EC4\u4EF6",children:[]},{level:3,title:"\u5355\u6587\u4EF6\u7EC4\u4EF6",slug:"\u5355\u6587\u4EF6\u7EC4\u4EF6",children:[{level:4,title:"App.vue",slug:"app-vue",children:[]},{level:4,title:"School.vue",slug:"school-vue",children:[]},{level:4,title:"\u5165\u53E3\u6587\u4EF6",slug:"\u5165\u53E3\u6587\u4EF6",children:[]}]}]},{level:2,title:"Vue\u811A\u624B\u67B6",slug:"vue\u811A\u624B\u67B6",children:[{level:3,title:"\u521D\u59CB\u5316\u811A\u624B\u67B6",slug:"\u521D\u59CB\u5316\u811A\u624B\u67B6",children:[]},{level:3,title:"\u811A\u624B\u67B6\u7ED3\u6784",slug:"\u811A\u624B\u67B6\u7ED3\u6784",children:[]},{level:3,title:"render\u914D\u7F6E\u9879",slug:"render\u914D\u7F6E\u9879",children:[]},{level:3,title:"\u9ED8\u8BA4\u914D\u7F6E",slug:"\u9ED8\u8BA4\u914D\u7F6E",children:[]},{level:3,title:"vue.config.js",slug:"vue-config-js",children:[]},{level:3,title:"ref\u5C5E\u6027",slug:"ref\u5C5E\u6027",children:[]},{level:3,title:"\u914D\u7F6E\u9879props",slug:"\u914D\u7F6E\u9879props",children:[]},{level:3,title:"\u914D\u7F6E\u9879mixin\uFF08\u6DF7\u5165\uFF09",slug:"\u914D\u7F6E\u9879mixin-\u6DF7\u5165",children:[]},{level:3,title:"\u63D2\u4EF6",slug:"\u63D2\u4EF6",children:[]},{level:3,title:"scoped\u6837\u5F0F",slug:"scoped\u6837\u5F0F",children:[]}]},{level:2,title:"TodoList\u6848\u4F8B",slug:"todolist\u6848\u4F8B",children:[{level:3,title:"\u7EC4\u4EF6\u5316\u7F16\u7801\u6D41\u7A0B",slug:"\u7EC4\u4EF6\u5316\u7F16\u7801\u6D41\u7A0B",children:[]},{level:3,title:"\u6CE8\u610F",slug:"\u6CE8\u610F",children:[]}]},{level:2,title:"\u6D4F\u89C8\u5668\u672C\u5730\u5B58\u50A8\uFF08WebStorage\uFF09",slug:"\u6D4F\u89C8\u5668\u672C\u5730\u5B58\u50A8-webstorage",children:[]},{level:2,title:"\u81EA\u5B9A\u4E49\u4E8B\u4EF6",slug:"\u81EA\u5B9A\u4E49\u4E8B\u4EF6",children:[]}],git:{updatedTime:1710173765e3,contributors:[{name:"shailene",email:"64005626+shaileneF@users.noreply.github.com",commits:1}]},filePathRelative:"\u524D\u7AEF/vue\u7EC4\u4EF6/vue\u7EC4\u4EF6.md"};export{e as data};
                                                                  +const e={key:"v-12a323e6",path:"/%E5%89%8D%E7%AB%AF/vue%E7%BB%84%E4%BB%B6/vue%E7%BB%84%E4%BB%B6.html",title:"Vue\u5B66\u4E60\u7B14\u8BB0",lang:"zh-CN",frontmatter:{},excerpt:"",headers:[{level:2,title:"\u7EC4\u4EF6\u5316\u7F16\u7A0B",slug:"\u7EC4\u4EF6\u5316\u7F16\u7A0B",children:[{level:3,title:"\u7EC4\u4EF6",slug:"\u7EC4\u4EF6",children:[]},{level:3,title:"\u6A21\u5757",slug:"\u6A21\u5757",children:[]},{level:3,title:"\u975E\u5355\u6587\u4EF6\u7EC4\u4EF6",slug:"\u975E\u5355\u6587\u4EF6\u7EC4\u4EF6",children:[]},{level:3,title:"\u5355\u6587\u4EF6\u7EC4\u4EF6",slug:"\u5355\u6587\u4EF6\u7EC4\u4EF6",children:[{level:4,title:"App.vue",slug:"app-vue",children:[]},{level:4,title:"School.vue",slug:"school-vue",children:[]},{level:4,title:"\u5165\u53E3\u6587\u4EF6",slug:"\u5165\u53E3\u6587\u4EF6",children:[]}]}]},{level:2,title:"Vue\u811A\u624B\u67B6",slug:"vue\u811A\u624B\u67B6",children:[{level:3,title:"\u521D\u59CB\u5316\u811A\u624B\u67B6",slug:"\u521D\u59CB\u5316\u811A\u624B\u67B6",children:[]},{level:3,title:"\u811A\u624B\u67B6\u7ED3\u6784",slug:"\u811A\u624B\u67B6\u7ED3\u6784",children:[]},{level:3,title:"render\u914D\u7F6E\u9879",slug:"render\u914D\u7F6E\u9879",children:[]},{level:3,title:"\u9ED8\u8BA4\u914D\u7F6E",slug:"\u9ED8\u8BA4\u914D\u7F6E",children:[]},{level:3,title:"vue.config.js",slug:"vue-config-js",children:[]},{level:3,title:"ref\u5C5E\u6027",slug:"ref\u5C5E\u6027",children:[]},{level:3,title:"\u914D\u7F6E\u9879props",slug:"\u914D\u7F6E\u9879props",children:[]},{level:3,title:"\u914D\u7F6E\u9879mixin\uFF08\u6DF7\u5165\uFF09",slug:"\u914D\u7F6E\u9879mixin-\u6DF7\u5165",children:[]},{level:3,title:"\u63D2\u4EF6",slug:"\u63D2\u4EF6",children:[]},{level:3,title:"scoped\u6837\u5F0F",slug:"scoped\u6837\u5F0F",children:[]}]},{level:2,title:"TodoList\u6848\u4F8B",slug:"todolist\u6848\u4F8B",children:[{level:3,title:"\u7EC4\u4EF6\u5316\u7F16\u7801\u6D41\u7A0B",slug:"\u7EC4\u4EF6\u5316\u7F16\u7801\u6D41\u7A0B",children:[]},{level:3,title:"\u6CE8\u610F",slug:"\u6CE8\u610F",children:[]}]},{level:2,title:"\u6D4F\u89C8\u5668\u672C\u5730\u5B58\u50A8\uFF08WebStorage\uFF09",slug:"\u6D4F\u89C8\u5668\u672C\u5730\u5B58\u50A8-webstorage",children:[]},{level:2,title:"\u81EA\u5B9A\u4E49\u4E8B\u4EF6",slug:"\u81EA\u5B9A\u4E49\u4E8B\u4EF6",children:[]}],git:{updatedTime:1710173784e3,contributors:[{name:"shailene",email:"64005626+shaileneF@users.noreply.github.com",commits:1}]},filePathRelative:"\u524D\u7AEF/vue\u7EC4\u4EF6/vue\u7EC4\u4EF6.md"};export{e as data};
                                                                  diff --git "a/assets/vue\347\273\204\344\273\266.html.cc1ac58c.js" "b/assets/vue\347\273\204\344\273\266.html.733f6df3.js"
                                                                  similarity index 99%
                                                                  rename from "assets/vue\347\273\204\344\273\266.html.cc1ac58c.js"
                                                                  rename to "assets/vue\347\273\204\344\273\266.html.733f6df3.js"
                                                                  index 35f9c56e..2eb98a01 100644
                                                                  --- "a/assets/vue\347\273\204\344\273\266.html.cc1ac58c.js"
                                                                  +++ "b/assets/vue\347\273\204\344\273\266.html.733f6df3.js"
                                                                  @@ -1,4 +1,4 @@
                                                                  -import{_ as n,e as a}from"./app.0d029894.js";var s="/study/assets/image-20230706144755365.577f19fa.png";const t={},p=a('

                                                                  Vue\u5B66\u4E60\u7B14\u8BB0

                                                                  \u7EC4\u4EF6\u5316\u7F16\u7A0B

                                                                  \u7EC4\u4EF6

                                                                  \u7EC4\u4EF6\u662F\u5B9E\u73B0\u9875\u9762\u7684\u4EE3\u7801\u548C\u8D44\u6E90\u7684\u96C6\u5408\u3002\u7EC4\u4EF6\u4EE5.vue\u7ED3\u5C3E\uFF0C\u5728\u811A\u624B\u67B6\u91CC\u9762\uFF0C\u4E0D\u662F\u8BF4\u90FD\u653E\u5728components\u91CC\uFF0C\u53EF\u590D\u7528\u7684\u653E\u5728components\u91CC\uFF0C\u4E0D\u53EF\u590D\u7528\u7684\u662F\u9879\u76EE\u7279\u5B9A\u7684\u9875\u9762\uFF0C\u653E\u5728views\u91CC\u3002

                                                                  \u4F20\u7EDF\u65B9\u5F0F\u7F16\u5199\u5E94\u7528\uFF0C\u5B58\u5728\u95EE\u9898\uFF1A

                                                                  • \u4F9D\u8D56\u5173\u7CFB\u6DF7\u4E71\uFF0C\u4E0D\u597D\u7EF4\u62A4\u3002
                                                                  • \u4EE3\u7801\u590D\u7528\u7387\u4E0D\u9AD8\u3002

                                                                  \u4F7F\u7528\u7EC4\u4EF6\u65B9\u5F0F\u7F16\u5199\u5E94\u7528\uFF1A

                                                                  image-20230706144755365

                                                                  \u7EC4\u4EF6\u7684\u5B9A\u4E49\uFF1A

                                                                  \u5B9E\u73B0\u5E94\u7528\u4E2D\u5C40\u90E8\u529F\u80FD\u4EE3\u7801\u548C\u8D44\u6E90\u7684\u96C6\u5408\u3002

                                                                  \u7EC4\u4EF6\u4E00\u5B9A\u8981\u62C6\u6210\u5C40\u90E8\uFF0C\u5C40\u90E8\u4E3A\u4E00\u4E2A\u7EC4\u4EF6\uFF0C\u8FD9\u6837\u624D\u80FD\u63D0\u9AD8\u7EC4\u4EF6\u7684\u590D\u7528\u7387\u3002\u5176\u4F59\u9879\u76EE\u8981\u7528\uFF0C\u90A3\u4E48\u5F15\u5165\u9700\u8981\u7684\u7EC4\u4EF6\u5C31\u53EF\u4EE5\u4E86\u3002

                                                                  \u6A21\u5757

                                                                  1. \u5411\u5916\u63D0\u4F9B\u7279\u5B9A\u529F\u80FD\u7684js\u6587\u4EF6\uFF0C\u4E00\u822C\u4E00\u4E2A\u6A21\u5757\u5C31\u662F\u4E00\u4E2Ajs\u6587\u4EF6\u3002

                                                                  2. \u4F5C\u7528\uFF1A

                                                                    \u590D\u7528js\uFF0C\u7B80\u5316js\u7684\u7F16\u5199\uFF0C\u63D0\u9AD8js\u8FD0\u884C\u6548\u7387\u3002

                                                                  \u975E\u5355\u6587\u4EF6\u7EC4\u4EF6

                                                                  \u4E00\u4E2A\u6587\u4EF6\u4E2D\u5305\u542B\u6709n\u4E2A\u7EC4\u4EF6\u3002

                                                                  \u5355\u6587\u4EF6\u7EC4\u4EF6\u662F\u4E00\u4E2A\u6587\u4EF6\u4E2D\u53EA\u5305\u542B\u4E00\u4E2A\u7EC4\u4EF6\uFF0C\u6587\u4EF6\u540D\u540E\u7F00\u4E3A.vue\u3002

                                                                  \u771F\u6B63\u505A\u5F00\u53D1\u7684\u65F6\u5019\uFF0C\u7528\u7684\u90FD\u662F\u5355\u6587\u4EF6\u7EC4\u4EF6\uFF0C\u6761\u7406\u6E05\u6670\uFF0C\u597D\u7EF4\u62A4\u3002

                                                                  vue\u91CC\u4F7F\u7528\u7EC4\u4EF6\u5206\u4E09\u6B65\uFF1A\u521B\u5EFA\u3001\u6CE8\u518C\u3001\u4F7F\u7528

                                                                  <!DOCTYPE html>
                                                                  +import{_ as n,e as a}from"./app.f8791b52.js";var s="/study/assets/image-20230706144755365.577f19fa.png";const t={},p=a('

                                                                  Vue\u5B66\u4E60\u7B14\u8BB0

                                                                  \u7EC4\u4EF6\u5316\u7F16\u7A0B

                                                                  \u7EC4\u4EF6

                                                                  \u7EC4\u4EF6\u662F\u5B9E\u73B0\u9875\u9762\u7684\u4EE3\u7801\u548C\u8D44\u6E90\u7684\u96C6\u5408\u3002\u7EC4\u4EF6\u4EE5.vue\u7ED3\u5C3E\uFF0C\u5728\u811A\u624B\u67B6\u91CC\u9762\uFF0C\u4E0D\u662F\u8BF4\u90FD\u653E\u5728components\u91CC\uFF0C\u53EF\u590D\u7528\u7684\u653E\u5728components\u91CC\uFF0C\u4E0D\u53EF\u590D\u7528\u7684\u662F\u9879\u76EE\u7279\u5B9A\u7684\u9875\u9762\uFF0C\u653E\u5728views\u91CC\u3002

                                                                  \u4F20\u7EDF\u65B9\u5F0F\u7F16\u5199\u5E94\u7528\uFF0C\u5B58\u5728\u95EE\u9898\uFF1A

                                                                  • \u4F9D\u8D56\u5173\u7CFB\u6DF7\u4E71\uFF0C\u4E0D\u597D\u7EF4\u62A4\u3002
                                                                  • \u4EE3\u7801\u590D\u7528\u7387\u4E0D\u9AD8\u3002

                                                                  \u4F7F\u7528\u7EC4\u4EF6\u65B9\u5F0F\u7F16\u5199\u5E94\u7528\uFF1A

                                                                  image-20230706144755365

                                                                  \u7EC4\u4EF6\u7684\u5B9A\u4E49\uFF1A

                                                                  \u5B9E\u73B0\u5E94\u7528\u4E2D\u5C40\u90E8\u529F\u80FD\u4EE3\u7801\u548C\u8D44\u6E90\u7684\u96C6\u5408\u3002

                                                                  \u7EC4\u4EF6\u4E00\u5B9A\u8981\u62C6\u6210\u5C40\u90E8\uFF0C\u5C40\u90E8\u4E3A\u4E00\u4E2A\u7EC4\u4EF6\uFF0C\u8FD9\u6837\u624D\u80FD\u63D0\u9AD8\u7EC4\u4EF6\u7684\u590D\u7528\u7387\u3002\u5176\u4F59\u9879\u76EE\u8981\u7528\uFF0C\u90A3\u4E48\u5F15\u5165\u9700\u8981\u7684\u7EC4\u4EF6\u5C31\u53EF\u4EE5\u4E86\u3002

                                                                  \u6A21\u5757

                                                                  1. \u5411\u5916\u63D0\u4F9B\u7279\u5B9A\u529F\u80FD\u7684js\u6587\u4EF6\uFF0C\u4E00\u822C\u4E00\u4E2A\u6A21\u5757\u5C31\u662F\u4E00\u4E2Ajs\u6587\u4EF6\u3002

                                                                  2. \u4F5C\u7528\uFF1A

                                                                    \u590D\u7528js\uFF0C\u7B80\u5316js\u7684\u7F16\u5199\uFF0C\u63D0\u9AD8js\u8FD0\u884C\u6548\u7387\u3002

                                                                  \u975E\u5355\u6587\u4EF6\u7EC4\u4EF6

                                                                  \u4E00\u4E2A\u6587\u4EF6\u4E2D\u5305\u542B\u6709n\u4E2A\u7EC4\u4EF6\u3002

                                                                  \u5355\u6587\u4EF6\u7EC4\u4EF6\u662F\u4E00\u4E2A\u6587\u4EF6\u4E2D\u53EA\u5305\u542B\u4E00\u4E2A\u7EC4\u4EF6\uFF0C\u6587\u4EF6\u540D\u540E\u7F00\u4E3A.vue\u3002

                                                                  \u771F\u6B63\u505A\u5F00\u53D1\u7684\u65F6\u5019\uFF0C\u7528\u7684\u90FD\u662F\u5355\u6587\u4EF6\u7EC4\u4EF6\uFF0C\u6761\u7406\u6E05\u6670\uFF0C\u597D\u7EF4\u62A4\u3002

                                                                  vue\u91CC\u4F7F\u7528\u7EC4\u4EF6\u5206\u4E09\u6B65\uFF1A\u521B\u5EFA\u3001\u6CE8\u518C\u3001\u4F7F\u7528

                                                                  <!DOCTYPE html>
                                                                   <html>
                                                                   
                                                                   <head>
                                                                  diff --git a/assets/zookeeper.html.90ea0636.js b/assets/zookeeper.html.64c8c5f3.js
                                                                  similarity index 99%
                                                                  rename from assets/zookeeper.html.90ea0636.js
                                                                  rename to assets/zookeeper.html.64c8c5f3.js
                                                                  index 384c5d9d..3f71b642 100644
                                                                  --- a/assets/zookeeper.html.90ea0636.js
                                                                  +++ b/assets/zookeeper.html.64c8c5f3.js
                                                                  @@ -1 +1 @@
                                                                  -import{_ as e,e as p}from"./app.0d029894.js";var i="/study/assets/image-20211003203400587.b108c9ef.png",r="/study/assets/image-20211003204538685.9d62abb7.png",o="/study/assets/image-20211003205325088.0fd3638c.png",l="/study/assets/image-20211006145100475.5bea220f.png",a="/study/assets/image-20211006145844714.a6afcaf6.png",t="/study/assets/image-20211006152112242.ddc9635a.png",s="/study/assets/image-20211006152451588.72a8b6d1.png",n="/study/assets/image-20211006153042844.9cc3144b.png",d="/study/assets/image-20211006171214463.6906b50c.png",g="/study/assets/image-20211006171630741.ad2d506e.png",h="/study/assets/image-20211006180545474.37480f29.png";const c={},u=p('

                                                                  zookeeper

                                                                  \u6982\u8FF0

                                                                  1. \u5206\u5E03\u5F0F\uFF1A\u7531\u591A\u53F0\u670D\u52A1\u5668\u5171\u540C\u5B8C\u6210\u4E00\u4EF6\u6BD4\u8F83\u590D\u6742\u7684\u4E8B\uFF0C\u53EF\u4EE5\u7406\u89E3\u4E3A\u5206\u5E03\u5F0F

                                                                    \u5177\u4F53\u8BF4\uFF1A\u8BBE\u8BA1\u7F51\u7AD9\u53EF\u6269\u5C55\u67B6\u6784\u7684\u6838\u5FC3\u601D\u60F3\u662F\u6A21\u5757\u5316\uFF0C\u5E76\u5728\u6B64\u57FA\u7840\u4E0A\uFF0C\u964D\u4F4E\u6A21\u5757\u95F4\u7684\u8026\u5408\u6027\uFF0C\u63D0\u9AD8\u6A21\u5757\u7684\u590D\u7528\u6027\u3002

                                                                    \u6240\u8C13\u5206\u5E03\u5F0F\u4E1A\u52A1\u7CFB\u7EDF\uFF0C\u5C31\u662F\u628A\u539F\u6765\u4E00\u4E2A\u5927\u5757\u7CFB\u7EDF\uFF0C\u6839\u636E\u529F\u80FD\uFF0C\u62C6\u5206\u6210\u591A\u4E2A\u72EC\u7ACB\u7684\u5B50\u7CFB\u7EDF\uFF0C\u8FD9\u4E9B\u72EC\u7ACB\u7684\u5B50\u7CFB\u7EDF\uFF08\u6A21\u5757\uFF09\u90E8\u7F72\u5728\u72EC\u7ACB\u7684\u670D\u52A1\u5668\uFF08\u96C6\u7FA4\u4E0A\uFF09\uFF0C\u4ECE\u7269\u7406\u4E0A\u89E3\u8026\u5408\u8FD9\u4E9B\u6A21\u5757\u4E4B\u95F4\u7684\u5173\u7CFB\uFF0C\u964D\u4F4E\u6A21\u5757\u4E4B\u95F4\u7684\u8026\u5408\u5EA6\uFF0C\u63D0\u9AD8\u6A21\u5757\u7684\u590D\u7528\u6027\u3002

                                                                    \u8FD9\u4E9B\u5B50\u6A21\u5757\u6216\u8005\u8BF4\u5B50\u7CFB\u7EDF\u901A\u8FC7\u6D88\u606F\u4F20\u9012\u4EE5\u53CA\u4F9D\u8D56\u8C03\u7528\u7684\u65B9\u5F0F\u805A\u5408\u6210\u4E00\u4E2A\u5B8C\u6574\u7684\u7CFB\u7EDF\u3002

                                                                  2. \u4EC0\u4E48\u662F\u96C6\u7FA4

                                                                    \u96C6\u7FA4\uFF08cluster\uFF09\u662F**\u4E00\u7EC4\uFF08\u5373\u591A\u4E2A\uFF09**\u8BA1\u7B97\u673A\u3001\u670D\u52A1\u5668\uFF0C\u4ED6\u4EEC\u4F5C\u4E3A\u4E00\u4E2A\u6574\u4F53\u5411\u7528\u6237\u63D0\u4F9B\u4E00\u7EC4\u7F51\u7EDC\u8D44\u6E90\uFF0C\u8FD9\u4E9B\u5355\u4E2A\u7684\u8BA1\u7B97\u673A\u6216\u8005\u670D\u52A1\u5668\u5C31\u662F\u96C6\u7FA4\u7684\u8282\u70B9\u3002

                                                                  3. \u5206\u5E03\u5F0F\u548C\u96C6\u7FA4\u7684\u533A\u522B\u662F\u4EC0\u4E48\uFF1F

                                                                    \u96C6\u7FA4\u662F\u4E2A\u7269\u7406\u5F62\u6001\uFF0C\u5206\u5E03\u5F0F\u662F\u4E2A\u5DE5\u4F5C\u65B9\u5F0F\uFF0C\u4E5F\u53EF\u4EE5\u7406\u89E3\u4E3A\u4E00\u79CD\u601D\u60F3\u3002

                                                                    \u5206\u5E03\u5F0F\uFF1A\u5C06\u4E00\u4E2A\u4E1A\u52A1\u62C6\u5206\u6210\u591A\u4E2A\u5B50\u4E1A\u52A1\uFF0C\u6BCF\u4E2A\u4E1A\u52A1\u90E8\u7F72\u5728\u4E0D\u540C\u7684\u670D\u52A1\u5668\u4E0A

                                                                    \u96C6\u7FA4\uFF1A\u591A\u4E2A\u4E0D\u540C\u7684\u670D\u52A1\u5668\u5408\u8D77\u6765\u6784\u6210\u4E00\u4E2Acluster\uFF0C\u5E76\u4F5C\u4E3A\u4E00\u4E2A\u6574\u4F53\u5B8C\u6210\u4E1A\u52A1\u3002

                                                                  \u5206\u5E03\u5F0F\u7406\u8BBA

                                                                  CAP

                                                                  1. \u6982\u8FF0

                                                                    \u5F53\u6211\u4EEC\u7684\u5355\u4E2A\u6570\u636E\u5E93\u7684\u6027\u80FD\u4EA7\u751F\u74F6\u9888\u7684\u65F6\u5019\uFF0C\u6211\u4EEC\u53EF\u80FD\u4F1A\u5BF9\u6570\u636E\u5E93\u8FDB\u884C\u5206\u533A\uFF0C\u8FD9\u91CC\u6240\u8BF4\u7684\u5206\u533A\u662F\u6307\u7269\u7406\u5206\u533A\uFF0C\u5206\u533A\u4E4B\u540E\u53EF\u80FD\u4E0D\u540C\u7684\u5E93\u5C31\u5904\u4E8E\u4E0D\u540C\u7684\u670D\u52A1\u5668\u4E0A\u4E86\uFF0C\u4E5F\u53EF\u4EE5\u7406\u89E3\u6210\u5206\u5E93\uFF0C\u5206\u5E93\u5206\u533A\u662F\u4E00\u4E2A\u610F\u601D\uFF0C\u8FD9\u4E2A\u65F6\u5019\u5355\u4E2A\u6570\u636E\u5E93\u7684ACID\u5DF2\u7ECF\u4E0D\u80FD\u9002\u5E94\u8FD9\u79CD\u60C5\u51B5\u4E86\uFF0C\u800C\u5728\u8FD9\u79CD\u96C6\u7FA4\u73AF\u5883\u4E0B\uFF0C\u518D\u60F3\u4FDD\u8BC1\u8FDB\u7FA4\u7684ACID\u51E0\u4E4E\u662F\u5F88\u96BE\u8FBE\u5230\uFF0C\u6216\u8005\u5373\u4F7F\u80FD\u8FBE\u5230\uFF0C\u90A3\u4E48\u6027\u80FD\u548C\u6548\u7387\u4E5F\u4F1A\u5927\u5E45\u5EA6\u4E0B\u964D\uFF0C\u8FD9\u4E2A\u65F6\u5019\u5982\u679C\u518D\u8FFD\u6C42\u96C6\u7FA4\u7684ACID\u4F1A\u5BFC\u81F4\u6211\u4EEC\u7684\u7CFB\u7EDF\u53D8\u5F97\u5F88\u5DEE\uFF0C\u6B64\u65F6\u6211\u4EEC\u5C31\u9700\u8981\u5F15\u5165\u4E00\u4E2A\u65B0\u7684\u7406\u8BBA\u539F\u5219\u6765\u9002\u5E94\u8FD9\u79CD\u96C6\u7FA4\u7684\u60C5\u51B5\uFF0C\u5C31\u662FCAP\u539F\u7406

                                                                  2. CAP\u539F\u7406\u53C8\u88AB\u79F0\u4F5C\u5E03\u9C81\u5C14\u5B9A\u7406\uFF0C\u5B83\u6307\u51FA\u5BF9\u4E8E\u4E00\u4E2A\u5206\u5E03\u5F0F\u7CFB\u7EDF\u6765\u8BF4\uFF0C\u4E0D\u80FD\u540C\u65F6\u6EE1\u8DB3\u4EE5\u4E0B\u4E09\u70B9\uFF1A\uFF08CAP\u539F\u7406\u9488\u5BF9\u7684\u662F\u5206\u5E03\u5F0F\u7CFB\u7EDF\uFF0C\u800CACID\u9488\u5BF9\u7684\u662F\u6301\u4E45\u5316\u6570\u636E\u5E93\uFF09

                                                                    • \u4E00\u81F4\u6027\uFF08Consistence\uFF09

                                                                      \u4E00\u81F4\u6027\u6307\u7684\u662F\u591A\u4E2A\u6570\u636E\u526F\u672C\u662F\u5426\u80FD\u4FDD\u6301\u4E00\u81F4\u7684\u7279\u6027\uFF0C\u5728\u4E00\u81F4\u6027\u7684\u6761\u4EF6\u4E0B\uFF0C\u7CFB\u7EDF\u5728\u6267\u884C\u6570\u636E\u66F4\u65B0\u64CD\u4F5C\u4E4B\u540E\u80FD\u591F\u4ECE\u4E00\u81F4\u6027\u72B6\u6001\u8F6C\u79FB\u5230\u53E6\u4E00\u4E2A\u4E00\u81F4\u6027\u72B6\u6001

                                                                    • \u53EF\u7528\u6027\uFF08Availability\uFF09

                                                                      \u53EF\u7528\u6027\u6307\u7684\u662F\u5206\u5E03\u5F0F\u7CFB\u7EDF\u5728\u9762\u5BF9\u5404\u79CD\u5F02\u5E38\u65F6\u53EF\u4EE5\u63D0\u4F9B\u6B63\u5E38\u670D\u52A1\u7684\u80FD\u529B

                                                                      \u5728\u53EF\u7528\u6027\u6761\u4EF6\u4E0B\uFF0C\u8981\u6C42\u7CFB\u7EDF\u63D0\u4F9B\u7684\u670D\u52A1\u4E00\u76F4\u5904\u4E8E\u53EF\u7528\u7684\u72B6\u6001\uFF0C\u5BF9\u4E8E\u7528\u6237\u7684\u6BCF\u4E00\u4E2A\u64CD\u4F5C\u8BF7\u6C42\u603B\u662F\u80FD\u591F\u5728\u6709\u9650\u7684\u65F6\u95F4\u5185\u8FD4\u56DE\u7ED3\u679C\u3002

                                                                    • \u5206\u533A\u5BB9\u9519\u6027\uFF08Partition tolerance\uFF09

                                                                      \u7F51\u7EDC\u5206\u533A\u662F\u6307\u5206\u5E03\u5F0F\u7CFB\u7EDF\u4E2D\u7684\u8282\u70B9\uFF0C\u88AB\u5212\u5206\u4E3A\u591A\u4E2A\u533A\u57DF\uFF0C\u6BCF\u4E2A\u533A\u57DF\u5185\u90E8\u53EF\u4EE5\u901A\u4FE1\uFF0C\u4F46\u662F\u533A\u57DF\u4E4B\u95F4\u65E0\u6CD5\u901A\u4FE1

                                                                      \u5728\u5206\u533A\u5BB9\u5FCD\u6027\u6761\u4EF6\u4E0B\uFF0C\u5206\u5E03\u5F0F\u7CFB\u7EDF\u5728\u9047\u5230\u4EFB\u4F55\u7F51\u7EDC\u5206\u533A\u6545\u969C\u7684\u65F6\u5019\u4ECD\u7136\u9700\u8981\u80FD\u5BF9\u5916\u63D0\u4F9B\u4E00\u81F4\u6027\u548C\u53EF\u7528\u6027\u7684\u670D\u52A1\uFF0C\u9664\u975E\u662F\u6574\u4E2A\u7F51\u7EDC\u73AF\u5883\u90FD\u53D1\u751F\u4E86\u6545\u969C\u3002

                                                                  3. CAP\u4EC5\u9002\u7528\u4E8E\u539F\u5B50\u8BFB\u5199\u7684NOSQL\u573A\u666F\u4E2D\uFF0C\u5E76\u4E0D\u9002\u7528\u4E8E\u6570\u636E\u5E93\u7CFB\u7EDF\uFF0C\u73B0\u5728\u7684\u5206\u5E03\u5F0F\u7CFB\u7EDF\u5177\u6709\u66F4\u591A\u7279\u6027\uFF0C\u6BD4\u5982\u6269\u5C55\u6027\u3001\u53EF\u7528\u6027\u7B49\u7B49\uFF0C\u5728\u8FDB\u884C\u5206\u5E03\u5F0F\u7CFB\u7EDF\u642D\u5EFA\u6216\u8005\u5F00\u53D1\u7684\u65F6\u5019\uFF0C\u6211\u4EEC\u4E0D\u5E94\u8BE5\u4EC5\u4EC5\u5C40\u9650\u4E8ECAP\u7279\u6027\u4E0A\u3002

                                                                    \u5206\u533A\u5BB9\u9519\u6027\uFF08Partition tolerance\uFF09\u6211\u4EEC\u662F\u5FC5\u987B\u8981\u5B9E\u73B0\u7684\u3002

                                                                  BASE\u7406\u8BBA

                                                                  1. \u5728\u5206\u5E03\u5F0F\u7CFB\u7EDF\u4E2D\uFF0C\u6211\u4EEC\u5F80\u5F80\u8FFD\u6C42\u7684\u662F\u53EF\u7528\u6027\u3002Redis\u662FCP,\u4E5F\u5C31\u662F\u4E00\u81F4\u6027\u548C\u5206\u533A\u5BB9\u9519\u6027

                                                                  2. BASE\u7406\u8BBA\u662F\u5BF9CAP\u7406\u8BBA\u7684\u8FDB\u4E00\u6B65\u6269\u5145

                                                                    BA\uFF1A\u662F\u6307\u57FA\u672C\u53EF\u7528\uFF0CBasically Available\uFF08\u57FA\u672C\u53EF\u7528\uFF09

                                                                    S\uFF1ASoft-state\uFF08\u8F6F\u72B6\u6001\uFF09

                                                                    E\uFF1AEventually Consistent\uFF08\u6700\u7EC8\u4E00\u81F4\u6027\uFF09

                                                                  3. BASE\u7406\u8BBA\u7684\u6838\u5FC3\u601D\u60F3\uFF1A

                                                                    \uFF08Redis\u662FCP\uFF0C\u662F\u4E00\u81F4\u6027\u548C\u5206\u533A\u5BB9\u9519\u6027\uFF09\uFF0C\u800C\u6211\u4EEC\u5728\u8BBE\u8BA1\u5206\u5E03\u5F0F\u7CFB\u7EDF\u4E2D\uFF0C\u5F80\u5F80\u66F4\u52A0\u8FFD\u6C42\u4E00\u4E9B\u5176\u4ED6\u7684\u7279\u6027\uFF0C\u6BD4\u5982\u8BF4\u6269\u5C55\u6027\uFF0C\u53EF\u7528\u6027\uFF0C\u4E0D\u5E94\u8BE5\u53EA\u662F\u5C40\u9650\u4E8ECAP\uFF0C\u6240\u4EE5BASE\u7406\u8BBA\u4F5C\u4E3ACAP\u7406\u8BBA\u7684\u6269\u5C55\uFF0C\u6765\u6EE1\u8DB3\u6211\u4EEC\u5BF9\u5206\u5E03\u5F0F\u7CFB\u7EDF\u7684\u8BBE\u8BA1\u7406\u8BBA

                                                                    \u6838\u5FC3\u601D\u60F3\uFF1A

                                                                    \u727A\u7272\u6570\u636E\u7684\u4E00\u81F4\u6027\u6765\u6EE1\u8DB3\u7CFB\u7EDF\u7684\u9AD8\u53EF\u7528\u6027\uFF0C\u7CFB\u7EDF\u4E2D\u4E00\u90E8\u5206\u6570\u636E\u4E0D\u53EF\u7528\u6216\u4E0D\u4E00\u81F4\u65F6\uFF0C\u4ECD\u9700\u8981\u4FDD\u6301\u7CFB\u7EDF\u6574\u4F53\u662F\u4E3B\u8981\u53EF\u7528\u7684\u3002

                                                                    \u4ECE\u8FD9\u91CC\u4E5F\u53EF\u4EE5\u770B\u51FA\u8FD9\u79CD\u573A\u666F\uFF0C\u5BF9\u4E8E\u6570\u636E\u6765\u8BF4\uFF0C\u4E0D\u662F\u5F3A\u4E00\u81F4\u6027\u7684\uFF08\u56E0\u4E3A\u6211\u4EEC\u8FFD\u6C42\u9AD8\u53EF\u7528\uFF0C\u800C\u53EF\u7528\u6027\u548C\u4E00\u81F4\u6027\u5728CAP\u539F\u7406\u4E0B\u65E0\u6CD5\u5E76\u5B58\uFF0C\u90A3\u4E48\u5728\u8FFD\u6C42\u53EF\u7528\u6027\u7684\u540C\u65F6\uFF0C\u5C31\u727A\u7272\u6389\u4E00\u81F4\u6027\uFF09\uFF0C\u4F53\u73B0\u5728\u8F6F\u72B6\u6001\u3002

                                                                    \u9488\u5BF9\u6570\u636E\u5E93\u9886\u57DF\uFF0CBASE\u601D\u60F3\u7684\u4E3B\u8981\u5B9E\u73B0\u662F\u5BF9\u4E1A\u52A1\u6570\u636E\u8FDB\u884C\u62C6\u5206\uFF0C\u4E0D\u540C\u6570\u636E\u5206\u5E03\u5728\u4E0D\u540C\u7684\u673A\u5668\u4E0A\uFF0C\u4EE5\u63D0\u5347\u7CFB\u7EDF\u7684\u53EF\u7528\u6027\u3002\uFF08\u53EF\u4EE5\u901A\u8FC7\u6309\u7167\u4E1A\u52A1\u529F\u80FD\u5212\u5206\u3001\u4E5F\u53EF\u4EE5\u901A\u8FC7\u5206\u7247\u7684\u5F62\u5F0F\uFF0C\u8BA9\u6570\u636E\u6563\u5E03\u5728\u4E0D\u540C\u7684\u670D\u52A1\u5668\u4E0A\u3002\uFF09

                                                                  4. BASE\u7406\u8BBA\u4E09\u8981\u7D20

                                                                    • BA\uFF1A\u57FA\u672C\u53EF\u7528

                                                                      \u57FA\u672C\u53EF\u7528\u662F\u6307\u5206\u5E03\u5F0F\u7CFB\u7EDF\u5728\u51FA\u73B0\u4E0D\u53EF\u9884\u77E5\u6545\u969C\u7684\u65F6\u5019\uFF0C\u5141\u8BB8\u635F\u5931\u90E8\u5206\u53EF\u7528\u6027\u3002\u4F46\u662F\uFF0C\u8FD9\u7EDD\u4E0D\u7B49\u4EF7\u4E8E\u7CFB\u7EDF\u4E0D\u53EF\u7528\u3002

                                                                      • \u54CD\u5E94\u65F6\u95F4\u4E0A\u7684\u635F\u5931:\u6B63\u5E38\u60C5\u51B5\u4E0B\uFF0C\u4E00\u4E2A\u5728\u7EBF\u641C\u7D22\u5F15\u64CE\u9700\u8981\u57280.5\u79D2\u4E4B\u5185\u8FD4\u56DE\u7ED9\u7528\u6237\u76F8\u5E94\u7684\u67E5\u8BE2\u7ED3\u679C\uFF0C\u4F46\u7531\u4E8E\u51FA\u73B0\u6545\u969C\uFF0C\u67E5\u8BE2\u7ED3\u679C\u7684\u54CD\u5E94\u65F6\u95F4\u589E\u52A0\u4E861~2\u79D2
                                                                      • \u7CFB\u7EDF\u529F\u80FD\u4E0A\u7684\u635F\u5931\uFF1A\u6B63\u5E38\u60C5\u51B5\u4E0B\uFF0C\u5728\u4E00\u4E2A\u7535\u5B50\u5546\u52A1\u7F51\u7AD9\u4E0A\u8FDB\u884C\u8D2D\u7269\u7684\u65F6\u5019\uFF0C\u6D88\u8D39\u8005\u51E0\u4E4E\u80FD\u591F\u987A\u5229\u5B8C\u6210\u6BCF\u4E00\u7B14\u8BA2\u5355\uFF0C\u4F46\u662F\u5728\u4E00\u4E9B\u8282\u65E5\u5927\u4FC3\u8D2D\u7269\u9AD8\u5CF0\u7684\u65F6\u5019\uFF0C\u7531\u4E8E\u6D88\u8D39\u8005\u7684\u8D2D\u7269\u884C\u4E3A\u6FC0\u589E\uFF0C\u4E3A\u4E86\u4FDD\u62A4\u8D2D\u7269\u7CFB\u7EDF\u7684\u7A33\u5B9A\u6027\uFF0C\u90E8\u5206\u6D88\u8D39\u8005\u53EF\u80FD\u4F1A\u88AB\u5F15\u5BFC\u5230\u4E00\u4E2A\u964D\u7EA7\u9875\u9762
                                                                    • S\uFF1A\u8F6F\u72B6\u6001

                                                                      \u8F6F\u72B6\u6001\u6307\u5141\u8BB8\u7CFB\u7EDF\u4E2D\u7684\u6570\u636E\u5B58\u5728\u4E2D\u95F4\u72B6\u6001\uFF0C\u5E76\u8BA4\u4E3A\u8BE5\u4E2D\u95F4\u72B6\u6001\u7684\u5B58\u5728\u4E0D\u4F1A\u5F71\u54CD\u7CFB\u7EDF\u7684\u6574\u4F53\u53EF\u7528\u6027\uFF0C\u5373\u5141\u8BB8\u7CFB\u7EDF\u5728\u4E0D\u540C\u8282\u70B9\u7684\u6570\u636E\u526F\u672C\u4E4B\u95F4\u8FDB\u884C\u6570\u636E\u540C\u6B65\u7684\u8FC7\u7A0B\u5B58\u5728\u5EF6\u65F6\u3002

                                                                      \u727A\u7272\u6389\u6570\u636E\u7684\u4E00\u81F4\u6027\uFF0C\u6765\u8FFD\u6C42\u53EF\u7528\u6027

                                                                    • E\uFF1A\u6700\u7EC8\u4E00\u81F4\u6027

                                                                      \u6700\u7EC8\u4E00\u81F4\u6027\u5F3A\u8C03\u7684\u662F\u7CFB\u7EDF\u4E2D\u6240\u6709\u7684\u6570\u636E\u526F\u672C\uFF0C\u5728\u7ECF\u8FC7\u4E00\u6BB5\u65F6\u95F4\u7684\u540C\u6B65\u540E\uFF0C\u6700\u7EC8\u80FD\u591F\u8FBE\u5230\u4E00\u4E2A\u4E00\u81F4\u7684\u72B6\u6001\u3002\u56E0\u6B64\uFF0C\u6700\u7EC8\u4E00\u81F4\u6027\u7684\u672C\u8D28\u662F\u9700\u8981\u7CFB\u7EDF\u4FDD\u8BC1\u6700\u7EC8\u6570\u636E\u80FD\u591F\u8FBE\u5230\u4E00\u81F4\uFF0C\u800C\u4E0D\u9700\u8981\u5B9E\u65F6\u4FDD\u8BC1\u7CFB\u7EDF\u6570\u636E\u7684\u5F3A\u4E00\u81F4\u6027\u3002

                                                                  Zookeeper\u5165\u95E8

                                                                  \u6982\u8FF0

                                                                  1. zookeeper\u662F\u4E00\u4E2A\u5F00\u6E90\u7684\u5206\u5E03\u5F0F\u7684\uFF0C\u4E3A\u5206\u5E03\u5F0F\u6846\u67B6\u63D0\u4F9B\u534F\u8C03\u670D\u52A1\u7684apache\u9879\u76EE

                                                                  2. zookeeper\u4ECE\u8BBE\u8BA1\u6A21\u5F0F\u7684\u89D2\u5EA6\u6765\u7406\u89E3\uFF1A\u662F\u4E00\u4E2A\u57FA\u4E8E\u89C2\u5BDF\u8005\u6A21\u5F0F\u8BBE\u8BA1\u7684\u5206\u5E03\u5F0F\u670D\u52A1\u7BA1\u7406\u6846\u67B6\uFF0C\u5B83\u8D1F\u8D23\u5B58\u50A8\u548C\u7BA1\u7406\u5927\u5BB6\u90FD\u5173\u5FC3\u7684\u6570\u636E\uFF08\u6BD4\u5982\u670D\u52A1\u5668\u4FE1\u606F\uFF09\uFF0C\u7136\u540E\u63A5\u53D7\u89C2\u5BDF\u8005\uFF08\u5BA2\u6237\u7AEF\uFF09\u7684\u6CE8\u518C\uFF0C\u4E00\u65E6\u8FD9\u4E9B\u6570\u636E\uFF08\u670D\u52A1\u5668\u7684\u4FE1\u606F\uFF09\u7684\u72B6\u6001\u53D1\u751F\u53D8\u5316\uFF0Czookeeper\u5C31\u5C06\u8D1F\u8D23\u901A\u77E5\u5DF2\u7ECF\u5728zookeeper\u4E0A\u6CE8\u518C\u7684\u90A3\u4E9B\u89C2\u5BDF\u8005\uFF08\u5BA2\u6237\u7AEF\uFF09\u505A\u51FA\u76F8\u5E94\u7684\u53CD\u5E94\u3002

                                                                    zookeeper\u76F8\u5F53\u4E8E\u662F\u4E00\u4E2A\u6587\u4EF6\u7CFB\u7EDF\uFF0C\u52A0\u901A\u77E5\u673A\u5236\u3002

                                                                  3. zookeeper\u672C\u8EAB\u662F\u4E00\u4E2A\u96C6\u7FA4\uFF0C\u6709\u591A\u53F0\u670D\u52A1\u5668

                                                                    image-20211003203400587

                                                                  4. zookeeper\uFF1A\u591A\u53F0\u670D\u52A1\u5668\uFF0C\u6709\u4E00\u4E2A\u9886\u5BFC\u8005Leader\uFF0C\u591A\u4E2A\u8DDF\u968F\u7740Follower\u7EC4\u6210\u7684\u96C6\u7FA4\u3002

                                                                  5. \u7279\u70B9\uFF1A

                                                                    • \u96C6\u7FA4\u4E2D\u53EA\u8981\u6709\u534A\u6570\u4EE5\u4E0A\u8282\u70B9\u5B58\u6D3B\uFF0Czookeeper\u96C6\u7FA4\u5C31\u80FD\u6B63\u5E38\u670D\u52A1\uFF0C\u6240\u4EE5zookeeper\u9002\u5408\u5B89\u88C5\u5947\u6570\u53F0\u670D\u52A1\u5668

                                                                    • \u5168\u5C40\u6570\u636E\u4E00\u81F4\uFF0C\u6BCF\u4E2Aserver\u4FDD\u5B58\u4E00\u4EFD\u76F8\u540C\u7684\u6570\u636E\u526F\u672C\uFF0CClient\u65E0\u8BBA\u8FDE\u63A5\u5230\u54EA\u4E2Aserver\uFF0C\u6570\u636E\u90FD\u662F\u4E00\u81F4\u7684\u3002

                                                                    • \u66F4\u65B0\u8BF7\u6C42\u987A\u5E8F\u6267\u884C\uFF0C\u6765\u81EA\u540C\u4E00\u4E2Aclient\u7684\u66F4\u65B0\u8BF7\u6C42\u6309\u5176\u53D1\u9001\u987A\u5E8F\u4F9D\u6B21\u6267\u884C\u3002

                                                                    • \u6570\u636E\u66F4\u65B0\u539F\u5B50\u6027\uFF0C\u4E00\u6B21\u6570\u636E\u66F4\u65B0\u8981\u4E48\u6210\u529F\uFF0C\u8981\u4E48\u5931\u8D25\u3002

                                                                    • \u5B9E\u65F6\u6027\uFF1A\u5728\u4E00\u5B9A\u65F6\u95F4\u8303\u56F4\u5185\uFF0Cclient\u80FD\u8BFB\u5230\u6700\u65B0\u6570\u636E\uFF0C\u6709\u4E00\u4E2A\u540C\u6B65\u6570\u636E\u7684\u8FC7\u7A0B

                                                                  6. zookeeper\u7684\u6570\u636E\u7ED3\u6784

                                                                    zookeeper\u7684\u6570\u636E\u6A21\u578B\u7684\u7ED3\u6784\u4E0Eunix\u6587\u4EF6\u7CFB\u7EDF\u5F88\u7C7B\u4F3C\uFF0C\u6574\u4F53\u4E0A\u53EF\u4EE5\u770B\u4F5C\u662F\u4E00\u68F5\u6811\uFF0C\u6BCF\u4E2A\u8282\u70B9\u79F0\u4F5C\u4E00\u4E2AZNode\uFF0C\u6BCF\u4E00\u4E2AZNode\u9ED8\u8BA4\u80FD\u591F\u5B58\u50A81MB\u7684\u6570\u636E\uFF0C\u6BCF\u4E2AZNode\u90FD\u53EF\u4EE5\u901A\u8FC7\u5176\u8DEF\u5F84\u552F\u4E00\u6807\u8BC6

                                                                  7. zookeeper\u5E94\u7528\u573A\u666F

                                                                    • \u7EDF\u4E00\u547D\u540D\u670D\u52A1

                                                                      \u5728\u5206\u5E03\u5F0F\u73AF\u5883\u4E0B\uFF0C\u7ECF\u5E38\u9700\u8981\u5BF9\u5E94\u7528\uFF08\u670D\u52A1\uFF09\u8FDB\u884C\u7EDF\u4E00\u547D\u540D\uFF0C\u4FBF\u4E8E\u8BC6\u522B

                                                                      \u4F8B\u5982\uFF1AIP\u4E0D\u5BB9\u6613\u8BB0\u4F4F\uFF0C\u800C\u57DF\u540D\u5BB9\u6613\u8BB0\u4F4F\u3002

                                                                      image-20211003204538685

                                                                      \u6211\u4EEC\u8BBF\u95EE\u54EA\u53F0\u670D\u52A1\u5668\uFF0Czookeeper\u4F1A\u6839\u636E\u8D1F\u8F7D\u60C5\u51B5\u8FDB\u884C\u4E00\u4E2A\u5206\u914D

                                                                    • \u7EDF\u4E00\u914D\u7F6E\u7BA1\u7406

                                                                      \u5206\u5E03\u5F0F\u73AF\u5883\u4E0B\uFF0C\u914D\u7F6E\u6587\u4EF6\u540C\u6B65\u975E\u5E38\u5E38\u89C1\uFF0C\u4E00\u822C\u8981\u6C42\u4E00\u4E2A\u96C6\u7FA4\u4E2D\uFF0C\u6240\u6709\u8282\u70B9\u7684\u914D\u7F6E\u4FE1\u606F\u662F\u4E00\u81F4\u7684\uFF0C\u6BD4\u5982kafka\u96C6\u7FA4

                                                                      \u5BF9\u914D\u7F6E\u6587\u4EF6\u4FEE\u6539\u540E\uFF0C\u5E0C\u671B\u80FD\u591F\u5FEB\u901F\u540C\u6B65\u5230\u8282\u70B9\u4E0A\u3002

                                                                      \u914D\u7F6E\u7BA1\u7406\u53EF\u4EA4\u7531zookeeper\u5B9E\u73B0

                                                                      • \u53EF\u5C06\u914D\u7F6E\u4FE1\u606F\u5199\u5165zookeeper\u4E0A\u7684\u4E00\u4E2Aznode
                                                                      • \u5404\u4E2A\u5BA2\u6237\u7AEF\u670D\u52A1\u5668\u76D1\u542C\u8FD9\u4E2Aznode
                                                                    • \u7EDF\u4E00\u96C6\u7FA4\u7BA1\u7406

                                                                      \u5206\u5E03\u5F0F\u73AF\u5883\u4E2D\uFF0C\u5B9E\u65F6\u638C\u63E1\u6BCF\u4E2A\u8282\u70B9\u7684\u72B6\u6001\u662F\u5FC5\u8981\u7684

                                                                      \u53EF\u6839\u636E\u8282\u70B9\u5B9E\u65F6\u72B6\u6001\u505A\u51FA\u4E00\u4E9B\u8C03\u6574

                                                                      • \u53EF\u5C06\u8282\u70B9\u4FE1\u606F\u5199\u5165zookeeper\u7684\u4E00\u4E2Aznode
                                                                      • \u76D1\u542C\u8FD9\u4E2Aznode\u53EF\u83B7\u53D6\u5B83\u7684\u5B9E\u65F6\u72B6\u6001\u53D8\u5316
                                                                    • \u670D\u52A1\u5668\u8282\u70B9\u52A8\u6001\u4E0A\u4E0B\u7EBF

                                                                    • \u8F6F\u8D1F\u8F7D\u5747\u8861

                                                                      image-20211003205325088

                                                                  zookeeper\u914D\u7F6E

                                                                  1. image-20211006145100475

                                                                    • tickTime = 2000\uFF0C\u901A\u4FE1\u5FC3\u8DF3\u65F6\u95F4\uFF0Czookeeper\u670D\u52A1\u5668\u4E0E\u5BA2\u6237\u7AEF\u5FC3\u8DF3\u65F6\u95F4\uFF0C\u5355\u4F4D\u6BEB\u79D2

                                                                      \u670D\u52A1\u5668\u4E0E\u670D\u52A1\u5668\u4E4B\u95F4\u4E5F\u53EF\u4EE5\u8FDB\u884C\u5FC3\u8DF3\u901A\u8BAF\uFF0C\u4E92\u76F8\u53D1\u9001\u4FE1\u53F7\u3002

                                                                      image-20211006145844714

                                                                    • initLimit = 10\uFF0C LF\u521D\u59CB\u901A\u4FE1\u65F6\u9650

                                                                      Leader\u548CFollower\u521D\u59CB\u8FDE\u63A5\u65F6\u80FD\u5BB9\u5FCD\u7684\u6700\u591A\u5FC3\u8DF3\u6570

                                                                      \u5982\u679C\u8D85\u8FC7 initLimit*tickTime\u8FD8\u6CA1\u6709\u8FDE\u63A5\u6210\u529F\u7684\u8BDD\u5C31\u8BA4\u4E3A\u8FDE\u63A5\u5931\u8D25

                                                                    • syncLimit = 5 LF\u540C\u6B65\u901A\u4FE1\u65F6\u9650

                                                                      Leader\u548CFollower\u4E4B\u95F4\u901A\u4FE1\u65F6\u95F4\u5982\u679C\u8D85\u8FC7syncLimit * tickTime\uFF0CLeader\u8BA4\u4E3AFollower\u6B7B

                                                                      \u4ECE\u670D\u52A1\u5668\u5217\u8868\u4E2D\u5220\u9664Follower

                                                                    • dataDir\uFF1A\u4FDD\u5B58zookeeper\u4E2D\u7684\u6570\u636E

                                                                      \u6CE8\u610F:\u9ED8\u8BA4\u7684tmp\u76EE\u5F55\uFF0C\u5BB9\u6613\u88ABlinux\u7CFB\u7EDF\u5B9A\u671F\u5220\u9664\uFF0C\u6240\u4EE5\u4E00\u822C\u4E0D\u4F7F\u7528\u9ED8\u8BA4\u7684tmp\u76EE\u5F55

                                                                    • clientPort=2181\uFF1A\u5BA2\u6237\u7AEF\u8FDE\u63A5\u7AEF\u53E3\uFF0C\u901A\u5E38\u4E0D\u505A\u4FEE\u6539

                                                                  2. zookeeper\u96C6\u7FA4\u6700\u5C11\u662F\u4E09\u53F0

                                                                  zookeeper\u9009\u4E3E\u673A\u5236

                                                                  1. \u7B2C\u4E00\u6B21\u542F\u52A8

                                                                    image-20211006152112242

                                                                    \u53EA\u8981\u96C6\u7FA4\u4E2D\u5DF2\u7ECF\u6709\u4E86Leader\uFF0C\u540E\u9762\u542F\u52A8\u7684\u670D\u52A1\u5668\u4E0D\u4F1A\u56E0\u4E3Amyid\u5927\u800C\u5F53\u9009Leader\uFF0C\u56E0\u4E3A\u5982\u679C\u96C6\u7FA4\u4E2D\u5DF2\u7ECF\u6709\u4E86Leader\uFF0C\u90A3\u4E48\u524D\u9762\u7684\u670D\u52A1\u5668\u90FD\u4E0D\u662FLOOKING\u72B6\u6001\uFF0C\u6240\u4EE5\u4E0D\u4F1A\u66F4\u6539\u9009\u7968\u4FE1\u606F\uFF0C\u65B0\u542F\u52A8\u7684\u670D\u52A1\u5668\u4ECD\u7136\u4F1A\u5C06\u7968\u6295\u7ED9\u81EA\u5DF1\uFF0C\u6B64\u65F6\u65B0\u542F\u52A8\u7684\u670D\u52A1\u5668\u5C31\u4F1A\u5C11\u6570\u670D\u4ECE\u591A\u6570\uFF0C\u66F4\u6539\u9009\u7968\u4FE1\u606F\u4F1A\u4E4B\u524D\u7684Leader\u670D\u52A1\u5668

                                                                  2. \u76F8\u5173\u6982\u5FF5\uFF1A

                                                                    image-20211006152451588

                                                                  3. \u975E\u7B2C\u4E00\u6B21\u542F\u52A8

                                                                    image-20211006153042844

                                                                  zookeeper\u8282\u70B9\u7C7B\u578B

                                                                  1. \u6301\u4E45\uFF1A\u5BA2\u6237\u7AEF\u548C\u670D\u52A1\u5668\u7AEF\u65AD\u5F00\u8FDE\u63A5\u540E\uFF0C\u521B\u5EFA\u7684\u8282\u70B9\u4E0D\u5220\u9664

                                                                    \u77ED\u6682\uFF1A\u5BA2\u6237\u7AEF\u548C\u670D\u52A1\u5668\u7AEF\u65AD\u5F00\u8FDE\u63A5\u540E\uFF0C\u521B\u5EFA\u7684\u8282\u70B9\u81EA\u5DF1\u5220\u9664

                                                                  2. \u5E26\u5E8F\u53F7\uFF1A\u521B\u5EFAznode\u65F6\u8BBE\u7F6E\u987A\u5E8F\u6807\u8BC6\uFF0Cznode\u540D\u79F0\u540E\u4F1A\u9644\u52A0\u4E00\u4E2A\u503C\uFF0C\u987A\u5E8F\u53F7\u662F\u4E00\u4E2A\u5355\u8C03\u9012\u589E\u7684\u8BA1\u6570\u5668\uFF0C\u7531\u7236\u8282\u70B9\u7EF4\u62A4

                                                                    \u6CE8\u610F\uFF1A\u5728\u5206\u5E03\u5F0F\u7CFB\u7EDF\u4E2D\uFF0C\u987A\u5E8F\u53F7\u53EF\u4EE5\u88AB\u7528\u4E8E\u4E3A\u6240\u6709\u7684\u4E8B\u4EF6\u8FDB\u884C\u5168\u5C40\u6392\u5E8F\uFF0C\u8FD9\u6837\u5BA2\u6237\u7AEF\u53EF\u4EE5\u901A\u8FC7\u987A\u5E8F\u53F7\u63A8\u65AD\u4E8B\u4EF6\u7684\u987A\u5E8F

                                                                  zookeeper\u76D1\u542C\u5668\u539F\u7406

                                                                  1. \u5C06zookeeper\u5BA2\u6237\u7AEF\u53BB\u670D\u52A1\u5668\u7AEF\u8FDB\u884C\u6CE8\u518C\uFF0C\u6CE8\u518C\u8BF4\u8981\u76D1\u542C\u54EA\u4E00\u4E2A\u8282\u70B9\u6570\u636E\u7684\u53D8\u5316\uFF0Czookeeper\u670D\u52A1\u5668\u7AEF\u7684\u5BF9\u5E94\u8282\u70B9\u6570\u636E\u5982\u679C\u53D1\u751F\u53D8\u5316\u4E86\uFF0C\u5C31\u4F1A\u901A\u77E5\u5BA2\u6237\u7AEF\uFF0C\u8FD9\u5C31\u662F\u8FD9\u4E2A\u8FC7\u7A0B\u3002

                                                                  2. \u76D1\u542C\u5668\u539F\u7406

                                                                    • \u9996\u5148\u8981\u6709\u4E00\u4E2Amain()\u7EBF\u7A0B
                                                                    • \u5728main\u7EBF\u7A0B\u4E2D\u521B\u5EFAzookeeper\u5BA2\u6237\u7AEF\uFF0C\u8FD9\u65F6\u5C31\u4F1A\u521B\u5EFA\u4E24\u4E2A\u7EBF\u7A0B\uFF0C\u4E00\u4E2A\u8D1F\u8D23\u7F51\u7EDC\u901A\u4FE1\uFF08connect\uFF09\uFF0C\u4E00\u4E2A\u8D1F\u8D23\u76D1\u542C\uFF08listener\uFF09
                                                                    • \u901A\u8FC7connect\u7EBF\u7A0B\u5C06\u6CE8\u518C\u7684\u76D1\u542C\u4E8B\u4EF6\u53D1\u9001\u7ED9zookeeper\u670D\u52A1\u5668
                                                                    • \u5728zookeeper\u670D\u52A1\u5668\u7684\u6CE8\u518C\u76D1\u542C\u5668\u5217\u8868\u4E2D\u5C06\u6CE8\u518C\u7684\u76D1\u542C\u4E8B\u4EF6\u6DFB\u52A0\u5230\u5217\u8868\u4E2D
                                                                    • zookeeper\u670D\u52A1\u5668\u76D1\u542C\u5230\u6709\u6570\u636E\u6216\u8DEF\u5F84\u53D8\u5316\uFF0C\u5C31\u4F1A\u5C06\u8FD9\u4E2A\u6D88\u606F\u53D1\u9001\u7ED9listener\u7EBF\u7A0B
                                                                  3. \u5E38\u89C1\u7684\u76D1\u542C

                                                                    • \u76D1\u542C\u8282\u70B9\u6570\u636E\u7684\u53D8\u5316

                                                                      get path [watch]

                                                                      \u6CE8\u518C\u4E00\u6B21\uFF0C\u53EA\u80FD\u76D1\u542C\u4E00\u6B21\uFF0C\u60F3\u518D\u6B21\u76D1\u542C\uFF0C\u9700\u8981\u518D\u6B21\u6CE8\u518C

                                                                    • \u76D1\u542C\u5B50\u8282\u70B9\u589E\u51CF\u7684\u53D8\u5316

                                                                      ls path [watch]

                                                                      \u6CE8\u518C\u4E00\u6B21\uFF0C\u53EA\u80FD\u76D1\u542C\u4E00\u6B21\uFF0C\u60F3\u518D\u6B21\u76D1\u542C\uFF0C\u9700\u8981\u518D\u6B21\u6CE8\u518C

                                                                  \u5BA2\u6237\u7AEF\u5411\u670D\u52A1\u5668\u7AEF\u5199\u6570\u636E\u6D41\u7A0B

                                                                  1. \u5982\u679C\u5BA2\u6237\u7AEF\u76F4\u63A5\u8BBF\u95EELeader

                                                                    image-20211006171214463

                                                                    \u53EA\u8981\u6709\u534A\u6570\u7684\u8282\u70B9\u8BA4\u4E3A\u5DF2\u7ECF\u5199\u5B8C\u4E86\uFF0C\u90A3\u4E48Leader\u5C31\u4F1A\u544A\u8BC9\u5BA2\u6237\u7AEF\u5373\u53D1\u9001\u7ED9\u5BA2\u6237\u7AEF\u786E\u8BA4ack\uFF0C\u8BF4\u5DF2\u7ECF\u5199\u5B8C\u4E86\u3002

                                                                  2. \u5982\u679C\u5BA2\u6237\u7AEF\u7684\u5199\u5165\u8BF7\u6C42\u53D1\u9001\u7ED9follower\u8282\u70B9

                                                                    \u88AB\u8BBF\u95EE\u7684follower\u4F1A\u628A\u5199\u8BF7\u6C42\u53D1\u9001\u7ED9leader\uFF0Cleader\u6765\u5904\u7406\u5E76\u5199\u6570\u636E\uFF0C\u81EA\u5DF1\u5148\u5199\u4E00\u4EFD\uFF0C\u5E76\u4E14\u53D1\u5199\u547D\u4EE4\u7ED9follower\u8282\u70B9\uFF0Cfollower\u9700\u8981\u5199\u5E76\u4E14\u518D\u53D1\u9001ack\u7ED9leader\uFF0C\u8D85\u8FC7\u534A\u6570\u4EE5\u4E0A\u8282\u70B9\u8BA4\u4E3A\u5199\u5B8C\uFF0C\u90A3\u4E48leader\u4F1A\u518D\u53D1ack\u7ED9\u5BA2\u6237\u7AEF\u8BBF\u95EE\u7684follower\u8282\u70B9\uFF0C\u88AB\u8BBF\u95EE\u7684follower\u8282\u70B9\u7ED9\u5BA2\u6237\u7AEF\u53D1ack

                                                                    image-20211006171630741

                                                                  \u670D\u52A1\u5668\u52A8\u6001\u4E0A\u4E0B\u7EBF\u76D1\u542C

                                                                  1. \u670D\u52A1\u5668\u542F\u52A8\u65F6\u53BB\u6CE8\u518C\u4FE1\u606F\uFF08\u521B\u5EFA\u90FD\u662F\u4E34\u65F6\uFF09\uFF0C\u5728zookeeper\u4E0A\u521B\u5EFA\u5BF9\u5E94\u7684\u8282\u70B9

                                                                  2. \u5BA2\u6237\u7AEF\u83B7\u53D6\u5230\u5F53\u524D\u5728\u7EBF\u670D\u52A1\u5668\u5217\u8868\uFF0C\u5E76\u4E14\u6CE8\u518C\u76D1\u542C\uFF0C\u5C31\u662F\u76D1\u542C\u5668\u539F\u7406

                                                                  \u8FD9\u91CC\u8BF4\u7684\u670D\u52A1\u5668\u548C\u5BA2\u6237\u7AEF\u5BF9\u4E8Ezookeeper\u96C6\u7FA4\u6765\u8BF4\u90FD\u662F\u5BA2\u6237\u7AEF\uFF0C\u53EA\u4E0D\u8FC7\u670D\u52A1\u5668\u53BB\u8C03\u7684zookeeper\u7684\u521B\u5EFA\u8282\u70B9\u65B9\u6CD5\uFF0C\u5BA2\u6237\u7AEF\u53BB\u76D1\u542C

                                                                  \u5206\u5E03\u5F0F\u9501

                                                                  \u539F\u751Fzookeeper\u5B9E\u73B0\u5206\u5E03\u5F0F\u9501\u65B9\u6CD5

                                                                  1. \u4EC0\u4E48\u53EB\u5206\u5E03\u5F0F\u9501

                                                                    \u6BD4\u5982\u8BF4\u8FDB\u7A0B1\u5728\u4F7F\u7528\u8BE5\u8D44\u6E90\u7684\u9002\u5408\uFF0C\u4F1A\u5148\u53BB\u83B7\u5F97\u9501\uFF0C\u8FDB\u7A0B1\u83B7\u5F97\u9501\u4EE5\u540E\u4F1A\u5BF9\u8BE5\u8D44\u6E90\u4FDD\u6301\u72EC\u5360\uFF0C\u8FD9\u6837\u5176\u4ED6\u8FDB\u7A0B\u5C31\u65E0\u6CD5\u8BBF\u95EE\u8BE5\u8D44\u6E90\uFF0C\u8FDB\u7A0B1\u7528\u5B8C\u8BE5\u8D44\u6E90\u4EE5\u540E\u5C31\u5C06\u9501\u91CA\u653E\u6389\uFF0C\u8BA9\u5176\u4ED6\u8FDB\u7A0B\u6765\u83B7\u5F97\u9501\uFF0C\u90A3\u4E48\u901A\u8FC7\u8FD9\u4E2A\u9501\u673A\u5236\uFF0C\u6211\u4EEC\u5C31\u4FDD\u8BC1\u4E86\u5206\u5E03\u5F0F\u7CFB\u7EDF\u4E2D\u591A\u4E2A\u8FDB\u7A0B\u80FD\u591F\u6709\u5E8F\u5730\u8BBF\u95EE\u8BE5\u4E34\u754C\u8D44\u6E90\uFF0C\u6211\u4EEC\u628A\u8FD9\u4E2A\u5206\u5E03\u5F0F\u73AF\u5883\u4E0B\u7684\u9501\u53EB\u505A\u5206\u5E03\u5F0F\u9501\u3002

                                                                  2. \u6B65\u9AA4\uFF1A

                                                                    • \u5728/lock\u76EE\u5F55\u4E0B\uFF0C\u521B\u5EFA\u4E34\u65F6\u987A\u5E8F\u8282\u70B9\uFF0C\u5E8F\u53F7\u6700\u5C0F\u7684\u8282\u70B9\u53EF\u4EE5\u83B7\u5F97\u9501\uFF0C\u5904\u7406\u4E1A\u52A1

                                                                    • \u8282\u70B9\u9700\u8981\u5224\u65AD\u81EA\u5DF1\u662F\u4E0D\u662F\u5F53\u524D\u8282\u70B9\u4E0B\u5E8F\u53F7\u6700\u5C0F\u7684\u8282\u70B9\uFF0C\u5982\u679C\u662F\uFF0C\u83B7\u53D6\u5230\u9501\uFF0C\u5982\u679C\u4E0D\u662F\uFF0C\u5BF9\u524D\u4E00\u4E2A\u8282\u70B9\u8FDB\u884C\u76D1\u542C\uFF0C\u76D1\u542C\u8FD9\u4E00\u6B65\u5F88\u91CD\u8981\uFF0C\u56E0\u4E3A\u5C31\u662F\u8981\u76D1\u542C\u5230\u524D\u4E00\u4E2A\u8282\u70B9\u7684\u91CA\u653E\u4E5F\u5C31\u662F\u5220\u9664\uFF0C\u6211\u4EEC\u81EA\u5DF1\u5199\u7684\u4E0A\u9501\u8FD9\u4E2A\u8FC7\u7A0B\u624D\u80FD\u5B8C\u6210\uFF01\u5426\u5219\u524D\u4E00\u4E2A\u8282\u70B9\u6CA1\u6709\u91CA\u653E\uFF0C\u5373\u6CA1\u6709\u5220\u9664\uFF0C\u5F53\u524D\u8282\u70B9\u6C38\u8FDC\u4E0D\u53EF\u80FD\u5B8C\u6210\u4E0A\u9501\uFF0C\u8FD9\u91CC\u8981\u901A\u8FC7\u4EE3\u7801\u5B9E\u73B0\uFF0C\u53EF\u4EE5\u901A\u8FC7CountDownLatch\u5B9E\u73B0\uFF0C\u5F53\u6CA1\u6709\u76D1\u542C\u5230\u524D\u4E00\u4E2A\u7ED3\u70B9\u5220\u9664\u7684\u9002\u5408\uFF0C\u4E00\u76F4\u9501\u4F4F\uFF0C\u76D1\u542C\u5230\u524D\u4E00\u4E2A\u8282\u70B9\u5220\u9664\u4E86\uFF0C\u901A\u8FC7CountDownLatch\u91CA\u653E\u9501\uFF0C\u6211\u4EEC\u81EA\u5DF1\u4E0A\u9501\u7684\u4EE3\u7801\u624D\u5B8C\u6210\u3002

                                                                      \u6211\u4EEC\u81EA\u5DF1\u5199\u7684\u4E0A\u9501\u8FD9\u4E2A\u65B9\u6CD5\uFF0C \u53EF\u4EE5\u901A\u8FC7CountDownLatch\u6765\u63A7\u5236\u6D41\u7A0B\uFF0C\u901A\u8FC7CountDownLatch\u7684\u91CA\u653E\u9501\u6765\u4F7F\u6211\u4EEC\u7684\u65B9\u6CD5\u6267\u884C\u5B8C\u6210\u3002\u4E24\u8005\u4E0D\u8981\u641E\u6DF7\u3002

                                                                    • \u83B7\u53D6\u5230\u9501\uFF0C\u5904\u7406\u5B8C\u4E1A\u52A1\u540E\uFF0Cdelete\u8282\u70B9\u91CA\u653E\u9501\uFF0C\u7136\u540E\u4E0B\u9762\u7684\u8282\u70B9\u5C06\u63A5\u6536\u5230\u901A\u77E5\uFF0C\u91CD\u590D\u7B2C\u4E8C\u6B65\u5224\u65AD\u3002

                                                                    image-20211006180545474

                                                                  \u6210\u719F\u7684Curator\u6846\u67B6\u5B9E\u73B0\u5206\u5E03\u5F0F\u9501

                                                                  1. \u539F\u751F\u5730\u901A\u8FC7zookeeper\u548CJavaAPI\u5B9E\u73B0\u5206\u5E03\u5F0F\u9501\u5B58\u5728\u7684\u95EE\u9898
                                                                    • \u4F1A\u8BDD\u8FDE\u63A5\u662F\u5F02\u6B65\u7684\uFF0C\u9700\u8981\u81EA\u5DF1\u53BB\u5904\u7406\uFF0C\u6BD4\u5982\u4F7F\u7528CountDownLatch
                                                                    • watch\u9700\u8981\u91CD\u590D\u6CE8\u518C\uFF0C\u4E0D\u7136\u5C31\u4E0D\u80FD\u751F\u6548
                                                                    • \u4E0D\u652F\u6301\u591A\u8282\u70B9\u7684\u521B\u5EFA\u548C\u5220\u9664\uFF0C\u9700\u8981\u81EA\u5DF1\u53BB\u9012\u5F52
                                                                  2. Curator\u662F\u4E00\u4E2A\u4E13\u95E8\u89E3\u51B3\u5206\u5E03\u5F0F\u9501\u7684\u6846\u67B6\uFF0C\u89E3\u51B3\u4E86\u539F\u751FJavaAPI\u5F00\u53D1\u5206\u5E03\u5F0F\u9047\u5230\u7684\u95EE\u9898
                                                                  ',29);function k(m,z){return u}var _=e(c,[["render",k],["__file","zookeeper.html.vue"]]);export{_ as default}; +import{_ as e,e as p}from"./app.f8791b52.js";var i="/study/assets/image-20211003203400587.b108c9ef.png",r="/study/assets/image-20211003204538685.9d62abb7.png",o="/study/assets/image-20211003205325088.0fd3638c.png",l="/study/assets/image-20211006145100475.5bea220f.png",a="/study/assets/image-20211006145844714.a6afcaf6.png",t="/study/assets/image-20211006152112242.ddc9635a.png",s="/study/assets/image-20211006152451588.72a8b6d1.png",n="/study/assets/image-20211006153042844.9cc3144b.png",d="/study/assets/image-20211006171214463.6906b50c.png",g="/study/assets/image-20211006171630741.ad2d506e.png",h="/study/assets/image-20211006180545474.37480f29.png";const c={},u=p('

                                                                  zookeeper

                                                                  \u6982\u8FF0

                                                                  1. \u5206\u5E03\u5F0F\uFF1A\u7531\u591A\u53F0\u670D\u52A1\u5668\u5171\u540C\u5B8C\u6210\u4E00\u4EF6\u6BD4\u8F83\u590D\u6742\u7684\u4E8B\uFF0C\u53EF\u4EE5\u7406\u89E3\u4E3A\u5206\u5E03\u5F0F

                                                                    \u5177\u4F53\u8BF4\uFF1A\u8BBE\u8BA1\u7F51\u7AD9\u53EF\u6269\u5C55\u67B6\u6784\u7684\u6838\u5FC3\u601D\u60F3\u662F\u6A21\u5757\u5316\uFF0C\u5E76\u5728\u6B64\u57FA\u7840\u4E0A\uFF0C\u964D\u4F4E\u6A21\u5757\u95F4\u7684\u8026\u5408\u6027\uFF0C\u63D0\u9AD8\u6A21\u5757\u7684\u590D\u7528\u6027\u3002

                                                                    \u6240\u8C13\u5206\u5E03\u5F0F\u4E1A\u52A1\u7CFB\u7EDF\uFF0C\u5C31\u662F\u628A\u539F\u6765\u4E00\u4E2A\u5927\u5757\u7CFB\u7EDF\uFF0C\u6839\u636E\u529F\u80FD\uFF0C\u62C6\u5206\u6210\u591A\u4E2A\u72EC\u7ACB\u7684\u5B50\u7CFB\u7EDF\uFF0C\u8FD9\u4E9B\u72EC\u7ACB\u7684\u5B50\u7CFB\u7EDF\uFF08\u6A21\u5757\uFF09\u90E8\u7F72\u5728\u72EC\u7ACB\u7684\u670D\u52A1\u5668\uFF08\u96C6\u7FA4\u4E0A\uFF09\uFF0C\u4ECE\u7269\u7406\u4E0A\u89E3\u8026\u5408\u8FD9\u4E9B\u6A21\u5757\u4E4B\u95F4\u7684\u5173\u7CFB\uFF0C\u964D\u4F4E\u6A21\u5757\u4E4B\u95F4\u7684\u8026\u5408\u5EA6\uFF0C\u63D0\u9AD8\u6A21\u5757\u7684\u590D\u7528\u6027\u3002

                                                                    \u8FD9\u4E9B\u5B50\u6A21\u5757\u6216\u8005\u8BF4\u5B50\u7CFB\u7EDF\u901A\u8FC7\u6D88\u606F\u4F20\u9012\u4EE5\u53CA\u4F9D\u8D56\u8C03\u7528\u7684\u65B9\u5F0F\u805A\u5408\u6210\u4E00\u4E2A\u5B8C\u6574\u7684\u7CFB\u7EDF\u3002

                                                                  2. \u4EC0\u4E48\u662F\u96C6\u7FA4

                                                                    \u96C6\u7FA4\uFF08cluster\uFF09\u662F**\u4E00\u7EC4\uFF08\u5373\u591A\u4E2A\uFF09**\u8BA1\u7B97\u673A\u3001\u670D\u52A1\u5668\uFF0C\u4ED6\u4EEC\u4F5C\u4E3A\u4E00\u4E2A\u6574\u4F53\u5411\u7528\u6237\u63D0\u4F9B\u4E00\u7EC4\u7F51\u7EDC\u8D44\u6E90\uFF0C\u8FD9\u4E9B\u5355\u4E2A\u7684\u8BA1\u7B97\u673A\u6216\u8005\u670D\u52A1\u5668\u5C31\u662F\u96C6\u7FA4\u7684\u8282\u70B9\u3002

                                                                  3. \u5206\u5E03\u5F0F\u548C\u96C6\u7FA4\u7684\u533A\u522B\u662F\u4EC0\u4E48\uFF1F

                                                                    \u96C6\u7FA4\u662F\u4E2A\u7269\u7406\u5F62\u6001\uFF0C\u5206\u5E03\u5F0F\u662F\u4E2A\u5DE5\u4F5C\u65B9\u5F0F\uFF0C\u4E5F\u53EF\u4EE5\u7406\u89E3\u4E3A\u4E00\u79CD\u601D\u60F3\u3002

                                                                    \u5206\u5E03\u5F0F\uFF1A\u5C06\u4E00\u4E2A\u4E1A\u52A1\u62C6\u5206\u6210\u591A\u4E2A\u5B50\u4E1A\u52A1\uFF0C\u6BCF\u4E2A\u4E1A\u52A1\u90E8\u7F72\u5728\u4E0D\u540C\u7684\u670D\u52A1\u5668\u4E0A

                                                                    \u96C6\u7FA4\uFF1A\u591A\u4E2A\u4E0D\u540C\u7684\u670D\u52A1\u5668\u5408\u8D77\u6765\u6784\u6210\u4E00\u4E2Acluster\uFF0C\u5E76\u4F5C\u4E3A\u4E00\u4E2A\u6574\u4F53\u5B8C\u6210\u4E1A\u52A1\u3002

                                                                  \u5206\u5E03\u5F0F\u7406\u8BBA

                                                                  CAP

                                                                  1. \u6982\u8FF0

                                                                    \u5F53\u6211\u4EEC\u7684\u5355\u4E2A\u6570\u636E\u5E93\u7684\u6027\u80FD\u4EA7\u751F\u74F6\u9888\u7684\u65F6\u5019\uFF0C\u6211\u4EEC\u53EF\u80FD\u4F1A\u5BF9\u6570\u636E\u5E93\u8FDB\u884C\u5206\u533A\uFF0C\u8FD9\u91CC\u6240\u8BF4\u7684\u5206\u533A\u662F\u6307\u7269\u7406\u5206\u533A\uFF0C\u5206\u533A\u4E4B\u540E\u53EF\u80FD\u4E0D\u540C\u7684\u5E93\u5C31\u5904\u4E8E\u4E0D\u540C\u7684\u670D\u52A1\u5668\u4E0A\u4E86\uFF0C\u4E5F\u53EF\u4EE5\u7406\u89E3\u6210\u5206\u5E93\uFF0C\u5206\u5E93\u5206\u533A\u662F\u4E00\u4E2A\u610F\u601D\uFF0C\u8FD9\u4E2A\u65F6\u5019\u5355\u4E2A\u6570\u636E\u5E93\u7684ACID\u5DF2\u7ECF\u4E0D\u80FD\u9002\u5E94\u8FD9\u79CD\u60C5\u51B5\u4E86\uFF0C\u800C\u5728\u8FD9\u79CD\u96C6\u7FA4\u73AF\u5883\u4E0B\uFF0C\u518D\u60F3\u4FDD\u8BC1\u8FDB\u7FA4\u7684ACID\u51E0\u4E4E\u662F\u5F88\u96BE\u8FBE\u5230\uFF0C\u6216\u8005\u5373\u4F7F\u80FD\u8FBE\u5230\uFF0C\u90A3\u4E48\u6027\u80FD\u548C\u6548\u7387\u4E5F\u4F1A\u5927\u5E45\u5EA6\u4E0B\u964D\uFF0C\u8FD9\u4E2A\u65F6\u5019\u5982\u679C\u518D\u8FFD\u6C42\u96C6\u7FA4\u7684ACID\u4F1A\u5BFC\u81F4\u6211\u4EEC\u7684\u7CFB\u7EDF\u53D8\u5F97\u5F88\u5DEE\uFF0C\u6B64\u65F6\u6211\u4EEC\u5C31\u9700\u8981\u5F15\u5165\u4E00\u4E2A\u65B0\u7684\u7406\u8BBA\u539F\u5219\u6765\u9002\u5E94\u8FD9\u79CD\u96C6\u7FA4\u7684\u60C5\u51B5\uFF0C\u5C31\u662FCAP\u539F\u7406

                                                                  2. CAP\u539F\u7406\u53C8\u88AB\u79F0\u4F5C\u5E03\u9C81\u5C14\u5B9A\u7406\uFF0C\u5B83\u6307\u51FA\u5BF9\u4E8E\u4E00\u4E2A\u5206\u5E03\u5F0F\u7CFB\u7EDF\u6765\u8BF4\uFF0C\u4E0D\u80FD\u540C\u65F6\u6EE1\u8DB3\u4EE5\u4E0B\u4E09\u70B9\uFF1A\uFF08CAP\u539F\u7406\u9488\u5BF9\u7684\u662F\u5206\u5E03\u5F0F\u7CFB\u7EDF\uFF0C\u800CACID\u9488\u5BF9\u7684\u662F\u6301\u4E45\u5316\u6570\u636E\u5E93\uFF09

                                                                    • \u4E00\u81F4\u6027\uFF08Consistence\uFF09

                                                                      \u4E00\u81F4\u6027\u6307\u7684\u662F\u591A\u4E2A\u6570\u636E\u526F\u672C\u662F\u5426\u80FD\u4FDD\u6301\u4E00\u81F4\u7684\u7279\u6027\uFF0C\u5728\u4E00\u81F4\u6027\u7684\u6761\u4EF6\u4E0B\uFF0C\u7CFB\u7EDF\u5728\u6267\u884C\u6570\u636E\u66F4\u65B0\u64CD\u4F5C\u4E4B\u540E\u80FD\u591F\u4ECE\u4E00\u81F4\u6027\u72B6\u6001\u8F6C\u79FB\u5230\u53E6\u4E00\u4E2A\u4E00\u81F4\u6027\u72B6\u6001

                                                                    • \u53EF\u7528\u6027\uFF08Availability\uFF09

                                                                      \u53EF\u7528\u6027\u6307\u7684\u662F\u5206\u5E03\u5F0F\u7CFB\u7EDF\u5728\u9762\u5BF9\u5404\u79CD\u5F02\u5E38\u65F6\u53EF\u4EE5\u63D0\u4F9B\u6B63\u5E38\u670D\u52A1\u7684\u80FD\u529B

                                                                      \u5728\u53EF\u7528\u6027\u6761\u4EF6\u4E0B\uFF0C\u8981\u6C42\u7CFB\u7EDF\u63D0\u4F9B\u7684\u670D\u52A1\u4E00\u76F4\u5904\u4E8E\u53EF\u7528\u7684\u72B6\u6001\uFF0C\u5BF9\u4E8E\u7528\u6237\u7684\u6BCF\u4E00\u4E2A\u64CD\u4F5C\u8BF7\u6C42\u603B\u662F\u80FD\u591F\u5728\u6709\u9650\u7684\u65F6\u95F4\u5185\u8FD4\u56DE\u7ED3\u679C\u3002

                                                                    • \u5206\u533A\u5BB9\u9519\u6027\uFF08Partition tolerance\uFF09

                                                                      \u7F51\u7EDC\u5206\u533A\u662F\u6307\u5206\u5E03\u5F0F\u7CFB\u7EDF\u4E2D\u7684\u8282\u70B9\uFF0C\u88AB\u5212\u5206\u4E3A\u591A\u4E2A\u533A\u57DF\uFF0C\u6BCF\u4E2A\u533A\u57DF\u5185\u90E8\u53EF\u4EE5\u901A\u4FE1\uFF0C\u4F46\u662F\u533A\u57DF\u4E4B\u95F4\u65E0\u6CD5\u901A\u4FE1

                                                                      \u5728\u5206\u533A\u5BB9\u5FCD\u6027\u6761\u4EF6\u4E0B\uFF0C\u5206\u5E03\u5F0F\u7CFB\u7EDF\u5728\u9047\u5230\u4EFB\u4F55\u7F51\u7EDC\u5206\u533A\u6545\u969C\u7684\u65F6\u5019\u4ECD\u7136\u9700\u8981\u80FD\u5BF9\u5916\u63D0\u4F9B\u4E00\u81F4\u6027\u548C\u53EF\u7528\u6027\u7684\u670D\u52A1\uFF0C\u9664\u975E\u662F\u6574\u4E2A\u7F51\u7EDC\u73AF\u5883\u90FD\u53D1\u751F\u4E86\u6545\u969C\u3002

                                                                  3. CAP\u4EC5\u9002\u7528\u4E8E\u539F\u5B50\u8BFB\u5199\u7684NOSQL\u573A\u666F\u4E2D\uFF0C\u5E76\u4E0D\u9002\u7528\u4E8E\u6570\u636E\u5E93\u7CFB\u7EDF\uFF0C\u73B0\u5728\u7684\u5206\u5E03\u5F0F\u7CFB\u7EDF\u5177\u6709\u66F4\u591A\u7279\u6027\uFF0C\u6BD4\u5982\u6269\u5C55\u6027\u3001\u53EF\u7528\u6027\u7B49\u7B49\uFF0C\u5728\u8FDB\u884C\u5206\u5E03\u5F0F\u7CFB\u7EDF\u642D\u5EFA\u6216\u8005\u5F00\u53D1\u7684\u65F6\u5019\uFF0C\u6211\u4EEC\u4E0D\u5E94\u8BE5\u4EC5\u4EC5\u5C40\u9650\u4E8ECAP\u7279\u6027\u4E0A\u3002

                                                                    \u5206\u533A\u5BB9\u9519\u6027\uFF08Partition tolerance\uFF09\u6211\u4EEC\u662F\u5FC5\u987B\u8981\u5B9E\u73B0\u7684\u3002

                                                                  BASE\u7406\u8BBA

                                                                  1. \u5728\u5206\u5E03\u5F0F\u7CFB\u7EDF\u4E2D\uFF0C\u6211\u4EEC\u5F80\u5F80\u8FFD\u6C42\u7684\u662F\u53EF\u7528\u6027\u3002Redis\u662FCP,\u4E5F\u5C31\u662F\u4E00\u81F4\u6027\u548C\u5206\u533A\u5BB9\u9519\u6027

                                                                  2. BASE\u7406\u8BBA\u662F\u5BF9CAP\u7406\u8BBA\u7684\u8FDB\u4E00\u6B65\u6269\u5145

                                                                    BA\uFF1A\u662F\u6307\u57FA\u672C\u53EF\u7528\uFF0CBasically Available\uFF08\u57FA\u672C\u53EF\u7528\uFF09

                                                                    S\uFF1ASoft-state\uFF08\u8F6F\u72B6\u6001\uFF09

                                                                    E\uFF1AEventually Consistent\uFF08\u6700\u7EC8\u4E00\u81F4\u6027\uFF09

                                                                  3. BASE\u7406\u8BBA\u7684\u6838\u5FC3\u601D\u60F3\uFF1A

                                                                    \uFF08Redis\u662FCP\uFF0C\u662F\u4E00\u81F4\u6027\u548C\u5206\u533A\u5BB9\u9519\u6027\uFF09\uFF0C\u800C\u6211\u4EEC\u5728\u8BBE\u8BA1\u5206\u5E03\u5F0F\u7CFB\u7EDF\u4E2D\uFF0C\u5F80\u5F80\u66F4\u52A0\u8FFD\u6C42\u4E00\u4E9B\u5176\u4ED6\u7684\u7279\u6027\uFF0C\u6BD4\u5982\u8BF4\u6269\u5C55\u6027\uFF0C\u53EF\u7528\u6027\uFF0C\u4E0D\u5E94\u8BE5\u53EA\u662F\u5C40\u9650\u4E8ECAP\uFF0C\u6240\u4EE5BASE\u7406\u8BBA\u4F5C\u4E3ACAP\u7406\u8BBA\u7684\u6269\u5C55\uFF0C\u6765\u6EE1\u8DB3\u6211\u4EEC\u5BF9\u5206\u5E03\u5F0F\u7CFB\u7EDF\u7684\u8BBE\u8BA1\u7406\u8BBA

                                                                    \u6838\u5FC3\u601D\u60F3\uFF1A

                                                                    \u727A\u7272\u6570\u636E\u7684\u4E00\u81F4\u6027\u6765\u6EE1\u8DB3\u7CFB\u7EDF\u7684\u9AD8\u53EF\u7528\u6027\uFF0C\u7CFB\u7EDF\u4E2D\u4E00\u90E8\u5206\u6570\u636E\u4E0D\u53EF\u7528\u6216\u4E0D\u4E00\u81F4\u65F6\uFF0C\u4ECD\u9700\u8981\u4FDD\u6301\u7CFB\u7EDF\u6574\u4F53\u662F\u4E3B\u8981\u53EF\u7528\u7684\u3002

                                                                    \u4ECE\u8FD9\u91CC\u4E5F\u53EF\u4EE5\u770B\u51FA\u8FD9\u79CD\u573A\u666F\uFF0C\u5BF9\u4E8E\u6570\u636E\u6765\u8BF4\uFF0C\u4E0D\u662F\u5F3A\u4E00\u81F4\u6027\u7684\uFF08\u56E0\u4E3A\u6211\u4EEC\u8FFD\u6C42\u9AD8\u53EF\u7528\uFF0C\u800C\u53EF\u7528\u6027\u548C\u4E00\u81F4\u6027\u5728CAP\u539F\u7406\u4E0B\u65E0\u6CD5\u5E76\u5B58\uFF0C\u90A3\u4E48\u5728\u8FFD\u6C42\u53EF\u7528\u6027\u7684\u540C\u65F6\uFF0C\u5C31\u727A\u7272\u6389\u4E00\u81F4\u6027\uFF09\uFF0C\u4F53\u73B0\u5728\u8F6F\u72B6\u6001\u3002

                                                                    \u9488\u5BF9\u6570\u636E\u5E93\u9886\u57DF\uFF0CBASE\u601D\u60F3\u7684\u4E3B\u8981\u5B9E\u73B0\u662F\u5BF9\u4E1A\u52A1\u6570\u636E\u8FDB\u884C\u62C6\u5206\uFF0C\u4E0D\u540C\u6570\u636E\u5206\u5E03\u5728\u4E0D\u540C\u7684\u673A\u5668\u4E0A\uFF0C\u4EE5\u63D0\u5347\u7CFB\u7EDF\u7684\u53EF\u7528\u6027\u3002\uFF08\u53EF\u4EE5\u901A\u8FC7\u6309\u7167\u4E1A\u52A1\u529F\u80FD\u5212\u5206\u3001\u4E5F\u53EF\u4EE5\u901A\u8FC7\u5206\u7247\u7684\u5F62\u5F0F\uFF0C\u8BA9\u6570\u636E\u6563\u5E03\u5728\u4E0D\u540C\u7684\u670D\u52A1\u5668\u4E0A\u3002\uFF09

                                                                  4. BASE\u7406\u8BBA\u4E09\u8981\u7D20

                                                                    • BA\uFF1A\u57FA\u672C\u53EF\u7528

                                                                      \u57FA\u672C\u53EF\u7528\u662F\u6307\u5206\u5E03\u5F0F\u7CFB\u7EDF\u5728\u51FA\u73B0\u4E0D\u53EF\u9884\u77E5\u6545\u969C\u7684\u65F6\u5019\uFF0C\u5141\u8BB8\u635F\u5931\u90E8\u5206\u53EF\u7528\u6027\u3002\u4F46\u662F\uFF0C\u8FD9\u7EDD\u4E0D\u7B49\u4EF7\u4E8E\u7CFB\u7EDF\u4E0D\u53EF\u7528\u3002

                                                                      • \u54CD\u5E94\u65F6\u95F4\u4E0A\u7684\u635F\u5931:\u6B63\u5E38\u60C5\u51B5\u4E0B\uFF0C\u4E00\u4E2A\u5728\u7EBF\u641C\u7D22\u5F15\u64CE\u9700\u8981\u57280.5\u79D2\u4E4B\u5185\u8FD4\u56DE\u7ED9\u7528\u6237\u76F8\u5E94\u7684\u67E5\u8BE2\u7ED3\u679C\uFF0C\u4F46\u7531\u4E8E\u51FA\u73B0\u6545\u969C\uFF0C\u67E5\u8BE2\u7ED3\u679C\u7684\u54CD\u5E94\u65F6\u95F4\u589E\u52A0\u4E861~2\u79D2
                                                                      • \u7CFB\u7EDF\u529F\u80FD\u4E0A\u7684\u635F\u5931\uFF1A\u6B63\u5E38\u60C5\u51B5\u4E0B\uFF0C\u5728\u4E00\u4E2A\u7535\u5B50\u5546\u52A1\u7F51\u7AD9\u4E0A\u8FDB\u884C\u8D2D\u7269\u7684\u65F6\u5019\uFF0C\u6D88\u8D39\u8005\u51E0\u4E4E\u80FD\u591F\u987A\u5229\u5B8C\u6210\u6BCF\u4E00\u7B14\u8BA2\u5355\uFF0C\u4F46\u662F\u5728\u4E00\u4E9B\u8282\u65E5\u5927\u4FC3\u8D2D\u7269\u9AD8\u5CF0\u7684\u65F6\u5019\uFF0C\u7531\u4E8E\u6D88\u8D39\u8005\u7684\u8D2D\u7269\u884C\u4E3A\u6FC0\u589E\uFF0C\u4E3A\u4E86\u4FDD\u62A4\u8D2D\u7269\u7CFB\u7EDF\u7684\u7A33\u5B9A\u6027\uFF0C\u90E8\u5206\u6D88\u8D39\u8005\u53EF\u80FD\u4F1A\u88AB\u5F15\u5BFC\u5230\u4E00\u4E2A\u964D\u7EA7\u9875\u9762
                                                                    • S\uFF1A\u8F6F\u72B6\u6001

                                                                      \u8F6F\u72B6\u6001\u6307\u5141\u8BB8\u7CFB\u7EDF\u4E2D\u7684\u6570\u636E\u5B58\u5728\u4E2D\u95F4\u72B6\u6001\uFF0C\u5E76\u8BA4\u4E3A\u8BE5\u4E2D\u95F4\u72B6\u6001\u7684\u5B58\u5728\u4E0D\u4F1A\u5F71\u54CD\u7CFB\u7EDF\u7684\u6574\u4F53\u53EF\u7528\u6027\uFF0C\u5373\u5141\u8BB8\u7CFB\u7EDF\u5728\u4E0D\u540C\u8282\u70B9\u7684\u6570\u636E\u526F\u672C\u4E4B\u95F4\u8FDB\u884C\u6570\u636E\u540C\u6B65\u7684\u8FC7\u7A0B\u5B58\u5728\u5EF6\u65F6\u3002

                                                                      \u727A\u7272\u6389\u6570\u636E\u7684\u4E00\u81F4\u6027\uFF0C\u6765\u8FFD\u6C42\u53EF\u7528\u6027

                                                                    • E\uFF1A\u6700\u7EC8\u4E00\u81F4\u6027

                                                                      \u6700\u7EC8\u4E00\u81F4\u6027\u5F3A\u8C03\u7684\u662F\u7CFB\u7EDF\u4E2D\u6240\u6709\u7684\u6570\u636E\u526F\u672C\uFF0C\u5728\u7ECF\u8FC7\u4E00\u6BB5\u65F6\u95F4\u7684\u540C\u6B65\u540E\uFF0C\u6700\u7EC8\u80FD\u591F\u8FBE\u5230\u4E00\u4E2A\u4E00\u81F4\u7684\u72B6\u6001\u3002\u56E0\u6B64\uFF0C\u6700\u7EC8\u4E00\u81F4\u6027\u7684\u672C\u8D28\u662F\u9700\u8981\u7CFB\u7EDF\u4FDD\u8BC1\u6700\u7EC8\u6570\u636E\u80FD\u591F\u8FBE\u5230\u4E00\u81F4\uFF0C\u800C\u4E0D\u9700\u8981\u5B9E\u65F6\u4FDD\u8BC1\u7CFB\u7EDF\u6570\u636E\u7684\u5F3A\u4E00\u81F4\u6027\u3002

                                                                  Zookeeper\u5165\u95E8

                                                                  \u6982\u8FF0

                                                                  1. zookeeper\u662F\u4E00\u4E2A\u5F00\u6E90\u7684\u5206\u5E03\u5F0F\u7684\uFF0C\u4E3A\u5206\u5E03\u5F0F\u6846\u67B6\u63D0\u4F9B\u534F\u8C03\u670D\u52A1\u7684apache\u9879\u76EE

                                                                  2. zookeeper\u4ECE\u8BBE\u8BA1\u6A21\u5F0F\u7684\u89D2\u5EA6\u6765\u7406\u89E3\uFF1A\u662F\u4E00\u4E2A\u57FA\u4E8E\u89C2\u5BDF\u8005\u6A21\u5F0F\u8BBE\u8BA1\u7684\u5206\u5E03\u5F0F\u670D\u52A1\u7BA1\u7406\u6846\u67B6\uFF0C\u5B83\u8D1F\u8D23\u5B58\u50A8\u548C\u7BA1\u7406\u5927\u5BB6\u90FD\u5173\u5FC3\u7684\u6570\u636E\uFF08\u6BD4\u5982\u670D\u52A1\u5668\u4FE1\u606F\uFF09\uFF0C\u7136\u540E\u63A5\u53D7\u89C2\u5BDF\u8005\uFF08\u5BA2\u6237\u7AEF\uFF09\u7684\u6CE8\u518C\uFF0C\u4E00\u65E6\u8FD9\u4E9B\u6570\u636E\uFF08\u670D\u52A1\u5668\u7684\u4FE1\u606F\uFF09\u7684\u72B6\u6001\u53D1\u751F\u53D8\u5316\uFF0Czookeeper\u5C31\u5C06\u8D1F\u8D23\u901A\u77E5\u5DF2\u7ECF\u5728zookeeper\u4E0A\u6CE8\u518C\u7684\u90A3\u4E9B\u89C2\u5BDF\u8005\uFF08\u5BA2\u6237\u7AEF\uFF09\u505A\u51FA\u76F8\u5E94\u7684\u53CD\u5E94\u3002

                                                                    zookeeper\u76F8\u5F53\u4E8E\u662F\u4E00\u4E2A\u6587\u4EF6\u7CFB\u7EDF\uFF0C\u52A0\u901A\u77E5\u673A\u5236\u3002

                                                                  3. zookeeper\u672C\u8EAB\u662F\u4E00\u4E2A\u96C6\u7FA4\uFF0C\u6709\u591A\u53F0\u670D\u52A1\u5668

                                                                    image-20211003203400587

                                                                  4. zookeeper\uFF1A\u591A\u53F0\u670D\u52A1\u5668\uFF0C\u6709\u4E00\u4E2A\u9886\u5BFC\u8005Leader\uFF0C\u591A\u4E2A\u8DDF\u968F\u7740Follower\u7EC4\u6210\u7684\u96C6\u7FA4\u3002

                                                                  5. \u7279\u70B9\uFF1A

                                                                    • \u96C6\u7FA4\u4E2D\u53EA\u8981\u6709\u534A\u6570\u4EE5\u4E0A\u8282\u70B9\u5B58\u6D3B\uFF0Czookeeper\u96C6\u7FA4\u5C31\u80FD\u6B63\u5E38\u670D\u52A1\uFF0C\u6240\u4EE5zookeeper\u9002\u5408\u5B89\u88C5\u5947\u6570\u53F0\u670D\u52A1\u5668

                                                                    • \u5168\u5C40\u6570\u636E\u4E00\u81F4\uFF0C\u6BCF\u4E2Aserver\u4FDD\u5B58\u4E00\u4EFD\u76F8\u540C\u7684\u6570\u636E\u526F\u672C\uFF0CClient\u65E0\u8BBA\u8FDE\u63A5\u5230\u54EA\u4E2Aserver\uFF0C\u6570\u636E\u90FD\u662F\u4E00\u81F4\u7684\u3002

                                                                    • \u66F4\u65B0\u8BF7\u6C42\u987A\u5E8F\u6267\u884C\uFF0C\u6765\u81EA\u540C\u4E00\u4E2Aclient\u7684\u66F4\u65B0\u8BF7\u6C42\u6309\u5176\u53D1\u9001\u987A\u5E8F\u4F9D\u6B21\u6267\u884C\u3002

                                                                    • \u6570\u636E\u66F4\u65B0\u539F\u5B50\u6027\uFF0C\u4E00\u6B21\u6570\u636E\u66F4\u65B0\u8981\u4E48\u6210\u529F\uFF0C\u8981\u4E48\u5931\u8D25\u3002

                                                                    • \u5B9E\u65F6\u6027\uFF1A\u5728\u4E00\u5B9A\u65F6\u95F4\u8303\u56F4\u5185\uFF0Cclient\u80FD\u8BFB\u5230\u6700\u65B0\u6570\u636E\uFF0C\u6709\u4E00\u4E2A\u540C\u6B65\u6570\u636E\u7684\u8FC7\u7A0B

                                                                  6. zookeeper\u7684\u6570\u636E\u7ED3\u6784

                                                                    zookeeper\u7684\u6570\u636E\u6A21\u578B\u7684\u7ED3\u6784\u4E0Eunix\u6587\u4EF6\u7CFB\u7EDF\u5F88\u7C7B\u4F3C\uFF0C\u6574\u4F53\u4E0A\u53EF\u4EE5\u770B\u4F5C\u662F\u4E00\u68F5\u6811\uFF0C\u6BCF\u4E2A\u8282\u70B9\u79F0\u4F5C\u4E00\u4E2AZNode\uFF0C\u6BCF\u4E00\u4E2AZNode\u9ED8\u8BA4\u80FD\u591F\u5B58\u50A81MB\u7684\u6570\u636E\uFF0C\u6BCF\u4E2AZNode\u90FD\u53EF\u4EE5\u901A\u8FC7\u5176\u8DEF\u5F84\u552F\u4E00\u6807\u8BC6

                                                                  7. zookeeper\u5E94\u7528\u573A\u666F

                                                                    • \u7EDF\u4E00\u547D\u540D\u670D\u52A1

                                                                      \u5728\u5206\u5E03\u5F0F\u73AF\u5883\u4E0B\uFF0C\u7ECF\u5E38\u9700\u8981\u5BF9\u5E94\u7528\uFF08\u670D\u52A1\uFF09\u8FDB\u884C\u7EDF\u4E00\u547D\u540D\uFF0C\u4FBF\u4E8E\u8BC6\u522B

                                                                      \u4F8B\u5982\uFF1AIP\u4E0D\u5BB9\u6613\u8BB0\u4F4F\uFF0C\u800C\u57DF\u540D\u5BB9\u6613\u8BB0\u4F4F\u3002

                                                                      image-20211003204538685

                                                                      \u6211\u4EEC\u8BBF\u95EE\u54EA\u53F0\u670D\u52A1\u5668\uFF0Czookeeper\u4F1A\u6839\u636E\u8D1F\u8F7D\u60C5\u51B5\u8FDB\u884C\u4E00\u4E2A\u5206\u914D

                                                                    • \u7EDF\u4E00\u914D\u7F6E\u7BA1\u7406

                                                                      \u5206\u5E03\u5F0F\u73AF\u5883\u4E0B\uFF0C\u914D\u7F6E\u6587\u4EF6\u540C\u6B65\u975E\u5E38\u5E38\u89C1\uFF0C\u4E00\u822C\u8981\u6C42\u4E00\u4E2A\u96C6\u7FA4\u4E2D\uFF0C\u6240\u6709\u8282\u70B9\u7684\u914D\u7F6E\u4FE1\u606F\u662F\u4E00\u81F4\u7684\uFF0C\u6BD4\u5982kafka\u96C6\u7FA4

                                                                      \u5BF9\u914D\u7F6E\u6587\u4EF6\u4FEE\u6539\u540E\uFF0C\u5E0C\u671B\u80FD\u591F\u5FEB\u901F\u540C\u6B65\u5230\u8282\u70B9\u4E0A\u3002

                                                                      \u914D\u7F6E\u7BA1\u7406\u53EF\u4EA4\u7531zookeeper\u5B9E\u73B0

                                                                      • \u53EF\u5C06\u914D\u7F6E\u4FE1\u606F\u5199\u5165zookeeper\u4E0A\u7684\u4E00\u4E2Aznode
                                                                      • \u5404\u4E2A\u5BA2\u6237\u7AEF\u670D\u52A1\u5668\u76D1\u542C\u8FD9\u4E2Aznode
                                                                    • \u7EDF\u4E00\u96C6\u7FA4\u7BA1\u7406

                                                                      \u5206\u5E03\u5F0F\u73AF\u5883\u4E2D\uFF0C\u5B9E\u65F6\u638C\u63E1\u6BCF\u4E2A\u8282\u70B9\u7684\u72B6\u6001\u662F\u5FC5\u8981\u7684

                                                                      \u53EF\u6839\u636E\u8282\u70B9\u5B9E\u65F6\u72B6\u6001\u505A\u51FA\u4E00\u4E9B\u8C03\u6574

                                                                      • \u53EF\u5C06\u8282\u70B9\u4FE1\u606F\u5199\u5165zookeeper\u7684\u4E00\u4E2Aznode
                                                                      • \u76D1\u542C\u8FD9\u4E2Aznode\u53EF\u83B7\u53D6\u5B83\u7684\u5B9E\u65F6\u72B6\u6001\u53D8\u5316
                                                                    • \u670D\u52A1\u5668\u8282\u70B9\u52A8\u6001\u4E0A\u4E0B\u7EBF

                                                                    • \u8F6F\u8D1F\u8F7D\u5747\u8861

                                                                      image-20211003205325088

                                                                  zookeeper\u914D\u7F6E

                                                                  1. image-20211006145100475

                                                                    • tickTime = 2000\uFF0C\u901A\u4FE1\u5FC3\u8DF3\u65F6\u95F4\uFF0Czookeeper\u670D\u52A1\u5668\u4E0E\u5BA2\u6237\u7AEF\u5FC3\u8DF3\u65F6\u95F4\uFF0C\u5355\u4F4D\u6BEB\u79D2

                                                                      \u670D\u52A1\u5668\u4E0E\u670D\u52A1\u5668\u4E4B\u95F4\u4E5F\u53EF\u4EE5\u8FDB\u884C\u5FC3\u8DF3\u901A\u8BAF\uFF0C\u4E92\u76F8\u53D1\u9001\u4FE1\u53F7\u3002

                                                                      image-20211006145844714

                                                                    • initLimit = 10\uFF0C LF\u521D\u59CB\u901A\u4FE1\u65F6\u9650

                                                                      Leader\u548CFollower\u521D\u59CB\u8FDE\u63A5\u65F6\u80FD\u5BB9\u5FCD\u7684\u6700\u591A\u5FC3\u8DF3\u6570

                                                                      \u5982\u679C\u8D85\u8FC7 initLimit*tickTime\u8FD8\u6CA1\u6709\u8FDE\u63A5\u6210\u529F\u7684\u8BDD\u5C31\u8BA4\u4E3A\u8FDE\u63A5\u5931\u8D25

                                                                    • syncLimit = 5 LF\u540C\u6B65\u901A\u4FE1\u65F6\u9650

                                                                      Leader\u548CFollower\u4E4B\u95F4\u901A\u4FE1\u65F6\u95F4\u5982\u679C\u8D85\u8FC7syncLimit * tickTime\uFF0CLeader\u8BA4\u4E3AFollower\u6B7B

                                                                      \u4ECE\u670D\u52A1\u5668\u5217\u8868\u4E2D\u5220\u9664Follower

                                                                    • dataDir\uFF1A\u4FDD\u5B58zookeeper\u4E2D\u7684\u6570\u636E

                                                                      \u6CE8\u610F:\u9ED8\u8BA4\u7684tmp\u76EE\u5F55\uFF0C\u5BB9\u6613\u88ABlinux\u7CFB\u7EDF\u5B9A\u671F\u5220\u9664\uFF0C\u6240\u4EE5\u4E00\u822C\u4E0D\u4F7F\u7528\u9ED8\u8BA4\u7684tmp\u76EE\u5F55

                                                                    • clientPort=2181\uFF1A\u5BA2\u6237\u7AEF\u8FDE\u63A5\u7AEF\u53E3\uFF0C\u901A\u5E38\u4E0D\u505A\u4FEE\u6539

                                                                  2. zookeeper\u96C6\u7FA4\u6700\u5C11\u662F\u4E09\u53F0

                                                                  zookeeper\u9009\u4E3E\u673A\u5236

                                                                  1. \u7B2C\u4E00\u6B21\u542F\u52A8

                                                                    image-20211006152112242

                                                                    \u53EA\u8981\u96C6\u7FA4\u4E2D\u5DF2\u7ECF\u6709\u4E86Leader\uFF0C\u540E\u9762\u542F\u52A8\u7684\u670D\u52A1\u5668\u4E0D\u4F1A\u56E0\u4E3Amyid\u5927\u800C\u5F53\u9009Leader\uFF0C\u56E0\u4E3A\u5982\u679C\u96C6\u7FA4\u4E2D\u5DF2\u7ECF\u6709\u4E86Leader\uFF0C\u90A3\u4E48\u524D\u9762\u7684\u670D\u52A1\u5668\u90FD\u4E0D\u662FLOOKING\u72B6\u6001\uFF0C\u6240\u4EE5\u4E0D\u4F1A\u66F4\u6539\u9009\u7968\u4FE1\u606F\uFF0C\u65B0\u542F\u52A8\u7684\u670D\u52A1\u5668\u4ECD\u7136\u4F1A\u5C06\u7968\u6295\u7ED9\u81EA\u5DF1\uFF0C\u6B64\u65F6\u65B0\u542F\u52A8\u7684\u670D\u52A1\u5668\u5C31\u4F1A\u5C11\u6570\u670D\u4ECE\u591A\u6570\uFF0C\u66F4\u6539\u9009\u7968\u4FE1\u606F\u4F1A\u4E4B\u524D\u7684Leader\u670D\u52A1\u5668

                                                                  2. \u76F8\u5173\u6982\u5FF5\uFF1A

                                                                    image-20211006152451588

                                                                  3. \u975E\u7B2C\u4E00\u6B21\u542F\u52A8

                                                                    image-20211006153042844

                                                                  zookeeper\u8282\u70B9\u7C7B\u578B

                                                                  1. \u6301\u4E45\uFF1A\u5BA2\u6237\u7AEF\u548C\u670D\u52A1\u5668\u7AEF\u65AD\u5F00\u8FDE\u63A5\u540E\uFF0C\u521B\u5EFA\u7684\u8282\u70B9\u4E0D\u5220\u9664

                                                                    \u77ED\u6682\uFF1A\u5BA2\u6237\u7AEF\u548C\u670D\u52A1\u5668\u7AEF\u65AD\u5F00\u8FDE\u63A5\u540E\uFF0C\u521B\u5EFA\u7684\u8282\u70B9\u81EA\u5DF1\u5220\u9664

                                                                  2. \u5E26\u5E8F\u53F7\uFF1A\u521B\u5EFAznode\u65F6\u8BBE\u7F6E\u987A\u5E8F\u6807\u8BC6\uFF0Cznode\u540D\u79F0\u540E\u4F1A\u9644\u52A0\u4E00\u4E2A\u503C\uFF0C\u987A\u5E8F\u53F7\u662F\u4E00\u4E2A\u5355\u8C03\u9012\u589E\u7684\u8BA1\u6570\u5668\uFF0C\u7531\u7236\u8282\u70B9\u7EF4\u62A4

                                                                    \u6CE8\u610F\uFF1A\u5728\u5206\u5E03\u5F0F\u7CFB\u7EDF\u4E2D\uFF0C\u987A\u5E8F\u53F7\u53EF\u4EE5\u88AB\u7528\u4E8E\u4E3A\u6240\u6709\u7684\u4E8B\u4EF6\u8FDB\u884C\u5168\u5C40\u6392\u5E8F\uFF0C\u8FD9\u6837\u5BA2\u6237\u7AEF\u53EF\u4EE5\u901A\u8FC7\u987A\u5E8F\u53F7\u63A8\u65AD\u4E8B\u4EF6\u7684\u987A\u5E8F

                                                                  zookeeper\u76D1\u542C\u5668\u539F\u7406

                                                                  1. \u5C06zookeeper\u5BA2\u6237\u7AEF\u53BB\u670D\u52A1\u5668\u7AEF\u8FDB\u884C\u6CE8\u518C\uFF0C\u6CE8\u518C\u8BF4\u8981\u76D1\u542C\u54EA\u4E00\u4E2A\u8282\u70B9\u6570\u636E\u7684\u53D8\u5316\uFF0Czookeeper\u670D\u52A1\u5668\u7AEF\u7684\u5BF9\u5E94\u8282\u70B9\u6570\u636E\u5982\u679C\u53D1\u751F\u53D8\u5316\u4E86\uFF0C\u5C31\u4F1A\u901A\u77E5\u5BA2\u6237\u7AEF\uFF0C\u8FD9\u5C31\u662F\u8FD9\u4E2A\u8FC7\u7A0B\u3002

                                                                  2. \u76D1\u542C\u5668\u539F\u7406

                                                                    • \u9996\u5148\u8981\u6709\u4E00\u4E2Amain()\u7EBF\u7A0B
                                                                    • \u5728main\u7EBF\u7A0B\u4E2D\u521B\u5EFAzookeeper\u5BA2\u6237\u7AEF\uFF0C\u8FD9\u65F6\u5C31\u4F1A\u521B\u5EFA\u4E24\u4E2A\u7EBF\u7A0B\uFF0C\u4E00\u4E2A\u8D1F\u8D23\u7F51\u7EDC\u901A\u4FE1\uFF08connect\uFF09\uFF0C\u4E00\u4E2A\u8D1F\u8D23\u76D1\u542C\uFF08listener\uFF09
                                                                    • \u901A\u8FC7connect\u7EBF\u7A0B\u5C06\u6CE8\u518C\u7684\u76D1\u542C\u4E8B\u4EF6\u53D1\u9001\u7ED9zookeeper\u670D\u52A1\u5668
                                                                    • \u5728zookeeper\u670D\u52A1\u5668\u7684\u6CE8\u518C\u76D1\u542C\u5668\u5217\u8868\u4E2D\u5C06\u6CE8\u518C\u7684\u76D1\u542C\u4E8B\u4EF6\u6DFB\u52A0\u5230\u5217\u8868\u4E2D
                                                                    • zookeeper\u670D\u52A1\u5668\u76D1\u542C\u5230\u6709\u6570\u636E\u6216\u8DEF\u5F84\u53D8\u5316\uFF0C\u5C31\u4F1A\u5C06\u8FD9\u4E2A\u6D88\u606F\u53D1\u9001\u7ED9listener\u7EBF\u7A0B
                                                                  3. \u5E38\u89C1\u7684\u76D1\u542C

                                                                    • \u76D1\u542C\u8282\u70B9\u6570\u636E\u7684\u53D8\u5316

                                                                      get path [watch]

                                                                      \u6CE8\u518C\u4E00\u6B21\uFF0C\u53EA\u80FD\u76D1\u542C\u4E00\u6B21\uFF0C\u60F3\u518D\u6B21\u76D1\u542C\uFF0C\u9700\u8981\u518D\u6B21\u6CE8\u518C

                                                                    • \u76D1\u542C\u5B50\u8282\u70B9\u589E\u51CF\u7684\u53D8\u5316

                                                                      ls path [watch]

                                                                      \u6CE8\u518C\u4E00\u6B21\uFF0C\u53EA\u80FD\u76D1\u542C\u4E00\u6B21\uFF0C\u60F3\u518D\u6B21\u76D1\u542C\uFF0C\u9700\u8981\u518D\u6B21\u6CE8\u518C

                                                                  \u5BA2\u6237\u7AEF\u5411\u670D\u52A1\u5668\u7AEF\u5199\u6570\u636E\u6D41\u7A0B

                                                                  1. \u5982\u679C\u5BA2\u6237\u7AEF\u76F4\u63A5\u8BBF\u95EELeader

                                                                    image-20211006171214463

                                                                    \u53EA\u8981\u6709\u534A\u6570\u7684\u8282\u70B9\u8BA4\u4E3A\u5DF2\u7ECF\u5199\u5B8C\u4E86\uFF0C\u90A3\u4E48Leader\u5C31\u4F1A\u544A\u8BC9\u5BA2\u6237\u7AEF\u5373\u53D1\u9001\u7ED9\u5BA2\u6237\u7AEF\u786E\u8BA4ack\uFF0C\u8BF4\u5DF2\u7ECF\u5199\u5B8C\u4E86\u3002

                                                                  2. \u5982\u679C\u5BA2\u6237\u7AEF\u7684\u5199\u5165\u8BF7\u6C42\u53D1\u9001\u7ED9follower\u8282\u70B9

                                                                    \u88AB\u8BBF\u95EE\u7684follower\u4F1A\u628A\u5199\u8BF7\u6C42\u53D1\u9001\u7ED9leader\uFF0Cleader\u6765\u5904\u7406\u5E76\u5199\u6570\u636E\uFF0C\u81EA\u5DF1\u5148\u5199\u4E00\u4EFD\uFF0C\u5E76\u4E14\u53D1\u5199\u547D\u4EE4\u7ED9follower\u8282\u70B9\uFF0Cfollower\u9700\u8981\u5199\u5E76\u4E14\u518D\u53D1\u9001ack\u7ED9leader\uFF0C\u8D85\u8FC7\u534A\u6570\u4EE5\u4E0A\u8282\u70B9\u8BA4\u4E3A\u5199\u5B8C\uFF0C\u90A3\u4E48leader\u4F1A\u518D\u53D1ack\u7ED9\u5BA2\u6237\u7AEF\u8BBF\u95EE\u7684follower\u8282\u70B9\uFF0C\u88AB\u8BBF\u95EE\u7684follower\u8282\u70B9\u7ED9\u5BA2\u6237\u7AEF\u53D1ack

                                                                    image-20211006171630741

                                                                  \u670D\u52A1\u5668\u52A8\u6001\u4E0A\u4E0B\u7EBF\u76D1\u542C

                                                                  1. \u670D\u52A1\u5668\u542F\u52A8\u65F6\u53BB\u6CE8\u518C\u4FE1\u606F\uFF08\u521B\u5EFA\u90FD\u662F\u4E34\u65F6\uFF09\uFF0C\u5728zookeeper\u4E0A\u521B\u5EFA\u5BF9\u5E94\u7684\u8282\u70B9

                                                                  2. \u5BA2\u6237\u7AEF\u83B7\u53D6\u5230\u5F53\u524D\u5728\u7EBF\u670D\u52A1\u5668\u5217\u8868\uFF0C\u5E76\u4E14\u6CE8\u518C\u76D1\u542C\uFF0C\u5C31\u662F\u76D1\u542C\u5668\u539F\u7406

                                                                  \u8FD9\u91CC\u8BF4\u7684\u670D\u52A1\u5668\u548C\u5BA2\u6237\u7AEF\u5BF9\u4E8Ezookeeper\u96C6\u7FA4\u6765\u8BF4\u90FD\u662F\u5BA2\u6237\u7AEF\uFF0C\u53EA\u4E0D\u8FC7\u670D\u52A1\u5668\u53BB\u8C03\u7684zookeeper\u7684\u521B\u5EFA\u8282\u70B9\u65B9\u6CD5\uFF0C\u5BA2\u6237\u7AEF\u53BB\u76D1\u542C

                                                                  \u5206\u5E03\u5F0F\u9501

                                                                  \u539F\u751Fzookeeper\u5B9E\u73B0\u5206\u5E03\u5F0F\u9501\u65B9\u6CD5

                                                                  1. \u4EC0\u4E48\u53EB\u5206\u5E03\u5F0F\u9501

                                                                    \u6BD4\u5982\u8BF4\u8FDB\u7A0B1\u5728\u4F7F\u7528\u8BE5\u8D44\u6E90\u7684\u9002\u5408\uFF0C\u4F1A\u5148\u53BB\u83B7\u5F97\u9501\uFF0C\u8FDB\u7A0B1\u83B7\u5F97\u9501\u4EE5\u540E\u4F1A\u5BF9\u8BE5\u8D44\u6E90\u4FDD\u6301\u72EC\u5360\uFF0C\u8FD9\u6837\u5176\u4ED6\u8FDB\u7A0B\u5C31\u65E0\u6CD5\u8BBF\u95EE\u8BE5\u8D44\u6E90\uFF0C\u8FDB\u7A0B1\u7528\u5B8C\u8BE5\u8D44\u6E90\u4EE5\u540E\u5C31\u5C06\u9501\u91CA\u653E\u6389\uFF0C\u8BA9\u5176\u4ED6\u8FDB\u7A0B\u6765\u83B7\u5F97\u9501\uFF0C\u90A3\u4E48\u901A\u8FC7\u8FD9\u4E2A\u9501\u673A\u5236\uFF0C\u6211\u4EEC\u5C31\u4FDD\u8BC1\u4E86\u5206\u5E03\u5F0F\u7CFB\u7EDF\u4E2D\u591A\u4E2A\u8FDB\u7A0B\u80FD\u591F\u6709\u5E8F\u5730\u8BBF\u95EE\u8BE5\u4E34\u754C\u8D44\u6E90\uFF0C\u6211\u4EEC\u628A\u8FD9\u4E2A\u5206\u5E03\u5F0F\u73AF\u5883\u4E0B\u7684\u9501\u53EB\u505A\u5206\u5E03\u5F0F\u9501\u3002

                                                                  2. \u6B65\u9AA4\uFF1A

                                                                    • \u5728/lock\u76EE\u5F55\u4E0B\uFF0C\u521B\u5EFA\u4E34\u65F6\u987A\u5E8F\u8282\u70B9\uFF0C\u5E8F\u53F7\u6700\u5C0F\u7684\u8282\u70B9\u53EF\u4EE5\u83B7\u5F97\u9501\uFF0C\u5904\u7406\u4E1A\u52A1

                                                                    • \u8282\u70B9\u9700\u8981\u5224\u65AD\u81EA\u5DF1\u662F\u4E0D\u662F\u5F53\u524D\u8282\u70B9\u4E0B\u5E8F\u53F7\u6700\u5C0F\u7684\u8282\u70B9\uFF0C\u5982\u679C\u662F\uFF0C\u83B7\u53D6\u5230\u9501\uFF0C\u5982\u679C\u4E0D\u662F\uFF0C\u5BF9\u524D\u4E00\u4E2A\u8282\u70B9\u8FDB\u884C\u76D1\u542C\uFF0C\u76D1\u542C\u8FD9\u4E00\u6B65\u5F88\u91CD\u8981\uFF0C\u56E0\u4E3A\u5C31\u662F\u8981\u76D1\u542C\u5230\u524D\u4E00\u4E2A\u8282\u70B9\u7684\u91CA\u653E\u4E5F\u5C31\u662F\u5220\u9664\uFF0C\u6211\u4EEC\u81EA\u5DF1\u5199\u7684\u4E0A\u9501\u8FD9\u4E2A\u8FC7\u7A0B\u624D\u80FD\u5B8C\u6210\uFF01\u5426\u5219\u524D\u4E00\u4E2A\u8282\u70B9\u6CA1\u6709\u91CA\u653E\uFF0C\u5373\u6CA1\u6709\u5220\u9664\uFF0C\u5F53\u524D\u8282\u70B9\u6C38\u8FDC\u4E0D\u53EF\u80FD\u5B8C\u6210\u4E0A\u9501\uFF0C\u8FD9\u91CC\u8981\u901A\u8FC7\u4EE3\u7801\u5B9E\u73B0\uFF0C\u53EF\u4EE5\u901A\u8FC7CountDownLatch\u5B9E\u73B0\uFF0C\u5F53\u6CA1\u6709\u76D1\u542C\u5230\u524D\u4E00\u4E2A\u7ED3\u70B9\u5220\u9664\u7684\u9002\u5408\uFF0C\u4E00\u76F4\u9501\u4F4F\uFF0C\u76D1\u542C\u5230\u524D\u4E00\u4E2A\u8282\u70B9\u5220\u9664\u4E86\uFF0C\u901A\u8FC7CountDownLatch\u91CA\u653E\u9501\uFF0C\u6211\u4EEC\u81EA\u5DF1\u4E0A\u9501\u7684\u4EE3\u7801\u624D\u5B8C\u6210\u3002

                                                                      \u6211\u4EEC\u81EA\u5DF1\u5199\u7684\u4E0A\u9501\u8FD9\u4E2A\u65B9\u6CD5\uFF0C \u53EF\u4EE5\u901A\u8FC7CountDownLatch\u6765\u63A7\u5236\u6D41\u7A0B\uFF0C\u901A\u8FC7CountDownLatch\u7684\u91CA\u653E\u9501\u6765\u4F7F\u6211\u4EEC\u7684\u65B9\u6CD5\u6267\u884C\u5B8C\u6210\u3002\u4E24\u8005\u4E0D\u8981\u641E\u6DF7\u3002

                                                                    • \u83B7\u53D6\u5230\u9501\uFF0C\u5904\u7406\u5B8C\u4E1A\u52A1\u540E\uFF0Cdelete\u8282\u70B9\u91CA\u653E\u9501\uFF0C\u7136\u540E\u4E0B\u9762\u7684\u8282\u70B9\u5C06\u63A5\u6536\u5230\u901A\u77E5\uFF0C\u91CD\u590D\u7B2C\u4E8C\u6B65\u5224\u65AD\u3002

                                                                    image-20211006180545474

                                                                  \u6210\u719F\u7684Curator\u6846\u67B6\u5B9E\u73B0\u5206\u5E03\u5F0F\u9501

                                                                  1. \u539F\u751F\u5730\u901A\u8FC7zookeeper\u548CJavaAPI\u5B9E\u73B0\u5206\u5E03\u5F0F\u9501\u5B58\u5728\u7684\u95EE\u9898
                                                                    • \u4F1A\u8BDD\u8FDE\u63A5\u662F\u5F02\u6B65\u7684\uFF0C\u9700\u8981\u81EA\u5DF1\u53BB\u5904\u7406\uFF0C\u6BD4\u5982\u4F7F\u7528CountDownLatch
                                                                    • watch\u9700\u8981\u91CD\u590D\u6CE8\u518C\uFF0C\u4E0D\u7136\u5C31\u4E0D\u80FD\u751F\u6548
                                                                    • \u4E0D\u652F\u6301\u591A\u8282\u70B9\u7684\u521B\u5EFA\u548C\u5220\u9664\uFF0C\u9700\u8981\u81EA\u5DF1\u53BB\u9012\u5F52
                                                                  2. Curator\u662F\u4E00\u4E2A\u4E13\u95E8\u89E3\u51B3\u5206\u5E03\u5F0F\u9501\u7684\u6846\u67B6\uFF0C\u89E3\u51B3\u4E86\u539F\u751FJavaAPI\u5F00\u53D1\u5206\u5E03\u5F0F\u9047\u5230\u7684\u95EE\u9898
                                                                  ',29);function k(m,z){return u}var _=e(c,[["render",k],["__file","zookeeper.html.vue"]]);export{_ as default}; diff --git a/assets/zookeeper.html.ca2e38fc.js b/assets/zookeeper.html.a0dd5722.js similarity index 96% rename from assets/zookeeper.html.ca2e38fc.js rename to assets/zookeeper.html.a0dd5722.js index 042f99ba..6c04c661 100644 --- a/assets/zookeeper.html.ca2e38fc.js +++ b/assets/zookeeper.html.a0dd5722.js @@ -1 +1 @@ -const e={key:"v-9ef17310",path:"/java/%E5%88%86%E5%B8%83%E5%BC%8F/zookeeper/zookeeper.html",title:"zookeeper",lang:"zh-CN",frontmatter:{},excerpt:"",headers:[{level:2,title:"\u6982\u8FF0",slug:"\u6982\u8FF0",children:[]},{level:2,title:"\u5206\u5E03\u5F0F\u7406\u8BBA",slug:"\u5206\u5E03\u5F0F\u7406\u8BBA",children:[{level:3,title:"CAP",slug:"cap",children:[]},{level:3,title:"BASE\u7406\u8BBA",slug:"base\u7406\u8BBA",children:[]}]},{level:2,title:"Zookeeper\u5165\u95E8",slug:"zookeeper\u5165\u95E8",children:[{level:3,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-1",children:[]},{level:3,title:"zookeeper\u914D\u7F6E",slug:"zookeeper\u914D\u7F6E",children:[]},{level:3,title:"zookeeper\u9009\u4E3E\u673A\u5236",slug:"zookeeper\u9009\u4E3E\u673A\u5236",children:[]},{level:3,title:"zookeeper\u8282\u70B9\u7C7B\u578B",slug:"zookeeper\u8282\u70B9\u7C7B\u578B",children:[]},{level:3,title:"zookeeper\u76D1\u542C\u5668\u539F\u7406",slug:"zookeeper\u76D1\u542C\u5668\u539F\u7406",children:[]},{level:3,title:"\u5BA2\u6237\u7AEF\u5411\u670D\u52A1\u5668\u7AEF\u5199\u6570\u636E\u6D41\u7A0B",slug:"\u5BA2\u6237\u7AEF\u5411\u670D\u52A1\u5668\u7AEF\u5199\u6570\u636E\u6D41\u7A0B",children:[]}]},{level:2,title:"\u670D\u52A1\u5668\u52A8\u6001\u4E0A\u4E0B\u7EBF\u76D1\u542C",slug:"\u670D\u52A1\u5668\u52A8\u6001\u4E0A\u4E0B\u7EBF\u76D1\u542C",children:[]},{level:2,title:"\u5206\u5E03\u5F0F\u9501",slug:"\u5206\u5E03\u5F0F\u9501",children:[{level:3,title:"\u539F\u751Fzookeeper\u5B9E\u73B0\u5206\u5E03\u5F0F\u9501\u65B9\u6CD5",slug:"\u539F\u751Fzookeeper\u5B9E\u73B0\u5206\u5E03\u5F0F\u9501\u65B9\u6CD5",children:[]},{level:3,title:"\u6210\u719F\u7684Curator\u6846\u67B6\u5B9E\u73B0\u5206\u5E03\u5F0F\u9501",slug:"\u6210\u719F\u7684curator\u6846\u67B6\u5B9E\u73B0\u5206\u5E03\u5F0F\u9501",children:[]}]}],git:{updatedTime:1710173765e3,contributors:[{name:"shailene",email:"64005626+shaileneF@users.noreply.github.com",commits:1}]},filePathRelative:"java/\u5206\u5E03\u5F0F/zookeeper/zookeeper.md"};export{e as data}; +const e={key:"v-9ef17310",path:"/java/%E5%88%86%E5%B8%83%E5%BC%8F/zookeeper/zookeeper.html",title:"zookeeper",lang:"zh-CN",frontmatter:{},excerpt:"",headers:[{level:2,title:"\u6982\u8FF0",slug:"\u6982\u8FF0",children:[]},{level:2,title:"\u5206\u5E03\u5F0F\u7406\u8BBA",slug:"\u5206\u5E03\u5F0F\u7406\u8BBA",children:[{level:3,title:"CAP",slug:"cap",children:[]},{level:3,title:"BASE\u7406\u8BBA",slug:"base\u7406\u8BBA",children:[]}]},{level:2,title:"Zookeeper\u5165\u95E8",slug:"zookeeper\u5165\u95E8",children:[{level:3,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-1",children:[]},{level:3,title:"zookeeper\u914D\u7F6E",slug:"zookeeper\u914D\u7F6E",children:[]},{level:3,title:"zookeeper\u9009\u4E3E\u673A\u5236",slug:"zookeeper\u9009\u4E3E\u673A\u5236",children:[]},{level:3,title:"zookeeper\u8282\u70B9\u7C7B\u578B",slug:"zookeeper\u8282\u70B9\u7C7B\u578B",children:[]},{level:3,title:"zookeeper\u76D1\u542C\u5668\u539F\u7406",slug:"zookeeper\u76D1\u542C\u5668\u539F\u7406",children:[]},{level:3,title:"\u5BA2\u6237\u7AEF\u5411\u670D\u52A1\u5668\u7AEF\u5199\u6570\u636E\u6D41\u7A0B",slug:"\u5BA2\u6237\u7AEF\u5411\u670D\u52A1\u5668\u7AEF\u5199\u6570\u636E\u6D41\u7A0B",children:[]}]},{level:2,title:"\u670D\u52A1\u5668\u52A8\u6001\u4E0A\u4E0B\u7EBF\u76D1\u542C",slug:"\u670D\u52A1\u5668\u52A8\u6001\u4E0A\u4E0B\u7EBF\u76D1\u542C",children:[]},{level:2,title:"\u5206\u5E03\u5F0F\u9501",slug:"\u5206\u5E03\u5F0F\u9501",children:[{level:3,title:"\u539F\u751Fzookeeper\u5B9E\u73B0\u5206\u5E03\u5F0F\u9501\u65B9\u6CD5",slug:"\u539F\u751Fzookeeper\u5B9E\u73B0\u5206\u5E03\u5F0F\u9501\u65B9\u6CD5",children:[]},{level:3,title:"\u6210\u719F\u7684Curator\u6846\u67B6\u5B9E\u73B0\u5206\u5E03\u5F0F\u9501",slug:"\u6210\u719F\u7684curator\u6846\u67B6\u5B9E\u73B0\u5206\u5E03\u5F0F\u9501",children:[]}]}],git:{updatedTime:1710173784e3,contributors:[{name:"shailene",email:"64005626+shaileneF@users.noreply.github.com",commits:1}]},filePathRelative:"java/\u5206\u5E03\u5F0F/zookeeper/zookeeper.md"};export{e as data}; diff --git "a/assets/\343\200\212\345\271\266\345\217\221\347\274\226\347\250\213\347\232\204\350\211\272\346\234\257\343\200\213\347\254\224\350\256\260.html.8bbaeb8b.js" "b/assets/\343\200\212\345\271\266\345\217\221\347\274\226\347\250\213\347\232\204\350\211\272\346\234\257\343\200\213\347\254\224\350\256\260.html.2c67d429.js" similarity index 99% rename from "assets/\343\200\212\345\271\266\345\217\221\347\274\226\347\250\213\347\232\204\350\211\272\346\234\257\343\200\213\347\254\224\350\256\260.html.8bbaeb8b.js" rename to "assets/\343\200\212\345\271\266\345\217\221\347\274\226\347\250\213\347\232\204\350\211\272\346\234\257\343\200\213\347\254\224\350\256\260.html.2c67d429.js" index b9c7eaf2..542fc0a8 100644 --- "a/assets/\343\200\212\345\271\266\345\217\221\347\274\226\347\250\213\347\232\204\350\211\272\346\234\257\343\200\213\347\254\224\350\256\260.html.8bbaeb8b.js" +++ "b/assets/\343\200\212\345\271\266\345\217\221\347\274\226\347\250\213\347\232\204\350\211\272\346\234\257\343\200\213\347\254\224\350\256\260.html.2c67d429.js" @@ -1 +1 @@ -import{_ as a,e}from"./app.0d029894.js";const i={},p=e('

                                                                  \u7B2C2\u7AE0 Java\u5E76\u53D1\u673A\u5236\u7684\u5E95\u5C42\u5B9E\u73B0\u539F\u7406

                                                                  \u9501\u7684\u5347\u7EA7\u548C\u5BF9\u6BD4

                                                                  \u504F\u5411\u9501

                                                                  1. \u504F\u5411\u9501

                                                                    \u504F\u5411\u9501\u7684\u672C\u8D28\u4E0A\u662F\u53EA\u6709\u4E00\u4E2A\u7EBF\u7A0B\uFF0C\u8FD9\u4E2A\u7EBF\u7A0B\u5728\u91CD\u590D\u83B7\u5F97\u8FD9\u4E2A\u9501\u5BF9\u8C61\u65F6\uFF08\u53EF\u91CD\u5165\uFF09\uFF0C\u5982\u679C\u6839\u636E\u9501\u5BF9\u8C61\u7684\u5BF9\u8C61\u5934\u7684\u8FD0\u884C\u65F6\u5143\u6570\u636Emark word\u91CC\u8BB0\u5F55\u7684\u7EBF\u7A0BID\uFF0C\u53D1\u73B0\u9501\u5BF9\u8C61\u5DF2\u7ECF\u8BB0\u5F55\u4E86\u5F53\u524D\u7EBF\u7A0B\u7684\u7EBF\u7A0BID\uFF0C\u90A3\u4E48\u4E0D\u4F1A\u518D\u901A\u8FC7CAS\u6765\u64CD\u4F5C\u52A0\u9501\u548C\u89E3\u9501\uFF0C\u51CF\u5C11\u4E86\u5F00\u9500\uFF01

                                                                    \u5982\u679C\u6709\u591A\u4E2A\u7EBF\u7A0B\u6765\u7ADE\u4E89\u9501\uFF0C\u90A3\u4E48\u4F1A\u8FDB\u884C\u9501\u7684\u5347\u7EA7\uFF0C\u7531\u504F\u5411\u9501\u5347\u7EA7\u4E3A\u8F7B\u91CF\u7EA7\u9501\u3002

                                                                  2. \u504F\u5411\u9501\u7684\u64A4\u9500

                                                                    \u504F\u5411\u9501\u4F7F\u7528\u4E86\u4E00\u79CD\u7B49\u5230\u7ADE\u4E89\u51FA\u73B0\u624D\u91CA\u653E\u9501\u7684\u673A\u5236\uFF0C\u6240\u4EE5\u5F53\u6709\u5176\u4ED6\u7EBF\u7A0B\u5C1D\u8BD5\u7ADE\u4E89\u504F\u5411\u9501\u65F6\uFF0C\u6301\u6709\u504F\u5411\u9501\u7684\u7EBF\u7A0B\u624D\u4F1A\u91CA\u653E\u9501\uFF0C\u5C06\u5BF9\u8C61\u5934\u7684\u9501\u6807\u5FD7\u4F4D\u8BBE\u7F6E\u6210\u65E0\u9501\u72B6\u6001\u3002

                                                                  \u8F7B\u91CF\u7EA7\u9501

                                                                  1. \u8F7B\u91CF\u7EA7\u9501\u81A8\u80C0\uFF0C\u5347\u7EA7\u6210\u91CD\u91CF\u7EA7\u9501\uFF0C\u662F\u5728\u8F7B\u91CF\u7EA7\u9501\u89E3\u9501\u9636\u6BB5

                                                                    \u8F7B\u91CF\u7EA7\u9501\u89E3\u9501\u65F6\uFF0C\u4F1A\u4F7F\u7528\u539F\u5B50\u7684CAS\u64CD\u4F5C\uFF08\u8FD9\u91CC\u662F\u63CF\u8FF0CAS\u8FD9\u4E2A\u64CD\u4F5C\u662F\u539F\u5B50\u7684\uFF0C\u800CJava\u539F\u5B50\u7C7Batom\u7C7B\u7684\u5B9E\u73B0\u539F\u7406\u4FBF\u662F\u901A\u8FC7CAS\uFF09\uFF0C\u5C06\u56E0\u4E3A\u8F7B\u91CF\u7EA7\u9501\u800C\u5B58\u50A8\u5728\u6808\u5E27\u7684\u9501\u8BB0\u5F55\u91CC\u7684\u9501\u5730\u5740\u548C\u6807\u5FD7\u4F4D\u90E8\u5206\u7684mark word\u4EA4\u6362\u56DE\u53BB\uFF0C\u5373\u66FF\u6362\u56DE\u5BF9\u8C61\u5934\uFF0C\u5982\u679C\u6210\u529F\uFF0C\u5219\u8868\u793A\u6CA1\u6709\u7ADE\u4E89\u53D1\u751F\uFF0C\u5982\u679C\u5931\u8D25\uFF0C\u8868\u793A\u5F53\u524D\u9501\u5B58\u5728\u7ADE\u4E89\uFF0C\u9501\u5C31\u4F1A\u81A8\u80C0\u6210\u91CD\u91CF\u7EA7\u9501\u3002

                                                                  2. Java\u539F\u5B50\u7C7B\u7684\u539F\u5B50\u64CD\u4F5C\u662F\u901A\u8FC7CAS\u5B9E\u73B0\u7684\u3002

                                                                  volatile\u5B9E\u73B0\u539F\u7406

                                                                  1. Lock\u524D\u7F00\u6307\u4EE4\u4F1A\u5F15\u8D77\u5904\u7406\u5668\u7F13\u5B58\u56DE\u5199\u5230\u5185\u5B58

                                                                  2. \u4E00\u4E2A\u5904\u7406\u5668\u7684\u7F13\u5B58\u56DE\u5199\u5230\u5185\u5B58\u4F1A\u5BFC\u81F4\u5176\u4ED6\u5904\u7406\u5668\u7684\u7F13\u5B58\u884C\u7684\u6570\u636E\u65E0\u6548

                                                                    \u5904\u7406\u5668\u4F7F\u7528\u55C5\u63A2\u6280\u672F\u4FDD\u8BC1\u5B83\u7684\u5185\u90E8\u7F13\u5B58\u3001\u7CFB\u7EDF\u5185\u5B58\u548C\u5176\u4ED6\u5904\u7406\u5668\u7684\u7F13\u5B58\u7684\u6570\u636E\u5728\u603B\u7EBF\u4E0A\u4FDD\u6301\u4E00\u81F4\u3002

                                                                    \u4EE5\u4E0A\u4E24\u6761\u5C31\u662F\u8BF4\u7684\u7F13\u5B58\u9501\u3002

                                                                  3. \u7F13\u5B58\u4E00\u81F4\u6027\u534F\u8BAE\uFF1A

                                                                    \u7CFB\u7EDF\u963B\u6B62\u540C\u65F6\u4FEE\u6539\u7531\u4E24\u4E2A\u6216\u4EE5\u4E0A\u5904\u7406\u5668\u7F13\u5B58\u7684\u5185\u5B58\u533A\u57DF\u6570\u636E

                                                                  \u539F\u5B50\u64CD\u4F5C\u7684\u5B9E\u73B0\u539F\u7406

                                                                  \u603B\u7EBF\u9501\u548C\u7F13\u5B58\u9501

                                                                  1. \u603B\u7EBF\u9501\u5B9A

                                                                    \u6240\u8C13\u603B\u7EBF\u9501\u5C31\u662F\u4F7F\u7528\u5904\u7406\u5668\u63D0\u4F9B\u7684\u4E00\u4E2ALOCK #\u4FE1\u53F7\uFF0C\u5F53\u8BE5\u5904\u7406\u5668\u5728\u603B\u7EBF\u4E0A\u8F93\u51FA\u6B64\u4FE1\u53F7\u65F6\uFF0C\u5176\u4ED6\u5904\u7406\u5668\u7684\u8BF7\u6C42\u5C06\u88AB\u963B\u585E\u4F4F\uFF0C\u4E0D\u80FD\u548C\u5185\u5B58\u8FDB\u884C\u901A\u4FE1\uFF0C\u90A3\u4E48\u8BE5\u5904\u7406\u5668\u53EF\u4EE5\u72EC\u5360\u5171\u4EAB\u5185\u5B58\u3002

                                                                    \u5728\u540C\u4E00\u65F6\u523B\uFF0C\u6211\u4EEC\u53EA\u9700\u4FDD\u8BC1\u5BF9\u67D0\u4E2A\u5185\u5B58\u5730\u5740\u7684\u64CD\u4F5C\u662F\u539F\u5B50\u6027\u5373\u53EF\uFF0C\u4F46\u603B\u7EBF\u9501\u628A\u5904\u7406\u5668\u548C\u5185\u5B58\u4E4B\u95F4\u7684\u901A\u4FE1\u9501\u4F4F\u4E86\uFF0C\u8FD9\u4F7F\u5F97\u9501\u5B9A\u671F\u95F4\uFF0C\u5176\u4ED6\u5904\u7406\u5668\u4E0D\u80FD\u64CD\u4F5C\u5176\u4ED6\u5185\u5B58\u7684\u6570\u636E\uFF01\uFF01\u6240\u4EE5\u603B\u7EBF\u9501\u7684\u5F00\u9500\u5F88\u5927\uFF0C\u76EE\u524D\u5904\u7406\u5668\u5728\u67D0\u4E9B\u573A\u666F\u4E0B\u4F7F\u7528\u7F13\u5B58\u9501\u5B9A\u4EE3\u66FF\u603B\u7EBF\u9501\u5B9A\u6765\u8FDB\u884C\u4F18\u5316\u3002

                                                                    \u76EE\u524D\u5904\u7406\u5668\u90FD\u662F\u9501\u7F13\u5B58\u800C\u4E0D\u662F\u9501\u603B\u7EBF\u3002

                                                                  2. \u7F13\u5B58\u9501\u5B9A

                                                                    \u6240\u8C13\u7F13\u5B58\u9501\u5B9A\u662F\u6307\u5185\u5B58\u533A\u57DF\u5982\u679C\u88AB\u7F13\u5B58\u5728\u5904\u7406\u5668\u7684\u7F13\u5B58\u884C\uFF08CPU\u9AD8\u901F\u7F13\u5B58\uFF09\u4E2D\uFF0C\u5E76\u4E14\u5728Lock\u64CD\u4F5C\u671F\u95F4\u88AB\u9501\u5B9A\uFF0C\u90A3\u4E48\u5F53\u5B83\u6267\u884C\u9501\u64CD\u4F5C\u56DE\u5199\u5230\u5185\u5B58\u65F6\uFF0C\u4E0D\u5728\u603B\u7EBF\u4E0A\u58F0\u8A00\uFF08\u8F93\u51FA\uFF09LOCK # \u4FE1\u53F7\uFF0C\u5373\u4E0D\u6267\u884C\u603B\u7EBF\u9501\u5B9A\uFF0C\u800C\u662F\u4FEE\u6539\u5185\u90E8\u7684\u5185\u5B58\u5730\u5740\uFF0C\u5F53\u5176\u4ED6\u5904\u7406\u5668\u56DE\u5199\u5DF2\u88AB\u9501\u5B9A\u7684\u7F13\u5B58\u884C\u6570\u636E\u65F6\uFF0C\u4F1A\u4F7F\u7F13\u5B58\u884C\u65E0\u6548\uFF0C\u56E0\u4E3A\u5176\u4ED6\u5904\u7406\u5668\u7ECF\u8FC7\u55C5\u63A2\u5728\u603B\u7EBF\u4E0A\u4F20\u8F93\u7684\u6570\u636E\uFF0C\u53D1\u73B0\u81EA\u5DF1\u7F13\u5B58\u884C\u91CC\u7684\u6570\u636E\u5728\u5185\u5B58\u7684\u5730\u5740\u5DF2\u6539\u53D8\uFF0C\u8BF4\u660E\u6570\u636E\u5DF2\u5931\u6548\uFF0C\u5C31\u4F1A\u5C06\u5F53\u524D\u5904\u7406\u5668\u7684\u7F13\u5B58\u884C\u8BBE\u7F6E\u4E3A\u65E0\u6548\u72B6\u6001\u3002

                                                                    \u6709\u4E24\u79CD\u60C5\u51B5\u4E0B\u5904\u7406\u5668\u4E0D\u652F\u6301\u7F13\u5B58\u9501\u5B9A\uFF1A

                                                                    • \u5904\u7406\u5668\u672C\u8EAB\u4E0D\u652F\u6301\u3002
                                                                    • \u5F53\u64CD\u4F5C\u7684\u6570\u636E\u4E0D\u80FD\u88AB\u7F13\u5B58\u5728\u5904\u7406\u5668\u5185\u90E8\uFF0C\u6216\u64CD\u4F5C\u7684\u6570\u636E\u8DE8\u591A\u4E2A\u7F13\u5B58\u884C\u65F6\uFF0C\u5219\u5904\u7406\u5668\u4F1A\u8C03\u7528\u603B\u7EBF\u9501\u5B9A\u3002

                                                                  Java\u5982\u4F55\u5B9E\u73B0\u539F\u5B50\u64CD\u4F5C

                                                                  1. \u4F7F\u7528CAS\uFF0C\u4E0D\u65AD\u81EA\u65CB\u6BD4\u8F83\uFF0C\u76F4\u5230\u6210\u529F\u4E3A\u6B62\u3002

                                                                    \u95EE\u9898\uFF1A

                                                                    • ABA\u95EE\u9898---\u901A\u8FC7\u539F\u5B50\u5F15\u7528\u7C7B\u7684\u7248\u672C\u53F7\u673A\u5236\u6765\u89E3\u51B3\uFF0C\u5728\u53D8\u91CF\u524D\u9762\u8FFD\u52A0\u4E0A\u7248\u672C\u53F7\u3002

                                                                      AtomicStampedReference\u89E3\u51B3

                                                                    • \u5FAA\u73AF\u65F6\u95F4\u957F\uFF0C\u5F00\u9500\u5927

                                                                    • \u53EA\u80FD\u4FDD\u8BC1\u4E00\u4E2A\u5171\u4EAB\u53D8\u91CF\u7684\u539F\u5B50\u64CD\u4F5C\u3002

                                                                      \u5F53\u5BF9\u4E00\u4E2A\u5171\u4EAB\u53D8\u91CF\u6267\u884C\u64CD\u4F5C\u65F6\uFF0C\u6211\u4EEC\u53EF\u4EE5\u901A\u8FC7\u81EA\u65CBCAS\u6765\u4FDD\u8BC1\u539F\u5B50\u64CD\u4F5C\uFF0C\u4F46\u662F\u5BF9\u591A\u4E2A\u5171\u4EAB\u53D8\u91CF\u64CD\u4F5C\u65F6\uFF0C\u5FAA\u73AFCAS\u65E0\u6CD5\u4FDD\u8BC1\u539F\u5B50\u6027\uFF0C\u8FD9\u4E2A\u65F6\u5019\u53EF\u4EE5\u7528\u9501

                                                                      \u4ECEJDK1.5\u5F00\u59CB\uFF0CJDK\u63D0\u4F9B\u4E86AtomicReference\u7C7B\u6765\u4FDD\u8BC1\u5F15\u7528\u7C7B\u578B\u53D8\u91CF\u5373\u5BF9\u8C61\u7684\u64CD\u4F5C\u7684\u539F\u5B50\u6027\uFF0C\u6211\u4EEC\u5C31\u53EF\u4EE5\u628A\u591A\u4E2A\u53D8\u91CF\u653E\u5728\u4E00\u4E2A\u5BF9\u8C61\u91CC\uFF0C\u7136\u540E\u8FDB\u884CCAS\u64CD\u4F5C

                                                                  2. \u4F7F\u7528\u9501\u3002

                                                                    \u9664\u4E86\u504F\u5411\u9501\uFF0CJVM\u5B9E\u73B0\u9501\u7684\u65B9\u5F0F\u90FD\u7528\u4E86\u5FAA\u73AFCAS\uFF0C\u5373\u5F53\u4E00\u4E2A\u7EBF\u7A0B\u60F3\u8FDB\u5165\u540C\u6B65\u5757\u7684\u65F6\u5019\u4F7F\u7528\u5FAA\u73AFCAS\u7684\u65B9\u5F0F\u6765\u83B7\u53D6\u9501\uFF0C\u5F53\u5B83\u9000\u51FA\u540C\u6B65\u5757\u7684\u65F6\u5019\uFF0C\u4F7F\u7528\u5FAA\u73AFCAS\u6765\u91CA\u653E\u9501\u3002\u6BD4\u5982\u8F7B\u91CF\u7EA7\u9501\u5C31\u901A\u8FC7CAS\u7684\u65B9\u5F0F\u53BB\u5C06\u5BF9\u8C61\u7684mark word\u4EA4\u6362\u5230\u9501\u8BB0\u5F55\u7684\u9501\u5730\u5740\u90E8\u5206\uFF0C\u5C06\u9501\u8BB0\u5F55\u7684\u9501\u5730\u5740\u90E8\u5206\u79FB\u5230\u9501\u5BF9\u8C61\u7684mark word

                                                                  \u7B2C3\u7AE0 Java\u5185\u5B58\u6A21\u578B

                                                                  Java\u5185\u5B58\u6A21\u578B\u7684\u57FA\u7840

                                                                  \u901A\u4FE1\u548C\u540C\u6B65

                                                                  1. \u7EBF\u7A0B\u4E4B\u95F4\u7684\u901A\u4FE1\u548C\u7EBF\u7A0B\u4E4B\u95F4\u7684\u540C\u6B65\u662F\u4E24\u4E2A\u95EE\u9898\u3002

                                                                    \u901A\u4FE1\u662F\u6307\u7EBF\u7A0B\u4E4B\u95F4\u4EE5\u4F55\u79CD\u673A\u5236\u6765\u4EA4\u6362\u4FE1\u606F\u3002

                                                                    \u540C\u6B65\u662F\u6307\u7A0B\u5E8F\u4E2D\u7528\u4E8E\u63A7\u5236\u4E0D\u540C\u7EBF\u7A0B\u4E4B\u95F4\u64CD\u4F5C\u53D1\u751F\u76F8\u5BF9\u987A\u5E8F\u7684\u673A\u5236\u3002

                                                                    \u901A\u4FE1\u5F3A\u8C03\u7EBF\u7A0B\u95F4\u4EA4\u6362\u4FE1\u606F\uFF0C\u540C\u6B65\u5F3A\u8C03\u7EBF\u7A0B\u95F4\u7684\u64CD\u4F5C\u6267\u884C\u987A\u5E8F\u3002

                                                                  2. \u5728\u547D\u4EE4\u5F0F\u7F16\u7A0B\u4E2D\uFF0C\u7EBF\u7A0B\u4E4B\u95F4\u7684\u901A\u4FE1\u673A\u5236\u6709\u4E24\u79CD\uFF1A\u5171\u4EAB\u5185\u5B58\u548C\u6D88\u606F\u4F20\u9012\u3002

                                                                  3. \u5728\u5171\u4EAB\u5185\u5B58\u7684\u5E76\u53D1\u6A21\u578B\u91CC\uFF0C\u7EBF\u7A0B\u95F4\u7684\u901A\u4FE1\u662F\u9690\u5F0F\u7684\uFF0C\u7EBF\u7A0B\u95F4\u7684\u540C\u6B65\u662F\u663E\u5F0F\u7684\u3002

                                                                    \u5728\u6D88\u606F\u4F20\u9012\u7684\u5E76\u53D1\u6A21\u578B\u91CC\uFF0C\u7EBF\u7A0B\u95F4\u7684\u901A\u4FE1\u662F\u663E\u5F0F\u7684\uFF0C\u7EBF\u7A0B\u95F4\u7684\u540C\u6B65\u662F\u9690\u5F0F\u7684\u3002

                                                                    Java\u7684\u5E76\u53D1\u91C7\u7528\u7684\u662F\u5171\u4EAB\u5185\u5B58\u7684\u6A21\u578B\uFF0CJava\u7EBF\u7A0B\u4E4B\u95F4\u7684\u901A\u4FE1\u603B\u662F\u9690\u5F0F\u8FDB\u884C\u7684\uFF0C\u6574\u4E2A\u901A\u4FE1\u8FC7\u7A0B\u5BF9\u7A0B\u5E8F\u5458\u5B8C\u5168\u900F\u660E\u3002

                                                                  Java\u5185\u5B58\u6A21\u578B\u7684\u62BD\u8C61\u7ED3\u6784

                                                                  1. Java\u7EBF\u7A0B\u4E4B\u95F4\u7684\u901A\u4FE1\u7531Java\u5185\u5B58\u6A21\u578BJMM\u63A7\u5236\uFF0CJMM\u51B3\u5B9A\u4E00\u4E2A\u7EBF\u7A0B\u5BF9\u5171\u4EAB\u53D8\u91CF\u7684\u5199\u5165\u4F55\u65F6\u5BF9\u53E6\u4E00\u4E2A\u7EBF\u7A0B\u53EF\u89C1\u3002

                                                                    \u7EBF\u7A0B\u4E4B\u95F4\u7684\u5171\u4EAB\u53D8\u91CF\u5B58\u50A8\u5728\u4E3B\u5185\u5B58\u4E2D\uFF0C\u6BCF\u4E2A\u7EBF\u7A0B\u90FD\u6709\u4E00\u4E2A\u79C1\u6709\u7684\u672C\u5730\u5185\u5B58\uFF0C\u4E5F\u53EB\u5DE5\u4F5C\u5185\u5B58\uFF0C\u662F\u7EBF\u7A0B\u79C1\u6709\u7684\uFF0C\u5E76\u4E14\u672C\u5730\u5185\u5B58\u662F\u62BD\u8C61\u7684\u6982\u5FF5\uFF0C\u5E76\u4E0D\u771F\u5B9E\u5B58\u5728\u3002

                                                                    JVM\u4E2D\u7684\u8FD0\u884C\u65F6\u6570\u636E\u533A\u7684\u5806\u7A7A\u95F4\u5C31\u662F\u5171\u4EAB\u5185\u5B58\uFF0C\u662F\u7EBF\u7A0B\u95F4\u5171\u4EAB\u7684\uFF0C\u6240\u4EE5\u8BF4Java\u7684\u5E76\u53D1\u6A21\u578B\u662F\u5171\u4EAB\u5185\u5B58\u6A21\u578B\u3002\u6240\u4EE5\u4E3B\u5B58\u4E0D\u80FD\u8BF4\u662F\u62BD\u8C61\u7684\u3002

                                                                    JMM\u901A\u8FC7\u63A7\u5236\u4E3B\u5185\u5B58\u4E0E\u6BCF\u4E2A\u7EBF\u7A0B\u7684\u672C\u5730\u5185\u5B58\u4E4B\u95F4\u7684\u4EA4\u4E92\uFF0C\u6765\u63D0\u4F9B\u5404\u7EBF\u7A0B\u5BF9\u4E8E\u5171\u4EAB\u53D8\u91CF\u7684\u53EF\u89C1\u6027\u3002

                                                                  \u6307\u4EE4\u91CD\u6392\u5E8F

                                                                  1. \u5728\u6267\u884C\u7A0B\u5E8F\u65F6\uFF0C\u4E3A\u4E86\u63D0\u9AD8\u6027\u80FD\uFF0C\u7F16\u8BD1\u5668\u548C\u5904\u7406\u5668\u5E38\u5E38\u4F1A\u5BF9\u6307\u4EE4\u505A\u91CD\u6392\u5E8F\u3002

                                                                    \u91CD\u6392\u5E8F\u52063\u79CD\u7C7B\u578B\uFF1A

                                                                    • \u7F16\u8BD1\u5668\u4F18\u5316\u7684\u91CD\u6392\u5E8F

                                                                    • \u6307\u4EE4\u7EA7\u5E76\u884C\u7684\u91CD\u6392\u5E8F

                                                                      \u73B0\u4EE3\u5904\u7406\u5668\u91C7\u7528\u4E86\u6307\u4EE4\u7EA7\u5E76\u884C\u6280\u672F\uFF0C\u6765\u8BB2\u591A\u6761\u6307\u4EE4\u91CD\u53E0\u6267\u884C\uFF0C\u5982\u679C\u4E0D\u5B58\u5728\u6570\u636E\u4F9D\u8D56\u6027\uFF0C\u5904\u7406\u5668\u53EF\u4EE5\u6539\u53D8\u8BED\u53E5\u5BF9\u5E94\u673A\u5668\u6307\u4EE4\u7684\u6267\u884C\u987A\u5E8F

                                                                    • \u5185\u5B58\u7CFB\u7EDF\u7684\u91CD\u6392\u5E8F

                                                                    \u4E0A\u8FF0\u7684\u7B2C\u4E00\u79CD\u5C5E\u4E8E\u7F16\u8BD1\u5668\u91CD\u6392\u5E8F\uFF0C\u7B2C\u4E8C\u79CD\u548C\u7B2C\u4E09\u79CD\u5C5E\u4E8E\u5904\u7406\u5668\u91CD\u6392\u5E8F\u3002

                                                                  2. \u8FD9\u4E9B\u91CD\u6392\u5E8F\u53EF\u80FD\u5BFC\u81F4\u591A\u7EBF\u7A0B\u7A0B\u5E8F\u51FA\u73B0\u5185\u5B58\u53EF\u89C1\u6027\u95EE\u9898\u3002

                                                                    \u5BF9\u4E8E\u5904\u7406\u5668\u91CD\u6392\u5E8F\uFF0CJMM\u7684\u5904\u7406\u5668\u91CD\u6392\u5E8F\u89C4\u5219\u8981\u6C42Java\u7F16\u8BD1\u5668\u5728\u751F\u6210\u6307\u4EE4\u5E8F\u5217\u7684\u65F6\u5019\uFF0C\u63D2\u5165\u7279\u5B9A\u7C7B\u578B\u7684\u5185\u5B58\u5C4F\u969C\u6307\u4EE4\uFF0C\u901A\u8FC7\u5185\u5B58\u5C4F\u969C\u6307\u4EE4\u6765\u7981\u6B62\u7279\u5B9A\u7C7B\u578B\u7684\u5904\u7406\u5668\u91CD\u6392\u5E8F\u3002

                                                                    \u63D2\u5165\u5185\u5B58\u5C4F\u969C\u7684\u76EE\u7684\u662F\u7981\u6B62\u6307\u4EE4\u91CD\u6392\u5E8F\uFF0C\u6765\u89E3\u51B3\u5171\u4EAB\u53D8\u91CF\u5185\u5B58\u53EF\u89C1\u6027\u7684\u95EE\u9898\u3002

                                                                  3. \u5199\u7F13\u51B2\u533A\u5C31\u662F\u7EBF\u7A0B\u7684\u672C\u5730\u5185\u5B58\u6216\u8005\u8BF4\u5DE5\u4F5C\u5185\u5B58

                                                                  4. \u6307\u4EE4\u91CD\u6392\u5E8F\u53EF\u80FD\u4F1A\u6539\u53D8\u591A\u7EBF\u7A0B\u73AF\u5883\u4E0B\u7684\u7A0B\u5E8F\u7684\u6267\u884C\u7ED3\u679C\u3002

                                                                    \u7531\u4E8E\u6307\u4EE4\u91CD\u6392\u5E8F\uFF0C\u4F1A\u51FA\u73B0\u591A\u4E2A\u7EBF\u7A0B\u5BF9\u5171\u4EAB\u53D8\u91CF\u7684\u53EF\u89C1\u6027\u95EE\u9898\u3002

                                                                  happens-before

                                                                  1. JMM\u4F7F\u7528happens-before\u7684\u6982\u5FF5\uFF0C\u6765\u9610\u8FF0\u64CD\u4F5C\u4E4B\u95F4\u7684\u5185\u5B58\u53EF\u89C1\u6027\u3002

                                                                    JMM\u4E2D\uFF0C\u5982\u679C\u4E00\u4E2A\u64CD\u4F5C\u6267\u884C\u7684\u7ED3\u679C\u8981\u5BF9\u53E6\u4E00\u4E2A\u64CD\u4F5C\u53EF\u89C1\uFF0C\u90A3\u4E48\u8FD9\u4E24\u4E2A\u64CD\u4F5C\u4E4B\u95F4\u5FC5\u987B\u8981\u5B58\u5728happens-before\u5173\u7CFB\u3002\u8FD9\u91CC\u63D0\u5230\u7684\u4E24\u4E2A\u64CD\u4F5C\uFF0C\u53EF\u4EE5\u662F\u540C\u4E00\u4E2A\u7EBF\u7A0B\u5185\u7684\u64CD\u4F5C\uFF0C\u4E5F\u53EF\u4EE5\u662F\u4E24\u4E2A\u7EBF\u7A0B\u4E4B\u95F4\u7684\u3002

                                                                    happens-before\u89E3\u51B3\u7684\u662F\u64CD\u4F5C\u6267\u884C\u7684\u7ED3\u679C\u53EF\u89C1\u6027\u7684\u95EE\u9898\uFF01\uFF01

                                                                  2. \u4E24\u4E2A\u64CD\u4F5C\u4E4B\u95F4\u5177\u6709happens-before\u5173\u7CFB\uFF0C\u5E76\u4E0D\u610F\u5473\u7740\u524D\u4E00\u4E2A\u64CD\u4F5C\u7684\u6267\u884C\u5FC5\u987B\u5728\u540E\u4E00\u4E2A\u64CD\u4F5C\u4E4B\u524D\uFF0Chappens-before\u4EC5\u4EC5\u8981\u6C42\u94B1\u4E00\u4E2A\u64CD\u4F5C\u6267\u884C\u7684\u7ED3\u679C\u5BF9\u540E\u4E00\u4E2A\u64CD\u4F5C\u662F\u53EF\u89C1\u7684\uFF0C\u4E14\u524D\u4E00\u4E2A\u64CD\u4F5C\u6309\u987A\u5E8F\u6392\u5728\u540E\u4E00\u4E2A\u64CD\u4F5C\u4E4B\u524D\u3002

                                                                  3. happens-before\u89C4\u5219\uFF1A

                                                                    • \u7A0B\u5E8F\u987A\u5E8F\u89C4\u5219

                                                                      \u4E00\u4E2A\u7EBF\u7A0B\u4E2D\u7684\u6BCF\u4E2A\u64CD\u4F5C\uFF08\u8FD9\u91CC\u8BF4\u7684\u662F\u5355\u7EBF\u7A0B\uFF0C\u5E76\u4E14\u8BF4\u7684\u662F\u5B57\u8282\u7801\u6307\u4EE4\u5C42\u9762\u7684\uFF09\uFF0Chappens-before\u8FD9\u4E2A\u7EBF\u7A0B\u4E2D\u7684\u4EFB\u610F\u540E\u7EED\u64CD\u4F5C

                                                                    • \u76D1\u89C6\u5668\u9501\u89C4\u5219

                                                                      \u5BF9\u4E00\u4E2A\u9501\u7684\u89E3\u9501\uFF0Chappens-before\u968F\u540E\u5BF9\u8FD9\u4E2A\u9501\u7684\u4E0A\u9501

                                                                    • volatile\u89C4\u5219

                                                                      \u5BF9\u4E00\u4E2Avolatile\u53D8\u91CF\u7684\u5199\uFF0Chappens-before\u4EFB\u610F\u540E\u7EED\u5BF9\u8FD9\u4E2Avolatile\u53D8\u91CF\u7684\u8BFB\u3002\u8FD9\u91CC\u6D89\u53CA\u5230\u524D\u9762\u8BF4\u7684\u5185\u5B58\u5C4F\u969C\uFF0C\u4F5C\u7528\u662F\u7981\u6B62\u6307\u4EE4\u91CD\u6392\u5E8F\uFF0C\u4FDD\u8BC1\u5171\u4EAB\u53D8\u91CF\u5BF9\u4E8E\u5404\u4E2A\u7EBF\u7A0B\u7684\u53EF\u89C1\u6027\uFF01\uFF01\u91CD\u70B9\u5728\u4E8E\u901A\u8FC7\u5185\u5B58\u5C4F\u969C\uFF0C\u5C06\u7EBF\u7A0B\u672C\u5730\u5185\u5B58\u7684\u6570\u636E\u540C\u6B65\u5230\u4E3B\u5185\u5B58\u5373\u5171\u4EAB\u5185\u5B58\u3002

                                                                    • \u4F20\u9012\u89C4\u5219

                                                                  as-if-serial

                                                                  1. \u610F\u601D\u662F\u4E0D\u7BA1\u600E\u4E48\u6267\u884C\u6307\u4EE4\u91CD\u6392\u5E8F\uFF0C\u5355\u7EBF\u7A0B\u7684\u6267\u884C\u7ED3\u679C\u4E0D\u80FD\u88AB\u6539\u53D8\u3002

                                                                  \u987A\u5E8F\u4E00\u81F4\u6027

                                                                  \u987A\u5E8F\u4E00\u81F4\u6027\u5185\u5B58\u6A21\u578B

                                                                  1. \u8FD9\u662F\u4E00\u4E2A\u7406\u60F3\u5316\u7684\u7406\u8BBA\u53C2\u8003\u6A21\u578B\uFF0C\u6709\u4EE5\u4E0B\u4E24\u70B9\u7279\u5F81

                                                                    • \u4E00\u4E2A\u7EBF\u7A0B\u4E2D\u7684\u6240\u6709\u64CD\u4F5C\u5FC5\u987B\u6309\u7167\u7A0B\u5E8F\u7684\u987A\u5E8F\u6765\u6267\u884C
                                                                    • \u4E0D\u7BA1\u7A0B\u5E8F\u662F\u5426\u540C\u6B65\uFF0C\u6240\u6709\u7EBF\u7A0B\u90FD\u53EA\u80FD\u770B\u5230\u4E00\u4E2A\u5355\u4E00\u7684\u64CD\u4F5C\u6267\u884C\u987A\u5E8F\u3002
                                                                  2. \u5728JMM\u4E2D\uFF0C\u6CA1\u6709\u4EE5\u4E0A\u4E24\u70B9\u4FDD\u8BC1\uFF0C\u5BF9\u4E8E\u672A\u540C\u6B65\u7A0B\u5E8F\u6765\u8BF4\uFF0C\u4E0D\u4EC5\u6574\u4F53\u6267\u884C\u987A\u5E8F\u662F\u65E0\u5E8F\u7684\uFF0C\u800C\u4E14\u6240\u6709\u7EBF\u7A0B\u770B\u5230\u7684\u64CD\u4F5C\u6267\u884C\u987A\u5E8F\u4E5F\u53EF\u80FD\u4E0D\u4E00\u81F4\u3002

                                                                  3. \u82E5\u662F\u672A\u540C\u6B65\u7A0B\u5E8F\uFF1A

                                                                    • \u5BF9\u4E8E\u5355\u7EBF\u7A0B\uFF0C\u5728\u987A\u5E8F\u4E00\u81F4\u6027\u6A21\u578B\u4E2D\uFF0C\u53EF\u4EE5\u786E\u5B9A\u7A0B\u5E8F\u6267\u884C\u987A\u5E8F\uFF0C\u5728JMM\u4E2D\uFF0C\u53EF\u80FD\u51FA\u73B0\u6307\u4EE4\u91CD\u6392\u5E8F\u3002
                                                                    • \u987A\u5E8F\u4E00\u81F4\u6027\u6A21\u578B\u80FD\u4FDD\u8BC1\u6240\u6709\u7EBF\u7A0B\u770B\u5230\u4E00\u81F4\u7684\u7A0B\u5E8F\u6267\u884C\u987A\u5E8F\uFF0C\u5C3D\u7BA1\u4ED6\u4EEC\u672A\u540C\u6B65\uFF0C\u800CJMM\u4E0D\u884C\u3002
                                                                  ',28);function l(r,h){return p}var o=a(i,[["render",l],["__file","\u300A\u5E76\u53D1\u7F16\u7A0B\u7684\u827A\u672F\u300B\u7B14\u8BB0.html.vue"]]);export{o as default}; +import{_ as a,e}from"./app.f8791b52.js";const i={},p=e('

                                                                  \u7B2C2\u7AE0 Java\u5E76\u53D1\u673A\u5236\u7684\u5E95\u5C42\u5B9E\u73B0\u539F\u7406

                                                                  \u9501\u7684\u5347\u7EA7\u548C\u5BF9\u6BD4

                                                                  \u504F\u5411\u9501

                                                                  1. \u504F\u5411\u9501

                                                                    \u504F\u5411\u9501\u7684\u672C\u8D28\u4E0A\u662F\u53EA\u6709\u4E00\u4E2A\u7EBF\u7A0B\uFF0C\u8FD9\u4E2A\u7EBF\u7A0B\u5728\u91CD\u590D\u83B7\u5F97\u8FD9\u4E2A\u9501\u5BF9\u8C61\u65F6\uFF08\u53EF\u91CD\u5165\uFF09\uFF0C\u5982\u679C\u6839\u636E\u9501\u5BF9\u8C61\u7684\u5BF9\u8C61\u5934\u7684\u8FD0\u884C\u65F6\u5143\u6570\u636Emark word\u91CC\u8BB0\u5F55\u7684\u7EBF\u7A0BID\uFF0C\u53D1\u73B0\u9501\u5BF9\u8C61\u5DF2\u7ECF\u8BB0\u5F55\u4E86\u5F53\u524D\u7EBF\u7A0B\u7684\u7EBF\u7A0BID\uFF0C\u90A3\u4E48\u4E0D\u4F1A\u518D\u901A\u8FC7CAS\u6765\u64CD\u4F5C\u52A0\u9501\u548C\u89E3\u9501\uFF0C\u51CF\u5C11\u4E86\u5F00\u9500\uFF01

                                                                    \u5982\u679C\u6709\u591A\u4E2A\u7EBF\u7A0B\u6765\u7ADE\u4E89\u9501\uFF0C\u90A3\u4E48\u4F1A\u8FDB\u884C\u9501\u7684\u5347\u7EA7\uFF0C\u7531\u504F\u5411\u9501\u5347\u7EA7\u4E3A\u8F7B\u91CF\u7EA7\u9501\u3002

                                                                  2. \u504F\u5411\u9501\u7684\u64A4\u9500

                                                                    \u504F\u5411\u9501\u4F7F\u7528\u4E86\u4E00\u79CD\u7B49\u5230\u7ADE\u4E89\u51FA\u73B0\u624D\u91CA\u653E\u9501\u7684\u673A\u5236\uFF0C\u6240\u4EE5\u5F53\u6709\u5176\u4ED6\u7EBF\u7A0B\u5C1D\u8BD5\u7ADE\u4E89\u504F\u5411\u9501\u65F6\uFF0C\u6301\u6709\u504F\u5411\u9501\u7684\u7EBF\u7A0B\u624D\u4F1A\u91CA\u653E\u9501\uFF0C\u5C06\u5BF9\u8C61\u5934\u7684\u9501\u6807\u5FD7\u4F4D\u8BBE\u7F6E\u6210\u65E0\u9501\u72B6\u6001\u3002

                                                                  \u8F7B\u91CF\u7EA7\u9501

                                                                  1. \u8F7B\u91CF\u7EA7\u9501\u81A8\u80C0\uFF0C\u5347\u7EA7\u6210\u91CD\u91CF\u7EA7\u9501\uFF0C\u662F\u5728\u8F7B\u91CF\u7EA7\u9501\u89E3\u9501\u9636\u6BB5

                                                                    \u8F7B\u91CF\u7EA7\u9501\u89E3\u9501\u65F6\uFF0C\u4F1A\u4F7F\u7528\u539F\u5B50\u7684CAS\u64CD\u4F5C\uFF08\u8FD9\u91CC\u662F\u63CF\u8FF0CAS\u8FD9\u4E2A\u64CD\u4F5C\u662F\u539F\u5B50\u7684\uFF0C\u800CJava\u539F\u5B50\u7C7Batom\u7C7B\u7684\u5B9E\u73B0\u539F\u7406\u4FBF\u662F\u901A\u8FC7CAS\uFF09\uFF0C\u5C06\u56E0\u4E3A\u8F7B\u91CF\u7EA7\u9501\u800C\u5B58\u50A8\u5728\u6808\u5E27\u7684\u9501\u8BB0\u5F55\u91CC\u7684\u9501\u5730\u5740\u548C\u6807\u5FD7\u4F4D\u90E8\u5206\u7684mark word\u4EA4\u6362\u56DE\u53BB\uFF0C\u5373\u66FF\u6362\u56DE\u5BF9\u8C61\u5934\uFF0C\u5982\u679C\u6210\u529F\uFF0C\u5219\u8868\u793A\u6CA1\u6709\u7ADE\u4E89\u53D1\u751F\uFF0C\u5982\u679C\u5931\u8D25\uFF0C\u8868\u793A\u5F53\u524D\u9501\u5B58\u5728\u7ADE\u4E89\uFF0C\u9501\u5C31\u4F1A\u81A8\u80C0\u6210\u91CD\u91CF\u7EA7\u9501\u3002

                                                                  2. Java\u539F\u5B50\u7C7B\u7684\u539F\u5B50\u64CD\u4F5C\u662F\u901A\u8FC7CAS\u5B9E\u73B0\u7684\u3002

                                                                  volatile\u5B9E\u73B0\u539F\u7406

                                                                  1. Lock\u524D\u7F00\u6307\u4EE4\u4F1A\u5F15\u8D77\u5904\u7406\u5668\u7F13\u5B58\u56DE\u5199\u5230\u5185\u5B58

                                                                  2. \u4E00\u4E2A\u5904\u7406\u5668\u7684\u7F13\u5B58\u56DE\u5199\u5230\u5185\u5B58\u4F1A\u5BFC\u81F4\u5176\u4ED6\u5904\u7406\u5668\u7684\u7F13\u5B58\u884C\u7684\u6570\u636E\u65E0\u6548

                                                                    \u5904\u7406\u5668\u4F7F\u7528\u55C5\u63A2\u6280\u672F\u4FDD\u8BC1\u5B83\u7684\u5185\u90E8\u7F13\u5B58\u3001\u7CFB\u7EDF\u5185\u5B58\u548C\u5176\u4ED6\u5904\u7406\u5668\u7684\u7F13\u5B58\u7684\u6570\u636E\u5728\u603B\u7EBF\u4E0A\u4FDD\u6301\u4E00\u81F4\u3002

                                                                    \u4EE5\u4E0A\u4E24\u6761\u5C31\u662F\u8BF4\u7684\u7F13\u5B58\u9501\u3002

                                                                  3. \u7F13\u5B58\u4E00\u81F4\u6027\u534F\u8BAE\uFF1A

                                                                    \u7CFB\u7EDF\u963B\u6B62\u540C\u65F6\u4FEE\u6539\u7531\u4E24\u4E2A\u6216\u4EE5\u4E0A\u5904\u7406\u5668\u7F13\u5B58\u7684\u5185\u5B58\u533A\u57DF\u6570\u636E

                                                                  \u539F\u5B50\u64CD\u4F5C\u7684\u5B9E\u73B0\u539F\u7406

                                                                  \u603B\u7EBF\u9501\u548C\u7F13\u5B58\u9501

                                                                  1. \u603B\u7EBF\u9501\u5B9A

                                                                    \u6240\u8C13\u603B\u7EBF\u9501\u5C31\u662F\u4F7F\u7528\u5904\u7406\u5668\u63D0\u4F9B\u7684\u4E00\u4E2ALOCK #\u4FE1\u53F7\uFF0C\u5F53\u8BE5\u5904\u7406\u5668\u5728\u603B\u7EBF\u4E0A\u8F93\u51FA\u6B64\u4FE1\u53F7\u65F6\uFF0C\u5176\u4ED6\u5904\u7406\u5668\u7684\u8BF7\u6C42\u5C06\u88AB\u963B\u585E\u4F4F\uFF0C\u4E0D\u80FD\u548C\u5185\u5B58\u8FDB\u884C\u901A\u4FE1\uFF0C\u90A3\u4E48\u8BE5\u5904\u7406\u5668\u53EF\u4EE5\u72EC\u5360\u5171\u4EAB\u5185\u5B58\u3002

                                                                    \u5728\u540C\u4E00\u65F6\u523B\uFF0C\u6211\u4EEC\u53EA\u9700\u4FDD\u8BC1\u5BF9\u67D0\u4E2A\u5185\u5B58\u5730\u5740\u7684\u64CD\u4F5C\u662F\u539F\u5B50\u6027\u5373\u53EF\uFF0C\u4F46\u603B\u7EBF\u9501\u628A\u5904\u7406\u5668\u548C\u5185\u5B58\u4E4B\u95F4\u7684\u901A\u4FE1\u9501\u4F4F\u4E86\uFF0C\u8FD9\u4F7F\u5F97\u9501\u5B9A\u671F\u95F4\uFF0C\u5176\u4ED6\u5904\u7406\u5668\u4E0D\u80FD\u64CD\u4F5C\u5176\u4ED6\u5185\u5B58\u7684\u6570\u636E\uFF01\uFF01\u6240\u4EE5\u603B\u7EBF\u9501\u7684\u5F00\u9500\u5F88\u5927\uFF0C\u76EE\u524D\u5904\u7406\u5668\u5728\u67D0\u4E9B\u573A\u666F\u4E0B\u4F7F\u7528\u7F13\u5B58\u9501\u5B9A\u4EE3\u66FF\u603B\u7EBF\u9501\u5B9A\u6765\u8FDB\u884C\u4F18\u5316\u3002

                                                                    \u76EE\u524D\u5904\u7406\u5668\u90FD\u662F\u9501\u7F13\u5B58\u800C\u4E0D\u662F\u9501\u603B\u7EBF\u3002

                                                                  2. \u7F13\u5B58\u9501\u5B9A

                                                                    \u6240\u8C13\u7F13\u5B58\u9501\u5B9A\u662F\u6307\u5185\u5B58\u533A\u57DF\u5982\u679C\u88AB\u7F13\u5B58\u5728\u5904\u7406\u5668\u7684\u7F13\u5B58\u884C\uFF08CPU\u9AD8\u901F\u7F13\u5B58\uFF09\u4E2D\uFF0C\u5E76\u4E14\u5728Lock\u64CD\u4F5C\u671F\u95F4\u88AB\u9501\u5B9A\uFF0C\u90A3\u4E48\u5F53\u5B83\u6267\u884C\u9501\u64CD\u4F5C\u56DE\u5199\u5230\u5185\u5B58\u65F6\uFF0C\u4E0D\u5728\u603B\u7EBF\u4E0A\u58F0\u8A00\uFF08\u8F93\u51FA\uFF09LOCK # \u4FE1\u53F7\uFF0C\u5373\u4E0D\u6267\u884C\u603B\u7EBF\u9501\u5B9A\uFF0C\u800C\u662F\u4FEE\u6539\u5185\u90E8\u7684\u5185\u5B58\u5730\u5740\uFF0C\u5F53\u5176\u4ED6\u5904\u7406\u5668\u56DE\u5199\u5DF2\u88AB\u9501\u5B9A\u7684\u7F13\u5B58\u884C\u6570\u636E\u65F6\uFF0C\u4F1A\u4F7F\u7F13\u5B58\u884C\u65E0\u6548\uFF0C\u56E0\u4E3A\u5176\u4ED6\u5904\u7406\u5668\u7ECF\u8FC7\u55C5\u63A2\u5728\u603B\u7EBF\u4E0A\u4F20\u8F93\u7684\u6570\u636E\uFF0C\u53D1\u73B0\u81EA\u5DF1\u7F13\u5B58\u884C\u91CC\u7684\u6570\u636E\u5728\u5185\u5B58\u7684\u5730\u5740\u5DF2\u6539\u53D8\uFF0C\u8BF4\u660E\u6570\u636E\u5DF2\u5931\u6548\uFF0C\u5C31\u4F1A\u5C06\u5F53\u524D\u5904\u7406\u5668\u7684\u7F13\u5B58\u884C\u8BBE\u7F6E\u4E3A\u65E0\u6548\u72B6\u6001\u3002

                                                                    \u6709\u4E24\u79CD\u60C5\u51B5\u4E0B\u5904\u7406\u5668\u4E0D\u652F\u6301\u7F13\u5B58\u9501\u5B9A\uFF1A

                                                                    • \u5904\u7406\u5668\u672C\u8EAB\u4E0D\u652F\u6301\u3002
                                                                    • \u5F53\u64CD\u4F5C\u7684\u6570\u636E\u4E0D\u80FD\u88AB\u7F13\u5B58\u5728\u5904\u7406\u5668\u5185\u90E8\uFF0C\u6216\u64CD\u4F5C\u7684\u6570\u636E\u8DE8\u591A\u4E2A\u7F13\u5B58\u884C\u65F6\uFF0C\u5219\u5904\u7406\u5668\u4F1A\u8C03\u7528\u603B\u7EBF\u9501\u5B9A\u3002

                                                                  Java\u5982\u4F55\u5B9E\u73B0\u539F\u5B50\u64CD\u4F5C

                                                                  1. \u4F7F\u7528CAS\uFF0C\u4E0D\u65AD\u81EA\u65CB\u6BD4\u8F83\uFF0C\u76F4\u5230\u6210\u529F\u4E3A\u6B62\u3002

                                                                    \u95EE\u9898\uFF1A

                                                                    • ABA\u95EE\u9898---\u901A\u8FC7\u539F\u5B50\u5F15\u7528\u7C7B\u7684\u7248\u672C\u53F7\u673A\u5236\u6765\u89E3\u51B3\uFF0C\u5728\u53D8\u91CF\u524D\u9762\u8FFD\u52A0\u4E0A\u7248\u672C\u53F7\u3002

                                                                      AtomicStampedReference\u89E3\u51B3

                                                                    • \u5FAA\u73AF\u65F6\u95F4\u957F\uFF0C\u5F00\u9500\u5927

                                                                    • \u53EA\u80FD\u4FDD\u8BC1\u4E00\u4E2A\u5171\u4EAB\u53D8\u91CF\u7684\u539F\u5B50\u64CD\u4F5C\u3002

                                                                      \u5F53\u5BF9\u4E00\u4E2A\u5171\u4EAB\u53D8\u91CF\u6267\u884C\u64CD\u4F5C\u65F6\uFF0C\u6211\u4EEC\u53EF\u4EE5\u901A\u8FC7\u81EA\u65CBCAS\u6765\u4FDD\u8BC1\u539F\u5B50\u64CD\u4F5C\uFF0C\u4F46\u662F\u5BF9\u591A\u4E2A\u5171\u4EAB\u53D8\u91CF\u64CD\u4F5C\u65F6\uFF0C\u5FAA\u73AFCAS\u65E0\u6CD5\u4FDD\u8BC1\u539F\u5B50\u6027\uFF0C\u8FD9\u4E2A\u65F6\u5019\u53EF\u4EE5\u7528\u9501

                                                                      \u4ECEJDK1.5\u5F00\u59CB\uFF0CJDK\u63D0\u4F9B\u4E86AtomicReference\u7C7B\u6765\u4FDD\u8BC1\u5F15\u7528\u7C7B\u578B\u53D8\u91CF\u5373\u5BF9\u8C61\u7684\u64CD\u4F5C\u7684\u539F\u5B50\u6027\uFF0C\u6211\u4EEC\u5C31\u53EF\u4EE5\u628A\u591A\u4E2A\u53D8\u91CF\u653E\u5728\u4E00\u4E2A\u5BF9\u8C61\u91CC\uFF0C\u7136\u540E\u8FDB\u884CCAS\u64CD\u4F5C

                                                                  2. \u4F7F\u7528\u9501\u3002

                                                                    \u9664\u4E86\u504F\u5411\u9501\uFF0CJVM\u5B9E\u73B0\u9501\u7684\u65B9\u5F0F\u90FD\u7528\u4E86\u5FAA\u73AFCAS\uFF0C\u5373\u5F53\u4E00\u4E2A\u7EBF\u7A0B\u60F3\u8FDB\u5165\u540C\u6B65\u5757\u7684\u65F6\u5019\u4F7F\u7528\u5FAA\u73AFCAS\u7684\u65B9\u5F0F\u6765\u83B7\u53D6\u9501\uFF0C\u5F53\u5B83\u9000\u51FA\u540C\u6B65\u5757\u7684\u65F6\u5019\uFF0C\u4F7F\u7528\u5FAA\u73AFCAS\u6765\u91CA\u653E\u9501\u3002\u6BD4\u5982\u8F7B\u91CF\u7EA7\u9501\u5C31\u901A\u8FC7CAS\u7684\u65B9\u5F0F\u53BB\u5C06\u5BF9\u8C61\u7684mark word\u4EA4\u6362\u5230\u9501\u8BB0\u5F55\u7684\u9501\u5730\u5740\u90E8\u5206\uFF0C\u5C06\u9501\u8BB0\u5F55\u7684\u9501\u5730\u5740\u90E8\u5206\u79FB\u5230\u9501\u5BF9\u8C61\u7684mark word

                                                                  \u7B2C3\u7AE0 Java\u5185\u5B58\u6A21\u578B

                                                                  Java\u5185\u5B58\u6A21\u578B\u7684\u57FA\u7840

                                                                  \u901A\u4FE1\u548C\u540C\u6B65

                                                                  1. \u7EBF\u7A0B\u4E4B\u95F4\u7684\u901A\u4FE1\u548C\u7EBF\u7A0B\u4E4B\u95F4\u7684\u540C\u6B65\u662F\u4E24\u4E2A\u95EE\u9898\u3002

                                                                    \u901A\u4FE1\u662F\u6307\u7EBF\u7A0B\u4E4B\u95F4\u4EE5\u4F55\u79CD\u673A\u5236\u6765\u4EA4\u6362\u4FE1\u606F\u3002

                                                                    \u540C\u6B65\u662F\u6307\u7A0B\u5E8F\u4E2D\u7528\u4E8E\u63A7\u5236\u4E0D\u540C\u7EBF\u7A0B\u4E4B\u95F4\u64CD\u4F5C\u53D1\u751F\u76F8\u5BF9\u987A\u5E8F\u7684\u673A\u5236\u3002

                                                                    \u901A\u4FE1\u5F3A\u8C03\u7EBF\u7A0B\u95F4\u4EA4\u6362\u4FE1\u606F\uFF0C\u540C\u6B65\u5F3A\u8C03\u7EBF\u7A0B\u95F4\u7684\u64CD\u4F5C\u6267\u884C\u987A\u5E8F\u3002

                                                                  2. \u5728\u547D\u4EE4\u5F0F\u7F16\u7A0B\u4E2D\uFF0C\u7EBF\u7A0B\u4E4B\u95F4\u7684\u901A\u4FE1\u673A\u5236\u6709\u4E24\u79CD\uFF1A\u5171\u4EAB\u5185\u5B58\u548C\u6D88\u606F\u4F20\u9012\u3002

                                                                  3. \u5728\u5171\u4EAB\u5185\u5B58\u7684\u5E76\u53D1\u6A21\u578B\u91CC\uFF0C\u7EBF\u7A0B\u95F4\u7684\u901A\u4FE1\u662F\u9690\u5F0F\u7684\uFF0C\u7EBF\u7A0B\u95F4\u7684\u540C\u6B65\u662F\u663E\u5F0F\u7684\u3002

                                                                    \u5728\u6D88\u606F\u4F20\u9012\u7684\u5E76\u53D1\u6A21\u578B\u91CC\uFF0C\u7EBF\u7A0B\u95F4\u7684\u901A\u4FE1\u662F\u663E\u5F0F\u7684\uFF0C\u7EBF\u7A0B\u95F4\u7684\u540C\u6B65\u662F\u9690\u5F0F\u7684\u3002

                                                                    Java\u7684\u5E76\u53D1\u91C7\u7528\u7684\u662F\u5171\u4EAB\u5185\u5B58\u7684\u6A21\u578B\uFF0CJava\u7EBF\u7A0B\u4E4B\u95F4\u7684\u901A\u4FE1\u603B\u662F\u9690\u5F0F\u8FDB\u884C\u7684\uFF0C\u6574\u4E2A\u901A\u4FE1\u8FC7\u7A0B\u5BF9\u7A0B\u5E8F\u5458\u5B8C\u5168\u900F\u660E\u3002

                                                                  Java\u5185\u5B58\u6A21\u578B\u7684\u62BD\u8C61\u7ED3\u6784

                                                                  1. Java\u7EBF\u7A0B\u4E4B\u95F4\u7684\u901A\u4FE1\u7531Java\u5185\u5B58\u6A21\u578BJMM\u63A7\u5236\uFF0CJMM\u51B3\u5B9A\u4E00\u4E2A\u7EBF\u7A0B\u5BF9\u5171\u4EAB\u53D8\u91CF\u7684\u5199\u5165\u4F55\u65F6\u5BF9\u53E6\u4E00\u4E2A\u7EBF\u7A0B\u53EF\u89C1\u3002

                                                                    \u7EBF\u7A0B\u4E4B\u95F4\u7684\u5171\u4EAB\u53D8\u91CF\u5B58\u50A8\u5728\u4E3B\u5185\u5B58\u4E2D\uFF0C\u6BCF\u4E2A\u7EBF\u7A0B\u90FD\u6709\u4E00\u4E2A\u79C1\u6709\u7684\u672C\u5730\u5185\u5B58\uFF0C\u4E5F\u53EB\u5DE5\u4F5C\u5185\u5B58\uFF0C\u662F\u7EBF\u7A0B\u79C1\u6709\u7684\uFF0C\u5E76\u4E14\u672C\u5730\u5185\u5B58\u662F\u62BD\u8C61\u7684\u6982\u5FF5\uFF0C\u5E76\u4E0D\u771F\u5B9E\u5B58\u5728\u3002

                                                                    JVM\u4E2D\u7684\u8FD0\u884C\u65F6\u6570\u636E\u533A\u7684\u5806\u7A7A\u95F4\u5C31\u662F\u5171\u4EAB\u5185\u5B58\uFF0C\u662F\u7EBF\u7A0B\u95F4\u5171\u4EAB\u7684\uFF0C\u6240\u4EE5\u8BF4Java\u7684\u5E76\u53D1\u6A21\u578B\u662F\u5171\u4EAB\u5185\u5B58\u6A21\u578B\u3002\u6240\u4EE5\u4E3B\u5B58\u4E0D\u80FD\u8BF4\u662F\u62BD\u8C61\u7684\u3002

                                                                    JMM\u901A\u8FC7\u63A7\u5236\u4E3B\u5185\u5B58\u4E0E\u6BCF\u4E2A\u7EBF\u7A0B\u7684\u672C\u5730\u5185\u5B58\u4E4B\u95F4\u7684\u4EA4\u4E92\uFF0C\u6765\u63D0\u4F9B\u5404\u7EBF\u7A0B\u5BF9\u4E8E\u5171\u4EAB\u53D8\u91CF\u7684\u53EF\u89C1\u6027\u3002

                                                                  \u6307\u4EE4\u91CD\u6392\u5E8F

                                                                  1. \u5728\u6267\u884C\u7A0B\u5E8F\u65F6\uFF0C\u4E3A\u4E86\u63D0\u9AD8\u6027\u80FD\uFF0C\u7F16\u8BD1\u5668\u548C\u5904\u7406\u5668\u5E38\u5E38\u4F1A\u5BF9\u6307\u4EE4\u505A\u91CD\u6392\u5E8F\u3002

                                                                    \u91CD\u6392\u5E8F\u52063\u79CD\u7C7B\u578B\uFF1A

                                                                    • \u7F16\u8BD1\u5668\u4F18\u5316\u7684\u91CD\u6392\u5E8F

                                                                    • \u6307\u4EE4\u7EA7\u5E76\u884C\u7684\u91CD\u6392\u5E8F

                                                                      \u73B0\u4EE3\u5904\u7406\u5668\u91C7\u7528\u4E86\u6307\u4EE4\u7EA7\u5E76\u884C\u6280\u672F\uFF0C\u6765\u8BB2\u591A\u6761\u6307\u4EE4\u91CD\u53E0\u6267\u884C\uFF0C\u5982\u679C\u4E0D\u5B58\u5728\u6570\u636E\u4F9D\u8D56\u6027\uFF0C\u5904\u7406\u5668\u53EF\u4EE5\u6539\u53D8\u8BED\u53E5\u5BF9\u5E94\u673A\u5668\u6307\u4EE4\u7684\u6267\u884C\u987A\u5E8F

                                                                    • \u5185\u5B58\u7CFB\u7EDF\u7684\u91CD\u6392\u5E8F

                                                                    \u4E0A\u8FF0\u7684\u7B2C\u4E00\u79CD\u5C5E\u4E8E\u7F16\u8BD1\u5668\u91CD\u6392\u5E8F\uFF0C\u7B2C\u4E8C\u79CD\u548C\u7B2C\u4E09\u79CD\u5C5E\u4E8E\u5904\u7406\u5668\u91CD\u6392\u5E8F\u3002

                                                                  2. \u8FD9\u4E9B\u91CD\u6392\u5E8F\u53EF\u80FD\u5BFC\u81F4\u591A\u7EBF\u7A0B\u7A0B\u5E8F\u51FA\u73B0\u5185\u5B58\u53EF\u89C1\u6027\u95EE\u9898\u3002

                                                                    \u5BF9\u4E8E\u5904\u7406\u5668\u91CD\u6392\u5E8F\uFF0CJMM\u7684\u5904\u7406\u5668\u91CD\u6392\u5E8F\u89C4\u5219\u8981\u6C42Java\u7F16\u8BD1\u5668\u5728\u751F\u6210\u6307\u4EE4\u5E8F\u5217\u7684\u65F6\u5019\uFF0C\u63D2\u5165\u7279\u5B9A\u7C7B\u578B\u7684\u5185\u5B58\u5C4F\u969C\u6307\u4EE4\uFF0C\u901A\u8FC7\u5185\u5B58\u5C4F\u969C\u6307\u4EE4\u6765\u7981\u6B62\u7279\u5B9A\u7C7B\u578B\u7684\u5904\u7406\u5668\u91CD\u6392\u5E8F\u3002

                                                                    \u63D2\u5165\u5185\u5B58\u5C4F\u969C\u7684\u76EE\u7684\u662F\u7981\u6B62\u6307\u4EE4\u91CD\u6392\u5E8F\uFF0C\u6765\u89E3\u51B3\u5171\u4EAB\u53D8\u91CF\u5185\u5B58\u53EF\u89C1\u6027\u7684\u95EE\u9898\u3002

                                                                  3. \u5199\u7F13\u51B2\u533A\u5C31\u662F\u7EBF\u7A0B\u7684\u672C\u5730\u5185\u5B58\u6216\u8005\u8BF4\u5DE5\u4F5C\u5185\u5B58

                                                                  4. \u6307\u4EE4\u91CD\u6392\u5E8F\u53EF\u80FD\u4F1A\u6539\u53D8\u591A\u7EBF\u7A0B\u73AF\u5883\u4E0B\u7684\u7A0B\u5E8F\u7684\u6267\u884C\u7ED3\u679C\u3002

                                                                    \u7531\u4E8E\u6307\u4EE4\u91CD\u6392\u5E8F\uFF0C\u4F1A\u51FA\u73B0\u591A\u4E2A\u7EBF\u7A0B\u5BF9\u5171\u4EAB\u53D8\u91CF\u7684\u53EF\u89C1\u6027\u95EE\u9898\u3002

                                                                  happens-before

                                                                  1. JMM\u4F7F\u7528happens-before\u7684\u6982\u5FF5\uFF0C\u6765\u9610\u8FF0\u64CD\u4F5C\u4E4B\u95F4\u7684\u5185\u5B58\u53EF\u89C1\u6027\u3002

                                                                    JMM\u4E2D\uFF0C\u5982\u679C\u4E00\u4E2A\u64CD\u4F5C\u6267\u884C\u7684\u7ED3\u679C\u8981\u5BF9\u53E6\u4E00\u4E2A\u64CD\u4F5C\u53EF\u89C1\uFF0C\u90A3\u4E48\u8FD9\u4E24\u4E2A\u64CD\u4F5C\u4E4B\u95F4\u5FC5\u987B\u8981\u5B58\u5728happens-before\u5173\u7CFB\u3002\u8FD9\u91CC\u63D0\u5230\u7684\u4E24\u4E2A\u64CD\u4F5C\uFF0C\u53EF\u4EE5\u662F\u540C\u4E00\u4E2A\u7EBF\u7A0B\u5185\u7684\u64CD\u4F5C\uFF0C\u4E5F\u53EF\u4EE5\u662F\u4E24\u4E2A\u7EBF\u7A0B\u4E4B\u95F4\u7684\u3002

                                                                    happens-before\u89E3\u51B3\u7684\u662F\u64CD\u4F5C\u6267\u884C\u7684\u7ED3\u679C\u53EF\u89C1\u6027\u7684\u95EE\u9898\uFF01\uFF01

                                                                  2. \u4E24\u4E2A\u64CD\u4F5C\u4E4B\u95F4\u5177\u6709happens-before\u5173\u7CFB\uFF0C\u5E76\u4E0D\u610F\u5473\u7740\u524D\u4E00\u4E2A\u64CD\u4F5C\u7684\u6267\u884C\u5FC5\u987B\u5728\u540E\u4E00\u4E2A\u64CD\u4F5C\u4E4B\u524D\uFF0Chappens-before\u4EC5\u4EC5\u8981\u6C42\u94B1\u4E00\u4E2A\u64CD\u4F5C\u6267\u884C\u7684\u7ED3\u679C\u5BF9\u540E\u4E00\u4E2A\u64CD\u4F5C\u662F\u53EF\u89C1\u7684\uFF0C\u4E14\u524D\u4E00\u4E2A\u64CD\u4F5C\u6309\u987A\u5E8F\u6392\u5728\u540E\u4E00\u4E2A\u64CD\u4F5C\u4E4B\u524D\u3002

                                                                  3. happens-before\u89C4\u5219\uFF1A

                                                                    • \u7A0B\u5E8F\u987A\u5E8F\u89C4\u5219

                                                                      \u4E00\u4E2A\u7EBF\u7A0B\u4E2D\u7684\u6BCF\u4E2A\u64CD\u4F5C\uFF08\u8FD9\u91CC\u8BF4\u7684\u662F\u5355\u7EBF\u7A0B\uFF0C\u5E76\u4E14\u8BF4\u7684\u662F\u5B57\u8282\u7801\u6307\u4EE4\u5C42\u9762\u7684\uFF09\uFF0Chappens-before\u8FD9\u4E2A\u7EBF\u7A0B\u4E2D\u7684\u4EFB\u610F\u540E\u7EED\u64CD\u4F5C

                                                                    • \u76D1\u89C6\u5668\u9501\u89C4\u5219

                                                                      \u5BF9\u4E00\u4E2A\u9501\u7684\u89E3\u9501\uFF0Chappens-before\u968F\u540E\u5BF9\u8FD9\u4E2A\u9501\u7684\u4E0A\u9501

                                                                    • volatile\u89C4\u5219

                                                                      \u5BF9\u4E00\u4E2Avolatile\u53D8\u91CF\u7684\u5199\uFF0Chappens-before\u4EFB\u610F\u540E\u7EED\u5BF9\u8FD9\u4E2Avolatile\u53D8\u91CF\u7684\u8BFB\u3002\u8FD9\u91CC\u6D89\u53CA\u5230\u524D\u9762\u8BF4\u7684\u5185\u5B58\u5C4F\u969C\uFF0C\u4F5C\u7528\u662F\u7981\u6B62\u6307\u4EE4\u91CD\u6392\u5E8F\uFF0C\u4FDD\u8BC1\u5171\u4EAB\u53D8\u91CF\u5BF9\u4E8E\u5404\u4E2A\u7EBF\u7A0B\u7684\u53EF\u89C1\u6027\uFF01\uFF01\u91CD\u70B9\u5728\u4E8E\u901A\u8FC7\u5185\u5B58\u5C4F\u969C\uFF0C\u5C06\u7EBF\u7A0B\u672C\u5730\u5185\u5B58\u7684\u6570\u636E\u540C\u6B65\u5230\u4E3B\u5185\u5B58\u5373\u5171\u4EAB\u5185\u5B58\u3002

                                                                    • \u4F20\u9012\u89C4\u5219

                                                                  as-if-serial

                                                                  1. \u610F\u601D\u662F\u4E0D\u7BA1\u600E\u4E48\u6267\u884C\u6307\u4EE4\u91CD\u6392\u5E8F\uFF0C\u5355\u7EBF\u7A0B\u7684\u6267\u884C\u7ED3\u679C\u4E0D\u80FD\u88AB\u6539\u53D8\u3002

                                                                  \u987A\u5E8F\u4E00\u81F4\u6027

                                                                  \u987A\u5E8F\u4E00\u81F4\u6027\u5185\u5B58\u6A21\u578B

                                                                  1. \u8FD9\u662F\u4E00\u4E2A\u7406\u60F3\u5316\u7684\u7406\u8BBA\u53C2\u8003\u6A21\u578B\uFF0C\u6709\u4EE5\u4E0B\u4E24\u70B9\u7279\u5F81

                                                                    • \u4E00\u4E2A\u7EBF\u7A0B\u4E2D\u7684\u6240\u6709\u64CD\u4F5C\u5FC5\u987B\u6309\u7167\u7A0B\u5E8F\u7684\u987A\u5E8F\u6765\u6267\u884C
                                                                    • \u4E0D\u7BA1\u7A0B\u5E8F\u662F\u5426\u540C\u6B65\uFF0C\u6240\u6709\u7EBF\u7A0B\u90FD\u53EA\u80FD\u770B\u5230\u4E00\u4E2A\u5355\u4E00\u7684\u64CD\u4F5C\u6267\u884C\u987A\u5E8F\u3002
                                                                  2. \u5728JMM\u4E2D\uFF0C\u6CA1\u6709\u4EE5\u4E0A\u4E24\u70B9\u4FDD\u8BC1\uFF0C\u5BF9\u4E8E\u672A\u540C\u6B65\u7A0B\u5E8F\u6765\u8BF4\uFF0C\u4E0D\u4EC5\u6574\u4F53\u6267\u884C\u987A\u5E8F\u662F\u65E0\u5E8F\u7684\uFF0C\u800C\u4E14\u6240\u6709\u7EBF\u7A0B\u770B\u5230\u7684\u64CD\u4F5C\u6267\u884C\u987A\u5E8F\u4E5F\u53EF\u80FD\u4E0D\u4E00\u81F4\u3002

                                                                  3. \u82E5\u662F\u672A\u540C\u6B65\u7A0B\u5E8F\uFF1A

                                                                    • \u5BF9\u4E8E\u5355\u7EBF\u7A0B\uFF0C\u5728\u987A\u5E8F\u4E00\u81F4\u6027\u6A21\u578B\u4E2D\uFF0C\u53EF\u4EE5\u786E\u5B9A\u7A0B\u5E8F\u6267\u884C\u987A\u5E8F\uFF0C\u5728JMM\u4E2D\uFF0C\u53EF\u80FD\u51FA\u73B0\u6307\u4EE4\u91CD\u6392\u5E8F\u3002
                                                                    • \u987A\u5E8F\u4E00\u81F4\u6027\u6A21\u578B\u80FD\u4FDD\u8BC1\u6240\u6709\u7EBF\u7A0B\u770B\u5230\u4E00\u81F4\u7684\u7A0B\u5E8F\u6267\u884C\u987A\u5E8F\uFF0C\u5C3D\u7BA1\u4ED6\u4EEC\u672A\u540C\u6B65\uFF0C\u800CJMM\u4E0D\u884C\u3002
                                                                  ',28);function l(r,h){return p}var o=a(i,[["render",l],["__file","\u300A\u5E76\u53D1\u7F16\u7A0B\u7684\u827A\u672F\u300B\u7B14\u8BB0.html.vue"]]);export{o as default}; diff --git "a/assets/\343\200\212\345\271\266\345\217\221\347\274\226\347\250\213\347\232\204\350\211\272\346\234\257\343\200\213\347\254\224\350\256\260.html.e4a226e8.js" "b/assets/\343\200\212\345\271\266\345\217\221\347\274\226\347\250\213\347\232\204\350\211\272\346\234\257\343\200\213\347\254\224\350\256\260.html.c117a8b6.js" similarity index 97% rename from "assets/\343\200\212\345\271\266\345\217\221\347\274\226\347\250\213\347\232\204\350\211\272\346\234\257\343\200\213\347\254\224\350\256\260.html.e4a226e8.js" rename to "assets/\343\200\212\345\271\266\345\217\221\347\274\226\347\250\213\347\232\204\350\211\272\346\234\257\343\200\213\347\254\224\350\256\260.html.c117a8b6.js" index 45c269f2..9becf85f 100644 --- "a/assets/\343\200\212\345\271\266\345\217\221\347\274\226\347\250\213\347\232\204\350\211\272\346\234\257\343\200\213\347\254\224\350\256\260.html.e4a226e8.js" +++ "b/assets/\343\200\212\345\271\266\345\217\221\347\274\226\347\250\213\347\232\204\350\211\272\346\234\257\343\200\213\347\254\224\350\256\260.html.c117a8b6.js" @@ -1 +1 @@ -const e={key:"v-05cd8fe4",path:"/java/%E5%B9%B6%E5%8F%91%E7%BC%96%E7%A8%8B/%E5%B9%B6%E5%8F%91%E7%BC%96%E7%A8%8B%E7%9A%84%E8%89%BA%E6%9C%AF/%E3%80%8A%E5%B9%B6%E5%8F%91%E7%BC%96%E7%A8%8B%E7%9A%84%E8%89%BA%E6%9C%AF%E3%80%8B%E7%AC%94%E8%AE%B0.html",title:"\u7B2C2\u7AE0 Java\u5E76\u53D1\u673A\u5236\u7684\u5E95\u5C42\u5B9E\u73B0\u539F\u7406",lang:"zh-CN",frontmatter:{},excerpt:"",headers:[{level:2,title:"\u9501\u7684\u5347\u7EA7\u548C\u5BF9\u6BD4",slug:"\u9501\u7684\u5347\u7EA7\u548C\u5BF9\u6BD4",children:[{level:3,title:"\u504F\u5411\u9501",slug:"\u504F\u5411\u9501",children:[]},{level:3,title:"\u8F7B\u91CF\u7EA7\u9501",slug:"\u8F7B\u91CF\u7EA7\u9501",children:[]},{level:3,title:"volatile\u5B9E\u73B0\u539F\u7406",slug:"volatile\u5B9E\u73B0\u539F\u7406",children:[]}]},{level:2,title:"\u539F\u5B50\u64CD\u4F5C\u7684\u5B9E\u73B0\u539F\u7406",slug:"\u539F\u5B50\u64CD\u4F5C\u7684\u5B9E\u73B0\u539F\u7406",children:[{level:3,title:"\u603B\u7EBF\u9501\u548C\u7F13\u5B58\u9501",slug:"\u603B\u7EBF\u9501\u548C\u7F13\u5B58\u9501",children:[]},{level:3,title:"Java\u5982\u4F55\u5B9E\u73B0\u539F\u5B50\u64CD\u4F5C",slug:"java\u5982\u4F55\u5B9E\u73B0\u539F\u5B50\u64CD\u4F5C",children:[]}]},{level:2,title:"Java\u5185\u5B58\u6A21\u578B\u7684\u57FA\u7840",slug:"java\u5185\u5B58\u6A21\u578B\u7684\u57FA\u7840",children:[{level:3,title:"\u901A\u4FE1\u548C\u540C\u6B65",slug:"\u901A\u4FE1\u548C\u540C\u6B65",children:[]},{level:3,title:"Java\u5185\u5B58\u6A21\u578B\u7684\u62BD\u8C61\u7ED3\u6784",slug:"java\u5185\u5B58\u6A21\u578B\u7684\u62BD\u8C61\u7ED3\u6784",children:[]},{level:3,title:"\u6307\u4EE4\u91CD\u6392\u5E8F",slug:"\u6307\u4EE4\u91CD\u6392\u5E8F",children:[]},{level:3,title:"happens-before",slug:"happens-before",children:[]},{level:3,title:"as-if-serial",slug:"as-if-serial",children:[]}]},{level:2,title:"\u987A\u5E8F\u4E00\u81F4\u6027",slug:"\u987A\u5E8F\u4E00\u81F4\u6027",children:[{level:3,title:"\u987A\u5E8F\u4E00\u81F4\u6027\u5185\u5B58\u6A21\u578B",slug:"\u987A\u5E8F\u4E00\u81F4\u6027\u5185\u5B58\u6A21\u578B",children:[]}]}],git:{updatedTime:1710173765e3,contributors:[{name:"shailene",email:"64005626+shaileneF@users.noreply.github.com",commits:1}]},filePathRelative:"java/\u5E76\u53D1\u7F16\u7A0B/\u5E76\u53D1\u7F16\u7A0B\u7684\u827A\u672F/\u300A\u5E76\u53D1\u7F16\u7A0B\u7684\u827A\u672F\u300B\u7B14\u8BB0.md"};export{e as data}; +const e={key:"v-05cd8fe4",path:"/java/%E5%B9%B6%E5%8F%91%E7%BC%96%E7%A8%8B/%E5%B9%B6%E5%8F%91%E7%BC%96%E7%A8%8B%E7%9A%84%E8%89%BA%E6%9C%AF/%E3%80%8A%E5%B9%B6%E5%8F%91%E7%BC%96%E7%A8%8B%E7%9A%84%E8%89%BA%E6%9C%AF%E3%80%8B%E7%AC%94%E8%AE%B0.html",title:"\u7B2C2\u7AE0 Java\u5E76\u53D1\u673A\u5236\u7684\u5E95\u5C42\u5B9E\u73B0\u539F\u7406",lang:"zh-CN",frontmatter:{},excerpt:"",headers:[{level:2,title:"\u9501\u7684\u5347\u7EA7\u548C\u5BF9\u6BD4",slug:"\u9501\u7684\u5347\u7EA7\u548C\u5BF9\u6BD4",children:[{level:3,title:"\u504F\u5411\u9501",slug:"\u504F\u5411\u9501",children:[]},{level:3,title:"\u8F7B\u91CF\u7EA7\u9501",slug:"\u8F7B\u91CF\u7EA7\u9501",children:[]},{level:3,title:"volatile\u5B9E\u73B0\u539F\u7406",slug:"volatile\u5B9E\u73B0\u539F\u7406",children:[]}]},{level:2,title:"\u539F\u5B50\u64CD\u4F5C\u7684\u5B9E\u73B0\u539F\u7406",slug:"\u539F\u5B50\u64CD\u4F5C\u7684\u5B9E\u73B0\u539F\u7406",children:[{level:3,title:"\u603B\u7EBF\u9501\u548C\u7F13\u5B58\u9501",slug:"\u603B\u7EBF\u9501\u548C\u7F13\u5B58\u9501",children:[]},{level:3,title:"Java\u5982\u4F55\u5B9E\u73B0\u539F\u5B50\u64CD\u4F5C",slug:"java\u5982\u4F55\u5B9E\u73B0\u539F\u5B50\u64CD\u4F5C",children:[]}]},{level:2,title:"Java\u5185\u5B58\u6A21\u578B\u7684\u57FA\u7840",slug:"java\u5185\u5B58\u6A21\u578B\u7684\u57FA\u7840",children:[{level:3,title:"\u901A\u4FE1\u548C\u540C\u6B65",slug:"\u901A\u4FE1\u548C\u540C\u6B65",children:[]},{level:3,title:"Java\u5185\u5B58\u6A21\u578B\u7684\u62BD\u8C61\u7ED3\u6784",slug:"java\u5185\u5B58\u6A21\u578B\u7684\u62BD\u8C61\u7ED3\u6784",children:[]},{level:3,title:"\u6307\u4EE4\u91CD\u6392\u5E8F",slug:"\u6307\u4EE4\u91CD\u6392\u5E8F",children:[]},{level:3,title:"happens-before",slug:"happens-before",children:[]},{level:3,title:"as-if-serial",slug:"as-if-serial",children:[]}]},{level:2,title:"\u987A\u5E8F\u4E00\u81F4\u6027",slug:"\u987A\u5E8F\u4E00\u81F4\u6027",children:[{level:3,title:"\u987A\u5E8F\u4E00\u81F4\u6027\u5185\u5B58\u6A21\u578B",slug:"\u987A\u5E8F\u4E00\u81F4\u6027\u5185\u5B58\u6A21\u578B",children:[]}]}],git:{updatedTime:1710173784e3,contributors:[{name:"shailene",email:"64005626+shaileneF@users.noreply.github.com",commits:1}]},filePathRelative:"java/\u5E76\u53D1\u7F16\u7A0B/\u5E76\u53D1\u7F16\u7A0B\u7684\u827A\u672F/\u300A\u5E76\u53D1\u7F16\u7A0B\u7684\u827A\u672F\u300B\u7B14\u8BB0.md"};export{e as data}; diff --git "a/assets/\344\270\200\344\272\233\347\237\245\350\257\206\347\202\271\347\232\204\350\256\260\345\275\225.html.0bbe19dd.js" "b/assets/\344\270\200\344\272\233\347\237\245\350\257\206\347\202\271\347\232\204\350\256\260\345\275\225.html.1a3b253e.js" similarity index 99% rename from "assets/\344\270\200\344\272\233\347\237\245\350\257\206\347\202\271\347\232\204\350\256\260\345\275\225.html.0bbe19dd.js" rename to "assets/\344\270\200\344\272\233\347\237\245\350\257\206\347\202\271\347\232\204\350\256\260\345\275\225.html.1a3b253e.js" index 0a26d406..a8d78f8e 100644 --- "a/assets/\344\270\200\344\272\233\347\237\245\350\257\206\347\202\271\347\232\204\350\256\260\345\275\225.html.0bbe19dd.js" +++ "b/assets/\344\270\200\344\272\233\347\237\245\350\257\206\347\202\271\347\232\204\350\256\260\345\275\225.html.1a3b253e.js" @@ -1,4 +1,4 @@ -import{_ as p,e as i}from"./app.0d029894.js";var l="/study/assets/image-20210804221355245.10f77458.png",a="/study/assets/image-20210804223602743.6a28ad69.png",s="/study/assets/image-20210804224747608.f30f00be.png",r="/study/assets/image-20210805223255637.f91556a1.png",t="/study/assets/image-20210805223443030.7523be4b.png",e="/study/assets/image-20210805224014478.d1b88939.png",n="/study/assets/image-20210805224156490.4e09cc9b.png",o="/study/assets/image-20210805224728324.9977078b.png",g="/study/assets/image-20210805225629843.a7d77c27.png",d="/study/assets/image-20210806215338200.8542a669.png",c="/study/assets/image-20210808193347849.02732c10.png",h="/study/assets/image-20210808201004706.fb35bb1d.png",u="/study/assets/image-20210808204810558.b8f9ef85.png",m="/study/assets/image-20210808205132418.00fc6184.png",v="/study/assets/image-20210808221622960.b4211d01.png",C="/study/assets/image-20210808222718076-1628432838483.44fb5386.png",f="/study/assets/image-20210808224402410.1520aeb8.png",_="/study/assets/image-20210809192420557.1dc5f800.png",J="/study/assets/image-20210809193704853.587a6c37.png",b="/study/assets/image-20210809204952628.377783fb.png",S="/study/assets/image-20210809210735289.49f81968.png",G="/study/assets/image-20210809214353466.ac2e5faa.png",M="/study/assets/image-20210810201758436.5fb85e49.png",y="/study/assets/image-20210810202350855.f1f42e0f.png",j="/study/assets/image-20210810224237483.4967ddf0.png",x="/study/assets/image-20210810225009965.29327eb0.png",O="/study/assets/image-20210811201352406.f0bcd20f.png",q="/study/assets/image-20210811201920137.3d1f6d7f.png",P="/study/assets/image-20210811202400426.4a7da385.png",k="/study/assets/image-20210811203453743.aca2b62b.png",V="/study/assets/image-20210811212717272.4ef7dbf5.png",T="/study/assets/image-20210811212930949.f5807982.png",w="/study/assets/image-20210811220336129.1242425b.png",B="/study/assets/image-20210811222818578.95109816.png",I="/study/assets/image-20210811223633056.99ed3cd9.png",z="/study/assets/image-20210813105607835.ee2f0a8b.png",E="/study/assets/image-20210813105911154.5957aeda.png",L="/study/assets/image-20210813161957453.2c08846a.png",U="/study/assets/image-20210813161930317.f1310221.png",A="/study/assets/image-20210813153359383.d08dfa69.png",X="/study/assets/image-20210813153525632.2c28d834.png",H="/study/assets/image-20210813225341464.9c3cadd9.png",R="/study/assets/image-20210813225401420.e01916a6.png",N="/study/assets/image-20210813225429219.9ccc6ded.png",W="/study/assets/image-20210813234222298.4c354a46.png",Y="/study/assets/image-20210820161439568.c766732a.png",Z="/study/assets/image-20210820162323011.390f288c.png",D="/study/assets/image-20210820164458201-1629449099231.50e195f5.png",F="/study/assets/image-20210906143610290.528cb25f.png",K="/study/assets/image-20210906171812809.363b01dc.png",Q="/study/assets/image-20210820165552514.e3a1394a.png",$="/study/assets/image-20210824181108997.fdd9e665.png",pp="/study/assets/image-20210824181700991.d3e1ce00.png",ip="/study/assets/image-20210825160558621.becd8fb7.png",lp="/study/assets/image-20210825173756594.fcaf6ebe.png",ap="/study/assets/image-20210825174714351.e6091a59.png",sp="/study/assets/image-20210831202906556.019b673f.png",rp="/study/assets/image-20210831204236410.efd835e4.png",tp="/study/assets/image-20210831210153404.d5251442.png",ep="/study/assets/image-20210831211340502.9567490e.png",np="/study/assets/image-20210831214906016.64ae96e1.png",op="/study/assets/image-20210901123338716.f8f4a854.png",gp="/study/assets/image-20210901130731403.35b309c9.png",dp="/study/assets/image-20210901131706912.6621d38f.png",cp="/study/assets/image-20210901142223783.4b42ae16.png",hp="/study/assets/image-20210901155852236.f719f1c3.png",up="/study/assets/image-20210901160638209.4e0f25a2.png",mp="/study/assets/image-20210901161418211.cabf8c5f.png",vp="/study/assets/image-20210901163322093.d3e5ef76.png",Cp="/study/assets/image-20210901163544154.1f9ce0f9.png",fp="/study/assets/image-20210901173929090.5e8781bd.png",_p="/study/assets/image-20210901175026625.4ab0911f.png",Jp="/study/assets/image-20210901203518311.a413a4db.png",bp="/study/assets/image-20210901212509383.42d8c7cc.png",Sp="/study/assets/image-20210901212745465.570a437d.png",Gp="/study/assets/image-20210901214254559.c7762524.png",Mp="/study/assets/image-20210902132700890.ca3607da.png",yp="/study/assets/image-20210902143218566.9e26307f.png",jp="/study/assets/image-20210902151132543.f9c8f691.png",xp="/study/assets/image-20210902151540079.0c77743e.png",Op="/study/assets/image-20210902151910504.2dd4bc10.png",qp="/study/assets/image-20210902161841951.204518f5.png",Pp="/study/assets/image-20210902164858170.cc909b7b.png",kp="/study/assets/image-20210902164912311.be10b105.png",Vp="/study/assets/image-20210902164952610.27f5acde.png",Tp="/study/assets/image-20210902170033661.f68306f4.png",wp="/study/assets/image-20210902193300146.562f8e39.png",Bp="/study/assets/image-20210902205456500.7552de1d.png",Ip="/study/assets/image-20210902212337207.d9e5ba4f.png",zp="/study/assets/image-20210902213607255.892bdb66.png",Ep="/study/assets/image-20210902214136025.a85138c7.png",Lp="/study/assets/image-20210902221152209.31d99ba9.png",Up="/study/assets/image-20210903140209591.258d00de.png";const Ap={},Xp=i('

                                                                  JVM\u4E0A\u7BC7

                                                                  JVM\u4E0EJava\u4F53\u7CFB\u7ED3\u6784

                                                                  JVM\u7684\u6574\u4F53\u7ED3\u6784

                                                                  1. image-20210804221355245

                                                                    \u5B57\u8282\u7801\u6587\u4EF6-----> JVM

                                                                    \u8FD9\u4E2A\u8FC7\u7A0B\u662F\u901A\u8FC7classloader \u5373 \u7C7B\u88C5\u8F7D\u5668\u5B50\u7CFB\u7EDF\u3002

                                                                    classloader\u7684\u4F5C\u7528\u662F\u5C06\u5B57\u8282\u7801\u6587\u4EF6\u52A0\u8F7D\u5230\u5185\u5B58\u4E2D\uFF0C\u751F\u6210\u4E00\u4E2AClass\u5BF9\u8C61\uFF0C\u8FD9\u4E2A\u8FC7\u7A0B\u4E2D\u6D89\u53CA\u5230\u52A0\u8F7D\u3001\u94FE\u63A5\u3001\u521D\u59CB\u5316\u3002\u5176\u4E2D\u94FE\u63A5\u6709\u4E09\u6B65

                                                                    \u8FD0\u884C\u65F6\u6570\u636E\u533A

                                                                    • \u65B9\u6CD5\u533A\u3001\u5806 \u662F\u591A\u4E2A\u7EBF\u7A0B\u5171\u4EAB
                                                                    • \u865A\u62DF\u673A\u6808\uFF08Java\u6808\uFF09\u3001\u672C\u5730\u65B9\u6CD5\u6808\u548C\u7A0B\u5E8F\u8BA1\u6570\u5668\u662F\u6BCF\u4E2A\u7EBF\u7A0B\u72EC\u6709\u4E00\u4EFD

                                                                    \u6267\u884C\u5F15\u64CE

                                                                    • \u89E3\u91CA\u5668
                                                                    • JIT\u5373\u65F6\u7F16\u8BD1\u5668
                                                                    • \u5783\u573E\u56DE\u6536\u5668

                                                                    \u6211\u4EEC\u8BF4\u628A\u5B57\u8282\u7801\u6587\u4EF6\u52A0\u8F7D\u5230\u5185\u5B58\u4E2D\uFF0C\u4E0B\u4E00\u6B65\u5C31\u662F\u89E3\u91CA\u8FD0\u884C\uFF0C\u89E3\u91CA\u8FD0\u884C\u8FD9\u4E00\u6B65\u5C31\u662F\u7528\u5230\u89E3\u91CA\u5668\uFF0C\u5982\u679C\u53EA\u7528\u89E3\u91CA\u5668\uFF0C\u6027\u80FD\u5C31\u5DEE\u4E00\u4E9B\uFF0C\u5BF9\u4E8E\u4E00\u4E9B\u70ED\u70B9\u4EE3\u7801\uFF0C\u6211\u4EEC\u5E0C\u671B\u63D0\u524D\u7F16\u8BD1\u51FA\u6765\uFF0C\u5C31\u8981\u7528\u5230JIT\u5373\u65F6\u7F16\u8BD1\u5668\u3002\u8FD9\u91CC\u7684\u7F16\u8BD1\u5668\u548Cjavac.exe\u7F16\u8BD1java\u6E90\u6587\u4EF6\u5230\u5B57\u8282\u7801\u6587\u4EF6\u65F6\u4E0D\u540C\u7684\uFF0Cjavac.exe\u7F16\u8BD1java\u6E90\u6587\u4EF6\u53EB\u7F16\u8BD1\u5668\u7684\u524D\u7AEF\uFF0CJIT\u5373\u65F6\u7F16\u8BD1\u5668\u53EB\u7F16\u8BD1\u5668\u7684\u540E\u7AEF\u3002

                                                                    \u64CD\u4F5C\u7CFB\u7EDF\u53EA\u80FD\u591F\u8BC6\u522B\u673A\u5668\u6307\u4EE4\uFF0C\u4F46\u662F\u5B57\u8282\u7801\u6307\u4EE4\u867D\u7136\u662F\u4E8C\u8FDB\u5236\u7684\uFF0C\u4F46\u662F\u5B83\u4E0D\u7B49\u540C\u4E8E\u673A\u5668\u6307\u4EE4\uFF0C\u6267\u884C\u5F15\u64CE\u5C31\u5145\u5F53\u4E86\u628A\u9AD8\u7EA7\u8BED\u8A00Java\u8BED\u8A00\u7FFB\u8BD1\u6210\u673A\u5668\u8BED\u8A00\u7684\u7FFB\u8BD1\u8005\u3002

                                                                    \u64CD\u4F5C\u7CFB\u7EDF\u5E76\u4E0D\u8BC6\u522B\u5B57\u8282\u7801\u6307\u4EE4

                                                                  Java\u4EE3\u7801\u6267\u884C\u6D41\u7A0B

                                                                  1. image-20210804223602743

                                                                    \u9AD8\u7EA7\u8BED\u8A00\u7FFB\u8BD1\u6210\u673A\u5668\u6307\u4EE4\u7684\u8FC7\u7A0B\u5176\u5B9E\u5C31\u662F\u7531\u6267\u884C\u5F15\u64CE\u6765\u6267\u884C\u7684

                                                                    \u5E02\u9762\u4E0A\u4E3B\u6D41\u7684\u865A\u62DF\u673A\u90FD\u91C7\u7528\u4E86\u89E3\u91CA\u6267\u884C\u548C\u5373\u65F6\u7F16\u8BD1\u5E76\u5B58\u7684\u65B9\u5F0F

                                                                    \u89E3\u91CA\u5668\u662F\u4FDD\u8BC1\u54CD\u5E94\u7684\u65F6\u95F4\u7684\uFF0C\u9010\u884C\u5730\u5BF9\u5B57\u8282\u7801\u6307\u4EE4\u8FDB\u884C\u89E3\u91CA\u6267\u884C

                                                                    JIT\u662F\u5BF9\u70ED\u70B9\u4EE3\u7801\u7684\u5B57\u8282\u7801\u6307\u4EE4\u518D\u7F16\u8BD1\u6210\u673A\u5668\u6307\u4EE4\uFF0C\u8FD9\u662F\u4E8C\u6B21\u7F16\u8BD1\uFF0C\u7B2C\u4E00\u6B21\u7F16\u8BD1\u662F\u628A\u6E90\u6587\u4EF6\u7F16\u8BD1\u6210\u5B57\u8282\u7801\u6587\u4EF6\uFF0C\u7B2C\u4E8C\u6B21\u662F\u628A\u5B57\u8282\u7801\u6587\u4EF6\u4E2D\u7684\u5B57\u8282\u7801\u6307\u4EE4\u7F16\u8BD1\u6210\u673A\u5668\u6307\u4EE4\uFF0C\u8FD9\u90E8\u5206\u673A\u5668\u6307\u4EE4\u662F\u53CD\u590D\u6267\u884C\u7684\u70ED\u70B9\u4EE3\u7801\uFF0C\u8FD8\u7F13\u5B58\u8D77\u6765\u4E86\uFF0C\u5B58\u50A8\u5728\u65B9\u6CD5\u533A\u4E2D\uFF0C\u4FDD\u8BC1\u7A0B\u5E8F\u6267\u884C\u7684\u6027\u80FD\uFF0C\u6240\u4EE5\u5E02\u9762\u4E0A\u4E3B\u6D41\u7684\u865A\u62DF\u673A\u90FD\u91C7\u7528\u4E8C\u8005\u5E76\u5B58\u7684\u65B9\u5F0F\u3002

                                                                  JVM\u7684\u67B6\u6784\u6A21\u578B

                                                                  1. Java\u7F16\u8BD1\u5668\u8F93\u5165\u7684\u6307\u4EE4\u6D41\u662F\u57FA\u4E8E\u6808\u7684\u6307\u4EE4\u67B6\u6784

                                                                    \u53E6\u5916\u4E00\u79CD\u6307\u4EE4\u96C6\u67B6\u6784\u662F\u57FA\u4E8E\u5BC4\u5B58\u5668\u7684\u6307\u4EE4\u96C6\u67B6\u6784

                                                                    image-20210804224747608

                                                                    \u6808\u662F\u5185\u5B58\u5C42\u9762\u7684\uFF0C\u4E0D\u9700\u8981\u548C\u786C\u4EF6\u6253\u4EA4\u9053\uFF0C\u6240\u4EE5\u6709\u66F4\u597D\u7684\u53EF\u79FB\u690D\u6027

                                                                    \u57FA\u4E8E\u5BC4\u5B58\u5668\u7684\u65B9\u5F0F\uFF0C\u6027\u80FD\u4F18\u79C0\uFF0C\u6307\u4EE4\u9700\u8981\u7531CPU\u6765\u6267\u884C\uFF0C\u5728\u9AD8\u901F\u7F13\u51B2\u533A\u4E2D\u8FDB\u884C\u6267\u884C\uFF0C\u548C\u786C\u4EF6\u7684\u8026\u5408\u5EA6\u9AD8\uFF0C

                                                                    \u6808\u5F0F\u67B6\u6784\u7684\u6307\u4EE4\u96C6\u5C11\uFF0C\u4F46\u662F\u5B8C\u6210\u4E00\u4E2A\u64CD\u4F5C\u7684\u6307\u4EE4\u591A\uFF0C\u5BC4\u5B58\u5668\u67B6\u6784\u5B8C\u6210\u540C\u6837\u64CD\u4F5C\u7684\u6307\u4EE4\u5C11\u3002

                                                                  JVM\u7684\u751F\u547D\u5468\u671F

                                                                  1. \u81EA\u5B9A\u4E49\u7C7B\u662F\u7531\u7CFB\u7EDF\u7C7B\u52A0\u8F7D\u5668\u52A0\u8F7D\u7684\uFF0C\u81EA\u5B9A\u4E49\u7C7B\u4F1A\u9ED8\u8BA4\u7EE7\u627FObject\u7C7B\uFF0CObject\u7C7B\u5C31\u662F\u7531\u5F15\u5BFC\u7C7B\u52A0\u8F7D\u5668\u52A0\u8F7D\u7684\u3002

                                                                  2. Java\u865A\u62DF\u673A\u7684\u542F\u52A8\u662F\u901A\u8FC7\u5F15\u5BFC\u7C7B\u52A0\u8F7D\u5668\u521B\u5EFA\u4E00\u4E2A\u521D\u59CB\u7C7B\u6765\u5B8C\u6210\u7684\u3002\u8FD9\u4E2A\u521D\u59CB\u7C7B\u4E0D\u662FObject\u7C7B

                                                                    \u6267\u884C\u4E00\u4E2A\u7B80\u5355\u7684\u7A0B\u5E8F\uFF0C\u5B9E\u9645\u4E0A\u4F1A\u52A0\u8F7D\u975E\u5E38\u591A\u7684\u7C7B\uFF0CObject\u7C7B\u662F\u5C5E\u4E8E\u5F15\u5BFC\u7C7B\u52A0\u8F7D\u5668\u52A0\u8F7D\u7684\u7C7B\u4E4B\u4E00

                                                                    \u7236\u7C7B\u7684\u52A0\u8F7D\u662F\u65E9\u4E8E\u5B50\u7C7B\u7684

                                                                  3. \u4E00\u4E2AJVM\u5BF9\u5E94\u4E8E\u4E00\u4E2A\u8FD0\u884C\u65F6\u6570\u636E\u533A\uFF0C\u4E5F\u5C31\u662F\u8FD0\u884C\u65F6\u73AF\u5883\uFF0C\u5BF9\u5E94\u4E8ERuntime\u7C7B\uFF0CRuntime\u7C7B\u662F\u5355\u4F8B\u7684\uFF0C\u662F\u997F\u6C49\u5F0F

                                                                  4. \u4E3B\u6D41\u7684JVM\u65E2\u63D0\u4F9B\u89E3\u91CA\u5668\uFF0C\u4E5F\u63D0\u4F9BJIT\u5373\u65F6\u7F16\u8BD1\u5668\uFF0C\u89E3\u91CA\u5668\u9010\u884C\u89E3\u91CA\u6267\u884C\u5B57\u8282\u7801\u6587\u4EF6\uFF0C\u7F16\u8BD1\u5668\u662F\u5C06\u5B57\u8282\u7801\u7F16\u8BD1\u6210\u673A\u5668\u6307\u4EE4\uFF0C\u56E0\u4E3A\u5B57\u8282\u7801\u867D\u7136\u662F\u4E8C\u8FDB\u5236\u6587\u4EF6\uFF0C\u4F46\u662F\u5E76\u4E0D\u662F\u673A\u5668\u6307\u4EE4\uFF0C\u8FD9\u662F\u4E00\u6B21\u518D\u7F16\u8BD1\uFF0C\u76EE\u7684\u5C31\u662F\u5C06\u70ED\u70B9\u4EE3\u7801\u7F16\u8BD1\u6210\u673A\u5668\u6307\u4EE4\u5E76\u8FDB\u884C\u7F13\u5B58\uFF0C\u63D0\u9AD8\u6267\u884C\u6548\u7387\u3002

                                                                    \u7B2C\u4E00\u6B21\u7F16\u8BD1\u662F\u5C06Java\u6E90\u6587\u4EF6\u7F16\u8BD1\u6210\u5B57\u8282\u7801\u6587\u4EF6

                                                                    \u7B2C\u4E8C\u6B21\u7F16\u8BD1\u662F\u5C06\u5B57\u8282\u7801\u7684\u70ED\u70B9\u4EE3\u7801\u7F16\u8BD1\u6210\u673A\u5668\u6307\u4EE4\u3002

                                                                  5. \u7C7B\u7684\u52A0\u8F7D\u5668\u5C31\u6709\u51E0\u79CD\uFF0C\u6709\u5F15\u5BFC\u7C7B\u52A0\u8F7D\u5668\uFF0C\u7CFB\u7EDF\u7C7B\u52A0\u8F7D\u5668\uFF0C\u4E00\u4E2A\u81EA\u5B9A\u4E49\u7C7B\u5C31\u662F\u901A\u8FC7\u7CFB\u7EDF\u7C7B\u52A0\u8F7D\u5668\u8FDB\u884C\u52A0\u8F7D\uFF0C\u4F5C\u4E3AClass\u7C7B\u7684\u5BF9\u8C61\u52A0\u8F7D\u5230\u65B9\u6CD5\u533A\u4E2D\u3002

                                                                    JVM\u542F\u52A8\u662F\u901A\u8FC7\u5F15\u5BFC\u7C7B\u52A0\u8F7D\u5668\uFF0C\u5373bootstrap class loader \u521B\u5EFA\u4E00\u4E2A\u521D\u59CB\u7C7B\u3002Object\u7C7B\u5C31\u662F\u5F15\u5BFC\u7C7B\u52A0\u8F7D\u5668\u52A0\u8F7D\u7684\u3002

                                                                  6. \u6267\u884C\u5F15\u64CE\u7684\u4F5C\u7528\u5C31\u662F\u5C06\u9AD8\u7EA7\u8BED\u8A00\u7FFB\u8BD1\u6210\u673A\u5668\u6307\u4EE4

                                                                  7. \u4E3A\u4EC0\u4E48\u4E0D\u628A\u6240\u6709\u5B57\u8282\u7801\u90FD\u7F16\u8BD1\u6210\u673A\u5668\u6307\u4EE4\uFF0C\u90FD\u8FDB\u884C\u7F13\u5B58\uFF1F

                                                                    \u6267\u884C\u5F15\u64CE\u4E2D\u7684JIT\u5373\u65F6\u7F16\u8BD1\u5668\uFF0C\u5C06\u5B57\u8282\u7801\u518D\u7F16\u8BD1\u6210\u673A\u5668\u6307\u4EE4\uFF0C\u8FD9\u4E5F\u662F\u9700\u8981\u82B1\u65F6\u95F4\u7684\u3002\u5982\u679C\u7F16\u8BD1\u6BCF\u4E00\u884C\uFF0C\u4F1A\u5BFC\u81F4\u6682\u505C\u65F6\u95F4\u8FC7\u957F\u3002\u6682\u505C\u7684\u65F6\u95F4\u5C31\u662F\u7528\u6765\u7F16\u8BD1\u7684\u3002

                                                                    \u89E3\u91CA\u5668\u662F\u4FDD\u8BC1\u54CD\u5E94\u65F6\u95F4\u7684\uFF0C\u54CD\u5E94\u5F88\u5FEB\uFF0C\u4E0A\u6765\u5C31\u6267\u884C\uFF0C\u56E0\u4E3A\u4E0D\u9700\u8981\u7F16\u8BD1\uFF01

                                                                    \u89E3\u91CA\u5668\u548CJIT\u5373\u65F6\u7F16\u8BD1\u5668\u8981\u642D\u914D\u4F7F\u7528\uFF0C\u8FD9\u4E5F\u662FJava\u8BF4\u662F\u534A\u7F16\u8BD1\u534A\u89E3\u91CA\u8FD0\u884C\u7684\u539F\u56E0

                                                                  8. \u65B9\u6CD5\u533A\u7684\u6982\u5FF5\u53EA\u6709HOTSPOT\u624D\u6709

                                                                  9. \u901A\u8FC7\u8BA1\u6570\u5668\u627E\u5230\u6700\u5177\u7F16\u8BD1\u4EF7\u503C\u4EE3\u7801\uFF0C\u5C06\u5B57\u8282\u7801\u6307\u4EE4\u7FFB\u8BD1\u6210\u673A\u5668\u6307\u4EE4\uFF0C\u5728\u672C\u5730\u7F13\u5B58\u8D77\u6765\uFF0C\u4E0B\u6B21\u9700\u8981\u7684\u65F6\u5019\u76F4\u63A5\u6267\u884C

                                                                  10. \u89E3\u91CA\u5668\u4E3B\u8981\u8D1F\u8D23\u7684\u662F\u54CD\u5E94\u65F6\u95F4\uFF0C\u7F16\u8BD1\u5668\u4E3B\u8981\u89E3\u51B3\u7684\u662F\u6267\u884C\u7684\u6027\u80FD\uFF0C\u56E0\u4E3A\u5C06\u5B57\u8282\u7801\u6307\u4EE4\u7F16\u8BD1\u6210\u673A\u5668\u6307\u4EE4\u662F\u9700\u8981\u82B1\u65F6\u95F4\u7684\uFF0C\u7F16\u8BD1\u597D\u5E76\u7F13\u5B58\u597D\u4E4B\u540E\u624D\u89E3\u51B3\u6027\u80FD\u3002\u89E3\u91CA\u5668\u5C31\u8D1F\u8D23\u54CD\u5E94\uFF0C\u6240\u4EE5\u4E24\u8005\u9700\u8981\u7ED3\u5408\u8D77\u6765\u3002

                                                                  \u7C7B\u52A0\u8F7D\u5B50\u7CFB\u7EDF

                                                                  \u6982\u8FF0

                                                                  image-20210805223255637

                                                                  image-20210805223443030

                                                                  1. \u7C7B\u52A0\u8F7D\u5668\u5B50\u7CFB\u7EDF\u8BE6\u7EC6\u53EF\u89C1\u4E0B\u9762\u8FD9\u5F20\u56FE\uFF0C\u7C7B\u52A0\u8F7D\u5668\u5B50\u7CFB\u7EDF\u3002

                                                                    \u7C7B\u52A0\u8F7D\u5668\u53C8\u6709\u591A\u79CD\uFF0C\u6BD4\u5982\u5F15\u5BFC\u7C7B\u52A0\u8F7D\u5668\u3001\u7CFB\u7EDF\u7C7B\u52A0\u8F7D\u5668

                                                                    \u7C7B\u7684\u52A0\u8F7D

                                                                    • loading \u52A0\u8F7D
                                                                      • \u5F15\u5BFC\u7C7B\u52A0\u8F7D\u5668
                                                                      • \u6269\u5C55\u7C7B\u52A0\u8F7D\u5668
                                                                      • \u7CFB\u7EDF\u7C7B\u52A0\u8F7D\u5668
                                                                      • \u4E5F\u53EF\u4EE5\u81EA\u5B9A\u4E49\u7C7B\u52A0\u8F7D\u5668
                                                                    • linking \u94FE\u63A5
                                                                      • \u9A8C\u8BC1
                                                                      • \u51C6\u5907
                                                                      • \u89E3\u6790
                                                                    • initialization \u521D\u59CB\u5316 \uFF08\u6D89\u53CA\u5230\u9759\u6001\u53D8\u91CF\u7684\u663E\u793A\u521D\u59CB\u5316\uFF09
                                                                  2. \u7A0B\u5E8F\u8BA1\u6570\u5668\u662F\u6BCF\u4E2A\u7EBF\u7A0B\u4E00\u4EFD

                                                                  3. \u6211\u4EEC\u5E73\u65F6\u8BF4\u7684\u6808\u662F\u6307\u865A\u62DF\u673A\u6808

                                                                  4. \u5806\u533A\u662F\u88AB\u591A\u4E2A\u7EBF\u7A0B\u5171\u4EAB\u7684

                                                                  5. \u65B9\u6CD5\u533A\u4E3B\u8981\u7528\u6765\u5B58\u653E\u7C7B\u7684\u4FE1\u606F\u3001\u5E38\u91CF\u7B49\u7B49\uFF0C\u65B9\u6CD5\u533A\u53EA\u6709hotspot\u624D\u6709

                                                                  6. \u6267\u884C\u5F15\u64CE\u5206\u4E3A\u89E3\u91CA\u5668\u3001JIT\u7F16\u8BD1\u5668\u3001\u5783\u573E\u56DE\u6536\u5668

                                                                    image-20210805224014478

                                                                    image-20210805224156490

                                                                  7. \u5982\u679C\u81EA\u5DF1\u60F3\u624B\u5199\u4E00\u4E2A\u865A\u62DF\u673A\u7684\u8BDD\uFF0C\u8981\u8003\u8651

                                                                    • \u7C7B\u52A0\u8F7D\u5668\u5B50\u7CFB\u7EDF
                                                                    • \u6267\u884C\u5F15\u64CE

                                                                  \u7C7B\u52A0\u8F7D\u5668\u5B50\u7CFB\u7EDF\u4F5C\u7528

                                                                  1. image-20210805224728324

                                                                    class\u5B57\u8282\u7801\u6587\u4EF6\u5728\u5F00\u5934\u6709\u7279\u5B9A\u6587\u4EF6\u6807\u8BC6\uFF0C\u8FD9\u4E2A\u9A8C\u8BC1\u662F\u5728\u94FE\u63A5\u9636\u6BB5\u7B2C\u4E00\u4E2A\u9636\u6BB5\u9A8C\u8BC1\u9636\u6BB5\u6765\u9A8C\u8BC1

                                                                  2. \u5B57\u8282\u7801\u6587\u4EF6\u662F\u7269\u7406\u78C1\u76D8\u4E0A\u7684\u6587\u4EF6\uFF0C\u7C7B\u7684\u52A0\u8F7D\u5668\u4E3B\u8981\u662F\u628A\u8FD9\u4E2A\u7269\u7406\u78C1\u76D8\u4E0A\u7684\u5B57\u8282\u7801\u6587\u4EF6\u52A0\u8F7D\u5230\u5185\u5B58\u5F53\u4E2D\uFF0C\u751F\u6210Class\u7684\u5B9E\u4F8B\uFF0C\u751F\u6210\u5230\u65B9\u6CD5\u533A\u4E2D

                                                                  3. image-20210805225629843

                                                                    \u52A0\u8F7D\u5206\u4E3A\u52A0\u8F7D\u3001\u94FE\u63A5\u3001\u521D\u59CB\u5316\u4E09\u4E2A\u90E8\u5206\uFF0C\u6070\u597D\u7B2C\u4E00\u4E2A\u90E8\u5206\u4E5F\u53EB\u52A0\u8F7D

                                                                    \u65B9\u6CD5\u533A\u5728jdk7\u5373\u4EE5\u524D\u53EB\u6C38\u4E45\u4EE3\uFF0C\u4E4B\u540E\u53EB\u5143\u7A7A\u95F4\uFF0C\u90FD\u662F\u65B9\u6CD5\u533A\u7684\u5177\u4F53\u5B9E\u73B0

                                                                    \u751F\u6210Class\u7684\u5BF9\u8C61\u5B9E\u4F8B\u662F\u5728\u52A0\u8F7D\u8FD9\u4E2A\u73AF\u8282\u51FA\u73B0\u7684\u3002

                                                                  4. \u94FE\u63A5\u5206\u4E3A\u4E09\u4E2A\u5B50\u9636\u6BB5\uFF1A

                                                                    • \u9A8C\u8BC1

                                                                      \u5B57\u8282\u7801\u6587\u4EF6\u8D77\u59CB\u90FD\u662F\u53EBCA FE BA BE\uFF0C\u8FD9\u79F0\u4E3A\u9B54\u672F\uFF0C\u6240\u6709\u80FD\u88ABJVM\u8BC6\u522B\u7684\u5B57\u8282\u7801\u6587\u4EF6\uFF0C\u6709\u6548\u8D77\u59CB\u90FD\u662F\u8FD9\u4E2A\uFF0C\u901A\u8FC7\u8FD9\u4E2A\u6765\u8FDB\u884C\u6821\u9A8C

                                                                      \u5B57\u8282\u7801\u6587\u4EF6\u4E5F\u662F\u4E8C\u8FDB\u5236\u6587\u4EF6\uFF0C\u4F46\u662F\u5B57\u8282\u7801\u6307\u4EE4\u4E0D\u662F\u673A\u5668\u6307\u4EE4\uFF01\u867D\u7136\u5B57\u8282\u7801\u6587\u4EF6\u662F\u4E8C\u8FDB\u5236\u7684\u3002\u6240\u4EE5jvm\u7ED3\u6784\u4E2D\u6709\u6267\u884C\u5F15\u64CE\uFF0C\u6267\u884C\u5F15\u64CE\u5C31\u6709\u5C06\u9AD8\u7EA7\u8BED\u8A00\u8F6C\u6362\u6210\u673A\u5668\u6307\u4EE4\u7684\u4F5C\u7528\uFF0C\u6240\u4EE5\u5728\u6267\u884C\u5F15\u64CE\u4E2D\uFF0CJIT\u5373\u65F6\u7F16\u8BD1\u5668\u8981\u5BF9\u5B57\u8282\u7801\u6307\u4EE4\u7F16\u8BD1\u6210\u673A\u5668\u6307\u4EE4\uFF0C\u8FD9\u662F\u4E8C\u6B21\u7F16\u8BD1

                                                                      \u5B57\u8282\u7801\u6587\u4EF6\u662F\u4E8C\u8FDB\u5236\u6587\u4EF6\uFF0C\u5F88\u5BB9\u6613\u4F2A\u9020\u3002\u6240\u4EE5\u9700\u8981\u8FDB\u884C\u9A8C\u8BC1\uFF0C\u770B\u6240\u9A8C\u8BC1\u7684\u5B57\u8282\u7801\u6587\u4EF6\u662F\u5426\u662F\u7B26\u5408\u5F53\u524D\u865A\u62DF\u673A\u8981\u6C42\uFF0C\u4FDD\u8BC1\u88AB\u52A0\u8F7D\u7C7B\u7684\u6B63\u786E\u6027\u3002

                                                                    • \u51C6\u5907

                                                                      image-20210806215338200

                                                                      \u9759\u6001\u53D8\u91CF\uFF08\u6216\u8005\u53EB\u7C7B\u53D8\u91CF\uFF09\uFF0Ca\u88AB\u663E\u5F0F\u8D4B\u503C\u4E3A1\uFF0C\u4F46\u662F\u5728\u94FE\u63A5\u7684\u51C6\u5907\u9636\u6BB5\uFF0C\u662F\u8D4B\u503C\u4E3A0\uFF0C\u5728\u521D\u59CB\u5316\u9636\u6BB5\u624D\u4F1A\u8D4B\u503C\u4E3A1\u3002\u94FE\u63A5\u7684\u51C6\u5907\u9636\u6BB5\uFF0C\u662F\u4E3A\u9759\u6001\u5C5E\u6027\u8D4B\u9ED8\u8BA4\u521D\u59CB\u503C\uFF0C\u521D\u59CB\u5316\u9636\u6BB5\u624D\u662F\u663E\u5F0F\u8D4B\u503C

                                                                      \u8FD9\u91CC\u4E0D\u5305\u542B\u7528final\u4FEE\u9970\u7684static\u53D8\u91CF\uFF0C\u56E0\u4E3Afinal\u5728\u7F16\u8BD1\u7684\u65F6\u5019\u5C31\u4F1A\u5206\u914D\u4E86\uFF0C\u51C6\u5907\u9636\u6BB5\u4F1A\u663E\u5F0F\u521D\u59CB\u5316

                                                                      \u8FD9\u91CC\u4E0D\u4F1A\u4E3A\u5B9E\u4F8B\u53D8\u91CF\u5206\u914D\u521D\u59CB\u5316\uFF0C\u56E0\u4E3A\u8FD9\u4E2A\u65F6\u5019\u8FD8\u6CA1\u6709\u521B\u5EFA\u5BF9\u8C61\uFF0C\u8FD8\u662F\u4E00\u4E2A\u7C7B\u7684\u52A0\u8F7D\u8FC7\u7A0B\u3002\u7C7B\u53D8\u91CF\uFF08\u53EF\u4EE5\u7406\u89E3\u4E3A\u7C7B\u7684\u4FE1\u606F\uFF0C\u7C7B\u53D8\u91CF\u4E5F\u662F\u9759\u6001\u53D8\u91CF\uFF0C\u5C5E\u4E8E\u9759\u6001\u7ED3\u6784\uFF0C\u662F\u968F\u7740\u7C7B\u7684\u52A0\u8F7D\u800C\u52A0\u8F7D\u7684\uFF09\uFF0C\u7C7B\u53D8\u91CF\u4F1A\u5206\u914D\u5728\u65B9\u6CD5\u533A\u4E2D\uFF0C\u800C\u5B9E\u4F8B\u53D8\u91CF\u662F\u968F\u7740\u5BF9\u8C61\u4E00\u8D77\u5206\u914D\u5230Java\u5806\u4E2D\u3002

                                                                      \u865A\u62DF\u673A\u6808\u91CC\u5B58\u7684\u662F\u5C40\u90E8\u53D8\u91CF\uFF0C\u90A3\u4E48\u6210\u5458\u53D8\u91CF\u5C31\u5206\u4E3A\u9759\u6001\u53D8\u91CF\u548C\u975E\u9759\u6001\u53D8\u91CF\uFF0C\u9759\u6001\u53D8\u91CF\u5C31\u662F\u968F\u7740\u7C7B\u7684\u52A0\u8F7D\u800C\u52A0\u8F7D\uFF0C\u662F\u5C5E\u4E8E\u7C7B\u7684\u7ED3\u6784\uFF0C\u4F1A\u5206\u914D\u5728\u65B9\u6CD5\u533A\u4E2D\uFF0C\u56E0\u4E3A\u7C7B\u5728\u88ABclassloader\uFF0C\u4E5F\u5C31\u662F\u7C7B\u52A0\u8F7D\u5668\u5B50\u7CFB\u7EDF\u52A0\u8F7D\u4E4B\u540E\uFF0C\u7C7B\u7684\u4FE1\u606F\u3001\u7ED3\u6784\u4F1A\u52A0\u8F7D\u5230\u5185\u5B58\u7684\u65B9\u6CD5\u533A\u4E2D\uFF0C\u800C\u975E\u9759\u6001\u53D8\u91CF\u4E0D\u4F1A\uFF0C\u975E\u9759\u6001\u53D8\u91CF\u4F1A\u968F\u7740\u5B9E\u4F8B\u5BF9\u8C61\u7684\u521B\u5EFA\uFF0C\u548C\u5BF9\u8C61\u5B9E\u4F8B\u4E00\u8D77\uFF0C\u5206\u914D\u5230Java\u5806\u7A7A\u95F4\u4E2D

                                                                      \u5C5E\u6027\u4E5F\u5C31\u662F\u6210\u5458\u53D8\u91CF\u662F\u6709\u9ED8\u8BA4\u521D\u59CB\u503C\u7684\uFF0C\u800C\u5C40\u90E8\u53D8\u91CF\u6CA1\u6709\uFF0C\u5FC5\u987B\u663E\u5F0F\u8D4B\u521D\u59CB\u503C\uFF0C\u5C5E\u6027\u4E2D\u7684\u9759\u6001\u53D8\u91CF\u5728\u94FE\u63A5\u7684\u51C6\u5907\u9636\u6BB5\u5C31\u4F1A\u9ED8\u8BA4\u8D4B\u521D\u59CB\u503C\u4E86\uFF0C\u800C\u975E\u9759\u6001\u53D8\u91CF\u4F1A\u968F\u7740\u5BF9\u8C61\u5B9E\u4F8B\u7684\u521B\u5EFA\u800C\u521B\u5EFA\uFF0C\u5206\u914D\u5230\u5806\u7A7A\u95F4\u4E2D\u3002\u867D\u7136\u90FD\u662F\u6210\u5458\u53D8\u91CF\uFF0C\u4F46\u662F\u4ED6\u4EEC\u7684\u751F\u547D\u5468\u671F\u662F\u4E0D\u540C\u7684\u3002

                                                                    • \u89E3\u6790

                                                                      \u5C06\u7B26\u53F7\u5F15\u7528\u8F6C\u6362\u4E3A\u76F4\u63A5\u5F15\u7528

                                                                  5. \u521D\u59CB\u5316

                                                                    \u6267\u884C\u7C7B\u6784\u9020\u5668\u65B9\u6CD5<clinit>()\u7684\u8FC7\u7A0B

                                                                    \u4EFB\u4F55\u4E00\u4E2A\u7C7B\uFF0C\u58F0\u660E\u4EE5\u540E\uFF0C\u5185\u90E8\u81F3\u5C11\u5B58\u5728\u4E00\u4E2A\u7C7B\u7684\u6784\u9020\u5668\uFF0C\u8FD9\u91CC\u8BF4\u7684\u6784\u9020\u5668\u5C31\u662F\u6211\u4EEC\u5E73\u5E38\u8BF4\u7684\u6784\u9020\u5668\u4E86\uFF0C\u53EF\u4EE5\u663E\u5F0F\u58F0\u660E\uFF0C\u4E5F\u53EF\u4EE5\u662F\u7CFB\u7EDF\u9ED8\u8BA4\u63D0\u4F9B\u7684\uFF0C \u8FD9\u4E2A\u5728\u5B57\u8282\u7801\u6587\u4EF6\u91CC\u5BF9\u5E94\u4E8E<init>\uFF08\u4E25\u683C\u6765\u8BF4\u5B57\u8282\u7801\u6587\u4EF6\u662F\u4E8C\u8FDB\u5236\u6587\u4EF6\uFF0C\u5B57\u8282\u7801\u6587\u4EF6\u7FFB\u8BD1\u4E4B\u540E\u4F1A\u6709\u8FD9\u4E2A<init>\uFF09\uFF0C\u8FD9\u4E2A\u5C31\u662F\u6307\u7684\u6211\u4EEC\u8BF4\u7684\u6784\u9020\u5668

                                                                    \u800C<clinit>\u8FD9\u4E2A\u6307\u7684\u662F\u7C7B\u91CC\u9762\u7684\u6240\u6709\u9759\u6001\u53D8\u91CF\uFF08\u7C7B\u53D8\u91CF\uFF09\u7684\u663E\u5F0F\u8D4B\u503C\u52A8\u4F5C\u4EE5\u53CA\u9759\u6001\u4EE3\u7801\u5757\u91CC\u7684\u5185\u5BB9\u3002<clinit> \u662F\u9759\u6001\u53D8\u91CF\u8D4B\u503C\u548C\u9759\u6001\u4EE3\u7801\u5757\u7684\u8BED\u53E5

                                                                    \u5B50\u7C7B\u7684<clinit>\u6267\u884C\u4E00\u5B9A\u4F1A\u665A\u4E8E\u7236\u7C7B\u7684<clinit>\u7684\u6267\u884C

                                                                    \u865A\u62DF\u673A\u6267\u884C\u7C7B\u7684\u52A0\u8F7D\u7684\u65F6\u5019\uFF0C\u53EA\u4F1A\u8C03\u7528\u4E00\u6B21<clinit>\u65B9\u6CD5\uFF0C\u7C7B\u52A0\u8F7D\u4E4B\u540E\u4F1A\u5728\u5185\u5B58\u4E2D\u7F13\u5B58\u8D77\u6765\uFF0C\u4E5F\u5C31\u662F\u8BF4\uFF0C\u4E00\u4E2A\u7C7B\u53EA\u4F1A\u88AB\u52A0\u8F7D\u4E00\u6B21

                                                                  \u7C7B\u52A0\u8F7D\u5668\u7684\u5206\u7C7B

                                                                  1. JVM\u652F\u6301\u4E24\u79CD\u7C7B\u578B\u7684\u7C7B\u52A0\u8F7D\u5668\uFF0C\u5206\u522B\u4E3A\u5F15\u5BFC\u7C7B\u52A0\u8F7D\u5668\uFF0C\u548C\u81EA\u5B9A\u4E49\u7C7B\u52A0\u8F7D\u5668\uFF0C

                                                                    \u6240\u6709\u6D3E\u751F\u4E8E\u62BD\u8C61\u7C7BClassLoader\u7684\u7C7B\u52A0\u8F7D\u5668\u90FD\u5212\u5206\u4E3A\u81EA\u5B9A\u4E49\u7C7B\u52A0\u8F7D\u5668\u3002\u6240\u4EE5\u7CFB\u7EDF\u7C7B\u52A0\u8F7D\u5668\u4E5F\u5C5E\u4E8E\u81EA\u5B9A\u4E49\u7C7B\u52A0\u8F7D\u5668

                                                                  2. bootstrap classloader\u5373\u5F15\u5BFC\u7C7B\u52A0\u8F7D\u5668\u4E0D\u662FJava\u8BED\u8A00\u7F16\u5199\u7684\uFF0C\u5728\u4EE3\u7801\u91CC\u4E5F\u4E0D\u80FD\u901A\u8FC7getParent()\u7684\u65B9\u5F0F\u83B7\u53D6\u5230

                                                                  3. \u5BF9\u4E8E\u7528\u6237\u81EA\u5B9A\u4E49\u7C7B\u6765\u8BF4\uFF0C\u9ED8\u8BA4\u4F7F\u7528\u7CFB\u7EDF\u7C7B\u52A0\u8F7D\u5668\u8FDB\u884C\u52A0\u8F7D

                                                                    Object\u7C7B\u5219\u662F\u7528\u5F15\u5BFC\u7C7B\u52A0\u8F7D\u5668\u8FDB\u884C\u52A0\u8F7D

                                                                    String\u7C7B\u662F\u7528\u5F15\u5BFC\u7C7B\u52A0\u8F7D\u5668\u8FDB\u884C\u52A0\u8F7D

                                                                  4. \u7CFB\u7EDF\u7684\u6838\u5FC3\u7C7B\u5E93\u90FD\u662F\u4F7F\u7528\u5F15\u5BFC\u7C7B\u52A0\u8F7D\u5668\u8FDB\u884C\u52A0\u8F7D\u7684\u3002

                                                                    \u5F15\u5BFC\u7C7B\u52A0\u8F7D\u5668\u5728\u4EE3\u7801\u91CC\u6CA1\u529E\u6CD5\u83B7\u53D6\u5230\u3002

                                                                    \u5F15\u5BFC\u7C7B\u52A0\u8F7D\u5668\u662F\u4F7F\u7528C\u548CC++\u6765\u7F16\u5199\u7684\uFF0C\u5D4C\u5957\u5728JVM\u5185\u90E8\uFF08\u53EF\u4EE5\u7406\u89E3\u4E3A\u5C31\u662FJVM\u4E2D\u7684\u4E00\u90E8\u5206\uFF0C\u5C31\u662F\u7528\u6765\u52A0\u8F7DJava\u7684\u6838\u5FC3\u7C7B\u5E93\uFF09\uFF0C \u81EA\u5B9A\u4E49\u7C7B\u52A0\u8F7D\u5668\u662F\u4F7F\u7528Java\u8BED\u8A00\u7F16\u5199\u7684\u3002

                                                                  5. \u5F15\u5BFC\u7C7B\u52A0\u8F7D\u5668\u5E76\u4E0D\u7EE7\u627F\u81EAClassLoader\uFF0C\u6CA1\u6709\u7236\u52A0\u8F7D\u5668

                                                                    \u5F15\u5BFC\u7C7B\u52A0\u8F7D\u5668\u52A0\u8F7D\u6269\u5C55\u7C7B\u548C\u5E94\u7528\u7A0B\u5E8F\u7C7B\u52A0\u8F7D\u5668\uFF08\u7CFB\u7EDF\u7C7B\u52A0\u8F7D\u5668\uFF09\uFF0C\u5E76\u6307\u5B9A\u4E3A\u4ED6\u4EEC\u7684\u7236\u7C7B\u52A0\u8F7D\u5668

                                                                    \u4EE3\u7801\u91CC\u83B7\u53D6\u5230\u7C7B\u7684\u52A0\u8F7D\u5668\u4E4B\u540E\uFF0C\u53D1\u73B0\u8FD9\u4E9B\u7C7B\u7684\u52A0\u8F7D\u5668\u4E5F\u662F\u5BF9\u8C61\uFF0C\u8FD9\u4E9B\u5BF9\u8C61\u5BF9\u5E94\u7684\u7C7B\u4E5F\u662F\u9700\u8981\u52A0\u8F7D\u7684\uFF0C\u5C31\u662F\u901A\u8FC7\u5F15\u5BFC\u7C7B\u52A0\u8F7D\u5668\u8FDB\u884C\u52A0\u8F7D\u7684\u3002

                                                                    \u4E5F\u5C31\u662F\u8BF4\u6BD4\u5982\u81EA\u5B9A\u4E49\u7C7B\u662F\u901A\u8FC7\u7CFB\u7EDF\u7C7B\u52A0\u8F7D\u5668\u52A0\u8F7D\u7684\uFF0C\u800C\u7CFB\u7EDF\u7C7B\u52A0\u8F7D\u5668\u662F\u901A\u8FC7\u5F15\u5BFC\u7C7B\u52A0\u8F7D\u5668\u52A0\u8F7D\u7684\u3002

                                                                    \u51FA\u4E8E\u5B89\u5168\u8003\u8651\uFF0C \u5F15\u5BFC\u7C7B\u52A0\u8F7D\u5668\u53EA\u52A0\u8F7Djava\u3001javax\u3001sun\u7B49\u5F00\u5934\u7684\u7C7B

                                                                    \u5F15\u5BFC\u7C7B\u52A0\u8F7D\u6838\u5FC3\u7C7B\u5E93\uFF01

                                                                  6. \u5F15\u5BFC\u7C7B\u52A0\u8F7D\u5668\u4E5F\u53EB\u542F\u52A8\u7C7B\u52A0\u8F7D\u5668\uFF0CBootstrap ClassLoader

                                                                    \u51E1\u662F\u548C\u5E95\u5C42\u64CD\u4F5C\u7CFB\u7EDF\u7F16\u7A0B\u76F8\u5173\u7684\uFF0C\u8FD8\u662F\u8003\u8651C\u548CC++\uFF0C\u4F46\u662F\u73B0\u5728\u968F\u7740\u786C\u4EF6\u7684\u53D1\u5C55Java\u7684\u6267\u884C\u6548\u7387\u548CC\u5DF2\u7ECF\u4E0D\u76F8\u4E0A\u4E0B\uFF0C\u5728\u6700\u521D\u7684\u65F6\u5019\uFF0CJava\u7684\u542F\u52A8\u7C7B\u52A0\u8F7D\u5668\u8FD8\u662F\u7528C\u548CC++\u6765\u7F16\u5199\u7684

                                                                  7. \u6269\u5C55\u7C7B\u52A0\u8F7D\u5668\u662F\u865A\u62DF\u673A\u81EA\u5E26\u7684\u52A0\u8F7D\u5668\uFF0C\u662FJava\u8BED\u8A00\u7F16\u5199\u7684\uFF0C\u7EE7\u627F\u4E8EClassLoader\u7C7B\uFF0C\u7236\u7C7B\u52A0\u8F7D\u5668\u4E3A\u542F\u52A8\u7C7B\u52A0\u8F7D\u5668\uFF0C\u4E5F\u5C31\u662F\u5F15\u5BFC\u7C7B\u52A0\u8F7D\u5668\u3002

                                                                    \u6CE8\u610F\u5728\u8FD9\u91CC\u7236\u7C7B\u548C\u7236\u7C7B\u52A0\u8F7D\u5668\u662F\u4E0D\u540C\u7684

                                                                    \u6269\u5C55\u7C7B\u52A0\u8F7D\u5668\u5C31\u662F\u52A0\u8F7D\u6838\u5FC3\u7C7B\u5E93\u4E4B\u5916\u7684\u6269\u5C55\u7684\u90A3\u4E9B\u5305

                                                                  8. \u5E94\u7528\u7A0B\u5E8F\u7C7B\u52A0\u8F7D\u5668\u4E5F\u53EB\u7CFB\u7EDF\u7C7B\u52A0\u8F7D\u5668\uFF0CAppClassLoader

                                                                    \u4E5F\u662F\u6D3E\u751F\u4E8EClassLoader\u7C7B

                                                                    \u7236\u7C7B\u52A0\u8F7D\u5668\u4E3A\u6269\u5C55\u7C7B\u52A0\u8F7D\u5668\uFF0C\u6269\u5C55\u7C7B\u52A0\u8F7D\u5668\u7684\u7236\u7C7B\u52A0\u8F7D\u5668\u4E3A\u542F\u52A8\u7C7B\u52A0\u8F7D\u5668\uFF0C\u7236\u7C7B\u52A0\u8F7D\u5668\u548C\u7236\u7C7B\u4E0D\u540C\u3002

                                                                    \u8BE5\u7C7B\u52A0\u8F7D\u5668\u662F\u7A0B\u5E8F\u4E2D\u9ED8\u8BA4\u7684\u7C7B\u52A0\u8F7D\u5668

                                                                  9. \u5728\u5FC5\u8981\u65F6\uFF0C\u7528\u6237\u8FD8\u53EF\u4EE5\u81EA\u5B9A\u4E49\u7C7B\u52A0\u8F7D\u5668

                                                                    \u4E3A\u4EC0\u4E48\u8981\u81EA\u5B9A\u4E49\u7C7B\u52A0\u8F7D\u5668

                                                                    • \u9694\u79BB\u52A0\u8F7D\u7C7B
                                                                    • \u4FEE\u6539\u7C7B\u52A0\u8F7D\u7684\u65B9\u5F0F
                                                                    • \u6269\u5C55\u52A0\u8F7D\u6E90
                                                                    • \u9632\u6B62\u6E90\u7801\u6CC4\u6F0F

                                                                    \u9694\u79BB\u52A0\u8F7D\u7C7B\u5C31\u662F\u8BF4\u5728\u540C\u4E00\u4E2A\u9879\u76EE\u4E2D\uFF0C\u5F15\u5165\u4E0D\u540C\u7684\u6846\u67B6\uFF0C\u6216\u8005\u5728\u6846\u67B6\u4E2D\u7528\u5230\u4E86\u4E2D\u95F4\u4EF6\uFF0C\u4E2D\u95F4\u4EF6\u548C\u5E94\u7528\u662F\u9694\u79BB\u7684\uFF0C\u90A3\u4E48\u5C31\u9700\u8981\u628A\u7C7B\u52A0\u8F7D\u5230\u4E0D\u540C\u73AF\u5883\u4E2D\uFF0C\u6BD4\u5982\u5E94\u7528\u7684jar\u5305\uFF0C\u8BA9jar\u5305\u4E0D\u51B2\u7A81

                                                                  10. \u7C7B\u52A0\u8F7D\u5668\u5206\u4E3A\u4E24\u7C7B\uFF0C\u4E00\u7C7B\u662F\u5F15\u5BFC\u7C7B\u52A0\u8F7D\u5668\uFF0C\u53E6\u4E00\u7C7B\u662F\u7EE7\u627F\u4E8EClassLoader\u7684\u7C7B\u52A0\u8F7D\u5668\u5373\u81EA\u5B9A\u4E49\u7C7B\u52A0\u8F7D\u5668

                                                                  11. \u62BD\u8C61\u7C7B\u91CC\u9762\u53EF\u4EE5\u6709\u4E0D\u62BD\u8C61\u7684\u65B9\u6CD5

                                                                  12. \u7CFB\u7EDF\u7C7B\u52A0\u8F7D\u5668\u7684\u7236\u7C7B\u52A0\u8F7D\u5668\u662F\u6269\u5C55\u7C7B\u52A0\u8F7D\u5668

                                                                    \u6269\u5C55\u7C7B\u52A0\u8F7D\u5668\u7684\u7236\u7C7B\u52A0\u8F7D\u5668\u662F\u5F15\u5BFC\u7C7B\u52A0\u8F7D\u5668

                                                                  13. \u5927\u7684Class\u7684\u5B9E\u4F8Bclazz\u53EF\u4EE5\u83B7\u53D6\u5F53\u524D\u7C7B\u7684ClassLoader

                                                                    clazz.getClassLoader();
                                                                    +import{_ as p,e as i}from"./app.f8791b52.js";var l="/study/assets/image-20210804221355245.10f77458.png",a="/study/assets/image-20210804223602743.6a28ad69.png",s="/study/assets/image-20210804224747608.f30f00be.png",r="/study/assets/image-20210805223255637.f91556a1.png",t="/study/assets/image-20210805223443030.7523be4b.png",e="/study/assets/image-20210805224014478.d1b88939.png",n="/study/assets/image-20210805224156490.4e09cc9b.png",o="/study/assets/image-20210805224728324.9977078b.png",g="/study/assets/image-20210805225629843.a7d77c27.png",d="/study/assets/image-20210806215338200.8542a669.png",c="/study/assets/image-20210808193347849.02732c10.png",h="/study/assets/image-20210808201004706.fb35bb1d.png",u="/study/assets/image-20210808204810558.b8f9ef85.png",m="/study/assets/image-20210808205132418.00fc6184.png",v="/study/assets/image-20210808221622960.b4211d01.png",C="/study/assets/image-20210808222718076-1628432838483.44fb5386.png",f="/study/assets/image-20210808224402410.1520aeb8.png",_="/study/assets/image-20210809192420557.1dc5f800.png",J="/study/assets/image-20210809193704853.587a6c37.png",b="/study/assets/image-20210809204952628.377783fb.png",S="/study/assets/image-20210809210735289.49f81968.png",G="/study/assets/image-20210809214353466.ac2e5faa.png",M="/study/assets/image-20210810201758436.5fb85e49.png",y="/study/assets/image-20210810202350855.f1f42e0f.png",j="/study/assets/image-20210810224237483.4967ddf0.png",x="/study/assets/image-20210810225009965.29327eb0.png",O="/study/assets/image-20210811201352406.f0bcd20f.png",q="/study/assets/image-20210811201920137.3d1f6d7f.png",P="/study/assets/image-20210811202400426.4a7da385.png",k="/study/assets/image-20210811203453743.aca2b62b.png",V="/study/assets/image-20210811212717272.4ef7dbf5.png",T="/study/assets/image-20210811212930949.f5807982.png",w="/study/assets/image-20210811220336129.1242425b.png",B="/study/assets/image-20210811222818578.95109816.png",I="/study/assets/image-20210811223633056.99ed3cd9.png",z="/study/assets/image-20210813105607835.ee2f0a8b.png",E="/study/assets/image-20210813105911154.5957aeda.png",L="/study/assets/image-20210813161957453.2c08846a.png",U="/study/assets/image-20210813161930317.f1310221.png",A="/study/assets/image-20210813153359383.d08dfa69.png",X="/study/assets/image-20210813153525632.2c28d834.png",H="/study/assets/image-20210813225341464.9c3cadd9.png",R="/study/assets/image-20210813225401420.e01916a6.png",N="/study/assets/image-20210813225429219.9ccc6ded.png",W="/study/assets/image-20210813234222298.4c354a46.png",Y="/study/assets/image-20210820161439568.c766732a.png",Z="/study/assets/image-20210820162323011.390f288c.png",D="/study/assets/image-20210820164458201-1629449099231.50e195f5.png",F="/study/assets/image-20210906143610290.528cb25f.png",K="/study/assets/image-20210906171812809.363b01dc.png",Q="/study/assets/image-20210820165552514.e3a1394a.png",$="/study/assets/image-20210824181108997.fdd9e665.png",pp="/study/assets/image-20210824181700991.d3e1ce00.png",ip="/study/assets/image-20210825160558621.becd8fb7.png",lp="/study/assets/image-20210825173756594.fcaf6ebe.png",ap="/study/assets/image-20210825174714351.e6091a59.png",sp="/study/assets/image-20210831202906556.019b673f.png",rp="/study/assets/image-20210831204236410.efd835e4.png",tp="/study/assets/image-20210831210153404.d5251442.png",ep="/study/assets/image-20210831211340502.9567490e.png",np="/study/assets/image-20210831214906016.64ae96e1.png",op="/study/assets/image-20210901123338716.f8f4a854.png",gp="/study/assets/image-20210901130731403.35b309c9.png",dp="/study/assets/image-20210901131706912.6621d38f.png",cp="/study/assets/image-20210901142223783.4b42ae16.png",hp="/study/assets/image-20210901155852236.f719f1c3.png",up="/study/assets/image-20210901160638209.4e0f25a2.png",mp="/study/assets/image-20210901161418211.cabf8c5f.png",vp="/study/assets/image-20210901163322093.d3e5ef76.png",Cp="/study/assets/image-20210901163544154.1f9ce0f9.png",fp="/study/assets/image-20210901173929090.5e8781bd.png",_p="/study/assets/image-20210901175026625.4ab0911f.png",Jp="/study/assets/image-20210901203518311.a413a4db.png",bp="/study/assets/image-20210901212509383.42d8c7cc.png",Sp="/study/assets/image-20210901212745465.570a437d.png",Gp="/study/assets/image-20210901214254559.c7762524.png",Mp="/study/assets/image-20210902132700890.ca3607da.png",yp="/study/assets/image-20210902143218566.9e26307f.png",jp="/study/assets/image-20210902151132543.f9c8f691.png",xp="/study/assets/image-20210902151540079.0c77743e.png",Op="/study/assets/image-20210902151910504.2dd4bc10.png",qp="/study/assets/image-20210902161841951.204518f5.png",Pp="/study/assets/image-20210902164858170.cc909b7b.png",kp="/study/assets/image-20210902164912311.be10b105.png",Vp="/study/assets/image-20210902164952610.27f5acde.png",Tp="/study/assets/image-20210902170033661.f68306f4.png",wp="/study/assets/image-20210902193300146.562f8e39.png",Bp="/study/assets/image-20210902205456500.7552de1d.png",Ip="/study/assets/image-20210902212337207.d9e5ba4f.png",zp="/study/assets/image-20210902213607255.892bdb66.png",Ep="/study/assets/image-20210902214136025.a85138c7.png",Lp="/study/assets/image-20210902221152209.31d99ba9.png",Up="/study/assets/image-20210903140209591.258d00de.png";const Ap={},Xp=i('

                                                                    JVM\u4E0A\u7BC7

                                                                    JVM\u4E0EJava\u4F53\u7CFB\u7ED3\u6784

                                                                    JVM\u7684\u6574\u4F53\u7ED3\u6784

                                                                    1. image-20210804221355245

                                                                      \u5B57\u8282\u7801\u6587\u4EF6-----> JVM

                                                                      \u8FD9\u4E2A\u8FC7\u7A0B\u662F\u901A\u8FC7classloader \u5373 \u7C7B\u88C5\u8F7D\u5668\u5B50\u7CFB\u7EDF\u3002

                                                                      classloader\u7684\u4F5C\u7528\u662F\u5C06\u5B57\u8282\u7801\u6587\u4EF6\u52A0\u8F7D\u5230\u5185\u5B58\u4E2D\uFF0C\u751F\u6210\u4E00\u4E2AClass\u5BF9\u8C61\uFF0C\u8FD9\u4E2A\u8FC7\u7A0B\u4E2D\u6D89\u53CA\u5230\u52A0\u8F7D\u3001\u94FE\u63A5\u3001\u521D\u59CB\u5316\u3002\u5176\u4E2D\u94FE\u63A5\u6709\u4E09\u6B65

                                                                      \u8FD0\u884C\u65F6\u6570\u636E\u533A

                                                                      • \u65B9\u6CD5\u533A\u3001\u5806 \u662F\u591A\u4E2A\u7EBF\u7A0B\u5171\u4EAB
                                                                      • \u865A\u62DF\u673A\u6808\uFF08Java\u6808\uFF09\u3001\u672C\u5730\u65B9\u6CD5\u6808\u548C\u7A0B\u5E8F\u8BA1\u6570\u5668\u662F\u6BCF\u4E2A\u7EBF\u7A0B\u72EC\u6709\u4E00\u4EFD

                                                                      \u6267\u884C\u5F15\u64CE

                                                                      • \u89E3\u91CA\u5668
                                                                      • JIT\u5373\u65F6\u7F16\u8BD1\u5668
                                                                      • \u5783\u573E\u56DE\u6536\u5668

                                                                      \u6211\u4EEC\u8BF4\u628A\u5B57\u8282\u7801\u6587\u4EF6\u52A0\u8F7D\u5230\u5185\u5B58\u4E2D\uFF0C\u4E0B\u4E00\u6B65\u5C31\u662F\u89E3\u91CA\u8FD0\u884C\uFF0C\u89E3\u91CA\u8FD0\u884C\u8FD9\u4E00\u6B65\u5C31\u662F\u7528\u5230\u89E3\u91CA\u5668\uFF0C\u5982\u679C\u53EA\u7528\u89E3\u91CA\u5668\uFF0C\u6027\u80FD\u5C31\u5DEE\u4E00\u4E9B\uFF0C\u5BF9\u4E8E\u4E00\u4E9B\u70ED\u70B9\u4EE3\u7801\uFF0C\u6211\u4EEC\u5E0C\u671B\u63D0\u524D\u7F16\u8BD1\u51FA\u6765\uFF0C\u5C31\u8981\u7528\u5230JIT\u5373\u65F6\u7F16\u8BD1\u5668\u3002\u8FD9\u91CC\u7684\u7F16\u8BD1\u5668\u548Cjavac.exe\u7F16\u8BD1java\u6E90\u6587\u4EF6\u5230\u5B57\u8282\u7801\u6587\u4EF6\u65F6\u4E0D\u540C\u7684\uFF0Cjavac.exe\u7F16\u8BD1java\u6E90\u6587\u4EF6\u53EB\u7F16\u8BD1\u5668\u7684\u524D\u7AEF\uFF0CJIT\u5373\u65F6\u7F16\u8BD1\u5668\u53EB\u7F16\u8BD1\u5668\u7684\u540E\u7AEF\u3002

                                                                      \u64CD\u4F5C\u7CFB\u7EDF\u53EA\u80FD\u591F\u8BC6\u522B\u673A\u5668\u6307\u4EE4\uFF0C\u4F46\u662F\u5B57\u8282\u7801\u6307\u4EE4\u867D\u7136\u662F\u4E8C\u8FDB\u5236\u7684\uFF0C\u4F46\u662F\u5B83\u4E0D\u7B49\u540C\u4E8E\u673A\u5668\u6307\u4EE4\uFF0C\u6267\u884C\u5F15\u64CE\u5C31\u5145\u5F53\u4E86\u628A\u9AD8\u7EA7\u8BED\u8A00Java\u8BED\u8A00\u7FFB\u8BD1\u6210\u673A\u5668\u8BED\u8A00\u7684\u7FFB\u8BD1\u8005\u3002

                                                                      \u64CD\u4F5C\u7CFB\u7EDF\u5E76\u4E0D\u8BC6\u522B\u5B57\u8282\u7801\u6307\u4EE4

                                                                    Java\u4EE3\u7801\u6267\u884C\u6D41\u7A0B

                                                                    1. image-20210804223602743

                                                                      \u9AD8\u7EA7\u8BED\u8A00\u7FFB\u8BD1\u6210\u673A\u5668\u6307\u4EE4\u7684\u8FC7\u7A0B\u5176\u5B9E\u5C31\u662F\u7531\u6267\u884C\u5F15\u64CE\u6765\u6267\u884C\u7684

                                                                      \u5E02\u9762\u4E0A\u4E3B\u6D41\u7684\u865A\u62DF\u673A\u90FD\u91C7\u7528\u4E86\u89E3\u91CA\u6267\u884C\u548C\u5373\u65F6\u7F16\u8BD1\u5E76\u5B58\u7684\u65B9\u5F0F

                                                                      \u89E3\u91CA\u5668\u662F\u4FDD\u8BC1\u54CD\u5E94\u7684\u65F6\u95F4\u7684\uFF0C\u9010\u884C\u5730\u5BF9\u5B57\u8282\u7801\u6307\u4EE4\u8FDB\u884C\u89E3\u91CA\u6267\u884C

                                                                      JIT\u662F\u5BF9\u70ED\u70B9\u4EE3\u7801\u7684\u5B57\u8282\u7801\u6307\u4EE4\u518D\u7F16\u8BD1\u6210\u673A\u5668\u6307\u4EE4\uFF0C\u8FD9\u662F\u4E8C\u6B21\u7F16\u8BD1\uFF0C\u7B2C\u4E00\u6B21\u7F16\u8BD1\u662F\u628A\u6E90\u6587\u4EF6\u7F16\u8BD1\u6210\u5B57\u8282\u7801\u6587\u4EF6\uFF0C\u7B2C\u4E8C\u6B21\u662F\u628A\u5B57\u8282\u7801\u6587\u4EF6\u4E2D\u7684\u5B57\u8282\u7801\u6307\u4EE4\u7F16\u8BD1\u6210\u673A\u5668\u6307\u4EE4\uFF0C\u8FD9\u90E8\u5206\u673A\u5668\u6307\u4EE4\u662F\u53CD\u590D\u6267\u884C\u7684\u70ED\u70B9\u4EE3\u7801\uFF0C\u8FD8\u7F13\u5B58\u8D77\u6765\u4E86\uFF0C\u5B58\u50A8\u5728\u65B9\u6CD5\u533A\u4E2D\uFF0C\u4FDD\u8BC1\u7A0B\u5E8F\u6267\u884C\u7684\u6027\u80FD\uFF0C\u6240\u4EE5\u5E02\u9762\u4E0A\u4E3B\u6D41\u7684\u865A\u62DF\u673A\u90FD\u91C7\u7528\u4E8C\u8005\u5E76\u5B58\u7684\u65B9\u5F0F\u3002

                                                                    JVM\u7684\u67B6\u6784\u6A21\u578B

                                                                    1. Java\u7F16\u8BD1\u5668\u8F93\u5165\u7684\u6307\u4EE4\u6D41\u662F\u57FA\u4E8E\u6808\u7684\u6307\u4EE4\u67B6\u6784

                                                                      \u53E6\u5916\u4E00\u79CD\u6307\u4EE4\u96C6\u67B6\u6784\u662F\u57FA\u4E8E\u5BC4\u5B58\u5668\u7684\u6307\u4EE4\u96C6\u67B6\u6784

                                                                      image-20210804224747608

                                                                      \u6808\u662F\u5185\u5B58\u5C42\u9762\u7684\uFF0C\u4E0D\u9700\u8981\u548C\u786C\u4EF6\u6253\u4EA4\u9053\uFF0C\u6240\u4EE5\u6709\u66F4\u597D\u7684\u53EF\u79FB\u690D\u6027

                                                                      \u57FA\u4E8E\u5BC4\u5B58\u5668\u7684\u65B9\u5F0F\uFF0C\u6027\u80FD\u4F18\u79C0\uFF0C\u6307\u4EE4\u9700\u8981\u7531CPU\u6765\u6267\u884C\uFF0C\u5728\u9AD8\u901F\u7F13\u51B2\u533A\u4E2D\u8FDB\u884C\u6267\u884C\uFF0C\u548C\u786C\u4EF6\u7684\u8026\u5408\u5EA6\u9AD8\uFF0C

                                                                      \u6808\u5F0F\u67B6\u6784\u7684\u6307\u4EE4\u96C6\u5C11\uFF0C\u4F46\u662F\u5B8C\u6210\u4E00\u4E2A\u64CD\u4F5C\u7684\u6307\u4EE4\u591A\uFF0C\u5BC4\u5B58\u5668\u67B6\u6784\u5B8C\u6210\u540C\u6837\u64CD\u4F5C\u7684\u6307\u4EE4\u5C11\u3002

                                                                    JVM\u7684\u751F\u547D\u5468\u671F

                                                                    1. \u81EA\u5B9A\u4E49\u7C7B\u662F\u7531\u7CFB\u7EDF\u7C7B\u52A0\u8F7D\u5668\u52A0\u8F7D\u7684\uFF0C\u81EA\u5B9A\u4E49\u7C7B\u4F1A\u9ED8\u8BA4\u7EE7\u627FObject\u7C7B\uFF0CObject\u7C7B\u5C31\u662F\u7531\u5F15\u5BFC\u7C7B\u52A0\u8F7D\u5668\u52A0\u8F7D\u7684\u3002

                                                                    2. Java\u865A\u62DF\u673A\u7684\u542F\u52A8\u662F\u901A\u8FC7\u5F15\u5BFC\u7C7B\u52A0\u8F7D\u5668\u521B\u5EFA\u4E00\u4E2A\u521D\u59CB\u7C7B\u6765\u5B8C\u6210\u7684\u3002\u8FD9\u4E2A\u521D\u59CB\u7C7B\u4E0D\u662FObject\u7C7B

                                                                      \u6267\u884C\u4E00\u4E2A\u7B80\u5355\u7684\u7A0B\u5E8F\uFF0C\u5B9E\u9645\u4E0A\u4F1A\u52A0\u8F7D\u975E\u5E38\u591A\u7684\u7C7B\uFF0CObject\u7C7B\u662F\u5C5E\u4E8E\u5F15\u5BFC\u7C7B\u52A0\u8F7D\u5668\u52A0\u8F7D\u7684\u7C7B\u4E4B\u4E00

                                                                      \u7236\u7C7B\u7684\u52A0\u8F7D\u662F\u65E9\u4E8E\u5B50\u7C7B\u7684

                                                                    3. \u4E00\u4E2AJVM\u5BF9\u5E94\u4E8E\u4E00\u4E2A\u8FD0\u884C\u65F6\u6570\u636E\u533A\uFF0C\u4E5F\u5C31\u662F\u8FD0\u884C\u65F6\u73AF\u5883\uFF0C\u5BF9\u5E94\u4E8ERuntime\u7C7B\uFF0CRuntime\u7C7B\u662F\u5355\u4F8B\u7684\uFF0C\u662F\u997F\u6C49\u5F0F

                                                                    4. \u4E3B\u6D41\u7684JVM\u65E2\u63D0\u4F9B\u89E3\u91CA\u5668\uFF0C\u4E5F\u63D0\u4F9BJIT\u5373\u65F6\u7F16\u8BD1\u5668\uFF0C\u89E3\u91CA\u5668\u9010\u884C\u89E3\u91CA\u6267\u884C\u5B57\u8282\u7801\u6587\u4EF6\uFF0C\u7F16\u8BD1\u5668\u662F\u5C06\u5B57\u8282\u7801\u7F16\u8BD1\u6210\u673A\u5668\u6307\u4EE4\uFF0C\u56E0\u4E3A\u5B57\u8282\u7801\u867D\u7136\u662F\u4E8C\u8FDB\u5236\u6587\u4EF6\uFF0C\u4F46\u662F\u5E76\u4E0D\u662F\u673A\u5668\u6307\u4EE4\uFF0C\u8FD9\u662F\u4E00\u6B21\u518D\u7F16\u8BD1\uFF0C\u76EE\u7684\u5C31\u662F\u5C06\u70ED\u70B9\u4EE3\u7801\u7F16\u8BD1\u6210\u673A\u5668\u6307\u4EE4\u5E76\u8FDB\u884C\u7F13\u5B58\uFF0C\u63D0\u9AD8\u6267\u884C\u6548\u7387\u3002

                                                                      \u7B2C\u4E00\u6B21\u7F16\u8BD1\u662F\u5C06Java\u6E90\u6587\u4EF6\u7F16\u8BD1\u6210\u5B57\u8282\u7801\u6587\u4EF6

                                                                      \u7B2C\u4E8C\u6B21\u7F16\u8BD1\u662F\u5C06\u5B57\u8282\u7801\u7684\u70ED\u70B9\u4EE3\u7801\u7F16\u8BD1\u6210\u673A\u5668\u6307\u4EE4\u3002

                                                                    5. \u7C7B\u7684\u52A0\u8F7D\u5668\u5C31\u6709\u51E0\u79CD\uFF0C\u6709\u5F15\u5BFC\u7C7B\u52A0\u8F7D\u5668\uFF0C\u7CFB\u7EDF\u7C7B\u52A0\u8F7D\u5668\uFF0C\u4E00\u4E2A\u81EA\u5B9A\u4E49\u7C7B\u5C31\u662F\u901A\u8FC7\u7CFB\u7EDF\u7C7B\u52A0\u8F7D\u5668\u8FDB\u884C\u52A0\u8F7D\uFF0C\u4F5C\u4E3AClass\u7C7B\u7684\u5BF9\u8C61\u52A0\u8F7D\u5230\u65B9\u6CD5\u533A\u4E2D\u3002

                                                                      JVM\u542F\u52A8\u662F\u901A\u8FC7\u5F15\u5BFC\u7C7B\u52A0\u8F7D\u5668\uFF0C\u5373bootstrap class loader \u521B\u5EFA\u4E00\u4E2A\u521D\u59CB\u7C7B\u3002Object\u7C7B\u5C31\u662F\u5F15\u5BFC\u7C7B\u52A0\u8F7D\u5668\u52A0\u8F7D\u7684\u3002

                                                                    6. \u6267\u884C\u5F15\u64CE\u7684\u4F5C\u7528\u5C31\u662F\u5C06\u9AD8\u7EA7\u8BED\u8A00\u7FFB\u8BD1\u6210\u673A\u5668\u6307\u4EE4

                                                                    7. \u4E3A\u4EC0\u4E48\u4E0D\u628A\u6240\u6709\u5B57\u8282\u7801\u90FD\u7F16\u8BD1\u6210\u673A\u5668\u6307\u4EE4\uFF0C\u90FD\u8FDB\u884C\u7F13\u5B58\uFF1F

                                                                      \u6267\u884C\u5F15\u64CE\u4E2D\u7684JIT\u5373\u65F6\u7F16\u8BD1\u5668\uFF0C\u5C06\u5B57\u8282\u7801\u518D\u7F16\u8BD1\u6210\u673A\u5668\u6307\u4EE4\uFF0C\u8FD9\u4E5F\u662F\u9700\u8981\u82B1\u65F6\u95F4\u7684\u3002\u5982\u679C\u7F16\u8BD1\u6BCF\u4E00\u884C\uFF0C\u4F1A\u5BFC\u81F4\u6682\u505C\u65F6\u95F4\u8FC7\u957F\u3002\u6682\u505C\u7684\u65F6\u95F4\u5C31\u662F\u7528\u6765\u7F16\u8BD1\u7684\u3002

                                                                      \u89E3\u91CA\u5668\u662F\u4FDD\u8BC1\u54CD\u5E94\u65F6\u95F4\u7684\uFF0C\u54CD\u5E94\u5F88\u5FEB\uFF0C\u4E0A\u6765\u5C31\u6267\u884C\uFF0C\u56E0\u4E3A\u4E0D\u9700\u8981\u7F16\u8BD1\uFF01

                                                                      \u89E3\u91CA\u5668\u548CJIT\u5373\u65F6\u7F16\u8BD1\u5668\u8981\u642D\u914D\u4F7F\u7528\uFF0C\u8FD9\u4E5F\u662FJava\u8BF4\u662F\u534A\u7F16\u8BD1\u534A\u89E3\u91CA\u8FD0\u884C\u7684\u539F\u56E0

                                                                    8. \u65B9\u6CD5\u533A\u7684\u6982\u5FF5\u53EA\u6709HOTSPOT\u624D\u6709

                                                                    9. \u901A\u8FC7\u8BA1\u6570\u5668\u627E\u5230\u6700\u5177\u7F16\u8BD1\u4EF7\u503C\u4EE3\u7801\uFF0C\u5C06\u5B57\u8282\u7801\u6307\u4EE4\u7FFB\u8BD1\u6210\u673A\u5668\u6307\u4EE4\uFF0C\u5728\u672C\u5730\u7F13\u5B58\u8D77\u6765\uFF0C\u4E0B\u6B21\u9700\u8981\u7684\u65F6\u5019\u76F4\u63A5\u6267\u884C

                                                                    10. \u89E3\u91CA\u5668\u4E3B\u8981\u8D1F\u8D23\u7684\u662F\u54CD\u5E94\u65F6\u95F4\uFF0C\u7F16\u8BD1\u5668\u4E3B\u8981\u89E3\u51B3\u7684\u662F\u6267\u884C\u7684\u6027\u80FD\uFF0C\u56E0\u4E3A\u5C06\u5B57\u8282\u7801\u6307\u4EE4\u7F16\u8BD1\u6210\u673A\u5668\u6307\u4EE4\u662F\u9700\u8981\u82B1\u65F6\u95F4\u7684\uFF0C\u7F16\u8BD1\u597D\u5E76\u7F13\u5B58\u597D\u4E4B\u540E\u624D\u89E3\u51B3\u6027\u80FD\u3002\u89E3\u91CA\u5668\u5C31\u8D1F\u8D23\u54CD\u5E94\uFF0C\u6240\u4EE5\u4E24\u8005\u9700\u8981\u7ED3\u5408\u8D77\u6765\u3002

                                                                    \u7C7B\u52A0\u8F7D\u5B50\u7CFB\u7EDF

                                                                    \u6982\u8FF0

                                                                    image-20210805223255637

                                                                    image-20210805223443030

                                                                    1. \u7C7B\u52A0\u8F7D\u5668\u5B50\u7CFB\u7EDF\u8BE6\u7EC6\u53EF\u89C1\u4E0B\u9762\u8FD9\u5F20\u56FE\uFF0C\u7C7B\u52A0\u8F7D\u5668\u5B50\u7CFB\u7EDF\u3002

                                                                      \u7C7B\u52A0\u8F7D\u5668\u53C8\u6709\u591A\u79CD\uFF0C\u6BD4\u5982\u5F15\u5BFC\u7C7B\u52A0\u8F7D\u5668\u3001\u7CFB\u7EDF\u7C7B\u52A0\u8F7D\u5668

                                                                      \u7C7B\u7684\u52A0\u8F7D

                                                                      • loading \u52A0\u8F7D
                                                                        • \u5F15\u5BFC\u7C7B\u52A0\u8F7D\u5668
                                                                        • \u6269\u5C55\u7C7B\u52A0\u8F7D\u5668
                                                                        • \u7CFB\u7EDF\u7C7B\u52A0\u8F7D\u5668
                                                                        • \u4E5F\u53EF\u4EE5\u81EA\u5B9A\u4E49\u7C7B\u52A0\u8F7D\u5668
                                                                      • linking \u94FE\u63A5
                                                                        • \u9A8C\u8BC1
                                                                        • \u51C6\u5907
                                                                        • \u89E3\u6790
                                                                      • initialization \u521D\u59CB\u5316 \uFF08\u6D89\u53CA\u5230\u9759\u6001\u53D8\u91CF\u7684\u663E\u793A\u521D\u59CB\u5316\uFF09
                                                                    2. \u7A0B\u5E8F\u8BA1\u6570\u5668\u662F\u6BCF\u4E2A\u7EBF\u7A0B\u4E00\u4EFD

                                                                    3. \u6211\u4EEC\u5E73\u65F6\u8BF4\u7684\u6808\u662F\u6307\u865A\u62DF\u673A\u6808

                                                                    4. \u5806\u533A\u662F\u88AB\u591A\u4E2A\u7EBF\u7A0B\u5171\u4EAB\u7684

                                                                    5. \u65B9\u6CD5\u533A\u4E3B\u8981\u7528\u6765\u5B58\u653E\u7C7B\u7684\u4FE1\u606F\u3001\u5E38\u91CF\u7B49\u7B49\uFF0C\u65B9\u6CD5\u533A\u53EA\u6709hotspot\u624D\u6709

                                                                    6. \u6267\u884C\u5F15\u64CE\u5206\u4E3A\u89E3\u91CA\u5668\u3001JIT\u7F16\u8BD1\u5668\u3001\u5783\u573E\u56DE\u6536\u5668

                                                                      image-20210805224014478

                                                                      image-20210805224156490

                                                                    7. \u5982\u679C\u81EA\u5DF1\u60F3\u624B\u5199\u4E00\u4E2A\u865A\u62DF\u673A\u7684\u8BDD\uFF0C\u8981\u8003\u8651

                                                                      • \u7C7B\u52A0\u8F7D\u5668\u5B50\u7CFB\u7EDF
                                                                      • \u6267\u884C\u5F15\u64CE

                                                                    \u7C7B\u52A0\u8F7D\u5668\u5B50\u7CFB\u7EDF\u4F5C\u7528

                                                                    1. image-20210805224728324

                                                                      class\u5B57\u8282\u7801\u6587\u4EF6\u5728\u5F00\u5934\u6709\u7279\u5B9A\u6587\u4EF6\u6807\u8BC6\uFF0C\u8FD9\u4E2A\u9A8C\u8BC1\u662F\u5728\u94FE\u63A5\u9636\u6BB5\u7B2C\u4E00\u4E2A\u9636\u6BB5\u9A8C\u8BC1\u9636\u6BB5\u6765\u9A8C\u8BC1

                                                                    2. \u5B57\u8282\u7801\u6587\u4EF6\u662F\u7269\u7406\u78C1\u76D8\u4E0A\u7684\u6587\u4EF6\uFF0C\u7C7B\u7684\u52A0\u8F7D\u5668\u4E3B\u8981\u662F\u628A\u8FD9\u4E2A\u7269\u7406\u78C1\u76D8\u4E0A\u7684\u5B57\u8282\u7801\u6587\u4EF6\u52A0\u8F7D\u5230\u5185\u5B58\u5F53\u4E2D\uFF0C\u751F\u6210Class\u7684\u5B9E\u4F8B\uFF0C\u751F\u6210\u5230\u65B9\u6CD5\u533A\u4E2D

                                                                    3. image-20210805225629843

                                                                      \u52A0\u8F7D\u5206\u4E3A\u52A0\u8F7D\u3001\u94FE\u63A5\u3001\u521D\u59CB\u5316\u4E09\u4E2A\u90E8\u5206\uFF0C\u6070\u597D\u7B2C\u4E00\u4E2A\u90E8\u5206\u4E5F\u53EB\u52A0\u8F7D

                                                                      \u65B9\u6CD5\u533A\u5728jdk7\u5373\u4EE5\u524D\u53EB\u6C38\u4E45\u4EE3\uFF0C\u4E4B\u540E\u53EB\u5143\u7A7A\u95F4\uFF0C\u90FD\u662F\u65B9\u6CD5\u533A\u7684\u5177\u4F53\u5B9E\u73B0

                                                                      \u751F\u6210Class\u7684\u5BF9\u8C61\u5B9E\u4F8B\u662F\u5728\u52A0\u8F7D\u8FD9\u4E2A\u73AF\u8282\u51FA\u73B0\u7684\u3002

                                                                    4. \u94FE\u63A5\u5206\u4E3A\u4E09\u4E2A\u5B50\u9636\u6BB5\uFF1A

                                                                      • \u9A8C\u8BC1

                                                                        \u5B57\u8282\u7801\u6587\u4EF6\u8D77\u59CB\u90FD\u662F\u53EBCA FE BA BE\uFF0C\u8FD9\u79F0\u4E3A\u9B54\u672F\uFF0C\u6240\u6709\u80FD\u88ABJVM\u8BC6\u522B\u7684\u5B57\u8282\u7801\u6587\u4EF6\uFF0C\u6709\u6548\u8D77\u59CB\u90FD\u662F\u8FD9\u4E2A\uFF0C\u901A\u8FC7\u8FD9\u4E2A\u6765\u8FDB\u884C\u6821\u9A8C

                                                                        \u5B57\u8282\u7801\u6587\u4EF6\u4E5F\u662F\u4E8C\u8FDB\u5236\u6587\u4EF6\uFF0C\u4F46\u662F\u5B57\u8282\u7801\u6307\u4EE4\u4E0D\u662F\u673A\u5668\u6307\u4EE4\uFF01\u867D\u7136\u5B57\u8282\u7801\u6587\u4EF6\u662F\u4E8C\u8FDB\u5236\u7684\u3002\u6240\u4EE5jvm\u7ED3\u6784\u4E2D\u6709\u6267\u884C\u5F15\u64CE\uFF0C\u6267\u884C\u5F15\u64CE\u5C31\u6709\u5C06\u9AD8\u7EA7\u8BED\u8A00\u8F6C\u6362\u6210\u673A\u5668\u6307\u4EE4\u7684\u4F5C\u7528\uFF0C\u6240\u4EE5\u5728\u6267\u884C\u5F15\u64CE\u4E2D\uFF0CJIT\u5373\u65F6\u7F16\u8BD1\u5668\u8981\u5BF9\u5B57\u8282\u7801\u6307\u4EE4\u7F16\u8BD1\u6210\u673A\u5668\u6307\u4EE4\uFF0C\u8FD9\u662F\u4E8C\u6B21\u7F16\u8BD1

                                                                        \u5B57\u8282\u7801\u6587\u4EF6\u662F\u4E8C\u8FDB\u5236\u6587\u4EF6\uFF0C\u5F88\u5BB9\u6613\u4F2A\u9020\u3002\u6240\u4EE5\u9700\u8981\u8FDB\u884C\u9A8C\u8BC1\uFF0C\u770B\u6240\u9A8C\u8BC1\u7684\u5B57\u8282\u7801\u6587\u4EF6\u662F\u5426\u662F\u7B26\u5408\u5F53\u524D\u865A\u62DF\u673A\u8981\u6C42\uFF0C\u4FDD\u8BC1\u88AB\u52A0\u8F7D\u7C7B\u7684\u6B63\u786E\u6027\u3002

                                                                      • \u51C6\u5907

                                                                        image-20210806215338200

                                                                        \u9759\u6001\u53D8\u91CF\uFF08\u6216\u8005\u53EB\u7C7B\u53D8\u91CF\uFF09\uFF0Ca\u88AB\u663E\u5F0F\u8D4B\u503C\u4E3A1\uFF0C\u4F46\u662F\u5728\u94FE\u63A5\u7684\u51C6\u5907\u9636\u6BB5\uFF0C\u662F\u8D4B\u503C\u4E3A0\uFF0C\u5728\u521D\u59CB\u5316\u9636\u6BB5\u624D\u4F1A\u8D4B\u503C\u4E3A1\u3002\u94FE\u63A5\u7684\u51C6\u5907\u9636\u6BB5\uFF0C\u662F\u4E3A\u9759\u6001\u5C5E\u6027\u8D4B\u9ED8\u8BA4\u521D\u59CB\u503C\uFF0C\u521D\u59CB\u5316\u9636\u6BB5\u624D\u662F\u663E\u5F0F\u8D4B\u503C

                                                                        \u8FD9\u91CC\u4E0D\u5305\u542B\u7528final\u4FEE\u9970\u7684static\u53D8\u91CF\uFF0C\u56E0\u4E3Afinal\u5728\u7F16\u8BD1\u7684\u65F6\u5019\u5C31\u4F1A\u5206\u914D\u4E86\uFF0C\u51C6\u5907\u9636\u6BB5\u4F1A\u663E\u5F0F\u521D\u59CB\u5316

                                                                        \u8FD9\u91CC\u4E0D\u4F1A\u4E3A\u5B9E\u4F8B\u53D8\u91CF\u5206\u914D\u521D\u59CB\u5316\uFF0C\u56E0\u4E3A\u8FD9\u4E2A\u65F6\u5019\u8FD8\u6CA1\u6709\u521B\u5EFA\u5BF9\u8C61\uFF0C\u8FD8\u662F\u4E00\u4E2A\u7C7B\u7684\u52A0\u8F7D\u8FC7\u7A0B\u3002\u7C7B\u53D8\u91CF\uFF08\u53EF\u4EE5\u7406\u89E3\u4E3A\u7C7B\u7684\u4FE1\u606F\uFF0C\u7C7B\u53D8\u91CF\u4E5F\u662F\u9759\u6001\u53D8\u91CF\uFF0C\u5C5E\u4E8E\u9759\u6001\u7ED3\u6784\uFF0C\u662F\u968F\u7740\u7C7B\u7684\u52A0\u8F7D\u800C\u52A0\u8F7D\u7684\uFF09\uFF0C\u7C7B\u53D8\u91CF\u4F1A\u5206\u914D\u5728\u65B9\u6CD5\u533A\u4E2D\uFF0C\u800C\u5B9E\u4F8B\u53D8\u91CF\u662F\u968F\u7740\u5BF9\u8C61\u4E00\u8D77\u5206\u914D\u5230Java\u5806\u4E2D\u3002

                                                                        \u865A\u62DF\u673A\u6808\u91CC\u5B58\u7684\u662F\u5C40\u90E8\u53D8\u91CF\uFF0C\u90A3\u4E48\u6210\u5458\u53D8\u91CF\u5C31\u5206\u4E3A\u9759\u6001\u53D8\u91CF\u548C\u975E\u9759\u6001\u53D8\u91CF\uFF0C\u9759\u6001\u53D8\u91CF\u5C31\u662F\u968F\u7740\u7C7B\u7684\u52A0\u8F7D\u800C\u52A0\u8F7D\uFF0C\u662F\u5C5E\u4E8E\u7C7B\u7684\u7ED3\u6784\uFF0C\u4F1A\u5206\u914D\u5728\u65B9\u6CD5\u533A\u4E2D\uFF0C\u56E0\u4E3A\u7C7B\u5728\u88ABclassloader\uFF0C\u4E5F\u5C31\u662F\u7C7B\u52A0\u8F7D\u5668\u5B50\u7CFB\u7EDF\u52A0\u8F7D\u4E4B\u540E\uFF0C\u7C7B\u7684\u4FE1\u606F\u3001\u7ED3\u6784\u4F1A\u52A0\u8F7D\u5230\u5185\u5B58\u7684\u65B9\u6CD5\u533A\u4E2D\uFF0C\u800C\u975E\u9759\u6001\u53D8\u91CF\u4E0D\u4F1A\uFF0C\u975E\u9759\u6001\u53D8\u91CF\u4F1A\u968F\u7740\u5B9E\u4F8B\u5BF9\u8C61\u7684\u521B\u5EFA\uFF0C\u548C\u5BF9\u8C61\u5B9E\u4F8B\u4E00\u8D77\uFF0C\u5206\u914D\u5230Java\u5806\u7A7A\u95F4\u4E2D

                                                                        \u5C5E\u6027\u4E5F\u5C31\u662F\u6210\u5458\u53D8\u91CF\u662F\u6709\u9ED8\u8BA4\u521D\u59CB\u503C\u7684\uFF0C\u800C\u5C40\u90E8\u53D8\u91CF\u6CA1\u6709\uFF0C\u5FC5\u987B\u663E\u5F0F\u8D4B\u521D\u59CB\u503C\uFF0C\u5C5E\u6027\u4E2D\u7684\u9759\u6001\u53D8\u91CF\u5728\u94FE\u63A5\u7684\u51C6\u5907\u9636\u6BB5\u5C31\u4F1A\u9ED8\u8BA4\u8D4B\u521D\u59CB\u503C\u4E86\uFF0C\u800C\u975E\u9759\u6001\u53D8\u91CF\u4F1A\u968F\u7740\u5BF9\u8C61\u5B9E\u4F8B\u7684\u521B\u5EFA\u800C\u521B\u5EFA\uFF0C\u5206\u914D\u5230\u5806\u7A7A\u95F4\u4E2D\u3002\u867D\u7136\u90FD\u662F\u6210\u5458\u53D8\u91CF\uFF0C\u4F46\u662F\u4ED6\u4EEC\u7684\u751F\u547D\u5468\u671F\u662F\u4E0D\u540C\u7684\u3002

                                                                      • \u89E3\u6790

                                                                        \u5C06\u7B26\u53F7\u5F15\u7528\u8F6C\u6362\u4E3A\u76F4\u63A5\u5F15\u7528

                                                                    5. \u521D\u59CB\u5316

                                                                      \u6267\u884C\u7C7B\u6784\u9020\u5668\u65B9\u6CD5<clinit>()\u7684\u8FC7\u7A0B

                                                                      \u4EFB\u4F55\u4E00\u4E2A\u7C7B\uFF0C\u58F0\u660E\u4EE5\u540E\uFF0C\u5185\u90E8\u81F3\u5C11\u5B58\u5728\u4E00\u4E2A\u7C7B\u7684\u6784\u9020\u5668\uFF0C\u8FD9\u91CC\u8BF4\u7684\u6784\u9020\u5668\u5C31\u662F\u6211\u4EEC\u5E73\u5E38\u8BF4\u7684\u6784\u9020\u5668\u4E86\uFF0C\u53EF\u4EE5\u663E\u5F0F\u58F0\u660E\uFF0C\u4E5F\u53EF\u4EE5\u662F\u7CFB\u7EDF\u9ED8\u8BA4\u63D0\u4F9B\u7684\uFF0C \u8FD9\u4E2A\u5728\u5B57\u8282\u7801\u6587\u4EF6\u91CC\u5BF9\u5E94\u4E8E<init>\uFF08\u4E25\u683C\u6765\u8BF4\u5B57\u8282\u7801\u6587\u4EF6\u662F\u4E8C\u8FDB\u5236\u6587\u4EF6\uFF0C\u5B57\u8282\u7801\u6587\u4EF6\u7FFB\u8BD1\u4E4B\u540E\u4F1A\u6709\u8FD9\u4E2A<init>\uFF09\uFF0C\u8FD9\u4E2A\u5C31\u662F\u6307\u7684\u6211\u4EEC\u8BF4\u7684\u6784\u9020\u5668

                                                                      \u800C<clinit>\u8FD9\u4E2A\u6307\u7684\u662F\u7C7B\u91CC\u9762\u7684\u6240\u6709\u9759\u6001\u53D8\u91CF\uFF08\u7C7B\u53D8\u91CF\uFF09\u7684\u663E\u5F0F\u8D4B\u503C\u52A8\u4F5C\u4EE5\u53CA\u9759\u6001\u4EE3\u7801\u5757\u91CC\u7684\u5185\u5BB9\u3002<clinit> \u662F\u9759\u6001\u53D8\u91CF\u8D4B\u503C\u548C\u9759\u6001\u4EE3\u7801\u5757\u7684\u8BED\u53E5

                                                                      \u5B50\u7C7B\u7684<clinit>\u6267\u884C\u4E00\u5B9A\u4F1A\u665A\u4E8E\u7236\u7C7B\u7684<clinit>\u7684\u6267\u884C

                                                                      \u865A\u62DF\u673A\u6267\u884C\u7C7B\u7684\u52A0\u8F7D\u7684\u65F6\u5019\uFF0C\u53EA\u4F1A\u8C03\u7528\u4E00\u6B21<clinit>\u65B9\u6CD5\uFF0C\u7C7B\u52A0\u8F7D\u4E4B\u540E\u4F1A\u5728\u5185\u5B58\u4E2D\u7F13\u5B58\u8D77\u6765\uFF0C\u4E5F\u5C31\u662F\u8BF4\uFF0C\u4E00\u4E2A\u7C7B\u53EA\u4F1A\u88AB\u52A0\u8F7D\u4E00\u6B21

                                                                    \u7C7B\u52A0\u8F7D\u5668\u7684\u5206\u7C7B

                                                                    1. JVM\u652F\u6301\u4E24\u79CD\u7C7B\u578B\u7684\u7C7B\u52A0\u8F7D\u5668\uFF0C\u5206\u522B\u4E3A\u5F15\u5BFC\u7C7B\u52A0\u8F7D\u5668\uFF0C\u548C\u81EA\u5B9A\u4E49\u7C7B\u52A0\u8F7D\u5668\uFF0C

                                                                      \u6240\u6709\u6D3E\u751F\u4E8E\u62BD\u8C61\u7C7BClassLoader\u7684\u7C7B\u52A0\u8F7D\u5668\u90FD\u5212\u5206\u4E3A\u81EA\u5B9A\u4E49\u7C7B\u52A0\u8F7D\u5668\u3002\u6240\u4EE5\u7CFB\u7EDF\u7C7B\u52A0\u8F7D\u5668\u4E5F\u5C5E\u4E8E\u81EA\u5B9A\u4E49\u7C7B\u52A0\u8F7D\u5668

                                                                    2. bootstrap classloader\u5373\u5F15\u5BFC\u7C7B\u52A0\u8F7D\u5668\u4E0D\u662FJava\u8BED\u8A00\u7F16\u5199\u7684\uFF0C\u5728\u4EE3\u7801\u91CC\u4E5F\u4E0D\u80FD\u901A\u8FC7getParent()\u7684\u65B9\u5F0F\u83B7\u53D6\u5230

                                                                    3. \u5BF9\u4E8E\u7528\u6237\u81EA\u5B9A\u4E49\u7C7B\u6765\u8BF4\uFF0C\u9ED8\u8BA4\u4F7F\u7528\u7CFB\u7EDF\u7C7B\u52A0\u8F7D\u5668\u8FDB\u884C\u52A0\u8F7D

                                                                      Object\u7C7B\u5219\u662F\u7528\u5F15\u5BFC\u7C7B\u52A0\u8F7D\u5668\u8FDB\u884C\u52A0\u8F7D

                                                                      String\u7C7B\u662F\u7528\u5F15\u5BFC\u7C7B\u52A0\u8F7D\u5668\u8FDB\u884C\u52A0\u8F7D

                                                                    4. \u7CFB\u7EDF\u7684\u6838\u5FC3\u7C7B\u5E93\u90FD\u662F\u4F7F\u7528\u5F15\u5BFC\u7C7B\u52A0\u8F7D\u5668\u8FDB\u884C\u52A0\u8F7D\u7684\u3002

                                                                      \u5F15\u5BFC\u7C7B\u52A0\u8F7D\u5668\u5728\u4EE3\u7801\u91CC\u6CA1\u529E\u6CD5\u83B7\u53D6\u5230\u3002

                                                                      \u5F15\u5BFC\u7C7B\u52A0\u8F7D\u5668\u662F\u4F7F\u7528C\u548CC++\u6765\u7F16\u5199\u7684\uFF0C\u5D4C\u5957\u5728JVM\u5185\u90E8\uFF08\u53EF\u4EE5\u7406\u89E3\u4E3A\u5C31\u662FJVM\u4E2D\u7684\u4E00\u90E8\u5206\uFF0C\u5C31\u662F\u7528\u6765\u52A0\u8F7DJava\u7684\u6838\u5FC3\u7C7B\u5E93\uFF09\uFF0C \u81EA\u5B9A\u4E49\u7C7B\u52A0\u8F7D\u5668\u662F\u4F7F\u7528Java\u8BED\u8A00\u7F16\u5199\u7684\u3002

                                                                    5. \u5F15\u5BFC\u7C7B\u52A0\u8F7D\u5668\u5E76\u4E0D\u7EE7\u627F\u81EAClassLoader\uFF0C\u6CA1\u6709\u7236\u52A0\u8F7D\u5668

                                                                      \u5F15\u5BFC\u7C7B\u52A0\u8F7D\u5668\u52A0\u8F7D\u6269\u5C55\u7C7B\u548C\u5E94\u7528\u7A0B\u5E8F\u7C7B\u52A0\u8F7D\u5668\uFF08\u7CFB\u7EDF\u7C7B\u52A0\u8F7D\u5668\uFF09\uFF0C\u5E76\u6307\u5B9A\u4E3A\u4ED6\u4EEC\u7684\u7236\u7C7B\u52A0\u8F7D\u5668

                                                                      \u4EE3\u7801\u91CC\u83B7\u53D6\u5230\u7C7B\u7684\u52A0\u8F7D\u5668\u4E4B\u540E\uFF0C\u53D1\u73B0\u8FD9\u4E9B\u7C7B\u7684\u52A0\u8F7D\u5668\u4E5F\u662F\u5BF9\u8C61\uFF0C\u8FD9\u4E9B\u5BF9\u8C61\u5BF9\u5E94\u7684\u7C7B\u4E5F\u662F\u9700\u8981\u52A0\u8F7D\u7684\uFF0C\u5C31\u662F\u901A\u8FC7\u5F15\u5BFC\u7C7B\u52A0\u8F7D\u5668\u8FDB\u884C\u52A0\u8F7D\u7684\u3002

                                                                      \u4E5F\u5C31\u662F\u8BF4\u6BD4\u5982\u81EA\u5B9A\u4E49\u7C7B\u662F\u901A\u8FC7\u7CFB\u7EDF\u7C7B\u52A0\u8F7D\u5668\u52A0\u8F7D\u7684\uFF0C\u800C\u7CFB\u7EDF\u7C7B\u52A0\u8F7D\u5668\u662F\u901A\u8FC7\u5F15\u5BFC\u7C7B\u52A0\u8F7D\u5668\u52A0\u8F7D\u7684\u3002

                                                                      \u51FA\u4E8E\u5B89\u5168\u8003\u8651\uFF0C \u5F15\u5BFC\u7C7B\u52A0\u8F7D\u5668\u53EA\u52A0\u8F7Djava\u3001javax\u3001sun\u7B49\u5F00\u5934\u7684\u7C7B

                                                                      \u5F15\u5BFC\u7C7B\u52A0\u8F7D\u6838\u5FC3\u7C7B\u5E93\uFF01

                                                                    6. \u5F15\u5BFC\u7C7B\u52A0\u8F7D\u5668\u4E5F\u53EB\u542F\u52A8\u7C7B\u52A0\u8F7D\u5668\uFF0CBootstrap ClassLoader

                                                                      \u51E1\u662F\u548C\u5E95\u5C42\u64CD\u4F5C\u7CFB\u7EDF\u7F16\u7A0B\u76F8\u5173\u7684\uFF0C\u8FD8\u662F\u8003\u8651C\u548CC++\uFF0C\u4F46\u662F\u73B0\u5728\u968F\u7740\u786C\u4EF6\u7684\u53D1\u5C55Java\u7684\u6267\u884C\u6548\u7387\u548CC\u5DF2\u7ECF\u4E0D\u76F8\u4E0A\u4E0B\uFF0C\u5728\u6700\u521D\u7684\u65F6\u5019\uFF0CJava\u7684\u542F\u52A8\u7C7B\u52A0\u8F7D\u5668\u8FD8\u662F\u7528C\u548CC++\u6765\u7F16\u5199\u7684

                                                                    7. \u6269\u5C55\u7C7B\u52A0\u8F7D\u5668\u662F\u865A\u62DF\u673A\u81EA\u5E26\u7684\u52A0\u8F7D\u5668\uFF0C\u662FJava\u8BED\u8A00\u7F16\u5199\u7684\uFF0C\u7EE7\u627F\u4E8EClassLoader\u7C7B\uFF0C\u7236\u7C7B\u52A0\u8F7D\u5668\u4E3A\u542F\u52A8\u7C7B\u52A0\u8F7D\u5668\uFF0C\u4E5F\u5C31\u662F\u5F15\u5BFC\u7C7B\u52A0\u8F7D\u5668\u3002

                                                                      \u6CE8\u610F\u5728\u8FD9\u91CC\u7236\u7C7B\u548C\u7236\u7C7B\u52A0\u8F7D\u5668\u662F\u4E0D\u540C\u7684

                                                                      \u6269\u5C55\u7C7B\u52A0\u8F7D\u5668\u5C31\u662F\u52A0\u8F7D\u6838\u5FC3\u7C7B\u5E93\u4E4B\u5916\u7684\u6269\u5C55\u7684\u90A3\u4E9B\u5305

                                                                    8. \u5E94\u7528\u7A0B\u5E8F\u7C7B\u52A0\u8F7D\u5668\u4E5F\u53EB\u7CFB\u7EDF\u7C7B\u52A0\u8F7D\u5668\uFF0CAppClassLoader

                                                                      \u4E5F\u662F\u6D3E\u751F\u4E8EClassLoader\u7C7B

                                                                      \u7236\u7C7B\u52A0\u8F7D\u5668\u4E3A\u6269\u5C55\u7C7B\u52A0\u8F7D\u5668\uFF0C\u6269\u5C55\u7C7B\u52A0\u8F7D\u5668\u7684\u7236\u7C7B\u52A0\u8F7D\u5668\u4E3A\u542F\u52A8\u7C7B\u52A0\u8F7D\u5668\uFF0C\u7236\u7C7B\u52A0\u8F7D\u5668\u548C\u7236\u7C7B\u4E0D\u540C\u3002

                                                                      \u8BE5\u7C7B\u52A0\u8F7D\u5668\u662F\u7A0B\u5E8F\u4E2D\u9ED8\u8BA4\u7684\u7C7B\u52A0\u8F7D\u5668

                                                                    9. \u5728\u5FC5\u8981\u65F6\uFF0C\u7528\u6237\u8FD8\u53EF\u4EE5\u81EA\u5B9A\u4E49\u7C7B\u52A0\u8F7D\u5668

                                                                      \u4E3A\u4EC0\u4E48\u8981\u81EA\u5B9A\u4E49\u7C7B\u52A0\u8F7D\u5668

                                                                      • \u9694\u79BB\u52A0\u8F7D\u7C7B
                                                                      • \u4FEE\u6539\u7C7B\u52A0\u8F7D\u7684\u65B9\u5F0F
                                                                      • \u6269\u5C55\u52A0\u8F7D\u6E90
                                                                      • \u9632\u6B62\u6E90\u7801\u6CC4\u6F0F

                                                                      \u9694\u79BB\u52A0\u8F7D\u7C7B\u5C31\u662F\u8BF4\u5728\u540C\u4E00\u4E2A\u9879\u76EE\u4E2D\uFF0C\u5F15\u5165\u4E0D\u540C\u7684\u6846\u67B6\uFF0C\u6216\u8005\u5728\u6846\u67B6\u4E2D\u7528\u5230\u4E86\u4E2D\u95F4\u4EF6\uFF0C\u4E2D\u95F4\u4EF6\u548C\u5E94\u7528\u662F\u9694\u79BB\u7684\uFF0C\u90A3\u4E48\u5C31\u9700\u8981\u628A\u7C7B\u52A0\u8F7D\u5230\u4E0D\u540C\u73AF\u5883\u4E2D\uFF0C\u6BD4\u5982\u5E94\u7528\u7684jar\u5305\uFF0C\u8BA9jar\u5305\u4E0D\u51B2\u7A81

                                                                    10. \u7C7B\u52A0\u8F7D\u5668\u5206\u4E3A\u4E24\u7C7B\uFF0C\u4E00\u7C7B\u662F\u5F15\u5BFC\u7C7B\u52A0\u8F7D\u5668\uFF0C\u53E6\u4E00\u7C7B\u662F\u7EE7\u627F\u4E8EClassLoader\u7684\u7C7B\u52A0\u8F7D\u5668\u5373\u81EA\u5B9A\u4E49\u7C7B\u52A0\u8F7D\u5668

                                                                    11. \u62BD\u8C61\u7C7B\u91CC\u9762\u53EF\u4EE5\u6709\u4E0D\u62BD\u8C61\u7684\u65B9\u6CD5

                                                                    12. \u7CFB\u7EDF\u7C7B\u52A0\u8F7D\u5668\u7684\u7236\u7C7B\u52A0\u8F7D\u5668\u662F\u6269\u5C55\u7C7B\u52A0\u8F7D\u5668

                                                                      \u6269\u5C55\u7C7B\u52A0\u8F7D\u5668\u7684\u7236\u7C7B\u52A0\u8F7D\u5668\u662F\u5F15\u5BFC\u7C7B\u52A0\u8F7D\u5668

                                                                    13. \u5927\u7684Class\u7684\u5B9E\u4F8Bclazz\u53EF\u4EE5\u83B7\u53D6\u5F53\u524D\u7C7B\u7684ClassLoader

                                                                      clazz.getClassLoader();
                                                                       

                                                                    \u53CC\u4EB2\u59D4\u6D3E\u673A\u5236

                                                                    1. Java\u865A\u62DF\u673A\u5BF9class\u6587\u4EF6\u91C7\u7528\u7684\u662F\u6309\u9700\u52A0\u8F7D\u7684\u65B9\u5F0F\uFF0C\u4E5F\u5C31\u662F\u8BF4\u5F53\u9700\u8981\u4F7F\u7528\u8BE5\u7C7B\u65F6\uFF0C\u624D\u4F1A\u5C06\u5B83\u7684class\u6587\u4EF6\u52A0\u8F7D\u5230\u5185\u5B58\u751F\u6210class\u5BF9\u8C61\u3002

                                                                      \u52A0\u8F7D\u67D0\u4E2A\u7C7B\u7684class\u6587\u4EF6\u65F6\uFF0CJava\u865A\u62DF\u673A\u91C7\u7528\u7684\u662F\u53CC\u4EB2\u59D4\u6D3E\u6A21\u5F0F\uFF0C\u5373\u628A\u8BF7\u6C42\u4EA4\u7ED9\u7236\u7C7B\u5904\u7406\u3002\u5B83\u662F\u4E00\u79CD\u4EFB\u52A1\u59D4\u6D3E\u6A21\u5F0F

                                                                    2. \u9759\u6001\u7ED3\u6784\u662F\u968F\u7740\u7C7B\u7684\u52A0\u8F7D\u800C\u52A0\u8F7D\uFF0C\u968F\u7740\u7C7B\u7684\u7ED3\u6784\u88AB\u52A0\u8F7D\u5230\u5185\u5B58\u4E2D\u7684\u65B9\u6CD5\u533A\u4E2D\uFF0C\u7C7B\u7684\u52A0\u8F7D\u5C31\u662F\u7C7B\u4F5C\u4E3AClass\u7684\u5B9E\u4F8B\u88AB\u52A0\u8F7D\u5230\u5185\u5B58\u4E2D\u7684\u65B9\u6CD5\u533A\u4E2D\uFF0C\u4F5C\u4E3A\u7C7B\u7684\u4FE1\u606F\u3001\u7ED3\u6784\u7684\u8C03\u7528\u7684\u63A5\u53E3

                                                                      \u5C5E\u6027\u4E5F\u5C31\u662F\u6210\u5458\u53D8\u91CF\u5206\u4E3A\u9759\u6001\u548C\u975E\u9759\u6001\u7684\uFF0C\u975E\u9759\u6001\u7684\u53D8\u91CF\u662F\u968F\u7740\u5BF9\u8C61\u7684\u52A0\u8F7D\u800C\u52A0\u8F7D\u5230\u5185\u5B58\u7684\u5806\u7A7A\u95F4\u4E2D\uFF0C\u800C\u9759\u6001\u53D8\u91CF\u662F\u9759\u6001\u7ED3\u6784\uFF0C\u968F\u7740\u7C7B\u7684\u52A0\u8F7D\u8FC7\u7A0B\uFF0C\u88AB\u52A0\u8F7D\u5230\u65B9\u6CD5\u533A\u4E2D\uFF0C\u7C7B\u4F5C\u4E3AClass\u7684\u5BF9\u8C61\uFF0C\u662F\u7C7B\u7684\u4FE1\u606F\u548C\u5404\u79CD\u6570\u636E\u7684\u8BBF\u95EE\u5165\u53E3\u3002

                                                                      \u9759\u6001\u4EE3\u7801\u5757\u7684\u4EE3\u7801\u4E5F\u4F1A\u968F\u7740\u7C7B\u7684\u52A0\u8F7D\u800C\u6267\u884C

                                                                      \u9759\u6001\u4EE3\u7801\u5757\u662F\u5728\u7C7B\u52A0\u8F7D\u7684\u7B2C\u4E09\u4E2A\u9636\u6BB5\uFF0C\u521D\u59CB\u5316\u9636\u6BB5\u8C03\u7528\u7684\uFF01<clinit>\u8C03\u7528\u7684\u662F\u9759\u6001\u53D8\u91CF\u663E\u5F0F\u8D4B\u503C\u548C\u9759\u6001\u4EE3\u7801\u5757\u5185\u7684\u8BED\u53E5\u3002\u524D\u4E24\u4E2A\u9636\u6BB5\u662F\u52A0\u8F7D\u548C\u94FE\u63A5\uFF0C\u5176\u4E2D\u94FE\u63A5\u53C8\u5206\u4E3A\u4E09\u4E2A\u9636\u6BB5

                                                                      \u9759\u6001\u53D8\u91CF\u663E\u5F0F\u8D4B\u503C\u548C\u9759\u6001\u4EE3\u7801\u5757\u5185\u7684\u8BED\u53E5\u4F1A\u88AB\u653E\u5728<clinit>\u6784\u9020\u5668\u4E2D\u8FDB\u884C\u6267\u884C\u3002\u800C<init>\u6784\u9020\u5668\u662F\u6307\u7684\u6211\u4EEC\u5E73\u5E38\u8BF4\u7684\u6784\u9020\u5668\uFF0C\u5C31\u662F\u7C7B\u7684\u6784\u9020\u5668\u3002

                                                                      \u8981\u5206\u6E05\u695A<clinit>\u548C<init>\u8FD9\u4E24\u79CD\u6784\u9020\u5668

                                                                    3. \u7C7B\u7684\u52A0\u8F7D\u8FC7\u7A0B\u5206\u4E3A\u52A0\u8F7D\u3001\u94FE\u63A5\u3001\u521D\u59CB\u5316\uFF0C\u5176\u4E2D\u94FE\u63A5\u5206\u4E3A\u9A8C\u8BC1\u3001\u51C6\u5907\u3001\u89E3\u6790

                                                                      \u5176\u4E2D\u52A0\u8F7D\u8FC7\u7A0B\u5177\u4F53\u6709\u4E09\u70B9\uFF1A

                                                                      1. \u901A\u8FC7\u5168\u9650\u5B9A\u540D\u83B7\u53D6\u6B64\u7C7B\u7684\u4E8C\u8FDB\u5236\u5B57\u8282\u6D41
                                                                      2. \u5C06\u4E8C\u8FDB\u5236\u5B57\u8282\u6D41\u4EE3\u8868\u7684\u9759\u6001\u5B58\u50A8\u7ED3\u6784\u8F6C\u6362\u4E3A\u65B9\u6CD5\u533A\u4E2D\u7684\u8FD0\u884C\u65F6\u7ED3\u6784
                                                                      3. \u5C06\u6B64\u7C7B\u4F5C\u4E3AClass\u7684\u5BF9\u8C61\uFF0C\u52A0\u8F7D\u5230\u5185\u5B58\u4E2D\u7684\u65B9\u6CD5\u533A\u4E2D\uFF0C\u4F5C\u4E3A\u8BE5Class\u5BF9\u8C61\u5404\u79CD\u4FE1\u606F\u548C\u65B9\u6CD5\u8C03\u7528\u7684\u8BBF\u95EE\u5165\u53E3
                                                                    4. \u53CC\u4EB2\u59D4\u6D3E\u673A\u5236\u5DE5\u4F5C\u539F\u7406

                                                                      \u5982\u679C\u4E00\u4E2A\u7C7B\u52A0\u8F7D\u5668\u6536\u5230\u4E86\u7C7B\u52A0\u8F7D\u8BF7\u6C42\uFF0C\u5B83\u5E76\u4E0D\u4F1A\u81EA\u5DF1\u5148\u53BB\u52A0\u8F7D\uFF0C\u800C\u662F\u628A\u8FD9\u4E2A\u8BF7\u6C42\u59D4\u6258\u7ED9\u7236\u7C7B\u7684\u52A0\u8F7D\u5668\u53BB\u6267\u884C

                                                                      \u5982\u679C\u7236\u7C7B\u52A0\u8F7D\u5668\u8FD8\u5B58\u5728\u5176\u7236\u7C7B\u52A0\u8F7D\u5668\uFF0C\u5219\u8FDB\u4E00\u6B65\u5411\u4E0A\u59D4\u6258\uFF0C\u4F9D\u6B21\u9012\u5F52\uFF0C\u8BF7\u6C42\u6700\u7EC8\u4F1A\u5230\u8FBE\u9876\u5C42\u7684\u542F\u52A8\u7C7B\u52A0\u8F7D\u5668\uFF08\u5F15\u5BFC\u7C7B\u52A0\u8F7D\u5668\uFF09\u3002

                                                                      \u8FD9\u4E2A\u8FC7\u7A0B\u548C\u7C7B\u7684\u52A0\u8F7D\u6709\u70B9\u50CF\uFF0C\u7C7B\u7684\u52A0\u8F7D\u8FC7\u7A0B\u4E2D\uFF0C\u5B50\u7C7B\u7684\u52A0\u8F7D\u4E4B\u524D\u4E00\u5B9A\u8981\u6709\u7236\u7C7B\u7684\u52A0\u8F7D\uFF0C\u6700\u7EC8\u4F1A\u5230Object\u7C7B\u9700\u8981\u52A0\u8F7D

                                                                      \u5982\u679C\u7236\u7C7B\u52A0\u8F7D\u5668\u53EF\u4EE5\u5B8C\u6210\u7C7B\u52A0\u8F7D\u4EFB\u52A1\uFF0C\u5C31\u6210\u529F\u8FD4\u56DE\uFF0C\u5982\u679C\u7236\u7C7B\u52A0\u8F7D\u5668\u4E0D\u53EF\u4EE5\u5B8C\u6210\u4EFB\u52A1\uFF0C\u5B50\u7C7B\u52A0\u8F7D\u5668\u624D\u4F1A\u81EA\u5DF1\u53BB\u5C1D\u8BD5\u52A0\u8F7D\uFF0C\u8FD9\u5C31\u662F\u53CC\u4EB2\u59D4\u6D3E\u6A21\u5F0F\u3002

                                                                      \u5F15\u5BFC\u7C7B\u52A0\u8F7D\u5668\u52A0\u8F7D\u5B8C\u4E4B\u540E\uFF0C\u5B50\u7C7B\u52A0\u8F7D\u5668\u5C31\u4E0D\u4F1A\u53BB\u52A0\u8F7D\u4E86\u3002

                                                                    5. \u6BD4\u5982\u4E00\u4E2A\u81EA\u5B9A\u4E49\u7C7B\u52A0\u8F7D\u8FC7\u7A0B\u4E2D\u7684\u53CC\u4EB2\u59D4\u6D3E\u673A\u5236\u3002

                                                                      \u7C7B\u52A0\u8F7D\u8FC7\u7A0B\u4E2D\u6D89\u53CA\u5230\u7C7B\u88C5\u8F7D\u5B50\u7CFB\u7EDF\uFF0C\u5C31\u662F\u7C7B\u52A0\u8F7D\u5668\uFF0C\u7C7B\u52A0\u8F7D\u5668\u6709\u5DE5\u4F5C\u673A\u5236\uFF0C\u5C31\u662F\u53CC\u4EB2\u59D4\u6D3E\u673A\u5236\uFF0C\u6BD4\u5982\u4E00\u4E2A\u81EA\u5B9A\u4E49\u7C7B\uFF0C\u90A3\u4E48\u5C31\u5BF9\u5E94\u4E8E\u7CFB\u7EDF\u7C7B\u52A0\u8F7D\u5668\u6536\u5230\u4E86\u7C7B\u52A0\u8F7D\u8BF7\u6C42\uFF0C\u7136\u540E\u5411\u4E0A\u59D4\u6258\uFF0C\u6700\u7EC8\u5230\u8FBE\u9876\u5C42\u7684\u5F15\u5BFC\u7C7B\u52A0\u8F7D\u5668\uFF0C\u5F15\u5BFC\u7C7B\u52A0\u8F7D\u5668\u662F\u52A0\u8F7DJava\u7684\u6838\u5FC3\u7C7B\u5E93\uFF0C\u5B83\u4E0D\u7BA1\u81EA\u5B9A\u4E49\u7C7B\u7684\u52A0\u8F7D\uFF0C\u5C31\u5411\u4E0B\u59D4\u6258\uFF08\u4E25\u683C\u6765\u8BF4\u4E0D\u53EB\u5411\u4E0B\u59D4\u6258\uFF0C\u5C31\u662F\u7236\u7C7B\u52A0\u8F7D\u5668\u52A0\u8F7D\u5931\u8D25\uFF0C\u4EA4\u7531\u5B50\u7C7B\u52A0\u8F7D\u5668\u81EA\u5DF1\u5904\u7406\uFF09\uFF0C\u6269\u5C55\u7C7B\u52A0\u8F7D\u5668\u4E5F\u4E0D\u7BA1\uFF0C\u6700\u540E\u662F\u624D\u662F\u7CFB\u7EDF\u7C7B\u52A0\u8F7D\u5668\u8D1F\u8D23\u52A0\u8F7D\u6211\u4EEC\u7684\u81EA\u5B9A\u4E49\u7C7B

                                                                    6. \u7C7B\u52A0\u8F7D\u8FC7\u7A0B\u4E2D\uFF0C\u53EA\u6709\u4E00\u4E2A\u7C7B\u52A0\u8F7D\u5668\u52A0\u8F7D\u5C31\u884C\u4E86\u3002\u7236\u7C7B\u52A0\u8F7D\u5668\u4E0D\u52A0\u8F7D\u7684\u8BDD\uFF0C\u90A3\u4E48\u5C31\u7ED9\u5B50\u7C7B\u52A0\u8F7D\u5668\u81EA\u5DF1\u52A0\u8F7D\uFF01

                                                                    7. \u53BB\u6267\u884C\u7C7B\u91CC\u9762\u7684\u4EE3\u7801\uFF0C\u6216\u8005\u8BF4\u8FD0\u884C\u8FC7\u7A0B\uFF0C\u4F1A\u8FDB\u884C\u7C7B\u7684\u52A0\u8F7D\uFF0C\u6709\u4E9B\u4EE3\u7801\u8FD0\u884C\u4E0D\u4E86\uFF0C\u6216\u8005\u8FD0\u884C\u5931\u8D25\uFF0C\u53EF\u4EE5\u8BD5\u8BD5\u4ECE\u7C7B\u7684\u52A0\u8F7D\u8FD9\u4E2A\u8FC7\u7A0B\u53BB\u8003\u8651\u3002

                                                                      \u6BD4\u5982\u81EA\u5B9A\u4E49String\u7C7B\u91CC\u5199main\u65B9\u6CD5\uFF0C\u4E3A\u4EC0\u4E48\u8FD0\u884C\u5931\u8D25\uFF0C\u56E0\u4E3A\u7C7B\u52A0\u8F7D\u65F6\uFF0C\u7531\u4E8E\u53CC\u4EB2\u59D4\u6D3E\u673A\u5236\uFF0C\u6700\u7EC8\u7531\u5F15\u5BFC\u7C7B\u52A0\u8F7D\u5668\u52A0\u8F7DString\u7C7B\uFF0C\u90A3\u4E48\u52A0\u8F7D\u7684\u662F\u6838\u5FC3\u7C7B\u5E93\u7684String\u7C7B\uFF0C\u800C\u4E0D\u662F\u6211\u4EEC\u81EA\u5B9A\u4E49\u7684String\u7C7B

                                                                    8. \u5BF9\u8C61.getClass() == \u7C7B.class \u4E3Atrue\uFF0C\u7B49\u53F7\u4E24\u8FB9\u90FD\u662FClass\u7684\u5BF9\u8C61\u5B9E\u4F8B

                                                                      Class\u7684\u5BF9\u8C61\u5B9E\u4F8B\u4EC0\u4E48\u610F\u601D\uFF1F

                                                                      \u5C31\u662F\u8FD9\u4E2A\u7C7B\u672C\u8EAB\u5C31\u662F\u5BF9\u8C61\uFF0C\u662FClass\u7684\u5BF9\u8C61

                                                                    9. \u53CC\u4EB2\u59D4\u6D3E\u673A\u5236\u7684\u4F18\u52BF

                                                                      • \u907F\u514D\u7C7B\u7684\u91CD\u590D\u52A0\u8F7D\uFF0C\u4E00\u65E6\u6709\u4E00\u4E2A\u7C7B\u7684\u52A0\u8F7D\u5668\u53BB\u52A0\u8F7D\u4E86\uFF0C\u53E6\u5916\u7684\u52A0\u8F7D\u5668\u5C31\u4E0D\u4F1A\u53BB\u52A0\u8F7D\u4E86\u3002
                                                                      • \u4FDD\u62A4\u7A0B\u5E8F\u5B89\u5168\uFF0C\u9632\u6B62\u7A0B\u5E8F\u88AB\u6076\u610F\u7BE1\u6539
                                                                    10. \u81EA\u5B9A\u4E49String\u7C7B\uFF0C\u4F46\u662F\u5728\u52A0\u8F7D\u81EA\u5B9A\u4E49String\u7C7B\u7684\u65F6\u5019\u4F1A\u7387\u5148\u4F7F\u7528\u5F15\u5BFC\u7C7B\u52A0\u8F7D\u5668\u52A0\u8F7D\uFF0C\u800C\u5F15\u5BFC\u7C7B\u52A0\u8F7D\u5668\u5728\u52A0\u8F7D\u7684\u8FC7\u7A0B\u4E2D\u4F1A\u5148\u52A0\u8F7Djdk\u81EA\u5E26\u7684java.lang\u5305\u4E0B\u7684String\u7C7B\uFF0C\u62A5\u9519\u4FE1\u606F\u8BF4\u6CA1\u6709main\u65B9\u6CD5\uFF0C\u5C31\u662F\u56E0\u4E3Ajdk\u81EA\u5E26\u7684String\u7C7B\u8FD9\u4E2A\u6838\u5FC3\u7C7B\u6CA1\u6709main\u65B9\u6CD5\uFF0C\u8FD9\u6837\u53EF\u4EE5\u4FDD\u8BC1\u5BF9Java\u6838\u5FC3\u6E90\u4EE3\u7801\u7684\u4FDD\u62A4\uFF0C\u8FD9\u5C31\u662F\u6C99\u7BB1\u5B89\u5168\u673A\u5236

                                                                    11. \u5728JVM\u4E2D\u8868\u793A\u4E24\u4E2Aclass\u5BF9\u8C61\u662F\u5426\u76F8\u540C\u7684\u4E24\u4E2A\u5FC5\u8981\u6761\u4EF6\uFF1A

                                                                      • \u7C7B\u7684\u5B8C\u6574\u7C7B\u540D\u5FC5\u987B\u4E00\u81F4\uFF0C\u5305\u62EC\u5305\u540D

                                                                      • \u52A0\u8F7D\u8FD9\u4E2A\u7C7B\u7684ClassLoader\uFF08\u6307ClassLoader\u5B9E\u4F8B\u5BF9\u8C61\uFF09\u5FC5\u987B\u76F8\u540C

                                                                        \u8FD9\u91CC\u8BF4\u7684\u7C7B\u52A0\u8F7D\u5668\u662F\u6307\u5B9E\u4F8B\u5BF9\u8C61\uFF0C\u7C7B\u52A0\u8F7D\u5668\u672C\u8EAB\u53C8\u662F\u5BF9\u8C61\uFF0C\u5B83\u5BF9\u5E94\u7684\u7C7B\u662F\u5C5E\u4E8EJava\u7C7B\u5E93\u7684\uFF0C\u6BD4\u5982ClassLoader\u62BD\u8C61\u7C7B\uFF0C\u6240\u4EE5\u7C7B\u52A0\u8F7D\u5668\u5BF9\u5E94\u7684\u7C7B\u662F\u7531\u5F15\u5BFC\u7C7B\u52A0\u8F7D\u5668\u52A0\u8F7D\u7684

                                                                      \u6362\u53E5\u8BDD\u8BF4\uFF0C\u5728JVM\u4E2D\uFF0C\u5373\u4F7F\u7C7B\u540D\u76F8\u540C\uFF0C\u4F46\u662F\u52A0\u8F7D\u4ED6\u4EEC\u7684\u7C7B\u52A0\u8F7D\u5668ClassLoader\u4E0D\u540C\uFF0C\u90A3\u4E48\u8FD9\u4E24\u4E2A\u7C7B\u5BF9\u8C61\uFF08Class\u7684\u5BF9\u8C61\uFF09\u4E5F\u662F\u4E0D\u76F8\u7B49\u7684\u3002

                                                                    12. \u7CFB\u7EDF\u7C7B\u52A0\u8F7D\u5668\u52A0\u8F7D\u81EA\u5B9A\u4E49\u7C7B\uFF0C\u8FD9\u4E2A\u7C7B\u52A0\u8F7D\u5668\u7684\u4FE1\u606F\u4F1A\u5728\u65B9\u6CD5\u533A\u4E2D\u8FDB\u884C\u8BB0\u5F55\uFF0C\u5C31\u662F\u8FD9\u4E2A\u7C7B\u52A0\u8F7D\u5668\u7684\u4E00\u4E2A\u5F15\u7528\u4F1A\u4F5C\u4E3A\u7C7B\u578B\u4FE1\u606F\u7684\u4E00\u90E8\u5206\u4FDD\u5B58\u5728\u65B9\u6CD5\u533A\u4E2D

                                                                    \u8FD0\u884C\u65F6\u6570\u636E\u533A\u6982\u8FF0\u53CA\u7EBF\u7A0B

                                                                    \u6982\u8FF0

                                                                    1. image-20210808193347849

                                                                      \u7C7B\u52A0\u8F7D\u8FC7\u7A0B\u5206\u4E3A\u52A0\u8F7D\u3001\u94FE\u63A5\u3001\u521D\u59CB\u5316\u4E09\u4E2A\u8FC7\u7A0B

                                                                      \u52A0\u8F7D\u5B8C\u4EE5\u540E\uFF0C\u5185\u5B58\u4E2D\u7684\u65B9\u6CD5\u533A\u4E2D\u5C31\u4FDD\u5B58\u4E86\u8FD0\u884C\u65F6\u7C7B\u672C\u8EAB\uFF0C\u52A0\u8F7D\u5230\u5185\u5B58\u4E2D\u7684\u7C7B\u53EB\u505A\u8FD0\u884C\u65F6\u7C7B\uFF01

                                                                      \u63A5\u4E0B\u6765\u5C31\u8981\u7528\u6267\u884C\u5F15\u64CE\u53BB\u505A\u6267\u884C\uFF0C\u6267\u884C\u5F15\u64CE\u5206\u4E3A\u89E3\u91CA\u5668\uFF08\u4FDD\u8BC1\u54CD\u5E94\uFF09\u3001JIT\u5373\u65F6\u7F16\u8BD1\u5668\uFF08\u4FDD\u8BC1\u6267\u884C\u6548\u7387\uFF0C \u70ED\u70B9\u4EE3\u7801\u4E8C\u6B21\u7F16\u8BD1\u53CA\u7F13\u5B58\uFF09\u3001\u5783\u573E\u56DE\u6536\u5668\u4E09\u90E8\u5206\u3002\u6267\u884C\u5F15\u64CE\u6267\u884C\u7684\u8FC7\u7A0B\u4E2D\uFF0C\u90FD\u8981\u7528\u5230\u8FD0\u884C\u65F6\u6570\u636E\u533A

                                                                    2. \u6267\u884C\u5F15\u64CE\u7684JIT\u5373\u65F6\u7F16\u8BD1\u5668\u53EF\u4EE5\u628A\u5B57\u8282\u7801\u6307\u4EE4\u7FFB\u8BD1\u6210\u673A\u5668\u6307\u4EE4

                                                                    3. \u5185\u5B58\u662F\u975E\u5E38\u91CD\u8981\u7684\u7CFB\u7EDF\u8D44\u6E90\uFF0C\u53EF\u4EE5\u7406\u89E3\u4E3A\u8FD0\u884C\u5185\u5B58\uFF0C\u65F6\u786C\u76D8\u548CCPU\u7684\u4E2D\u95F4\u4ED3\u5E93\u548C\u6865\u6881\uFF0C\u627F\u8F7D\u7740\u7CFB\u7EDF\u548C\u5E94\u7528\u7A0B\u5E8F\u7684\u5B9E\u65F6\u8FD0\u884C

                                                                      \u5185\u5B58\u4E00\u5B9A\u8981\u548C\u5B9E\u65F6\u8FD0\u884C\u6302\u94A9

                                                                      JVM\u5185\u5B58\u5E03\u5C40\u89C4\u5B9A\u4E86Java\u5728\u8FD0\u884C\u8FC7\u7A0B\u4E2D\u7684\u5185\u5B58\u7533\u8BF7\u3001\u5206\u914D\u3001\u7BA1\u7406\u7684\u7B56\u7565

                                                                      \u8FD0\u884C\u65F6\u6570\u636E\u533A\u5C31\u662FJVM\u5185\u5B58\u5E03\u5C40\uFF0C\u5C31\u7406\u89E3\u4E3A\u5185\u5B58

                                                                      CPU\u8BFB\u7684\u6570\u636E\u90FD\u6765\u81EA\u4E8E\u5185\u5B58\uFF0C\u6216\u8005\u8BF4CPU\u76F4\u63A5\u4EA4\u4E92\u7684\u5BF9\u8C61\u5C31\u662F\u5185\u5B58\uFF01

                                                                    4. image-20210808201004706

                                                                      \u7EA2\u8272\u7684\u662F\u6240\u6709\u7EBF\u7A0B\u5171\u4EAB\u7684\uFF0C\u5373\u65B9\u6CD5\u533A\uFF08jdk8\u53CA\u4EE5\u540E\u4E5F\u53EF\u4EE5\u53EB\u5143\u7A7A\u95F4\uFF09\u548C\u5806\u7A7A\u95F4

                                                                      \u7070\u8272\u7684\u662F\u6BCF\u4E2A\u7EBF\u7A0B\u79C1\u6709\u7684\uFF0C\u5373\u672C\u5730\u65B9\u6CD5\u6808\u3001\u865A\u62DF\u673A\u6808\u548C\u7A0B\u5E8F\u8BA1\u6570\u5668

                                                                      \u8FD0\u884C\u65F6\u6570\u636E\u533A\u4E2D\uFF0C\u5176\u4E2D\u6709\u4E00\u4E9B\u4F1A\u968F\u7740\u865A\u62DF\u673A\u7684\u542F\u52A8\u800C\u521B\u5EFA\uFF0C\u968F\u7740\u865A\u62DF\u673A\u7684\u9000\u51FA\u800C\u9500\u6BC1\uFF0C\u4E0E\u865A\u62DF\u673A\u7684\u751F\u547D\u5468\u671F\u662F\u4E00\u6837\u7684\uFF0C\u53E6\u5916\u4E00\u4E9B\u5219\u662F\u4E0E\u7EBF\u7A0B\u4E00\u4E00\u5BF9\u5E94\u7684\uFF0C\u4E0E\u7EBF\u7A0B\u7684\u751F\u547D\u5468\u671F\u662F\u4E00\u81F4\u7684\u3002

                                                                      \u5982\u679C\u67095\u4E2A\u7EBF\u7A0B\uFF0C\u5C31\u662F\u67095\u7EC4\u7A0B\u5E8F\u8BA1\u6570\u5668\u3001\u672C\u5730\u65B9\u6CD5\u6808\u3001\u865A\u62DF\u673A\u6808\uFF0C\u4F46\u662F\u53EA\u6709\u4E00\u4E2A\u65B9\u6CD5\u533A\u548C\u5806

                                                                      \u5806\u7A7A\u95F4\u548C\u65B9\u6CD5\u533A\u662F\u5171\u7528\u7684

                                                                      \u7C7B\u53EA\u4F1A\u52A0\u8F7D\u4E00\u6B21\uFF0C\u7C7B\u52A0\u8F7D\u8FC7\u7A0B\u4E2D\u7684\u521D\u59CB\u5316<clinit>\u9700\u8981\u4FDD\u8BC1\u540C\u6B65

                                                                      \u65B9\u6CD5\u533A\u4E3B\u8981\u653E\u7C7B\u7684\u4FE1\u606F

                                                                    5. \u4ECE\u9891\u7387\u4E0A\u8BB2\uFF0C95%\u7684\u5783\u573E\u90FD\u96C6\u4E2D\u5728\u5806\u533A\uFF0C5%\u96C6\u4E2D\u5728\u65B9\u6CD5\u533A

                                                                    6. JIT\u7F16\u8BD1\u4EE5\u540E\u7684\u4EE3\u7801\u7F13\u5B58\u6709\u7684\u8BA4\u4E3A\u662F\u65B9\u6CD5\u533A\u7684\u4E00\u90E8\u5206\uFF0C\u6709\u7684\u8BA4\u4E3A\u4E0D\u662F\uFF0C\u4E0D\u7528\u7EC6\u62A0\uFF0C\u4F46\u662F\u8981\u660E\u786EJIT\u7F16\u8BD1\u7684\u4EE3\u7801\u7F13\u5B58\u4E0D\u5728\u5806\u7A7A\u95F4

                                                                    7. \u4E00\u4E2AJVM\u5B9E\u4F8B\u5C31\u5BF9\u5E94\u4E00\u4E2ARuntime\u5B9E\u4F8B\uFF0CRuntime\u5B9E\u4F8B\u5BF9\u8C61\u5C31\u5BF9\u5E94\u4E8E\u8FD0\u884C\u65F6\u6570\u636E\u533A\uFF0C\u5E76\u4E14\u53EA\u6709\u4E00\u4E2ARuntime\u5B9E\u4F8B\uFF0C\u662F\u5355\u4F8B\u7684

                                                                    8. \u5728Hotspot jvm\u91CC\uFF0C\u6BCF\u4E2A\u7EBF\u7A0B\u90FD\u4E0E\u64CD\u4F5C\u7CFB\u7EDF\u7684\u672C\u5730\u7EBF\u7A0B\u76F4\u63A5\u6620\u5C04\uFF0C\u5F53\u4E00\u4E2AJava\u7EBF\u7A0B\u51C6\u5907\u597D\u6267\u884C\u4EE5\u540E\uFF0C\u6B64\u65F6\u4E00\u4E2A\u64CD\u4F5C\u7CFB\u7EDF\u7684\u672C\u5730\u7EBF\u7A0B\u4E5F\u540C\u65F6\u521B\u5EFA\uFF0CJava\u7EBF\u7A0B\u6267\u884C\u7EC8\u6B62\u540E\uFF0C\u672C\u5730\u7EBF\u7A0B\u4E5F\u4F1A\u56DE\u6536

                                                                      \u5982\u679C\u6267\u884C\u7EBF\u7A0B\u7684\u8FC7\u7A0B\u4E2D\uFF0C\u51FA\u73B0\u4E86\u5F02\u5E38\u6CA1\u6709\u5904\u7406\uFF0C\u4F1A\u5BFC\u81F4Java\u7EBF\u7A0B\u7EC8\u6B62\uFF0C\u6B64\u65F6\u672C\u5730\u7EBF\u7A0B\u51B3\u5B9AJVM\u8981\u4E0D\u8981\u7EC8\u6B62\uFF0C\u53D6\u51B3\u4E8E\u5F53\u524D\u7EBF\u7A0B\u662F\u4E0D\u662F\u6700\u540E\u4E00\u4E2A\u975E\u5B88\u62A4\u7EBF\u7A0B

                                                                    9. \u4E00\u4E2A\u7B80\u5355\u7684\u7A0B\u5E8F\uFF0C\u540E\u53F0\u90FD\u6709\u8BB8\u591A\u7684\u7EBF\u7A0B\uFF0C\u8FD9\u4E9B\u7EBF\u7A0B\u4E0D\u5305\u62ECmain\u7EBF\u7A0B\u548Cmain\u7EBF\u7A0B\u91CC\u521B\u5EFA\u7684\u7EBF\u7A0B

                                                                      \u8FD9\u4E9B\u540E\u53F0\u7EBF\u7A0B\u4E3B\u8981\u6709\uFF1A

                                                                      \u865A\u62DF\u673A\u7EBF\u7A0B

                                                                      \u5468\u671F\u4EFB\u52A1\u7EBF\u7A0B

                                                                      GC\u7EBF\u7A0B\uFF0C\u5BF9\u5783\u573E\u6536\u96C6\u884C\u4E3A\u63D0\u4F9B\u4E86\u652F\u6301

                                                                      \u7F16\u8BD1\u7EBF\u7A0B

                                                                      \u4FE1\u53F7\u8C03\u5EA6\u7EBF\u7A0B

                                                                    \u7A0B\u5E8F\u8BA1\u6570\u5668

                                                                    1. \u4E5F\u79F0\u4E3APC\u5BC4\u5B58\u5668\uFF0C\u5C31\u662FCPU\u7684\u5BC4\u5B58\u5668\u7684\u7269\u7406\u7ED3\u6784\u7684\u4E00\u4E2A\u62BD\u8C61\u6A21\u62DF\uFF0C\u56E0\u4E3AJava\u865A\u62DF\u673A\u662F\u8F6F\u4EF6\u5C42\u9762\u7684\u6982\u5FF5\uFF0C\u8FD0\u884C\u65F6\u6570\u636E\u533A\u53EF\u4EE5\u7406\u89E3\u4E3A\u5185\u5B58

                                                                      \u4E5F\u53EB\u7A0B\u5E8F\u7684\u94A9\u5B50\uFF0C\u8FD9\u4E2A\u94A9\u5B50\u53EF\u4EE5\u7406\u89E3\u4E3A\u94A9\u7A0B\u5E8F\u7684\uFF0C\u5C31\u662F\u4E0A\u4E00\u884C\u6267\u884C\u5B8C\u53EA\u4F1A\uFF0C\u4E0B\u4E00\u884C\u8BE5\u6267\u884C\u8C01\u4E86\uFF0C\u7531PC\u5BC4\u5B58\u5668\u6765\u505A\u4E00\u4E2A\u8BB0\u5F55

                                                                    2. PC\u5BC4\u5B58\u5668\u7528\u6765\u5B58\u50A8\u6307\u5411\u4E0B\u4E00\u6761\u6307\u4EE4\u7684\u5730\u5740\uFF0C\u7531\u6267\u884C\u5F15\u64CE\u6839\u636EPC\u5BC4\u5B58\u5668\u7684\u4E0B\u4E00\u6761\u6307\u4EE4\u5730\u5740\u8BFB\u53D6\u4E0B\u4E00\u6761\u6307\u4EE4

                                                                      PC\u5BC4\u5B58\u5668\u662F\u4E00\u5757\u5F88\u5C0F\u7684\u5185\u5B58\u7A7A\u95F4

                                                                      \u6BCF\u4E2A\u7EBF\u7A0B\u90FD\u6709\u81EA\u5DF1\u7684\u7A0B\u5E8F\u8BA1\u6570\u5668\uFF0C\u662F\u7EBF\u7A0B\u79C1\u6709\u7684\uFF0C\u751F\u547D\u5468\u671F\u4E0E\u7EBF\u7A0B\u7684\u751F\u547D\u5468\u671F\u4E00\u81F4\u3002\u8BB0\u5F55\u6267\u884C\u5230\u54EA\u91CC\u4E86

                                                                      \u4EFB\u4F55\u4E00\u4E2A\u7EBF\u7A0B\u90FD\u53EA\u6709\u4E00\u4E2A\u65B9\u6CD5\u5728\u6267\u884C\uFF0C\u4E5F\u5C31\u662F\u6240\u8C13\u7684\u5F53\u524D\u65B9\u6CD5\uFF0C\u6808\u6700\u4E0A\u9762\u7684\u65B9\u6CD5\u3002PC\u5BC4\u5B58\u5668\u5B58\u50A8\u6307\u5411\u5F53\u524D\u65B9\u6CD5\u7684\u6307\u4EE4\u7684\u5730\u5740\uFF01\uFF08\u8FD9\u91CC\u7684\u5F53\u524D\u65B9\u6CD5\u662F\u8BF4\u6808\u9876\u7684\u65B9\u6CD5\uFF0C\u5C31\u662F\u4E0B\u4E00\u6761\u6307\u4EE4\uFF09

                                                                    3. \u6808\u662F\u53EA\u6709\u5165\u6808\u548C\u51FA\u6808\uFF0C\u4E0D\u8003\u8651\u5783\u573E\u56DE\u6536\uFF0CPC\u5BC4\u5B58\u5668\u4E5F\u6CA1\u6709\u5783\u573E\u56DE\u6536\u673A\u5236\uFF0C\u5806\u7A7A\u95F4\u548C\u65B9\u6CD5\u533A\u6709\u5783\u573E\u56DE\u6536\u673A\u5236

                                                                      PC\u5BC4\u5B58\u5668\u4E0D\u4F1A\u53D1\u751FOOM\uFF08OutOfMemory\uFF09\u6EA2\u51FA

                                                                      \u6808\u7ED3\u6784\u6CA1\u6709\u5783\u573E\u56DE\u6536\uFF0C\u4F46\u662F\u6709\u53EF\u80FD\u4F1A\u6EA2\u51FA\uFF0C\u5806\u548C\u65B9\u6CD5\u533A\u4E5F\u53EF\u80FD\u4F1A\u6EA2\u51FA

                                                                      \u603B\u7ED3\uFF1A

                                                                      \u5806\u3001\u65B9\u6CD5\u533A\uFF1A\u7EBF\u7A0B\u5171\u6709\uFF0C\u6709\u5783\u573E\u56DE\u6536\uFF0C\u53EF\u80FD\u6EA2\u51FA

                                                                      \u865A\u62DF\u673A\u6808\uFF1A\u7EBF\u7A0B\u79C1\u6709\uFF0C\u6CA1\u6709\u5783\u573E\u56DE\u6536\uFF0C\u53EF\u80FD\u6EA2\u51FA

                                                                      PC: \u7EBF\u7A0B\u79C1\u6709\uFF0C\u6CA1\u6709\u5783\u573E\u56DE\u6536\uFF0C\u4E0D\u4F1A\u6EA2\u51FA

                                                                    4. image-20210808204810558

                                                                      \u6307\u4EE4\u5730\u5740\u53F3\u8FB9\u7684\u7ED3\u6784\u53EB\u64CD\u4F5C\u6307\u4EE4

                                                                      image-20210808205132418

                                                                      \u6267\u884C\u5F15\u64CE\u53D6\u51FA\u6307\u4EE4\u540E\uFF0C\u4F1A\u64CD\u4F5C\u5C40\u90E8\u53D8\u91CF\u8868\u3001\u64CD\u4F5C\u6570\u6808\uFF0C\u4F1A\u628A\u5B57\u8282\u7801\u6307\u4EE4\u7FFB\u8BD1\u6210\u673A\u5668\u6307\u4EE4\uFF0C\u673A\u5668\u6307\u4EE4\u5C31\u53EF\u4EE5\u88ABCPU\u8FD0\u7B97\uFF0C\u8FD9\u662F\u4E8C\u6B21\u7F16\u8BD1\uFF0C\u89E3\u91CA\u5668\u5C31\u662F\u5BF9\u5B57\u8282\u7801\u9010\u884C\u89E3\u91CA\u6267\u884C\uFF0C\u6240\u4EE5Java\u662F\u534A\u7F16\u8BD1\u534A\u89E3\u91CA\u8BED\u8A00

                                                                    5. PC\u5BC4\u5B58\u5668\u7684\u4E00\u4E2A\u9762\u8BD5\u95EE\u9898\uFF1A

                                                                      1. \u4F7F\u7528PC\u5BC4\u5B58\u5668\u5B58\u50A8\u5B57\u8282\u7801\u6307\u4EE4\u5730\u5740\u6709\u4EC0\u4E48\u7528\uFF1F

                                                                      2. \u4E3A\u4EC0\u4E48\u4F7F\u7528PC\u5BC4\u5B58\u5668\u8BB0\u5F55\u5F53\u524D\u7EBF\u7A0B\u7684\u6267\u884C\u5730\u5740\u5462\uFF1F

                                                                        \u56E0\u4E3ACPU\u9700\u8981\u4E0D\u505C\u5730\u5207\u6362\u5404\u4E2A\u7EBF\u7A0B\uFF0C\u8FD9\u4E2A\u65F6\u5019\u5207\u6362\u56DE\u6765\u4EE5\u540E\uFF0C\u5C31\u9700\u8981\u77E5\u9053\u4ECE\u54EA\u91CC\u7EE7\u7EED\u6267\u884C\uFF0C\u56E0\u4E3APC\u5BC4\u5B58\u5668\u5B58\u7684\u5C31\u662F\u5B57\u8282\u7801\u6307\u4EE4\u7684\u5730\u5740\uFF01

                                                                        JVM\u5B57\u8282\u7801\u89E3\u91CA\u5668\u5C31\u9700\u8981\u901A\u8FC7\u6539\u53D8PC\u5BC4\u5B58\u5668\u7684\u503C\uFF0C\u6765\u660E\u786E\u4E0B\u4E00\u6761\u5E94\u8BE5\u6267\u884C\u4EC0\u4E48\u6837\u7684\u5B57\u8282\u7801\u6307\u4EE4

                                                                        \u5B57\u8282\u7801\u89E3\u91CA\u5668\u662F\u9010\u884C\u6267\u884C\u5B57\u8282\u7801\u6307\u4EE4\u7684\uFF0C\u6267\u884C\u5F15\u64CE\u901A\u8FC7PC\u5BC4\u5B58\u5668\u62FF\u5230\u5B57\u8282\u7801\u6307\u4EE4\u5730\u5740\uFF0C\u8FDB\u800C\u62FF\u5230\u5B57\u8282\u7801\u6307\u4EE4\uFF0C\u7136\u540E\u6267\u884C\uFF0C\u6574\u4E2A\u8FC7\u7A0B\u5C31\u662F\u5BF9\u5B57\u8282\u7801\u6307\u4EE4\u7684\u9010\u884C\u89E3\u91CA\u6267\u884C\uFF0C\u8FD9\u91CC\u7684\u9010\u884C\u6267\u884C\u6307\u7684\u4E0D\u662FJava\u4EE3\u7801\uFF01

                                                                        \u6267\u884C\u5F15\u64CE\u91CC\u6709\u5B57\u8282\u7801\u89E3\u91CA\u5668\u3001\u7F16\u8BD1\u5668\u3001\u5783\u573E\u56DE\u6536\u5668

                                                                    6. \u5BF9\u5B57\u8282\u7801\u6587\u4EF6\u8FDB\u884C\u53CD\u7F16\u8BD1\u64CD\u4F5C\u5C31\u80FD\u770B\u5230\u5B57\u8282\u7801\u6307\u4EE4\u5730\u5740\u548C\u5B57\u8282\u7801\u6307\u4EE4

                                                                    7. PC\u5BC4\u5B58\u5668\u4E3A\u4EC0\u4E48\u662F\u7EBF\u7A0B\u79C1\u6709\u7684\uFF1F

                                                                      \u5047\u5982\u4E09\u4E2A\u7EBF\u7A0B\u5E76\u884C\u6267\u884C\uFF0C\u5B9E\u9645\u4E0A\u662F\u5E76\u53D1\u6267\u884C\uFF0C\u56E0\u4E3A\u4ED6\u4EEC\u62A2\u5360\u540C\u4E00\u4E2ACPU\u8D44\u6E90

                                                                      \u8981\u6CE8\u610FPC\u5BC4\u5B58\u5668\u91CC\u9762\u8BB0\u5F55\u7684\u662F\u4E0B\u4E00\u6761\u8981\u6267\u884C\u7684\u5B57\u8282\u7801\u6307\u4EE4\u7684\u6307\u4EE4\u5730\u5740\uFF0C\u6BD4\u5982\u7EBF\u7A0B1\u8BE5\u6267\u884C\u7B2C5\u884C\u5B57\u8282\u7801\u6307\u4EE4\uFF0C\u73B0\u5728\u5207\u6362\u5230\u53E6\u4E00\u4E2A\u7EBF\u7A0B\u4E86\uFF0C\u5F53\u7136\u4E0D\u53EF\u4EE5\u63A5\u77405\u6267\u884C\uFF0CPC\u5BC4\u5B58\u5668\u5FC5\u987B\u6BCF\u4E2A\u7EBF\u7A0B\u4E00\u4EFD\uFF0C\u5206\u522B\u8BB0\u5F55\u81EA\u5DF1\u7684\u8BE5\u6267\u884C\u7684\u4E0B\u4E00\u6761\u5B57\u8282\u7801\u6307\u4EE4\u7684\u5730\u5740\uFF01

                                                                    8. \u5982\u679C\u5BF9\u5E94\u4E8E\u4E00\u4E2ACPU\u6838\uFF0C\u6709\u4E09\u4E2A\u7EBF\u7A0B\uFF0C\u90A3\u4E48\u4EFB\u4F55\u4E00\u4E2A\u786E\u5B9A\u7684\u65F6\u523B\uFF0C\u53EA\u6709\u4E00\u4E2A\u7EBF\u7A0B\u6267\u884C\u3002\u770B\u4F3C\u5E76\u884C\u6267\u884C\uFF0C\u5B9E\u9645\u662F\u5E76\u53D1\u6267\u884C

                                                                      CPU\u5FEB\u901F\u5207\u6362\u6267\u884C\u591A\u4E2A\u7EBF\u7A0B\uFF0C\u5C31\u662F\u5E76\u53D1

                                                                    \u865A\u62DF\u673A\u6808

                                                                    \u6982\u8FF0

                                                                    1. Java\u662F\u8DE8\u5E73\u53F0\u7684\u8BED\u8A00\uFF0C\u6709\u4E09\u4E2A\u7279\u6027

                                                                      \u5065\u58EE\u6027

                                                                      \u9762\u5411\u5BF9\u8C61\u6027

                                                                      \u8DE8\u5E73\u53F0\u6027

                                                                      \u5176\u4E2D\u8DE8\u5E73\u53F0\u6027\u5C31\u662F\u56E0\u4E3AJVM\uFF0C\u5C55\u5F00\u6765\u8BF4\u5C31\u662FJava\u6E90\u6587\u4EF6\u5148\u7ECF\u8FC7\u7F16\u8BD1\uFF0C\u7F16\u8BD1\u6210\u5B57\u8282\u7801\u6587\u4EF6\uFF0C\u5B57\u8282\u7801\u6587\u4EF6\u4F1A\u88AB\u52A0\u8F7D\u5230JVM\u5185\u5B58\u91CC\uFF0C\u53D8\u6210\u8FD0\u884C\u65F6\u6570\u636E\u3002\u800CJVM\u5728\u4E0D\u540C\u7CFB\u7EDF\u5E73\u53F0\u4E0A\u6709\u4E0D\u540C\u7684\u5B9E\u73B0\uFF0C\u540C\u4E00\u4EFD\u4EE3\u7801\uFF0C\u540C\u4E00\u4EFD\u5B57\u8282\u7801\u6587\u4EF6\u53EF\u4EE5\u5728\u4E0D\u540C\u7CFB\u7EDF\u5E73\u53F0\u7684JVM\u4E0A\u52A0\u8F7D\u3001\u8FD0\u884C\u3002

                                                                      \u4E00\u6B21\u7F16\u8BD1\u3001\u591A\u6B21\u8FD0\u884C

                                                                    2. JVM\u7684\u6307\u4EE4\u662F\u6839\u636E\u6808\u6765\u8BBE\u8BA1\u7684\uFF0C\u4E0D\u540C\u5E73\u53F0CPU\u7684\u67B6\u6784\u4E0D\u540C\uFF0C\u6240\u4EE5\u4E0D\u80FD\u8BBE\u8BA1\u4E3A\u57FA\u4E8E\u5BC4\u5B58\u5668\u7684\uFF0C\u4E0D\u80FD\u8BBE\u8BA1\u4E3A\u57FA\u4E8E\u786C\u4EF6\u7684\uFF0C\u800CJVM\u662F\u8F6F\u4EF6\u5C42\u9762\uFF0C\u6240\u4EE5\u8BBE\u8BA1\u4E3A\u57FA\u4E8E\u6808\u7684\u6307\u4EE4\u96C6

                                                                      \u6307\u4EE4\u96C6\u5C0F\uFF0C\u4F46\u662F\u5B9E\u73B0\u540C\u6837\u7684\u529F\u80FD\uFF0C\u9700\u8981\u66F4\u591A\u7684\u6307\u4EE4

                                                                      \u76F8\u5BF9\u5BC4\u5B58\u5668\u6765\u8BB2\u6027\u80FD\u66F4\u5DEE\uFF0C\u56E0\u4E3A\u5BC4\u5B58\u5668\u662F\u786C\u4EF6CPU\u5C42\u9762\u7684

                                                                    3. JVM\u4E2D\u7684\u5185\u5B58\u4E2D\uFF0C\u6808\u548C\u5806\u662F\u975E\u5E38\u91CD\u8981\u7684\u4E24\u4E2A\u7ED3\u6784\uFF01

                                                                    4. \u6808\u662F\u8FD0\u884C\u65F6\u7684\u5355\u4F4D\uFF0C\u800C\u5806\u662F\u5B58\u50A8\u7684\u5355\u4F4D

                                                                      \u6808\u89E3\u51B3\u7A0B\u5E8F\u7684\u8FD0\u884C\u95EE\u9898\uFF0C\u5C40\u90E8\u6570\u636E\u53D8\u91CF\u662F\u653E\u5728\u6808\u4E2D\u7684\uFF0C\u5982\u679C\u662F\u5F15\u7528\u7C7B\u578B\u53D8\u91CF\uFF0C\u653E\u7684\u662F\u5BF9\u8C61\u5E94\u7528\uFF0C\u6307\u5411\u5806\u7A7A\u95F4\u4E2D\u7684\u5730\u5740

                                                                    5. \u6808\u7684\u5B58\u50A8\u5355\u4F4D\u662F\u6808\u5E27\uFF0C\u6808\u5E27\u91CC\u53C8\u4F1A\u7EC6\u5206\u5C40\u90E8\u53D8\u91CF\u8868\u3001\u64CD\u4F5C\u6570\u6808\u7B49

                                                                    6. \u5806\u7A7A\u95F4\u7684\u5927\u5C0F\u662F\u53EF\u4EE5\u8BBE\u7F6E\u7684\uFF0C\u65B9\u6CD5\u533A\u73B0\u5728\u53EF\u4EE5\u8BBE\u7F6E\u672C\u5730\u5185\u5B58\u4E86\uFF0C\u662F\u7269\u7406\u7684\u5185\u5B58\u4E86\uFF0C\u4E0D\u8003\u8651\u65B9\u6CD5\u533A\u7684\u8BDD\uFF0C\u5806\u7A7A\u95F4\u662F\u5185\u5B58\u4E2D\u6700\u5927\u7684\u533A\u57DF

                                                                    7. \u8981\u7406\u89E3\u5230\u6808\u91CC\u4E0D\u53EA\u6709\u5C40\u90E8\u53D8\u91CF\u8868\uFF0C\u8FD8\u6709\u5B57\u8282\u7801\u6307\u4EE4\uFF0C\u800C\u4E0D\u662FJava\u4EE3\u7801\uFF01\u90FD\u8FDB\u5165\u5230\u8FD0\u884C\u65F6\u6570\u636E\u533A\u4E86\uFF0C\u600E\u4E48\u53EF\u80FD\u662FJava\u4EE3\u7801\uFF0CJava\u6E90\u6587\u4EF6\u7ECF\u7F16\u8BD1\u540E\uFF0C\u8FD0\u884C\u624D\u4F1A\u901A\u8FC7\u7C7B\u52A0\u8F7D\u5B50\u7CFB\u7EDF\u52A0\u8F7D\u8FDB\u8FD0\u884C\u65F6\u6570\u636E\u533A\uFF0C\u624D\u4F1A\u4ECE\u9759\u6001\u7684\u7ED3\u6784\u53D8\u6210\u8FD0\u884C\u65F6\u6570\u636E\u7ED3\u6784\u3002

                                                                      \u8981\u7262\u8BB0\u5B57\u8282\u7801----\u5BF9\u5E94\u4E8EJVM\u3002

                                                                    8. \u865A\u62DF\u673A\u6808\u548C\u7EBF\u7A0B\u7684\u751F\u547D\u5468\u671F\u662F\u4E00\u6837\u7684\uFF0C\u4E00\u4E2A\u7EBF\u7A0B\u5BF9\u5E94\u4E00\u4E2AJava\u865A\u62DF\u673A\u6808\u3002\u865A\u62DF\u673A\u6808\u662F\u7EBF\u7A0B\u79C1\u6709\u7684

                                                                      \u6808\u91CC\u9762\u4FDD\u5B58\u7684\u662F\u4E00\u4E2A\u4E2A\u7684\u6808\u5E27\uFF0C\u4E00\u4E2A\u6808\u5E27\u5C31\u5BF9\u5E94\u7740\u4E00\u6B21\u65B9\u6CD5\u8C03\u7528\uFF01\u6808\u9876\u7684\u65B9\u6CD5\u79F0\u4E3A\u5F53\u524D\u65B9\u6CD5\uFF01

                                                                      \u865A\u62DF\u673A\u6808\u4E3B\u7BA1Java\u7A0B\u5E8F\u7684\u8FD0\u884C\uFF0C\u4FDD\u5B58\u65B9\u6CD5\u7684\u5C40\u90E8\u53D8\u91CF\uFF088\u79CD\u57FA\u672C\u6570\u636E\u7C7B\u578B\u3001\u5BF9\u8C61\u7684\u5F15\u7528\u5730\u5740\uFF09\u3001\u90E8\u5206\u7ED3\u679C\uFF0C\u5E76\u53C2\u4E0E\u65B9\u6CD5\u7684\u8C03\u7528\u548C\u8FD4\u56DE

                                                                    9. \u6BCF\u4E2A\u65B9\u6CD5\u6267\u884C\uFF0C\u4F34\u968F\u7740\u8FDB\u6808

                                                                      \u6267\u884C\u7ED3\u675F\u540E\uFF0C\u51FA\u6808

                                                                      \u5BF9\u4E8E\u6808\u6765\u8BF4\uFF0C\u4E0D\u5B58\u5728\u5783\u573E\u56DE\u6536\u95EE\u9898

                                                                    10. \u6808\u6EA2\u51FA\u5F02\u5E38\uFF0C\u9012\u5F52\u5982\u679C\u8BF4\u4E0D\u671D\u7740\u9000\u51FA\u9012\u5F52\u7684\u6761\u4EF6\u903C\u8FD1\uFF0C\u5C31\u4F1A\u62A5\u6808\u6EA2\u51FA\u5F02\u5E38\u3002\u9012\u5F52\u4E00\u5B9A\u8981\u671D\u7740\u7ED3\u675F\u9012\u5F52\u7684\u65B9\u5411\u8FDB\u884C

                                                                    11. -Xss\u53EF\u4EE5\u8FD9\u662F\u6808\u7684\u5927\u5C0F\uFF0CEditConfiguration\u91CCVM options\u8BBE\u7F6E

                                                                    \u6808\u7684\u5B58\u50A8\u5355\u4F4D

                                                                    1. \u6808\u4E2D\u7684\u6570\u636E\u90FD\u662F\u4EE5\u6808\u5E27\u7684\u683C\u5F0F\u5B58\u5728\uFF0C\u4EE5\u6808\u5E27\u4E3A\u57FA\u672C\u5355\u4F4D

                                                                      \u8FD9\u4E2A\u7EBF\u7A0B\u6B63\u5728\u6267\u884C\u7684\u6BCF\u4E2A\u65B9\u6CD5\u90FD\u5404\u81EA\u5BF9\u5E94\u4E00\u4E2A\u6808\u5E27

                                                                      \u65B9\u6CD5\u548C\u6808\u5E27\u662F\u4E00\u4E00\u5BF9\u5E94\u7684\u5173\u7CFB

                                                                    2. \u6808\u5E27\u662F\u4E00\u4E2A\u5185\u5B58\u533A\u5757\uFF0C\u662F\u4E00\u4E2A\u6570\u636E\u96C6\uFF0C\u7EF4\u7CFB\u7740\u65B9\u6CD5\u6267\u884C\u8FC7\u7A0B\u79CD\u7684\u5404\u79CD\u6570\u636E\u4FE1\u606F

                                                                    3. \u6808\u7684\u64CD\u4F5C\u53EA\u6709\u538B\u6808\u548C\u51FA\u6808

                                                                    4. \u5728\u4E00\u4E2A\u6D3B\u52A8\u7EBF\u7A0B\u4E2D\uFF0C\u4E00\u4E2A\u65F6\u95F4\u70B9\u4E0A\uFF0C\u53EA\u4F1A\u6709\u4E00\u4E2A\u6D3B\u52A8\u7684\u6808\u5E27\uFF0C\u5373\u53EA\u6709\u5F53\u524D\u6B63\u5728\u6267\u884C\u7684\u65B9\u6CD5\u7684\u6808\u5E27\uFF08\u6808\u9876\u6808\u5E27\uFF09\u662F\u6709\u6548\u7684\u3002

                                                                      \u8FD9\u4E2A\u6808\u5E27\u88AB\u79F0\u4E3A\u5F53\u524D\u6808\u5E27

                                                                      \u8981\u6CE8\u610F\u6808\u9876\u6808\u5E27\u5BF9\u5E94\u7740\u4E00\u4E2A\u5F53\u524D\u6B63\u5728\u6267\u884C\u7684\u65B9\u6CD5\u3002\u800Cpc\u5BC4\u5B58\u5668\u5B58\u50A8\u7684\u662F\u4E0B\u4E00\u6B21\u8981\u6267\u884C\u7684\u5B57\u8282\u6307\u4EE4\u7684\u5730\u5740

                                                                      image-20210808221622960

                                                                      \u5982\u679C\u5728\u5F53\u524D\u65B9\u6CD5\u4E2D\u8C03\u7528\u4E86\u5176\u4ED6\u65B9\u6CD5\uFF0C\u90A3\u4E48\u5BF9\u5E94\u7684\u65B0\u7684\u6808\u5E27\u4F1A\u88AB\u521B\u5EFA\u51FA\u6765\uFF0C\u653E\u5728\u6808\u7684\u9876\u7AEF\uFF0C\u6210\u4E3A\u65B0\u7684\u5F53\u524D\u5E27\u3002

                                                                      \u8FD9\u662F\u6808\uFF0C\u5148\u8FDB\u540E\u51FA\uFF0C\u540E\u8FDB\u5148\u51FA\uFF0C\u540E\u521B\u5EFA\uFF0C\u540E\u8FDB\u6808\uFF0C\u5148\u6267\u884C

                                                                    5. \u7A0B\u5E8F\u8BA1\u6570\u5668\u6765\u6307\u5B9A\u6267\u884C\u5F15\u64CE\u8981\u6267\u884C\u7684\u4E0B\u4E00\u4E2A\u6307\u4EE4

                                                                    6. main()\u65B9\u6CD5\u4E5F\u5BF9\u5E94\u4E00\u4E2A\u6808\u5E27

                                                                    7. \u4E0D\u540C\u7684\u6808\u7684\u6570\u636E\u662F\u4E0D\u53EF\u4EE5\u5171\u4EAB\u7684\uFF0C\u5373\u4E0D\u53EF\u80FD\u5728\u4E00\u4E2A\u6808\u5E27\u4E2D\u5F15\u7528\u53E6\u4E00\u4E2A\u6808\u7684\u6808\u5E27

                                                                    8. image-20210808222718076

                                                                      \u65B9\u6CD5\u7684\u7ED3\u675F\u65B9\u5F0F\u5206\u4E3A\u4E24\u79CD

                                                                      1. \u6B63\u5E38\u7ED3\u675F\uFF0C\u4EE5return\u4E3A\u4EE3\u8868
                                                                      2. \u65B9\u6CD5\u6267\u884C\u4E2D\u51FA\u73B0\u672A\u88AB\u6355\u83B7\u7684\u5F02\u5E38\uFF0C\u4EE5\u629B\u51FA\u5F02\u5E38\u7684\u5F62\u5F0F\u7ED3\u675F

                                                                    \u6808\u5E27\u7684\u5185\u90E8\u7ED3\u6784

                                                                    1. \u4E00\u4E2A\u6808\u5E27\u5BF9\u5E94\u4E8E\u4E00\u4E2A\u65B9\u6CD5

                                                                      \u4E00\u4E2A\u6808\u5E27\u7684\u5165\u6808\u5BF9\u5E94\u4E8E\u4E00\u4E2A\u65B0\u7684\u65B9\u6CD5\u7684\u8C03\u7528

                                                                      \u4E00\u4E2A\u6808\u5E27\u7684\u51FA\u6808\u5BF9\u5E94\u4E8E\u4E00\u4E2A\u65B9\u6CD5\u6267\u884C\u7684\u7ED3\u675F\uFF0C\u4EE5\u6B63\u5E38\u65B9\u5F0F\u7ED3\u675F\uFF0C\u6216\u8005\u8FD4\u56DE\u5F02\u5E38\u8FD4\u56DE\u7ED9\u524D\u4E00\u4E2A\u65B9\u6CD5

                                                                    2. \u6808\u5E27\u662F\u9700\u8981\u6709\u5927\u5C0F\u7684\uFF0C\u53D6\u51B3\u4E8E\u5185\u90E8\u7ED3\u6784\u7684\u5927\u5C0F

                                                                    3. \u6808\u5E27\u5185\u90E8\uFF1A

                                                                      • \u5C40\u90E8\u53D8\u91CF\u8868
                                                                      • \u64CD\u4F5C\u6570\u6808\uFF08\u6216\u8868\u8FBE\u5F0F\u6808\uFF09
                                                                      • \u52A8\u6001\u94FE\u63A5\uFF08\u6216\u6307\u5411\u8FD0\u884C\u65F6\u5E38\u91CF\u6C60\u7684\u65B9\u6CD5\u5F15\u7528\uFF09
                                                                      • \u65B9\u6CD5\u8FD4\u56DE\u5730\u5740\uFF08\u6216\u65B9\u6CD5\u6B63\u5E38\u9000\u51FA\u6216\u8005\u5F02\u5E38\u9000\u51FA\u7684\u5B9A\u4E49\uFF09
                                                                      • \u4E00\u4E9B\u9644\u52A0\u4FE1\u606F

                                                                      image-20210808224402410

                                                                    \u5C40\u90E8\u53D8\u91CF\u8868

                                                                    1. \u5C40\u90E8\u53D8\u91CF\u8868\u4E5F\u53EB\u5C40\u90E8\u53D8\u91CF\u6570\u7EC4\u6216\u672C\u5730\u53D8\u91CF\u8868

                                                                    2. \u5C40\u90E8\u53D8\u91CF\u8868\u7684\u6570\u636E\u7C7B\u578B\u4E3B\u8981\u5305\u62EC\u5404\u7C7B\u57FA\u672C\u6570\u636E\u7C7B\u578B\u3001\u5BF9\u8C61\u5F15\u7528\u3001\u4EE5\u53CA\u8FD4\u56DE\u5730\u5740\u7C7B\u578B

                                                                    3. \u5C40\u90E8\u53D8\u91CF\u8868\u662F\u6570\u5B57\u6570\u7EC4\uFF0C8\u79CD\u57FA\u672C\u6570\u636E\u7C7B\u578B\u90FD\u7528\u6570\u503C\u6765\u8868\u793A\uFF0C\u5BF9\u8C61\u5F15\u7528\uFF08\u5F15\u7528\u53D8\u91CF\u6216\u8005\u8BF4\u5F15\u7528\u5730\u5740\uFF09\u3001\u8FD4\u56DE\u503C\u7C7B\u578B\u90FD\u53EF\u4EE5\u7528\u6570\u503C\u7C7B\u578B\u6765\u8868\u793A

                                                                    4. \u5C40\u90E8\u53D8\u91CF\u8868\u7684\u5B58\u50A8\u5355\u4F4D\u662Fslot\uFF0C\u53D8\u91CF\u69FD

                                                                    5. \u5C40\u90E8\u53D8\u91CF\u8868\u7531\u4E8E\u662F\u5728\u6808\u7684\u6808\u5E27\u91CC\uFF0C\u6808\u662F\u7EBF\u7A0B\u79C1\u6709\uFF0C\u90A3\u4E48\u5C31\u6D89\u53CA\u4E0D\u5230\u5171\u4EAB\u7684\u95EE\u9898\uFF0C\u5C31\u81EA\u7136\u6CA1\u6709\u7EBF\u7A0B\u5B89\u5168\u95EE\u9898\u4E86\u3002

                                                                    6. \u5C40\u90E8\u53D8\u91CF\u8868\u7684\u5927\u5C0F\u5728\u7F16\u8BD1\u671F\u95F4\u5C31\u786E\u5B9A\u4E0B\u6765\uFF0C\u4E00\u65E6\u786E\u5B9A\u4E0B\u6765\uFF0C\u5728\u8FD0\u884C\u671F\u95F4\u5C31\u4E0D\u4F1A\u66F4\u6539\u3002

                                                                    7. \u4E00\u4E2A\u6808\u5E27\u5BF9\u5E94\u4E8E\u4E00\u4E2A\u65B9\u6CD5\uFF0C\u6BCF\u4E2A\u65B9\u6CD5\u91CC\u6709\u5C40\u90E8\u53D8\u91CF\uFF0C\u5C31\u5BF9\u5E94\u4E8E\u6BCF\u4E2A\u6808\u5E27\u7684\u5C40\u90E8\u53D8\u91CF\u8868\u3002\u5728\u7F16\u8BD1\u671F\u95F4\u786E\u5B9A\u5C40\u90E8\u53D8\u91CF\u8868\u5927\u5C0F

                                                                      \u4E3B\u8981\u5F71\u54CD\u6808\u5E27\u7684\u5927\u5C0F\u7684\u5C31\u662F\u6808\u5E27\u91CC\u5C40\u90E8\u53D8\u91CF\u8868\u7684\u5927\u5C0F

                                                                    8. javap\u6307\u4EE4\u89E3\u6790\u5B57\u8282\u7801\u6587\u4EF6\uFF0C\u80FD\u591F\u770B\u5230\u5B57\u8282\u7801\u6307\u4EE4\uFF0C\u6216\u901A\u8FC7\u63D2\u4EF6

                                                                    9. \u7A0B\u5E8F\u8BA1\u6570\u5668\u5B58\u7684\u662F\u4E0B\u4E00\u6761\u8981\u6267\u884C\u7684\u5B57\u8282\u7801\u6307\u4EE4\u7684\u6307\u4EE4\u5730\u5740\uFF0C\u662F\u6570\u503C\uFF01

                                                                    10. \u5C40\u90E8\u53D8\u91CF\u8868\u6BCF\u4E2Aslot\u7684StartPC \u6307\u7684\u662F\u58F0\u660E\u4E86\u8FD9\u4E2A\u5C40\u90E8\u53D8\u91CF\u4E4B\u540E\uFF0C\u4E0B\u4E00\u884C\u5F00\u59CB\u6267\u884C\u7684Java\u4EE3\u7801\u5BF9\u5E94\u7684\u5B57\u8282\u7801\u6307\u4EE4\u5730\u5740

                                                                    11. JVM\u4F1A\u4E3A\u5C40\u90E8\u53D8\u91CF\u8868\u4E2D\u6BCF\u4E00\u4E2Aslot\u90FD\u5206\u914D\u4E00\u4E2A\u8BBF\u95EE\u7D22\u5F15

                                                                    12. \u6784\u9020\u5668\u5728\u5B57\u8282\u7801\u5C42\u9762\u4F1A\u751F\u6210<init>,\u5B57\u8282\u7801\u6587\u4EF6\u89E3\u6790\u4E4B\u540E\uFF0C\u80FD\u591F\u770B\u5230<init>

                                                                      \u5982\u679C\u5F53\u524D\u6808\u5E27\u662F\u7531\u6784\u9020\u65B9\u6CD5\u6216\u8005\u5B9E\u4F8B\u65B9\u6CD5\u521B\u5EFA\u7684\uFF0C\u90A3\u4E48\u8BE5\u5BF9\u8C61\u5F15\u7528this\u5C06\u4F1A\u5B58\u653E\u5728index\u4E3A0\u7684slot\u5904\u3002\u5176\u4F59\u7684\u53C2\u6570\u6309\u7167\u53C2\u6570\u8868\u7EE7\u7EED\u6392\u5217

                                                                      \u6BCF\u4E00\u4E2Aslot\u90FD\u4F1A\u5206\u914D\u7D22\u5F15\uFF0C\u90A3this\u5C31\u5206\u914D\u5728\u7D22\u5F15\u4E3A0\u7684slot\u5904

                                                                    13. \u5F15\u7528\u7C7B\u578B\u5360\u636E\u4E00\u4E2Aslot\uFF0Cdouble\u7C7B\u578B\u53D8\u91CF\u5360\u636E\u4E24\u4E2Aslot

                                                                    14. \u6808\u5E27\u4E2D\u7684\u5C40\u90E8\u53D8\u91CF\u8868\u4E2D\u7684\u69FD\u4F4D\u662F\u53EF\u4EE5\u91CD\u7528\u7684\u3002\u5982\u679C\u4E00\u4E2A\u5C40\u90E8\u53D8\u91CF\u8FC7\u4E86\u5176\u4F5C\u7528\u57DF\uFF0C\u90A3\u4E48\u5728\u5176\u4F5C\u7528\u57DF\u4E4B\u540E\u7533\u660E\u7684\u65B0\u7684\u5C40\u90E8\u53D8\u91CF\u5C31\u5F88\u6709\u53EF\u80FD\u4F1A\u590D\u7528\u8FC7\u671F\u5C40\u90E8\u53D8\u91CF\u7684\u69FD\u4F4D

                                                                    15. \u6210\u5458\u53D8\u91CF\uFF08\u7C7B\u91CC\u9762\uFF0C\u65B9\u6CD5\u5916\u90E8\u5B9A\u4E49\u7684\u53D8\u91CF\uFF09

                                                                      • \u7C7B\u53D8\u91CF\uFF08\u9759\u6001\u53D8\u91CF\uFF0C\u968F\u7740\u7C7B\u7684\u52A0\u8F7D\u800C\u521B\u5EFA\uFF0C\u5206\u914D\u5230\u65B9\u6CD5\u533A\u4E2D\uFF09
                                                                        • linking\u7684prepare\u9636\u6BB5\uFF1A\u7ED9\u7C7B\u53D8\u91CF\u9ED8\u8BA4\u8D4B\u503C\uFF08\u8FD9\u4E2A\u8D4B\u503C\uFF0C\u4E0D\u5305\u62EC\u7ED9\u5B9E\u4F8B\u53D8\u91CF\u9ED8\u8BA4\u8D4B\u503C\uFF0C\u56E0\u4E3A\u52A0\u8F7D\u3001\u94FE\u63A5\u3001\u521D\u59CB\u5316\u4E09\u4E2A\u9636\u6BB5\u662F\u7C7B\u7684\u52A0\u8F7D\u8FC7\u7A0B\uFF0C\u73B0\u5728\u662F\u7C7B\u7684\u52A0\u8F7D\uFF0C\u52A0\u8F7D\u7684\u662F\u7C7B\u7684\u7ED3\u6784\uFF0C\u9759\u6001\u53D8\u91CF\u662F\u968F\u7740\u7C7B\u7684\u52A0\u8F7D\u800C\u52A0\u8F7D\uFF0C\u4F46\u662F\u5B9E\u4F8B\u53D8\u91CF\u4E0D\u662F\uFF0C\u5B9E\u4F8B\u53D8\u91CF\u662F\u968F\u7740\u5BF9\u8C61\u521B\u5EFA\u800C\u5206\u914D\u5230\u5806\u4E2D\uFF09
                                                                        • initial\u9636\u6BB5\uFF1A\u7ED9\u7C7B\u53D8\u91CF\u663E\u5F0F\u8D4B\u503C\u53CA\u9759\u6001\u4EE3\u7801\u5757\u8D4B\u503C<clinit>
                                                                      • \u5B9E\u4F8B\u53D8\u91CF\uFF08\u968F\u7740\u5BF9\u8C61\u7684\u521B\u5EFA\u800C\u5206\u914D\u5230\u5806\u7A7A\u95F4\u4E2D\uFF09
                                                                        • \u968F\u7740\u5BF9\u8C61\u7684\u521B\u5EFA\uFF0C\u4F1A\u5728\u5BF9\u7A7A\u95F4\u4E2D\u5206\u7C7B\u5B9E\u4F8B\u53D8\u91CF\u7A7A\u95F4\uFF0C\u5E76\u8FDB\u884C\u9ED8\u8BA4\u8D4B\u503C

                                                                      \u5C40\u90E8\u53D8\u91CF\uFF08\u65B9\u6CD5\u5185\u90E8\u7684\u53D8\u91CF\uFF09

                                                                      • \u5728\u4F7F\u7528\u524D\uFF0C\u5FC5\u987B\u8981\u8FDB\u884C\u663E\u5F0F\u8D4B\u503C\uFF0C\u5426\u5219\u7F16\u8BD1\u4E0D\u901A\u8FC7
                                                                    16. \u5C40\u90E8\u53D8\u91CF\u8868\u4E2D\u7684\u53D8\u91CF\u4E5F\u662F\u91CD\u8981\u7684\u5783\u573E\u56DE\u6536\u6839\u8282\u70B9\uFF08gc root\uFF09\uFF0C\u53EA\u8981\u88AB\u5C40\u90E8\u53D8\u91CF\u8868\u4E2D\u76F4\u63A5\u6216\u95F4\u63A5\u5F15\u7528\u7684\u5BF9\u8C61\u90FD\u4E0D\u4F1A\u88AB\u56DE\u6536

                                                                    \u64CD\u4F5C\u6570\u6808

                                                                    1. \u6808\u5E27\u91CC\u53E6\u4E00\u4E2A\u975E\u5E38\u91CD\u8981\u7684\u7ED3\u6784\uFF0C\u53EB\u64CD\u4F5C\u6570\u6808

                                                                    2. \u6808\u53EF\u4EE5\u4F7F\u7528\u6570\u7EC4\u6216\u94FE\u8868\u6765\u5B9E\u73B0\uFF0C\u6570\u7EC4\u548C\u94FE\u8868\u662F\u771F\u5B9E\u5B58\u5728\u7684\u7269\u7406\u7ED3\u6784\uFF08\u5B58\u50A8\u7ED3\u6784\uFF09

                                                                    3. \u4E5F\u5C31\u662F\u865A\u62DF\u673A\u6808\u4EE5\u6808\u5E27\u4E3A\u5B58\u50A8\u5355\u5143\uFF0C\u800C\u6808\u5E27\u91CC\u53C8\u6709\u6808\uFF01\u5C31\u662F\u8868\u8FBE\u5F0F\u6808\u5373\u64CD\u4F5C\u6570\u6808

                                                                    4. \u53EA\u8981\u662F\u6808\uFF0C\u53EA\u80FD\u6709\u5165\u6808\u548C\u51FA\u6808\u4E24\u4E2A\u64CD\u4F5C

                                                                      \u5165\u6808\u3001\u51FA\u6808\u7684\u5BF9\u8C61\u4E3A\u64CD\u4F5C\u6570\uFF01\uFF01

                                                                    5. \u64CD\u4F5C\u6570\u662F\u4EC0\u4E48\u5462\uFF1F

                                                                      \u64CD\u4F5C\u6570\u6808\uFF0C\u4E3B\u8981\u7528\u4E8E\u4FDD\u5B58\u8BA1\u7B97\u8FC7\u7A0B\u7684\u4E2D\u95F4\u7ED3\u679C\uFF0C\u540C\u65F6\u4F5C\u4E3A\u8BA1\u7B97\u8FC7\u7A0B\u4E2D\u53D8\u91CF\u4E34\u65F6\u7684\u5B58\u50A8\u7A7A\u95F4\u3002\u6240\u4EE5\u64CD\u4F5C\u6570\u5C31\u662F\u6307\u7684\u4E34\u65F6\u4E2D\u95F4\u7ED3\u679C\u6216\u4E34\u65F6\u53D8\u91CF\u4E4B\u7C7B\u7684

                                                                    6. \u64CD\u4F5C\u6570\u6808\uFF0C\u6808\u4E2D\u7684\u4EFB\u4F55\u4E00\u4E2A\u5143\u7D20\u90FD\u662F\u53EF\u4EE5\u4EFB\u610F\u7684Java\u6570\u636E\u7C7B\u578B

                                                                      • 32bit\u7684\u7C7B\u578B\u5360\u7528\u4E00\u4E2A\u6808\u5355\u4F4D\u6DF1\u5EA6
                                                                      • 64bit\u7684\u7C7B\u578B\u5360\u7528\u4E24\u4E2A\u6808\u5355\u4F4D\u6DF1\u5EA6
                                                                    7. \u64CD\u4F5C\u6570\u6808\u548C\u5C40\u90E8\u53D8\u91CF\u8868\u4E00\u6837\uFF0C\u5728\u7F16\u8BD1\u4E4B\u540E\u5C31\u786E\u5B9A\u4E86\u6808\u7684\u6DF1\u5EA6

                                                                    8. image-20210809192420557

                                                                      \u8FD9\u662F\u5B57\u8282\u7801\u6587\u4EF6\u89E3\u6790\u4E4B\u540E\u7684\u6837\u5B50\uFF0Cstack\u5C31\u662F\u64CD\u4F5C\u6570\u6808\u7F16\u8BD1\u4E4B\u540E\u786E\u5B9A\u7684\u6DF1\u5EA6\uFF0Clocals\u662F\u5C40\u90E8\u53D8\u91CF\u8868\u7F16\u8BD1\u4E4B\u540E\u786E\u5B9A\u7684\u5927\u5C0F

                                                                      \u7F16\u8BD1\u4E4B\u540E\u8FD8\u662F\u5728\u672C\u5730\u78C1\u76D8\u7684\uFF0C\u662F\u751F\u6210\u5B57\u8282\u7801\u6587\u4EF6\uFF0C\u8981\u8FD0\u884C\uFF0C\u90A3\u4E48\u5C31\u9700\u8981\u8FDB\u884C\u52A0\u8F7D\uFF0C\u8FD9\u6837\u4E8C\u8FDB\u5236\u9759\u6001\u6570\u636E\u624D\u4F1A\u88AB\u52A0\u8F7D\u5230\u65B9\u6CD5\u533A\uFF0C\u53D8\u6210\u8FD0\u884C\u65F6\u7ED3\u6784

                                                                    9. \u5982\u679C\u88AB\u8C03\u7528\u7684\u65B9\u6CD5\u5E26\u6709\u8FD4\u56DE\u503C\uFF0C\u5176\u8FD4\u56DE\u503C\u5C06\u4F1A\u88AB\u538B\u5165\u5F53\u524D\u6808\u5E27\u7684\u64CD\u4F5C\u6570\u6808\u4E2D\uFF0C\u5E76\u66F4\u65B0PC\u5BC4\u5B58\u5668\u4E2D\u4E0B\u4E00\u6761\u9700\u8981\u6267\u884C\u7684\u5B57\u8282\u7801\u6307\u4EE4\u7684\u5730\u5740\uFF01

                                                                    10. Java\u865A\u62DF\u673A\u7684\u89E3\u91CA\u5F15\u64CE\u662F\u57FA\u4E8E\u6808\u7684\u6267\u884C\u5F15\u64CE\uFF0C\u8FD9\u91CC\u7684\u6808\u5C31\u662F\u6307\u7684\u64CD\u4F5C\u6570\u6808\uFF01

                                                                    11. byte\u3001short\u3001char\u3001boolean\u7C7B\u578B\u90FD\u662F\u4EE5int\u7C7B\u578B\u4FDD\u5B58

                                                                    12. \u6267\u884C\u5F15\u64CE\u662F\u8D1F\u8D23\u628A\u5B57\u8282\u7801\u6267\u884C\u8F6C\u6362\u4E3A\u673A\u5668\u6307\u4EE4\uFF0C\u7136\u540ECPU\u6267\u884C

                                                                    13. image-20210809193704853

                                                                      \u6846\u8D77\u6765\u8FD9\u4E2A\u51E0\u4E2A\uFF0C\u6D89\u53CA\u5230\u64CD\u4F5C\u6570\u6808\uFF0Ciadd\u4F1A\u9996\u5148\u51FA\u6808\uFF0C\u7136\u540ECPU\u6267\u884C\u76F8\u52A0\uFF0CCPU\u80FD\u6267\u884C\u7684\u539F\u56E0\u662F\u56E0\u4E3A\u6267\u884C\u5F15\u64CE\u5C06\u5B57\u8282\u7801\u6307\u4EE4\u8F6C\u6362\u6210\u4E86\u673A\u5668\u6307\u4EE4\uFF0C\u4E0A\u9762\u8FD9\u5F20\u56FE\u5C31\u662F\u5B57\u8282\u7801\u6307\u4EE4

                                                                      istore\u8FD9\u4E9B\u5C31\u662F\u6D89\u53CA\u5230\u5C40\u90E8\u53D8\u91CF\u8868

                                                                    14. \u5C40\u90E8\u53D8\u91CF\u8868\u7528\u6570\u7EC4\u5B9E\u73B0\uFF0C\u5728\u7F16\u8BD1\u671F\u5C31\u786E\u5B9A\u4E86\u6570\u7EC4\u7684\u957F\u5EA6\uFF0C\u5C40\u90E8\u53D8\u91CF\u8868\u662F\u6570\u5B57\u6570\u7EC4

                                                                      \u64CD\u4F5C\u6570\u6808\uFF0C\u53EF\u4EE5\u7528\u6570\u7EC4\u6216\u94FE\u8868\u8FD9\u4E24\u79CD\u771F\u5B9E\u7ED3\u6784\u6765\u5B9E\u73B0\uFF0C\u5728\u8FD9\u91CC\u662F\u7528\u6570\u7EC4\u5B9E\u73B0\u3002\u5728\u7F16\u8BD1\u671F\u95F4\u5C31\u786E\u5B9A\u4E86\u6570\u7EC4\u7684\u957F\u5EA6

                                                                      \u4E5F\u5C31\u662F\u8BF4\u5C40\u90E8\u53D8\u91CF\u8868\u548C\u64CD\u4F5C\u6570\u6808\u90FD\u662F\u7528\u6570\u7EC4\u5B9E\u73B0

                                                                    \u6808\u9876\u7F13\u5B58\u6280\u672F

                                                                    1. \u57FA\u4E8E\u6808\u5F0F\u6307\u4EE4\u67B6\u6784\u7684\u865A\u62DF\u673A\u662F\u4F7F\u7528\u7684\u96F6\u5730\u5740\u6307\u4EE4\uFF0C\u6808\u5F0F\u5185\u5B58\u5C42\u9762\u7684\uFF0C\u4E3A\u4E86JVM\u7684\u8DE8\u5E73\u53F0\u6027\uFF0C\u7528\u7684\u6808\u5F0F\u6307\u4EE4\u67B6\u6784

                                                                      \u800C\u57FA\u4E8E\u5BC4\u5B58\u5668\uFF08\u4E0E\u786C\u4EF6\u6302\u94A9\uFF09\uFF0C\u662F\u4E00\u5730\u5740\u6307\u4EE4\u3001\u4E8C\u5730\u5740\u6307\u4EE4\u3001\u4E09\u5730\u5740\u6307\u4EE4\u3002

                                                                      \u6808\u5F0F\u67B6\u6784\u6307\u4EE4\u96C6\u66F4\u5C0F\uFF0C\u4F46\u662F\u7531\u4E8E\u662F\u6808\u5F0F\u7684\uFF0C\u90A3\u4E48\u5B8C\u6210\u4E00\u4E2A\u64CD\u4F5C\uFF0C\u9700\u8981\u4F7F\u7528\u5F88\u591A\u7684\u5165\u6808\u3001\u51FA\u6808\u6307\u4EE4\uFF0C\u6240\u4EE5\u5B8C\u6210\u4E00\u9879\u64CD\u4F5C\u7684\u6307\u4EE4\u6570\u6BD4\u57FA\u4E8E\u5BC4\u5B58\u5668\u7684\u67B6\u6784\u591A\uFF0C\u90A3\u4E48\u5185\u5B58\u8BFB\u5199\u6B21\u6570\u4E5F\u5C31\u66F4\u591A

                                                                    2. \u6808\u9876\u7F13\u5B58\uFF1A\u5C06\u6808\u9876\u5143\u7D20\u5168\u90E8\u7F13\u5B58\u5728\u7269\u7406CPU\u7684\u5BC4\u5B58\u5668\u4E2D\uFF0C\u964D\u4F4E\u5BF9\u5185\u5B58\u7684\u8BFB\u3001\u5199\u6B21\u6570

                                                                    \u52A8\u6001\u94FE\u63A5

                                                                    1. \u5927\u90E8\u5206\u5B57\u8282\u7801\u6307\u4EE4\u5728\u6267\u884C\u7684\u65F6\u5019\u90FD\u9700\u8981\u8FDB\u884C\u5BF9\u5E38\u91CF\u6C60\u7684\u8BBF\u95EE

                                                                      \u5E27\u6570\u636E\u533A\u4E2D\u5C31\u4FDD\u6301\u7740\u80FD\u591F\u8BBF\u95EE\u8FD0\u884C\u65F6\u5E38\u91CF\u6C60\u7684\u6307\u9488

                                                                      \u52A8\u6001\u94FE\u63A5\u5C31\u662F\u6307\u5411\u8FD0\u884C\u65F6\u5E38\u91CF\u6C60\u7684\u65B9\u6CD5\u5F15\u7528\uFF08\u8FD9\u91CC\u7684\u8FD0\u884C\u65F6\u5E38\u91CF\u6C60\u5C31\u662F\u65B9\u6CD5\u533A\u4E2D\u7684\u8FD0\u884C\u65F6\u5E38\u91CF\u6C60\uFF09

                                                                    2. \u5728Java\u6E90\u6587\u4EF6\u88AB\u7F16\u8BD1\u5230\u5B57\u8282\u7801\u6587\u4EF6\u4E2D\u65F6\uFF0C\u6240\u6709\u7684\u53D8\u91CF\u548C\u65B9\u6CD5\u5F15\u7528\u90FD\u4F5C\u4E3A\u7B26\u53F7\u5F15\u7528\u4FDD\u5B58\u5728class\u6587\u4EF6\u7684\u5E38\u91CF\u6C60\u91CC\uFF0C\u8FD0\u884C\u4E4B\u540E\uFF0Cclass\u6587\u4EF6\u7684\u5E38\u91CF\u6C60\u7684\u4FE1\u606F\u5C31\u4FDD\u5B58\u5230\u65B9\u6CD5\u533A\u4E2D\u7684\u8FD0\u884C\u65F6\u5E38\u91CF\u6C60\u4E2D\u4E86\u3002

                                                                      \u6BD4\u5982\uFF1A\u63CF\u8FF0\u4E00\u4E2A\u65B9\u6CD5\u8C03\u7528\u4E86\u53E6\u5916\u7684\u5176\u4ED6\u65B9\u6CD5\u65F6\uFF0C\u5C31\u662F\u901A\u8FC7\u5E38\u91CF\u6C60\u4E2D\u6307\u5411\u65B9\u6CD5\u7684\u7B26\u53F7\u5F15\u7528\u6765\u8868\u793A\u7684\u3002

                                                                      \u52A8\u6001\u94FE\u63A5\u7684\u4F5C\u7528\u5C31\u662F\u4E3A\u4E86\u5C06\u8FD9\u4E9B\u7B26\u53F7\u5F15\u7528\u8F6C\u6362\u4E3A\u8C03\u7528\u65B9\u6CD5\u7684\u76F4\u63A5\u5F15\u7528

                                                                      \u53EF\u4EE5\u7406\u89E3\u4E3A\uFF1A

                                                                      \u52A8\u6001\u94FE\u63A5\u6307\u5411\u65B9\u6CD5\u533A\u4E2D\u8FD0\u884C\u65F6\u5E38\u91CF\u6C60\u4E2D\u7684\u7B26\u53F7\u5F15\u7528\uFF0C\u4ECE\u800C\u5F97\u5230\u76F4\u63A5\u5F15\u7528

                                                                    3. \u5E38\u91CF\u6C60\u91CC\u9762\u662F\u7B26\u53F7\u5F15\u7528

                                                                      \u52A8\u6001\u94FE\u63A5\u662F\u6839\u636E\u7B26\u53F7\u5F15\u7528\u53BB\u5E38\u91CF\u6C60\u91CC\u9762\u627E\u5230\u5177\u4F53\u7684\u4F4D\u7F6E\uFF0C\u518D\u6839\u636E\u7B26\u53F7\u5F15\u7528\u5F97\u5230\u76F4\u63A5\u65B9\u6CD5\u5F15\u7528

                                                                    \u65B9\u6CD5\u7684\u8C03\u7528

                                                                    1. image-20210809204952628

                                                                      \u9759\u6001\u94FE\u63A5\u4E5F\u53EB\u65E9\u671F\u7ED1\u5B9A\uFF0C\u7531\u7B26\u53F7\u5F15\u7528\u8F6C\u6362\u4E3A\u76F4\u63A5\u5F15\u7528\uFF0C\u5728\u7F16\u8BD1\u671F\u5C31\u80FD\u786E\u5B9A\u4E0B\u6765

                                                                      \u52A8\u6001\u94FE\u63A5\u53EB\u665A\u671F\u7ED1\u5B9A

                                                                    2. \u865A\u51FD\u6570\u7684\u7279\u5F81\u5C31\u4F53\u73B0\u4E3A\u5728\u8FD0\u884C\u671F\u624D\u80FD\u591F\u786E\u5B9A\u4E0B\u6765\u8C03\u7528\u7684\u662F\u54EA\u4E2A\u65B9\u6CD5\uFF01\uFF01\uFF01\uFF01

                                                                      \u5C31\u662F\u5177\u5907\u665A\u671F\u7ED1\u5B9A\u7684\u7279\u70B9\uFF01

                                                                      \u5982\u679CJava\u7A0B\u5E8F\u4E2D\u4E0D\u60F3\u8BA9\u67D0\u4E2A\u65B9\u6CD5\u62E5\u6709\u865A\u51FD\u6570\u7684\u7279\u5F81\uFF0C\u5C31\u53EF\u4EE5\u4F7F\u7528\u5173\u952E\u5B57final\u6765\u6807\u8BC6\u3002

                                                                      final\u6807\u8BC6\u5C31\u662F\u4E0D\u5141\u8BB8\u8FD9\u4E2A\u65B9\u6CD5\u88AB\u91CD\u5199\uFF0C\u90A3\u4E48\u5C31\u662F\u5728\u7F16\u8BD1\u671F\u5C31\u786E\u5B9A\u4E86\uFF0C\u6CA1\u6709\u91CD\u5199\u65B9\u6CD5\uFF0C\u5C31\u662F\u4E0D\u5177\u5907\u591A\u6001\u7684\u8FD9\u79CD\u7279\u70B9\u4E86\u3002

                                                                    3. \u5B50\u7C7B\u5BF9\u8C61\u591A\u6001\u6027\u7684\u4F7F\u7528\u524D\u63D0

                                                                      1. \u7C7B\u7684\u7EE7\u627F\u5173\u7CFB

                                                                      2. \u65B9\u6CD5\u7684\u91CD\u5199

                                                                        \u9759\u6001\u65B9\u6CD5\u3001final\u65B9\u6CD5\u3001\u79C1\u6709\u65B9\u6CD5\u90FD\u4E0D\u53EF\u4EE5\u88AB\u91CD\u5199\uFF0C\u6784\u9020\u5668\u4E0D\u80FD\u91CD\u5199\uFF01

                                                                    4. \u975E\u865A\u65B9\u6CD5

                                                                      \u5982\u679C\u65B9\u6CD5\u5728\u7F16\u8BD1\u671F\u5C31\u786E\u5B9A\u4E86\u5177\u4F53\u7684\u8C03\u7528\u7248\u672C\uFF0C\u8FD9\u4E2A\u7248\u672C\u5728\u8FD0\u884C\u65F6\u662F\u4E0D\u53EF\u53D8\u7684\uFF0C\u8FD9\u6837\u7684\u65B9\u6CD5\u79F0\u4E3A\u975E\u865A\u65B9\u6CD5

                                                                      \u9759\u6001\u65B9\u6CD5\u3001final\u65B9\u6CD5\u3001\u79C1\u6709\u65B9\u6CD5\u3001\u5B9E\u4F8B\u6784\u9020\u5668\u3001\u7236\u7C7B\u65B9\u6CD5\u90FD\u662F\u975E\u865A\u65B9\u6CD5

                                                                      \u5269\u4E0B\u7684\u65B9\u6CD5\u90FD\u662F\u865A\u65B9\u6CD5\uFF0C\u5C31\u662F\u5728\u7F16\u8BD1\u671F\u4E0D\u786E\u5B9A\u5177\u4F53\u8C03\u7528\u7684\u54EA\u4E2A\u65B9\u6CD5\uFF0C\u4E3A\u4EC0\u4E48\u4E0D\u786E\u5B9A\uFF1F\u5C31\u662F\u56E0\u4E3A\u6D89\u53CA\u5230\u65B9\u6CD5\u7684\u91CD\u5199\uFF0C\u8FD9\u662F\u591A\u6001\u6027\u7684\u4F53\u73B0

                                                                    5. image-20210809210735289

                                                                    6. Java\u662F\u9759\u6001\u7C7B\u578B\u8BED\u8A00

                                                                      \u52A8\u6001\u7C7B\u578B\u8BED\u8A00\u548C\u9759\u6001\u7C7B\u578B\u8BED\u8A00\u4E24\u8005\u7684\u533A\u522B\u5C31\u5728\u4E8E\u5BF9\u7C7B\u578B\u7684\u68C0\u67E5\u662F\u5728\u7F16\u8BD1\u671F\u8FD8\u662F\u5728\u8FD0\u884C\u671F\uFF0C\u6EE1\u8DB3\u524D\u8005\u5C31\u662F\u9759\u6001\u7C7B\u578B\u8BED\u8A00\uFF0C\u53CD\u4E4B\u5C31\u662F\u52A8\u6001\u7C7B\u578B\u8BED\u8A00

                                                                      JavaScript\uFF0Cpython\u662F\u52A8\u6001\u7C7B\u578B\u8BED\u8A00

                                                                      \u52A8\u6001\u7C7B\u578B\u8BED\u8A00\u662F\u5224\u65AD\u53D8\u91CF\u503C\u7684\u7C7B\u578B\u4FE1\u606F\uFF0C\u53D8\u91CF\u6CA1\u6709\u7C7B\u578B\u4FE1\u606F\uFF0C\u53D8\u91CF\u503C\u624D\u6709\u7C7B\u578B\u4FE1\u606F

                                                                    7. \u65B9\u6CD5\u91CD\u5199\u7684\u672C\u8D28

                                                                      image-20210809214353466

                                                                    8. \u865A\u65B9\u6CD5\u8868\u662F\u4E3A\u4E86\u51CF\u5C11\u9891\u7E41\u5730\u53BB\u627E\u5E94\u8BE5\u8C03\u7528\u54EA\u4E2A\u65B9\u6CD5\u7684\u8FC7\u7A0B

                                                                      \u5728\u9762\u5411\u5BF9\u8C61\u7684\u7F16\u7A0B\u4E2D\uFF0C\u4F1A\u5F88\u9891\u7E41\u5730\u4F7F\u7528\u5230\u52A8\u6001\u5206\u6D3E\uFF08\u53EF\u4EE5\u7406\u89E3\u4E3A\u53BB\u627E\u5E94\u8BE5\u6267\u884C\u54EA\u4E2A\u65B9\u6CD5\uFF09\uFF0C\u4E3A\u4E86\u63D0\u9AD8\u6027\u80FD\uFF0CJVM\u91C7\u7528\u5728\u7C7B\u7684\u65B9\u6CD5\u533A\u5EFA\u7ACB\u4E00\u4E2A\u865A\u65B9\u6CD5\u8868\u6765\u5B9E\u73B0\uFF0C\u975E\u865A\u65B9\u6CD5\u4E0D\u9700\u8981\uFF0C\u56E0\u4E3A\u975E\u865A\u65B9\u6CD5\u5728\u7F16\u8BD1\u5C31\u53EF\u4EE5\u786E\u5B9A\u662F\u6267\u884C\u54EA\u4E2A\u65B9\u6CD5\u3002

                                                                    9. \u6BCF\u4E2A\u7C7B\u4E2D\u90FD\u6709\u4E00\u4E2A\u865A\u65B9\u6CD5\u8868\uFF0C\u8868\u4E2D\u5B58\u653E\u7740\u5404\u4E2A\u65B9\u6CD5\u7684\u5B9E\u9645\u5165\u53E3

                                                                      \u5B50\u7C7B\u91CD\u5199\u8FC7\u7236\u7C7B\u7684\u65B9\u6CD5\uFF0C\u6216\u8005\u5B9E\u73B0\u4E86\u63A5\u53E3\u7684\u65B9\u6CD5\uFF0C\u90A3\u4E48\u865A\u65B9\u6CD5\u8868\u4E2D\u6709\u5B9E\u9645\u5165\u53E3\uFF0C\u6307\u5411\u5B50\u7C7B\u81EA\u5DF1\u5B9E\u73B0\u7684\u65B9\u6CD5\uFF0C\u5982\u679C\u6CA1\u6709\u91CD\u5199\u7684\u90A3\u4E9B\u865A\u65B9\u6CD5\uFF0C\u5C31\u662F\u6307\u5411\u7236\u7C7B\u7684\u65B9\u6CD5\u6216\u8005\u63A5\u53E3\u7684\u65B9\u6CD5

                                                                      \u6362\u53E5\u8BDD\u8BF4\uFF0C\u865A\u65B9\u6CD5\u8868\u5C31\u6709\u65B9\u6CD5\u5177\u4F53\u7684\u5B9E\u9645\u5165\u53E3

                                                                      \u865A\u65B9\u6CD5\u8868\u662F\u5728\u65B9\u6CD5\u533A\u7684\uFF0C\u6BCF\u4E2A\u7C7B\u90FD\u6709\uFF01

                                                                      \u865A\u65B9\u6CD5\u8868\u5728\u65B9\u6CD5\u533A\uFF0C\u662F\u8FD0\u884C\u65F6\uFF0C\u7C7B\u7684\u52A0\u8F7D\u8FC7\u7A0B\u624D\u88AB\u521B\u5EFA\uFF0C\u5F00\u59CB\u521D\u59CB\u5316

                                                                      \u8FD0\u884C\u5B57\u8282\u7801\u6587\u4EF6\uFF0C\u624D\u4F1A\u6709\u865A\u65B9\u6CD5\u8868

                                                                      \u56E0\u4E3A\u662F\u865A\u65B9\u6CD5\uFF0C\u7F16\u8BD1\u65F6\uFF0C\u4E0D\u77E5\u9053\u5728\u8FD0\u884C\u65F6\u5177\u4F53\u4F1A\u8C03\u7528\u54EA\u4E2A\u65B9\u6CD5\uFF0C\u53EA\u6709\u5728\u8FD0\u884C\u65F6\u6709\u4E86\u521B\u5EFA\u4E86\u865A\u65B9\u6CD5\u8868\u624D\u77E5\u9053\u3002

                                                                      \u865A\u65B9\u6CD5\u8868\uFF0C\u4EE3\u66FF\u4E86\u6BCF\u6B21\u90FD\u5728\u5E38\u91CF\u6C60\u4E2D\u627E\u7B26\u53F7\u8C03\u7528\uFF0C\u5982\u679C\u627E\u4E0D\u5230\u5C31\u7EE7\u7EED\u4ECE\u4E0B\u5F80\u4E0A\u5BF9\u7236\u7C7B\u8FDB\u884C\u641C\u7D22\u7684\u8FD9\u4E2A\u8FC7\u7A0B

                                                                      \u5B57\u8282\u7801\u6587\u4EF6\u7684\u5E38\u91CF\u6C60\u5BF9\u5E94\u4E8E\u65B9\u6CD5\u533A\u7684\u8FD0\u884C\u65F6\u5E38\u91CF\u6C60\uFF08\u8FDB\u884C\u7C7B\u7684\u52A0\u8F7D\u540E\uFF09\uFF0C\u5E38\u91CF\u6C60\u91CC\u6709\u6240\u6709\u53D8\u91CF\u548C\u65B9\u6CD5\u7684\u7B26\u53F7\u5F15\u7528\uFF0C\u6839\u636E\u7B26\u53F7\u5F15\u7528\u8F6C\u6362\u4E3A\u8C03\u7528\u65B9\u6CD5\u7684\u76F4\u63A5\u5F15\u7528\uFF0C\u8FD9\u53EB\u505A\u52A8\u6001\u94FE\u63A5

                                                                    10. \u865A\u65B9\u6CD5\u8868\u5728\u7C7B\u52A0\u8F7D\u7684\u94FE\u63A5\u9636\u6BB5\u88AB\u521B\u5EFA\u5E76\u5F00\u59CB\u521D\u59CB\u5316

                                                                    \u65B9\u6CD5\u8FD4\u56DE\u5730\u5740

                                                                    1. \u65B9\u6CD5\u8FD4\u56DE\u5730\u5740\u5B58\u50A8\u7684\u662F\u8C03\u7528\u8BE5\u65B9\u6CD5\u7684PC\u5BC4\u5B58\u5668\u7684\u503C\u3002

                                                                      PC\u5BC4\u5B58\u5668\u5B58\u50A8\u7684\u662F\u8981\u6267\u884C\u7684\u4E0B\u4E00\u6761\u5B57\u8282\u7801\u6307\u4EE4\u7684\u6307\u4EE4\u5730\u5740

                                                                      PC\u5BC4\u5B58\u5668\u8FD9\u4E2A\u4E0B\u4E00\u6761\u8981\u6267\u884C\u7684\u6307\u4EE4\u7684\u6307\u4EE4\u5730\u5740\u7ED9\u4E86\u65B9\u6CD5\u8FD4\u56DE\u5730\u5740

                                                                      \u4EA4\u7ED9\u6267\u884C\u5F15\u64CE\uFF0C\u53BB\u6267\u884C\u540E\u7EED\u7684\u64CD\u4F5C

                                                                    2. \u4E00\u4E2A\u65B9\u6CD5\u7684\u7ED3\u675F\u6709\u4E24\u79CD\u65B9\u5F0F

                                                                      • \u6B63\u5E38\u6267\u884C\u5B8C\u6210---\u6B63\u5E38\u9000\u51FA\u51FA\u53E3
                                                                      • \u51FA\u73B0\u672A\u5904\u7406\u7684\u5F02\u5E38\uFF0C\u975E\u6B63\u5E38\u9000\u51FA----\u5F02\u5E38\u9000\u51FA\u51FA\u53E3

                                                                      \u65E0\u8BBA\u54EA\u79CD\u65B9\u5F0F\u9000\u51FA\uFF0C\u5728\u65B9\u6CD5\u9000\u51FA\u540E\u90FD\u8FD4\u56DE\u5230\u8BE5\u65B9\u6CD5\u88AB\u8C03\u7528\u7684\u4F4D\u7F6E\uFF01

                                                                      \u65B9\u6CD5\u9000\u51FA\u540E\uFF0C\u8FD4\u56DE\u5230\u8BE5\u65B9\u6CD5\u88AB\u8C03\u7528\u7684\u4F4D\u7F6E\uFF0C\u9012\u5F52\u5C31\u662F\u8981\u8FD9\u4E48\u6765\u5206\u6790

                                                                      \u65B9\u6CD5\u6B63\u5E38\u9000\u51FA\u65F6\uFF0C\u8C03\u7528\u8005\u7684PC\u8BA1\u6570\u5668\u7684\u503C\u4F5C\u4E3A\u8FD4\u56DE\u5730\u5740\uFF0C\u5373\u8C03\u7528\u8BE5\u65B9\u6CD5\u7684\u6307\u4EE4\u7684\u4E0B\u4E00\u6761\u6307\u4EE4\u7684\u5730\u5740

                                                                      \u901A\u8FC7\u5F02\u5E38\u9000\u51FA\u7684\uFF0C\u8FD4\u56DE\u5730\u5740\u662F\u8981\u901A\u8FC7\u5F02\u5E38\u8868\u6765\u786E\u5B9A\uFF0C\u6808\u5E27\u4E2D\u4E00\u822C\u4E0D\u4F1A\u4FDD\u5B58\u8FD9\u90E8\u5206\u4FE1\u606F

                                                                      \u901A\u8FC7\u5F02\u5E38\u5B8C\u6210\u9000\u51FA\u7684\uFF0C\u4E0D\u4F1A\u7ED9\u4ED6\u7684\u4E0A\u5C42\u8C03\u7528\u8005\u4EA7\u751F\u4EFB\u4F55\u7684\u8FD4\u56DE\u503C

                                                                    3. \u6B63\u5E38\u5B8C\u6210\u51FA\u53E3\u548C\u5F02\u5E38\u5B8C\u6210\u51FA\u53E3\u7684\u533A\u522B\u5728\u4E8E\uFF1A

                                                                      \u901A\u8FC7\u5F02\u5E38\u5B8C\u6210\u51FA\u53E3\u9000\u51FA\u7684\u4E0D\u4F1A\u7ED9\u4ED6\u7684\u4E0A\u5C42\u8C03\u7528\u8005\u4EA7\u751F\u4EFB\u4F55\u7684\u8FD4\u56DE\u503C

                                                                    4. \u4E0D\u8003\u8651\u65B9\u6CD5\u533A\u7684\u60C5\u51B5\u4E0B\uFF0C\u6700\u5927\u7684\u5C31\u662F\u5806\u7A7A\u95F4

                                                                    5. \u65B9\u6CD5\u8FD4\u56DE\u5730\u5740\u76F8\u5F53\u4E8E\u662F\u7ED9\u4E0A\u5C42\u8C03\u7528\u8005\u4EA7\u751F\u7684\u4E00\u4E2A\u8FD4\u56DE\u5730\u5740\uFF0C\u662F\u8C03\u7528\u8005PC\u5BC4\u5B58\u5668\u4FDD\u5B58\u7684\u4E0B\u4E00\u6761\u6307\u4EE4\u7684\u6307\u4EE4\u5730\u5740\uFF0C\u662F\u7ED9\u6267\u884C\u5F15\u64CE\u6267\u884C\u7684\uFF0C\u76F8\u5F53\u4E8E\u662F\u4E0A\u5C42\u8C03\u7528\u8005\u8C03\u7528\u5B8C\u4E00\u4E2A\u65B9\u6CD5\u4E86\uFF0C\u5F97\u5230\u4E00\u4E2A\u8FD4\u56DE\u5730\u5740\u4E86\uFF0C\u8BE5\u63A5\u7740\u5F80\u4E0B\u6267\u884C\u4E86

                                                                    6. \u4F55\u4E3A\u7EBF\u7A0B\u5B89\u5168\uFF1F

                                                                      \u5982\u679C\u53EA\u6709\u4E00\u4E2A\u7EBF\u7A0B\u624D\u53EF\u4EE5\u64CD\u4F5C\u6B64\u6570\u636E\uFF0C\u5219\u5FC5\u662F\u7EBF\u7A0B\u5B89\u5168\u7684

                                                                      \u5982\u679C\u6709\u591A\u4E2A\u7EBF\u7A0B\u64CD\u4F5C\u6B64\u6570\u636E\uFF0C\u5219\u6B64\u6570\u636E\u662F\u5171\u4EAB\u6570\u636E\uFF0C\u5982\u679C\u4E0D\u8003\u8651\u540C\u6B65\u673A\u5236\u7684\u8BDD\uFF0C\u4F1A\u5B58\u5728\u7EBF\u7A0B\u5B89\u5168\u95EE\u9898

                                                                    7. \u65B9\u6CD5\u4E2D\u5B9A\u4E49\u7684\u5C40\u90E8\u53D8\u91CF\u662F\u5426\u662F\u7EBF\u7A0B\u5B89\u5168\u7684\uFF1F

                                                                      \u65B9\u6CD5\u4E2D\u7684\u5C40\u90E8\u53D8\u91CFr\u9897\u662F\u5728\u5185\u90E8\u4EA7\u751F\u5185\u90E8\u6D88\u4EA1\u7684\uFF0C\u5C31\u662F\u7EBF\u7A0B\u5B89\u5168\u7684\uFF0C

                                                                      \u4E0D\u662F\u5185\u90E8\u4EA7\u751F\u7684\uFF0C\u6216\u8005\u662F\u5185\u90E8\u4EA7\u751F\u7684\uFF0C\u4F46\u662F\u8FD4\u56DE\u5230\u5916\u9762\u4E86\uFF0C\u5C31\u4E0D\u662F\u7EBF\u7A0B\u5B89\u5168\u7684\u3002

                                                                    \u672C\u5730\u65B9\u6CD5\u63A5\u53E3

                                                                    1. \u4EC0\u4E48\u662F\u672C\u5730\u65B9\u6CD5\uFF1F

                                                                      \u5C31\u662F\u7528native\u6765\u4FEE\u9970\u7684Java\u65B9\u6CD5\u5C31\u662F\u672C\u5730\u65B9\u6CD5

                                                                      \u6CA1\u6709\u65B9\u6CD5\u4F53\uFF01\u4F46\u4E0D\u662F\u62BD\u8C61\u65B9\u6CD5\uFF01\u6CA1\u6709\u65B9\u6CD5\u4F53\u662F\u56E0\u4E3A\u65B9\u6CD5\u4F53\u7531C\u3001C++\u5B9E\u73B0

                                                                      \u672C\u5730\u65B9\u6CD5\u5C31\u662F\u4E00\u4E2AJava\u8C03\u7528\u975EJava\u4EE3\u7801\u7684\u63A5\u53E3

                                                                    2. \u672C\u5730\u65B9\u6CD5\u63A5\u53E3\u7684\u4F5C\u7528\u5C31\u662F\u878D\u5408\u4E0D\u540C\u7684\u7F16\u7A0B\u8BED\u8A00\u4E3AJava\u6240\u7528\uFF0C\u521D\u8877\u65F6\u878D\u5408C\\C++\u7A0B\u5E8F

                                                                      \u5C31\u662F\u8BF4\u65B9\u6CD5\u4F53\u7684\u5177\u4F53\u5B9E\u73B0\u4E0D\u7531Java\u6765\u5B9E\u73B0\uFF0C\u5C31\u7528native\u6807\u8BC6\uFF0C\u5C31\u662F\u672C\u5730\u65B9\u6CD5

                                                                    3. \u4E3A\u4EC0\u4E48\u8981\u4F7F\u7528\u672C\u5730\u65B9\u6CD5

                                                                      1. \u6709\u65F6Java\u5E94\u7528\u9700\u8981\u4E0EJava\u5916\u9762\u7684\u73AF\u5883\u4EA4\u4E92\u3002\u8FD9\u662F\u672C\u5730\u65B9\u6CD5\u5B58\u5728\u7684\u4E3B\u8981\u539F\u56E0

                                                                        \u5982\u679C\u6211\u4EEC\u5728\u67D0\u4E9B\u9700\u8981\u5F88\u5728\u4E4E\u6267\u884C\u6548\u7387\u7684\u573A\u666F\uFF0C\u8981\u8003\u8651\u8C03\u7528C\u548CC++

                                                                      2. \u867D\u7136Java\u4EE3\u7801\u8FD0\u884C\u5728jvm\u4E0A\uFF0C\u4F46\u662Fjvm\u5E76\u4E0D\u662F\u771F\u5B9E\u7684\u64CD\u4F5C\u7CFB\u7EDF\uFF0C\u662F\u865A\u62DF\u673A\uFF0C\u5B83\u8981\u4F9D\u8D56\u771F\u5B9E\u7684\u64CD\u4F5C\u7CFB\u7EDF\uFF0C\u64CD\u4F5C\u7CFB\u7EDF\u5C42\u9762\uFF0C\u5C31\u8981\u4F9D\u8D56C\u5B9E\u73B0\uFF0CJVM\u4E00\u4E9B\u90E8\u5206\u5C31\u662F\u7528C\u5199\u7684

                                                                        \u5F15\u5BFC\u7C7B\u52A0\u8F7D\u5668\u5C31\u662FC\\C++\u7F16\u5199\u7684\uFF0C\u5C5E\u4E8EJVM\u7684\u4E00\u90E8\u5206

                                                                    4. \u7528native\u6807\u8BC6\u6765\u8868\u793A\u5BF9\u672C\u5730\u65B9\u6CD5\u7684\u8C03\u7528

                                                                    \u672C\u5730\u65B9\u6CD5\u6808

                                                                    1. Java\u865A\u62DF\u673A\u6808\u7BA1\u7406Java\u65B9\u6CD5\u7684\u8C03\u7528\uFF0C\u672C\u5730\u65B9\u6CD5\u6808\u7BA1\u7406\u672C\u5730\u65B9\u6CD5\u7684\u8C03\u7528

                                                                      \u865A\u62DF\u673A\u6808\u7684\u5B58\u50A8\u5355\u4F4D\u662F\u6808\u5E27\uFF0C\u4E00\u4E2A\u6808\u5E27\u5C31\u5BF9\u5E94\u4E8E\u4E00\u4E2A\u65B9\u6CD5\uFF0C\u91CC\u9762\u6709\u5C40\u90E8\u53D8\u91CF\u8868\u3001\u64CD\u4F5C\u6570\u6808\u3001\u52A8\u6001\u94FE\u63A5\u3001\u65B9\u6CD5\u8FD4\u56DE\u5730\u5740

                                                                      \u4E00\u4E2A\u6808\u5E27\u5C31\u5BF9\u5E94\u4E8E\u4E00\u4E2A\u65B9\u6CD5\u7684\u8C03\u7528

                                                                    2. \u6808\u7BA1\u8FD0\u884C\uFF0C\u5806\u7BA1\u5B58\u50A8

                                                                    3. \u672C\u5730\u65B9\u6CD5\u6808\u548C\u865A\u62DF\u673A\u6808\u3001PC\u90FD\u662F\u7EBF\u7A0B\u79C1\u6709\u7684\u3002\u5806\u548C\u65B9\u6CD5\u533A\u662F\u7EBF\u7A0B\u516C\u7528\u7684\u3002

                                                                    4. \u672C\u5730\u65B9\u6CD5\u6808\u548C\u865A\u62DF\u673A\u6808\u4E00\u6837\uFF0C\u5141\u8BB8\u88AB\u5B9E\u73B0\u6210\u56FA\u5B9A\u6216\u8005\u662F\u53EF\u52A8\u6001\u6269\u5C55\u7684\u5185\u5B58\u5927\u5C0F

                                                                      image-20210810201758436

                                                                      \u6808\u5C42\u9762\uFF0C\u7EBF\u7A0B\u8BF7\u6C42\u5206\u914D\u7684\u6808\u5BB9\u91CF\u8D85\u8FC7\u4E86\u6808\u5141\u8BB8\u7684\u6700\u5927\u5BB9\u91CF\uFF0C\u662FStackOverflowError

                                                                      \u5185\u5B58\u5C42\u9762\u4E0D\u591F\u4E86\uFF0C\u662FoutOfMemoryError

                                                                    5. Hotspot JVM \u6709\u672C\u5730\u65B9\u6CD5\u6808\uFF0C\u4F46\u662F\u4E0D\u662F\u6240\u6709\u7684Java\u865A\u62DF\u673A\u90FD\u6709\u672C\u5730\u65B9\u6CD5\u6808\u3002

                                                                      Hotspot JVM\u5C06\u672C\u5730\u65B9\u6CD5\u6808\u548C\u865A\u62DF\u673A\u6808\u5408\u4E8C\u4E3A\u4E00

                                                                    6. image-20210810202350855

                                                                    \u5806

                                                                    \u5806\u7684\u6838\u5FC3\u6982\u8FF0

                                                                    1. \u5728\u6574\u4E2A\u8FD0\u884C\u65F6\u6570\u636E\u533A\uFF0C\u4E0D\u8003\u8651\u65B9\u6CD5\u533A\uFF0C\u5806\u662F\u6700\u5927\u7684\u7A7A\u95F4\uFF0C\u56E0\u4E3A\u65B9\u6CD5\u533A\u53EF\u4EE5\u8BBE\u7F6E\uFF0C\u53EF\u4EE5\u901A\u8FC7\u672C\u5730\u7A7A\u95F4\u5B9E\u73B0

                                                                    2. \u5806\u7A7A\u95F4\u4E3B\u8981\u7528\u6765\u5B58\u50A8\u5BF9\u8C61\u5B9E\u4F8B\u7684

                                                                    3. \u65B9\u6CD5\u533A\u3001\u5806\u5BF9\u4E8E\u7EBF\u7A0B\u6765\u8BF4\u662F\u5171\u7528\u7684\uFF0C\u4F46\u662F\u5BF9\u4E8E\u4E00\u4E2A\u8FDB\u7A0B\u6765\u8BF4\uFF0C\u662F\u552F\u4E00\u7684\u3002

                                                                      \u4E00\u4E2A\u8FDB\u7A0B\u5BF9\u5E94\u4E8E\u4E00\u4E2AJVM\u5B9E\u4F8B\uFF0C**\u4E00\u4E2AJVM\u5B9E\u4F8B\u5C31\u6709\u4E00\u4E2A\u8FD0\u884C\u65F6\u6570\u636E\u533A\u3002**\u6240\u4EE5\u4E00\u4E2AJVM\u5B9E\u4F8B\u5C31\u5BF9\u5E94\u4E8E\u4E00\u4E2A\u5806\u5185\u5B58

                                                                      Runtime\u662F\u5355\u4F8B\u7684\uFF0C\u662F\u997F\u6C49\u5F0F\u521B\u5EFA\u7684\u3002

                                                                      Runtime\u91CC\u9762\u5C31\u6709\u4E00\u4E2A\u5806\u3001\u4E00\u4E2A\u65B9\u6CD5\u533A\u3002\u6240\u4EE5\u5BF9\u4E8E\u4E00\u4E2A\u8FDB\u7A0B\u6765\u8BF4\uFF0C\u5806\u548C\u65B9\u6CD5\u533A\u662F\u552F\u4E00\u7684\u3002

                                                                      \u4F46\u662F\u4E00\u4E2A\u8FDB\u7A0B\u6709\u591A\u4E2A\u7EBF\u7A0B\uFF0C\u6240\u4EE5\u591A\u4E2A\u7EBF\u7A0B\u8981\u5171\u4EAB\u8FD9\u4E2A\u8FDB\u7A0B\u7684\u5806\u7A7A\u95F4\u548C\u65B9\u6CD5\u533A

                                                                    4. \u6BCF\u4E00\u4E2A\u7EBF\u7A0B\u5404\u81EA\u62E5\u6709\u7A0B\u5E8F\u8BA1\u6570\u5668\u3001\u672C\u5730\u65B9\u6CD5\u6808\u3001\u865A\u62DF\u673A\u6808\u3002\u5171\u7528\u4ED6\u4EEC\u6240\u5C5E\u7684\u8FDB\u7A0B\u7684\u65B9\u6CD5\u533A\u548C\u5806\u3002

                                                                    5. \u5171\u4EAB\u5C31\u6D89\u53CA\u5230\u7EBF\u7A0B\u5B89\u5168\u95EE\u9898

                                                                    6. \u4E00\u4E2Ajvm\u5B9E\u4F8B\u53EA\u5B58\u5728\u4E00\u4E2A\u5806\u7A7A\u95F4\uFF0C\u5806\u662FJava\u5185\u5B58\u7BA1\u7406\u7684\u6838\u5FC3\u533A\u57DF

                                                                    7. Java\u5806\u7A7A\u95F4\u5728JVM\u542F\u52A8\u7684\u65F6\u5019\u88AB\u521B\u5EFA\u3002

                                                                      JVM\u662F\u4EC0\u4E48\u65F6\u5019\u542F\u52A8\uFF1F

                                                                      JVM\u662F\u5728Java\u7A0B\u5E8F\u8FD0\u884C\u65F6\uFF0CJVM\u5B9E\u4F8B\u901A\u8FC7\u5F15\u5BFC\u7C7B\u52A0\u8F7D\u5668\u521B\u5EFA\uFF0C\u5373\u542F\u52A8

                                                                      \u5806\u7A7A\u95F4\u5728jvm\u542F\u52A8\u65F6\u5019\u521B\u5EFA\uFF0C\u5176\u7A7A\u95F4\u5927\u5C0F\u4E5F\u5C31\u786E\u5B9A\u4E86\u3002

                                                                    8. \u5806\u662F\u5783\u573E\u56DE\u6536\u3001\u6027\u80FD\u8C03\u4F18\u7684\u91CD\u8981\u533A\u57DF

                                                                    9. \u5806\u5185\u5B58\u7684\u5927\u5C0F\u662F\u53EF\u4EE5\u8C03\u8282\u7684\u3002

                                                                    10. -Xms -Xmx\u5206\u522B\u8BBE\u7F6E\u5806\u7684\u521D\u59CB\u5927\u5C0F\u548C\u6700\u5927\u5927\u5C0F

                                                                    11. \u901A\u8FC7\u4E24\u4E2Amain\u65B9\u6CD5\u5165\u53E3\u8DD1\u4E24\u4EFDJava\u4EE3\u7801\uFF0C\u5C31\u662F\u542F\u52A8\u4E24\u4E2A\u8FDB\u7A0B\uFF01\u4E00\u4E2A\u8FDB\u7A0B\u91CC\u6709\u591A\u4E2A\u7EBF\u7A0B\uFF0Cmain\u662F\u4E3B\u7EBF\u7A0B\uFF0C\u8FD8\u6709\u5783\u573E\u56DE\u6536\u7EBF\u7A0B\uFF0C\u8FD8\u6709\u5F02\u5E38\u5904\u7406\u7EBF\u7A0B\uFF0C\u8FD8\u53EF\u4EE5\u81EA\u5B9A\u4E49\u7EBF\u7A0B\uFF01

                                                                      \u800C\u4E00\u4EFDJava\u7A0B\u5E8F\uFF08\u53EA\u6709\u4E00\u4E2Amain\u65B9\u6CD5\u5165\u53E3\uFF09\u89C6\u4E3A\u4E00\u4E2A\u8FDB\u7A0B\uFF01\u8DD1\u4E24\u4E2A\u5C31\u662F\u4E24\u4E2A\u8FDB\u7A0B\uFF01

                                                                    12. \u4E00\u4E2A\u8FDB\u7A0B\u5BF9\u5E94\u4E8E\u4E00\u4E2AJVM\u5B9E\u4F8B\uFF0C\u90A3\u4E48\u5BF9\u5E94\u4E8E\u4E00\u4E2A\u8FD0\u884C\u65F6\u6570\u636E\u533A\uFF0C\u5BF9\u5E94\u4E8E\u4E00\u4E2A\u5806\u7A7A\u95F4\u3001\u65B9\u6CD5\u533A

                                                                    13. Java\u865A\u62DF\u673A\u89C4\u8303\u89C4\u5B9A\uFF0C\u5806\u53EF\u4EE5\u5904\u4E8E\u7269\u7406\u4E0A\u4E0D\u8FDE\u7EED\u7684\u5185\u5B58\u7A7A\u95F4\u5185\uFF0C\u4F46\u5728\u903B\u8F91\u4E0A\u5B83\u5E94\u8BE5\u89C6\u4E3A\u8FDE\u7EED\u7684\u3002

                                                                      \u7269\u7406\u5185\u5B58\u548C\u903B\u8F91\u5185\u5B58\u53EF\u4EE5\u5EFA\u7ACB\u4E00\u4E2A\u6620\u5C04\u8868\uFF0C\u53EF\u4EE5\u5BF9\u7269\u7406\u4E0A\u4E0D\u8FDE\u7EED\u7684\u5185\u5B58\u5728\u903B\u8F91\u4E0A\u770B\u4F5C\u662F\u8FDE\u7EED\u7684\u3002

                                                                    14. \u6240\u6709\u7684\u7EBF\u7A0B\u5171\u4EABJava\u5806\uFF0C\u5728\u8FD9\u91CC\u8FD8\u53EF\u4EE5\u5212\u5206\u7EBF\u7A0B\u79C1\u6709\u7684\u7F13\u51B2\u533A

                                                                      \u4E00\u4E2A\u8FDB\u7A0B\u4E2D\u7684\u7EBF\u7A0B\u5171\u4EAB\u8FD9\u4E2A\u5806\u7684\u6240\u6709\u7A7A\u95F4\u5417\uFF1F

                                                                      \u4E0D\u662F\u7684\uFF0C\u5806\u4E2D\u8FD8\u6709\u7EBF\u7A0B\u79C1\u6709\u7684\u7F13\u51B2\u533A

                                                                    15. \u6240\u6709\u7684\u5BF9\u8C61\u5B9E\u4F8B\u4EE5\u53CA\u6570\u7EC4\u90FD\u5E94\u8BE5\u5728\u8FD0\u884C\u65F6\u5206\u914D\u5728\u5806\u4E0A

                                                                      \u51E0\u4E4E\u6240\u6709\u7684\u5BF9\u8C61\u5B9E\u4F8B\u90FD\u5728\u8FD9\u91CC\u5206\u914D\u5185\u5B58---almost

                                                                      \u4E3A\u4EC0\u4E48\u662F\u51E0\u4E4E\u5462\uFF1F\u56E0\u4E3A\u8FD8\u6709\u53EF\u80FD\u5728\u6808\u4E0A\u5206\u914D

                                                                    16. \u6570\u7EC4\u548C\u5BF9\u8C61\u53EF\u80FD\u6C38\u8FDC\u90FD\u4E0D\u4F1A\u5B58\u50A8\u5728\u6808\u4E0A\uFF0C\u56E0\u4E3A\u6808\u5E27\u4E2D\u4FDD\u5B58\u5F15\u7528\uFF08\u6808\u5E27\u7684\u5C40\u90E8\u53D8\u91CF\u8868\u91CC\u4FDD\u5B58\u7684\u57FA\u672C\u6570\u636E\u7C7B\u578B\u662F\u6570\u5B57\u3001\u5BF9\u8C61\u5F15\u7528\u3001\u8FD4\u56DE\u503C\u7C7B\u578B\u4E5F\u53EF\u4EE5\u7528\u6570\u503C\u6765\u8868\u793A\uFF0C\u6240\u4EE5\u5C40\u90E8\u53D8\u91CF\u662F\u6570\u5B57\u6570\u7EC4\uFF09\uFF0C\u8FD9\u4E2A\u5F15\u7528\u6307\u5411\u5BF9\u8C61\u6216\u8005\u6570\u7EC4\u5728\u5806\u4E2D\u7684\u4F4D\u7F6E

                                                                    17. \u5728\u65B9\u6CD5\u7ED3\u675F\u540E\uFF0C\u5806\u4E2D\u7684\u5BF9\u8C61\u4E0D\u4F1A\u9A6C\u4E0A\u88AB\u79FB\u9664\uFF0C\u4EC5\u4EC5\u5728\u5783\u573E\u56DE\u6536\u7684\u65F6\u5019\u624D\u4F1A\u88AB\u79FB\u9664

                                                                      \u6BD4\u5982\u67D0\u4E2A\u65B9\u6CD5\u6267\u884C\u5B8C\uFF0C\u8C03\u7528\u5B8C\u4E4B\u540E\uFF0C\u6808\u5E27\u8981\u51FA\u6808\uFF0C\u90A3\u4E48\u6808\u5E27\u4E2D\u7684\u5C40\u90E8\u53D8\u91CF\u8868\u4E2D\u7684\u5BF9\u8C61\u5F15\u7528\uFF0C\u6307\u5411\u5806\u7A7A\u95F4\u4E2D\u7684\u201C\u6307\u9488\u201D\u5C31\u6CA1\u6709\u4E86\uFF0C\u6307\u9488\u6CA1\u6709\u4E86\u4E4B\u540E\uFF0C\u5806\u7A7A\u95F4\u4E2D\u7684\u5BF9\u8C61\u5B9E\u4F8B\u5C31\u88AB\u8BA4\u4E3A\u662F\u5783\u573E\u4E86\u3002

                                                                      \u4F46\u662F\u8BA4\u4E3A\u662F\u5783\u573E\u7684\u8FD9\u4E2A\u8FC7\u7A0B\uFF0C\u8981\u7B49\u5230GC\u7684\u65F6\u5019\u5224\u65AD\uFF0C\u6765\u786E\u5B9A\u5806\u7A7A\u95F4\u7684\u5BF9\u8C61\u5B9E\u4F8B\u6CA1\u6709\u5BF9\u8C61\u5F15\u7528\u6307\u5411\u4E86\u3002

                                                                      \u4E5F\u5C31\u662F\u6808\u5E27\u51FA\u6808\uFF0C\u6CA1\u6709\u6307\u9488\u6307\u5411\u5806\u7A7A\u95F4\uFF0C\u5BF9\u8C61\u5B9E\u4F8B\u53D8\u6210\u5783\u573E\uFF0C\u5783\u573E\u56DE\u6536\u673A\u5236\u5224\u65AD\uFF0C\u56DE\u6536\u6389\u5BF9\u8C61\u5B9E\u4F8B

                                                                      \u6808\u5E27\u51FA\u6808\u4E4B\u540E\uFF0C\u5BF9\u8C61\u5B9E\u4F8B\u4E0D\u662F\u7ACB\u5373\u88AB\u5783\u573E\u56DE\u6536\u56DE\u6536\u6389\u7684\u3002\u4E0D\u662F\u7ACB\u9A6C\u56DE\u6536\u7684\uFF01\u4E0D\u80FD\u8001\u662F\u6267\u884C\u5783\u573E\u56DE\u6536\uFF0CGC\u9891\u7387\u9AD8\uFF0C\u5C31\u5F71\u54CD\u7528\u6237\u7EBF\u7A0B\u6267\u884C

                                                                      \u5783\u573E\u56DE\u6536\u7EBF\u7A0B\u6267\u884C\u7684\u65F6\u5019\uFF0C\u9700\u8981\u7528\u6237\u7EBF\u7A0B\u505C\u6B62\u3002

                                                                      \u6240\u4EE5\u6211\u4EEC\u4F1A\u4F18\u5316\u4F7F\u5F97\u5806\u7A7A\u95F4\u5927\u4E00\u70B9\uFF0C\u51CF\u5C11GC\u7684\u6B21\u6570

                                                                      \u6240\u4EE5\u5E76\u4E0D\u662F\u6808\u5E27\u51FA\u6808\uFF0C\u5C31\u7ACB\u5373\u56DE\u6536\u6389\u5806\u7A7A\u95F4\u7684\u5BF9\u8C61\u5B9E\u4F8B

                                                                    \u5185\u5B58\u7EC6\u5206

                                                                    1. jdk7\u53CA\u4EE5\u524D\uFF0C\u5806\u5185\u5B58\u903B\u8F91\u4E0A\u5206\u4E3A\u4E09\u90E8\u5206

                                                                      • \u65B0\u751F\u533A

                                                                      • \u517B\u8001\u533A

                                                                      • \u6C38\u4E45\u533A\uFF08\u6C38\u4E45\u4EE3\uFF09

                                                                      jdk8\u53CA\u4EE5\u540E\uFF0C\u5806\u5185\u5B58\u903B\u8F91\u4E0A\u5206\u4E3A\u4E09\u90E8\u5206

                                                                      • \u65B0\u751F\u533A
                                                                      • \u517B\u8001\u533A
                                                                      • \u5143\u7A7A\u95F4

                                                                      \u867D\u7136\u903B\u8F91\u4E0A\u5206\u4E3A\u4E09\u90E8\u5206\uFF0C\u4F46\u662F\u5B9E\u9645\u4E0A\u5806\u7A7A\u95F4\u4E0D\u5305\u62EC\u6C38\u4E45\u4EE3

                                                                      \u6C38\u4E45\u4EE3\u548C\u5143\u7A7A\u95F4\u90FD\u770B\u4F5C\u662F\u65B9\u6CD5\u533A\u5177\u4F53\u7684\u843D\u5730\u5B9E\u73B0\u3002

                                                                      \u6240\u4EE5\u8FD9\u4E00\u7AE0\u5806\u7A7A\u95F4\uFF0C\u4E3B\u8981\u6D89\u53CA\u5230\u65B0\u751F\u533A\u548C\u517B\u8001\u533A

                                                                      \u5806\u7A7A\u95F4\u903B\u8F91\u4E0A\u6709\u4E09\u4E2A\u533A\uFF0C\u5B9E\u9645\u4E0A\u5143\u7A7A\u95F4\u6216\u8005\u6C38\u4E45\u4EE3\u662F\u65B9\u6CD5\u533A\uFF0C\u5B9E\u9645\u4E0A\u5806\u7A7A\u95F4\u76EE\u524D\u6765\u8BF4\u53EA\u6709\u65B0\u751F\u533A\u548C\u517B\u8001\u533A

                                                                    2. \u65B0\u751F\u533A\u5177\u4F53\u53C8\u5206\u4E3A\uFF1A

                                                                      \u4F0A\u7538\u56ED\u533A

                                                                      survivor\u96F6\u533A\uFF08from\u533A\uFF09

                                                                      survivor\u4E00\u533A\uFF08to\u533A\uFF09

                                                                    3. -Xms -Xmx\u5206\u522B\u8BBE\u7F6E\u5806\u7684\u521D\u59CB\u5927\u5C0F\u548C\u6700\u5927\u5927\u5C0F\uFF0C\u53EA\u7BA1\u65B0\u751F\u4EE3\u3001\u517B\u8001\u4EE3\u4E24\u4E2A\u533A\u3002

                                                                    \u8BBE\u7F6E\u5806\u7A7A\u95F4\u5185\u5B58\u5927\u5C0F\u4E0EOOM

                                                                    1. \u4E00\u65E6\u5806\u533A\u4E2D\u7684\u5185\u5B58\u5927\u5C0F\u8D85\u8FC7\u201C-Xmx\u201D\u6240\u6307\u5B9A\u7684\u6700\u5927\u5185\u5B58\u65F6\uFF0C\u5C06\u4F1A\u629B\u51FAOutOfMemoryError\u5F02\u5E38

                                                                      \u6808\u6EA2\u51FA\u662F\u7EBF\u7A0B\u7533\u8BF7\u7684\u6808\u5BB9\u91CF\u5927\u5C0F\u8D85\u8FC7\u4E86\u6808\u7684\u5BB9\u91CF

                                                                      \u800COOM\u662F\u5185\u5B58\u4E0D\u591F\u4E86\u3002

                                                                      \u6BD4\u5982\u672C\u5730\u65B9\u6CD5\u6808\u5728\u6269\u5C55\u7684\u65F6\u5019\u65E0\u6CD5\u7533\u8BF7\u5230\u8DB3\u591F\u7684\u5185\u5B58\uFF0C\u6216\u8005\u5728\u521B\u5EFA\u6808\u7684\u65F6\u5019\uFF0C\u56E0\u4E3A\u5185\u5B58\u4E0D\u591F\uFF0C\u4E0D\u80FD\u521B\u5EFA\u672C\u5730\u65B9\u6CD5\u6808\uFF0C\u4F1A\u62A5OOM

                                                                      \u603B\u4E4B\uFF0C\u6808\u7A7A\u95F4\u6EA2\u51FA\u4E86\uFF0C\u62A5\u6808\u6EA2\u51FA\uFF0C\u5185\u5B58\u4E0D\u591F\u4E86\uFF0C\u62A5OOM

                                                                    2. -Xms\u7528\u6765\u8BBE\u7F6E\u5806\u7A7A\u95F4\uFF08\u5E74\u8F7B\u4EE3\u3001\u8001\u5E74\u4EE3\uFF09\u7684\u521D\u59CB\u5185\u5B58\u5927\u5C0F

                                                                      -X \u662Fjvm\u7684\u8FD0\u884C\u53C2\u6570

                                                                      ms \u662Fmemory start

                                                                      -Xmx \u7528\u6765\u8BBE\u7F6E\u5806\u7A7A\u95F4\uFF08\u5E74\u8F7B\u4EE3\u3001\u8001\u5E74\u4EE3\uFF09\u7684\u6700\u5927\u5185\u5B58\u5927\u5C0F

                                                                    3. \u5F00\u53D1\u4E2D\uFF0C\u5EFA\u8BAE\u5C06-Xms\u548C-Xmx\u4E24\u4E2A\u53C2\u6570\u914D\u7F6E\u76F8\u540C\u7684\u503C\uFF0C

                                                                      \u5806\u7A7A\u95F4\u9891\u7E41\u5730\u6269\u5BB9\u548C\u91CA\u653E\u4F1A\u9020\u6210\u7CFB\u7EDF\u7684\u4E0D\u5FC5\u8981\u7684\u538B\u529B

                                                                      \u5176\u76EE\u7684\u662F\u4E3A\u4E86\u5728Java\u5783\u573E\u56DE\u6536\u65F6\uFF0C\u907F\u514D\u5728GC\u7684\u65F6\u5019\u53BB\u8C03\u6574\u5806\u5185\u5B58\u7684\u5927\u5C0F\uFF0C\u9020\u6210\u7CFB\u7EDF\u4E0D\u5FC5\u8981\u7684\u538B\u529B

                                                                    4. \u5806\u7A7A\u95F4\u7684\u65B0\u751F\u4EE3\u5206\u4E3A\u4F0A\u7538\u56ED\u533A\uFF0Csurvivor 0\u533A\u548Csurvivor 1\u533A

                                                                      \u5982\u679C\u6211\u4EEC\u8981\u5B58\u50A8\u5BF9\u8C61\u7684\u8BDD\uFF0C\u4F0A\u7538\u56ED\u533A\u53EF\u4EE5\u5B58\u50A8\uFF0Csurvivor 0\u533A\u548Csurvivor1\u533A\u53EA\u80FD\u9009\u62E9\u4E00\u4E2A\u5B58\u50A8\uFF0C\u6D89\u53CA\u5230\u5783\u573E\u56DE\u6536\u7684\u590D\u5236\u7B97\u6CD5\uFF0Csurvivor 0\u533A\u548Csurvivor1\u533A\u59CB\u7EC8\u6709\u4E00\u4E2A\u533A\u662F\u7A7A\u7684

                                                                    5. \u67E5\u770B\u5806\u7A7A\u95F4\u8BBE\u7F6E\u7684\u53C2\u6570

                                                                      image-20210810224237483

                                                                    6. OOM\u4E5F\u6709\u591A\u79CD\u60C5\u51B5\uFF0CJava heap space\u53EA\u662F\u5176\u4E2D\u4E00\u79CD\uFF0C\u8D85\u51FA\u4E86\u5806\u7A7A\u95F4\u5185\u5B58\u8303\u56F4

                                                                    7. new\u7684\u5BF9\u8C61\u5B9E\u4F8B\u4F1A\u88AB\u5206\u914D\u5230\u5806\u7A7A\u95F4\u4E2D\uFF0C\u4F0A\u7538\u56ED\u533A\u53EF\u4EE5\u5206\u914D\u7A7A\u95F4\u5B58\u50A8\u5BF9\u8C61\u5B9E\u4F8B\uFF0C\u5E78\u5B58\u8005\u533A\u4E00\u5B9A\u6709\u4E00\u4E2A\u662F\u7A7A\u7684

                                                                      old\u533A\u6EE1\u4E86\u4E4B\u540E\uFF0C\u5C31\u4F1A\u62A5OOM\u4E86\u3002

                                                                      image-20210810225009965

                                                                    \u5E74\u8F7B\u4EE3\u4E0E\u8001\u5E74\u4EE3

                                                                    1. \u5B58\u50A8\u5728JVM\u4E2D\u7684Java\u5BF9\u8C61\u53EF\u4EE5\u88AB\u5212\u5206\u4E3A\u4E24\u7C7B\uFF1A

                                                                      \u4E00\u7C7B\u662F\u751F\u547D\u5468\u671F\u8F83\u77ED\u7684\u77AC\u65F6\u5BF9\u8C61\uFF0C\u8FD9\u7C7B\u5BF9\u8C61\u7684\u521B\u5EFA\u548C\u6D88\u4EA1\u90FD\u975E\u5E38\u8FC5\u901F

                                                                      \u53E6\u5916\u4E00\u7C7B\u5BF9\u8C61\u7684\u751F\u547D\u5468\u671F\u5F88\u957F\uFF0C\u5728\u67D0\u4E9B\u6781\u7AEF\u60C5\u51B5\u4E0B\u8FD8\u80FD\u591F\u4E0EJVM\u7684\u751F\u547D\u5468\u671F\u4FDD\u6301\u4E00\u81F4

                                                                    2. \u6BCF\u6B21\u8FDB\u884CGC\u7684\u65F6\u5019\uFF0C\u751F\u547D\u5468\u671F\u8F83\u77ED\u7684\u5BF9\u8C61\uFF0C\u4F1A\u88AB\u56DE\u6536

                                                                      \u751F\u547D\u5468\u671F\u5F88\u957F\u7684\u5BF9\u8C61\uFF0C\u5C31\u653E\u5728\u8001\u5E74\u4EE3\uFF0C\u8001\u5E74\u4EE3\u4E0D\u4F1A\u7ECF\u5E38\u8FDB\u884C\u662F\u5426\u9700\u8981\u8FDB\u884C\u5783\u573E\u56DE\u6536\u7684\u5224\u65AD

                                                                    3. \u5E74\u8F7B\u4EE3

                                                                      • Eden
                                                                      • Survivor 0 \uFF08from\uFF09
                                                                      • Survivor 1 \uFF08to\uFF09

                                                                      \u8001\u5E74\u4EE3

                                                                    4. \u5BF9\u8C61\u6700\u5148\u521B\u5EFA\u7684\u4E00\u4E2A\u4F4D\u7F6E\uFF0C\u5C31\u53EB\u4F0A\u7538\u56ED

                                                                      \u4F0A\u7538\u56ED\u4E2D\u7684Java\u5BF9\u8C61\uFF0C\u5728GC\u7684\u65F6\u5019\u6709\u7684\u4F1A\u88AB\u56DE\u6536\u6389\uFF0C\u6709\u7684\u8FD8\u5B58\u6D3B\u4E86\uFF0C\u5C31\u653E\u5728\u5E78\u5B58\u80050\u533A\u62161\u533A

                                                                    5. -XX:NewRatio\u8BBE\u7F6E\u8001\u5E74\u4EE3\u4E0E\u65B0\u751F\u4EE3\u7684\u6BD4\u4F8B\uFF0C\u9ED8\u8BA4\u503C\u662F2

                                                                      \u4E00\u822C\u60C5\u51B5\u4E0B\u4E0D\u4F1A\u8C03\u8FD9\u4E2A\u53C2\u6570

                                                                      \u5982\u679C\u660E\u786E\u8FD9\u4E2A\u7A0B\u5E8F\u4E2D\u6709\u5F88\u591A\u5BF9\u8C61\u751F\u547D\u5468\u671F\u90FD\u5F88\u957F\uFF0C\u90A3\u4E48\u628A\u8001\u5E74\u4EE3\u7684\u6BD4\u4F8B\u8C03\u5F97\u66F4\u5927\u4E9B

                                                                    6. -XX:-UseAdaptiveSizePolicy \u5173\u95ED\u81EA\u9002\u5E94\u7684\u5185\u5B58\u5206\u914D\u7B56\u7565

                                                                      -XX:SurvivorRatio:\u8BBE\u7F6E\u65B0\u751F\u4EE3\u4E2DEden\u4E0ESurvivor\u533A\u7684\u6BD4\u4F8B

                                                                      -Xmn:\u8BBE\u7F6E\u65B0\u751F\u4EE3\u7684\u7A7A\u95F4\u7684\u5927\u5C0F\uFF08\u4E00\u822C\u4E0D\u8BBE\u7F6E\uFF09

                                                                    7. \u51E0\u4E4E\u6240\u6709\u7684Java\u5BF9\u8C61\u90FD\u662F\u5728Eden\u533A\u88ABnew\u51FA\u6765\u7684

                                                                      \u7EDD\u5927\u90E8\u5206\u7684Java\u5BF9\u8C61\u7684\u9500\u6BC1\u90FD\u5728\u65B0\u751F\u4EE3\u8FDB\u884C\u4E86\u3002

                                                                    \u65B0\u751F\u4EE3\u5BF9\u8C61\u5206\u914D\u4E0E\u56DE\u6536\u8FC7\u7A0B

                                                                    1. \u9996\u5148\u628A\u5BF9\u8C61\u5206\u914D\u5230\u4F0A\u7538\u56ED\u533A\uFF08\u51E0\u4E4E\u6240\u6709\u7684Java\u5BF9\u8C61\u90FD\u662F\u5728Eden\u533A\u88ABnew\u51FA\u6765\u7684\uFF0C\u4E0D\u662F\u6240\u6709\u7684\uFF09

                                                                      \u4E00\u65E6\u4F0A\u7538\u56ED\u533A\u653E\u6EE1\u4E4B\u540E\uFF0C\u4F0A\u7538\u56ED\u533A\u653E\u4E0D\u4E0B\u4E86\uFF0C\u8FD9\u65F6\u5019\u5C31\u8981\u8FDB\u884CYGC/MinorGC\uFF0C\u8FD9\u4E2A\u65F6\u5019\u8FDB\u884C\u5E74\u8F7B\u4EE3\u7684\u5783\u573E\u56DE\u6536\uFF0C\u6B64\u65F6\u7528\u6237\u7EBF\u7A0B\u505C\u6B62

                                                                      \u89E6\u53D1\u5E74\u8F7B\u4EE3\u7684\u5783\u573E\u56DE\u6536\u4E4B\u540E\uFF0C\u5C31\u8981\u8FDB\u884C\u5224\u65AD\uFF0C\u5224\u65AD\u4F0A\u7538\u533A\u7684\u5BF9\u8C61\u8C01\u662F\u5783\u573E\u8C01\u4E0D\u662F\u5783\u573E

                                                                      \u5982\u679C\u662F\u5783\u573E\uFF0C\u5C31\u88AB\u56DE\u6536\u6389\uFF0C\u5982\u679C\u4E0D\u662F\u5783\u573E\u7684\u5BF9\u8C61\uFF0C\u5C31\u88AB\u653E\u5728\u5E78\u5B58\u8005\u7684to\u533A\uFF0C\u4ECEEden\u533A\u653E\u5728\u5E78\u5B58\u8005\u533A\u7684\u5BF9\u8C61\uFF0Cage\u8D4B\u503C\u4E3A1

                                                                      \u63A5\u7740\u4F1A\u7EE7\u7EED\u653E\u5BF9\u8C61\u5728\u4F0A\u7538\u56ED\u533A\uFF0C\u4F0A\u7538\u56ED\u533A\u6EE1\u4E86\u4E4B\u540E\u4F1A\u89E6\u53D1YGC

                                                                      \u6BCF\u6B21\u6267\u884CYGC\u4E4B\u540E\uFF0C\u4E0D\u662F\u5783\u573E\u7684\u5BF9\u8C61\u4F1A\u88AB\u653E\u5728\u5E78\u5B58\u8005to\u533A\uFF0C\u5373\u5E78\u5B58\u8005\u533A\u7A7A\u7684\u90A3\u4E2A\u533A\u57DF\uFF08\u4E0B\u4E00\u8F6EYGC\uFF0C\u6B64\u65F6\u7684to\u533A\u53C8\u53D8\u6210from\u533A\uFF0C\u7A7A\u7684\u90A3\u4E2A\u53EBto\u533A\uFF09\uFF0C\u603B\u4E4B\u7A7A\u7684\u53EBto\u533A

                                                                      \u4E5F\u5C31\u662F\u8BF4\u5BF9\u8C61\u53EF\u80FD\u4F1A\u4EA4\u66FF\u653E\u5728s0\u533A\u548Cs1\u533A

                                                                      age\u8FBE\u523015\uFF08\u5E78\u5B58\u8005\u533A\u664B\u5347\u5230\u8001\u5E74\u4EE3\u7684\u9608\u503C\uFF0C\u53EF\u4EE5\u8FDB\u884C\u8BBE\u7F6E\uFF09\u7684\u5BF9\u8C61\uFF0C\u505A\u4E00\u4E2A\u664B\u5347\uFF0C\u664B\u5347\u5230\u8001\u5E74\u4EE3\uFF0C\u5224\u65AD\u5BF9\u8C61\u4ECE\u5E78\u5B58\u8005\u533A\u5230\u8001\u5E74\u4EE3\uFF0C\u4F1A\u7528\u5230\u5E74\u9F84\u8BA1\u6570\u5668

                                                                      image-20210811201352406

                                                                    2. \u4F0A\u7538\u56ED\u533A\u6EE1\u7684\u65F6\u5019\uFF0C\u89E6\u53D1young GC\uFF0C \u5E78\u5B58\u8005\u533A\u6EE1\u7684\u65F6\u5019\uFF0C\u4E0D\u4F1A\u89E6\u53D1YGC

                                                                      \u89E6\u53D1YGC\u4E4B\u540E\uFF0C\u4F1A\u5C06\u4F0A\u7538\u56ED\u533A\u548C\u5E78\u5B58\u8005\u533A\u4E00\u8D77\u8FDB\u884C\u5783\u573E\u56DE\u6536

                                                                      \u5E78\u5B58\u8005\u533A\u4E0D\u89E6\u53D1\uFF0C\u4F46\u662F\u4E0D\u610F\u5473\u7740\u5E78\u5B58\u8005\u533A\u4E0D\u8FDB\u884C\u5783\u573E\u56DE\u6536

                                                                    3. \u5728\u8FDB\u884CYGC\u7684\u65F6\u5019\uFF0C\u7EDD\u5927\u90E8\u5206\u5BF9\u8C61\u90FD\u5DF2\u7ECF\u53D8\u6210\u5783\u573E\uFF0C\u9700\u8981\u8FDB\u884C\u56DE\u6536\u4E86\uFF0C\u53EA\u6709\u5F88\u5C11\u7684\u5BF9\u8C61\u4F1A\u8FDB\u5165\u5E78\u5B58\u8005\u533A

                                                                    4. \u603B\u7ED3\uFF1A

                                                                      image-20210811201920137

                                                                    5. image-20210811202400426

                                                                    6. \u4F0A\u7538\u533A\u6EE1---\u89E6\u53D1YGC

                                                                    7. image-20210811203453743

                                                                    Minor GC/Major GC/ Full GC

                                                                    1. MinorGC = YOUNG GC

                                                                    2. \u9488\u5BF9\u4E8E\u8001\u5E74\u4EE3\u7684\u5783\u573E\u56DE\u6536\u53EBMajor GC\uFF0C\u5982\u679C\u8001\u5E74\u4EE3\u7684\u5783\u573E\u56DE\u6536\u5B8C\u4E86\u4E4B\u540E\uFF0C\u5BF9\u8C61\u4ECD\u7136\u653E\u4E0D\u4E0B\uFF0C\u5C31\u4F1A\u51FA\u73B0OOM\u5F02\u5E38

                                                                    3. \u8C03\u4F18\u5C31\u662F\u5E0C\u671B\u51FA\u73B0\u5783\u573E\u56DE\u6536\u7684\u60C5\u51B5\u5C11\u4E00\u4E9B

                                                                    4. \u533A\u5206

                                                                      HotSpot VM\u7684GC\u5B9E\u73B0\uFF1A

                                                                      • \u90E8\u5206\u6536\u96C6\uFF08Partial GC\uFF09

                                                                        • \u65B0\u751F\u4EE3\u6536\u96C6\uFF08young gc / minor gc\uFF09

                                                                          \u53EA\u662F\u65B0\u751F\u4EE3\u7684\u5783\u573E\u6536\u96C6\uFF0C\u65B0\u751F\u4EE3\u5305\u62ECEden\uFF0Cs0\u3001s1

                                                                        • \u8001\u5E74\u4EE3\u6536\u96C6 \uFF08old gc/ major gc\uFF09

                                                                          \u53EA\u662F\u8001\u5E74\u4EE3\u7684\u5783\u573E\u6536\u96C6

                                                                          \u76EE\u524D\u53EA\u6709CMS GC \u4F1A\u6709\u5355\u72EC\u6536\u96C6\u8001\u5E74\u4EE3\u7684\u884C\u4E3A\uFF08\u4F46\u662F\u5206\u7C7B\u8981\u8FD9\u4E48\u6765\u5212\u5206\uFF09

                                                                          \u6CE8\u610F\uFF0C\u5F88\u591A\u65F6\u5019major gc\u548Cfull gc\u4F1A\u6DF7\u6DC6\u4F7F\u7528\uFF0C\u9700\u8981\u5177\u4F53\u5206\u8FA8\u662F\u8001\u5E74\u4EE3\u56DE\u6536\u8FD8\u662F\u6574\u5806\u56DE\u6536

                                                                        • \u6DF7\u5408\u6536\u96C6\uFF08mixed GC\uFF09

                                                                          \u6536\u96C6\u6574\u4E2A\u65B0\u751F\u4EE3\u4EE5\u53CA\u90E8\u5206\u8001\u5E74\u4EE3\u7684\u5783\u573E\u6536\u96C6

                                                                      • \u6574\u5806\u6536\u96C6\uFF08full gc\uFF09

                                                                        \u5C31\u662F\u6536\u96C6\u6574\u4E2AJava\u5806\u548C\u65B9\u6CD5\u533A\uFF08\u65B0\u751F\u4EE3\u3001\u8001\u5E74\u4EE3\u3001\u65B9\u6CD5\u533A\uFF09\u7684\u5783\u573E\u6536\u96C6

                                                                    5. young gc\u7684\u89E6\u53D1\u673A\u5236

                                                                      1. eden\u533A\u6EE1\uFF08survivor\u6EE1\u4E0D\u4F1A\u5F15\u53D1gc\uFF09
                                                                      2. \u56E0\u4E3AJava\u5BF9\u8C61\u5927\u591A\u5177\u5907\u671D\u751F\u5915\u706D\u7684\u7279\u6027\uFF0C\u6240\u4EE5minor gc\u975E\u5E38\u9891\u7E41\uFF0C\u4E00\u822C\u56DE\u6536\u901F\u5EA6\u4E5F\u6BD4\u8F83\u5FEB
                                                                      3. minor gc\u4F1A\u5F15\u53D1stw\uFF0C\u6682\u505C\u5176\u4ED6\u7528\u6237\u7684\u7EBF\u7A0B\uFF0C\u7B49\u5783\u573E\u56DE\u6536\u7ED3\u675F\uFF0C\u7528\u6237\u7EBF\u7A0B\u624D\u6062\u590D\u8FD0\u884C
                                                                    6. major gc\u89E6\u53D1\u673A\u5236

                                                                      image-20210811212717272

                                                                    7. full gc\u89E6\u53D1\u673A\u5236

                                                                      image-20210811212930949

                                                                    8. \u51FA\u73B0OOM\u4E4B\u524D\uFF0C\u4E00\u5B9A\u7ECF\u5386\u8FC7full gc\uFF0C\u56E0\u4E3A\u8001\u5E74\u4EE3\u7A7A\u95F4\u4E0D\u8DB3\u4F1A\u89E6\u53D1full gc\uFF0C\u5F53\u5BF9\u8C61\u8981\u5F80\u8001\u5E74\u4EE3\u653E\u65F6\uFF0C\u4F46\u8001\u5E74\u4EE3\u7A7A\u95F4\u4E0D\u8DB3\uFF0C\u90A3\u4E48\u89E6\u53D1full gc\uFF0C\u5982\u679Cfull gc\u4E4B\u540E\u8FD8\u662F\u653E\u4E0D\u4E0B\uFF0C\u90A3\u4E48\u5C31\u4F1A\u51FA\u73B0OOM

                                                                      \u8FD9\u91CC\u7684full gc \u548C major gc\u6CA1\u6709\u52A0\u533A\u5206

                                                                    \u5806\u7A7A\u95F4\u5206\u4EE3\u601D\u60F3

                                                                    1. \u4E3A\u4EC0\u4E48\u9700\u8981\u628AJava\u5806\u5206\u4EE3\uFF1F

                                                                      \u4E0D\u540C\u5BF9\u8C61\u7684\u751F\u547D\u5468\u671F\u4E0D\u540C\uFF0C\u5927\u591A\u6570\u5BF9\u8C61\u662F\u4E34\u65F6\u5BF9\u8C61

                                                                      \u65B0\u751F\u4EE3\uFF1Aeden\u3001survivor0\u3001survivor1

                                                                      \u8001\u5E74\u4EE3\uFF1A\u5B58\u653E\u65B0\u751F\u4EE3\u4E2D\u7ECF\u5386\u591A\u6B21GC\u4ECD\u7136\u5B58\u6D3B\u7684\u5BF9\u8C61\uFF0C\u6709\u4E00\u4E2A\u9608\u503C\uFF0Cage = 15\uFF0C\u5982\u679C\u5BF9\u8C61\u592A\u5927\uFF0C\u4F0A\u7538\u56ED\u533A\u653E\u4E0D\u4E0B\uFF0C\u4F1A\u5224\u65AD\u8001\u5E74\u4EE3\u662F\u5426\u653E\u5F97\u4E0B\uFF0C\u5982\u679C\u8001\u5E74\u4EE3\u653E\u5F97\u4E0B\uFF0C\u4F1A\u76F4\u63A5\u653E\u5230\u8001\u5E74\u4EE3\uFF0C\u53E6\u5916\u5982\u679Csurvivor\u533A\u6EE1\u4E86\uFF0C\u4E5F\u53EF\u80FD\u653E\u5230\u8001\u5E74\u4EE3\u3002\u8001\u5E74\u4EE3\u5982\u679C\u8FD8\u653E\u4E0D\u4E0B\uFF0C\u90A3\u4E48\u4F1A\u89E6\u53D1full gc\u6216\u8005\u8BF4\u662Fmajor gc\uFF0C\u5982\u679C\u7ECF\u5386full gc\u6216\u8005major gc\u540E\u8FD8\u653E\u4E0D\u4E0B\uFF0C\u90A3\u4E48\u5C31\u4F1A\u51FA\u73B0OOM

                                                                    2. \u5206\u4EE3\u5C31\u662F\u4E3A\u4E86\u4F18\u5316GC\u6027\u80FD\uFF0C\u6709minor gc\u3001major gc\u3001 full gc

                                                                      minor gc\u5C31\u662F\u9AD8\u9891\u89E6\u53D1\u7684\uFF0C\u65B0\u751F\u4EE3\u662F\u9891\u7E41\u56DE\u6536\u7684

                                                                      \u8001\u5E74\u4EE3\u56DE\u6536\u5C31\u964D\u4F4E\uFF0C\u5C31\u5B9E\u73B0\u4F18\u5316\uFF0C\u56E0\u4E3A\u56DE\u6536\u8001\u5E74\u4EE3\u82B1\u8D39\u65F6\u95F4\u8F83\u591A

                                                                      \u4F18\u5316\u7684\u65B9\u5411\u5C31\u662F\u671D\u7740\u51CF\u5C11gc\u6B21\u6570

                                                                    \u5185\u5B58\u5206\u914D\u7B56\u7565

                                                                    1. \u4F18\u5148\u5206\u914D\u5230Eden

                                                                      \u5927\u5BF9\u8C61\u76F4\u63A5\u5206\u914D\u5230\u8001\u5E74\u4EE3

                                                                      • \u5C3D\u91CF\u907F\u514D\u7A0B\u5E8F\u4E2D\u51FA\u73B0\u8FC7\u591A\u7684\u5927\u5BF9\u8C61

                                                                      \u957F\u671F\u5B58\u6D3B\u7684\u5BF9\u8C61\u5206\u914D\u5230\u8001\u5E74\u4EE3

                                                                      \u52A8\u6001\u5BF9\u8C61\u5E74\u9F84\u5224\u65AD

                                                                      • \u5982\u679CSurvivor\u533A\u4E2D\u76F8\u540C\u5E74\u9F84\u7684\u6240\u6709\u5BF9\u8C61\u5927\u5C0F\u7684\u603B\u548C\u5927\u4E8Esurvivor\u533A\u7684\u5927\u5C0F\u7684\u4E00\u534A\uFF0C\u5E74\u9F84\u5927\u4E8E\u7B49\u4E8E\u8BE5\u5E74\u9F84\u7684\u5BF9\u8C61\u53EF\u4EE5\u76F4\u63A5\u8FDB\u5165\u8001\u5E74\u4EE3\uFF0C\u65E0\u9700\u7B49\u5230\u90A3\u4E2A\u9608\u503C

                                                                      \u7A7A\u95F4\u5206\u914D\u62C5\u4FDD

                                                                    2. \u5BF9\u8C61\u5206\u914D\u8FC7\u7A0B\uFF1ATLAB

                                                                      TLAB\u662F\u7EBF\u7A0B\u7F13\u51B2\u533A

                                                                    3. \u5728\u5E76\u53D1\u73AF\u5883\u4E0B\u4ECE\u5806\u533A\u4E2D\u5212\u5206\u5185\u5B58\u7A7A\u95F4\u662F\u7EBF\u7A0B\u4E0D\u5B89\u5168\u7684

                                                                      \u5806\u662F\u7EBF\u7A0B\u5171\u4EAB\u7684\uFF0C\u6240\u4EE5\u7EBF\u7A0B\u4E0D\u5B89\u5168

                                                                    4. \u4EC0\u4E48\u662FTLAB

                                                                      \u5BF9Eden\u533A\u7EE7\u7EED\u8FDB\u884C\u5212\u5206\uFF0CJVM\u4E3A\u6BCF\u4E2A\u7EBF\u7A0B\u5206\u914D\u4E86\u4E00\u4E2A\u79C1\u6709\u7F13\u5B58\u533A\u57DF\uFF0C\u5305\u542B\u5728EDEN\u7A7A\u95F4\u5185

                                                                      \u591A\u7EBF\u7A0B\u540C\u65F6\u5206\u914D\u5185\u5B58\u65F6\uFF0C\u4F7F\u7528TLAB\u53EF\u4EE5\u907F\u514D\u4E00\u7CFB\u5217\u7684\u7EBF\u7A0B\u4E0D\u5B89\u5168\u95EE\u9898

                                                                      \u540C\u65F6\u8FD8\u80FD\u63D0\u5347\u5185\u5B58\u5206\u914D\u7684\u541E\u5410\u91CF\uFF0C\u56E0\u6B64\u6211\u4EEC\u53EF\u4EE5\u5C06\u8FD9\u79CD\u5185\u5B58\u5206\u914D\u65B9\u5F0F\u79F0\u4E3A\u5FEB\u901F\u5206\u914D\u7B56\u7565

                                                                    5. image-20210811220336129

                                                                    6. \u6240\u4EE5\u5806\u7A7A\u95F4\u6240\u6709\u90E8\u5206\u90FD\u662F\u7EBF\u7A0B\u5171\u4EAB\u7684\u5417\uFF1F

                                                                      \u4E0D\u662F\uFF0C\u5806\u7A7A\u95F4\u7684\u65B0\u751F\u4EE3\u7684\u4F0A\u7538\u56ED\u533A\u91CC\u6709TLAB\uFF0C\u662F\u7EBF\u7A0B\u79C1\u6709\u7684\uFF0CJVM\u4F1A\u628ATLAB\u4F5C\u4E3A\u4E3A\u5BF9\u8C61\u5206\u914D\u7A7A\u95F4\u7684\u9996\u9009\uFF0C\u53EF\u4EE5\u907F\u514D\u7EBF\u7A0B\u5B89\u5168\u95EE\u9898\uFF0C\u5982\u679CTLAB\u653E\u4E0D\u4E0B\uFF0C\u90A3\u4E48\u4F1A\u5728\u4F0A\u7538\u56ED\u7684\u975ETLAB\u533A\u57DF\u4E3A\u5BF9\u8C61\u5206\u914D\u7A7A\u95F4\uFF0C\u8FD9\u65F6\u8981\u91C7\u7528\u52A0\u9501\u673A\u5236\u786E\u4FDD\u6570\u636E\u64CD\u4F5C\u7684\u539F\u5B50\u6027\u3002

                                                                      \u6362\u53E5\u8BDD\u8BF4\uFF0C\u5982\u679C\u5BF9\u8C61\u80FD\u5728\u4F0A\u7538\u56ED\u533A\u7684TLAB\u533A\u57DF\u5206\u914D\u7A7A\u95F4\uFF0C\u5219\u6CA1\u6709\u91C7\u7528\u52A0\u9501\u8FD9\u79CD\u673A\u5236\u3002\u56E0\u4E3A\u4F7F\u7528\u52A0\u9501\u673A\u5236\u4F1A\u5F71\u54CD\u7A7A\u95F4\u5206\u914D\u7684\u901F\u5EA6\uFF0C\u6240\u4EE5TLAB\u662F\u4E3A\u5BF9\u8C61\u5206\u914D\u7A7A\u95F4\u7684\u9996\u9009

                                                                    7. \u5206\u4EE3\u7684\u4E00\u4E2A\u4E3B\u8981\u76EE\u7684\u5C31\u662F\u4E3A\u4E86\u8BA9\u5BF9\u8C61\u5B58\u50A8\u5728\u65B0\u751F\u4EE3\uFF0C\u56E0\u4E3A\u5927\u591A\u6570\u5BF9\u8C61\u662F\u4E34\u65F6\u5BF9\u8C61\uFF0C\u901A\u8FC7\u65B0\u751F\u4EE3\u7684ygc\uFF0C\u5C31\u53EF\u4EE5\u628A\u5783\u573E\u56DE\u6536\u6389\uFF0C\u63D0\u9AD8\u6548\u7387

                                                                      gc\u9891\u7387\u53D8\u9AD8\u4F1A\u5F71\u54CD\u6267\u884C\u6548\u7387\uFF0C\u5F71\u54CD\u7528\u6237\u7EBF\u7A0B

                                                                      \u8C03\u4F18\u5C31\u662F\u8981\u51CF\u5C11gc\u9891\u7387

                                                                    8. image-20210811222818578

                                                                    9. \u5806\u5916\u5B58\u50A8\u6280\u672F

                                                                      • \u9003\u9038\u5206\u6790\uFF0C\u4E00\u4E2A\u5BF9\u8C61\u6CA1\u6709\u9003\u9038\u51FA\u65B9\u6CD5\u7684\u8BDD\uFF0C\u90A3\u4E48\u5C31\u53EF\u80FD\u88AB\u4F18\u5316\u6210\u6808\u4E0A\u5206\u914D

                                                                      • TAOBAO VM, \u5C06\u751F\u547D\u5468\u671F\u8F83\u957F\u7684Java\u5BF9\u8C61\u4ECEheap\u4E2D\u79FB\u81F3\u5806\u5916\uFF08GCIH\uFF09

                                                                        GC\u4E0D\u80FD\u7BA1\u7406GCIH\u7684Java\u5BF9\u8C61\uFF0C\u4ECE\u800C\u8FBE\u5230\u964D\u4F4EGC\u7684\u56DE\u6536\u9891\u7387\u548C\u63D0\u5347GC\u7684\u56DE\u6536\u6548\u7387\u7684\u76EE\u7684

                                                                    10. \u4E3A\u4EC0\u4E48\u8981\u5806\u5916\u5B58\u50A8\uFF1F

                                                                      \u4E3A\u4E86\u964D\u4F4EGC\u9891\u7387\u3002\u63D0\u9AD8\u6548\u7387

                                                                    11. \u9003\u9038\u5206\u6790

                                                                      image-20210811223633056

                                                                      \u5982\u4F55\u5FEB\u901F\u5730\u5224\u65AD\u662F\u5426\u53D1\u751F\u4E86\u9003\u9038\u5206\u6790\uFF0C\u5C31\u770Bnew\u7684\u5BF9\u8C61\u662F\u5426\u6709\u53EF\u80FD\u5728\u65B9\u6CD5\u5916\u88AB\u8C03\u7528

                                                                    12. \u5F00\u53D1\u4E2D\u80FD\u4F7F\u7528\u5C40\u90E8\u53D8\u91CF\u7684\uFF0C\u5C31\u4E0D\u8981\u5728\u65B9\u6CD5\u5916\u5B9A\u4E49\uFF0C\u66F4\u4E0D\u4F1A\u8003\u8651\u9759\u6001\u7684\u95EE\u9898

                                                                      \u5982\u679C\u5B9A\u4E49\u6210\u5C5E\u6027\uFF0C\u5C31\u6D89\u53CA\u5230GC\u7684\u95EE\u9898

                                                                    13. \u9003\u9038\u5206\u6790\u662F\u9700\u8981\u5F00\u542F\u7684\uFF0C\u6CA1\u6709\u5F00\u542F\u7684\u60C5\u51B5\u4E0B\uFF0C\u5373\u65F6\u6CA1\u6709\u53D1\u751F\u9003\u9038\uFF0C\u90A3\u4E48\u5BF9\u8C61\u4E5F\u662F\u5728\u5806\u4E0A\u5206\u914D\u7A7A\u95F4

                                                                      \u5F00\u542F\u9003\u9038\u5206\u6790\u53EF\u4EE5\u51CF\u5C11GC\u6B21\u6570\uFF0C\u56E0\u4E3A\u5C06\u7B26\u5408\u6761\u4EF6\u7684\u5BF9\u8C61\uFF08\u5373\u6CA1\u6709\u53D1\u751F\u9003\u9038\u7684\u5BF9\u8C61\uFF09\u5206\u914D\u5230\u6808\u4E0A\uFF0C\u6808\u4E0A\u7684\u5BF9\u8C61\u5C31\u4E0D\u9700\u8981\u5783\u573E\u56DE\u6536\u4E86\uFF0C\u63D0\u9AD8\u6548\u7387\uFF0C\u51CF\u5C11GC

                                                                      \u5806\u5916\u5B58\u50A8\u7684\u76EE\u7684\u5C31\u662F\u4E3A\u4E86\u964D\u4F4EGC\u9891\u7387

                                                                    14. \u4F7F\u7528\u9003\u9038\u5206\u6790\uFF0C\u7F16\u8BD1\u5668\u53EF\u4EE5\u5BF9\u4EE3\u7801\u505A\u5982\u4E0B\u4F18\u5316

                                                                      1. \u6808\u4E0A\u5206\u914D\uFF0C\u51CF\u5C11GC

                                                                      2. \u540C\u6B65\u7701\u7565\uFF0CJava\u865A\u62DF\u673A\u901A\u8FC7\u9003\u9038\u5206\u6790\uFF0C\u53D1\u73B0\u8FD9\u5757\u4EE3\u7801\u53EA\u80FD\u88AB\u4E00\u4E2A\u7EBF\u7A0B\u8BBF\u95EE\u5230\uFF0C\u90A3\u4E48\u5728JIT\u7F16\u8BD1\u9636\u6BB5\u5C31\u4F1A\u628A\u4E0A\u9501\u7684\u8FD9\u5757\u4EE3\u7801\u7ED9\u53D6\u6D88\u6389\u540C\u6B65\u9501

                                                                      3. \u5206\u79BB\u5BF9\u8C61\u6216\u6807\u91CF\u66FF\u6362----\u628A\u805A\u5408\u91CF\u66FF\u6362\u6210\u6807\u91CF\uFF0C\u4E5F\u5C31\u662F\u628A\u5BF9\u8C61\u66FF\u6362\u6210\u5C40\u90E8\u53D8\u91CF\uFF0C\u5C40\u90E8\u53D8\u91CF\u5C31\u53EF\u4EE5\u5206\u914D\u5230\u6808\u7A7A\u95F4\u4E2D\uFF0C\u76EE\u7684\u8FD8\u662F\u51CF\u5C11GC,\u6807\u91CF\u66FF\u6362\u53EF\u4EE5\u5927\u5927\u51CF\u5C11\u5806\u5185\u5B58\u7684\u4F7F\u7528\uFF0C\u56E0\u4E3A\u4E00\u65E6\u4E0D\u9700\u8981\u521B\u5EFA\u5BF9\u8C61\u4E86\uFF0C\u90A3\u4E48\u5C31\u4E0D\u518D\u9700\u8981\u5206\u914D\u5806\u5185\u5B58\u4E86

                                                                        \u6807\u91CF\u66FF\u6362\u9ED8\u8BA4\u662F\u6253\u5F00\u7684\uFF0C\u5C31\u662F\u5C06\u5BF9\u8C61\u6253\u6563\u4E86\u5206\u914D\u5230\u6808\u4E0A

                                                                      \u9003\u9038\u5206\u6790\u81EA\u8EAB\u4E5F\u662F\u9700\u8981\u8FDB\u884C\u4E00\u7CFB\u5217\u590D\u6742\u7684\u5206\u6790\u7684\uFF0C\u8FD9\u5176\u5B9E\u4E5F\u662F\u4E00\u4E2A\u76F8\u5BF9\u8017\u65F6\u7684\u8FC7\u7A0B

                                                                    15. \u4F46\u662F\u9003\u9038\u5206\u6790\u76EE\u524D\u5E76\u4E0D\u6210\u719F

                                                                      \u6DD8\u5B9D\u7684GCIH\u4E5F\u4E0D\u662F\u6808\u4E0A\u5206\u914D\uFF0C\u800C\u662F\u653E\u5230\u672C\u5730\u5185\u5B58\u4E2D

                                                                    16. \u7528synchronized\u5173\u952E\u5B57\u540C\u6B65\u4EE3\u7801\u5757\uFF0C\u76D1\u89C6\u5668\u9501\u4E00\u5B9A\u8981\u4FDD\u8BC1\u662F\u540C\u4E00\u4E2A

                                                                    17. \u5E74\u8F7B\u4EE3\u662F\u5BF9\u8C61\u7684\u8BDE\u751F\u3001\u6210\u957F\u3001\u6D88\u4EA1\u7684\u533A\u57DF\uFF0C\u4E00\u4E2A\u5BF9\u8C61\u5728\u8FD9\u91CC\u4EA7\u751F\u3001\u5E94\u7528\uFF0C\u6700\u540E\u88AB\u5783\u573E\u56DE\u6536\u5668\u56DE\u6536

                                                                      \u8001\u5E74\u4EE3\u653E\u7F6E\u957F\u751F\u547D\u5468\u671F\u7684\u5BF9\u8C61\uFF0C\u4E5F\u6709\u5783\u573E\u56DE\u6536

                                                                      \u8001\u5E74\u4EE3\u56DE\u6536\uFF08full gc\uFF09\u662F\u5F00\u53D1\u4E2D\u8981\u5C3D\u91CF\u907F\u514D\u7684

                                                                    18. \u8001\u5E74\u4EE3\u9632\u6B62\u957F\u751F\u547D\u5468\u671F\u7684\u5BF9\u8C61\uFF1A

                                                                      \u901A\u5E38\u90FD\u662F\u4ECEsurvivor\u533A\u57DF\u7B5B\u9009\u62F7\u8D1D\u8FC7\u6765\u7684Java\u5BF9\u8C61

                                                                    19. \u666E\u901A\u5BF9\u8C61\u5206\u914D\uFF1A

                                                                      • \u9996\u5148TLAB
                                                                      • \u5982\u679C\u5BF9\u8C61\u8F83\u5927\uFF0C\u8BD5\u56FE\u76F4\u63A5\u5206\u914D\u5230Eden\u5176\u4ED6\u4F4D\u7F6E\u4E0A
                                                                      • \u5982\u679C\u5BF9\u8C61\u592A\u5927\uFF0C\u5B8C\u5168\u65E0\u6CD5\u5728\u65B0\u751F\u4EE3\u627E\u5230\u8DB3\u591F\u7684\u8FDE\u7EED\u7A7A\u95F2\u7A7A\u95F4\uFF0CJVM\u5C31\u4F1A\u76F4\u63A5\u5206\u914D\u5230\u8001\u5E74\u4EE3

                                                                    \u65B9\u6CD5\u533A

                                                                    \u6808\u3001\u5806\u3001\u65B9\u6CD5\u533A\u7684\u4EA4\u4E92\u5173\u7CFB

                                                                    1. image-20210813105607835

                                                                    2. \u5806\u7A7A\u95F4\u548C\u65B9\u6CD5\u533A\u662F\u7EBF\u7A0B\u5171\u4EAB\uFF0C\u8981\u8003\u8651\u7EBF\u7A0B\u5B89\u5168\u95EE\u9898

                                                                      \u5143\u7A7A\u95F4\u76F8\u5BF9\u6765\u8BF4\u662F\u6BD4\u8F83\u7A33\u5B9A\u7684\uFF0CGC\u4E0D\u4F1A\u50CF\u5806\u7A7A\u95F4\u90A3\u4E48\u9891\u7E41

                                                                      GC\u662F\u8F83\u591A\u56DE\u6536\u65B0\u751F\u4EE3\uFF0C\u8F83\u5C11\u56DE\u6536\u8001\u5E74\u4EE3\uFF0C\u57FA\u672C\u4E0D\u52A8\u65B9\u6CD5\u533A

                                                                    3. \u7A0B\u5E8F\u8BA1\u6570\u5668\u4E0D\u4F1A\u62A5\u5F02\u5E38\uFF0C\u4E5F\u4E0D\u5B58\u5728GC

                                                                    4. image-20210813105911154

                                                                      \u6574\u4E2A\u7C7B\u7684\u7ED3\u6784\u4F1A\u52A0\u8F7D\u5230\u65B9\u6CD5\u533A

                                                                      new\u7684\u5BF9\u8C61\u653E\u5230\u5BF9\u7A7A\u95F4\u4E2D

                                                                      \u5982\u679C\u8FD9\u884C\u4EE3\u7801\u5728\u65B9\u6CD5\u5185\u5199\u7684\uFF0C\u90A3\u4E48person\u8FD9\u4E2A\u5BF9\u8C61\u5F15\u7528\u5C31\u4F5C\u4E3A\u5C40\u90E8\u53D8\u91CF\u653E\u5230\u865A\u62DF\u673A\u6808\u7684\u6808\u5E27\u7684\u5C40\u90E8\u53D8\u91CF\u8868\u4E2D

                                                                    5. \u65B9\u6CD5\u533A\u4E3B\u8981\u5B58\u653E\u7684\u662F\u65B9\u6CD5\u548C\u6784\u9020\u5668\u7684\u5B57\u8282\u7801\u6307\u4EE4\u3001\u7C7B\u7684\u4FE1\u606F\uFF08\u7ED3\u6784\uFF09

                                                                    6. \u65B9\u6CD5\u533A\u662F\u968F\u7740\u865A\u62DF\u673A\u542F\u52A8\uFF0C\u521B\u5EFA\u597D\u7684

                                                                    7. \u867D\u7136\u65B9\u6CD5\u533A\u5728\u903B\u8F91\u4E0A\u662F\u5806\u7A7A\u95F4\u7684\u4E00\u90E8\u5206\uFF08\u5728Java\u865A\u62DF\u673A\u89C4\u8303\u4E0A\uFF09\uFF0C\u4F46\u662F\u5806\u7684\u8BDD\uFF0C\u6709\u538B\u7F29\u7B97\u6CD5\u3001GC\u3002\u4F46\u662F\u65B9\u6CD5\u533A\u53EF\u4EE5\u4E0D\u538B\u7F29\uFF0C\u4E5F\u53EF\u4EE5\u6CA1\u6709GC\uFF0C\u5C31\u662F\u8BF4\u65B9\u6CD5\u533A\u53EF\u4EE5\u72EC\u7ACB\u4E8E\u5806\u7A7A\u95F4\u5B58\u5728

                                                                      jdk8\u6CA1\u6709\u9650\u5B9A\u65B9\u6CD5\u533A\u662F\u4E0D\u662F\u5806\u7684\u4E00\u90E8\u5206

                                                                      \u5728Java\u865A\u62DF\u673A\u7684\u5177\u4F53\u5B9E\u73B0\u4E0A\uFF0C\u65B9\u6CD5\u533A\u662F\u548C\u5806\u5206\u5F00\u7684\uFF0C\u770B\u4F5C\u662F\u72EC\u7ACB\u4E8E\u5806\u7684\u4E00\u5757\u7A7A\u95F4

                                                                    \u65B9\u6CD5\u533A\u7684\u7406\u89E3

                                                                    1. \u65B9\u6CD5\u533A\u5728JVM\u542F\u52A8\u7684\u65F6\u5019\u88AB\u521B\u5EFA\uFF0C\u5E76\u4E14\u5B83\u7684\u5B9E\u9645\u7684\u7269\u7406\u5185\u5B58\u7A7A\u95F4\u4E2D\u548CJava\u5806\u533A\u4E00\u6837\u90FD\u662F\u53EF\u4EE5\u662F\u4E0D\u8FDE\u7EED\u7684

                                                                    2. \u65B9\u6CD5\u533A\u7684\u5927\u5C0F\u548C\u5806\u7A7A\u95F4\u4E00\u6837\uFF0C\u53EF\u4EE5\u9009\u62E9\u56FA\u5B9A\u5927\u5C0F\u6216\u8005\u53EF\u6269\u5C55

                                                                    3. \u65B9\u6CD5\u533A\u7684\u5927\u5C0F\u51B3\u5B9A\u4E86\u7CFB\u7EDF\u53EF\u4EE5\u4FDD\u5B58\u591A\u5C11\u4E2A\u7C7B\uFF0C\u5982\u679C\u7CFB\u7EDF\u5B9A\u4E49\u4E86\u592A\u591A\u4E86\u7684\u7C7B\uFF0C\u5BFC\u81F4\u65B9\u6CD5\u533A\u6EA2\u51FA\uFF0C\u865A\u62DF\u673A\u540C\u6837\u4F1A\u629B\u51FAOOM\uFF1Ajdk7\u53CA\u4EE5\u524D\u662FPermGen space\uFF0CJDK8\u53CA\u4EE5\u540E\u662FMetaspace

                                                                    4. \u65B9\u6CD5\u533A\u53EF\u4EE5\u770B\u8FC7\u63A5\u53E3\u3001\u89C4\u8303\uFF0C\u6C38\u4E45\u4EE3\u548C\u5143\u7A7A\u95F4\u53EF\u4EE5\u770B\u4F5C\u65B9\u6CD5\u533A\u7684\u5177\u4F53\u843D\u5730\u5B9E\u73B0

                                                                    5. \u5BF9hotspot\u6765\u8BF4\uFF0C\u65B9\u6CD5\u533A\u548C\u6C38\u4E45\u4EE3\u662F\u7B49\u4EF7\u7684\uFF0C\u5BF9\u4E8E\u5176\u5B83\u865A\u62DF\u673A\u5B9E\u73B0\u6765\u8BF4\uFF0C\u65B9\u6CD5\u533A\u548C\u6C38\u4E45\u4EE3\u4E0D\u7B49\u4EF7\u3002\u6211\u4EEC\u9762\u8BD5\u7B54\u9898\u9488\u5BF9\u4E8Ehotspot\u6765\u8BF4\u5C31\u53EF\u4EE5\u4E86

                                                                    6. \u4F7F\u7528\u6C38\u4E45\u4EE3\u7684\u65F6\u5019\uFF0C\u4ECD\u7136\u662F\u4F7F\u7528Java\u865A\u62DF\u673A\u7684\u5185\u5B58\uFF0C\u66F4\u5BB9\u6613\u8D85\u8FC7OOM

                                                                      \u5728jdk8\u53CA\u4EE5\u540E\uFF0C\u4F7F\u7528\u5143\u7A7A\u95F4\u4F5C\u4E3A\u65B9\u6CD5\u533A\u7684\u5177\u4F53\u843D\u5730\u5B9E\u73B0\uFF0C\u66FF\u4EE3\u4E86\u6C38\u4E45\u4EE3

                                                                      \u6C38\u4E45\u4EE3\u662F\u4F7F\u7528Java\u865A\u62DF\u673A\u7684\u5185\u5B58\uFF0C\u800C\u5143\u7A7A\u95F4\u662F\u4F7F\u7528\u7684\u672C\u5730\u7684\u5185\u5B58\uFF0C\u8FD9\u6837\u663E\u7136\u66F4\u4E0D\u5BB9\u6613\u51FA\u73B0OOM

                                                                    7. \u5143\u7A7A\u95F4\u548C\u6C38\u4E45\u4EE3\u7684\u6700\u5927\u533A\u522B\u5C31\u662F\uFF0C\u5143\u7A7A\u95F4\u4E0D\u662F\u4F7F\u7528\u7684Java\u865A\u62DF\u673A\u7684\u5185\u5B58\uFF0C\u800C\u662F\u4F7F\u7528\u672C\u5730\u7684\u7269\u7406\u5185\u5B58\uFF08\u8FD9\u91CC\u7684\u7269\u7406\u5185\u5B58\u4E0D\u662F\u6307\u786C\u76D8\uFF0C\u662F\u6307\u5185\u5B58\uFF0C\u5185\u5B58\u90FD\u662F\u6307\u8FD0\u884C\u5185\u5B58\uFF09

                                                                      \u5143\u7A7A\u95F4\u4F9D\u8D56\u672C\u5730\u5185\u5B58

                                                                    \u8BBE\u7F6E\u65B9\u6CD5\u533A\u5927\u5C0F\u4E0EOOM

                                                                    1. \u6CA1\u6709\u52A0\u53C2\u6570\u7684\u60C5\u51B5\u4E0B\uFF0C\u65B9\u6CD5\u533A\u4F1A\u4F7F\u7528\u52A8\u6001\u6269\u5C55\u7684\u5F62\u5F0F

                                                                      \u5728jdk1.8\u53CA\u4EE5\u540E\uFF0C\u91C7\u7528\u5143\u7A7A\u95F4\uFF0C\u4F7F\u7528\u672C\u5730\u5185\u5B58\uFF0C\u90A3\u4E48\u9ED8\u8BA4\u521D\u59CB\u5927\u5C0F\u662F21M\uFF0C\u4E0A\u9650\u9ED8\u8BA4\u662F\u672C\u5730\u5185\u5B58\u5927\u5C0F\uFF0C\u5982\u679C\u65B9\u6CD5\u533A\u5360\u6EE1\u4E86\uFF0C\u4F1A\u8FDB\u884C\u4E00\u4E2A\u52A8\u6001\u6269\u5C55\uFF0C\u76F4\u5230\u628A\u672C\u5730\u5185\u5B58\u5360\u6EE1\uFF0C\u7136\u540E\u5982\u679C\u8FD8\u6709\u7C7B\u52A0\u8F7D\uFF0C\u90A3\u4E48\u4F1A\u62A5OOM\u5F02\u5E38

                                                                      \u53EF\u4EE5\u8BBE\u7F6E\u65B9\u6CD5\u533A\u7684\u521D\u59CB\u5927\u5C0F\u548C\u4E0A\u9650\uFF0C\u4E5F\u53EF\u4EE5\u91C7\u7528\u9ED8\u8BA4\uFF0C\u9ED8\u8BA4\u7684\u52A8\u6001\u6269\u5C55\u4F1A\u76F4\u5230\u5360\u6EE1\u6574\u4E2A\u7269\u7406\u5185\u5B58

                                                                    2. \u5982\u4F55\u89E3\u51B3OOM

                                                                      \u901A\u8FC7\u5185\u5B58\u6620\u50CF\u5206\u6790\u5DE5\u5177\u8FDB\u884C\u5206\u6790\uFF0C\u91CD\u70B9\u786E\u8BA4\u5185\u5B58\u4E2D\u7684\u5BF9\u8C61\u662F\u5426\u662F\u5FC5\u8981\u7684\uFF0C \u4E5F\u5C31\u662F\u8981\u5206\u6E05\u695A\u5230\u5E95\u662F\u51FA\u73B0\u4E86\u5185\u5B58\u6CC4\u6F0F\u8FD8\u662F\u5185\u5B58\u6EA2\u51FA

                                                                      \u5185\u5B58\u6CC4\u6F0F\uFF1A\u5982\u679C\u662F\u5185\u5B58\u6CC4\u6F0F\uFF0C\u5BFC\u81F4\u5783\u573E\u56DE\u6536\u4E0D\u6389\uFF0C\u5BFC\u81F4\u5185\u5B58\u6EA2\u51FA\u3002\u5C31\u662F\u5806\u7A7A\u95F4\u4E2D\u7684\u5BF9\u8C61\u56DE\u6536\u4E0D\u6389\uFF0C\u56E0\u4E3A\u6709\u6808\u7A7A\u95F4\u4E2D\u7684\u5BF9\u8C61\u5F15\u7528\u6307\u5411\u5806\u7A7A\u95F4\u4E2D\u7684\u5BF9\u8C61\uFF0C\u4F46\u662F\u4E0D\u7528\u8FD9\u4E2A\u5BF9\u8C61\uFF0C\u5BFC\u81F4\u5806\u7A7A\u95F4\u4E2D\u7684\u5BF9\u8C61\u56DE\u6536\u4E0D\u6389\u3002\u5982\u679C\u5185\u5B58\u6CC4\u6F0F\uFF0C\u901A\u8FC7\u5DE5\u5177\u67E5\u770B\u6CC4\u6F0F\u5BF9\u8C61\u5230GC roots\u7684\u5F15\u7528\u94FE\uFF0C\u4E8E\u662F\u5C31\u627E\u5230\u6CC4\u6F0F\u5BF9\u8C61\u662F\u901A\u8FC7\u600E\u6837\u7684\u8DEF\u5F84\u4E0EGC Roots\u76F8\u5173\u8054\u5E76\u5BFC\u81F4\u5783\u573E\u56DE\u6536\u5668\u65E0\u6CD5\u81EA\u52A8\u56DE\u6536\u4ED6\u4EEC\u7684\u3002

                                                                      \u5185\u5B58\u6EA2\u51FA\uFF1A\u5982\u679C\u4E0D\u662F\u5185\u5B58\u6CC4\u6F0F\uFF0C\u5BFC\u81F4\u5783\u573E\u56DE\u6536\u4E0D\u6389\uFF0C\u5BFC\u81F4\u5185\u5B58\u6EA2\u51FA\uFF0C\u5C31\u68C0\u67E5\u865A\u62DF\u673A\u7684\u5806\u53C2\u6570

                                                                    \u65B9\u6CD5\u533A\u7684\u5185\u90E8\u7ED3\u6784

                                                                    1. \u65B9\u6CD5\u533A\u91CC\u9762\u4E3B\u8981\u653E\u7C7B\u4FE1\u606F\u548C\u8FD0\u884C\u65F6\u5E38\u91CF\u6C60

                                                                      \u8FD9\u4E2A\u7C7B\u4FE1\u606F\u6307\u7C7B\u3001\u63A5\u53E3\u3001\u679A\u4E3E\u7C7B\u3001\u6CE8\u89E3\u7B49

                                                                    2. \u300A\u6DF1\u5165\u7406\u89E3Java\u865A\u62DF\u673A\u300B\u5BF9\u65B9\u6CD5\u533A\u5B58\u50A8\u5185\u5BB9\u7684\u63CF\u8FF0\uFF1A

                                                                      \u5B83\u7528\u4E8E\u5B58\u50A8\u5DF2\u88AB\u865A\u62DF\u673A\u52A0\u8F7D\u7684\u7C7B\u578B\u4FE1\u606F\u3001\u5E38\u91CF\uFF08\u8FD0\u884C\u65F6\u5E38\u91CF\u6C60\uFF09\u3001\u9759\u6001\u53D8\u91CF\u3001\u88ABJIT\u5373\u65F6\u7F16\u8BD1\u5668\u7F16\u8BD1\u7684\u7F13\u5B58\u4EE3\u7801\u7B49

                                                                    3. \u65B9\u6CD5\u533A\u4E5F\u4F1A\u8BB0\u5F55\u5B57\u8282\u7801\u6587\u4EF6\u662F\u4F7F\u7528\u54EA\u4E00\u4E2A\u7C7B\u52A0\u8F7D\u5668\u52A0\u8F7D\u8FDB\u6765\u7684\uFF0C\u7C7B\u52A0\u8F7D\u5668\u5728\u65B9\u6CD5\u533A\u91CC\u4E5F\u662F\u6709\u8BB0\u5F55\u7684\u3002\uFF08\u5783\u573E\u56DE\u6536\u7684\u65F6\u5019\uFF0C\u5982\u679C\u67D0\u4E2A\u7C7B\u52A0\u8F7D\u5668\u6CA1\u6709\u7528\u4E86\uFF0C\u7C7B\u52A0\u8F7D\u5668\u5BF9\u5E94\u7684\u7C7B\u4E5F\u4F1A\u88AB\u56DE\u6536\uFF09

                                                                      \u4E5F\u4F1A\u8BB0\u5F55\u67D0\u4E2A\u7C7B\u52A0\u8F7D\u5668\uFF0C\u52A0\u8F7D\u8FC7\u54EA\u4E9B\u5B57\u8282\u7801\u6587\u4EF6

                                                                    4. \u4ECE\u5B57\u8282\u7801\u89D2\u5EA6\u6765\u770B\uFF0C\u6784\u9020\u5668\u548C\u666E\u901A\u7684\u65B9\u6CD5\u90FD\u53EB\u505A\u65B9\u6CD5\uFF0C\u5728\u6E90\u4EE3\u7801\u5C42\u9762\uFF0C\u6784\u9020\u5668\u548C\u65B9\u6CD5\u662F\u5206\u5F00\u7684

                                                                    \u7C7B\u578B\u4FE1\u606F

                                                                    image-20210813161957453

                                                                    \u65B9\u6CD5\u4FE1\u606F

                                                                    image-20210813161930317

                                                                    \u9759\u6001\u53D8\u91CF

                                                                    1. image-20210813153359383

                                                                      \u9759\u6001\u53D8\u91CF\uFF0C\u6CA1\u6709final\u4FEE\u9970\uFF1A

                                                                      • \u5728\u7C7B\u52A0\u8F7D\u7684\u94FE\u63A5\u7684\u51C6\u5907\u9636\u6BB5\uFF0C\u9ED8\u8BA4\u8D4B\u521D\u503C\u4E3A0\uFF0C\u5728\u521D\u59CB\u5316\u9636\u6BB5\u624D\u8D4B\u503C\u4E3A1

                                                                      \u9759\u6001\u53D8\u91CF\uFF0C\u7528final\u4FEE\u9970

                                                                      • \u5728\u7C7B\u52A0\u8F7D\u7684\u94FE\u63A5\u7684\u51C6\u5907\u9636\u6BB5\uFF0C\u6216\u8005\u8BF4\u7F16\u8BD1\u9636\u6BB5\uFF0C\u5C31\u5DF2\u7ECF\u8D4B\u503C\u4E3A2\u4E86\u3002

                                                                      image-20210813153525632

                                                                    \u8FD0\u884C\u65F6\u5E38\u91CF\u6C60

                                                                    1. \u8981\u6CE8\u610F\u8FD0\u884C\u65F6\u5E38\u91CF\u6C60\u548C\u5E38\u91CF\u6C60\u7684\u533A\u522B

                                                                      \u8FD0\u884C\u65F6\u5E38\u91CF\u6C60\u662F\u8FD0\u884C\u65F6\u7ED3\u6784\uFF0C\u800C\u5E38\u91CF\u6C60\u662F\u9759\u6001\u7ED3\u6784

                                                                      \u65B9\u6CD5\u533A\uFF0C\u5185\u90E8\u5305\u542B\u4E86\u8FD0\u884C\u65F6\u5E38\u91CF\u6C60

                                                                      \u5B57\u8282\u7801\u6587\u4EF6\uFF0C\u5185\u90E8\u5305\u542B\u4E86\u5E38\u91CF\u6C60

                                                                      \u8981\u5F04\u6E05\u695A\u65B9\u6CD5\u533A\uFF0C\u9700\u8981\u7406\u89E3\u6E05\u695A\u5B57\u8282\u7801\u6587\u4EF6\uFF0C\u56E0\u4E3A\u52A0\u8F7D\u7C7B\u7684\u4FE1\u606F\u90FD\u5728\u65B9\u6CD5\u533A

                                                                      \u8981\u5F04\u6E05\u695A\u65B9\u6CD5\u533A\u7684\u8FD0\u884C\u65F6\u5E38\u91CF\u6C60\uFF0C\u9700\u8981\u7406\u89E3\u6E05\u695A\u5B57\u8282\u7801\u6587\u4EF6\u4E2D\u7684\u5E38\u91CF\u6C60

                                                                    2. \u5B57\u8282\u7801\u6587\u4EF6\u7684\u5E38\u91CF\u6C60\u8868\uFF0C\u5305\u542B\u4E86\u5404\u79CD\u5B57\u9762\u91CF\u548C\u5BF9\u7C7B\u578B\u3001\u57DF\u548C\u65B9\u6CD5\u7684\u7B26\u53F7\u5F15\u7528\uFF0C\u7B26\u53F7\u5F15\u7528\u8F6C\u6362\u4E3A\u76F4\u63A5\u5F15\u7528\u662F\u53D1\u751F\u5728\u7C7B\u52A0\u8F7D\u8FC7\u7A0B\u7684\u94FE\u63A5\u7684\u89E3\u6790\u9636\u6BB5\u3002\uFF08\u52A8\u6001\u94FE\u63A5\u5C31\u662F\u6307\u5411\u8FD0\u884C\u65F6\u5E38\u91CF\u6C60\u7684\u7B26\u53F7\u5F15\u7528\uFF0C\u4ECE\u800C\u5F97\u5230\u76F4\u63A5\u5F15\u7528\uFF09

                                                                    3. \u4E00\u4EFD\u5F88\u7B80\u5355\u7684\u4EE3\u7801\uFF0C\u90FD\u8981\u52A0\u8F7D\u5F88\u591A\u7ED3\u6784\uFF0C\u8FD9\u4E9B\u7ED3\u6784\u4E0D\u76F4\u63A5\u5B58\u5230\u5B57\u8282\u7801\u91CC\uFF0C\u90A3\u4E48\u5C31\u5B58\u5230\u5E38\u91CF\u6C60\uFF0C\u5B57\u8282\u7801\u5305\u542B\u4E86\u6307\u5411\u5E38\u91CF\u6C60\u7684\u5F15\u7528\u3002\u5728\u52A8\u6001\u94FE\u63A5\u7684\u65F6\u5019\u4F1A\u7528\u5230\u8FD0\u884C\u65F6\u5E38\u91CF\u6C60\uFF0C\u5C06\u7B26\u53F7\u5F15\u7528\u8F6C\u6362\u4E3A\u76F4\u63A5\u5F15\u7528

                                                                      \u8BF4\u7B80\u5355\u70B9\uFF1A

                                                                      \u5B57\u8282\u7801\u6587\u4EF6\u7684\u6307\u4EE4\u4E2D\u4F1A\u6709\u7B26\u53F7\u5F15\u7528\uFF0C\u6307\u5411\u5E38\u91CF\u6C60\u7684\u7B26\u53F7\u5F15\u7528\uFF0C\u6240\u6709\u7684\u53D8\u91CF\u548C\u65B9\u6CD5\u5F15\u7528\u90FD\u4F5C\u4E3A\u7B26\u53F7\u5F15\u7528\u4FDD\u5B58\u5728class\u6587\u4EF6\u7684\u5E38\u91CF\u6C60\u91CC

                                                                    4. \u5E38\u91CF\u6C60\uFF0C\u53EF\u4EE5\u770B\u4F5C\u662F\u4E00\u5F20\u8868\uFF0C\u865A\u62DF\u673A\u6307\u4EE4\u6839\u636E\u8FD9\u5F20\u5E38\u91CF\u8868\u627E\u5230\u8981\u6267\u884C\u7684\u7C7B\u540D\u3001\u65B9\u6CD5\u540D\u3001\u53C2\u6570\u7C7B\u578B\u3001\u5B57\u9762\u91CF\u7B49\u7C7B\u578B

                                                                    5. \u8FD0\u884C\u65F6\u5E38\u91CF\u6C60\u662F\u65B9\u6CD5\u533A\u7684\u4E00\u90E8\u5206\uFF0C\u5E38\u91CF\u6C60\u662F\u5B57\u8282\u7801\u6587\u4EF6\u7684\u4E00\u90E8\u5206

                                                                      \u5E38\u91CF\u6C60\u662F\u5B57\u8282\u7801\u6587\u4EF6\u7684\u4E00\u90E8\u5206\uFF0C\u7528\u4E8E\u5B58\u653E\u7F16\u8BD1\u5668\u751F\u6210\u7684\u5404\u79CD\u5B57\u9762\u91CF\u4E0E\u7B26\u53F7\u5F15\u7528\uFF0C\u8FD9\u90E8\u5206\u5185\u5BB9\u5C06\u5728\u7C7B\u52A0\u8F7D\u540E\u5B58\u653E\u5230\u65B9\u6CD5\u533A\u7684\u8FD0\u884C\u65F6\u5E38\u91CF\u6C60\u4E2D\uFF0C\u5B83\u4EEC\u662F\u5BF9\u5E94\u7684\u5173\u7CFB\uFF01

                                                                    6. \u8FD0\u884C\u65F6\u5E38\u91CF\u6C60\u4E2D\u5305\u542B\u591A\u79CD\u4E0D\u540C\u7684\u5E38\u91CF\uFF0C\u5305\u62EC\u7F16\u8BD1\u5668\u5C31\u5DF2\u7ECF\u660E\u786E\u7684\u6570\u503C\u5B57\u9762\u91CF\uFF0C\u4E5F\u5305\u62EC\u5230\u8FD0\u884C\u671F\u89E3\u6790\u540E\u624D\u80FD\u591F\u83B7\u5F97\u7684\u65B9\u6CD5\u6216\u5B57\u6BB5\u5F15\u7528\uFF0C\u6B64\u65F6\u4E0D\u518D\u662F\u5E38\u91CF\u6C60\u4E2D\u7684\u7B26\u53F7\u5730\u5740\u4E86\uFF0C\u8FD9\u91CC\u8F6C\u6362\u4E3A\u771F\u5B9E\u5730\u5740

                                                                    7. \u603B\u7ED3\uFF1A\u65B9\u6CD5\u533A\u5B58\u7684\u7ED3\u6784

                                                                      • \u7C7B\u578B\u4FE1\u606F
                                                                      • \u8FD0\u884C\u65F6\u5E38\u91CF\u6C60
                                                                      • \u9759\u6001\u53D8\u91CF
                                                                      • \u57DF\u4FE1\u606F
                                                                      • \u65B9\u6CD5\u4FE1\u606F
                                                                      • JIT\u7F16\u8BD1\u5668\u7F16\u8BD1\u7684\u4EE3\u7801\u7F13\u5B58
                                                                    8. \u5C40\u90E8\u53D8\u91CF\u8868\uFF0C\u5982\u679C\u653E\u7684\u57FA\u672C\u6570\u636E\u7C7B\u578B\uFF0C\u5C31\u662F\u653E\u7684\u53D8\u91CF\u771F\u5B9E\u7684\u503C\uFF0C\u5982\u679C\u653E\u7684\u5F15\u7528\u7C7B\u578B\u53D8\u91CF\uFF0C\u90A3\u4E48\u5C31\u653E\u7684\u662F\u5730\u5740\uFF0C\u90FD\u53EF\u4EE5\u7528\u6570\u5B57\u6765\u8868\u793A\uFF0C\u6240\u4EE5\u5C40\u90E8\u53D8\u91CF\u8868\u662F\u4E00\u4E2A\u6570\u503C\u6570\u7EC4

                                                                    \u65B9\u6CD5\u533A\u7684\u6F14\u8FDB\u7EC6\u8282

                                                                    1. jdk1.6\u53CA\u4EE5\u524D\uFF0C\u6709\u6C38\u4E45\u4EE3\uFF0C\u9759\u6001\u53D8\u91CF\u5B58\u653E\u5728\u6C38\u4E45\u4EE3\u4E0A

                                                                      jdk1.7\uFF0C\u6709\u6C38\u4E45\u4EE3\uFF0C\u4F46\u662F\u9759\u6001\u53D8\u91CF\u548C\u5B57\u7B26\u4E32\u5E38\u91CF\u6C60\u4FDD\u5B58\u5728\u5806\u4E2D

                                                                      jdk1.8\u53CA\u4EE5\u540E\uFF0C\u65E0\u6C38\u4E45\u4EE3\uFF0C\u7528\u5143\u7A7A\u95F4\u4F5C\u4E3A\u65B9\u6CD5\u533A\u7684\u5B9E\u73B0\uFF0C\u5B57\u7B26\u4E32\u5E38\u91CF\u6C60\u3001\u9759\u6001\u53D8\u91CF\u4ECD\u7136\u5728\u5806\uFF0C\u4F46\u662F\u5143\u7A7A\u95F4\u4E2D\u6709\u7C7B\u578B\u4FE1\u606F\u3001\u8FD0\u884C\u65F6\u5E38\u91CF\u6C60\u3001\u65B9\u6CD5\u4FE1\u606F

                                                                      \uFF08\u5B57\u7B26\u4E32\u5E38\u91CF\u6C60\u548C\u8FD0\u884C\u65F6\u5E38\u91CF\u6C60\u4E0D\u4E00\u6837\uFF09

                                                                    2. image-20210813225341464

                                                                      image-20210813225401420

                                                                      image-20210813225429219

                                                                    3. \u6C38\u4E45\u4EE3\u4E3A\u4EC0\u4E48\u8981\u88AB\u5143\u7A7A\u95F4\u66FF\u6362\uFF1F

                                                                      1. \u5F88\u96BE\u786E\u5B9A\u4E3A\u6C38\u4E45\u4EE3\u8BBE\u7F6E\u7684\u5927\u5C0F\uFF0C\u7A7A\u95F4\u5C0F\u4E86\uFF0C\u5BB9\u6613\u5F15\u8D77full gc\uFF0C\u4F1A\u62D6\u6162\u7A0B\u5E8F\u7684\u6027\u80FD
                                                                      2. \u5143\u7A7A\u95F4\u548C\u6C38\u4E45\u4EE3\u4E4B\u95F4\u7684\u6700\u5927\u533A\u522B\u5728\u4E8E\uFF1A\u5143\u7A7A\u95F4\u5E76\u4E0D\u5728\u865A\u62DF\u673A\u4E2D\uFF0C\u800C\u662F\u4F7F\u7528\u672C\u5730\u8FD0\u884C\u5185\u5B58\uFF0C\u9ED8\u8BA4\u60C5\u51B5\u4E0B\u5143\u7A7A\u95F4\u7684\u5927\u5C0F\u4EC5\u53D7\u672C\u5730\u5185\u5B58\u9650\u5236
                                                                      3. \u5BF9\u6C38\u4E45\u4EE3\u8C03\u4F18\u56F0\u96BE
                                                                    4. \u65B9\u6CD5\u533A\u7684\u5783\u573E\u56DE\u6536\u4E3B\u8981\u56DE\u6536\u5E9F\u5F03\u7684\u5E38\u91CF\u548C\u4E0D\u518D\u4F7F\u7528\u7684\u7C7B\u578B

                                                                    5. StringTable\uFF08\u5B57\u7B26\u4E32\u5E38\u91CF\u6216\u8005\u8BF4\u5B57\u9762\u91CF\uFF09\u4E3A\u4EC0\u4E48\u8981\u8C03\u6574\u5230\u5806\u7A7A\u95F4\u4E2D\uFF1F

                                                                      \u56E0\u4E3A\u6C38\u4E45\u4EE3\u7684\u56DE\u6536\u6548\u7387\u5F88\u4F4E\uFF0C\u6C38\u4E45\u4EE3\u7684\u56DE\u6536\u662F\u5728full gc\u7684\u65F6\u5019\u624D\u4F1A\u89E6\u53D1\uFF0C\u800Cminor gc\u662F\u9AD8\u9891\u89E6\u53D1\u7684\uFF0C\u800Cfull gc\u662F\u4F4E\u9891\u89E6\u53D1\u7684\uFF08\u8C03\u4F18\u5C31\u662F\u4E3A\u4E86\u51CF\u5C11gc\uFF09\uFF0C\u6240\u4EE5\u5BFC\u81F4StringTable\u7684\u56DE\u6536\u6548\u7387\u4E0D\u9AD8

                                                                      \u800C\u6211\u4EEC\u5F00\u53D1\u4E2D\u6709\u5927\u91CF\u7684\u5B57\u7B26\u4E32\u88AB\u521B\u5EFA\uFF0C\u56DE\u6536\u6548\u7387\u4F4E\uFF0C\u5BFC\u81F4\u6C38\u4E45\u4EE3\u5185\u5B58\u4E0D\u8DB3\uFF0C\u653E\u5230\u5806\u91CC\uFF0C\u80FD\u53CA\u65F6\u56DE\u6536\u5185\u5B58

                                                                      full gc\u662F\u5728\u8001\u5E74\u4EE3\u7A7A\u95F4\u4E0D\u8DB3\u7684\u65F6\u5019\u4F1A\u88AB\u89E6\u53D1

                                                                    6. \u9759\u6001\u5F15\u7528\uFF08\u9759\u6001\u53D8\u91CF\u540D\uFF09\u5BF9\u5E94\u7684\u5BF9\u8C61\u5B9E\u4F53\u59CB\u7EC8\u90FD\u5B58\u5728\u5806\u7A7A\u95F4

                                                                      \u524D\u9762\u8BF4\u7684\u9759\u6001\u53D8\u91CF\u5B58\u5728\u7684\u4F4D\u7F6E\u6709\u4E00\u4E2A\u53D8\u5316\uFF0C\u57281.6\u662F\u6C38\u4E45\u4EE3\uFF0C1.7\u30011.8\u662F\u5728\u5806\u7A7A\u95F4\uFF0C\u8FD9\u662F\u8BF4\u7684\u9759\u6001\u53D8\u91CF\u540D\uFF01\uFF08\u53F3\u8FB9\u7684\u5BF9\u8C61\u5B9E\u4F53\u59CB\u7EC8\u5728\u5806\u7A7A\u95F4\uFF09

                                                                    \u65B9\u6CD5\u533A\u7684\u5783\u573E\u56DE\u6536

                                                                    1. \u65B9\u6CD5\u533A\u7684\u5783\u573E\u6536\u96C6\u4E3B\u8981\u56DE\u6536\u4E24\u90E8\u5206\u5185\u5BB9

                                                                      • \u8FD0\u884C\u65F6\u5E38\u91CF\u6C60\u4E2D\u5E9F\u5F03\u7684\u5E38\u91CF
                                                                      • \u4E0D\u518D\u4F7F\u7528\u7684\u7C7B\u578B
                                                                    2. \u65B9\u6CD5\u533A\u7684\u5783\u573E\u56DE\u6536\u6548\u679C\u53EF\u80FD\u4E0D\u597D\uFF0C\u4F46\u662F\u662F\u6709\u5FC5\u8981\u7684

                                                                    3. \u5E38\u91CF\u6C60\u4E2D\u4E3B\u8981\u5B58\u653E\u4E24\u5927\u7C7B\u5E38\u91CF

                                                                      • \u5B57\u9762\u91CF
                                                                      • \u7B26\u53F7\u5F15\u7528
                                                                    4. \u8981\u60F3\u5224\u65AD\u4E00\u4E2A\u7C7B\u4E0D\u518D\u4F7F\u7528\uFF0C\u9700\u8981\u540C\u65F6\u6EE1\u8DB3\u4E0B\u9762\u4E09\u4E2A\u6761\u4EF6\uFF1A

                                                                      image-20210813234222298

                                                                    \u5BF9\u8C61\u7684\u5B9E\u4F8B\u5316\u5E03\u5C40\u4E0E\u8BBF\u95EE\u5B9A\u4F4D

                                                                    1. \u521B\u5EFA\u5BF9\u8C61\u7684\u65B9\u5F0F

                                                                      image-20210820161439568

                                                                    2. \u521B\u5EFA\u5BF9\u8C61\u7684\u6B65\u9AA4

                                                                      image-20210820162323011

                                                                      \u5982\u679C\u5185\u5B58\u4E0D\u662F\u89C4\u6574\u7684\uFF0C\u5DF2\u4F7F\u7528\u7684\u5185\u5B58\u548C\u672A\u4F7F\u7528\u7684\u5185\u5B58\u76F8\u4E92\u4EA4\u9519\uFF0C\u90A3\u4E48\u865A\u62DF\u673A\u5C06\u91C7\u7528\u7684\u662F\u7A7A\u95F2\u5217\u8868\u6CD5\u6765\u4E3A\u5BF9\u8C61\u5206\u914D\u5185\u5B58

                                                                      \u610F\u601D\u662F\u865A\u62DF\u673A\u7EF4\u62A4\u4E86\u4E00\u4E2A\u5217\u8868\uFF0C\u8BB0\u5F55\u4E0A\u54EA\u4E9B\u5185\u5B58\u5757\u662F\u53EF\u7528\u7684\uFF0C\u518D\u5206\u914D\u7684\u65F6\u5019\u4ECE\u5217\u8868\u4E2D\u627E\u5230\u4E00\u5757\u8DB3\u591F\u5927\u7684\u7A7A\u95F4\u5212\u5206\u7ED9\u5BF9\u8C61\u5B9E\u4F8B\uFF0C\u5E76\u66F4\u65B0\u5217\u8868\u4E0A\u7684\u5185\u5BB9\uFF0C\u8FD9\u79CD\u5206\u914D\u65B9\u5F0F\u53EB\u7A7A\u95F2\u5217\u8868

                                                                      \u6307\u9488\u78B0\u649E\u5BF9\u5E94\u6807\u8BB0\u538B\u7F29\u7B97\u6CD5\uFF0C\u7A7A\u95F2\u5217\u8868\u5206\u914D\u5BF9\u5E94\u4E8E\u6807\u8BB0\u6E05\u9664\u7B97\u6CD5\uFF08CMS\u8FD9\u4E2A\u5783\u573E\u6536\u96C6\u5668\u5C31\u7528\u7684\u6807\u8BB0\u6E05\u9664\u7B97\u6CD5\uFF09

                                                                      \u91C7\u7528\u4EC0\u4E48\u65B9\u5F0F\u6765\u4E3A\u5BF9\u8C61\u5206\u914D\u5185\u5B58\uFF0C\u8FD8\u8981\u53D6\u51B3\u4E8E\u7528\u7684\u54EA\u79CD\u5783\u573E\u6536\u96C6\u5668\uFF0C\u662F\u7528\u7684\u6807\u8BB0\u538B\u7F29\u7B97\u6CD5\u8FD8\u662F\u6807\u8BB0\u6E05\u9664\u7B97\u6CD5\u3002

                                                                      \u7B2C\u56DB\u6B65\u662F\u5BF9\u5C5E\u6027\u7684\u9ED8\u8BA4\u521D\u59CB\u5316

                                                                      \u7B2C\u516D\u6B65\u662F\u5BF9\u5C5E\u6027\u7684\u663E\u5F0F\u521D\u59CB\u5316\uFF0C\u5305\u62EC\u4EE3\u7801\u5757\u548C\u6784\u9020\u5668\u4E2D\u5BF9\u53D8\u91CF\u7684\u521D\u59CB\u5316\u3002\u662F\u5728<init>\u8FD9\u4E00\u6B65\u4E2D\u3002\u8981\u533A\u5206<init>\u548C<clinit>\uFF0C\u540E\u8005\u662F\u7C7B\u52A0\u8F7D\u8FC7\u7A0B\u7684\u521D\u59CB\u5316\u9636\u6BB5\uFF0C\u524D\u8005\u662F\u5BF9\u5E94\u4E8E\u7C7B\u91CC\u9762\u7684\u6784\u9020\u5668

                                                                    3. \u5BF9\u8C61\u5B9E\u4F8B\u5316\u7684\u8FC7\u7A0B

                                                                      1. \u52A0\u8F7D\u7C7B\u5143\u4FE1\u606F\uFF08\u5224\u65AD\u7C7B\u662F\u5426\u52A0\u8F7D\u3001\u94FE\u63A5\u3001\u521D\u59CB\u5316\uFF09
                                                                      2. \u4E3A\u5BF9\u8C61\u5206\u914D\u5185\u5B58\uFF08\u8981\u5206\u5185\u5B58\u7A7A\u95F4\u662F\u5426\u89C4\u6574\uFF0C\u89C4\u6574\u5BF9\u5E94\u4E8E\u6307\u9488\u78B0\u649E\uFF0C\u4E0D\u89C4\u6574\u57FA\u4E8E\u7A7A\u95F2\u5217\u8868\uFF09\uFF08\u5783\u573E\u56DE\u6536\u5206\u522B\u5BF9\u5E94\u4E8E\u6807\u8BB0\u538B\u7F29\u7B97\u6CD5\u548C\u6807\u8BB0\u6E05\u9664\u7B97\u6CD5\uFF09
                                                                      3. \u5904\u7406\u5E76\u53D1\u5B89\u5168\u95EE\u9898
                                                                      4. \u5BF9\u5C5E\u6027\u7684\u9ED8\u8BA4\u521D\u59CB\u5316
                                                                      5. \u8BBE\u7F6E\u5BF9\u8C61\u5934\u7684\u4FE1\u606F
                                                                      6. \u5BF9\u5C5E\u6027\u7684\u663E\u5F0F\u521D\u59CB\u5316\uFF08\u5BF9\u5BF9\u8C61\u771F\u6B63\u610F\u4E49\u4E0A\u7684\u521D\u59CB\u5316\uFF09
                                                                    4. new\u7684\u5BF9\u8C61\u653E\u5728\u5806\u7A7A\u95F4\u4E2D\u7684\uFF0C\u90A3\u4E48\u8FD9\u4E2A\u5806\u7A7A\u95F4\u4E2D\u7684\u5BF9\u8C61\u6709\u54EA\u51E0\u90E8\u5206\uFF1F

                                                                      image-20210820164458201

                                                                      image-20210906143610290

                                                                      \u8FD0\u884C\u65F6\u5143\u6570\u636EMark Word\u683C\u5F0F\uFF1A

                                                                      image-20210906171812809

                                                                    5. image-20210820165552514

                                                                    6. \u5BF9\u8C61\u7684\u8BBF\u95EE\u5B9A\u4F4D

                                                                      HOTSPOT\u91C7\u7528\u7684\u76F4\u63A5\u6307\u9488\u7684\u65B9\u5F0F\uFF0C\u5373\u901A\u8FC7\u6808\u4E0A\u7684\u5BF9\u8C61\u5F15\u7528\u6307\u5411\u5806\u4E2D\u7684\u5B9E\u4F8B\uFF0C\u5806\u4E2D\u7684\u5B9E\u4F8B\u5BF9\u8C61\u6709\u4E00\u90E8\u5206\u53EB\u5BF9\u8C61\u5934\uFF0C\u5BF9\u8C61\u5934\u91CC\u6709\u7C7B\u578B\u6307\u9488\u6307\u5411\u65B9\u6CD5\u533A\u4E2D\u7684\u5BF9\u8C61\u7684\u7C7B\u578B\u6570\u636E\uFF08\u5373\u7C7B\u578B\u4FE1\u606F\uFF09\uFF0C\u8FD9\u79CD\u65B9\u5F0F\u6CA1\u6709\u5728\u5806\u7A7A\u95F4\u4E13\u95E8\u5F00\u8F9F\u7A7A\u95F4\u6765\u8BB0\u5F55\u53E5\u67C4

                                                                    \u76F4\u63A5\u5185\u5B58

                                                                    1. \u8FD0\u884C\u65F6\u6570\u636E\u533A\u662F\u865A\u62DF\u673A\u5185\u5B58\u7684\u6982\u5FF5

                                                                    2. \u76F4\u63A5\u5185\u5B58\u4E0D\u5C5E\u4E8E\u865A\u62DF\u673A\u5185\u5B58\uFF0C\u4E5F\u4E0D\u5305\u542B\u5728jvm\u89C4\u8303\u91CC

                                                                    3. \u65B9\u6CD5\u533A\u7684\u5177\u4F53\u5B9E\u73B0\u5143\u7A7A\u95F4\u5C31\u662F\u7528\u7684\u76F4\u63A5\u5185\u5B58\uFF0C\u4E5F\u5C31\u662F\u672C\u5730\u8FD0\u884C\u5185\u5B58\uFF0C\u662FJava\u5806\u5916\u7684\uFF0C\u76F4\u63A5\u5411\u7CFB\u7EDF\u7533\u8BF7\u7684\u5185\u5B58\u7A7A\u95F4\uFF0C\u6765\u6E90\u4E8ENIO

                                                                    4. Java\u5806\u3001\u6808\u90FD\u662F\u865A\u62DF\u673A\u5185\u5B58\u5C42\u9762\u7684

                                                                    5. \u901A\u8FC7\u7F13\u51B2\u533A\u64CD\u4F5C\u672C\u5730\u5185\u5B58

                                                                      ByteBuffer\u7684allocateDirect\u53EF\u4EE5\u76F4\u63A5\u5206\u914D\u672C\u5730\u5185\u5B58\u7A7A\u95F4

                                                                      \u51FA\u4E8E\u6027\u80FD\u8003\u8651\uFF0C\u8BFB\u5199\u9891\u7E41\u7684\u573A\u5408\u53EF\u80FD\u4F1A\u8003\u8651\u4F7F\u7528\u76F4\u63A5\u5185\u5B58

                                                                    6. \u8BFB\u5199\u6587\u4EF6\uFF0C\u4F7F\u7528\u975E\u76F4\u63A5\u7F13\u51B2\u533A\uFF0C\u9700\u8981\u4E0E\u78C1\u76D8\u4EA4\u4E92\uFF0C\u9700\u8981\u7531\u7528\u6237\u6001\u5207\u6362\u5230\u5185\u6838\u6001\u3002\u5BFC\u81F4\u6548\u7387\u4F4E

                                                                      \u4F7F\u7528\u76F4\u63A5\u7F13\u51B2\u533A\u76F4\u63A5\u548C\u7269\u7406\u5185\u5B58\u8FDB\u884C\u4EA4\u4E92\uFF0C\u6CA1\u6709\u7528\u6237\u6001\u548C\u5185\u6838\u6001copy\u7684\u8FC7\u7A0B

                                                                    7. \u76F4\u63A5\u5185\u5B58\u4E5F\u4F1A\u5BFC\u81F4OOM\u5F02\u5E38

                                                                    8. \u76F4\u63A5\u5185\u5B58\u5206\u914D\u56DE\u6536\u6210\u672C\u8F83\u9AD8\uFF0C\u4E0D\u53D7JVM\u5185\u5B58\u56DE\u6536\u7BA1\u7406

                                                                    9. \u76F4\u63A5\u5185\u5B58\u5927\u5C0F\u53EF\u4EE5\u901A\u8FC7MaxDirectMemorySize\u8BBE\u7F6E

                                                                    \u6267\u884C\u5F15\u64CE

                                                                    \u6267\u884C\u5F15\u64CE\u6982\u8FF0

                                                                    1. Java\u865A\u62DF\u673A\u7C97\u7565\u89D2\u5EA6\u6765\u5206\u53EF\u4EE5\u5206\u4E3A\u4E09\u5C42

                                                                      • \u7C7B\u52A0\u8F7D\u5668\u5B50\u7CFB\u7EDF
                                                                        • \u52A0\u8F7D
                                                                        • \u94FE\u63A5
                                                                        • \u521D\u59CB\u5316
                                                                      • \u8FD0\u884C\u65F6\u6570\u636E\u533A
                                                                        • \u5806\u7A7A\u95F4
                                                                        • \u65B9\u6CD5\u533A
                                                                        • \u865A\u62DF\u673A\u6808
                                                                        • \u672C\u5730\u65B9\u6CD5\u6808
                                                                        • \u7A0B\u5E8F\u8BA1\u6570\u5668
                                                                      • \u6267\u884C\u5F15\u64CE
                                                                        • JIT\u5373\u65F6\u7F16\u8BD1\u5668
                                                                        • \u89E3\u91CA\u5668
                                                                        • \u5783\u573E\u56DE\u6536\u5668
                                                                    2. \u6267\u884C\u5F15\u64CE\u662F\u5C06\u5B57\u8282\u7801\u6307\u4EE4\u8F6C\u6362\u6210\u673A\u5668\u6307\u4EE4\uFF0C\u4ECE\u800C\u4F7F\u5F97\u5B57\u8282\u7801\u6587\u4EF6\u80FD\u591F\u88ABCPU\u6240\u8BC6\u522B

                                                                    3. \u6267\u884C\u5F15\u64CE\u662FJava\u865A\u62DF\u673A\u6838\u5FC3\u7EC4\u6210\u90E8\u5206\u4E4B\u4E00

                                                                    4. \u865A\u62DF\u673A\u662F\u4E00\u4E2A\u76F8\u5BF9\u4E8E\u7269\u7406\u673A\u7684\u6982\u5FF5\uFF0C\u8FD9\u4E24\u79CD\u673A\u5668\u90FD\u6709\u4EE3\u7801\u6267\u884C\u80FD\u529B

                                                                      \u533A\u522B\u662F\u865A\u62DF\u673A\u7684\u6267\u884C\u5F15\u64CE\u662F\u7531\u8F6F\u4EF6\u81EA\u884C\u5B9E\u73B0\u7684\u3002\uFF08\u4E0D\u53D7\u7269\u7406\u6761\u4EF6\u5236\u7EA6\uFF09

                                                                      \u7269\u7406\u673A\u7684\u6267\u884C\u5F15\u64CE\u662F\u76F4\u63A5\u5EFA\u7ACB\u5728\u5904\u7406\u5668\u3001\u7F13\u5B58\u3001\u6307\u4EE4\u96C6\u548C\u64CD\u4F5C\u7CFB\u7EDF\u5C42\u9762\u4E0A\u7684\u3002

                                                                    5. JVM\u4E5F\u662FJava\u8BED\u8A00\u7684\u8DE8\u5E73\u53F0\u6027\u7684\u539F\u56E0

                                                                    6. JVM\u4E3B\u8981\u4EFB\u52A1\u5C31\u662F\u88C5\u5728\u5B57\u8282\u7801\u6587\u4EF6\u5230\u865A\u62DF\u673A\u5185\u90E8

                                                                      \u5B57\u8282\u7801\u867D\u7136\u662F\u4E8C\u8FDB\u5236\u7684\uFF0C\u5B57\u8282\u7801\u6587\u4EF6\u662F\u4E8C\u8FDB\u5236\u6587\u4EF6\uFF0C\u4F46\u662F\u5B57\u8282\u7801\u5E76\u4E0D\u80FD\u591F\u76F4\u63A5\u8FD0\u884C\u5728\u64CD\u4F5C\u7CFB\u7EDF\u4E4B\u4E0A\uFF0C\u56E0\u4E3A\u5B57\u8282\u7801\u6307\u4EE4\u5E76\u975E\u7B49\u4EF7\u4E8E\u80FD\u591F\u88ABCPU\u6240\u8BC6\u522B\u7684\u673A\u5668\u6307\u4EE4\uFF0C\u5B57\u8282\u7801\u6587\u4EF6\u5185\u90E8\u5305\u542B\u7684\u4EC5\u4EC5\u662F\u4E00\u4E9B\u80FD\u591F\u88ABJVM\u8BC6\u522B\u7684\u5B57\u8282\u7801\u6307\u4EE4\u3001\u7B26\u53F7\u8868\uFF0C\u4EE5\u53CA\u5176\u4ED6\u8F85\u52A9\u4FE1\u606F

                                                                      \u90A3\u4E48\uFF0C\u60F3\u8BA9\u4E00\u4E2AJava\u7A0B\u5E8F\u8FD0\u884C\u8D77\u6765\uFF0C\u6267\u884C\u5F15\u64CE\u7684\u4EFB\u52A1\u5C31\u662F\u5C06\u5B57\u8282\u7801\u6307\u4EE4\u89E3\u91CA\u3001\u7F16\u8BD1\u6210\u4E3A\u5BF9\u5E94\u5E73\u53F0\u4E0A\u7684\u672C\u5730\u673A\u5668\u6307\u4EE4\u624D\u53EF\u4EE5\uFF0C\u7B80\u5355\u6765\u8BF4\uFF0CJVM\u4E2D\u7684\u6267\u884C\u5F15\u64CE\u5145\u5F53\u4E86\u5C06\u9AD8\u7EA7\u8BED\u8A00\u7FFB\u8BD1\u4E3A\u673A\u5668\u8BED\u8A00\u7684\u8BD1\u8005

                                                                    7. \u6267\u884C\u5F15\u64CE\u7684\u5DE5\u4F5C\u8FC7\u7A0B

                                                                      image-20210824181108997

                                                                    Java\u4EE3\u7801\u7F16\u8BD1\u548C\u6267\u884C\u7684\u8FC7\u7A0B

                                                                    1. \u9996\u5148\u8981\u660E\u786E\uFF0C\u5B57\u8282\u7801\u6587\u4EF6\u53EA\u80FD\u591F\u88ABJVM\u8BC6\u522B\uFF0C\u800C\u4E0D\u80FD\u591F\u88AB\u64CD\u4F5C\u7CFB\u7EDF\u6216\u8005\u8BF4CPU\u8FD9\u79CD\u786C\u4EF6\u5C42\u9762\u8BC6\u522B\uFF0C\u90A3\u4E48\u60F3\u8981\u6267\u884C\u5B57\u8282\u7801\u6587\u4EF6\uFF0C\u5C06\u5B57\u8282\u7801\u6587\u4EF6\u52A0\u8F7D\u5230JVM\u4E4B\u540E\uFF0CJVM\u7684\u6267\u884C\u5F15\u64CE\u8981\u5C06\u52A0\u8F7D\u8FDB\u6765\u7684\u5B57\u8282\u7801\u6587\u4EF6\u89E3\u91CA\u3001\u7F16\u8BD1\u6210\u64CD\u4F5C\u7CFB\u7EDF\u80FD\u591F\u8BC6\u522B\u7684\u673A\u5668\u6307\u4EE4\u3002\u53EF\u4EE5\u7406\u89E3\u4E3A\u6267\u884C\u5F15\u64CE\u5C31\u662F\u5C06\u5B57\u8282\u7801\u6307\u4EE4\u7FFB\u8BD1\u6210\u673A\u5668\u6307\u4EE4\u7684\u7FFB\u8BD1\u5B98

                                                                    2. image-20210824181700991

                                                                      \u6A59\u8272\u7684\u8FC7\u7A0B\u662F\u7531javac.exe\u5B8C\u6210\u7684\uFF0C\u5F62\u6210\u4E00\u4E2A\u7EBF\u6027\u7684\u5B57\u8282\u7801\u4E8C\u8FDB\u5236\u6D41

                                                                      \u5C31\u76F8\u5F53\u4E8E\u524D\u7AEF\u7F16\u8BD1\u5668\uFF0C\u5C31\u662F\u7B2C\u4E00\u6B21\u7F16\u8BD1\uFF0C\u7F16\u8BD1\u6210.class\u5B57\u8282\u7801\u6587\u4EF6\u7684\u8FC7\u7A0B

                                                                      \u84DD\u8272\u7684\u5C31\u662F\u7B2C\u4E8C\u6B21\u7F16\u8BD1\uFF0C\u5C06\u5B57\u8282\u7801\u6307\u4EE4\u7F16\u8BD1\u6210\u76EE\u6807\u4EE3\u7801\u4E5F\u5C31\u662F\u673A\u5668\u6307\u4EE4

                                                                      \u7EFF\u8272\u7684\u5C31\u662F\u6267\u884C\u5F15\u64CE\u7684\u89E3\u91CA\u5668\u9010\u884C\u5BF9\u5B57\u8282\u7801\u6307\u4EE4\u8FDB\u884C\u89E3\u91CA\u6267\u884C

                                                                      Java\u8BED\u8A00\u662F\u534A\u89E3\u91CA\u578B\u534A\u7F16\u8BD1\u578B\u8BED\u8A00\u8BF4\u7684\u5C31\u662F\u8FD9\u4E2A\u610F\u601D

                                                                      \u6A59\u8272\u7684\u8FC7\u7A0B\u8DDFJava\u865A\u62DF\u673A\u662F\u6CA1\u6709\u5173\u7CFB\u7684\uFF0C\u662F\u751F\u6210\u5B57\u8282\u7801\u6587\u4EF6\u7684\u65F6\u5019

                                                                      \u5B57\u8282\u7801\u6587\u4EF6\u52A0\u8F7D\u8FDBJava\u865A\u62DF\u673A\u4E4B\u540E\u624D\u548CJVM\u6709\u5173\u7CFB

                                                                    3. \u4EC0\u4E48\u662F\u89E3\u91CA\u5668\uFF1F

                                                                      \u89E3\u91CA\u5668\uFF1A\u5F53Java\u865A\u62DF\u673A\u542F\u52A8\u65F6\u4F1A\u6839\u636E\u9884\u5B9A\u4E49\u7684\u89C4\u8303\u5BF9\u5B57\u8282\u7801\u91C7\u7528\u9010\u884C\u89E3\u91CA\u7684\u65B9\u5F0F\u6267\u884C\uFF0C\u5C06\u6BCF\u6761\u5B57\u8282\u7801\u6587\u4EF6\u4E2D\u7684\u5185\u5BB9\u201C\u7FFB\u8BD1\u201D\u6210\u5BF9\u5E94\u5E73\u53F0\u7684\u672C\u5730\u673A\u5668\u6307\u4EE4\u6267\u884C\u3002\u4E5F\u5C31\u662F\u8BF4\u89E3\u91CA\u5668\uFF0C\u4E5F\u8981\u5C06\u5B57\u8282\u7801\u6307\u4EE4\u7FFB\u8BD1\u6210\u673A\u5668\u6307\u4EE4

                                                                      \u4EC0\u4E48\u662FJIT\u5373\u65F6\u7F16\u8BD1\u5668\uFF1F

                                                                      \u865A\u62DF\u673A\u5C06\u5B57\u8282\u7801\u76F4\u63A5\u7FFB\u8BD1\u6210\u548C\u672C\u5730\u673A\u5668\u5E73\u53F0\u76F8\u5173\u7684\u673A\u5668\u8BED\u8A00\uFF0C\u6CA1\u6709\u8BF4\u9A6C\u4E0A\u53BB\u6267\u884C

                                                                      \u89E3\u91CA\u5668\u7684\u4F5C\u7528\u662F\u4FDD\u8BC1\u54CD\u5E94\u7684\u901F\u5EA6

                                                                      \u7F16\u8BD1\u5668\u662F\u4FDD\u8BC1\u6267\u884C\u7684\u6548\u7387\uFF0C\u5BF9\u70ED\u70B9\u4EE3\u7801\u7FFB\u8BD1\u6210\u673A\u5668\u6307\u4EE4\uFF0C\u8FDB\u884C\u4E00\u4E2A\u7F13\u5B58\uFF0C\u5B58\u5728\u65B9\u6CD5\u533A\u4E2D\u3002\uFF08\u597D\u5904\u5C31\u662F\u53BB\u8C03\u7528\u7684\u65F6\u5019\uFF0C\u76F4\u63A5\u53BB\u8C03\u7528\u7F13\u5B58\u7684\u5DF2\u7ECF\u7F16\u8BD1\u597D\u7684\u673A\u5668\u6307\u4EE4\uFF0C\u6548\u7387\u9AD8\uFF09

                                                                    4. \u89E3\u91CA\u5668\u89E3\u91CA\u6267\u884C\u5B57\u8282\u7801\u6307\u4EE4\uFF0C\u4F9D\u8D56\u7A0B\u5E8F\u8BA1\u6570\u5668\uFF0C\u6BCF\u5F53\u89E3\u91CA\u6267\u884C\u5B8C\u4E00\u6761\u673A\u5668\u6307\u4EE4\u540E\uFF0C\u7A0B\u5E8F\u8BA1\u6570\u5668\u4F1A\u66F4\u65B0\u4E0B\u4E00\u6761\u9700\u8981\u6267\u884C\u7684\u5B57\u8282\u7801\u6307\u4EE4\u7684\u6307\u4EE4\u5730\u5740\u3002

                                                                      \u65E0\u8BBA\u662F\u89E3\u91CA\u6267\u884C\u8FD8\u662FJIT\u5373\u65F6\u7F16\u8BD1\u5668\u8FDB\u884C\u7F16\u8BD1\uFF0C\u90FD\u8981\u5C06\u5B57\u8282\u7801\u6587\u4EF6\u8F6C\u6362\u6210\u64CD\u4F5C\u7CFB\u7EDF\u80FD\u61C2\u7684\u673A\u5668\u6307\u4EE4

                                                                    \u673A\u5668\u7801\u3001\u6307\u4EE4\u548C\u6C47\u7F16\u8BED\u8A00

                                                                    1. \u673A\u5668\u7801\u5C31\u662F\u4E8C\u8FDB\u5236\u7F16\u7801\u8868\u793A\u7684\u6307\u4EE4\uFF0C\u53EB\u673A\u5668\u6307\u4EE4\u7801\u6216\u673A\u5668\u8BED\u8A00\u3002

                                                                      \u5C31\u662F0101\u8FD9\u79CD\u7684\u4E8C\u8FDB\u5236\u7B26\u53F7

                                                                      \u673A\u5668\u8BED\u8A00\u5C31\u662F\u4E8C\u8FDB\u5236\uFF0C\u7279\u70B9\u5C31\u662FCPU\u53EF\u4EE5\u76F4\u63A5\u8BFB\u53D6\u8FD0\u884C\uFF0C\u673A\u5668\u6307\u4EE4\u662F\u548CCPU\u5BC6\u5207\u76F8\u5173\u7684\u3002

                                                                    2. \u6307\u4EE4\u5C31\u662F\u628A\u673A\u5668\u7801\u4E2D\u7279\u5B9A\u4E8C\u8FDB\u5236\u5E8F\u5217\uFF0C\u7B80\u5316\u6210\u5BF9\u5E94\u7684\u6307\u4EE4\uFF0C\u6BD4\u5982mov\u3001inc

                                                                    3. \u6C47\u7F16\u8BED\u8A00\u4E5F\u662F\u4E0D\u53EF\u4EE5\u88AB\u786C\u4EF6\u8BC6\u522B\u7684\uFF0C\u4E5F\u662F\u9700\u8981\u7FFB\u8BD1\u6210\u673A\u5668\u6307\u4EE4\uFF08\u4E8C\u8FDB\u5236\uFF09\u3002

                                                                    4. \u9AD8\u7EA7\u8BED\u8A00\u5C31\u662F\u53EF\u4EE5\u7406\u89E3\u4E3A\u5C42\u5C42\u5C01\u88C5\u7684\uFF0C\u6700\u7EC8\u4E5F\u8981\u88AB\u7FFB\u8BD1\u6210\u673A\u5668\u6307\u4EE4\uFF0C\u624D\u80FD\u591F\u88AB\u6267\u884C\u3002\u6BD4\u5982JVM\u5C06\u5B57\u8282\u7801\u6307\u4EE4\u7FFB\u8BD1\u6210\u673A\u5668\u6307\u4EE4\u3002\u4E00\u79CD\u662F\u89E3\u91CA\u6267\u884C\uFF0C\u4E00\u79CD\u662F\u7F16\u8BD1\u6267\u884C\u3002

                                                                    5. image-20210825160558621

                                                                    6. \u5B57\u8282\u7801\u6587\u4EF6\u662F\u4E0E\u786C\u4EF6\u73AF\u5883\u65E0\u5173\u7684\uFF0C\u5C31\u662F\u4E3A\u4E86\u5B9E\u73B0\u8F6F\u4EF6\u8FD0\u884C\u548C\u8F6F\u4EF6\u73AF\u5883\u3002

                                                                      \u8FD9\u5C31\u662FJava\u8BED\u8A00\u5177\u6709\u8DE8\u5E73\u53F0\u6027\u7684\u539F\u56E0

                                                                    7. \u5B57\u8282\u7801\u6587\u4EF6\u5177\u6709\u8DE8\u5E73\u53F0\u7684\u7279\u6027

                                                                    \u89E3\u91CA\u5668

                                                                    1. \u89E3\u91CA\u5668\u5728\u8FD0\u884C\u65F6\u91C7\u7528\u9010\u884C\u89E3\u91CA\u5B57\u8282\u7801\u6267\u884C\u7A0B\u5E8F\u7684\u60F3\u6CD5

                                                                    2. \u6267\u884C\u5F15\u64CE\u91CC\u7684\u89E3\u91CA\u5668\u4E5F\u662F\u8981\u5C06\u5B57\u8282\u7801\u6307\u4EE4\u7FFB\u8BD1\u6210\u673A\u5668\u6307\u4EE4\u6267\u884C\uFF0C\u5E76\u4E0D\u662F\u8BF4\u53EA\u6709JIT\u5373\u65F6\u7F16\u8BD1\u5668\uFF0C\u624D\u4F1A\u5BF9\u5B57\u8282\u7801\u6307\u4EE4\u8FDB\u884C\u4E8C\u6B21\u7F16\u8BD1\uFF0C\u7F16\u8BD1\u6210\u673A\u5668\u6307\u4EE4\u7F13\u5B58\u8D77\u6765\uFF0C\u89E3\u91CA\u5668\u548C\u7F16\u8BD1\u5668\u90FD\u662F\u7FFB\u8BD1\u8005\uFF0C\u6700\u7EC8\u90FD\u8981\u7FFB\u8BD1\u6210\u673A\u5668\u6307\u4EE4\u624D\u80FD\u88AB\u786C\u4EF6\u6240\u8BC6\u522B

                                                                    3. \u5F53\u4E00\u6761\u5B57\u8282\u7801\u6307\u4EE4\u88AB\u89E3\u91CA\u6267\u884C\u5B8C\u6210\u540E\uFF0C\u63A5\u7740\u518D\u6839\u636EPC\u5BC4\u5B58\u5668\u4E2D\u8BB0\u5F55\u7684\u4E0B\u4E00\u6761\u9700\u8981\u88AB\u6267\u884C\u7684\u5B57\u8282\u7801\u6307\u4EE4\u6267\u884C\u89E3\u91CA\u64CD\u4F5C

                                                                    4. \u57FA\u4E8E\u89E3\u91CA\u5668\u6267\u884C\u5DF2\u7ECF\u662F\u4F4E\u6548\u7684\u4EE3\u540D\u8BCD\u3002

                                                                      C\u548CC++\u662F\u7F16\u8BD1\u548C\u6C47\u7F16\u4E24\u4E2A\u8FC7\u7A0B\uFF0C\u7F16\u8BD1\u662F\u628A\u9AD8\u7EA7\u8BED\u8A00\u7FFB\u8BD1\u4E3A\u6C47\u7F16\u8BED\u8A00\u7684\u8FC7\u7A0B\uFF0C\u6C47\u7F16\u662F\u628A\u6C47\u7F16\u8BED\u8A00\u7FFB\u8BD1\u6210\u673A\u5668\u6307\u4EE4\u7684\u8FC7\u7A0B\u3002

                                                                      python\u662F\u57FA\u4E8E\u89E3\u91CA\u5668\u6267\u884C\uFF0C\u662F\u52A8\u6001\u8BED\u8A00\uFF0C\u5199\u5F88\u7B80\u5355\uFF0C\u4F46\u662F\u6267\u884C\u6548\u7387\u5C31\u66F4\u4F4E\u3002\u5199\u7684\u8BED\u8A00\u66F4\u63A5\u8FD1\u673A\u5668\uFF0C\u90A3\u4E48\u6267\u884C\u6548\u7387\u5C31\u66F4\u9AD8\u3002

                                                                    JIT\u7F16\u8BD1\u5668

                                                                    1. \u5373\u65F6\u7F16\u8BD1\uFF0C\u5C31\u662F\u5C06\u70ED\u70B9\u7684\u5B57\u8282\u7801\u6307\u4EE4\u7F16\u8BD1\u6210\u673A\u5668\u7801\uFF0C\u6BCF\u6B21\u51FD\u6570\u6267\u884C\u65F6\uFF0C\u53EA\u9700\u8981\u8C03\u7528\u7F16\u8BD1\u597D\u7684\u673A\u5668\u7801\uFF0C\u56E0\u4E3A\u7F16\u8BD1\u597D\u7684\u673A\u5668\u7801\u7F13\u5B58\u5728\u65B9\u6CD5\u533A\u4E2D\u4F9B\u8C03\u7528

                                                                    2. \u89E3\u91CA\u5668\u7684\u4F18\u52BF\u662F\u7ACB\u523B\u9010\u6761\u89E3\u91CA\u6267\u884C\u5B57\u8282\u7801\u6307\u4EE4\uFF0C\u54CD\u5E94\u901F\u5EA6\u5FEB\u3002

                                                                      JIT\u7F16\u8BD1\u5668\u7684\u4F18\u52BF\u662F\u54CD\u5E94\u901F\u5EA6\u6162\uFF0C\u56E0\u4E3A\u9700\u8981\u7F16\u8BD1\u6210\u673A\u5668\u6307\u4EE4\u7F13\u5B58\u8FD9\u4E2A\u8FC7\u7A0B\uFF0C\u4F46\u662F\u6267\u884C\u6548\u7387\u9AD8\u3002

                                                                    3. \u5F53\u865A\u62DF\u673A\u542F\u52A8\u65F6\uFF0C\u89E3\u91CA\u5668\u53EF\u4EE5\u9996\u5148\u53D1\u6325\u4F5C\u7528\uFF0C\u7701\u53BB\u8BB8\u591A\u4E0D\u5FC5\u8981\u7684\u7F16\u8BD1\u65F6\u95F4\u3002

                                                                      \u968F\u7740\u7A0B\u5E8F\u8FD0\u884C\u65F6\u95F4\u7684\u9000\u5F79\uFF0C\u6839\u636E\u70ED\u70B9\u63A2\u6D4B\u529F\u80FD\uFF0C\u5C06\u6709\u4EF7\u503C\u7684\u4EE3\u7801\u7F16\u8BD1\u6210\u4E3A\u672C\u5730\u673A\u5668\u6307\u4EE4

                                                                    4. JRockit VM \u5185\u90E8\u5C31\u4E0D\u5305\u542B\u89E3\u91CA\u5668\uFF0C\u5B57\u8282\u7801\u5168\u90E8\u4F9D\u9760\u5373\u65F6\u7F16\u8BD1\u5668\u7F16\u8BD1\u540E\u6267\u884C\u3002

                                                                      \u5728\u670D\u52A1\u7AEF\uFF0C\u5BF9\u54CD\u5E94\u901F\u5EA6\u7684\u8981\u6C42\u5E76\u4E0D\u662F\u7279\u522B\u9AD8\uFF0C\u66F4\u5173\u6CE8\u6267\u884C\u6548\u7387\u3001\u6027\u80FD\uFF0C\u6240\u4EE5\u53EF\u4EE5\u780D\u6389\u89E3\u91CA\u5668\u3002\u5BA2\u6237\u7AEF\u5BF9\u54CD\u5E94\u901F\u5EA6\u624D\u6709\u8981\u6C42

                                                                    5. \u4EFB\u4F55\u9AD8\u7EA7\u8BED\u8A00\u7FFB\u8BD1\u6210\u673A\u5668\u6307\u4EE4\u90FD\u8981\u7ECF\u8FC7\u6C47\u7F16\u8FD9\u4E2A\u8FC7\u7A0B\u3002

                                                                    6. \u4EC0\u4E48\u65F6\u5019\u8BA9JIT\u505A\u5373\u65F6\u7F16\u8BD1\uFF1F

                                                                      \u9700\u8981\u5224\u65AD\u4EE3\u7801\u88AB\u8C03\u7528\u6267\u884C\u7684\u9891\u7387\uFF0C\u9891\u7387\u9AD8\u7684\u4EE3\u7801\u88AB\u79F0\u4E3A\u70ED\u70B9\u4EE3\u7801

                                                                    7. JIT\u7F16\u8BD1\u5668\u7F16\u8BD1\u5B57\u8282\u7801\u4E3A\u672C\u5730\u673A\u5668\u6307\u4EE4\uFF0C\u8FD9\u79CD\u7F16\u8BD1\u65B9\u5F0F\u53D1\u751F\u5728\u65B9\u6CD5\u7684\u6267\u884C\u8FC7\u7A0B\u4E2D\uFF0C\u56E0\u6B64\u4E5F\u88AB\u79F0\u4E4B\u4E3A\u6808\u4E0A\u66FF\u6362

                                                                    8. \u57FA\u4E8E\u8BA1\u6570\u5668\u8FDB\u884C\u70ED\u70B9\u63A2\u6D4B

                                                                      • \u65B9\u6CD5\u8C03\u7528\u8BA1\u6570\u5668\u7528\u4E8E\u7EDF\u8BA1\u65B9\u6CD5\u7684\u8C03\u7528\u6B21\u6570
                                                                      • \u56DE\u8FB9\u8BA1\u6570\u5668\u7528\u4E8E\u7EDF\u8BA1\u5FAA\u73AF\u4F53\u6267\u884C\u7684\u5FAA\u73AF\u6B21\u6570
                                                                    9. image-20210825173756594

                                                                      \u4E24\u8BA1\u6570\u5668\u4E4B\u548C\u8D85\u8FC7\u9608\u503C\uFF0C\u89E6\u53D1OSR\u7F16\u8BD1\u5668\u8BF7\u6C42

                                                                    10. image-20210825174714351

                                                                    11. \u53EF\u4EE5\u901A\u8FC7\u53C2\u6570\u8BBE\u7F6E\u4F7Fhotspot\u865A\u62DF\u673A\u53EA\u4F7F\u7528\u89E3\u91CA\u5668\u7684\u6A21\u5F0F\u6216\u8005\u53EA\u4F7F\u7528\u5373\u65F6\u7F16\u8BD1\u5668\u7684\u6A21\u5F0F

                                                                    12. hotspot\u865A\u62DF\u673A\u5185\u7F6E\u4E86\u4E24\u4E2AJIT\u7F16\u8BD1\u5668\uFF0CC1\u7F16\u8BD1\u5668\u548CC2\u7F16\u8BD1\u5668\uFF0CC1\u662Fclient\u6A21\u5F0F\u7684\u7F16\u8BD1\u5668\uFF0CC2\u662Fserver\u6A21\u5F0F\u7684\u7F16\u8BD1\u5668\uFF0C\u5F53\u7535\u8111\u662F64bits\u7684\u64CD\u4F5C\u7CFB\u7EDF\uFF0CJava\u5C31\u662Fserver\u6A21\u5F0F\u7684\uFF0C\u5C31\u4E0D\u7528\u53BB\u8BBE\u7F6E\u4E86

                                                                      C1\u7684\u4F18\u5316\u7A0D\u5FAE\u5F31\u4E00\u4E9B\uFF0CC2\u7684\u4F18\u5316\u66F4\u5F3A\u4E00\u4E9B

                                                                      C1 JIT\u7F16\u8BD1\u5668\u8FDB\u884C\u7B80\u5355\u7684\u4F18\u5316\uFF0C\u8017\u65F6\u77ED\uFF0C\u4E3A\u4E86\u54CD\u5E94\u65F6\u95F4\u66F4\u77ED\uFF0C\u56E0\u4E3Aclient\u6A21\u5F0F\uFF0C\u66F4\u5728\u4E4E\u54CD\u5E94\u65F6\u95F4

                                                                      C2 JIT\u7F16\u8BD1\u5668\u82B1\u7684\u65F6\u95F4\u66F4\u957F\uFF0C\u4F18\u5316\u66F4\u5F3A\uFF0C\u54CD\u5E94\u65F6\u95F4\u66F4\u6162\uFF0C\u4F46\u662F\u4F18\u5316\u597D\u4E4B\u540E\uFF0C\u6267\u884C\u6548\u7387\u66F4\u597D\u3002

                                                                      \u6CA1\u6709\u8BF4\u54EA\u79CD\u7F16\u8BD1\u5668\u66F4\u597D\uFF0C\u4ED6\u4EEC\u662F\u4E92\u8865\u7684\u5173\u7CFB\uFF0C\u8017\u65F6\u77ED\u90A3\u4E48\u54CD\u5E94\u901F\u5EA6\u5FEB\uFF0C\u5C31\u4F18\u5316\u7A0D\u5DEE\uFF0C\u6267\u884C\u6548\u7387\u7A0D\u5DEE

                                                                      \u8017\u65F6\u957F\uFF0C\u90A3\u4E48\u5C31\u4F18\u5316\u597D\uFF0C\u6267\u884C\u6548\u7387\u9AD8\uFF0C\u4F46\u662F\u54CD\u5E94\u901F\u5EA6\u6162\uFF0C\u8981\u8FA9\u8BC1\u5730\u6765\u770B\u4ED6\u4EEC\u4E4B\u95F4\u7684\u5173\u7CFB

                                                                      C1\u662F\u8F7B\u91CF\u7EA7\u7684\u4F18\u5316

                                                                    13. \u5728jdk7\u4E4B\u540E\u7684\u7248\u672C\uFF0C\u4F7F\u7528server\u6A21\u5F0F\u65F6\uFF0C\u9ED8\u8BA4\u4F1A\u5F00\u542F\u5206\u5C42\u7F16\u8BD1\u7B56\u7565\uFF0C\u7531C1\u7F16\u8BD1\u5668\u548CC2\u7F16\u8BD1\u5668\u76F8\u4E92\u5199\u4F5C\u5171\u540C\u6267\u884C\u7F16\u8BD1\u4EFB\u52A1

                                                                    14. \u603B\u7ED3\uFF1A

                                                                      • \u4E00\u822C\u6765\u8BB2\uFF0CJIT\u7F16\u8BD1\u51FA\u6765\u7684\u673A\u5668\u7801\u6027\u80FD\u6BD4\u89E3\u91CA\u5668\u9AD8\uFF08\u8FD9\u91CC\u8981\u6CE8\u610F\u89E3\u91CA\u5668\u548C\u7F16\u8BD1\u5668\u90FD\u662F\u8981\u628A\u5B57\u8282\u7801\u8F6C\u6362\u6210\u64CD\u4F5C\u7CFB\u7EDF\u6216\u8005\u8BF4\u786C\u4EF6\u80FD\u8BC6\u522B\u7684\u673A\u5668\u7801\uFF0C\u5E76\u4E0D\u662F\u53EA\u6709\u7F16\u8BD1\u5668\u4F1A\u8F6C\u6362\u6210\u673A\u5668\u7801\uFF0C\u89E3\u91CA\u5668\u4E5F\u8981\u5C06\u5B57\u8282\u7801\u6307\u4EE4\u8F6C\u6362\u6210\u673A\u5668\u7801\uFF09\uFF08\u6267\u884C\u5F15\u64CE\u7684\u4F5C\u7528\u5C31\u662F\u5145\u5F53\u5C06\u5B57\u8282\u7801\u6216\u8005\u8BF4\u9AD8\u7EA7\u8BED\u8A00\u8F6C\u6362\u6210\u673A\u5668\u7801\u6307\u4EE4\u7684\u7FFB\u8BD1\u8005\uFF09
                                                                      • C2\u7F16\u8BD1\u5668\u5373server\u6A21\u5F0F\u4E0B\u7684JIT\u7F16\u8BD1\u5668\uFF0C\u542F\u52A8\u65F6\u957F\u6BD4C1\u7F16\u8BD1\u5668\u6162\uFF0C\u4F46\u662F\u6267\u884C\u6548\u7387\u66F4\u9AD8\u3002\u7CFB\u7EDF\u7A33\u5B9A\u6267\u884C\u4E4B\u540E\uFF0CC2\u7F16\u8BD1\u5668\u6267\u884C\u901F\u5EA6\u8FDC\u8FDC\u5FEB\u4E8EC1\u7F16\u8BD1\u5668
                                                                    15. \u7F16\u8BD1\u5668\uFF1A

                                                                      • AOT\u7F16\u8BD1\u5668\uFF08\u9759\u6001\u63D0\u524D\u7F16\u8BD1\u5668\uFF09\uFF0C\u8FD9\u662F\u5728\u7A0B\u5E8F\u8FD0\u884C\u4E4B\u524D\uFF0C\u5BF9\u5B57\u8282\u7801\u8F6C\u6362\u6210\u673A\u5668\u7801\u7684\u7F16\u8BD1\u64CD\u4F5C
                                                                      • JIT\u5373\u65F6\u7F16\u8BD1\u5668\uFF0C\u5728\u7A0B\u5E8F\u7684\u8FD0\u884C\u8FC7\u7A0B\u4E2D\uFF0C\u5BF9\u70ED\u70B9\u4EE3\u7801\uFF08\u5B57\u8282\u7801\uFF09\u7F16\u8BD1\u6210\u53EF\u76F4\u63A5\u5728\u786C\u4EF6\u4E0A\u8FD0\u884C\u7684\u673A\u5668\u6307\u4EE4\uFF0C\u5E76\u7F13\u5B58\u5230\u65B9\u6CD5\u533A\u4E2D\uFF0C\u662F\u5728\u7A0B\u5E8F\u7684\u6267\u884C\u8FC7\u7A0B\u4E2D\u6765\u6267\u884C\u7684\u3002
                                                                        • C1\u7F16\u8BD1\u5668\uFF08client\u6A21\u5F0F\uFF09
                                                                        • C2\u7F16\u8BD1\u5668\uFF08server\u6A21\u5F0F\uFF09
                                                                        • graal\u7F16\u8BD1\u5668

                                                                      AOT\u7F16\u8BD1\u5668\u548CJIT\u5373\u65F6\u7F16\u8BD1\u5668\u90FD\u662F\u5C06\u5B57\u8282\u7801\u6307\u4EE4\u8F6C\u6362\u6210\u673A\u5668\u6307\u4EE4\uFF0C\u53EA\u4E0D\u8FC7AOT\u5728\u8FD0\u884C\u524D\uFF0CJIT\u5728\u8FD0\u884C\u65F6

                                                                    StringTable

                                                                    String\u7684\u57FA\u672C\u7279\u6027

                                                                    1. String\u7C7B\u58F0\u660E\u4E3Afinal\u7684\uFF0C\u4E0D\u53EF\u88AB\u7EE7\u627F

                                                                    2. String\u53D8\u91CF\u7684\u5B9E\u4F8B\u5316

                                                                      String s1 = "atguigu"; // \u5B57\u9762\u91CF\u7684\u5B9A\u4E49\u65B9\u5F0F

                                                                      String s2 = new String("hello");

                                                                    3. String\u7C7B\u5B9E\u73B0\u4E86Serializable\u63A5\u53E3\uFF0CComparable\u63A5\u53E3

                                                                    4. \u5728jdk1.8\u5E95\u5C42\u7528\u7684\u662Fchar\u6570\u7EC4\uFF0C\u4E00\u4E2A\u5B57\u7B26\u5BF9\u5E94\u4E8E\u4E24\u4E2A\u5B57\u828216\u4F4D

                                                                      \u5728jdk1.9\u53CA\u4EE5\u540E\u5E95\u5C42\u7528\u7684\u662Fbyte\u6570\u7EC4

                                                                      \u8FD9\u662F\u91CD\u5927\u7684\u4E00\u4E2A\u6539\u53D8

                                                                      \u7ED3\u8BBA\uFF1AString\u5728jdk1.8\u4E4B\u540E\u4E0D\u7528char[]\u6765\u5B58\u50A8\uFF0C\u6539\u6210\u4E86byte[]\u52A0\u4E0A\u7F16\u7801\u6807\u8BB0\uFF0C\u8282\u7EA6\u4E86\u7A7A\u95F4\uFF0C\u5982\u679C\u662FISO-8859/Latin-1\uFF0C\u5C31\u7528\u4E00\u4E2A\u5B57\u8282\u6765\u5B58\uFF0C\u5982\u679C\u662F\u4E2D\u6587\u5B57\u7B26\uFF0C\u8FD8\u662F\u7528\u4E24\u4E2A\u5B57\u8282\u53BB\u5B58

                                                                    5. StringBuffer\u548CStringBuilder\u4E5F\u90FD\u505A\u4E86\u4FEE\u6539

                                                                    6. String\u4EE3\u8868\u4E0D\u53EF\u53D8\u7684\u5B57\u7B26\u5E8F\u5217\uFF0C\u7B80\u79F0\u4E0D\u53EF\u53D8\u6027

                                                                      \u4ECE\u4EE5\u4E0B\u4E09\u4E2A\u65B9\u9762\u4F53\u73B0\uFF1A

                                                                      • \u5F53\u5BF9\u5B57\u7B26\u4E32\u91CD\u65B0\u8D4B\u503C\u65F6\uFF0C\u9700\u8981\u91CD\u5199\u6307\u5B9A\u5185\u5B58\u533A\u57DF\u8D4B\u503C\uFF0C\u4E0D\u80FD\u4F7F\u7528\u539F\u6709\u7684value\u8FDB\u884C\u8D4B\u503C
                                                                      • \u5F53\u5BF9\u73B0\u6709\u7684\u5B57\u7B26\u4E32\u8FDB\u884C\u8FDE\u63A5\u64CD\u4F5C\u65F6\uFF0C\u4E5F\u9700\u8981\u91CD\u65B0\u6307\u5B9A\u5185\u5B58\u533A\u57DF\u8D4B\u503C\uFF0C\u4E0D\u80FD\u4F7F\u7528\u539F\u6709\u7684value\u8FDB\u884C\u8D4B\u503C
                                                                      • \u5F53\u8C03\u7528String\u7684replace()\u65B9\u6CD5\u4FEE\u6539\u6307\u5B9A\u5B57\u7B26\u6216\u5B57\u7B26\u4E32\u65F6\uFF0C\u4E5F\u9700\u8981\u91CD\u65B0\u6307\u5B9A\u5185\u5B58\u533A\u57DF\u8D4B\u503C\uFF0C\u4E0D\u80FD\u4F7F\u7528\u539F\u6709\u7684value\u8FDB\u884C\u8D4B\u503C
                                                                    7. \u901A\u8FC7\u5B57\u9762\u91CF\u5B9A\u4E49\u5B57\u7B26\u4E32\u7684\u65B9\u5F0F\uFF0C\u5B57\u9762\u91CF\u5B58\u50A8\u5728\u5B57\u7B26\u4E32\u5E38\u91CF\u6C60\u4E2D\uFF0C\u5B57\u7B26\u4E32\u5E38\u91CF\u6C60\u4E2D\u7EDD\u5BF9\u4E0D\u5141\u8BB8\u5B58\u50A8\u76F8\u540C\u7684\u5B57\u7B26\u4E32

                                                                    8. \u5B57\u7B26\u4E32\u5E95\u5C42\u662F\u6570\u7EC4\uFF0C\u65E2\u7136\u662F\u6570\u7EC4\uFF0C\u90A3\u4E48\u5E95\u5C42\u5728\u521B\u5EFA\u7684\u65F6\u5019\u5C31\u5DF2\u7ECF\u786E\u5B9A\u597D\u4E86\u957F\u5EA6\uFF0C\u90A3\u4E48\u62FC\u63A5\u7684\u65F6\u5019\uFF0C\u663E\u7136\u662F\u53E6\u5916\u6307\u4EE4\u5185\u5B58\u533A\u57DF\u8D4B\u503C\uFF0C\u800C\u4E0D\u662F\u76F4\u63A5\u5728\u539F\u6570\u636E\u540E\u8FDB\u884C\u8FDE\u63A5

                                                                      \u800C\u4E14\u6570\u7EC4\u7684\u6269\u5BB9\u4E5F\u662F\u9700\u8981\u53E6\u5916\u9020\u6570\u7EC4\uFF0C\u800C\u4E0D\u662F\u76F4\u63A5\u5728\u539F\u5185\u5B58\u4F4D\u7F6E\u8FDB\u884C\u6269\u5BB9

                                                                    9. \u5B57\u7B26\u4E32\u5E38\u91CF\u6C60\u5E95\u5C42\u662F\u4E00\u4E2A\u56FA\u5B9A\u5927\u5C0F\u7684hashtable\uFF0Chashtable\u53C8\u79F0\u4E3A\u6563\u5217\u8868\uFF0C\u6563\u5217\u8868\u5728\u5E95\u5C42\u662Fjdk7\u53CA\u4EE5\u524D\u662F\u91C7\u7528\u6570\u7EC4+\u94FE\u8868\u7684\u5F62\u5F0F\u5B58\u50A8\uFF0C\u5728jdk8\u53CA\u4EE5\u540E\u662F\u91C7\u7528\u6570\u7EC4+\u94FE\u8868+\u7EA2\u9ED1\u6811\u7684\u5F62\u5F0F\u5B58\u50A8\uFF0C\u6240\u4EE5\u5728jdk7\u4E2D\u6570\u7EC4\u5C31\u6709\u56FA\u5B9A\u957F\u5EA6\u662F\u662F60013

                                                                    String\u7684\u5185\u5B58\u5206\u914D

                                                                    1. \u5728Java\u8BED\u8A00\u4E2D\uFF0C\u67098\u79CD\u57FA\u672C\u6570\u636E\u7C7B\u578B\u548C\u4E00\u79CD\u6BD4\u8F83\u7279\u6B8A\u7684\u7C7B\u578BString\uFF0C\u8FD9\u4E9B\u7C7B\u578B\u4E3A\u4E86\u4F7F\u4ED6\u4EEC\u5728\u8FD0\u884C\u8FC7\u7A0B\u4E2D\u901F\u5EA6\u66F4\u5FEB\u3001\u66F4\u8282\u7701\u5185\u5B58\uFF0C\u90FD\u63D0\u4F9B\u4E86\u4E00\u79CD\u5E38\u91CF\u6C60\u7684\u6982\u5FF5
                                                                    2. \u5E38\u91CF\u6C60\u5C31\u7C7B\u4F3C\u4E8E\u4E00\u4E2AJava\u7CFB\u7EDF\u7EA7\u522B\u63D0\u4F9B\u7684\u7F13\u5B58\uFF0C8\u79CD\u57FA\u672C\u6570\u636E\u7C7B\u578B\u7684\u5E38\u91CF\u6C60\u90FD\u662F\u7CFB\u7EDF\u534F\u8C03\u7684\uFF0CString\u7C7B\u578B\u7684\u5E38\u91CF\u6C60\u6BD4\u8F83\u7279\u6B8A\uFF0C\u4E3B\u8981\u4F7F\u7528\u65B9\u6CD5\u6709\u4E24\u79CD
                                                                      • \u5B57\u9762\u91CF\u58F0\u660E\u7684\u65B9\u5F0F\uFF1AString s1 = "atguigu"; // \u4F1A\u76F4\u63A5\u5C06String\u5BF9\u8C61\u5B58\u50A8\u5230\u5B57\u7B26\u4E32\u5E38\u91CF\u6C60\u4E2D\uFF0C\u5F53\u7136\u5B57\u7B26\u4E32\u5E38\u91CF\u6C60\u5E95\u5C42\u662Fhashtable\uFF0C\u5B57\u7B26\u4E32\u5E95\u5C42\u662Fbyte\u6216char\u6570\u7EC4
                                                                      • \u5982\u679C\u4E0D\u662F\u4F7F\u7528\u53CC\u5F15\u53F7\u58F0\u660E\u7684String\u5BF9\u8C61\uFF0C\u53EF\u4EE5\u4F7F\u7528intern\u65B9\u6CD5
                                                                    3. Stringtable\u4E3A\u4EC0\u4E48\u8981\u4ECE\u65B9\u6CD5\u533A\u7684\u8FD0\u884C\u65F6\u5E38\u91CF\u6C60\u8C03\u6574\u5230\u5806\u7A7A\u95F4\u4E2D
                                                                      • permSize\u9ED8\u8BA4\u6BD4\u8F83\u5C0F
                                                                      • \u6C38\u4E45\u4EE3\u5783\u573E\u56DE\u6536\u9891\u7387\u4F4E\uFF0C\u5BFC\u81F4\u5927\u91CF\u4E0D\u7528\u7684\u5B57\u7B26\u4E32\u4E0D\u80FD\u591F\u53CA\u65F6\u56DE\u6536\uFF0C\u5BFC\u81F4\u5BB9\u6613\u62A5OOM\uFF0C\u5B57\u7B26\u4E32\u5E38\u91CF\u6C60\u653E\u5230\u5806\u91CC\uFF0C\u80FD\u591F\u53CA\u65F6\u56DE\u6536
                                                                    4. \u8981\u6CE8\u610F\u533A\u5206\u8FD0\u884C\u65F6\u5E38\u91CF\u6C60\u548C\u5B57\u7B26\u4E32\u5E38\u91CF\u6C60

                                                                    \u5B57\u7B26\u4E32\u62FC\u63A5\u64CD\u4F5C

                                                                    1. \u975E\u9759\u6001\u65B9\u6CD5\u7684\u6808\u5E27\u7684\u5C40\u90E8\u53D8\u91CF\u8868\u91CC\u9762\u7684\u7B2C\u4E00\u4E2A\u4F4D\u7F6E\u653E\u7684this\uFF0C\u800C\u9759\u6001\u65B9\u6CD5\u5219\u6CA1\u6709\u8FD9\u4E2Athis

                                                                    2. \u5E38\u91CF\u4E0E\u5E38\u91CF\u7684\u62FC\u63A5\u7ED3\u679C\u5728\u5E38\u91CF\u6C60\u4E2D\uFF0C\u539F\u7406\u662F\u7F16\u8BD1\u671F\u4F18\u5316\uFF08\u5728\u751F\u6210\u5B57\u8282\u7801\u6587\u4EF6\u8FD9\u4E2A\u8FC7\u7A0B\u5C31\u76F4\u63A5\u8BA4\u4E3A\u5B57\u7B26\u4E32\u662F\u62FC\u63A5\u540E\u7684\u7ED3\u679C\uFF09

                                                                      String s1 = "a" + "b" + "c";//\u7B49\u540C\u4E8EString s1 = "abc";
                                                                       
                                                                    3. \u5E38\u91CF\u6C60\u4E2D\u4E0D\u4F1A\u5B58\u5728\u76F8\u540C\u5185\u5BB9\u7684\u5B57\u7B26\u4E32\u5E38\u91CF

                                                                    4. \u53EA\u8981\u5176\u4E2D\u6709\u4E00\u4E2A\u662F\u53D8\u91CF\uFF0C\u7ED3\u679C\u5C31\u5728\u5806\u4E2D\u975E\u5B57\u7B26\u4E32\u5E38\u91CF\u6C60\u7684\u533A\u57DF\uFF08\u56E0\u4E3Ajdk7\u53CA\u4EE5\u540E\uFF0C\u5B57\u7B26\u4E32\u5E38\u91CF\u6C60\u4E5F\u5728\u5806\u4E2D\u800C\u4E0D\u5728\u65B9\u6CD5\u533A\u4E2D\uFF09\uFF0C\u53D8\u91CF\u62FC\u63A5\u7684\u539F\u7406\u7684\u662FStringBuilder

                                                                      \u5982\u679C\u62FC\u63A5\u7B26\u53F7\u7684\u524D\u540E\u51FA\u73B0\u4E86\u53D8\u91CF\uFF0C\u5219\u76F8\u5F53\u4E8E\u5728\u5806\u7A7A\u95F4\u4E2Dnew String()\uFF0C\u5177\u4F53\u7684\u5185\u5BB9\u4E3A\u62FC\u63A5\u540E\u7684\u7ED3\u679C\uFF08\u53EA\u8981\u662Fnew\uFF0C\u90A3\u4E48\u5C31\u662F\u5728\u5806\u7A7A\u95F4\u4E2D\u65B0\u5EFA\u4E86\u4E00\u4E2A\u65B0\u7684\u5BF9\u8C61\uFF0C\u5F53\u7136\u662F\u65B0\u7684\u5730\u5740\uFF09

                                                                      \u53EA\u8981\u8FDE\u63A5\u7B26\u4E24\u8FB9\u4EFB\u4F55\u4E00\u8FB9\u51FA\u73B0\u4E86\u53D8\u91CF\uFF0C\u5148\u662Fnew\u4E86\u4E00\u4E2AStringBuilder\uFF0C\u7136\u540E\u4ECE\u5C40\u90E8\u53D8\u91CF\u8868\u53D6\u51FA\u5B57\u7B26\u4E32\uFF0C\u8C03\u7528append\u65B9\u6CD5

                                                                      String s1 = "a";
                                                                       String s2 = "b";
                                                                      diff --git "a/assets/\344\270\200\344\272\233\347\237\245\350\257\206\347\202\271\347\232\204\350\256\260\345\275\225.html.12d09d3c.js" "b/assets/\344\270\200\344\272\233\347\237\245\350\257\206\347\202\271\347\232\204\350\256\260\345\275\225.html.a5e2280f.js"
                                                                      similarity index 99%
                                                                      rename from "assets/\344\270\200\344\272\233\347\237\245\350\257\206\347\202\271\347\232\204\350\256\260\345\275\225.html.12d09d3c.js"
                                                                      rename to "assets/\344\270\200\344\272\233\347\237\245\350\257\206\347\202\271\347\232\204\350\256\260\345\275\225.html.a5e2280f.js"
                                                                      index dfe15b12..762438fd 100644
                                                                      --- "a/assets/\344\270\200\344\272\233\347\237\245\350\257\206\347\202\271\347\232\204\350\256\260\345\275\225.html.12d09d3c.js"
                                                                      +++ "b/assets/\344\270\200\344\272\233\347\237\245\350\257\206\347\202\271\347\232\204\350\256\260\345\275\225.html.a5e2280f.js"
                                                                      @@ -1 +1 @@
                                                                      -const l={key:"v-57fd34d4",path:"/java/JVM/JVM%E4%B8%8A%E7%AF%87/%E4%B8%80%E4%BA%9B%E7%9F%A5%E8%AF%86%E7%82%B9%E7%9A%84%E8%AE%B0%E5%BD%95.html",title:"JVM\u4E0A\u7BC7",lang:"zh-CN",frontmatter:{},excerpt:"",headers:[{level:2,title:"JVM\u4E0EJava\u4F53\u7CFB\u7ED3\u6784",slug:"jvm\u4E0Ejava\u4F53\u7CFB\u7ED3\u6784",children:[{level:3,title:"JVM\u7684\u6574\u4F53\u7ED3\u6784",slug:"jvm\u7684\u6574\u4F53\u7ED3\u6784",children:[]},{level:3,title:"Java\u4EE3\u7801\u6267\u884C\u6D41\u7A0B",slug:"java\u4EE3\u7801\u6267\u884C\u6D41\u7A0B",children:[]},{level:3,title:"JVM\u7684\u67B6\u6784\u6A21\u578B",slug:"jvm\u7684\u67B6\u6784\u6A21\u578B",children:[]},{level:3,title:"JVM\u7684\u751F\u547D\u5468\u671F",slug:"jvm\u7684\u751F\u547D\u5468\u671F",children:[]}]},{level:2,title:"\u7C7B\u52A0\u8F7D\u5B50\u7CFB\u7EDF",slug:"\u7C7B\u52A0\u8F7D\u5B50\u7CFB\u7EDF",children:[{level:3,title:"\u6982\u8FF0",slug:"\u6982\u8FF0",children:[]},{level:3,title:"\u7C7B\u52A0\u8F7D\u5668\u5B50\u7CFB\u7EDF\u4F5C\u7528",slug:"\u7C7B\u52A0\u8F7D\u5668\u5B50\u7CFB\u7EDF\u4F5C\u7528",children:[]},{level:3,title:"\u7C7B\u52A0\u8F7D\u5668\u7684\u5206\u7C7B",slug:"\u7C7B\u52A0\u8F7D\u5668\u7684\u5206\u7C7B",children:[]},{level:3,title:"\u53CC\u4EB2\u59D4\u6D3E\u673A\u5236",slug:"\u53CC\u4EB2\u59D4\u6D3E\u673A\u5236",children:[]}]},{level:2,title:"\u8FD0\u884C\u65F6\u6570\u636E\u533A\u6982\u8FF0\u53CA\u7EBF\u7A0B",slug:"\u8FD0\u884C\u65F6\u6570\u636E\u533A\u6982\u8FF0\u53CA\u7EBF\u7A0B",children:[{level:3,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-1",children:[]}]},{level:2,title:"\u7A0B\u5E8F\u8BA1\u6570\u5668",slug:"\u7A0B\u5E8F\u8BA1\u6570\u5668",children:[]},{level:2,title:"\u865A\u62DF\u673A\u6808",slug:"\u865A\u62DF\u673A\u6808",children:[{level:3,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-2",children:[]},{level:3,title:"\u6808\u7684\u5B58\u50A8\u5355\u4F4D",slug:"\u6808\u7684\u5B58\u50A8\u5355\u4F4D",children:[]},{level:3,title:"\u6808\u5E27\u7684\u5185\u90E8\u7ED3\u6784",slug:"\u6808\u5E27\u7684\u5185\u90E8\u7ED3\u6784",children:[]},{level:3,title:"\u5C40\u90E8\u53D8\u91CF\u8868",slug:"\u5C40\u90E8\u53D8\u91CF\u8868",children:[]},{level:3,title:"\u64CD\u4F5C\u6570\u6808",slug:"\u64CD\u4F5C\u6570\u6808",children:[]},{level:3,title:"\u6808\u9876\u7F13\u5B58\u6280\u672F",slug:"\u6808\u9876\u7F13\u5B58\u6280\u672F",children:[]},{level:3,title:"\u52A8\u6001\u94FE\u63A5",slug:"\u52A8\u6001\u94FE\u63A5",children:[]},{level:3,title:"\u65B9\u6CD5\u7684\u8C03\u7528",slug:"\u65B9\u6CD5\u7684\u8C03\u7528",children:[]},{level:3,title:"\u65B9\u6CD5\u8FD4\u56DE\u5730\u5740",slug:"\u65B9\u6CD5\u8FD4\u56DE\u5730\u5740",children:[]}]},{level:2,title:"\u672C\u5730\u65B9\u6CD5\u63A5\u53E3",slug:"\u672C\u5730\u65B9\u6CD5\u63A5\u53E3",children:[]},{level:2,title:"\u672C\u5730\u65B9\u6CD5\u6808",slug:"\u672C\u5730\u65B9\u6CD5\u6808",children:[]},{level:2,title:"\u5806",slug:"\u5806",children:[{level:3,title:"\u5806\u7684\u6838\u5FC3\u6982\u8FF0",slug:"\u5806\u7684\u6838\u5FC3\u6982\u8FF0",children:[{level:4,title:"\u5185\u5B58\u7EC6\u5206",slug:"\u5185\u5B58\u7EC6\u5206",children:[]}]},{level:3,title:"\u8BBE\u7F6E\u5806\u7A7A\u95F4\u5185\u5B58\u5927\u5C0F\u4E0EOOM",slug:"\u8BBE\u7F6E\u5806\u7A7A\u95F4\u5185\u5B58\u5927\u5C0F\u4E0Eoom",children:[]},{level:3,title:"\u5E74\u8F7B\u4EE3\u4E0E\u8001\u5E74\u4EE3",slug:"\u5E74\u8F7B\u4EE3\u4E0E\u8001\u5E74\u4EE3",children:[]},{level:3,title:"\u65B0\u751F\u4EE3\u5BF9\u8C61\u5206\u914D\u4E0E\u56DE\u6536\u8FC7\u7A0B",slug:"\u65B0\u751F\u4EE3\u5BF9\u8C61\u5206\u914D\u4E0E\u56DE\u6536\u8FC7\u7A0B",children:[]},{level:3,title:"Minor GC/Major GC/ Full GC",slug:"minor-gc-major-gc-full-gc",children:[]},{level:3,title:"\u5806\u7A7A\u95F4\u5206\u4EE3\u601D\u60F3",slug:"\u5806\u7A7A\u95F4\u5206\u4EE3\u601D\u60F3",children:[]},{level:3,title:"\u5185\u5B58\u5206\u914D\u7B56\u7565",slug:"\u5185\u5B58\u5206\u914D\u7B56\u7565",children:[]}]},{level:2,title:"\u65B9\u6CD5\u533A",slug:"\u65B9\u6CD5\u533A",children:[{level:3,title:"\u6808\u3001\u5806\u3001\u65B9\u6CD5\u533A\u7684\u4EA4\u4E92\u5173\u7CFB",slug:"\u6808\u3001\u5806\u3001\u65B9\u6CD5\u533A\u7684\u4EA4\u4E92\u5173\u7CFB",children:[]},{level:3,title:"\u65B9\u6CD5\u533A\u7684\u7406\u89E3",slug:"\u65B9\u6CD5\u533A\u7684\u7406\u89E3",children:[]},{level:3,title:"\u8BBE\u7F6E\u65B9\u6CD5\u533A\u5927\u5C0F\u4E0EOOM",slug:"\u8BBE\u7F6E\u65B9\u6CD5\u533A\u5927\u5C0F\u4E0Eoom",children:[]},{level:3,title:"\u65B9\u6CD5\u533A\u7684\u5185\u90E8\u7ED3\u6784",slug:"\u65B9\u6CD5\u533A\u7684\u5185\u90E8\u7ED3\u6784",children:[{level:4,title:"\u7C7B\u578B\u4FE1\u606F",slug:"\u7C7B\u578B\u4FE1\u606F",children:[]},{level:4,title:"\u65B9\u6CD5\u4FE1\u606F",slug:"\u65B9\u6CD5\u4FE1\u606F",children:[]},{level:4,title:"\u9759\u6001\u53D8\u91CF",slug:"\u9759\u6001\u53D8\u91CF",children:[]},{level:4,title:"\u8FD0\u884C\u65F6\u5E38\u91CF\u6C60",slug:"\u8FD0\u884C\u65F6\u5E38\u91CF\u6C60",children:[]}]},{level:3,title:"\u65B9\u6CD5\u533A\u7684\u6F14\u8FDB\u7EC6\u8282",slug:"\u65B9\u6CD5\u533A\u7684\u6F14\u8FDB\u7EC6\u8282",children:[]},{level:3,title:"\u65B9\u6CD5\u533A\u7684\u5783\u573E\u56DE\u6536",slug:"\u65B9\u6CD5\u533A\u7684\u5783\u573E\u56DE\u6536",children:[]}]},{level:2,title:"\u5BF9\u8C61\u7684\u5B9E\u4F8B\u5316\u5E03\u5C40\u4E0E\u8BBF\u95EE\u5B9A\u4F4D",slug:"\u5BF9\u8C61\u7684\u5B9E\u4F8B\u5316\u5E03\u5C40\u4E0E\u8BBF\u95EE\u5B9A\u4F4D",children:[]},{level:2,title:"\u76F4\u63A5\u5185\u5B58",slug:"\u76F4\u63A5\u5185\u5B58",children:[]},{level:2,title:"\u6267\u884C\u5F15\u64CE",slug:"\u6267\u884C\u5F15\u64CE",children:[{level:3,title:"\u6267\u884C\u5F15\u64CE\u6982\u8FF0",slug:"\u6267\u884C\u5F15\u64CE\u6982\u8FF0",children:[]},{level:3,title:"Java\u4EE3\u7801\u7F16\u8BD1\u548C\u6267\u884C\u7684\u8FC7\u7A0B",slug:"java\u4EE3\u7801\u7F16\u8BD1\u548C\u6267\u884C\u7684\u8FC7\u7A0B",children:[]},{level:3,title:"\u673A\u5668\u7801\u3001\u6307\u4EE4\u548C\u6C47\u7F16\u8BED\u8A00",slug:"\u673A\u5668\u7801\u3001\u6307\u4EE4\u548C\u6C47\u7F16\u8BED\u8A00",children:[]},{level:3,title:"\u89E3\u91CA\u5668",slug:"\u89E3\u91CA\u5668",children:[]},{level:3,title:"JIT\u7F16\u8BD1\u5668",slug:"jit\u7F16\u8BD1\u5668",children:[]}]},{level:2,title:"StringTable",slug:"stringtable",children:[{level:3,title:"String\u7684\u57FA\u672C\u7279\u6027",slug:"string\u7684\u57FA\u672C\u7279\u6027",children:[]},{level:3,title:"String\u7684\u5185\u5B58\u5206\u914D",slug:"string\u7684\u5185\u5B58\u5206\u914D",children:[]},{level:3,title:"\u5B57\u7B26\u4E32\u62FC\u63A5\u64CD\u4F5C",slug:"\u5B57\u7B26\u4E32\u62FC\u63A5\u64CD\u4F5C",children:[]},{level:3,title:"intern()\u7684\u4F7F\u7528",slug:"intern-\u7684\u4F7F\u7528",children:[]},{level:3,title:"StringTable\u7684\u5783\u573E\u56DE\u6536\u548CString\u53BB\u91CD",slug:"stringtable\u7684\u5783\u573E\u56DE\u6536\u548Cstring\u53BB\u91CD",children:[]}]},{level:2,title:"\u5783\u573E\u56DE\u6536\u6982\u8FF0",slug:"\u5783\u573E\u56DE\u6536\u6982\u8FF0",children:[{level:3,title:"\u4EC0\u4E48\u662F\u5783\u573E",slug:"\u4EC0\u4E48\u662F\u5783\u573E",children:[]},{level:3,title:"\u4E3A\u4EC0\u4E48\u9700\u8981GC",slug:"\u4E3A\u4EC0\u4E48\u9700\u8981gc",children:[]},{level:3,title:"\u65E9\u671F\u5783\u573E\u56DE\u6536",slug:"\u65E9\u671F\u5783\u573E\u56DE\u6536",children:[]},{level:3,title:"Java\u5783\u573E\u56DE\u6536\u673A\u5236",slug:"java\u5783\u573E\u56DE\u6536\u673A\u5236",children:[]}]},{level:2,title:"\u5783\u573E\u56DE\u6536\u7B97\u6CD5",slug:"\u5783\u573E\u56DE\u6536\u7B97\u6CD5",children:[{level:3,title:"\u6807\u8BB0\u9636\u6BB5\uFF1A\u5F15\u7528\u8BA1\u6570\u7B97\u6CD5",slug:"\u6807\u8BB0\u9636\u6BB5-\u5F15\u7528\u8BA1\u6570\u7B97\u6CD5",children:[]},{level:3,title:"\u6807\u8BB0\u9636\u6BB5\uFF1A\u53EF\u8FBE\u6027\u5206\u6790\u7B97\u6CD5",slug:"\u6807\u8BB0\u9636\u6BB5-\u53EF\u8FBE\u6027\u5206\u6790\u7B97\u6CD5",children:[]},{level:3,title:"\u5BF9\u8C61\u7684finalization\u673A\u5236",slug:"\u5BF9\u8C61\u7684finalization\u673A\u5236",children:[]},{level:3,title:"\u6E05\u9664\u9636\u6BB5\uFF1A\u6807\u8BB0-\u6E05\u9664\u7B97\u6CD5",slug:"\u6E05\u9664\u9636\u6BB5-\u6807\u8BB0-\u6E05\u9664\u7B97\u6CD5",children:[]},{level:3,title:"\u6E05\u9664\u9636\u6BB5\uFF1A\u590D\u5236\u7B97\u6CD5",slug:"\u6E05\u9664\u9636\u6BB5-\u590D\u5236\u7B97\u6CD5",children:[]},{level:3,title:"\u6E05\u9664\u9636\u6BB5\uFF1A\u6807\u8BB0-\u538B\u7F29\u7B97\u6CD5",slug:"\u6E05\u9664\u9636\u6BB5-\u6807\u8BB0-\u538B\u7F29\u7B97\u6CD5",children:[]}]},{level:2,title:"\u5783\u573E\u56DE\u6536\u76F8\u5173\u6982\u5FF5",slug:"\u5783\u573E\u56DE\u6536\u76F8\u5173\u6982\u5FF5",children:[{level:3,title:"System.gc()\u7684\u7406\u89E3",slug:"system-gc-\u7684\u7406\u89E3",children:[]},{level:3,title:"\u5185\u5B58\u6EA2\u51FA\u4E0E\u5185\u5B58\u6CC4\u6F0F",slug:"\u5185\u5B58\u6EA2\u51FA\u4E0E\u5185\u5B58\u6CC4\u6F0F",children:[]},{level:3,title:"stop the world",slug:"stop-the-world",children:[]},{level:3,title:"\u5783\u573E\u56DE\u6536\u7684\u5E76\u884C\u4E0E\u5E76\u53D1",slug:"\u5783\u573E\u56DE\u6536\u7684\u5E76\u884C\u4E0E\u5E76\u53D1",children:[]},{level:3,title:"\u5B89\u5168\u70B9\u548C\u5B89\u5168\u533A\u57DF",slug:"\u5B89\u5168\u70B9\u548C\u5B89\u5168\u533A\u57DF",children:[]},{level:3,title:"\u5F15\u7528",slug:"\u5F15\u7528",children:[]}]},{level:2,title:"\u5783\u573E\u56DE\u6536\u5668",slug:"\u5783\u573E\u56DE\u6536\u5668",children:[{level:3,title:"GC\u5206\u7C7B\u4E0E\u6027\u80FD\u6307\u6807",slug:"gc\u5206\u7C7B\u4E0E\u6027\u80FD\u6307\u6807",children:[]},{level:3,title:"\u4E0D\u540C\u7684\u5783\u573E\u56DE\u6536\u5668\u6982\u8FF0",slug:"\u4E0D\u540C\u7684\u5783\u573E\u56DE\u6536\u5668\u6982\u8FF0",children:[]},{level:3,title:"Serial\u56DE\u6536\u5668\uFF1A\u4E32\u884C\u56DE\u6536",slug:"serial\u56DE\u6536\u5668-\u4E32\u884C\u56DE\u6536",children:[]},{level:3,title:"ParNew\u56DE\u6536\u5668\uFF1A\u5E76\u884C\u56DE\u6536",slug:"parnew\u56DE\u6536\u5668-\u5E76\u884C\u56DE\u6536",children:[]},{level:3,title:"Parallel \u56DE\u6536\u5668\uFF1A\u541E\u5410\u91CF\u4F18\u5148",slug:"parallel-\u56DE\u6536\u5668-\u541E\u5410\u91CF\u4F18\u5148",children:[]},{level:3,title:"CMS\u56DE\u6536\u5668\uFF1A\u4F4E\u5EF6\u8FDF",slug:"cms\u56DE\u6536\u5668-\u4F4E\u5EF6\u8FDF",children:[]},{level:3,title:"G1\u56DE\u6536\u5668\uFF1A\u533A\u57DF\u5316\u5206\u4EE3\u5F0F",slug:"g1\u56DE\u6536\u5668-\u533A\u57DF\u5316\u5206\u4EE3\u5F0F",children:[]}]}],git:{updatedTime:1710173765e3,contributors:[{name:"shailene",email:"64005626+shaileneF@users.noreply.github.com",commits:1}]},filePathRelative:"java/JVM/JVM\u4E0A\u7BC7/\u4E00\u4E9B\u77E5\u8BC6\u70B9\u7684\u8BB0\u5F55.md"};export{l as data};
                                                                      +const l={key:"v-57fd34d4",path:"/java/JVM/JVM%E4%B8%8A%E7%AF%87/%E4%B8%80%E4%BA%9B%E7%9F%A5%E8%AF%86%E7%82%B9%E7%9A%84%E8%AE%B0%E5%BD%95.html",title:"JVM\u4E0A\u7BC7",lang:"zh-CN",frontmatter:{},excerpt:"",headers:[{level:2,title:"JVM\u4E0EJava\u4F53\u7CFB\u7ED3\u6784",slug:"jvm\u4E0Ejava\u4F53\u7CFB\u7ED3\u6784",children:[{level:3,title:"JVM\u7684\u6574\u4F53\u7ED3\u6784",slug:"jvm\u7684\u6574\u4F53\u7ED3\u6784",children:[]},{level:3,title:"Java\u4EE3\u7801\u6267\u884C\u6D41\u7A0B",slug:"java\u4EE3\u7801\u6267\u884C\u6D41\u7A0B",children:[]},{level:3,title:"JVM\u7684\u67B6\u6784\u6A21\u578B",slug:"jvm\u7684\u67B6\u6784\u6A21\u578B",children:[]},{level:3,title:"JVM\u7684\u751F\u547D\u5468\u671F",slug:"jvm\u7684\u751F\u547D\u5468\u671F",children:[]}]},{level:2,title:"\u7C7B\u52A0\u8F7D\u5B50\u7CFB\u7EDF",slug:"\u7C7B\u52A0\u8F7D\u5B50\u7CFB\u7EDF",children:[{level:3,title:"\u6982\u8FF0",slug:"\u6982\u8FF0",children:[]},{level:3,title:"\u7C7B\u52A0\u8F7D\u5668\u5B50\u7CFB\u7EDF\u4F5C\u7528",slug:"\u7C7B\u52A0\u8F7D\u5668\u5B50\u7CFB\u7EDF\u4F5C\u7528",children:[]},{level:3,title:"\u7C7B\u52A0\u8F7D\u5668\u7684\u5206\u7C7B",slug:"\u7C7B\u52A0\u8F7D\u5668\u7684\u5206\u7C7B",children:[]},{level:3,title:"\u53CC\u4EB2\u59D4\u6D3E\u673A\u5236",slug:"\u53CC\u4EB2\u59D4\u6D3E\u673A\u5236",children:[]}]},{level:2,title:"\u8FD0\u884C\u65F6\u6570\u636E\u533A\u6982\u8FF0\u53CA\u7EBF\u7A0B",slug:"\u8FD0\u884C\u65F6\u6570\u636E\u533A\u6982\u8FF0\u53CA\u7EBF\u7A0B",children:[{level:3,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-1",children:[]}]},{level:2,title:"\u7A0B\u5E8F\u8BA1\u6570\u5668",slug:"\u7A0B\u5E8F\u8BA1\u6570\u5668",children:[]},{level:2,title:"\u865A\u62DF\u673A\u6808",slug:"\u865A\u62DF\u673A\u6808",children:[{level:3,title:"\u6982\u8FF0",slug:"\u6982\u8FF0-2",children:[]},{level:3,title:"\u6808\u7684\u5B58\u50A8\u5355\u4F4D",slug:"\u6808\u7684\u5B58\u50A8\u5355\u4F4D",children:[]},{level:3,title:"\u6808\u5E27\u7684\u5185\u90E8\u7ED3\u6784",slug:"\u6808\u5E27\u7684\u5185\u90E8\u7ED3\u6784",children:[]},{level:3,title:"\u5C40\u90E8\u53D8\u91CF\u8868",slug:"\u5C40\u90E8\u53D8\u91CF\u8868",children:[]},{level:3,title:"\u64CD\u4F5C\u6570\u6808",slug:"\u64CD\u4F5C\u6570\u6808",children:[]},{level:3,title:"\u6808\u9876\u7F13\u5B58\u6280\u672F",slug:"\u6808\u9876\u7F13\u5B58\u6280\u672F",children:[]},{level:3,title:"\u52A8\u6001\u94FE\u63A5",slug:"\u52A8\u6001\u94FE\u63A5",children:[]},{level:3,title:"\u65B9\u6CD5\u7684\u8C03\u7528",slug:"\u65B9\u6CD5\u7684\u8C03\u7528",children:[]},{level:3,title:"\u65B9\u6CD5\u8FD4\u56DE\u5730\u5740",slug:"\u65B9\u6CD5\u8FD4\u56DE\u5730\u5740",children:[]}]},{level:2,title:"\u672C\u5730\u65B9\u6CD5\u63A5\u53E3",slug:"\u672C\u5730\u65B9\u6CD5\u63A5\u53E3",children:[]},{level:2,title:"\u672C\u5730\u65B9\u6CD5\u6808",slug:"\u672C\u5730\u65B9\u6CD5\u6808",children:[]},{level:2,title:"\u5806",slug:"\u5806",children:[{level:3,title:"\u5806\u7684\u6838\u5FC3\u6982\u8FF0",slug:"\u5806\u7684\u6838\u5FC3\u6982\u8FF0",children:[{level:4,title:"\u5185\u5B58\u7EC6\u5206",slug:"\u5185\u5B58\u7EC6\u5206",children:[]}]},{level:3,title:"\u8BBE\u7F6E\u5806\u7A7A\u95F4\u5185\u5B58\u5927\u5C0F\u4E0EOOM",slug:"\u8BBE\u7F6E\u5806\u7A7A\u95F4\u5185\u5B58\u5927\u5C0F\u4E0Eoom",children:[]},{level:3,title:"\u5E74\u8F7B\u4EE3\u4E0E\u8001\u5E74\u4EE3",slug:"\u5E74\u8F7B\u4EE3\u4E0E\u8001\u5E74\u4EE3",children:[]},{level:3,title:"\u65B0\u751F\u4EE3\u5BF9\u8C61\u5206\u914D\u4E0E\u56DE\u6536\u8FC7\u7A0B",slug:"\u65B0\u751F\u4EE3\u5BF9\u8C61\u5206\u914D\u4E0E\u56DE\u6536\u8FC7\u7A0B",children:[]},{level:3,title:"Minor GC/Major GC/ Full GC",slug:"minor-gc-major-gc-full-gc",children:[]},{level:3,title:"\u5806\u7A7A\u95F4\u5206\u4EE3\u601D\u60F3",slug:"\u5806\u7A7A\u95F4\u5206\u4EE3\u601D\u60F3",children:[]},{level:3,title:"\u5185\u5B58\u5206\u914D\u7B56\u7565",slug:"\u5185\u5B58\u5206\u914D\u7B56\u7565",children:[]}]},{level:2,title:"\u65B9\u6CD5\u533A",slug:"\u65B9\u6CD5\u533A",children:[{level:3,title:"\u6808\u3001\u5806\u3001\u65B9\u6CD5\u533A\u7684\u4EA4\u4E92\u5173\u7CFB",slug:"\u6808\u3001\u5806\u3001\u65B9\u6CD5\u533A\u7684\u4EA4\u4E92\u5173\u7CFB",children:[]},{level:3,title:"\u65B9\u6CD5\u533A\u7684\u7406\u89E3",slug:"\u65B9\u6CD5\u533A\u7684\u7406\u89E3",children:[]},{level:3,title:"\u8BBE\u7F6E\u65B9\u6CD5\u533A\u5927\u5C0F\u4E0EOOM",slug:"\u8BBE\u7F6E\u65B9\u6CD5\u533A\u5927\u5C0F\u4E0Eoom",children:[]},{level:3,title:"\u65B9\u6CD5\u533A\u7684\u5185\u90E8\u7ED3\u6784",slug:"\u65B9\u6CD5\u533A\u7684\u5185\u90E8\u7ED3\u6784",children:[{level:4,title:"\u7C7B\u578B\u4FE1\u606F",slug:"\u7C7B\u578B\u4FE1\u606F",children:[]},{level:4,title:"\u65B9\u6CD5\u4FE1\u606F",slug:"\u65B9\u6CD5\u4FE1\u606F",children:[]},{level:4,title:"\u9759\u6001\u53D8\u91CF",slug:"\u9759\u6001\u53D8\u91CF",children:[]},{level:4,title:"\u8FD0\u884C\u65F6\u5E38\u91CF\u6C60",slug:"\u8FD0\u884C\u65F6\u5E38\u91CF\u6C60",children:[]}]},{level:3,title:"\u65B9\u6CD5\u533A\u7684\u6F14\u8FDB\u7EC6\u8282",slug:"\u65B9\u6CD5\u533A\u7684\u6F14\u8FDB\u7EC6\u8282",children:[]},{level:3,title:"\u65B9\u6CD5\u533A\u7684\u5783\u573E\u56DE\u6536",slug:"\u65B9\u6CD5\u533A\u7684\u5783\u573E\u56DE\u6536",children:[]}]},{level:2,title:"\u5BF9\u8C61\u7684\u5B9E\u4F8B\u5316\u5E03\u5C40\u4E0E\u8BBF\u95EE\u5B9A\u4F4D",slug:"\u5BF9\u8C61\u7684\u5B9E\u4F8B\u5316\u5E03\u5C40\u4E0E\u8BBF\u95EE\u5B9A\u4F4D",children:[]},{level:2,title:"\u76F4\u63A5\u5185\u5B58",slug:"\u76F4\u63A5\u5185\u5B58",children:[]},{level:2,title:"\u6267\u884C\u5F15\u64CE",slug:"\u6267\u884C\u5F15\u64CE",children:[{level:3,title:"\u6267\u884C\u5F15\u64CE\u6982\u8FF0",slug:"\u6267\u884C\u5F15\u64CE\u6982\u8FF0",children:[]},{level:3,title:"Java\u4EE3\u7801\u7F16\u8BD1\u548C\u6267\u884C\u7684\u8FC7\u7A0B",slug:"java\u4EE3\u7801\u7F16\u8BD1\u548C\u6267\u884C\u7684\u8FC7\u7A0B",children:[]},{level:3,title:"\u673A\u5668\u7801\u3001\u6307\u4EE4\u548C\u6C47\u7F16\u8BED\u8A00",slug:"\u673A\u5668\u7801\u3001\u6307\u4EE4\u548C\u6C47\u7F16\u8BED\u8A00",children:[]},{level:3,title:"\u89E3\u91CA\u5668",slug:"\u89E3\u91CA\u5668",children:[]},{level:3,title:"JIT\u7F16\u8BD1\u5668",slug:"jit\u7F16\u8BD1\u5668",children:[]}]},{level:2,title:"StringTable",slug:"stringtable",children:[{level:3,title:"String\u7684\u57FA\u672C\u7279\u6027",slug:"string\u7684\u57FA\u672C\u7279\u6027",children:[]},{level:3,title:"String\u7684\u5185\u5B58\u5206\u914D",slug:"string\u7684\u5185\u5B58\u5206\u914D",children:[]},{level:3,title:"\u5B57\u7B26\u4E32\u62FC\u63A5\u64CD\u4F5C",slug:"\u5B57\u7B26\u4E32\u62FC\u63A5\u64CD\u4F5C",children:[]},{level:3,title:"intern()\u7684\u4F7F\u7528",slug:"intern-\u7684\u4F7F\u7528",children:[]},{level:3,title:"StringTable\u7684\u5783\u573E\u56DE\u6536\u548CString\u53BB\u91CD",slug:"stringtable\u7684\u5783\u573E\u56DE\u6536\u548Cstring\u53BB\u91CD",children:[]}]},{level:2,title:"\u5783\u573E\u56DE\u6536\u6982\u8FF0",slug:"\u5783\u573E\u56DE\u6536\u6982\u8FF0",children:[{level:3,title:"\u4EC0\u4E48\u662F\u5783\u573E",slug:"\u4EC0\u4E48\u662F\u5783\u573E",children:[]},{level:3,title:"\u4E3A\u4EC0\u4E48\u9700\u8981GC",slug:"\u4E3A\u4EC0\u4E48\u9700\u8981gc",children:[]},{level:3,title:"\u65E9\u671F\u5783\u573E\u56DE\u6536",slug:"\u65E9\u671F\u5783\u573E\u56DE\u6536",children:[]},{level:3,title:"Java\u5783\u573E\u56DE\u6536\u673A\u5236",slug:"java\u5783\u573E\u56DE\u6536\u673A\u5236",children:[]}]},{level:2,title:"\u5783\u573E\u56DE\u6536\u7B97\u6CD5",slug:"\u5783\u573E\u56DE\u6536\u7B97\u6CD5",children:[{level:3,title:"\u6807\u8BB0\u9636\u6BB5\uFF1A\u5F15\u7528\u8BA1\u6570\u7B97\u6CD5",slug:"\u6807\u8BB0\u9636\u6BB5-\u5F15\u7528\u8BA1\u6570\u7B97\u6CD5",children:[]},{level:3,title:"\u6807\u8BB0\u9636\u6BB5\uFF1A\u53EF\u8FBE\u6027\u5206\u6790\u7B97\u6CD5",slug:"\u6807\u8BB0\u9636\u6BB5-\u53EF\u8FBE\u6027\u5206\u6790\u7B97\u6CD5",children:[]},{level:3,title:"\u5BF9\u8C61\u7684finalization\u673A\u5236",slug:"\u5BF9\u8C61\u7684finalization\u673A\u5236",children:[]},{level:3,title:"\u6E05\u9664\u9636\u6BB5\uFF1A\u6807\u8BB0-\u6E05\u9664\u7B97\u6CD5",slug:"\u6E05\u9664\u9636\u6BB5-\u6807\u8BB0-\u6E05\u9664\u7B97\u6CD5",children:[]},{level:3,title:"\u6E05\u9664\u9636\u6BB5\uFF1A\u590D\u5236\u7B97\u6CD5",slug:"\u6E05\u9664\u9636\u6BB5-\u590D\u5236\u7B97\u6CD5",children:[]},{level:3,title:"\u6E05\u9664\u9636\u6BB5\uFF1A\u6807\u8BB0-\u538B\u7F29\u7B97\u6CD5",slug:"\u6E05\u9664\u9636\u6BB5-\u6807\u8BB0-\u538B\u7F29\u7B97\u6CD5",children:[]}]},{level:2,title:"\u5783\u573E\u56DE\u6536\u76F8\u5173\u6982\u5FF5",slug:"\u5783\u573E\u56DE\u6536\u76F8\u5173\u6982\u5FF5",children:[{level:3,title:"System.gc()\u7684\u7406\u89E3",slug:"system-gc-\u7684\u7406\u89E3",children:[]},{level:3,title:"\u5185\u5B58\u6EA2\u51FA\u4E0E\u5185\u5B58\u6CC4\u6F0F",slug:"\u5185\u5B58\u6EA2\u51FA\u4E0E\u5185\u5B58\u6CC4\u6F0F",children:[]},{level:3,title:"stop the world",slug:"stop-the-world",children:[]},{level:3,title:"\u5783\u573E\u56DE\u6536\u7684\u5E76\u884C\u4E0E\u5E76\u53D1",slug:"\u5783\u573E\u56DE\u6536\u7684\u5E76\u884C\u4E0E\u5E76\u53D1",children:[]},{level:3,title:"\u5B89\u5168\u70B9\u548C\u5B89\u5168\u533A\u57DF",slug:"\u5B89\u5168\u70B9\u548C\u5B89\u5168\u533A\u57DF",children:[]},{level:3,title:"\u5F15\u7528",slug:"\u5F15\u7528",children:[]}]},{level:2,title:"\u5783\u573E\u56DE\u6536\u5668",slug:"\u5783\u573E\u56DE\u6536\u5668",children:[{level:3,title:"GC\u5206\u7C7B\u4E0E\u6027\u80FD\u6307\u6807",slug:"gc\u5206\u7C7B\u4E0E\u6027\u80FD\u6307\u6807",children:[]},{level:3,title:"\u4E0D\u540C\u7684\u5783\u573E\u56DE\u6536\u5668\u6982\u8FF0",slug:"\u4E0D\u540C\u7684\u5783\u573E\u56DE\u6536\u5668\u6982\u8FF0",children:[]},{level:3,title:"Serial\u56DE\u6536\u5668\uFF1A\u4E32\u884C\u56DE\u6536",slug:"serial\u56DE\u6536\u5668-\u4E32\u884C\u56DE\u6536",children:[]},{level:3,title:"ParNew\u56DE\u6536\u5668\uFF1A\u5E76\u884C\u56DE\u6536",slug:"parnew\u56DE\u6536\u5668-\u5E76\u884C\u56DE\u6536",children:[]},{level:3,title:"Parallel \u56DE\u6536\u5668\uFF1A\u541E\u5410\u91CF\u4F18\u5148",slug:"parallel-\u56DE\u6536\u5668-\u541E\u5410\u91CF\u4F18\u5148",children:[]},{level:3,title:"CMS\u56DE\u6536\u5668\uFF1A\u4F4E\u5EF6\u8FDF",slug:"cms\u56DE\u6536\u5668-\u4F4E\u5EF6\u8FDF",children:[]},{level:3,title:"G1\u56DE\u6536\u5668\uFF1A\u533A\u57DF\u5316\u5206\u4EE3\u5F0F",slug:"g1\u56DE\u6536\u5668-\u533A\u57DF\u5316\u5206\u4EE3\u5F0F",children:[]}]}],git:{updatedTime:1710173784e3,contributors:[{name:"shailene",email:"64005626+shaileneF@users.noreply.github.com",commits:1}]},filePathRelative:"java/JVM/JVM\u4E0A\u7BC7/\u4E00\u4E9B\u77E5\u8BC6\u70B9\u7684\u8BB0\u5F55.md"};export{l as data};
                                                                      diff --git "a/assets/\345\260\232\347\241\205\350\260\267_\345\256\213\347\272\242\345\272\267_JDBC.html.0f329aed.js" "b/assets/\345\260\232\347\241\205\350\260\267_\345\256\213\347\272\242\345\272\267_JDBC.html.753425b4.js"
                                                                      similarity index 99%
                                                                      rename from "assets/\345\260\232\347\241\205\350\260\267_\345\256\213\347\272\242\345\272\267_JDBC.html.0f329aed.js"
                                                                      rename to "assets/\345\260\232\347\241\205\350\260\267_\345\256\213\347\272\242\345\272\267_JDBC.html.753425b4.js"
                                                                      index 4d914583..cec9e8db 100644
                                                                      --- "a/assets/\345\260\232\347\241\205\350\260\267_\345\256\213\347\272\242\345\272\267_JDBC.html.0f329aed.js"
                                                                      +++ "b/assets/\345\260\232\347\241\205\350\260\267_\345\256\213\347\272\242\345\272\267_JDBC.html.753425b4.js"
                                                                      @@ -1,4 +1,4 @@
                                                                      -import{_ as p,r as o,o as e,c,a as n,b as l,F as u,e as s,d as a}from"./app.0d029894.js";var i="/study/assets/1566741430592.16f9a4fe.png",k="/study/assets/1555575760234.39df2b63.png",r="/study/assets/1555575981203.87ceccb0.png",d="/study/assets/1566741692804.eec5d80f.png",m="/study/assets/1565969323908.134a47a9.png",g="/study/assets/1555576157618.99de83c0.png",y="/study/assets/1555576170074.74a53eba.png",h="/study/assets/1566134718955.8dbc66fb.png",b="/study/assets/1566134781682.c3cdbb52.png",v="/study/assets/1566135290460.f66890e5.png",w="/study/assets/1566136831283.4e2bce01.png",f="/study/assets/1555576477107.5725ca56.png",q="/study/assets/1566573842140.d0c5feaa.png",S="/study/assets/1566569819744.2e9ca4f6.png",C="/study/assets/1555580152530.3cf7b951.png",D="/study/assets/1555579494691.dce3af2d.png",j="/study/assets/1555579816884.ebfdfe26.png",_="/study/assets/1555580275036.8c145196.png",x="/study/assets/1555580735377.f63246cc.png",B="/study/assets/1555580763636.c7110b9e.png",P="/study/assets/1555580937490.fe3af40b.png",L="/study/assets/1555580965019.6a24e0d0.png",R="/study/assets/1555581069798.86481942.png",T="/study/assets/1555586275271.595994c4.png",E="/study/assets/1566726681515.79e40f89.png",I="/study/assets/1566745811244.e9812d2c.png",U="/study/assets/1555593464033.2c113613.png",A="/study/assets/1555593598606.2ff854b7.png",Q="/study/assets/1555595163263.80d27e34.png",J="/study/assets/1555595198644.e2d076a8.png";const O={},M=s('

                                                                      JDBC\u6838\u5FC3\u6280\u672F

                                                                      \u8BB2\u5E08\uFF1A\u5B8B\u7EA2\u5EB7

                                                                      \u5FAE\u535A\uFF1A\u5C1A\u7845\u8C37-\u5B8B\u7EA2\u5EB7


                                                                      \u7B2C1\u7AE0\uFF1AJDBC\u6982\u8FF0

                                                                      1.1 \u6570\u636E\u7684\u6301\u4E45\u5316

                                                                      • \u6301\u4E45\u5316(persistence)\uFF1A\u628A\u6570\u636E\u4FDD\u5B58\u5230\u53EF\u6389\u7535\u5F0F\u5B58\u50A8\u8BBE\u5907\u4E2D\u4EE5\u4F9B\u4E4B\u540E\u4F7F\u7528\u3002\u5927\u591A\u6570\u60C5\u51B5\u4E0B\uFF0C\u7279\u522B\u662F\u4F01\u4E1A\u7EA7\u5E94\u7528\uFF0C\u6570\u636E\u6301\u4E45\u5316\u610F\u5473\u7740\u5C06\u5185\u5B58\u4E2D\u7684\u6570\u636E\u4FDD\u5B58\u5230\u786C\u76D8\u4E0A\u52A0\u4EE5\u201D\u56FA\u5316\u201D\uFF0C\u800C\u6301\u4E45\u5316\u7684\u5B9E\u73B0\u8FC7\u7A0B\u5927\u591A\u901A\u8FC7\u5404\u79CD\u5173\u7CFB\u6570\u636E\u5E93\u6765\u5B8C\u6210\u3002

                                                                      • \u6301\u4E45\u5316\u7684\u4E3B\u8981\u5E94\u7528\u662F\u5C06\u5185\u5B58\u4E2D\u7684\u6570\u636E\u5B58\u50A8\u5728\u5173\u7CFB\u578B\u6570\u636E\u5E93\u4E2D\uFF0C\u5F53\u7136\u4E5F\u53EF\u4EE5\u5B58\u50A8\u5728\u78C1\u76D8\u6587\u4EF6\u3001XML\u6570\u636E\u6587\u4EF6\u4E2D\u3002

                                                                        1566741430592

                                                                      1.2 Java\u4E2D\u7684\u6570\u636E\u5B58\u50A8\u6280\u672F

                                                                      • \u5728Java\u4E2D\uFF0C\u6570\u636E\u5E93\u5B58\u53D6\u6280\u672F\u53EF\u5206\u4E3A\u5982\u4E0B\u51E0\u7C7B\uFF1A

                                                                        • JDBC\u76F4\u63A5\u8BBF\u95EE\u6570\u636E\u5E93

                                                                        • JDO (Java Data Object )\u6280\u672F

                                                                        • \u7B2C\u4E09\u65B9O/R\u5DE5\u5177\uFF0C\u5982Hibernate, Mybatis \u7B49

                                                                      • JDBC\u662Fjava\u8BBF\u95EE\u6570\u636E\u5E93\u7684\u57FA\u77F3\uFF0CJDO\u3001Hibernate\u3001MyBatis\u7B49\u53EA\u662F\u66F4\u597D\u7684\u5C01\u88C5\u4E86JDBC\u3002

                                                                      1.3 JDBC\u4ECB\u7ECD

                                                                      • JDBC(Java Database Connectivity)\u662F\u4E00\u4E2A\u72EC\u7ACB\u4E8E\u7279\u5B9A\u6570\u636E\u5E93\u7BA1\u7406\u7CFB\u7EDF\u3001\u901A\u7528\u7684SQL\u6570\u636E\u5E93\u5B58\u53D6\u548C\u64CD\u4F5C\u7684\u516C\u5171\u63A5\u53E3\uFF08\u4E00\u7EC4API\uFF09\uFF0C\u5B9A\u4E49\u4E86\u7528\u6765\u8BBF\u95EE\u6570\u636E\u5E93\u7684\u6807\u51C6Java\u7C7B\u5E93\uFF0C\uFF08java.sql,javax.sql\uFF09\u4F7F\u7528\u8FD9\u4E9B\u7C7B\u5E93\u53EF\u4EE5\u4EE5\u4E00\u79CD\u6807\u51C6\u7684\u65B9\u6CD5\u3001\u65B9\u4FBF\u5730\u8BBF\u95EE\u6570\u636E\u5E93\u8D44\u6E90\u3002
                                                                      • JDBC\u4E3A\u8BBF\u95EE\u4E0D\u540C\u7684\u6570\u636E\u5E93\u63D0\u4F9B\u4E86\u4E00\u79CD\u7EDF\u4E00\u7684\u9014\u5F84\uFF0C\u4E3A\u5F00\u53D1\u8005\u5C4F\u853D\u4E86\u4E00\u4E9B\u7EC6\u8282\u95EE\u9898\u3002
                                                                      • JDBC\u7684\u76EE\u6807\u662F\u4F7FJava\u7A0B\u5E8F\u5458\u4F7F\u7528JDBC\u53EF\u4EE5\u8FDE\u63A5\u4EFB\u4F55\u63D0\u4F9B\u4E86JDBC\u9A71\u52A8\u7A0B\u5E8F\u7684\u6570\u636E\u5E93\u7CFB\u7EDF\uFF0C\u8FD9\u6837\u5C31\u4F7F\u5F97\u7A0B\u5E8F\u5458\u65E0\u9700\u5BF9\u7279\u5B9A\u7684\u6570\u636E\u5E93\u7CFB\u7EDF\u7684\u7279\u70B9\u6709\u8FC7\u591A\u7684\u4E86\u89E3\uFF0C\u4ECE\u800C\u5927\u5927\u7B80\u5316\u548C\u52A0\u5FEB\u4E86\u5F00\u53D1\u8FC7\u7A0B\u3002
                                                                      • \u5982\u679C\u6CA1\u6709JDBC\uFF0C\u90A3\u4E48Java\u7A0B\u5E8F\u8BBF\u95EE\u6570\u636E\u5E93\u65F6\u662F\u8FD9\u6837\u7684\uFF1A

                                                                      1555575760234


                                                                      • \u6709\u4E86JDBC\uFF0CJava\u7A0B\u5E8F\u8BBF\u95EE\u6570\u636E\u5E93\u65F6\u662F\u8FD9\u6837\u7684\uFF1A

                                                                      1555575981203


                                                                      • \u603B\u7ED3\u5982\u4E0B\uFF1A

                                                                      1566741692804

                                                                      1.4 JDBC\u4F53\u7CFB\u7ED3\u6784

                                                                      • JDBC\u63A5\u53E3\uFF08API\uFF09\u5305\u62EC\u4E24\u4E2A\u5C42\u6B21\uFF1A
                                                                        • \u9762\u5411\u5E94\u7528\u7684API\uFF1AJava API\uFF0C\u62BD\u8C61\u63A5\u53E3\uFF0C\u4F9B\u5E94\u7528\u7A0B\u5E8F\u5F00\u53D1\u4EBA\u5458\u4F7F\u7528\uFF08\u8FDE\u63A5\u6570\u636E\u5E93\uFF0C\u6267\u884CSQL\u8BED\u53E5\uFF0C\u83B7\u5F97\u7ED3\u679C\uFF09\u3002
                                                                        • \u9762\u5411\u6570\u636E\u5E93\u7684API\uFF1AJava Driver API\uFF0C\u4F9B\u5F00\u53D1\u5546\u5F00\u53D1\u6570\u636E\u5E93\u9A71\u52A8\u7A0B\u5E8F\u7528\u3002

                                                                      JDBC\u662Fsun\u516C\u53F8\u63D0\u4F9B\u4E00\u5957\u7528\u4E8E\u6570\u636E\u5E93\u64CD\u4F5C\u7684\u63A5\u53E3\uFF0Cjava\u7A0B\u5E8F\u5458\u53EA\u9700\u8981\u9762\u5411\u8FD9\u5957\u63A5\u53E3\u7F16\u7A0B\u5373\u53EF\u3002

                                                                      \u4E0D\u540C\u7684\u6570\u636E\u5E93\u5382\u5546\uFF0C\u9700\u8981\u9488\u5BF9\u8FD9\u5957\u63A5\u53E3\uFF0C\u63D0\u4F9B\u4E0D\u540C\u5B9E\u73B0\u3002\u4E0D\u540C\u7684\u5B9E\u73B0\u7684\u96C6\u5408\uFF0C\u5373\u4E3A\u4E0D\u540C\u6570\u636E\u5E93\u7684\u9A71\u52A8\u3002 \u2014\u2014\u2014\u2014\u9762\u5411\u63A5\u53E3\u7F16\u7A0B

                                                                      1.5 JDBC\u7A0B\u5E8F\u7F16\u5199\u6B65\u9AA4

                                                                      1565969323908

                                                                      \u8865\u5145\uFF1AODBC(Open Database Connectivity\uFF0C\u5F00\u653E\u5F0F\u6570\u636E\u5E93\u8FDE\u63A5)\uFF0C\u662F\u5FAE\u8F6F\u5728Windows\u5E73\u53F0\u4E0B\u63A8\u51FA\u7684\u3002\u4F7F\u7528\u8005\u5728\u7A0B\u5E8F\u4E2D\u53EA\u9700\u8981\u8C03\u7528ODBC API\uFF0C\u7531 ODBC \u9A71\u52A8\u7A0B\u5E8F\u5C06\u8C03\u7528\u8F6C\u6362\u6210\u4E3A\u5BF9\u7279\u5B9A\u7684\u6570\u636E\u5E93\u7684\u8C03\u7528\u8BF7\u6C42\u3002

                                                                      \u7B2C2\u7AE0\uFF1A\u83B7\u53D6\u6570\u636E\u5E93\u8FDE\u63A5

                                                                      2.1 \u8981\u7D20\u4E00\uFF1ADriver\u63A5\u53E3\u5B9E\u73B0\u7C7B

                                                                      2.1.1 Driver\u63A5\u53E3\u4ECB\u7ECD

                                                                      • java.sql.Driver \u63A5\u53E3\u662F\u6240\u6709 JDBC \u9A71\u52A8\u7A0B\u5E8F\u9700\u8981\u5B9E\u73B0\u7684\u63A5\u53E3\u3002\u8FD9\u4E2A\u63A5\u53E3\u662F\u63D0\u4F9B\u7ED9\u6570\u636E\u5E93\u5382\u5546\u4F7F\u7528\u7684\uFF0C\u4E0D\u540C\u6570\u636E\u5E93\u5382\u5546\u63D0\u4F9B\u4E0D\u540C\u7684\u5B9E\u73B0\u3002

                                                                      • \u5728\u7A0B\u5E8F\u4E2D\u4E0D\u9700\u8981\u76F4\u63A5\u53BB\u8BBF\u95EE\u5B9E\u73B0\u4E86 Driver \u63A5\u53E3\u7684\u7C7B\uFF0C\u800C\u662F\u7531\u9A71\u52A8\u7A0B\u5E8F\u7BA1\u7406\u5668\u7C7B(java.sql.DriverManager)\u53BB\u8C03\u7528\u8FD9\u4E9BDriver\u5B9E\u73B0\u3002

                                                                        • Oracle\u7684\u9A71\u52A8\uFF1Aoracle.jdbc.driver.OracleDriver
                                                                        • mySql\u7684\u9A71\u52A8\uFF1A com.mysql.jdbc.Driver

                                                                      1555576157618

                                                                      1555576170074

                                                                      • \u5C06\u4E0A\u8FF0jar\u5305\u62F7\u8D1D\u5230Java\u5DE5\u7A0B\u7684\u4E00\u4E2A\u76EE\u5F55\u4E2D\uFF0C\u4E60\u60EF\u4E0A\u65B0\u5EFA\u4E00\u4E2Alib\u6587\u4EF6\u5939\u3002

                                                                      1566134718955

                                                                      \u5728\u9A71\u52A8jar\u4E0A\u53F3\u952E-->Build Path-->Add to Build Path

                                                                      1566134781682

                                                                      \u6CE8\u610F\uFF1A\u5982\u679C\u662FDynamic Web Project\uFF08\u52A8\u6001\u7684web\u9879\u76EE\uFF09\u8BDD\uFF0C\u5219\u662F\u628A\u9A71\u52A8jar\u653E\u5230WebContent\uFF08\u6709\u7684\u5F00\u53D1\u5DE5\u5177\u53EBWebRoot\uFF09\u76EE\u5F55\u4E2D\u7684WEB-INF\u76EE\u5F55\u4E2D\u7684lib\u76EE\u5F55\u4E0B\u5373\u53EF

                                                                      1566135290460

                                                                      2.1.2 \u52A0\u8F7D\u4E0E\u6CE8\u518CJDBC\u9A71\u52A8

                                                                      • \u52A0\u8F7D\u9A71\u52A8\uFF1A\u52A0\u8F7D JDBC \u9A71\u52A8\u9700\u8C03\u7528 Class \u7C7B\u7684\u9759\u6001\u65B9\u6CD5 forName()\uFF0C\u5411\u5176\u4F20\u9012\u8981\u52A0\u8F7D\u7684 JDBC \u9A71\u52A8\u7684\u7C7B\u540D

                                                                        • Class.forName(\u201Ccom.mysql.jdbc.Driver\u201D);
                                                                      • \u6CE8\u518C\u9A71\u52A8\uFF1ADriverManager \u7C7B\u662F\u9A71\u52A8\u7A0B\u5E8F\u7BA1\u7406\u5668\u7C7B\uFF0C\u8D1F\u8D23\u7BA1\u7406\u9A71\u52A8\u7A0B\u5E8F

                                                                        • \u4F7F\u7528DriverManager.registerDriver(com.mysql.jdbc.Driver)\u6765\u6CE8\u518C\u9A71\u52A8

                                                                        • \u901A\u5E38\u4E0D\u7528\u663E\u5F0F\u8C03\u7528 DriverManager \u7C7B\u7684 registerDriver() \u65B9\u6CD5\u6765\u6CE8\u518C\u9A71\u52A8\u7A0B\u5E8F\u7C7B\u7684\u5B9E\u4F8B\uFF0C\u56E0\u4E3A Driver \u63A5\u53E3\u7684\u9A71\u52A8\u7A0B\u5E8F\u7C7B\u90FD\u5305\u542B\u4E86\u9759\u6001\u4EE3\u7801\u5757\uFF0C\u5728\u8FD9\u4E2A\u9759\u6001\u4EE3\u7801\u5757\u4E2D\uFF0C\u4F1A\u8C03\u7528 DriverManager.registerDriver() \u65B9\u6CD5\u6765\u6CE8\u518C\u81EA\u8EAB\u7684\u4E00\u4E2A\u5B9E\u4F8B\u3002\u4E0B\u56FE\u662FMySQL\u7684Driver\u5B9E\u73B0\u7C7B\u7684\u6E90\u7801\uFF1A

                                                                          1566136831283

                                                                      2.2 \u8981\u7D20\u4E8C\uFF1AURL

                                                                      • JDBC URL \u7528\u4E8E\u6807\u8BC6\u4E00\u4E2A\u88AB\u6CE8\u518C\u7684\u9A71\u52A8\u7A0B\u5E8F\uFF0C\u9A71\u52A8\u7A0B\u5E8F\u7BA1\u7406\u5668\u901A\u8FC7\u8FD9\u4E2A URL \u9009\u62E9\u6B63\u786E\u7684\u9A71\u52A8\u7A0B\u5E8F\uFF0C\u4ECE\u800C\u5EFA\u7ACB\u5230\u6570\u636E\u5E93\u7684\u8FDE\u63A5\u3002

                                                                      • JDBC URL\u7684\u6807\u51C6\u7531\u4E09\u90E8\u5206\u7EC4\u6210\uFF0C\u5404\u90E8\u5206\u95F4\u7528\u5192\u53F7\u5206\u9694\u3002

                                                                        • jdbc:\u5B50\u534F\u8BAE:\u5B50\u540D\u79F0
                                                                        • \u534F\u8BAE\uFF1AJDBC URL\u4E2D\u7684\u534F\u8BAE\u603B\u662Fjdbc
                                                                        • \u5B50\u534F\u8BAE\uFF1A\u5B50\u534F\u8BAE\u7528\u4E8E\u6807\u8BC6\u4E00\u4E2A\u6570\u636E\u5E93\u9A71\u52A8\u7A0B\u5E8F
                                                                        • \u5B50\u540D\u79F0\uFF1A\u4E00\u79CD\u6807\u8BC6\u6570\u636E\u5E93\u7684\u65B9\u6CD5\u3002\u5B50\u540D\u79F0\u53EF\u4EE5\u4F9D\u4E0D\u540C\u7684\u5B50\u534F\u8BAE\u800C\u53D8\u5316\uFF0C\u7528\u5B50\u540D\u79F0\u7684\u76EE\u7684\u662F\u4E3A\u4E86\u5B9A\u4F4D\u6570\u636E\u5E93\u63D0\u4F9B\u8DB3\u591F\u7684\u4FE1\u606F\u3002\u5305\u542B\u4E3B\u673A\u540D(\u5BF9\u5E94\u670D\u52A1\u7AEF\u7684ip\u5730\u5740)\uFF0C\u7AEF\u53E3\u53F7\uFF0C\u6570\u636E\u5E93\u540D
                                                                      • \u4E3E\u4F8B\uFF1A

                                                                        1555576477107

                                                                      • \u51E0\u79CD\u5E38\u7528\u6570\u636E\u5E93\u7684 JDBC URL

                                                                        • MySQL\u7684\u8FDE\u63A5URL\u7F16\u5199\u65B9\u5F0F\uFF1A

                                                                          • jdbc:mysql://\u4E3B\u673A\u540D\u79F0:mysql\u670D\u52A1\u7AEF\u53E3\u53F7/\u6570\u636E\u5E93\u540D\u79F0?\u53C2\u6570=\u503C&\u53C2\u6570=\u503C
                                                                          • jdbc:mysql://localhost:3306/atguigu
                                                                          • jdbc:mysql://localhost:3306/atguigu**?useUnicode=true&characterEncoding=utf8**\uFF08\u5982\u679CJDBC\u7A0B\u5E8F\u4E0E\u670D\u52A1\u5668\u7AEF\u7684\u5B57\u7B26\u96C6\u4E0D\u4E00\u81F4\uFF0C\u4F1A\u5BFC\u81F4\u4E71\u7801\uFF0C\u90A3\u4E48\u53EF\u4EE5\u901A\u8FC7\u53C2\u6570\u6307\u5B9A\u670D\u52A1\u5668\u7AEF\u7684\u5B57\u7B26\u96C6\uFF09
                                                                          • jdbc:mysql://localhost:3306/atguigu?user=root&password=123456
                                                                        • Oracle 9i\u7684\u8FDE\u63A5URL\u7F16\u5199\u65B9\u5F0F\uFF1A

                                                                          • jdbc:oracle:thin:@\u4E3B\u673A\u540D\u79F0:oracle\u670D\u52A1\u7AEF\u53E3\u53F7:\u6570\u636E\u5E93\u540D\u79F0
                                                                          • jdbc:oracle:thin:@localhost:1521:atguigu
                                                                        • SQLServer\u7684\u8FDE\u63A5URL\u7F16\u5199\u65B9\u5F0F\uFF1A

                                                                          • jdbc:sqlserver://\u4E3B\u673A\u540D\u79F0:sqlserver\u670D\u52A1\u7AEF\u53E3\u53F7:DatabaseName=\u6570\u636E\u5E93\u540D\u79F0

                                                                          • jdbc:sqlserver://localhost:1433:DatabaseName=atguigu

                                                                      2.3 \u8981\u7D20\u4E09\uFF1A\u7528\u6237\u540D\u548C\u5BC6\u7801

                                                                      • user,password\u53EF\u4EE5\u7528\u201C\u5C5E\u6027\u540D=\u5C5E\u6027\u503C\u201D\u65B9\u5F0F\u544A\u8BC9\u6570\u636E\u5E93
                                                                      • \u53EF\u4EE5\u8C03\u7528 DriverManager \u7C7B\u7684 getConnection() \u65B9\u6CD5\u5EFA\u7ACB\u5230\u6570\u636E\u5E93\u7684\u8FDE\u63A5

                                                                      2.4 \u6570\u636E\u5E93\u8FDE\u63A5\u65B9\u5F0F\u4E3E\u4F8B

                                                                      2.4.1 \u8FDE\u63A5\u65B9\u5F0F\u4E00

                                                                      	@Test
                                                                      +import{_ as p,r as o,o as e,c,a as n,b as l,F as u,e as s,d as a}from"./app.f8791b52.js";var i="/study/assets/1566741430592.16f9a4fe.png",k="/study/assets/1555575760234.39df2b63.png",r="/study/assets/1555575981203.87ceccb0.png",d="/study/assets/1566741692804.eec5d80f.png",m="/study/assets/1565969323908.134a47a9.png",g="/study/assets/1555576157618.99de83c0.png",y="/study/assets/1555576170074.74a53eba.png",h="/study/assets/1566134718955.8dbc66fb.png",b="/study/assets/1566134781682.c3cdbb52.png",v="/study/assets/1566135290460.f66890e5.png",w="/study/assets/1566136831283.4e2bce01.png",f="/study/assets/1555576477107.5725ca56.png",q="/study/assets/1566573842140.d0c5feaa.png",S="/study/assets/1566569819744.2e9ca4f6.png",C="/study/assets/1555580152530.3cf7b951.png",D="/study/assets/1555579494691.dce3af2d.png",j="/study/assets/1555579816884.ebfdfe26.png",_="/study/assets/1555580275036.8c145196.png",x="/study/assets/1555580735377.f63246cc.png",B="/study/assets/1555580763636.c7110b9e.png",P="/study/assets/1555580937490.fe3af40b.png",L="/study/assets/1555580965019.6a24e0d0.png",R="/study/assets/1555581069798.86481942.png",T="/study/assets/1555586275271.595994c4.png",E="/study/assets/1566726681515.79e40f89.png",I="/study/assets/1566745811244.e9812d2c.png",U="/study/assets/1555593464033.2c113613.png",A="/study/assets/1555593598606.2ff854b7.png",Q="/study/assets/1555595163263.80d27e34.png",J="/study/assets/1555595198644.e2d076a8.png";const O={},M=s('

                                                                      JDBC\u6838\u5FC3\u6280\u672F

                                                                      \u8BB2\u5E08\uFF1A\u5B8B\u7EA2\u5EB7

                                                                      \u5FAE\u535A\uFF1A\u5C1A\u7845\u8C37-\u5B8B\u7EA2\u5EB7


                                                                      \u7B2C1\u7AE0\uFF1AJDBC\u6982\u8FF0

                                                                      1.1 \u6570\u636E\u7684\u6301\u4E45\u5316

                                                                      • \u6301\u4E45\u5316(persistence)\uFF1A\u628A\u6570\u636E\u4FDD\u5B58\u5230\u53EF\u6389\u7535\u5F0F\u5B58\u50A8\u8BBE\u5907\u4E2D\u4EE5\u4F9B\u4E4B\u540E\u4F7F\u7528\u3002\u5927\u591A\u6570\u60C5\u51B5\u4E0B\uFF0C\u7279\u522B\u662F\u4F01\u4E1A\u7EA7\u5E94\u7528\uFF0C\u6570\u636E\u6301\u4E45\u5316\u610F\u5473\u7740\u5C06\u5185\u5B58\u4E2D\u7684\u6570\u636E\u4FDD\u5B58\u5230\u786C\u76D8\u4E0A\u52A0\u4EE5\u201D\u56FA\u5316\u201D\uFF0C\u800C\u6301\u4E45\u5316\u7684\u5B9E\u73B0\u8FC7\u7A0B\u5927\u591A\u901A\u8FC7\u5404\u79CD\u5173\u7CFB\u6570\u636E\u5E93\u6765\u5B8C\u6210\u3002

                                                                      • \u6301\u4E45\u5316\u7684\u4E3B\u8981\u5E94\u7528\u662F\u5C06\u5185\u5B58\u4E2D\u7684\u6570\u636E\u5B58\u50A8\u5728\u5173\u7CFB\u578B\u6570\u636E\u5E93\u4E2D\uFF0C\u5F53\u7136\u4E5F\u53EF\u4EE5\u5B58\u50A8\u5728\u78C1\u76D8\u6587\u4EF6\u3001XML\u6570\u636E\u6587\u4EF6\u4E2D\u3002

                                                                        1566741430592

                                                                      1.2 Java\u4E2D\u7684\u6570\u636E\u5B58\u50A8\u6280\u672F

                                                                      • \u5728Java\u4E2D\uFF0C\u6570\u636E\u5E93\u5B58\u53D6\u6280\u672F\u53EF\u5206\u4E3A\u5982\u4E0B\u51E0\u7C7B\uFF1A

                                                                        • JDBC\u76F4\u63A5\u8BBF\u95EE\u6570\u636E\u5E93

                                                                        • JDO (Java Data Object )\u6280\u672F

                                                                        • \u7B2C\u4E09\u65B9O/R\u5DE5\u5177\uFF0C\u5982Hibernate, Mybatis \u7B49

                                                                      • JDBC\u662Fjava\u8BBF\u95EE\u6570\u636E\u5E93\u7684\u57FA\u77F3\uFF0CJDO\u3001Hibernate\u3001MyBatis\u7B49\u53EA\u662F\u66F4\u597D\u7684\u5C01\u88C5\u4E86JDBC\u3002

                                                                      1.3 JDBC\u4ECB\u7ECD

                                                                      • JDBC(Java Database Connectivity)\u662F\u4E00\u4E2A\u72EC\u7ACB\u4E8E\u7279\u5B9A\u6570\u636E\u5E93\u7BA1\u7406\u7CFB\u7EDF\u3001\u901A\u7528\u7684SQL\u6570\u636E\u5E93\u5B58\u53D6\u548C\u64CD\u4F5C\u7684\u516C\u5171\u63A5\u53E3\uFF08\u4E00\u7EC4API\uFF09\uFF0C\u5B9A\u4E49\u4E86\u7528\u6765\u8BBF\u95EE\u6570\u636E\u5E93\u7684\u6807\u51C6Java\u7C7B\u5E93\uFF0C\uFF08java.sql,javax.sql\uFF09\u4F7F\u7528\u8FD9\u4E9B\u7C7B\u5E93\u53EF\u4EE5\u4EE5\u4E00\u79CD\u6807\u51C6\u7684\u65B9\u6CD5\u3001\u65B9\u4FBF\u5730\u8BBF\u95EE\u6570\u636E\u5E93\u8D44\u6E90\u3002
                                                                      • JDBC\u4E3A\u8BBF\u95EE\u4E0D\u540C\u7684\u6570\u636E\u5E93\u63D0\u4F9B\u4E86\u4E00\u79CD\u7EDF\u4E00\u7684\u9014\u5F84\uFF0C\u4E3A\u5F00\u53D1\u8005\u5C4F\u853D\u4E86\u4E00\u4E9B\u7EC6\u8282\u95EE\u9898\u3002
                                                                      • JDBC\u7684\u76EE\u6807\u662F\u4F7FJava\u7A0B\u5E8F\u5458\u4F7F\u7528JDBC\u53EF\u4EE5\u8FDE\u63A5\u4EFB\u4F55\u63D0\u4F9B\u4E86JDBC\u9A71\u52A8\u7A0B\u5E8F\u7684\u6570\u636E\u5E93\u7CFB\u7EDF\uFF0C\u8FD9\u6837\u5C31\u4F7F\u5F97\u7A0B\u5E8F\u5458\u65E0\u9700\u5BF9\u7279\u5B9A\u7684\u6570\u636E\u5E93\u7CFB\u7EDF\u7684\u7279\u70B9\u6709\u8FC7\u591A\u7684\u4E86\u89E3\uFF0C\u4ECE\u800C\u5927\u5927\u7B80\u5316\u548C\u52A0\u5FEB\u4E86\u5F00\u53D1\u8FC7\u7A0B\u3002
                                                                      • \u5982\u679C\u6CA1\u6709JDBC\uFF0C\u90A3\u4E48Java\u7A0B\u5E8F\u8BBF\u95EE\u6570\u636E\u5E93\u65F6\u662F\u8FD9\u6837\u7684\uFF1A

                                                                      1555575760234


                                                                      • \u6709\u4E86JDBC\uFF0CJava\u7A0B\u5E8F\u8BBF\u95EE\u6570\u636E\u5E93\u65F6\u662F\u8FD9\u6837\u7684\uFF1A

                                                                      1555575981203


                                                                      • \u603B\u7ED3\u5982\u4E0B\uFF1A

                                                                      1566741692804

                                                                      1.4 JDBC\u4F53\u7CFB\u7ED3\u6784

                                                                      • JDBC\u63A5\u53E3\uFF08API\uFF09\u5305\u62EC\u4E24\u4E2A\u5C42\u6B21\uFF1A
                                                                        • \u9762\u5411\u5E94\u7528\u7684API\uFF1AJava API\uFF0C\u62BD\u8C61\u63A5\u53E3\uFF0C\u4F9B\u5E94\u7528\u7A0B\u5E8F\u5F00\u53D1\u4EBA\u5458\u4F7F\u7528\uFF08\u8FDE\u63A5\u6570\u636E\u5E93\uFF0C\u6267\u884CSQL\u8BED\u53E5\uFF0C\u83B7\u5F97\u7ED3\u679C\uFF09\u3002
                                                                        • \u9762\u5411\u6570\u636E\u5E93\u7684API\uFF1AJava Driver API\uFF0C\u4F9B\u5F00\u53D1\u5546\u5F00\u53D1\u6570\u636E\u5E93\u9A71\u52A8\u7A0B\u5E8F\u7528\u3002

                                                                      JDBC\u662Fsun\u516C\u53F8\u63D0\u4F9B\u4E00\u5957\u7528\u4E8E\u6570\u636E\u5E93\u64CD\u4F5C\u7684\u63A5\u53E3\uFF0Cjava\u7A0B\u5E8F\u5458\u53EA\u9700\u8981\u9762\u5411\u8FD9\u5957\u63A5\u53E3\u7F16\u7A0B\u5373\u53EF\u3002

                                                                      \u4E0D\u540C\u7684\u6570\u636E\u5E93\u5382\u5546\uFF0C\u9700\u8981\u9488\u5BF9\u8FD9\u5957\u63A5\u53E3\uFF0C\u63D0\u4F9B\u4E0D\u540C\u5B9E\u73B0\u3002\u4E0D\u540C\u7684\u5B9E\u73B0\u7684\u96C6\u5408\uFF0C\u5373\u4E3A\u4E0D\u540C\u6570\u636E\u5E93\u7684\u9A71\u52A8\u3002 \u2014\u2014\u2014\u2014\u9762\u5411\u63A5\u53E3\u7F16\u7A0B

                                                                      1.5 JDBC\u7A0B\u5E8F\u7F16\u5199\u6B65\u9AA4

                                                                      1565969323908

                                                                      \u8865\u5145\uFF1AODBC(Open Database Connectivity\uFF0C\u5F00\u653E\u5F0F\u6570\u636E\u5E93\u8FDE\u63A5)\uFF0C\u662F\u5FAE\u8F6F\u5728Windows\u5E73\u53F0\u4E0B\u63A8\u51FA\u7684\u3002\u4F7F\u7528\u8005\u5728\u7A0B\u5E8F\u4E2D\u53EA\u9700\u8981\u8C03\u7528ODBC API\uFF0C\u7531 ODBC \u9A71\u52A8\u7A0B\u5E8F\u5C06\u8C03\u7528\u8F6C\u6362\u6210\u4E3A\u5BF9\u7279\u5B9A\u7684\u6570\u636E\u5E93\u7684\u8C03\u7528\u8BF7\u6C42\u3002

                                                                      \u7B2C2\u7AE0\uFF1A\u83B7\u53D6\u6570\u636E\u5E93\u8FDE\u63A5

                                                                      2.1 \u8981\u7D20\u4E00\uFF1ADriver\u63A5\u53E3\u5B9E\u73B0\u7C7B

                                                                      2.1.1 Driver\u63A5\u53E3\u4ECB\u7ECD

                                                                      • java.sql.Driver \u63A5\u53E3\u662F\u6240\u6709 JDBC \u9A71\u52A8\u7A0B\u5E8F\u9700\u8981\u5B9E\u73B0\u7684\u63A5\u53E3\u3002\u8FD9\u4E2A\u63A5\u53E3\u662F\u63D0\u4F9B\u7ED9\u6570\u636E\u5E93\u5382\u5546\u4F7F\u7528\u7684\uFF0C\u4E0D\u540C\u6570\u636E\u5E93\u5382\u5546\u63D0\u4F9B\u4E0D\u540C\u7684\u5B9E\u73B0\u3002

                                                                      • \u5728\u7A0B\u5E8F\u4E2D\u4E0D\u9700\u8981\u76F4\u63A5\u53BB\u8BBF\u95EE\u5B9E\u73B0\u4E86 Driver \u63A5\u53E3\u7684\u7C7B\uFF0C\u800C\u662F\u7531\u9A71\u52A8\u7A0B\u5E8F\u7BA1\u7406\u5668\u7C7B(java.sql.DriverManager)\u53BB\u8C03\u7528\u8FD9\u4E9BDriver\u5B9E\u73B0\u3002

                                                                        • Oracle\u7684\u9A71\u52A8\uFF1Aoracle.jdbc.driver.OracleDriver
                                                                        • mySql\u7684\u9A71\u52A8\uFF1A com.mysql.jdbc.Driver

                                                                      1555576157618

                                                                      1555576170074

                                                                      • \u5C06\u4E0A\u8FF0jar\u5305\u62F7\u8D1D\u5230Java\u5DE5\u7A0B\u7684\u4E00\u4E2A\u76EE\u5F55\u4E2D\uFF0C\u4E60\u60EF\u4E0A\u65B0\u5EFA\u4E00\u4E2Alib\u6587\u4EF6\u5939\u3002

                                                                      1566134718955

                                                                      \u5728\u9A71\u52A8jar\u4E0A\u53F3\u952E-->Build Path-->Add to Build Path

                                                                      1566134781682

                                                                      \u6CE8\u610F\uFF1A\u5982\u679C\u662FDynamic Web Project\uFF08\u52A8\u6001\u7684web\u9879\u76EE\uFF09\u8BDD\uFF0C\u5219\u662F\u628A\u9A71\u52A8jar\u653E\u5230WebContent\uFF08\u6709\u7684\u5F00\u53D1\u5DE5\u5177\u53EBWebRoot\uFF09\u76EE\u5F55\u4E2D\u7684WEB-INF\u76EE\u5F55\u4E2D\u7684lib\u76EE\u5F55\u4E0B\u5373\u53EF

                                                                      1566135290460

                                                                      2.1.2 \u52A0\u8F7D\u4E0E\u6CE8\u518CJDBC\u9A71\u52A8

                                                                      • \u52A0\u8F7D\u9A71\u52A8\uFF1A\u52A0\u8F7D JDBC \u9A71\u52A8\u9700\u8C03\u7528 Class \u7C7B\u7684\u9759\u6001\u65B9\u6CD5 forName()\uFF0C\u5411\u5176\u4F20\u9012\u8981\u52A0\u8F7D\u7684 JDBC \u9A71\u52A8\u7684\u7C7B\u540D

                                                                        • Class.forName(\u201Ccom.mysql.jdbc.Driver\u201D);
                                                                      • \u6CE8\u518C\u9A71\u52A8\uFF1ADriverManager \u7C7B\u662F\u9A71\u52A8\u7A0B\u5E8F\u7BA1\u7406\u5668\u7C7B\uFF0C\u8D1F\u8D23\u7BA1\u7406\u9A71\u52A8\u7A0B\u5E8F

                                                                        • \u4F7F\u7528DriverManager.registerDriver(com.mysql.jdbc.Driver)\u6765\u6CE8\u518C\u9A71\u52A8

                                                                        • \u901A\u5E38\u4E0D\u7528\u663E\u5F0F\u8C03\u7528 DriverManager \u7C7B\u7684 registerDriver() \u65B9\u6CD5\u6765\u6CE8\u518C\u9A71\u52A8\u7A0B\u5E8F\u7C7B\u7684\u5B9E\u4F8B\uFF0C\u56E0\u4E3A Driver \u63A5\u53E3\u7684\u9A71\u52A8\u7A0B\u5E8F\u7C7B\u90FD\u5305\u542B\u4E86\u9759\u6001\u4EE3\u7801\u5757\uFF0C\u5728\u8FD9\u4E2A\u9759\u6001\u4EE3\u7801\u5757\u4E2D\uFF0C\u4F1A\u8C03\u7528 DriverManager.registerDriver() \u65B9\u6CD5\u6765\u6CE8\u518C\u81EA\u8EAB\u7684\u4E00\u4E2A\u5B9E\u4F8B\u3002\u4E0B\u56FE\u662FMySQL\u7684Driver\u5B9E\u73B0\u7C7B\u7684\u6E90\u7801\uFF1A

                                                                          1566136831283

                                                                      2.2 \u8981\u7D20\u4E8C\uFF1AURL

                                                                      • JDBC URL \u7528\u4E8E\u6807\u8BC6\u4E00\u4E2A\u88AB\u6CE8\u518C\u7684\u9A71\u52A8\u7A0B\u5E8F\uFF0C\u9A71\u52A8\u7A0B\u5E8F\u7BA1\u7406\u5668\u901A\u8FC7\u8FD9\u4E2A URL \u9009\u62E9\u6B63\u786E\u7684\u9A71\u52A8\u7A0B\u5E8F\uFF0C\u4ECE\u800C\u5EFA\u7ACB\u5230\u6570\u636E\u5E93\u7684\u8FDE\u63A5\u3002

                                                                      • JDBC URL\u7684\u6807\u51C6\u7531\u4E09\u90E8\u5206\u7EC4\u6210\uFF0C\u5404\u90E8\u5206\u95F4\u7528\u5192\u53F7\u5206\u9694\u3002

                                                                        • jdbc:\u5B50\u534F\u8BAE:\u5B50\u540D\u79F0
                                                                        • \u534F\u8BAE\uFF1AJDBC URL\u4E2D\u7684\u534F\u8BAE\u603B\u662Fjdbc
                                                                        • \u5B50\u534F\u8BAE\uFF1A\u5B50\u534F\u8BAE\u7528\u4E8E\u6807\u8BC6\u4E00\u4E2A\u6570\u636E\u5E93\u9A71\u52A8\u7A0B\u5E8F
                                                                        • \u5B50\u540D\u79F0\uFF1A\u4E00\u79CD\u6807\u8BC6\u6570\u636E\u5E93\u7684\u65B9\u6CD5\u3002\u5B50\u540D\u79F0\u53EF\u4EE5\u4F9D\u4E0D\u540C\u7684\u5B50\u534F\u8BAE\u800C\u53D8\u5316\uFF0C\u7528\u5B50\u540D\u79F0\u7684\u76EE\u7684\u662F\u4E3A\u4E86\u5B9A\u4F4D\u6570\u636E\u5E93\u63D0\u4F9B\u8DB3\u591F\u7684\u4FE1\u606F\u3002\u5305\u542B\u4E3B\u673A\u540D(\u5BF9\u5E94\u670D\u52A1\u7AEF\u7684ip\u5730\u5740)\uFF0C\u7AEF\u53E3\u53F7\uFF0C\u6570\u636E\u5E93\u540D
                                                                      • \u4E3E\u4F8B\uFF1A

                                                                        1555576477107

                                                                      • \u51E0\u79CD\u5E38\u7528\u6570\u636E\u5E93\u7684 JDBC URL

                                                                        • MySQL\u7684\u8FDE\u63A5URL\u7F16\u5199\u65B9\u5F0F\uFF1A

                                                                          • jdbc:mysql://\u4E3B\u673A\u540D\u79F0:mysql\u670D\u52A1\u7AEF\u53E3\u53F7/\u6570\u636E\u5E93\u540D\u79F0?\u53C2\u6570=\u503C&\u53C2\u6570=\u503C
                                                                          • jdbc:mysql://localhost:3306/atguigu
                                                                          • jdbc:mysql://localhost:3306/atguigu**?useUnicode=true&characterEncoding=utf8**\uFF08\u5982\u679CJDBC\u7A0B\u5E8F\u4E0E\u670D\u52A1\u5668\u7AEF\u7684\u5B57\u7B26\u96C6\u4E0D\u4E00\u81F4\uFF0C\u4F1A\u5BFC\u81F4\u4E71\u7801\uFF0C\u90A3\u4E48\u53EF\u4EE5\u901A\u8FC7\u53C2\u6570\u6307\u5B9A\u670D\u52A1\u5668\u7AEF\u7684\u5B57\u7B26\u96C6\uFF09
                                                                          • jdbc:mysql://localhost:3306/atguigu?user=root&password=123456
                                                                        • Oracle 9i\u7684\u8FDE\u63A5URL\u7F16\u5199\u65B9\u5F0F\uFF1A

                                                                          • jdbc:oracle:thin:@\u4E3B\u673A\u540D\u79F0:oracle\u670D\u52A1\u7AEF\u53E3\u53F7:\u6570\u636E\u5E93\u540D\u79F0
                                                                          • jdbc:oracle:thin:@localhost:1521:atguigu
                                                                        • SQLServer\u7684\u8FDE\u63A5URL\u7F16\u5199\u65B9\u5F0F\uFF1A

                                                                          • jdbc:sqlserver://\u4E3B\u673A\u540D\u79F0:sqlserver\u670D\u52A1\u7AEF\u53E3\u53F7:DatabaseName=\u6570\u636E\u5E93\u540D\u79F0

                                                                          • jdbc:sqlserver://localhost:1433:DatabaseName=atguigu

                                                                      2.3 \u8981\u7D20\u4E09\uFF1A\u7528\u6237\u540D\u548C\u5BC6\u7801

                                                                      • user,password\u53EF\u4EE5\u7528\u201C\u5C5E\u6027\u540D=\u5C5E\u6027\u503C\u201D\u65B9\u5F0F\u544A\u8BC9\u6570\u636E\u5E93
                                                                      • \u53EF\u4EE5\u8C03\u7528 DriverManager \u7C7B\u7684 getConnection() \u65B9\u6CD5\u5EFA\u7ACB\u5230\u6570\u636E\u5E93\u7684\u8FDE\u63A5

                                                                      2.4 \u6570\u636E\u5E93\u8FDE\u63A5\u65B9\u5F0F\u4E3E\u4F8B

                                                                      2.4.1 \u8FDE\u63A5\u65B9\u5F0F\u4E00

                                                                      	@Test
                                                                           public void testConnection1() {
                                                                               try {
                                                                                   //1.\u63D0\u4F9Bjava.sql.Driver\u63A5\u53E3\u5B9E\u73B0\u7C7B\u7684\u5BF9\u8C61
                                                                      diff --git "a/assets/\345\260\232\347\241\205\350\260\267_\345\256\213\347\272\242\345\272\267_JDBC.html.c5b856de.js" "b/assets/\345\260\232\347\241\205\350\260\267_\345\256\213\347\272\242\345\272\267_JDBC.html.840018b6.js"
                                                                      similarity index 99%
                                                                      rename from "assets/\345\260\232\347\241\205\350\260\267_\345\256\213\347\272\242\345\272\267_JDBC.html.c5b856de.js"
                                                                      rename to "assets/\345\260\232\347\241\205\350\260\267_\345\256\213\347\272\242\345\272\267_JDBC.html.840018b6.js"
                                                                      index 47ca72c4..7225ff16 100644
                                                                      --- "a/assets/\345\260\232\347\241\205\350\260\267_\345\256\213\347\272\242\345\272\267_JDBC.html.c5b856de.js"
                                                                      +++ "b/assets/\345\260\232\347\241\205\350\260\267_\345\256\213\347\272\242\345\272\267_JDBC.html.840018b6.js"
                                                                      @@ -1 +1 @@
                                                                      -const e={key:"v-4c0a9128",path:"/java/%E6%95%B0%E6%8D%AE%E5%BA%93/jdbc/%E5%B0%9A%E7%A1%85%E8%B0%B7_%E5%AE%8B%E7%BA%A2%E5%BA%B7_JDBC.html",title:"JDBC\u6838\u5FC3\u6280\u672F",lang:"zh-CN",frontmatter:{},excerpt:"",headers:[{level:2,title:"\u7B2C1\u7AE0\uFF1AJDBC\u6982\u8FF0",slug:"\u7B2C1\u7AE0-jdbc\u6982\u8FF0",children:[{level:3,title:"1.1 \u6570\u636E\u7684\u6301\u4E45\u5316",slug:"_1-1-\u6570\u636E\u7684\u6301\u4E45\u5316",children:[]},{level:3,title:"1.2 Java\u4E2D\u7684\u6570\u636E\u5B58\u50A8\u6280\u672F",slug:"_1-2-java\u4E2D\u7684\u6570\u636E\u5B58\u50A8\u6280\u672F",children:[]},{level:3,title:"1.3 JDBC\u4ECB\u7ECD",slug:"_1-3-jdbc\u4ECB\u7ECD",children:[]},{level:3,title:"1.4 JDBC\u4F53\u7CFB\u7ED3\u6784",slug:"_1-4-jdbc\u4F53\u7CFB\u7ED3\u6784",children:[]},{level:3,title:"1.5 JDBC\u7A0B\u5E8F\u7F16\u5199\u6B65\u9AA4",slug:"_1-5-jdbc\u7A0B\u5E8F\u7F16\u5199\u6B65\u9AA4",children:[]}]},{level:2,title:"\u7B2C2\u7AE0\uFF1A\u83B7\u53D6\u6570\u636E\u5E93\u8FDE\u63A5",slug:"\u7B2C2\u7AE0-\u83B7\u53D6\u6570\u636E\u5E93\u8FDE\u63A5",children:[{level:3,title:"2.1 \u8981\u7D20\u4E00\uFF1ADriver\u63A5\u53E3\u5B9E\u73B0\u7C7B",slug:"_2-1-\u8981\u7D20\u4E00-driver\u63A5\u53E3\u5B9E\u73B0\u7C7B",children:[{level:4,title:"2.1.1 Driver\u63A5\u53E3\u4ECB\u7ECD",slug:"_2-1-1-driver\u63A5\u53E3\u4ECB\u7ECD",children:[]},{level:4,title:"2.1.2 \u52A0\u8F7D\u4E0E\u6CE8\u518CJDBC\u9A71\u52A8",slug:"_2-1-2-\u52A0\u8F7D\u4E0E\u6CE8\u518Cjdbc\u9A71\u52A8",children:[]}]},{level:3,title:"2.2 \u8981\u7D20\u4E8C\uFF1AURL",slug:"_2-2-\u8981\u7D20\u4E8C-url",children:[]},{level:3,title:"2.3 \u8981\u7D20\u4E09\uFF1A\u7528\u6237\u540D\u548C\u5BC6\u7801",slug:"_2-3-\u8981\u7D20\u4E09-\u7528\u6237\u540D\u548C\u5BC6\u7801",children:[]},{level:3,title:"2.4 \u6570\u636E\u5E93\u8FDE\u63A5\u65B9\u5F0F\u4E3E\u4F8B",slug:"_2-4-\u6570\u636E\u5E93\u8FDE\u63A5\u65B9\u5F0F\u4E3E\u4F8B",children:[{level:4,title:"2.4.1 \u8FDE\u63A5\u65B9\u5F0F\u4E00",slug:"_2-4-1-\u8FDE\u63A5\u65B9\u5F0F\u4E00",children:[]},{level:4,title:"2.4.2 \u8FDE\u63A5\u65B9\u5F0F\u4E8C",slug:"_2-4-2-\u8FDE\u63A5\u65B9\u5F0F\u4E8C",children:[]},{level:4,title:"2.4.3 \u8FDE\u63A5\u65B9\u5F0F\u4E09",slug:"_2-4-3-\u8FDE\u63A5\u65B9\u5F0F\u4E09",children:[]},{level:4,title:"2.4.4 \u8FDE\u63A5\u65B9\u5F0F\u56DB",slug:"_2-4-4-\u8FDE\u63A5\u65B9\u5F0F\u56DB",children:[]},{level:4,title:"2.4.5 \u8FDE\u63A5\u65B9\u5F0F\u4E94(\u6700\u7EC8\u7248)",slug:"_2-4-5-\u8FDE\u63A5\u65B9\u5F0F\u4E94-\u6700\u7EC8\u7248",children:[]}]}]},{level:2,title:"\u7B2C3\u7AE0\uFF1A\u4F7F\u7528PreparedStatement\u5B9E\u73B0CRUD\u64CD\u4F5C",slug:"\u7B2C3\u7AE0-\u4F7F\u7528preparedstatement\u5B9E\u73B0crud\u64CD\u4F5C",children:[{level:3,title:"3.1 \u64CD\u4F5C\u548C\u8BBF\u95EE\u6570\u636E\u5E93",slug:"_3-1-\u64CD\u4F5C\u548C\u8BBF\u95EE\u6570\u636E\u5E93",children:[]},{level:3,title:"3.2 \u4F7F\u7528Statement\u64CD\u4F5C\u6570\u636E\u8868\u7684\u5F0A\u7AEF",slug:"_3-2-\u4F7F\u7528statement\u64CD\u4F5C\u6570\u636E\u8868\u7684\u5F0A\u7AEF",children:[]},{level:3,title:"3.3 PreparedStatement\u7684\u4F7F\u7528",slug:"_3-3-preparedstatement\u7684\u4F7F\u7528",children:[{level:4,title:"3.3.1 PreparedStatement\u4ECB\u7ECD",slug:"_3-3-1-preparedstatement\u4ECB\u7ECD",children:[]},{level:4,title:"3.3.2 PreparedStatement vs Statement",slug:"_3-3-2-preparedstatement-vs-statement",children:[]},{level:4,title:"3.3.3 Java\u4E0ESQL\u5BF9\u5E94\u6570\u636E\u7C7B\u578B\u8F6C\u6362\u8868",slug:"_3-3-3-java\u4E0Esql\u5BF9\u5E94\u6570\u636E\u7C7B\u578B\u8F6C\u6362\u8868",children:[]},{level:4,title:"3.3.4 \u4F7F\u7528PreparedStatement\u5B9E\u73B0\u589E\u3001\u5220\u3001\u6539\u64CD\u4F5C",slug:"_3-3-4-\u4F7F\u7528preparedstatement\u5B9E\u73B0\u589E\u3001\u5220\u3001\u6539\u64CD\u4F5C",children:[]},{level:4,title:"3.3.5 \u4F7F\u7528PreparedStatement\u5B9E\u73B0\u67E5\u8BE2\u64CD\u4F5C",slug:"_3-3-5-\u4F7F\u7528preparedstatement\u5B9E\u73B0\u67E5\u8BE2\u64CD\u4F5C",children:[]}]},{level:3,title:"3.4 ResultSet\u4E0EResultSetMetaData",slug:"_3-4-resultset\u4E0Eresultsetmetadata",children:[{level:4,title:"3.4.1 ResultSet",slug:"_3-4-1-resultset",children:[]},{level:4,title:"3.4.2 ResultSetMetaData",slug:"_3-4-2-resultsetmetadata",children:[]}]},{level:3,title:"3.5 \u8D44\u6E90\u7684\u91CA\u653E",slug:"_3-5-\u8D44\u6E90\u7684\u91CA\u653E",children:[]},{level:3,title:"3.6 JDBC API\u5C0F\u7ED3",slug:"_3-6-jdbc-api\u5C0F\u7ED3",children:[]}]},{level:2,title:"\u7AE0\u8282\u7EC3\u4E60",slug:"\u7AE0\u8282\u7EC3\u4E60",children:[]},{level:2,title:"\u7B2C4\u7AE0 \u64CD\u4F5CBLOB\u7C7B\u578B\u5B57\u6BB5",slug:"\u7B2C4\u7AE0-\u64CD\u4F5Cblob\u7C7B\u578B\u5B57\u6BB5",children:[{level:3,title:"4.1 MySQL BLOB\u7C7B\u578B",slug:"_4-1-mysql-blob\u7C7B\u578B",children:[]},{level:3,title:"4.2 \u5411\u6570\u636E\u8868\u4E2D\u63D2\u5165\u5927\u6570\u636E\u7C7B\u578B",slug:"_4-2-\u5411\u6570\u636E\u8868\u4E2D\u63D2\u5165\u5927\u6570\u636E\u7C7B\u578B",children:[]},{level:3,title:"4.3 \u4FEE\u6539\u6570\u636E\u8868\u4E2D\u7684Blob\u7C7B\u578B\u5B57\u6BB5",slug:"_4-3-\u4FEE\u6539\u6570\u636E\u8868\u4E2D\u7684blob\u7C7B\u578B\u5B57\u6BB5",children:[]},{level:3,title:"4.4 \u4ECE\u6570\u636E\u8868\u4E2D\u8BFB\u53D6\u5927\u6570\u636E\u7C7B\u578B",slug:"_4-4-\u4ECE\u6570\u636E\u8868\u4E2D\u8BFB\u53D6\u5927\u6570\u636E\u7C7B\u578B",children:[]}]},{level:2,title:"\u7B2C5\u7AE0 \u6279\u91CF\u63D2\u5165",slug:"\u7B2C5\u7AE0-\u6279\u91CF\u63D2\u5165",children:[{level:3,title:"5.1 \u6279\u91CF\u6267\u884CSQL\u8BED\u53E5",slug:"_5-1-\u6279\u91CF\u6267\u884Csql\u8BED\u53E5",children:[]},{level:3,title:"5.2 \u9AD8\u6548\u7684\u6279\u91CF\u63D2\u5165",slug:"_5-2-\u9AD8\u6548\u7684\u6279\u91CF\u63D2\u5165",children:[{level:4,title:"5.2.1 \u5B9E\u73B0\u5C42\u6B21\u4E00\uFF1A\u4F7F\u7528Statement",slug:"_5-2-1-\u5B9E\u73B0\u5C42\u6B21\u4E00-\u4F7F\u7528statement",children:[]},{level:4,title:"5.2.2 \u5B9E\u73B0\u5C42\u6B21\u4E8C\uFF1A\u4F7F\u7528PreparedStatement",slug:"_5-2-2-\u5B9E\u73B0\u5C42\u6B21\u4E8C-\u4F7F\u7528preparedstatement",children:[]},{level:4,title:"5.2.3 \u5B9E\u73B0\u5C42\u6B21\u4E09",slug:"_5-2-3-\u5B9E\u73B0\u5C42\u6B21\u4E09",children:[]},{level:4,title:"5.2.4 \u5B9E\u73B0\u5C42\u6B21\u56DB",slug:"_5-2-4-\u5B9E\u73B0\u5C42\u6B21\u56DB",children:[]}]}]},{level:2,title:"\u7B2C6\u7AE0\uFF1A \u6570\u636E\u5E93\u4E8B\u52A1",slug:"\u7B2C6\u7AE0-\u6570\u636E\u5E93\u4E8B\u52A1",children:[{level:3,title:"6.1 \u6570\u636E\u5E93\u4E8B\u52A1\u4ECB\u7ECD",slug:"_6-1-\u6570\u636E\u5E93\u4E8B\u52A1\u4ECB\u7ECD",children:[]},{level:3,title:"6.2 JDBC\u4E8B\u52A1\u5904\u7406",slug:"_6-2-jdbc\u4E8B\u52A1\u5904\u7406",children:[]},{level:3,title:"6.3 \u4E8B\u52A1\u7684ACID\u5C5E\u6027",slug:"_6-3-\u4E8B\u52A1\u7684acid\u5C5E\u6027",children:[{level:4,title:"6.3.1 \u6570\u636E\u5E93\u7684\u5E76\u53D1\u95EE\u9898",slug:"_6-3-1-\u6570\u636E\u5E93\u7684\u5E76\u53D1\u95EE\u9898",children:[]},{level:4,title:"6.3.2 \u56DB\u79CD\u9694\u79BB\u7EA7\u522B",slug:"_6-3-2-\u56DB\u79CD\u9694\u79BB\u7EA7\u522B",children:[]},{level:4,title:"6.3.3 \u5728MySql\u4E2D\u8BBE\u7F6E\u9694\u79BB\u7EA7\u522B",slug:"_6-3-3-\u5728mysql\u4E2D\u8BBE\u7F6E\u9694\u79BB\u7EA7\u522B",children:[]}]}]},{level:2,title:"\u7B2C7\u7AE0\uFF1ADAO\u53CA\u76F8\u5173\u5B9E\u73B0\u7C7B",slug:"\u7B2C7\u7AE0-dao\u53CA\u76F8\u5173\u5B9E\u73B0\u7C7B",children:[{level:3,title:"\u3010BaseDAO.java\u3011",slug:"\u3010basedao-java\u3011",children:[]},{level:3,title:"\u3010BookDAO.java\u3011",slug:"\u3010bookdao-java\u3011",children:[]},{level:3,title:"\u3010UserDAO.java\u3011",slug:"\u3010userdao-java\u3011",children:[]},{level:3,title:"\u3010BookDaoImpl.java\u3011",slug:"\u3010bookdaoimpl-java\u3011",children:[]},{level:3,title:"\u3010UserDaoImpl.java\u3011",slug:"\u3010userdaoimpl-java\u3011",children:[]},{level:3,title:"\u3010Book.java\u3011",slug:"\u3010book-java\u3011",children:[]},{level:3,title:"\u3010Page.java\u3011",slug:"\u3010page-java\u3011",children:[]},{level:3,title:"\u3010User.java\u3011",slug:"\u3010user-java\u3011",children:[]}]},{level:2,title:"\u7B2C8\u7AE0\uFF1A\u6570\u636E\u5E93\u8FDE\u63A5\u6C60",slug:"\u7B2C8\u7AE0-\u6570\u636E\u5E93\u8FDE\u63A5\u6C60",children:[{level:3,title:"8.1 JDBC\u6570\u636E\u5E93\u8FDE\u63A5\u6C60\u7684\u5FC5\u8981\u6027",slug:"_8-1-jdbc\u6570\u636E\u5E93\u8FDE\u63A5\u6C60\u7684\u5FC5\u8981\u6027",children:[]},{level:3,title:"8.2 \u6570\u636E\u5E93\u8FDE\u63A5\u6C60\u6280\u672F",slug:"_8-2-\u6570\u636E\u5E93\u8FDE\u63A5\u6C60\u6280\u672F",children:[]},{level:3,title:"8.3 \u591A\u79CD\u5F00\u6E90\u7684\u6570\u636E\u5E93\u8FDE\u63A5\u6C60",slug:"_8-3-\u591A\u79CD\u5F00\u6E90\u7684\u6570\u636E\u5E93\u8FDE\u63A5\u6C60",children:[{level:4,title:"8.3.1 C3P0\u6570\u636E\u5E93\u8FDE\u63A5\u6C60",slug:"_8-3-1-c3p0\u6570\u636E\u5E93\u8FDE\u63A5\u6C60",children:[]},{level:4,title:"8.3.2 DBCP\u6570\u636E\u5E93\u8FDE\u63A5\u6C60",slug:"_8-3-2-dbcp\u6570\u636E\u5E93\u8FDE\u63A5\u6C60",children:[]},{level:4,title:"8.3.3 Druid\uFF08\u5FB7\u9C81\u4F0A\uFF09\u6570\u636E\u5E93\u8FDE\u63A5\u6C60",slug:"_8-3-3-druid-\u5FB7\u9C81\u4F0A-\u6570\u636E\u5E93\u8FDE\u63A5\u6C60",children:[]}]}]},{level:2,title:"\u7B2C9\u7AE0\uFF1AApache-DBUtils\u5B9E\u73B0CRUD\u64CD\u4F5C",slug:"\u7B2C9\u7AE0-apache-dbutils\u5B9E\u73B0crud\u64CD\u4F5C",children:[{level:3,title:"9.1 Apache-DBUtils\u7B80\u4ECB",slug:"_9-1-apache-dbutils\u7B80\u4ECB",children:[]},{level:3,title:"9.2 \u4E3B\u8981API\u7684\u4F7F\u7528",slug:"_9-2-\u4E3B\u8981api\u7684\u4F7F\u7528",children:[{level:4,title:"9.2.1 DbUtils",slug:"_9-2-1-dbutils",children:[]},{level:4,title:"9.2.2 QueryRunner\u7C7B",slug:"_9-2-2-queryrunner\u7C7B",children:[]},{level:4,title:"9.2.3 ResultSetHandler\u63A5\u53E3\u53CA\u5B9E\u73B0\u7C7B",slug:"_9-2-3-resultsethandler\u63A5\u53E3\u53CA\u5B9E\u73B0\u7C7B",children:[]}]}]},{level:2,title:"JDBC\u603B\u7ED3",slug:"jdbc\u603B\u7ED3",children:[]}],git:{updatedTime:1710173765e3,contributors:[{name:"shailene",email:"64005626+shaileneF@users.noreply.github.com",commits:1}]},filePathRelative:"java/\u6570\u636E\u5E93/jdbc/\u5C1A\u7845\u8C37_\u5B8B\u7EA2\u5EB7_JDBC.md"};export{e as data};
                                                                      +const e={key:"v-4c0a9128",path:"/java/%E6%95%B0%E6%8D%AE%E5%BA%93/jdbc/%E5%B0%9A%E7%A1%85%E8%B0%B7_%E5%AE%8B%E7%BA%A2%E5%BA%B7_JDBC.html",title:"JDBC\u6838\u5FC3\u6280\u672F",lang:"zh-CN",frontmatter:{},excerpt:"",headers:[{level:2,title:"\u7B2C1\u7AE0\uFF1AJDBC\u6982\u8FF0",slug:"\u7B2C1\u7AE0-jdbc\u6982\u8FF0",children:[{level:3,title:"1.1 \u6570\u636E\u7684\u6301\u4E45\u5316",slug:"_1-1-\u6570\u636E\u7684\u6301\u4E45\u5316",children:[]},{level:3,title:"1.2 Java\u4E2D\u7684\u6570\u636E\u5B58\u50A8\u6280\u672F",slug:"_1-2-java\u4E2D\u7684\u6570\u636E\u5B58\u50A8\u6280\u672F",children:[]},{level:3,title:"1.3 JDBC\u4ECB\u7ECD",slug:"_1-3-jdbc\u4ECB\u7ECD",children:[]},{level:3,title:"1.4 JDBC\u4F53\u7CFB\u7ED3\u6784",slug:"_1-4-jdbc\u4F53\u7CFB\u7ED3\u6784",children:[]},{level:3,title:"1.5 JDBC\u7A0B\u5E8F\u7F16\u5199\u6B65\u9AA4",slug:"_1-5-jdbc\u7A0B\u5E8F\u7F16\u5199\u6B65\u9AA4",children:[]}]},{level:2,title:"\u7B2C2\u7AE0\uFF1A\u83B7\u53D6\u6570\u636E\u5E93\u8FDE\u63A5",slug:"\u7B2C2\u7AE0-\u83B7\u53D6\u6570\u636E\u5E93\u8FDE\u63A5",children:[{level:3,title:"2.1 \u8981\u7D20\u4E00\uFF1ADriver\u63A5\u53E3\u5B9E\u73B0\u7C7B",slug:"_2-1-\u8981\u7D20\u4E00-driver\u63A5\u53E3\u5B9E\u73B0\u7C7B",children:[{level:4,title:"2.1.1 Driver\u63A5\u53E3\u4ECB\u7ECD",slug:"_2-1-1-driver\u63A5\u53E3\u4ECB\u7ECD",children:[]},{level:4,title:"2.1.2 \u52A0\u8F7D\u4E0E\u6CE8\u518CJDBC\u9A71\u52A8",slug:"_2-1-2-\u52A0\u8F7D\u4E0E\u6CE8\u518Cjdbc\u9A71\u52A8",children:[]}]},{level:3,title:"2.2 \u8981\u7D20\u4E8C\uFF1AURL",slug:"_2-2-\u8981\u7D20\u4E8C-url",children:[]},{level:3,title:"2.3 \u8981\u7D20\u4E09\uFF1A\u7528\u6237\u540D\u548C\u5BC6\u7801",slug:"_2-3-\u8981\u7D20\u4E09-\u7528\u6237\u540D\u548C\u5BC6\u7801",children:[]},{level:3,title:"2.4 \u6570\u636E\u5E93\u8FDE\u63A5\u65B9\u5F0F\u4E3E\u4F8B",slug:"_2-4-\u6570\u636E\u5E93\u8FDE\u63A5\u65B9\u5F0F\u4E3E\u4F8B",children:[{level:4,title:"2.4.1 \u8FDE\u63A5\u65B9\u5F0F\u4E00",slug:"_2-4-1-\u8FDE\u63A5\u65B9\u5F0F\u4E00",children:[]},{level:4,title:"2.4.2 \u8FDE\u63A5\u65B9\u5F0F\u4E8C",slug:"_2-4-2-\u8FDE\u63A5\u65B9\u5F0F\u4E8C",children:[]},{level:4,title:"2.4.3 \u8FDE\u63A5\u65B9\u5F0F\u4E09",slug:"_2-4-3-\u8FDE\u63A5\u65B9\u5F0F\u4E09",children:[]},{level:4,title:"2.4.4 \u8FDE\u63A5\u65B9\u5F0F\u56DB",slug:"_2-4-4-\u8FDE\u63A5\u65B9\u5F0F\u56DB",children:[]},{level:4,title:"2.4.5 \u8FDE\u63A5\u65B9\u5F0F\u4E94(\u6700\u7EC8\u7248)",slug:"_2-4-5-\u8FDE\u63A5\u65B9\u5F0F\u4E94-\u6700\u7EC8\u7248",children:[]}]}]},{level:2,title:"\u7B2C3\u7AE0\uFF1A\u4F7F\u7528PreparedStatement\u5B9E\u73B0CRUD\u64CD\u4F5C",slug:"\u7B2C3\u7AE0-\u4F7F\u7528preparedstatement\u5B9E\u73B0crud\u64CD\u4F5C",children:[{level:3,title:"3.1 \u64CD\u4F5C\u548C\u8BBF\u95EE\u6570\u636E\u5E93",slug:"_3-1-\u64CD\u4F5C\u548C\u8BBF\u95EE\u6570\u636E\u5E93",children:[]},{level:3,title:"3.2 \u4F7F\u7528Statement\u64CD\u4F5C\u6570\u636E\u8868\u7684\u5F0A\u7AEF",slug:"_3-2-\u4F7F\u7528statement\u64CD\u4F5C\u6570\u636E\u8868\u7684\u5F0A\u7AEF",children:[]},{level:3,title:"3.3 PreparedStatement\u7684\u4F7F\u7528",slug:"_3-3-preparedstatement\u7684\u4F7F\u7528",children:[{level:4,title:"3.3.1 PreparedStatement\u4ECB\u7ECD",slug:"_3-3-1-preparedstatement\u4ECB\u7ECD",children:[]},{level:4,title:"3.3.2 PreparedStatement vs Statement",slug:"_3-3-2-preparedstatement-vs-statement",children:[]},{level:4,title:"3.3.3 Java\u4E0ESQL\u5BF9\u5E94\u6570\u636E\u7C7B\u578B\u8F6C\u6362\u8868",slug:"_3-3-3-java\u4E0Esql\u5BF9\u5E94\u6570\u636E\u7C7B\u578B\u8F6C\u6362\u8868",children:[]},{level:4,title:"3.3.4 \u4F7F\u7528PreparedStatement\u5B9E\u73B0\u589E\u3001\u5220\u3001\u6539\u64CD\u4F5C",slug:"_3-3-4-\u4F7F\u7528preparedstatement\u5B9E\u73B0\u589E\u3001\u5220\u3001\u6539\u64CD\u4F5C",children:[]},{level:4,title:"3.3.5 \u4F7F\u7528PreparedStatement\u5B9E\u73B0\u67E5\u8BE2\u64CD\u4F5C",slug:"_3-3-5-\u4F7F\u7528preparedstatement\u5B9E\u73B0\u67E5\u8BE2\u64CD\u4F5C",children:[]}]},{level:3,title:"3.4 ResultSet\u4E0EResultSetMetaData",slug:"_3-4-resultset\u4E0Eresultsetmetadata",children:[{level:4,title:"3.4.1 ResultSet",slug:"_3-4-1-resultset",children:[]},{level:4,title:"3.4.2 ResultSetMetaData",slug:"_3-4-2-resultsetmetadata",children:[]}]},{level:3,title:"3.5 \u8D44\u6E90\u7684\u91CA\u653E",slug:"_3-5-\u8D44\u6E90\u7684\u91CA\u653E",children:[]},{level:3,title:"3.6 JDBC API\u5C0F\u7ED3",slug:"_3-6-jdbc-api\u5C0F\u7ED3",children:[]}]},{level:2,title:"\u7AE0\u8282\u7EC3\u4E60",slug:"\u7AE0\u8282\u7EC3\u4E60",children:[]},{level:2,title:"\u7B2C4\u7AE0 \u64CD\u4F5CBLOB\u7C7B\u578B\u5B57\u6BB5",slug:"\u7B2C4\u7AE0-\u64CD\u4F5Cblob\u7C7B\u578B\u5B57\u6BB5",children:[{level:3,title:"4.1 MySQL BLOB\u7C7B\u578B",slug:"_4-1-mysql-blob\u7C7B\u578B",children:[]},{level:3,title:"4.2 \u5411\u6570\u636E\u8868\u4E2D\u63D2\u5165\u5927\u6570\u636E\u7C7B\u578B",slug:"_4-2-\u5411\u6570\u636E\u8868\u4E2D\u63D2\u5165\u5927\u6570\u636E\u7C7B\u578B",children:[]},{level:3,title:"4.3 \u4FEE\u6539\u6570\u636E\u8868\u4E2D\u7684Blob\u7C7B\u578B\u5B57\u6BB5",slug:"_4-3-\u4FEE\u6539\u6570\u636E\u8868\u4E2D\u7684blob\u7C7B\u578B\u5B57\u6BB5",children:[]},{level:3,title:"4.4 \u4ECE\u6570\u636E\u8868\u4E2D\u8BFB\u53D6\u5927\u6570\u636E\u7C7B\u578B",slug:"_4-4-\u4ECE\u6570\u636E\u8868\u4E2D\u8BFB\u53D6\u5927\u6570\u636E\u7C7B\u578B",children:[]}]},{level:2,title:"\u7B2C5\u7AE0 \u6279\u91CF\u63D2\u5165",slug:"\u7B2C5\u7AE0-\u6279\u91CF\u63D2\u5165",children:[{level:3,title:"5.1 \u6279\u91CF\u6267\u884CSQL\u8BED\u53E5",slug:"_5-1-\u6279\u91CF\u6267\u884Csql\u8BED\u53E5",children:[]},{level:3,title:"5.2 \u9AD8\u6548\u7684\u6279\u91CF\u63D2\u5165",slug:"_5-2-\u9AD8\u6548\u7684\u6279\u91CF\u63D2\u5165",children:[{level:4,title:"5.2.1 \u5B9E\u73B0\u5C42\u6B21\u4E00\uFF1A\u4F7F\u7528Statement",slug:"_5-2-1-\u5B9E\u73B0\u5C42\u6B21\u4E00-\u4F7F\u7528statement",children:[]},{level:4,title:"5.2.2 \u5B9E\u73B0\u5C42\u6B21\u4E8C\uFF1A\u4F7F\u7528PreparedStatement",slug:"_5-2-2-\u5B9E\u73B0\u5C42\u6B21\u4E8C-\u4F7F\u7528preparedstatement",children:[]},{level:4,title:"5.2.3 \u5B9E\u73B0\u5C42\u6B21\u4E09",slug:"_5-2-3-\u5B9E\u73B0\u5C42\u6B21\u4E09",children:[]},{level:4,title:"5.2.4 \u5B9E\u73B0\u5C42\u6B21\u56DB",slug:"_5-2-4-\u5B9E\u73B0\u5C42\u6B21\u56DB",children:[]}]}]},{level:2,title:"\u7B2C6\u7AE0\uFF1A \u6570\u636E\u5E93\u4E8B\u52A1",slug:"\u7B2C6\u7AE0-\u6570\u636E\u5E93\u4E8B\u52A1",children:[{level:3,title:"6.1 \u6570\u636E\u5E93\u4E8B\u52A1\u4ECB\u7ECD",slug:"_6-1-\u6570\u636E\u5E93\u4E8B\u52A1\u4ECB\u7ECD",children:[]},{level:3,title:"6.2 JDBC\u4E8B\u52A1\u5904\u7406",slug:"_6-2-jdbc\u4E8B\u52A1\u5904\u7406",children:[]},{level:3,title:"6.3 \u4E8B\u52A1\u7684ACID\u5C5E\u6027",slug:"_6-3-\u4E8B\u52A1\u7684acid\u5C5E\u6027",children:[{level:4,title:"6.3.1 \u6570\u636E\u5E93\u7684\u5E76\u53D1\u95EE\u9898",slug:"_6-3-1-\u6570\u636E\u5E93\u7684\u5E76\u53D1\u95EE\u9898",children:[]},{level:4,title:"6.3.2 \u56DB\u79CD\u9694\u79BB\u7EA7\u522B",slug:"_6-3-2-\u56DB\u79CD\u9694\u79BB\u7EA7\u522B",children:[]},{level:4,title:"6.3.3 \u5728MySql\u4E2D\u8BBE\u7F6E\u9694\u79BB\u7EA7\u522B",slug:"_6-3-3-\u5728mysql\u4E2D\u8BBE\u7F6E\u9694\u79BB\u7EA7\u522B",children:[]}]}]},{level:2,title:"\u7B2C7\u7AE0\uFF1ADAO\u53CA\u76F8\u5173\u5B9E\u73B0\u7C7B",slug:"\u7B2C7\u7AE0-dao\u53CA\u76F8\u5173\u5B9E\u73B0\u7C7B",children:[{level:3,title:"\u3010BaseDAO.java\u3011",slug:"\u3010basedao-java\u3011",children:[]},{level:3,title:"\u3010BookDAO.java\u3011",slug:"\u3010bookdao-java\u3011",children:[]},{level:3,title:"\u3010UserDAO.java\u3011",slug:"\u3010userdao-java\u3011",children:[]},{level:3,title:"\u3010BookDaoImpl.java\u3011",slug:"\u3010bookdaoimpl-java\u3011",children:[]},{level:3,title:"\u3010UserDaoImpl.java\u3011",slug:"\u3010userdaoimpl-java\u3011",children:[]},{level:3,title:"\u3010Book.java\u3011",slug:"\u3010book-java\u3011",children:[]},{level:3,title:"\u3010Page.java\u3011",slug:"\u3010page-java\u3011",children:[]},{level:3,title:"\u3010User.java\u3011",slug:"\u3010user-java\u3011",children:[]}]},{level:2,title:"\u7B2C8\u7AE0\uFF1A\u6570\u636E\u5E93\u8FDE\u63A5\u6C60",slug:"\u7B2C8\u7AE0-\u6570\u636E\u5E93\u8FDE\u63A5\u6C60",children:[{level:3,title:"8.1 JDBC\u6570\u636E\u5E93\u8FDE\u63A5\u6C60\u7684\u5FC5\u8981\u6027",slug:"_8-1-jdbc\u6570\u636E\u5E93\u8FDE\u63A5\u6C60\u7684\u5FC5\u8981\u6027",children:[]},{level:3,title:"8.2 \u6570\u636E\u5E93\u8FDE\u63A5\u6C60\u6280\u672F",slug:"_8-2-\u6570\u636E\u5E93\u8FDE\u63A5\u6C60\u6280\u672F",children:[]},{level:3,title:"8.3 \u591A\u79CD\u5F00\u6E90\u7684\u6570\u636E\u5E93\u8FDE\u63A5\u6C60",slug:"_8-3-\u591A\u79CD\u5F00\u6E90\u7684\u6570\u636E\u5E93\u8FDE\u63A5\u6C60",children:[{level:4,title:"8.3.1 C3P0\u6570\u636E\u5E93\u8FDE\u63A5\u6C60",slug:"_8-3-1-c3p0\u6570\u636E\u5E93\u8FDE\u63A5\u6C60",children:[]},{level:4,title:"8.3.2 DBCP\u6570\u636E\u5E93\u8FDE\u63A5\u6C60",slug:"_8-3-2-dbcp\u6570\u636E\u5E93\u8FDE\u63A5\u6C60",children:[]},{level:4,title:"8.3.3 Druid\uFF08\u5FB7\u9C81\u4F0A\uFF09\u6570\u636E\u5E93\u8FDE\u63A5\u6C60",slug:"_8-3-3-druid-\u5FB7\u9C81\u4F0A-\u6570\u636E\u5E93\u8FDE\u63A5\u6C60",children:[]}]}]},{level:2,title:"\u7B2C9\u7AE0\uFF1AApache-DBUtils\u5B9E\u73B0CRUD\u64CD\u4F5C",slug:"\u7B2C9\u7AE0-apache-dbutils\u5B9E\u73B0crud\u64CD\u4F5C",children:[{level:3,title:"9.1 Apache-DBUtils\u7B80\u4ECB",slug:"_9-1-apache-dbutils\u7B80\u4ECB",children:[]},{level:3,title:"9.2 \u4E3B\u8981API\u7684\u4F7F\u7528",slug:"_9-2-\u4E3B\u8981api\u7684\u4F7F\u7528",children:[{level:4,title:"9.2.1 DbUtils",slug:"_9-2-1-dbutils",children:[]},{level:4,title:"9.2.2 QueryRunner\u7C7B",slug:"_9-2-2-queryrunner\u7C7B",children:[]},{level:4,title:"9.2.3 ResultSetHandler\u63A5\u53E3\u53CA\u5B9E\u73B0\u7C7B",slug:"_9-2-3-resultsethandler\u63A5\u53E3\u53CA\u5B9E\u73B0\u7C7B",children:[]}]}]},{level:2,title:"JDBC\u603B\u7ED3",slug:"jdbc\u603B\u7ED3",children:[]}],git:{updatedTime:1710173784e3,contributors:[{name:"shailene",email:"64005626+shaileneF@users.noreply.github.com",commits:1}]},filePathRelative:"java/\u6570\u636E\u5E93/jdbc/\u5C1A\u7845\u8C37_\u5B8B\u7EA2\u5EB7_JDBC.md"};export{e as data};
                                                                      diff --git "a/assets/\345\271\266\345\217\221\347\274\226\347\250\213.html.a9177a47.js" "b/assets/\345\271\266\345\217\221\347\274\226\347\250\213.html.3e7c354c.js"
                                                                      similarity index 99%
                                                                      rename from "assets/\345\271\266\345\217\221\347\274\226\347\250\213.html.a9177a47.js"
                                                                      rename to "assets/\345\271\266\345\217\221\347\274\226\347\250\213.html.3e7c354c.js"
                                                                      index 6a235a5a..32686b6c 100644
                                                                      --- "a/assets/\345\271\266\345\217\221\347\274\226\347\250\213.html.a9177a47.js"
                                                                      +++ "b/assets/\345\271\266\345\217\221\347\274\226\347\250\213.html.3e7c354c.js"
                                                                      @@ -1 +1 @@
                                                                      -import{_ as i,e as l}from"./app.0d029894.js";var p="/study/assets/image-20210904170008584.9ae2a8f6.png",e="/study/assets/image-20210904170145964.0bd58d87.png",a="/study/assets/image-20210904171814442.cab9591e.png",r="/study/assets/image-20210906143610290.528cb25f.png",t="/study/assets/image-20210906171812809.363b01dc.png",n="/study/assets/image-20210906144113619.a2f3c5c0.png",o="/study/assets/image-20210906145616412.1f9a56da.png",s="/study/assets/image-20210906162329611.4aeaf574.png",d="/study/assets/image-20210906162952714.4ab2d7a4.png",h="/study/assets/image-20210906163537132.2ae5e1a6.png",g="/study/assets/image-20210906164102507.06a0f57c.png",c="/study/assets/image-20210906164652141.f4114c6d.png",u="/study/assets/image-20210906165418735.d4e940a9.png",m="/study/assets/image-20210906165650753.b4ead867.png",y="/study/assets/image-20210906171021229.847adf9b.png",b="/study/assets/image-20210906172322150.a19aa7e0.png",k="/study/assets/image-20210906200431146.322d30b9.png",C="/study/assets/image-20210906204102015.ee560150.png",_="/study/assets/image-20210906211624798.1e983e7e.png",f="/study/assets/image-20210906221104293.53356d9b.png",A="/study/assets/image-20210907152327885.fd5de064.png",v="/study/assets/image-20210907153022187.a7654d9b.png",M="/study/assets/image-20210907153037877.e43be6ba.png",S="/study/assets/image-20210907153118988.b218cc5c.png",T="/study/assets/image-20210907164801520.1d739494.png",N="/study/assets/image-20210908142615745.58119378.png",j="/study/assets/image-20210908143216090.b17deb87.png",L="/study/assets/image-20210908144636043.58ea9b75.png",E="/study/assets/image-20210908152216836.530d1011.png",x="/study/assets/image-20210908183204652.5c29db96.png",R="/study/assets/image-20210908205551426.6b105bd3.png",I="/study/assets/image-20210908205814692.348bf473.png",U="/study/assets/image-20210908210307737.74fd6924.png",H="/study/assets/image-20210908211936243.e49a9e21.png",P="/study/assets/image-20210908212728493.f94e54d5.png",O="/study/assets/image-20210908212946761.13e79584.png",w="/study/assets/image-20210908213524594.2796de8e.png",z="/study/assets/image-20210908214251452.dbec5cfa.png",W="/study/assets/image-20210909140256403.96bb1dac.png",D="/study/assets/image-20210909141045584.1c039d2d.png",J="/study/assets/image-20210909141325138.dc54b65c.png",B="/study/assets/image-20210909142412154.4f507845.png",K="/study/assets/image-20210909142301150.f77386b0.png",Q="/study/assets/image-20210909152652554.4b233dc1.png",q="/study/assets/image-20210909163938947.4746849b.png",F="/study/assets/image-20210909175235649.71692bdb.png",G="/study/assets/image-20210909190349224.68892225.png",V="/study/assets/image-20210909191200097.e7b4c7b6.png",X="/study/assets/image-20210909191210548.6c5b6aef.png",Y="/study/assets/image-20210909194450657.164d751a.png",Z="/study/assets/image-20210909194836695.ef1f5332.png",$="/study/assets/image-20210909201243193.2061ec64.png",ii="/study/assets/image-20210909201251908.bb55024d.png",li="/study/assets/image-20210909203507236.90565c2f.png",pi="/study/assets/image-20210909203742017.5d415a09.png",ei="/study/assets/image-20210909204148130.0deb1dbb.png",ai="/study/assets/image-20210909204356085.9982e796.png",ri="/study/assets/image-20210909220203679.668a59b8.png",ti="/study/assets/image-20210909220242221.33efead5.png",ni="/study/assets/image-20210909220502184.e5bb662a.png",oi="/study/assets/image-20210909220707854.648fa4b9.png",si="/study/assets/image-20210910125940213.7c096c9b.png",di="/study/assets/image-20210910125952369.fc2f30be.png",hi="/study/assets/image-20210910183523679.7f21dde5.png",gi="/study/assets/image-20210910130603196.2012b989.png",ci="/study/assets/image-20210910130839000.39b704f6.png",ui="/study/assets/image-20210910144345408.ab990a24.png",mi="/study/assets/image-20210910145407027.d393b697.png",yi="/study/assets/image-20210910170942805.515bc66e.png",bi="/study/assets/image-20210910171404634.2fceb33c.png";const ki={},Ci=l('

                                                                      \u5E76\u53D1\u7F16\u7A0B

                                                                      \u8FDB\u7A0B\u4E0E\u7EBF\u7A0B

                                                                      \u8FDB\u7A0B

                                                                      1. \u5F53\u4E00\u4E2A\u7A0B\u5E8F\u88AB\u8FD0\u884C\uFF0C\u4ECE\u78C1\u76D8\u52A0\u8F7D\u8FD9\u4E2A\u7A0B\u5E8F\u7684\u4EE3\u7801\u5230\u5185\u5B58\uFF0C\u8FD9\u5C31\u5F00\u542F\u4E86\u4E00\u4E2A\u8FDB\u7A0B

                                                                        \u8FDB\u7A0B\u662F\u6D3B\u52A8\u7684\uFF0C\u7A0B\u5E8F\u5DF2\u7ECF\u88ABCPU\u6267\u884C\u4E86\uFF0C\u8FD9\u5C31\u662F\u8FDB\u7A0B

                                                                        \u7A0B\u5E8F\u662F\u9759\u6001\u7684\uFF0C\u8FDB\u7A0B\u662F\u52A8\u6001\u7684\u3002

                                                                      \u7EBF\u7A0B

                                                                      1. \u4E00\u4E2A\u8FDB\u7A0B\u4E4B\u5185\u53EF\u4EE5\u5206\u4E3A\u4E00\u5230\u591A\u4E2A\u7EBF\u7A0B\uFF0C\u53EF\u4EE5\u8BA4\u4E3A\u4E00\u4E2A\u8FDB\u7A0B\u662F\u7531\u591A\u4E2A\u7EBF\u7A0B\u7EC4\u6210\u7684\u3002
                                                                      2. \u4E00\u4E2A\u7EBF\u7A0B\u5C31\u662F\u4E00\u4E2A\u6307\u4EE4\u6D41\uFF0C\u5C06\u6307\u4EE4\u6D41\u4E2D\u7684\u4E00\u6761\u6761\u6307\u4EE4\u4EE5\u4E00\u5B9A\u7684\u987A\u5E8F\u4EA4\u7ED9CPU\u6267\u884C
                                                                      3. Java\u4E2D\uFF0C\u7EBF\u7A0B\u4F5C\u4E3A\u6700\u5C0F\u7684\u8C03\u5EA6\u5355\u4F4D\uFF0C\u8FDB\u7A0B\u4F5C\u4E3A\u8D44\u6E90\u5206\u914D\u7684\u6700\u5C0F\u5355\u4F4D

                                                                      \u4E8C\u8005\u5BF9\u6BD4

                                                                      1. \u8FDB\u7A0B\u57FA\u672C\u4E0A\u76F8\u4E92\u72EC\u7ACB\uFF0C\u800C\u7EBF\u7A0B\u5B58\u5728\u4E8E\u8FDB\u7A0B\u5185\uFF0C\u662F\u8FDB\u7A0B\u7684\u4E00\u4E2A\u5B50\u96C6

                                                                      2. \u8FDB\u7A0B\u62E5\u6709\u5171\u4EAB\u7684\u8D44\u6E90\uFF0C\u4F9B\u5185\u90E8\u7684\u7EBF\u7A0B\u5171\u4EAB

                                                                      3. \u4E0D\u540C\u8BA1\u7B97\u673A\u4E4B\u95F4\u7684\u8FDB\u7A0B\u901A\u4FE1\uFF0C\u6BD4\u5982\u5BA2\u6237\u7AEF\u548C\u670D\u52A1\u5668\u4E4B\u95F4\u7684\u901A\u4FE1\uFF0C\u9700\u8981\u9075\u5FAA\u5171\u540C\u7684\u534F\u8BAE\uFF0C\u5982HTTP

                                                                        \u6D4F\u89C8\u5668\u662F\u4E00\u4E2A\u8FDB\u7A0B\uFF0C\u670D\u52A1\u5668\u662Ftomcat\uFF0C\u4ED6\u4EEC\u4E4B\u95F4\u7684\u901A\u4FE1\u9700\u8981\u9075\u5FAAhttp

                                                                      4. \u4E0A\u4E0B\u6587\u5207\u6362\uFF0C\u5C31\u662F\u4E00\u4E2A\u4EFB\u52A1\u6682\u505C\u4E0E\u7EE7\u7EED\u7684\u8FD9\u4E2A\u8FC7\u7A0B\uFF08\u4E00\u4E2A\u4EFB\u52A1\u4ECE\u4FDD\u5B58\u5230\u518D\u52A0\u8F7D\u7684\u8FC7\u7A0B\uFF09

                                                                      \u5E76\u884C\u4E0E\u5E76\u53D1

                                                                      1. \u5355\u6838CPU\u4E0B\uFF0C\u7EBF\u7A0B\u5B9E\u9645\u8FD8\u662F\u4E32\u884C\u6267\u884C\u7684\uFF0C\u53EA\u662F\u7531\u4E8ECPU\u5728\u7EBF\u7A0B\u95F4\u7684\u5207\u6362\u975E\u5E38\u5FEB\uFF0C\u6240\u4EE5\u611F\u89C9\u662F\u5E76\u884C\u7684\uFF0C\u603B\u7ED3\u5C31\u662F\u5FAE\u89C2\u4E32\u884C\uFF0C\u5B8F\u89C2\u5E76\u884C

                                                                        \u4E00\u822C\u5C06\u8FD9\u79CD\u7EBF\u7A0B\u8F6E\u6D41\u6267\u884C\u7684\uFF0C\u7EBF\u7A0B\u8F6E\u6D41\u4F7F\u7528CPU\u7684\u505A\u6CD5\u79F0\u4E3A\u5E76\u53D1

                                                                        image-20210904170008584

                                                                      2. CPU\u591A\u6838\u624D\u53EF\u4EE5\u5E76\u884C

                                                                        image-20210904170145964

                                                                        \u6BCF\u4E2A\u6838\u5FC3\u90FD\u53EF\u4EE5\u5904\u7406\u4E00\u4E2A\u7EBF\u7A0B\u7684\u6307\u4EE4\uFF0C\u53EA\u8981\u6709\u591A\u4E2A\u6838\u5FC3\uFF0C\u90A3\u4E48\u5C31\u53EF\u4EE5\u540C\u65F6\u6267\u884C\u3002

                                                                      3. \u66F4\u591A\u7684\u65F6\u5019\u662F\u65E2\u6709\u5E76\u53D1\u4E5F\u6709\u5E76\u884C

                                                                        \u7EBF\u7A0B\u6570\u6BD4\u6838\u5FC3\u6570\u591A\u7684\u65F6\u5019\uFF0C\u5C31\u662F\u5E76\u53D1\u548C\u5E76\u884C\u90FD\u5B58\u5728

                                                                      4. \u5E76\u4E0D\u662F\u591A\u7EBF\u7A0B\u6267\u884C\u7684\u6548\u7387\u4E00\u5B9A\u6BD4\u5355\u7EBF\u7A0B\u9AD8

                                                                        \u56E0\u4E3A\u6709\u4E0A\u4E0B\u6587\u5207\u6362\u3001\u6B7B\u9501\u3001\u8D44\u6E90\u9650\u5236

                                                                      5. \u5E76\u53D1\u5C31\u662F\u540C\u4E00\u65F6\u95F4\u5E94\u5BF9\u591A\u4EF6\u4E8B\u60C5\u7684\u80FD\u529B

                                                                        \u5E76\u884C\u5C31\u662F\u540C\u4E00\u65F6\u95F4\u52A8\u624B\u505A\u591A\u4EF6\u4E8B\u60C5\u7684\u80FD\u529B

                                                                      6. \u65E2\u6709\u5E76\u53D1\u53C8\u6709\u5E76\u884C\u662F\u6700\u5E38\u89C1\u7684\u573A\u666F

                                                                      7. \u540C\u6B65\uFF1A

                                                                        \u4ECE\u65B9\u6CD5\u8C03\u7528\u7684\u89D2\u5EA6

                                                                        • \u5982\u679C\u9700\u8981\u7B49\u5F85\u7ED3\u679C\u8FD4\u56DE\uFF0C\u624D\u80FD\u7EE7\u7EED\u8FD0\u884C\uFF0C\u5C31\u662F\u540C\u6B65
                                                                        • \u4E0D\u9700\u8981\u7B49\u5F85\u7ED3\u679C\u8FD4\u56DE\uFF0C\u5C31\u80FD\u7EE7\u7EED\u8FD0\u884C\uFF0C\u8FD9\u662F\u5F02\u6B65
                                                                      8. \u591A\u7EBF\u7A0B\u53EF\u4EE5\u8BA9\u65B9\u6CD5\u6267\u884C\u53D8\u4E3A\u5F02\u6B65\u7684\uFF0C\u4E0D\u9700\u8981\u5E72\u7B49\u7740\u4E0A\u4E00\u4E2A\u65B9\u6CD5\u7684\u7ED3\u679C\u8FD4\u56DE

                                                                        \u591A\u4E2A\u7EBF\u7A0B\u540C\u65F6\u6267\u884C\uFF0C\u6240\u4EE5\u624D\u6709\u7EBF\u7A0B\u5B89\u5168\u95EE\u9898\uFF0C\u7EBF\u7A0B\u4E4B\u95F4\u76F8\u4E92\u62A2\u5360\u8D44\u6E90

                                                                      9. \u6BD4\u5982\u5728\u9879\u76EE\u4E2D\uFF0C\u89C6\u9891\u6587\u4EF6\u683C\u5F0F\u8F6C\u6362\u6BD4\u8F83\u8D39\u65F6\uFF0C\u8FD9\u65F6\u65B0\u5F00\u4E00\u4E2A\u7EBF\u7A0B\u5904\u7406\u89C6\u9891\u8F6C\u6362\uFF0C\u907F\u514D\u963B\u585E\u4E3B\u7EBF\u7A0B\u3002

                                                                      10. \u591A\u7EBF\u7A0B\u53EF\u4EE5\u5145\u5206\u5229\u7528\u591A\u6838\uFF0C\u505A\u5230\u5E76\u884C\u6267\u884C\uFF01

                                                                        \u5355\u6838CPU\u540C\u6837\u53EF\u4EE5\u6267\u884C\u591A\u7EBF\u7A0B\uFF0C\u8FD9\u5C31\u662F\u5E76\u53D1\uFF0C\u591A\u4E2A\u7EBF\u7A0B\u540C\u65F6\u62A2\u5360\u540C\u4E00\u4EFDCPU\u8D44\u6E90\u3002

                                                                        image-20210904171814442

                                                                      11. \u5355\u6838\u662F\u5E76\u53D1\uFF0C\u5728\u5FAE\u89C2\u4E0A\u662F\u4E32\u884C\u6267\u884C\u7684\u3002

                                                                        \u5355\u6838CPU\u4E5F\u53EF\u4EE5\u591A\u7EBF\u7A0B\uFF0C\u4F46\u662F\u5FAE\u89C2\u4E0A\u4E32\u884C\uFF0C\u5B8F\u89C2\u4E0A\u5E76\u884C\uFF0C\u5E76\u4E0D\u80FD\u63D0\u9AD8\u6548\u7387\uFF0C\u591A\u6838CPU\u624D\u80FD\u63D0\u9AD8\u6548\u7387\uFF0C\u5355\u6838\u65F6\u4ECD\u7136\u662F\u8F6E\u6D41\u6267\u884C

                                                                        \u800C\u4E14\u8FD8\u53EF\u80FD\u6709\u6B7B\u9501\u3001\u8D44\u6E90\u9650\u5236\u3001\u4E0A\u4E0B\u6587\u5207\u6362\u7684\u5F71\u54CD\uFF0C\u5BFC\u81F4\u591A\u7EBF\u7A0B\u7684\u6267\u884C\u6548\u7387\u5E76\u4E0D\u4E00\u5B9A\u5C31\u6BD4\u5355\u7EBF\u7A0B\u9AD8\u3002

                                                                        \u5355\u6838CPU\u5373\u4F7F\u7528\u4E86\u591A\u7EBF\u7A0B\u4E5F\u6CA1\u6709\u529E\u6CD5\u63D0\u9AD8\u6548\u7387\uFF0C\u56E0\u4E3A\u5728\u5FAE\u89C2\u4E0A\u662F\u4E32\u884C\u7684\u3002

                                                                        \u5355\u6838CPU\u7528\u591A\u7EBF\u7A0B\u53CD\u800C\u6BD4\u5355\u7EBF\u7A0B\u6162\uFF0C\u800C\u4E0D\u662F\u6267\u884C\u65F6\u95F4\u76F8\u7B49\uFF0C\u56E0\u4E3A\u591A\u7EBF\u7A0B\u6D89\u53CA\u5230\u4E0A\u4E0B\u6587\u5207\u6362\u3002

                                                                        \u603B\u7ED3\uFF1A\u591A\u6838CPU\u7528\u591A\u7EBF\u7A0B\u53EF\u4EE5\u505A\u5230\u5E76\u884C\uFF0C\u53EF\u4EE5\u63D0\u9AD8\u6267\u884C\u6548\u7387\uFF0C\u800C\u5355\u6838CPU\u6267\u884C\u591A\u7EBF\u7A0B\uFF0C\u5728\u5FAE\u89C2\u4E0A\u4E32\u884C\uFF0C\u5E76\u4E14\u6709\u4E0A\u4E0B\u6587\u5207\u6362\uFF0C\u53CD\u800C\u4E0D\u80FD\u63D0\u9AD8\u6267\u884C\u6548\u7387

                                                                      12. \u5E76\u4E0D\u662F\u8BF4\u5355\u6838CPU\u4E0B\uFF0C\u591A\u7EBF\u7A0B\u6CA1\u6709\u610F\u4E49

                                                                        \u591A\u6838CPU\u53EF\u4EE5\u5E76\u884C\u8DD1\u591A\u4E2A\u7EBF\u7A0B\uFF0C\u4F46\u80FD\u5426\u63D0\u9AD8\u6548\u7387\u8FD8\u662F\u8981\u5206\u60C5\u51B5

                                                                      Java\u7EBF\u7A0B

                                                                      \u521B\u5EFA\u7EBF\u7A0B

                                                                      1. \u4F7F\u7528Runnable\u63A5\u53E3\uFF0C\u5BF9\u6BD4\u76F4\u63A5\u7EE7\u627FThread\u7684\u65B9\u5F0F\uFF0C\u6539\u53D8\u7684\u5730\u65B9\u662F\uFF1A\u628A\u4EFB\u52A1\u548C\u7EBF\u7A0B\u5206\u79BB\u4E86\uFF0C\u800C\u7EE7\u627FThread\u7684\u65B9\u5F0F\uFF0C\u58F0\u660EThread\u5BF9\u8C61\u662F\u548C\u4EFB\u52A1\u5728\u4E00\u8D77\u7684\u3002

                                                                      2. \u5982\u679C\u4E00\u4E2A\u63A5\u53E3\uFF0C\u53EA\u6709\u4E00\u4E2A\u62BD\u8C61\u65B9\u6CD5\uFF0C\u90A3\u4E48\u53EF\u4EE5\u7528lambda\u8868\u8FBE\u5F0F\u6765\u7B80\u5316\uFF0C\u63A5\u53E3\u7528FunctionalInterface\u6765\u4FEE\u9970\uFF0C\u5982\u679C\u4E00\u4E2A\u63A5\u53E3\u6709\u591A\u4E2A\u62BD\u8C61\u65B9\u6CD5\u662F\u6CA1\u6CD5\u7528lambda\u8868\u8FBE\u5F0F\u6765\u7B80\u5316\u7684\u3002

                                                                      3. \u539F\u7406\u4E4BThread\u548CRunnable\u7684\u5173\u7CFB

                                                                        • Thread\u662F\u628A\u7EBF\u7A0B\u548C\u4EFB\u52A1\u5408\u5E76\u5728\u4E86\u4E00\u8D77

                                                                          Runnable\u662F\u628A\u7EBF\u7A0B\u548C\u4EFB\u52A1\u5206\u5F00\u4E86

                                                                        • \u7528Runnable\u66F4\u5BB9\u6613\u4E0E\u7EBF\u7A0B\u6C60\u7B49\u9AD8\u7EA7API\u914D\u5408

                                                                        • \u7528Runnable\u8BA9\u4EFB\u52A1\u8131\u79BB\u4E86Thread\u7EE7\u627F\u4F53\u7CFB\uFF0C\u6CA1\u6709\u5355\u7EE7\u627F\u7684\u5C40\u9650\u6027\uFF0C\u66F4\u7075\u6D3B

                                                                      4. \u7528FutureTask\u914D\u5408Callable\u63A5\u53E3\u548CThread\u7684\u65B9\u5F0F\u521B\u5EFA\u7EBF\u7A0B

                                                                        FutureTask\u80FD\u591F\u63A5\u6536Callable\u7C7B\u578B\u7684\u53C2\u6570\uFF0C\u7528\u6765\u5904\u7406\u6709\u8FD4\u56DE\u7ED3\u679C\u7684\u60C5\u51B5

                                                                      5. Callable\u63A5\u53E3\u548CRunnable\u63A5\u53E3\u7684\u5DEE\u522B\uFF1A

                                                                        Callable\u91CC\u7684call()\u65B9\u6CD5\u53EF\u4EE5\u629B\u51FA\u5F02\u5E38\uFF0C\u800C\u4E14\u6BD4Runnable\u63A5\u53E3\u91CC\u7684run()\u65B9\u6CD5\u591A\u4E86\u4E00\u4E2A\u8FD4\u56DE\u503C

                                                                      6. \u5E95\u5C42\u662F\u591A\u6838\u6765\u5BF9\u591A\u7EBF\u7A0B\u8FDB\u884C\u5E76\u884C\u7684\u5904\u7406\u8FD8\u662F\u7531\u4E00\u4E2A\u5355\u6838CPU\u6765\u5BF9\u591A\u7EBF\u7A0B\u8FDB\u884C\u5E76\u53D1\u7684\u6267\u884C\uFF0C\u91C7\u7528\u65F6\u95F4\u7247\u8F6E\u8F6C\u7684\u65B9\u5F0F\uFF0C\u8FD9\u662F\u6211\u4EEC\u63A7\u5236\u4E0D\u4E86\u7684\uFF0C\u662F\u7531\u5E95\u5C42\u7684\u4EFB\u52A1\u8C03\u5EA6\u5668\u6765\u51B3\u5B9A\u7684\u3002

                                                                      \u7EBF\u7A0B\u8FD0\u884C\u7684\u539F\u7406

                                                                      1. JVM\u7684\u865A\u62DF\u673A\u6808\u3001\u672C\u5730\u65B9\u6CD5\u6808\u548C\u7A0B\u5E8F\u8BA1\u6570\u5668\u662F\u7EBF\u7A0B\u72EC\u6709\u7684

                                                                        \u865A\u62DF\u673A\u542F\u52A8\u540E\uFF0C\u865A\u62DF\u673A\u5C31\u4F1A\u4E3A\u7EBF\u7A0B\u5206\u914D\u4E00\u5757\u6808\u5185\u5B58

                                                                      2. \u6BCF\u4E2A\u6808\u7531\u591A\u4E2A\u6808\u5E27\u7EC4\u6210\uFF0C\u5BF9\u5E94\u7740\u6BCF\u6B21\u65B9\u6CD5\u8C03\u7528\u65F6\u6240\u5360\u7528\u7684\u5185\u5B58

                                                                        \u4E00\u4E2A\u6808\u5E27\u5BF9\u5E94\u7740\u4E00\u4E2A\u65B9\u6CD5\u8C03\u7528

                                                                        \u6BCF\u4E2A\u7EBF\u7A0B\u53EA\u80FD\u6709\u4E00\u4E2A\u6D3B\u52A8\u6808\u5E27\uFF0C\u5BF9\u5E94\u7740\u5F53\u524D\u6B63\u5728\u6267\u884C\u7684\u90A3\u4E2A\u65B9\u6CD5\u3002

                                                                      3. \u4E00\u4E2A\u65B9\u6CD5\u8C03\u7528\u5B8C\u6BD5\u540E\uFF0C\u5373\u8FD4\u56DE\u540E\uFF0C\u90A3\u4E2A\u65B9\u6CD5\u8C03\u7528\u5BF9\u5E94\u7684\u6808\u5E27\u5C31\u6CA1\u6709\u4E86\uFF0C\u5BF9\u5E94\u7684\u6808\u5E27\u7684\u5185\u5B58\u5C31\u88AB\u91CA\u653E\u6389\u4E86\uFF0C\u6CA1\u6709\u5783\u573E\u56DE\u6536\uFF0C\u4F46\u662F\u5B58\u5728\u6808\u6EA2\u51FA

                                                                        PC\u662F\u4E24\u6837\u90FD\u6CA1\u6709\uFF0C\u800C\u865A\u62DF\u673A\u6808\u548C\u672C\u5730\u65B9\u6CD5\u6808\u662F\u5B58\u5728\u6808\u6EA2\u51FA\uFF0C\u4F46\u662F\u6CA1\u6709\u5783\u573E\u56DE\u6536\uFF0C\u5806\u7A7A\u95F4\u548C\u65B9\u6CD5\u533A\u662F\u5B58\u5728OOM\uFF0C\u4E5F\u6709\u5783\u573E\u56DE\u6536\u673A\u5236

                                                                      4. \u6808\u5E27\u91CC\u6709\u5C40\u90E8\u53D8\u91CF\u8868\uFF0C\u64CD\u4F5C\u6570\u6808\uFF0C\u65B9\u6CD5\u8FD4\u56DE\u5730\u5740\uFF0C\u52A8\u6001\u94FE\u63A5\uFF0C\u4E00\u4E9B\u9644\u52A0\u4FE1\u606F

                                                                      5. \u6BCF\u4E2A\u7EBF\u7A0B\u62E5\u6709\u72EC\u7ACB\u7684\u865A\u62DF\u673A\u6808

                                                                      \u7EBF\u7A0B\u7684\u4E0A\u4E0B\u6587\u5207\u6362

                                                                      1. \u7EBF\u7A0B\u7684\u4E0A\u4E0B\u6587\u5207\u6362\uFF0C\u662F\u6307\u4E00\u4E2A\u7EBF\u7A0B\u6682\u505C\uFF0C\u7136\u540E\u6062\u590D\u6267\u884C\uFF0C\u8FD9\u662F\u4E00\u6B21\u4E0A\u4E0B\u6587\u5207\u6362
                                                                      2. \u4EE5\u4E0B\u4E00\u4E9B\u539F\u56E0\u89E6\u53D1\u7EBF\u7A0B\u7684\u4E0A\u4E0B\u6587\u5207\u6362\uFF08\u5373\u7EBF\u7A0B\u6682\u505C\u5C31\u4F1A\u51FA\u73B0\u4E0A\u4E0B\u6587\u5207\u6362\uFF09\uFF1A
                                                                        • \u7EBF\u7A0B\u7684CPU\u65F6\u95F4\u7247\u7528\u5B8C
                                                                        • \u5783\u573E\u56DE\u6536\uFF08\u7528\u6237\u7EBF\u7A0B\u6682\u505C\uFF08stw\uFF09\uFF0C\u5783\u573E\u56DE\u6536\u7EBF\u7A0B\u5DE5\u4F5C\uFF09
                                                                        • \u6709\u66F4\u9AD8\u4F18\u5148\u7EA7\u7684\u7EBF\u7A0B\u9700\u8981\u8FD0\u884C
                                                                        • \u7EBF\u7A0B\u81EA\u5DF1\u8C03\u7528\u4E86sleep \u3001wait\u3001join\u3001yield\u7B49\u65B9\u6CD5
                                                                      3. sleep\u548Cwait\u65B9\u6CD5\u90FD\u53EF\u4EE5\u4F7F\u8C03\u7528\u65B9\u6CD5\u7684\u7EBF\u7A0B\u8FDB\u5165\u963B\u585E\u72B6\u6001\uFF0C\u4F46\u662Fsleep\u4E0D\u4F1A\u91CA\u653E\u540C\u6B65\u76D1\u89C6\u5668\u9501\uFF0C\u800Cwait\u4F1A\u91CA\u653E\u540C\u6B65\u76D1\u89C6\u5668\u9501\uFF0C\u800C\u4E14sleep\u53EF\u4EE5\u5728\u4EFB\u4F55\u5730\u65B9\u8C03\u7528\uFF0C\u4F46\u662Fwait\u65B9\u6CD5\u53EA\u80FD\u5728\u540C\u6B65\u4EE3\u7801\u5757\u5185\u6216\u540C\u6B65\u65B9\u6CD5\u5185\u8C03\u7528
                                                                      4. \u5F53\u4E0A\u4E0B\u6587\u5207\u6362\u53D1\u751F\u65F6\uFF0C\u64CD\u4F5C\u7CFB\u7EDF\u9700\u8981\u4FDD\u5B58\u5F53\u524D\u7EBF\u7A0B\u7684\u72B6\u6001\uFF0C\u5E76\u6062\u590D\u53E6\u4E00\u4E2A\u7EBF\u7A0B\u7684\u72B6\u6001\uFF0CJava\u4E2D\u5BF9\u5E94\u7684\u6982\u5FF5\u5C31\u662F\u7A0B\u5E8F\u8BA1\u6570\u5668\uFF0C\u5DE6\u8FB9\u662F\u6307\u4EE4\u5730\u5740\uFF08\u504F\u79FB\u5730\u5740\uFF09\uFF0C\u53F3\u8FB9\u662F\u5B57\u8282\u7801\u6307\u4EE4\uFF0C\u4F5C\u7528\u5C31\u662F\u8BB0\u4F4F\u4E0B\u4E00\u6761JVM\u9700\u8981\u6267\u884C\u7684\u5B57\u8282\u7801\u6307\u4EE4\u7684\u6307\u4EE4\u5730\u5740\u3002
                                                                      5. \u9891\u7E41\u7684\u4E0A\u4E0B\u6587\u5207\u6362\u4F1A\u5F71\u54CD\u6027\u80FD\uFF0C\u800C\u4E14\u8003\u8651\u5230\u6B7B\u9501\u3001\u8D44\u6E90\u9650\u5236\uFF0C\u5E76\u4E0D\u662F\u7EBF\u7A0B\u6570\u8D8A\u591A\u8D8A\u597D

                                                                      start()\u4E0Erun()

                                                                      1. start()\u8868\u793A\u542F\u52A8\u7EBF\u7A0B\uFF0Crun()\u8868\u793A\u7EBF\u7A0B\u542F\u52A8\u540E\u8981\u6267\u884C\u7684\u4EE3\u7801

                                                                        \u4E0D\u80FD\u76F4\u63A5\u8C03\u7528run()\uFF0C\u56E0\u4E3A\u7EBF\u7A0B\u6CA1\u6709\u542F\u52A8\uFF0C\u8FD8\u662F\u53EA\u6709\u4E00\u4E2A\u7EBF\u7A0B\u5373\u4E3B\u7EBF\u7A0B

                                                                        \u8C03\u7528start()\u65B9\u6CD5\u540E\uFF0C\u7EBF\u7A0B\u4F1A\u8FDB\u5165\u5C31\u7EEA\u72B6\u6001\uFF0C\u7B49\u5F85CPU\u5206\u914D\u65F6\u95F4\u7247\u5373\u8D44\u6E90\uFF0C\u5C31\u53EF\u4EE5\u8FD0\u884C\u4E86\uFF0C\u5C31\u7EEA\u72B6\u6001\u548C\u8FD0\u884C\u72B6\u6001\u5728Java\u91CC\u90FD\u79F0\u4E3ARUNNABLE\u72B6\u6001

                                                                      2. \u76F4\u63A5\u8C03\u7528run\u662F\u5728\u4E3B\u7EBF\u7A0B\u4E2D\u6267\u884C\u4E86run\uFF0C\u6CA1\u6709\u542F\u52A8\u65B0\u7684\u7EBF\u7A0B

                                                                      3. \u4F7F\u7528start\u662F\u542F\u52A8\u65B0\u7684\u7EBF\u7A0B\uFF0C\u901A\u8FC7\u65B0\u7684\u7EBF\u7A0B\u95F4\u63A5\u6267\u884Crun\u4E2D\u7684\u4EE3\u7801

                                                                      sleep()\u4E0Eyield()

                                                                      1. \u8C03\u7528sleep\u4F1A\u8BA9\u5F53\u524D\u7EBF\u7A0B\u4ECERunnable\u8FDB\u5165\u5230Timed Waiting\u72B6\u6001\uFF08\u963B\u585E\uFF0C\u6216\u8005\u8BF4\u4E00\u4E2A\u6709\u65F6\u9650\u7684\u7B49\u5F85\u8FC7\u7A0B\uFF09

                                                                      2. \u5176\u4ED6\u7EBF\u7A0B\u53EF\u4EE5\u4F7F\u7528interrupt\u65B9\u6CD5\u6253\u65AD\u6B63\u5728\u7761\u7720\u7684\u7EBF\u7A0B\uFF0C\u8FD9\u662F\u7761\u7720\u7684\u7EBF\u7A0B\u4F1A\u629B\u51FAInterruptedException

                                                                      3. sleep()\u65B9\u6CD5\u5199\u5728\u54EA\u4E2A\u7EBF\u7A0B\u4E2D\uFF0C\u5C31\u8BA9\u54EA\u4E2A\u7EBF\u7A0B\u7761\u7720\uFF0C\u5BF9\u5F53\u524D\u7EBF\u7A0B\u8FDB\u884C\u7761\u7720\u64CD\u4F5C

                                                                      4. \u7761\u7720\u7ED3\u675F\u540E\u7684\u7EBF\u7A0B\u672A\u5FC5\u4F1A\u7ACB\u523B\u5F97\u5230\u6267\u884C\uFF0C\u4E5F\u8981\u91CD\u65B0\u7B49\u5F85\u76F4\u5230\u5F97\u5230cpu\u65F6\u95F4\u7247\u5206\u914D

                                                                      5. \u8C03\u7528yield\u4F1A\u8BA9\u5F53\u524D\u7EBF\u7A0B\u4ECERunning\u8FDB\u5165Runnable\u5C31\u7EEA\u72B6\u6001\uFF0C\u7136\u540E\u8C03\u5EA6\u6267\u884C\u5176\u4ED6\u7EBF\u7A0B

                                                                        \u5177\u4F53\u7684\u5B9E\u73B0\u4F9D\u8D56\u4E8E\u64CD\u4F5C\u7CFB\u7EDF\u7684\u4EFB\u52A1\u8C03\u5EA6\u5668

                                                                      \u7EBF\u7A0B\u4F18\u5148\u7EA7

                                                                      1. \u7EBF\u7A0B\u4F18\u5148\u7EA7\u4F1A\u63D0\u793A\u4EFB\u52A1\u8C03\u5EA6\u5668\u4F18\u5148\u8C03\u5EA6\u8BE5\u7EBF\u7A0B\uFF0C\u4F46\u662F\u5B83\u4EC5\u4EC5\u662F\u4E00\u4E2A\u63D0\u793A\uFF0C\u4F46\u662F\u8C03\u5EA6\u5668\u53EF\u4EE5\u5FFD\u7565\u5B83\u3002

                                                                        \u5982\u679CCPU\u6BD4\u8F83\u5FD9\uFF0C\u90A3\u4E48\u4F18\u5148\u7EA7\u8F83\u9AD8\u7684\u7EBF\u7A0B\u4F1A\u83B7\u5F97\u66F4\u591A\u7684\u65F6\u95F4\u7247\uFF0C\u4F46CPU\u95F2\u65F6\uFF0C\u4F18\u5148\u7EA7\u51E0\u4E4E\u6CA1\u6709\u4F5C\u7528

                                                                      2. sleep\u548Cwait\u7684\u5DEE\u522B

                                                                        • sleep()\u65B9\u6CD5\u9002\u7528\u4E8E\u65E0\u9700\u540C\u6B65\u9501\u7684\u573A\u666F\uFF0C\u53EF\u4EE5\u5E94\u7528\u5728\u4EFB\u4F55\u5730\u65B9\uFF0C\u800Cwait()\u5219\u9700\u8981\u5728\u540C\u6B65\u65B9\u6CD5\u6216\u540C\u6B65\u4EE3\u7801\u5757\u4E2D\u4F7F\u7528
                                                                        • sleep()\u548Cwait()\u90FD\u662F\u4F7F\u7EBF\u7A0B\u8FDB\u5165\u963B\u585E\u72B6\u6001\uFF0Csleep\u4F7F\u7EBF\u7A0B\u8FDB\u5165timed waiting\u72B6\u6001\uFF0C\u5373\u4E00\u4E2A\u6709\u65F6\u9650\u7684\u7B49\u5F85\u8FC7\u7A0B\uFF0C\u800C\u8C03\u7528wait()\u7684\u7EBF\u7A0B\u5219\u9700\u8981\u5524\u9192
                                                                        • \u5982\u679C\u4E24\u4E2A\u65B9\u6CD5\u90FD\u4F7F\u7528\u5728\u540C\u6B65\u4EE3\u7801\u5757\u6216\u540C\u6B65\u65B9\u6CD5\u4E2D\uFF0Csleep()\u4E0D\u4F1A\u91CA\u653E\u540C\u6B65\u76D1\u89C6\u5668\uFF0C\u800Cwait()\u4F1A\u91CA\u653E\u540C\u6B65\u76D1\u89C6\u5668
                                                                        • Thread\u7C7B\u4E2D\u58F0\u660Esleep()\u65B9\u6CD5\uFF0C Object\u7C7B\u4E2D\u58F0\u660Ewait()
                                                                      3. \u5B9E\u73B0Runnable\u63A5\u53E3\uFF0C\u9996\u5148\u907F\u514D\u4E86\u7EE7\u627FThread\u7C7B\u7684\u5355\u7EE7\u627F\u7684\u5C40\u9650\u6027\u3002

                                                                        \u5E76\u4E14\u5C06\u7EBF\u7A0B\u548C\u4EFB\u52A1\u5206\u5F00\u6765

                                                                      4. \u5B9E\u73B0Runnable\u63A5\u53E3\u548C\u5B9E\u73B0Callable\u63A5\u53E3\u7684\u533A\u522B

                                                                        • \u4E00\u4E2A\u91CD\u5199run()\uFF0C\u4E00\u4E2A\u91CD\u5199call()

                                                                        • call()\u65B9\u6CD5\u6709\u8FD4\u56DE\u503C\uFF0C\u5E76\u4E14\u8FD4\u56DE\u503C\u53EF\u4EE5\u5E26\u6CDB\u578B\uFF0C\u800Crun()\u65B9\u6CD5\u4E0D\u80FD\u6709\u8FD4\u56DE\u503C

                                                                        • run()\u65B9\u6CD5\u5185\u90E8\u6709\u5F02\u5E38\u7684\u8BDD\u4E0D\u80FD\u629B\u51FA\uFF0C\u53EA\u80FD\u901A\u8FC7try-catch\u8FDB\u884C\u5904\u7406\uFF0C\u4F46\u662Fcall()\u65B9\u6CD5\u5185\u90E8\u6709\u5F02\u5E38\uFF0C\u53EF\u4EE5\u5C06\u5F02\u5E38\u629B\u51FA

                                                                        • \u5B9E\u73B0Callable\u63A5\u53E3\u8981\u914D\u5408FutureTask\u4F7F\u7528\uFF0C\u6BD4\u5982\u83B7\u53D6\u8FD4\u56DE\u503C

                                                                          // FutureTask\u7684\u5B9E\u4F8B\u5316\u5BF9\u8C61\u7684get()\u65B9\u6CD5\u7684\u8FD4\u56DE\u503C\u5373\u4E3AFutureTask\u6784\u9020\u5668Callable\u5BF9\u8C61\u7684\u5B9E\u73B0\u7C7B\u6240\u91CD\u5199\u7684call()\u65B9\u6CD5\u7684\u8FD4\u56DE\u503C

                                                                      5. join()\u662F\u7B49\u5F85\u8C03\u7528join\u65B9\u6CD5\u7684\u7EBF\u7A0B\u8FD0\u884C\u7ED3\u675F

                                                                      6. sleep() \u3001join()\u3001wait()\uFF0Csuspend()\u3001\u7B49\u5F85\u540C\u6B65\u9501\u8FD9\u4E94\u79CD\u60C5\u51B5\u53EF\u4EE5\u8BA9\u7EBF\u7A0B\u4ECE\u8FD0\u884C\u72B6\u6001\u5230\u963B\u585E\u72B6\u6001\u3002

                                                                      interrupt\u65B9\u6CD5

                                                                      1. \u7EBF\u7A0B\u5728sleep\u65F6\uFF0C\u88ABinterrupt\u6253\u65AD\uFF0C\u4F1A\u7F6E\u6253\u65AD\u6807\u8BB0\u4E3Afalse

                                                                        \u5373\u6253\u65ADsleep\u7684\u7EBF\u7A0B\uFF0C\u4F1A\u6E05\u7A7A\u6253\u65AD\u72B6\u6001

                                                                        \u6253\u65AD\u6B63\u5E38\u8FD0\u884C\u7684\u7EBF\u7A0B\uFF0C\u4E0D\u4F1A\u6E05\u7A7A\u6253\u65AD\u72B6\u6001

                                                                        \u6253\u65ADpark\u7EBF\u7A0B\uFF0C\u4E0D\u4F1A\u6E05\u7A7A\u6253\u65AD\u72B6\u6001

                                                                        \u4E0D\u4F1A\u6E05\u7A7A\u6253\u65AD\u72B6\u6001\uFF0C\u5373\u6253\u65AD\u6807\u8BB0\u4E3A\u771F

                                                                      \u4E3B\u7EBF\u7A0B\u548C\u5B88\u62A4\u7EBF\u7A0B

                                                                      1. \u6709\u4E00\u79CD\u7279\u6B8A\u7684\u7EBF\u7A0B\u53EB\u505A\u5B88\u62A4\u7EBF\u7A0B\uFF0C\u53EA\u8981\u5176\u4ED6\u975E\u5B88\u62A4\u7EBF\u7A0B\u8FD0\u884C\u7ED3\u675F\u4E86\uFF0C\u5373\u65F6\u5B88\u62A4\u7EBF\u7A0B\u7684\u4EE3\u7801\u6CA1\u6709\u6267\u884C\u5B8C\uFF0C\u4E5F\u4F1A\u5F3A\u5236\u7ED3\u675F\u3002
                                                                      2. \u5783\u573E\u56DE\u6536\u5668\u7EBF\u7A0B\u5C31\u662F\u4E00\u79CD\u5B88\u62A4\u7EBF\u7A0B\u3002

                                                                      \u516D\u79CD\u72B6\u6001

                                                                      1. NEW \uFF0C\u7EBF\u7A0B\u521A\u88AB\u521B\u5EFA\uFF0C\u4F46\u662F\u8FD8\u6CA1\u6709\u8C03\u7528start()\u65B9\u6CD5

                                                                        RUNNABLE\u5F53\u8C03\u7528\u4E86start()\u65B9\u6CD5\u4E4B\u540E\uFF0C\u7EBF\u7A0B\u5C31\u662FRUNNABLE\u72B6\u6001\uFF0C\u8FD0\u884C\u72B6\u6001\u548C\u5C31\u7EEA\u72B6\u6001\u90FD\u662FRUNNABLE\u72B6\u6001

                                                                        \u4ECE\u7EBF\u7A0B\u7684\u751F\u547D\u5468\u671F\u56FE\u6765\u770B\uFF0C\u662F\u533A\u5206\u4E86\u5C31\u7EEA\u72B6\u6001\u548C\u8FD0\u884C\u72B6\u6001\u3002\u6BD4\u5982\u8C03\u7528yield\u65B9\u6CD5\uFF0C\u4F1A\u4ECE\u8FD0\u884C\u72B6\u6001\u5230\u5C31\u7EEA\u72B6\u6001\u3002

                                                                      2. NEW RUNNABLE BLOCKED WAITING TIMED_WAITING TERMINATED

                                                                      3. BLOCKED WAITING TIMED_WAITING \u8FD9\u4E09\u79CD\u72B6\u6001\uFF0C\u662FJava\u5C42\u9762\u7684\u963B\u585E\u3002

                                                                        \u6BD4\u5982sleep()\u5BF9\u5E94\u5C31\u662F\u8FDB\u5165TIMED_WAITING\u72B6\u6001

                                                                        join()\uFF0C\u5C31\u662F\u8FDB\u5165WAITING\u72B6\u6001

                                                                      4. join()\u662F\u7B49\u5F85\u8C03\u7528join()\u7684\u7EBF\u7A0B\u8FD0\u884C\u7ED3\u675F\uFF01

                                                                        \u54EA\u4E2A\u7EBF\u7A0B\u53BB\u8C03\u7528join()\uFF0C\u90A3\u4E48\u8FD9\u4E2A\u7EBF\u7A0B\u8FD8\u5728\u8FD0\u884C\u4E2D\uFF01\u522B\u7684\u7EBF\u7A0B\u5FC5\u987B\u7B49\u5F85\u8C03\u7528join\u7684\u8FD9\u4E2A\u7EBF\u7A0B\u8FD0\u884C\u7ED3\u675F\u624D\u53EF\u4EE5\u8FD0\u884C

                                                                        \u4E0D\u8981\u8BA4\u4E3A\u8C01\u8C03\u7528join()\uFF0C\u8C01\u5C31\u8FDB\u5165WAITING\u72B6\u6001\u4E86

                                                                      \u5171\u4EAB\u6A21\u578B\u4E4B\u7BA1\u7A0B

                                                                      1. \u591A\u4E2A\u7EBF\u7A0B\u5171\u4EAB\u5185\u5B58\u4E2D\u7684\u8D44\u6E90\u4F1A\u9020\u6210\u5B89\u5168\u9690\u60A3

                                                                        \u5982\u679C\u662F\u591A\u6838CPU\uFF0C\u90A3\u4E48\u591A\u4E2A\u7EBF\u7A0B\u5E76\u884C\u6267\u884C\uFF0C\u5982\u679C\u8BBF\u95EE\u5185\u5B58\u4E2D\u7684\u540C\u4E00\u4E2A\u8D44\u6E90\uFF0C\u7531\u4E8E\u7EBF\u7A0B\u90FD\u662F\u505A\u7684\u4E0D\u540C\u7684\u4EFB\u52A1\uFF0C\u80AF\u5B9A\u4F1A\u51FA\u73B0\u5B89\u5168\u95EE\u9898\uFF0C\u5373\u7ED3\u679C\u4E0D\u786E\u5B9A\u3002

                                                                        \u5982\u679C\u662F\u5355\u6838CPU\uFF0C\u91C7\u7528\u7684\u662F\u65F6\u95F4\u7247\u8F6E\u8F6C\u7684\u65B9\u5F0F\uFF0C**\u90A3\u4E48\u7EBF\u7A0B\u95F4\u4ECD\u7136\u662F\u53EF\u80FD\u8BBF\u95EE\u540C\u4E00\u4E2A\u8D44\u6E90\uFF0C\u4ECD\u7136\u53EF\u80FD\u51FA\u73B0\u7EBF\u7A0B\u5B89\u5168\u95EE\u9898\u3002**\u6BD4\u5982\u4E24\u4E2A\u7EBF\u7A0B\u4EA4\u66FF\u6267\u884C\uFF0C\u91C7\u7528\u65F6\u95F4\u7247\u8F6E\u8F6C\u7684\u65B9\u5F0F\uFF0C\u4F46\u662F\u4ED6\u4EEC\u6BCF\u6B21\u6267\u884C\u90FD\u53BB\u8BBF\u95EE\u4E00\u4E2A\u9759\u6001\u53D8\u91CF\uFF0C\u8FD9\u4E2A\u9759\u6001\u53D8\u91CF\u5C5E\u4E8E\u7C7B\u7684\u7ED3\u6784\uFF0C\u968F\u7740\u7C7B\u7684\u52A0\u8F7D\u800C\u52A0\u8F7D\uFF0C\u5C5E\u4E8E\u5171\u4EAB\u8D44\u6E90\uFF0C\u4ED6\u4EEC\u4F1A\u51FA\u73B0\u7EBF\u7A0B\u5B89\u5168\u95EE\u9898\u3002

                                                                        \u603B\u7ED3\uFF1A\u591A\u4E2A\u7EBF\u7A0B\u53EA\u8981\u8BBF\u95EE\u7684\u662F\u540C\u4E00\u5757\u8D44\u6E90\uFF0C\u5C31\u53EF\u80FD\u51FA\u73B0\u7EBF\u7A0B\u5B89\u5168\u95EE\u9898\uFF0C\u5FC5\u987B\u91C7\u53D6\u76F8\u5E94\u7684\u63AA\u65BD\u3002

                                                                      2. \u4E5F\u5C31\u662F\u8BF4\u591A\u4E2A\u7EBF\u7A0B\u5E76\u884C\u6267\u884C\uFF0C\u53BB\u8BBF\u95EE\u540C\u4E00\u4E2A\u8D44\u6E90\uFF0C\u4F1A\u9020\u6210\u7EBF\u7A0B\u5B89\u5168\u95EE\u9898\u3002

                                                                        \u5355\u6838CPU\uFF0C\u591A\u4E2A\u7EBF\u7A0B\u4EA4\u66FF\u6267\u884C\uFF0C\u7531\u4E8E\u4E0A\u4E0B\u6587\u5207\u6362\uFF0C\u9020\u6210\u7684\u6307\u4EE4\u4EA4\u9519\uFF0C\u8FD9\u591A\u4E2A\u7EBF\u7A0B\u53C8\u8BBF\u95EE\u540C\u4E00\u4E2A\u8D44\u6E90\uFF0C\u51FA\u73B0\u7EBF\u7A0B\u5B89\u5168\u95EE\u9898\u3002

                                                                      3. \u4E00\u4E2A\u7A0B\u5E8F\u8FD0\u884C\u591A\u4E2A\u7EBF\u7A0B\u672C\u8EAB\u662F\u6CA1\u6709\u95EE\u9898\u7684

                                                                        \u95EE\u9898\u51FA\u5728\u591A\u4E2A\u7EBF\u7A0B\u8BBF\u95EE\u5171\u4EAB\u8D44\u6E90

                                                                        \u591A\u4E2A\u7EBF\u7A0B\u8BFB\u53D6\u5171\u4EAB\u8D44\u6E90\u5176\u5B9E\u4E5F\u6CA1\u6709\u95EE\u9898

                                                                        \u5728\u591A\u4E2A\u7EBF\u7A0B\u5BF9\u5171\u4EAB\u8D44\u6E90\u8FDB\u884C\u8BFB\u5199\u64CD\u4F5C\u65F6\uFF0C\u53D1\u751F\u4E86\u6307\u4EE4\u4EA4\u9519\uFF0C\u5C31\u4F1A\u51FA\u73B0\u95EE\u9898

                                                                      4. \u4E00\u6BB5\u4EE3\u7801\u5757\u5185\uFF0C\u5982\u679C\u5B58\u5728\u5BF9\u5171\u4EAB\u8D44\u6E90\u7684\u591A\u7EBF\u7A0B\u8BFB\u5199\u64CD\u4F5C\uFF0C\u79F0\u8FD9\u6BB5\u4EE3\u7801\u5757\u4E3A\u4E34\u754C\u533A

                                                                      5. \u7ADE\u6001\u6761\u4EF6

                                                                        \u591A\u4E2A\u7EBF\u7A0B\u5728\u4E34\u754C\u533A\u5185\u6267\u884C\uFF0C\u7531\u4E8E\u4EE3\u7801\u7684\u6267\u884C\u5E8F\u5217\u4E0D\u540C\u800C\u5BFC\u81F4\u7ED3\u679C\u65E0\u6CD5\u9884\u6D4B\uFF0C\u79F0\u4E3A\u53D1\u751F\u4E86\u7ADE\u6001\u6761\u4EF6

                                                                      synchronized\u89E3\u51B3\u65B9\u6848

                                                                      1. \u4E3A\u4E86\u907F\u514D\u4E34\u754C\u533A\u7684\u7ADE\u6001\u6761\u4EF6\u53D1\u751F

                                                                        \u963B\u585E\u5F0F\u7684\u89E3\u51B3\u65B9\u6848\uFF1Asynchronized\uFF0CLock

                                                                        \u975E\u963B\u585E\u5F0F\u7684\u89E3\u51B3\u65B9\u6848\uFF1A\u539F\u5B50\u53D8\u91CF

                                                                      2. synchronized\u4FD7\u79F0\u5BF9\u8C61\u9501\uFF0C\u5B83\u4F1A\u91C7\u7528\u4E92\u65A5\u7684\u65B9\u5F0F\u8BA9\u540C\u4E00\u65F6\u523B\u81F3\u591A\u53EA\u6709\u4E00\u4E2A\u7EBF\u7A0B\u80FD\u6301\u6709\u5BF9\u8C61\u9501\u3002\u5176\u4ED6\u7EBF\u7A0B\u518D\u60F3\u83B7\u53D6\u8FD9\u4E2A\u5BF9\u8C61\u9501\u65F6\u5C31\u4F1A\u963B\u585E\u4F4F\u3002

                                                                        sleep() join() \u7B49\u5F85\u540C\u6B65\u9501 wait() suspend()

                                                                        \u8FD9\u51E0\u79CD\u4F1A\u8BA9\u7EBF\u7A0B\u4ECE\u8FD0\u884C\u6001\u5230\u963B\u585E\u6001\u3002

                                                                        \u8FD9\u91CC\u8BF4\u7684\u5C31\u662F\u7B49\u5F85\u540C\u6B65\u9501\u3002

                                                                        \u4E00\u4E2A\u7EBF\u7A0B\u9700\u8981\u67D0\u4E2A\u8D44\u6E90\u624D\u80FD\u6267\u884C\uFF0C\u8FD9\u91CC\u9501\u5C31\u662F\u8FD9\u4E2A\u8D44\u6E90\uFF0C\u4F46\u662F\u83B7\u53D6\u4E0D\u5230\u8FD9\u4E2A\u8D44\u6E90\uFF0C\u90A3\u4E48\u8FD9\u4E2A\u7EBF\u7A0B\u4F1A\u8FDB\u5165\u963B\u585E\u72B6\u6001\u3002

                                                                      3. synchronized\u80FD\u4FDD\u8BC1\u62E5\u6709\u9501\u7684\u7EBF\u7A0B\u53EF\u4EE5\u5B89\u5168\u5730\u6267\u884C\u4E34\u754C\u533A\u5185\u7684\u4EE3\u7801\uFF0C\u4E0D\u7528\u62C5\u5FC3\u7EBF\u7A0B\u4E0A\u4E0B\u6587\u5207\u6362\u3002

                                                                        \u56E0\u4E3A\u53EA\u8981\u8FD9\u4E2A\u7EBF\u7A0B\u4E0D\u91CA\u653E\u76D1\u89C6\u5668\uFF0C\u5176\u4ED6\u7EBF\u7A0B\u5C31\u65E0\u6CD5\u6267\u884C\u8FD9\u5757\u4EE3\u7801

                                                                      4. \u91C7\u7528\u7EE7\u627FThread\u7684\u65B9\u5F0F\u521B\u5EFA\u7684\u7EBF\u7A0B\uFF0C\u8981\u6CE8\u610F\u540C\u6B65\u76D1\u89C6\u5668\u8981\u4F7F\u7528\u7C7B\u7684\u5BF9\u8C61\uFF0C\u907F\u514D\u76F4\u63A5\u4F7F\u7528\u7EBF\u7A0B\u5BF9\u8C61\uFF0C\u56E0\u4E3A\u8981\u4FDD\u8BC1\u4F7F\u7528\u7684\u540C\u6B65\u76D1\u89C6\u5668\u662F\u552F\u4E00\u7684\u3002\u6240\u4EE5\u8FD9\u79CD\u60C5\u51B5\u4E0B\u4E0D\u80FD\u7528this

                                                                      5. \u4E0D\u8981\u9519\u8BEF\u7406\u89E3\u4E3A\u62E5\u6709\u9501\u7684\u7EBF\u7A0B\u5C31\u80FD\u4E00\u76F4\u6267\u884C\u4E0B\u53BB\uFF0C\u56E0\u4E3A\u8FD9\u4E2A\u7EBF\u7A0B\u53EF\u80FD\u4F1A\u65F6\u95F4\u7247\u7528\u5B8C\uFF0C\u4F46\u662F\u5373\u65F6\u8FD9\u4E2A\u7EBF\u7A0B\u7684\u65F6\u95F4\u7247\u7528\u5B8C\uFF0C\u53EA\u8981\u5B83\u6CA1\u6709\u91CA\u653E\u9501\uFF0C\u5176\u4ED6\u7EBF\u7A0B\u4ECD\u7136\u8FDB\u4E0D\u6765\u8FD9\u5757\u4EE3\u7801\u3002\u53EA\u6709\u7B49\u8FD9\u4E2A\u7EBF\u7A0B\u4E0B\u4E00\u6B21\u5206\u914D\u5230\u65F6\u95F4\u7247\uFF0C\u624D\u4F1A\u7EE7\u7EED\u8FDB\u53BB\u6267\u884C\u3002

                                                                      6. \u963B\u585E\u7684\u7EBF\u7A0B\u88AB\u5524\u9192\u4E4B\u540E\u4E5F\u4E0D\u662F\u8BF4\u5C31\u53EF\u4EE5\u7ACB\u5373\u6267\u884C\u4E86\uFF0C\u4ECD\u7136\u8981\u7B49CPU\u5206\u914D\u65F6\u95F4\u7247\u7ED9\u8FD9\u4E2A\u7EBF\u7A0B\u3002

                                                                        \u603B\u4E4B\u7EBF\u7A0B\u60F3\u8981\u6267\u884C\u67D0\u4E00\u6BB5\u4EE3\u7801\uFF0C\u9664\u4E86CPU\u9700\u8981\u5206\u914D\u7ED9\u8FD9\u4E2A\u7EBF\u7A0B\u65F6\u95F4\u7247\uFF0C\u8FD8\u8981\u8FD9\u6BB5\u4EE3\u7801\u7684\u9501\uFF08\u8FD9\u91CC\u8BA8\u8BBA\u7684\u662F\u540C\u6B65\u76D1\u89C6\u5668\u9501\u7684\u60C5\u51B5\uFF09\uFF0C\u5982\u679C\u83B7\u53D6\u4E0D\u5230\u9501\uFF0C\u5C31\u76F8\u5F53\u4E8E\u83B7\u53D6\u4E0D\u5230\u8D44\u6E90\uFF0C\u90A3\u4E48\u5C31\u4F1A\u88AB\u963B\u585E\u3002

                                                                        \u7EBF\u7A0B\u9700\u8981\u83B7\u53D6\u5230\u8D44\u6E90\u624D\u80FD\u6267\u884C\u67D0\u6BB5\u4EE3\u7801\uFF0C\u5982\u679C\u4E00\u76F4\u83B7\u53D6\u4E0D\u5230\u8D44\u6E90\uFF0C\u90A3\u4E48\u5C31\u4F1A\u88AB\u963B\u585E\u3002\u5F53\u7EBF\u7A0B\u6267\u884C\u8FD9\u6BB5\u4EE3\u7801\u9700\u8981\u7684\u8D44\u6E90\u88AB\u91CA\u653E\u540E\uFF0C\u90A3\u4E48\u8FD9\u4E2A\u7EBF\u7A0B\u4ECE\u963B\u585E\u6001\u88AB\u5524\u9192\uFF0C\u4E5F\u4E0D\u80FD\u9A6C\u4E0A\u6267\u884C\uFF0C\u800C\u662F\u8FDB\u5165\u5C31\u7EEA\u72B6\u6001\uFF0C\u7B49\u5F85CPU\u5206\u914D\u65F6\u95F4\u7247\u7ED9\u8FD9\u4E2A\u7EBF\u7A0B\u3002

                                                                      7. synchronized\u5B9E\u9645\u662F\u7528\u5BF9\u8C61\u9501\u4FDD\u8BC1\u4E86\u4E34\u754C\u533A\u5185\u4EE3\u7801\u7684\u539F\u5B50\u6027\uFF0C\u4E34\u754C\u533A\u5185\u7684\u4EE3\u7801\u6267\u884C\u4E0D\u4F1A\u88AB\u7EBF\u7A0B\u5207\u6362\u6240\u6253\u65AD\u3002

                                                                        \u6BD4\u5982\u8BF4\u67D0\u4E2A\u7EBF\u7A0B\u62E5\u6709\u67D0\u6BB5\u4EE3\u7801\u7684\u9501\uFF0C\u5373\u65F6\u8FD9\u4E2A\u7EBF\u7A0B\u65F6\u95F4\u7247\u7528\u5B8C\uFF0C\u53EA\u8981\u5B83\u6CA1\u6709\u91CA\u653E\u9501\uFF0C\u5176\u4ED6\u7EBF\u7A0B\u4ECD\u7136\u4E0D\u80FD\u8FDB\u6765\u6267\u884C\u8FD9\u6BB5\u4EE3\u7801\uFF0C\u8FD9\u6BB5\u4EE3\u7801\u53EA\u6709\u7B49CPU\u4E0B\u4E00\u6B21\u5206\u914D\u65F6\u95F4\u7247\u7ED9\u8FD9\u4E2A\u7EBF\u7A0B\uFF0C\u624D\u53EF\u4EE5\u7EE7\u7EED\u6267\u884C\u3002

                                                                        \u4F46\u5343\u4E07\u4E0D\u8981\u7406\u89E3\u4E3A\u4E00\u4E2A\u7EBF\u7A0B\u62E5\u6709\u67D0\u6BB5\u4EE3\u7801\u7684\u9501\uFF0C\u5C31\u53EF\u4EE5\u4E00\u76F4\u6267\u884C\u4E0B\u53BB\uFF0C\u4E2D\u95F4\u4ECD\u7136\u6709\u65F6\u95F4\u7247\u7528\u5B8C\u7684\u8FC7\u7A0B\uFF0C\u4ECD\u7136\u5B58\u5728\u4E0A\u4E0B\u6587\u5207\u6362\uFF0C\u4F46\u662F\u88AB\u9501\u4F4F\u7684\u8FD9\u6BB5\u4EE3\u7801\u4FDD\u8BC1\u4E86\u539F\u5B50\u6027\u3002

                                                                        **\u5373\u65F6\u53D1\u751F\u4E86\u4E0A\u4E0B\u6587\u5207\u6362\uFF0C\u8FD9\u6BB5\u4EE3\u7801\u4E5F\u4E0D\u4F1A\u8BA9\u5176\u4ED6\u6CA1\u6709\u62E5\u6709\u9501\u7684\u7EBF\u7A0B\u6765\u6267\u884C\u3002**\u53EA\u6709\u7B49\u8FD9\u4E2A\u62E5\u6709\u9501\u7684\u7EBF\u7A0B\u4E0B\u4E00\u6B21\u5206\u914D\u5230\u65F6\u95F4\u7247

                                                                      8. \u518D\u4E00\u6B21\u8BF4\u660E\u4E86\u5373\u4F7F\u662F\u5355\u6838CPU\u901A\u8FC7\u65F6\u95F4\u7247\u8F6E\u8F6C\u7684\u65B9\u5F0F\u4EA4\u66FF\u6267\u884C\u7EBF\u7A0B\uFF0C\u4ECD\u7136\u4F1A\u51FA\u73B0\u7EBF\u7A0B\u5B89\u5168\u95EE\u9898\uFF0C\u4E0D\u8981\u4EE5\u4E3A\u5728\u5FAE\u89C2\u4E0A\u662F\u4E32\u884C\u7684\uFF0C\u5B9E\u9645\u6CA1\u6709\u7EBF\u7A0B\u540C\u4E00\u65F6\u523B\u53BB\u64CD\u4F5C\u540C\u4E00\u4E2A\u8D44\u6E90\uFF0C\u5C31\u4E0D\u4F1A\u5B58\u5728\u7EBF\u7A0B\u5B89\u5168\u95EE\u9898\uFF0C\u5173\u952E\u5728\u4E8E\u65F6\u95F4\u7247\u4F1A\u7528\u5B8C\uFF0C\u7ED3\u679C\u6CA1\u4FDD\u5B58\u7684\u60C5\u51B5\u4E0B\uFF0C\u67D0\u4E2A\u8D44\u6E90\u53C8\u88AB\u53E6\u4E00\u4E2A\u7EBF\u7A0B\u53BB\u6267\u884C\u3002\u5173\u952E\u5728\u4E8E\u591A\u4E2A\u7EBF\u7A0B\u64CD\u4F5C\u5171\u4EAB\u6570\u636E\uFF0C\u5373\u65F6\u4ED6\u4EEC\u4E0D\u662F\u5728\u540C\u4E00\u65F6\u523B\u64CD\u4F5C\u5171\u4EAB\u6570\u636E\uFF0C\u800C\u662F\u5728\u591A\u4E2A\u65F6\u95F4\u6BB5\u64CD\u4F5C\u5171\u4EAB\u6570\u636E\uFF0C\u4ECD\u7136\u4F1A\u51FA\u73B0\u7EBF\u7A0B\u5B89\u5168\u95EE\u9898\u3002\uFF08\u56E0\u4E3A\u4E0A\u4E0B\u6587\u5207\u6362\uFF0C\u53D1\u751F\u6307\u4EE4\u4EA4\u9519\uFF09

                                                                      9. \u64CD\u4F5C\u5171\u4EAB\u6570\u636E\u7684\u4EE3\u7801\uFF0C\u5373\u4E3A\u9700\u8981\u88AB\u540C\u6B65\u7684\u4EE3\u7801

                                                                        \u5171\u4EAB\u6570\u636E\uFF1A\u591A\u4E2A\u7EBF\u7A0B\u5171\u540C\u64CD\u4F5C\u7684\u53D8\u91CF\u3002

                                                                      \u53D8\u91CF\u7684\u7EBF\u7A0B\u5B89\u5168\u5206\u6790

                                                                      1. \u6210\u5458\u53D8\u91CF\u548C\u9759\u6001\u53D8\u91CF

                                                                        • \u5982\u679C\u4ED6\u4EEC\u6CA1\u6709\u88AB\u5171\u4EAB\uFF0C\u5219\u7EBF\u7A0B\u5B89\u5168
                                                                        • \u5982\u679C\u4ED6\u4EEC\u88AB\u5171\u4EAB
                                                                          • \u5982\u679C\u53EA\u6709\u8BFB\u64CD\u4F5C\uFF0C\u5219\u7EBF\u7A0B\u5B89\u5168
                                                                          • \u5982\u679C\u6709\u8BFB\u5199\u64CD\u4F5C\uFF0C\u5219\u8FD9\u6BB5\u4EE3\u7801\u662F\u4E34\u754C\u533A\uFF0C\u9700\u8981\u8003\u8651\u7EBF\u7A0B\u5B89\u5168\u95EE\u9898
                                                                      2. \u5C40\u90E8\u53D8\u91CF\u662F\u7EBF\u7A0B\u5B89\u5168\u7684

                                                                        \u5C40\u90E8\u53D8\u91CF\u662F\u5728\u6808\u7684\u6808\u5E27\u91CC\u3002\u6808\u662F\u7EBF\u7A0B\u79C1\u6709\u7684\uFF0C\u6240\u4EE5\u5C40\u90E8\u53D8\u91CF\u662F\u7EBF\u7A0B\u5B89\u5168\u7684

                                                                        \u5C40\u90E8\u53D8\u91CF\u5F15\u7528\u7684\u5BF9\u8C61\uFF1A

                                                                        • \u5982\u679C\u8BE5\u5BF9\u8C61\u6CA1\u6709\u9003\u79BB\u65B9\u6CD5\u7684\u4F5C\u7528\u8303\u56F4\uFF0C\u5B83\u662F\u7EBF\u7A0B\u5B89\u5168\u7684
                                                                        • \u5982\u679C\u8BE5\u5BF9\u8C61\u9003\u79BB\u65B9\u6CD5\u7684\u4F5C\u7528\u8303\u56F4\uFF0C\u9700\u8981\u8003\u8651\u7EBF\u7A0B\u5B89\u5168
                                                                      3. i++\u867D\u7136\u5728\u5B57\u8282\u7801\u6307\u4EE4\u5C42\u9762\uFF0C\u5206\u4E3A\u597D\u51E0\u6761\u5B57\u8282\u7801\u6307\u4EE4\uFF0C\u4E0D\u662F\u539F\u5B50\u64CD\u4F5C\uFF0C\u4F46\u662F\u8FD9\u51E0\u6761\u5B57\u8282\u7801\u6307\u4EE4\u4E0D\u88AB\u7EBF\u7A0B\u6240\u5171\u4EAB\u3002

                                                                      Monitor\u6982\u5FF5

                                                                      1. Java\u5BF9\u8C61\u5728\u5806\u7A7A\u95F4\u4E2D\u88AB\u5B9E\u4F8B\u5316\u4EE5\u540E\uFF0C\u4E3B\u8981\u5206\u4E3A\u4E24\u90E8\u5206

                                                                        • \u5BF9\u8C61\u5934

                                                                          • \u8FD0\u884C\u65F6\u5143\u6570\u636E\uFF08Mark Word\uFF09----hashcode\uFF0C\u5206\u4EE3\u5E74\u9F84\uFF08\u4ECE\u5E78\u5B58\u8005\u533A\u5230\u8001\u5E74\u4EE3\uFF09\uFF0C\u504F\u5411\u9501\uFF0C\u52A0\u9501\u72B6\u6001
                                                                          • \u7C7B\u578B\u6307\u9488---\u6307\u5411\u65B9\u6CD5\u533A\u4E2D\u8FD9\u4E2A\u5BF9\u8C61\u7684\u7C7B\u7684\u4FE1\u606F\uFF0C\u901A\u8FC7\u8FD9\u4E2A\u6307\u9488\u53EF\u4EE5\u627E\u5230\u7C7B\u5BF9\u8C61
                                                                          • \uFF08\u5982\u679C\u662F\u6570\u7EC4\uFF0C\u8FD8\u6709\u6570\u7EC4\u7684\u957F\u5EA6\u7684\u4FE1\u606F\uFF09

                                                                          image-20210906143610290

                                                                          \u8FD0\u884C\u65F6\u5143\u6570\u636EMark Word\u683C\u5F0F\uFF1A

                                                                          image-20210906171812809

                                                                        • \u5B9E\u4F8B\u6570\u636E\uFF08\u771F\u6B63\u7684\u6709\u6548\u6570\u636E\uFF0C\u6210\u5458\u53D8\u91CF\u7B49\u7B49\uFF09

                                                                      2. \u5305\u88C5\u7C7B\u578B\u6BD4\u57FA\u672C\u7C7B\u578B\u5360\u7528\u7684\u7A7A\u95F4\u5927\u3002\u4ECE\u5BF9\u8C61\u5934\u7684\u89D2\u5EA6\u5C31\u53EF\u4EE5\u770B\u51FA\u6765\u3002

                                                                      3. Monitor\u662F\u975E\u5E38\u91CD\u8981\u7684\u6982\u5FF5\uFF0C\u4E5F\u662FSynchronized\u9501\u5E95\u5C42\u7684\u539F\u7406\u3002

                                                                        Monitor\u88AB\u7FFB\u8BD1\u4E3A\u76D1\u89C6\u5668\u6216\u7BA1\u7A0B

                                                                      4. \u6BCF\u4E2AJava\u5BF9\u8C61\u90FD\u53EF\u4EE5\u5173\u8054\u4E00\u4E2AMonitor\u5BF9\u8C61\uFF0C\u5982\u679C\u4F7F\u7528synchronized\u7ED9\u5BF9\u8C61\u4E0A\u9501\uFF08\u91CD\u91CF\u7EA7\uFF09\u4E4B\u540E\uFF0C\u8BE5\u5BF9\u8C61\u5934\u7684Mark Word\u4E2D\u5C31\u88AB\u8BBE\u7F6E\u6307\u5411Monitor\u5BF9\u8C61\u7684\u6307\u9488\u3002

                                                                      5. synchronized\u4E0A\u9501\u7ED9\u4EE3\u7801\u5757\u4E0A\u9501\uFF0C\u6216\u8005\u91C7\u7528\u540C\u6B65\u65B9\u6CD5\u7684\u65B9\u5F0F\uFF0C\u5E95\u5C42\u539F\u7406\u90FD\u662F\u7ED9\u5BF9\u8C61\u4E0A\u9501\u3002

                                                                        image-20210906144113619

                                                                      6. \u4E00\u4E2A\u5BF9\u8C61\u5728\u5806\u7A7A\u95F4\u4E2D\u5206\u4E3A\u5BF9\u8C61\u5934\u548C\u5B9E\u4F8B\u6570\u636E

                                                                        \u5BF9\u8C61\u5934\u91CC\u6709\u8FD0\u884C\u65F6\u5143\u6570\u636E\uFF08Mark Word\uFF09\u548C\u7C7B\u578B\u6307\u9488\uFF0C\u5982\u679C\u662F\u6570\u7EC4\u8FD8\u6709\u6570\u7EC4\u7684\u957F\u5EA6\u4FE1\u606F\uFF0C\u5728\u8FD0\u884C\u65F6\u5143\u6570\u636E\u91CC\u5C31\u6709hashcode\uFF0C\u5206\u4EE3\u5E74\u9F84\uFF0C\u504F\u5411\u9501\u548C\u52A0\u9501\u72B6\u6001\u7684\u4FE1\u606F\u3002

                                                                        \u7ED9\u4E00\u4E2A\u5BF9\u8C61\u4E0A\u9501\u4E4B\u540E\uFF0C\u8FD9\u4E2AJava\u5BF9\u8C61\u7684\u5BF9\u8C61\u5934\u7684\u8FD0\u884C\u65F6\u5143\u6570\u636E\uFF08Mark Word\uFF09\u5C31\u6307\u5411\uFF08\u5173\u8054\uFF09\u4E00\u4E2AMonitor\u5BF9\u8C61\u3002\u8FD0\u884C\u65F6\u5143\u6570\u636E\u91CC\u5B58\u50A8\u4E86\u4E00\u4E2A\u6307\u5411Monitor\u7684\u5730\u5740\u6307\u9488

                                                                      7. Monitor\u91CC\u7684\u5C5E\u6027

                                                                        • Owner\uFF0C\u662F\u9501\u7684\u6240\u6709\u8005

                                                                          Monitor\u7684\u8FD9\u4E2AOwner\u53EA\u80FD\u6709\u4E00\u4E2A\u6240\u6709\u8005\u3002

                                                                        • EntryList\uFF0C\u662F\u7B49\u5F85\u961F\u5217

                                                                          \u6BD4\u5982\u5F53\u524DMonitor\u7684Owner\uFF0C\u5373\u62E5\u6709\u5F53\u524D\u8FD9\u4E2AMonitor\u7684\u7EBF\u7A0B\u662FThread1\uFF0C\u90A3\u4E48\u5F53Thread2\u6765\u5224\u65AD\u662F\u5426\u53EF\u4EE5\u8BBF\u95EE\u8FD9\u6BB5\u4E34\u754C\u4EE3\u7801\u65F6\uFF0C\u9996\u5148\u5224\u65AD\u8FD9\u4E2A\u9501\u5BF9\u8C61obj\u7684\u8FD0\u884C\u65F6\u5143\u6570\u636E\uFF08Mark Word\uFF09\u6709\u6CA1\u6709\u6307\u5411Monitor\u7684\u6307\u9488\uFF0C\u5373\u6709\u6CA1\u6709\u5173\u8054\u4E00\u4E2AMonitor\u5BF9\u8C61\uFF0C\u5982\u679C\u6709\uFF0C\u518D\u5224\u65AD\u8FD9\u4E2AMonitor\u7684Owner\u6709\u6CA1\u6709\u6240\u6709\u8005\uFF0C\u5982\u679C\u6709\u7684\u8BDD\uFF0C\u5C31\u8FDB\u5165EntryList\u7B49\u5F85\u961F\u5217\uFF08\u6216\u8005\u53EB\u963B\u585E\u72B6\u6001\uFF09\uFF0C\u90A3\u4E48\u8FD9\u4E2AThread2\u672C\u8EAB\u8FDB\u5165\u963B\u585E\u72B6\u6001\uFF08BLOCKED\uFF09\uFF0C\u7B49\u5F85\u5176\u4ED6\u7EBF\u7A0B\u91CA\u653E\u5BF9Monitor\u7684\u6240\u6709\u6743\u3002

                                                                          \u5982\u679C\u6B64\u65F6\u53C8\u6709\u4E00\u4E2A\u7EBF\u7A0B\u6765\u4E86\uFF0C\u4E5F\u8981\u6765\u6267\u884C\u8FD9\u6BB5\u4E34\u754C\u4EE3\u7801\uFF0C\u9996\u5148\u53D1\u73B0obj\u5173\u8054\u4E86Monitor\u5BF9\u8C61\uFF0C\u7136\u540EOwner\u6709\u4E3B\u4EBA\uFF0C\u4E5F\u8FDB\u5165EntryList\u963B\u585E\u961F\u5217\uFF0C\u90A3\u4E48\u8BE5\u7EBF\u7A0B\uFF0C\u4ECE\u8FD0\u884C\u72B6\u6001\u4E5F\u8FDB\u5165\u963B\u585E\u72B6\u6001\uFF08BLOCKED\uFF09\u3002

                                                                          \u5F53\u4E00\u4E2A\u7EBF\u7A0B\u9700\u8981\u67D0\u6837\u8D44\u6E90\u7EE7\u7EED\u6267\u884C\u7684\u65F6\u5019\uFF0C\u4F46\u662F\u53C8\u83B7\u53D6\u4E0D\u5230\u8FD9\u6837\u8D44\u6E90\uFF0C\u90A3\u4E48\u4F1A\u8FDB\u5165\u963B\u585E\u72B6\u6001\u3002

                                                                          \u4E0A\u9762\u8BF4\u7684\u7EBF\u7A0B\u8FDB\u5165\u963B\u585E\u72B6\u6001\u7684\u60C5\u51B5\uFF0C\u662F\u7B49\u5F85\u540C\u6B65\u9501\uFF0C\u7136\u540E\u8FDB\u5165\u963B\u585E\u72B6\u6001\u3002

                                                                          \u4E00\u4E2A\u7EBF\u7A0B\u4ECE\u8FD0\u884C\u72B6\u6001\u8FDB\u5165\u963B\u585E\u72B6\u6001\uFF0C\u6709\u4EE5\u4E0B\u4E94\u79CD\u60C5\u51B5

                                                                          • join()---\u7531RUNNABLE\u5230WAITING
                                                                          • sleep()----\u7531RUNNABLE \u5230 TIMED_WAITING
                                                                          • wait()---\u7531RUNNABLE\u5230WAITING
                                                                          • suspend() \uFF08\u5DF2\u7ECFdeprecated\uFF09
                                                                          • \u7B49\u5F85\u540C\u6B65\u9501---\u7531RUNNABLE\u5230BLOCKED

                                                                          BLOCKED, WAITING, TIMED_WATING\u4E09\u79CD\u72B6\u6001\u5728Java\u7684\u7EBF\u7A0B\u72B6\u6001\u8FD9\u4E2A\u89D2\u5EA6\u6765\u8BF4\uFF0C\u90FD\u53EB\u963B\u585E\u72B6\u6001

                                                                          image-20210906145616412

                                                                      8. \u5BF9synchronized\u5BF9\u4EE3\u7801\u5757\u6216\u65B9\u6CD5\u4E0A\u9501\u7684\u539F\u7406\u63CF\u8FF0

                                                                        • \u521A\u5F00\u59CBMonitor\u4E2DOwner\u4E3Anull
                                                                        • \u5F53Thread-2\u6267\u884Csynchronized(obj)\u5C31\u4F1A\u5C06Monitor\u7684\u6240\u6709\u8005Owner\u7F6E\u4E3AThread-2\uFF0CMonitor\u4E2D\u53EA\u80FD\u6709\u4E00\u4E2AOwner
                                                                        • \u5728Thread-2\u4E0A\u9501\u7684\u8FC7\u7A0B\u4E2D\uFF0C\u5982\u679CThread-3\uFF0CThread-4\uFF0CThread-5\u4E5F\u6765\u6267\u884Csynchronized(obj)\uFF0C\u5C31\u4F1A\u8FDB\u5165EntryList \u7531\u8FD0\u884C\u6001\u5230BLOCKED
                                                                        • Thread-2\u6267\u884C\u5B8C\u540C\u6B65\u4EE3\u7801\u5757\u7684\u5185\u5BB9\uFF0C\u5373\u4E34\u754C\u533A\u7684\u4EE3\u7801\uFF0C\u7136\u540E\u5524\u9192EntryList\u4E2D\u7B49\u5F85\u7684\u7EBF\u7A0B\u6765\u7ADE\u4E89\u9501\uFF0C\u7ADE\u4E89\u7684\u65F6\u5019\u662F\u975E\u516C\u5E73\u7684\u3002
                                                                      9. JVM\u57FA\u4E8E\u8FDB\u5165\u548C\u9000\u51FAMonitor\u5BF9\u8C61\u6765\u5B9E\u73B0\u540C\u6B65\u65B9\u6CD5\u548C\u540C\u6B65\u4EE3\u7801\u5757

                                                                        \u4F46\u4E24\u8005\u7684\u5B9E\u73B0\u7EC6\u8282\u4E0D\u4E00\u6837\uFF0C\u4EE3\u7801\u5757\u540C\u6B65\u662F\u4F7F\u7528monitorenter\u548Cmonitorexit\u5B57\u8282\u7801\u6307\u4EE4\u5B9E\u73B0\u7684\uFF0C\u800C\u65B9\u6CD5\u540C\u6B65\u662F\u4F7F\u7528\u53E6\u5916\u4E00\u79CD\u65B9\u5F0F\u5B9E\u73B0\u7684\uFF0C\u7EC6\u8282\u5728JVM\u89C4\u8303\u91CC\u5E76\u6CA1\u6709\u8BE6\u7EC6\u8BF4\u660E\uFF0C\u4F46\u662F\uFF0C\u65B9\u6CD5\u7684\u540C\u6B65\u540C\u6837\u53EF\u4EE5\u4F7F\u7528\u8FD9\u4E24\u4E2A\u6307\u4EE4\u6765\u5B9E\u73B0\u3002

                                                                        monitorenter\u6307\u4EE4\u662F\u5728\u7F16\u8BD1\u540E\u63D2\u5165\u5230\u540C\u6B65\u4EE3\u7801\u5757\u7684\u5F00\u59CB\u4F4D\u7F6E\uFF0C\u800Cmonitorexit\u662F\u63D2\u5165\u5230\u65B9\u6CD5\u7ED3\u675F\u5904\u548C\u5F02\u5E38\u5904\u3002

                                                                        JVM\u8981\u4FDD\u8BC1\u6BCF\u4E2Amonitorenter\u5FC5\u987B\u6709\u5BF9\u5E94\u7684monitorexit\u4E0E\u4E4B\u914D\u5BF9\u3002

                                                                        \u4EFB\u4F55\u5BF9\u8C61\u90FD\u6709\u4E00\u4E2Amonitor\u4E0E\u4E4B\u5173\u8054\uFF0C\u5F53\u4E14\u4E00\u4E2Amonitor\u88AB\u6301\u6709\u540E\uFF0C\u5B83\u5C06\u5904\u4E8E\u9501\u5B9A\u72B6\u6001\uFF0C\u7EBF\u7A0B\u6267\u884C\u5230monitorenter\u5B57\u8282\u7801\u6307\u4EE4\u65F6\uFF0C\u5C06\u4F1A\u5C1D\u8BD5\u83B7\u53D6\u4E0A\u9501\u5BF9\u8C61\u6240\u5BF9\u5E94\u7684monitor\u7684\u6240\u6709\u6743\uFF0C\u5373\u5C1D\u8BD5\u83B7\u5F97\u5BF9\u8C61\u7684\u9501

                                                                      10. synchronized\u5FC5\u987B\u662F\u8FDB\u5165\u540C\u4E00\u4E2A\u5BF9\u8C61\u7684monitor\u624D\u6709\u6548\u679C\uFF0C\u6240\u4EE5\u4E00\u5B9A\u8981\u4FDD\u8BC1\u540C\u6B65\u76D1\u89C6\u5668\u53EA\u6709\u4E00\u4E2A\u3002

                                                                      synchronized\u8FDB\u9636\u539F\u7406

                                                                      1. synchronized\u5DE5\u4F5C\u65B9\u5F0F\u662F\u8BA9\u5BF9\u8C61\u5173\u8054monitor\u5BF9\u8C61\uFF0C\u4F46\u662Fmonitor\u8FD9\u4E2A\u9501\u662F\u7531\u64CD\u4F5C\u7CFB\u7EDF\u63D0\u4F9B\u7684\uFF0C\u4F7F\u7528Monitor\u6210\u672C\u6BD4\u8F83\u9AD8\uFF0C\u5982\u679C\u6BCF\u6B21\u8FDB\u5165synchronized(xxx)\u90FD\u8981\u83B7\u53D6Monitor\u9501\uFF0C\u5BF9\u7A0B\u5E8F\u8FD0\u884C\u7684\u6027\u80FD\u662F\u6709\u5F71\u54CD\u7684\u3002

                                                                      2. \u4ECEJava6\u5BF9synchronized\u5173\u952E\u5B57\u83B7\u53D6\u9501\u7684\u65B9\u5F0F\u8FDB\u884C\u4E86\u6539\u8FDB\u548C\u4F18\u5316\u3002

                                                                        \u4ECE\u76F4\u63A5\u4F7F\u7528Monitor\u9501\u6539\u6210\u4E86\u53EF\u4EE5\u4F7F\u7528\u8F7B\u91CF\u7EA7\u9501\u548C\u504F\u5411\u9501

                                                                      3. Monitor\u662F\u5C5E\u4E8E\u91CD\u91CF\u7EA7\u9501

                                                                      4. \u6CA1\u6709\u7ADE\u4E89\u7684\u65F6\u5019\uFF0C\u5C31\u662F\u8BF4\u5982\u679C\u4F7F\u7528\u5171\u4EAB\u8D44\u6E90\u7684\u65F6\u95F4\u662F\u9519\u5F00\u7684\u65F6\u5019\uFF0C\u53EF\u4EE5\u4F7F\u7528\u8F7B\u91CF\u7EA7\u9501\uFF0C\u5982\u679C\u4F7F\u7528\u5171\u4EAB\u6570\u636E\u7684\u65F6\u95F4\u6CA1\u6709\u9519\u5F00\uFF0C\u90A3\u4E48\u8F7B\u91CF\u7EA7\u9501\u4E5F\u4F1A\u5347\u7EA7\u4E3A\u91CD\u91CF\u7EA7\u9501\u3002

                                                                      5. jdk1.6\u7248\u672C\uFF0C\u4E3A\u4E86\u51CF\u5C11\u83B7\u5F97\u9501\u548C\u91CA\u653E\u9501\u5E26\u6765\u7684\u6027\u80FD\u6D88\u8017\uFF0C\u5F15\u5165\u4E86\u504F\u5411\u9501\u548C\u8F7B\u91CF\u7EA7\u9501\uFF0C\u5728jdk1.6\u4E2D\uFF0C\u9501\u4E00\u5171\u67094\u79CD\u72B6\u6001\uFF0C\u7EA7\u522B\u4ECE\u4F4E\u5230\u9AD8\u4F9D\u6B21\u662F\uFF1A\u65E0\u9501\u72B6\u6001\u3001\u504F\u5411\u9501\u72B6\u6001\u3001\u8F7B\u91CF\u7EA7\u9501\u72B6\u6001\u548C\u91CD\u91CF\u7EA7\u9501\u72B6\u6001\u3002\u8FD9\u51E0\u4E2A\u72B6\u6001\u4F1A\u968F\u7740\u7ADE\u4E89\u60C5\u51B5\u9010\u6E10\u5347\u7EA7\uFF0C\u9501\u53EF\u4EE5\u5347\u7EA7\u4F46\u662F\u4E0D\u80FD\u964D\u7EA7\uFF0C\u610F\u5473\u7740\u504F\u5411\u9501\u5347\u7EA7\u4E3A\u8F7B\u91CF\u7EA7\u9501\u4E4B\u540E\u4E0D\u80FD\u964D\u7EA7\u6210\u504F\u5411\u9501\u3002

                                                                      \u8F7B\u91CF\u7EA7\u9501

                                                                      1. \u8F7B\u91CF\u7EA7\u9501\u7684\u4F7F\u7528\u573A\u666F\uFF1A\u5982\u679C\u4E00\u4E2A\u5BF9\u8C61\u867D\u7136\u6709\u591A\u7EBF\u7A0B\u8BBF\u95EE\uFF0C\u4F46\u591A\u7EBF\u7A0B\u8BBF\u95EE\u7684\u65F6\u95F4\u662F\u9519\u5F00\u7684\uFF08\u4E5F\u5C31\u662F\u6CA1\u6709\u7ADE\u4E89\uFF09\uFF0C\u90A3\u4E48\u53EF\u4EE5\u4F7F\u7528\u8F7B\u91CF\u7EA7\u9501\u6765\u4F18\u5316\u3002

                                                                        \u5982\u679C\u6709\u7ADE\u4E89\uFF0C\u8F7B\u91CF\u7EA7\u9501\u4F1A\u5347\u7EA7\u4E3A\u91CD\u91CF\u7EA7\u9501

                                                                        \u8F7B\u91CF\u7EA7\u9501\u7684\u8BED\u6CD5\u4ECD\u7136\u662Fsynchronized

                                                                      2. \u8F7B\u91CF\u7EA7\u9501\u5DE5\u4F5C\u539F\u7406

                                                                        1. \u5728\u7EBF\u7A0B\u7684\u865A\u62DF\u673A\u6808\u7684\u6808\u5E27\u521B\u5EFA\u9501\u8BB0\u5F55\uFF08Lock Record\uFF09\u5BF9\u8C61

                                                                          \u6BCF\u4E2A\u7EBF\u7A0B\u7684\u6808\u5E27\u90FD\u4F1A\u5305\u542B\u4E00\u4E2A\u9501\u8BB0\u5F55\u7684\u7ED3\u6784\u3002

                                                                          \u5185\u90E8\u53EF\u4EE5\u5B58\u50A8\u9501\u5B9A\u5BF9\u8C61\u7684Mark Word\uFF08\u8FD0\u884C\u65F6\u5143\u6570\u636E\uFF09

                                                                          image-20210906162329611

                                                                          \u8FD9\u4E2ALock Record\u5305\u542B\u4E86\u4E24\u90E8\u5206

                                                                          • \u4E00\u90E8\u5206\u662F\u5BF9\u8C61\u6307\u9488\uFF0C\u9501\u4F4F\u54EA\u4E2A\u5BF9\u8C61\uFF0C\u5F97\u77E5\u9053\u5BF9\u8C61\u5730\u5740\uFF0C\u8FD9\u4E00\u90E8\u5206\u5C31\u662F\u6307\u5411\u52A0\u9501\u5BF9\u8C61\u7684\u5BF9\u8C61\u5F15\u7528
                                                                          • \u53E6\u4E00\u90E8\u5206\u662F\u9501\u8BB0\u5F55\u5730\u5740\u548C\u540E\u4E24\u4F4D\u6807\u8BC600\uFF0800\u4EE3\u8868\u8F7B\u91CF\u7EA7\u9501\uFF09\uFF0C\u8FD9\u4E00\u90E8\u5206\u5C06\u6765\u7528\u6765\u5B58\u50A8\u52A0\u9501\u5BF9\u8C61\u7684Mark Word
                                                                        2. \u8BA9\u9501\u8BB0\u5F55\u4E2DObject reference\u6307\u5411\u9501\u5BF9\u8C61\uFF0C\u5E76\u5C1D\u8BD5\u7528cas\u66FF\u6362Object\u7684Mark Word\uFF0C\u5C06Mark Word\u7684\u503C\u5B58\u5165\u9501\u8BB0\u5F55\uFF08\u5173\u952E\uFF09\u3002

                                                                          \u505A\u8FD9\u4E00\u6B65\u4EA4\u6362\u7684\u64CD\u4F5C\u5C31\u8868\u793A\u52A0\u9501

                                                                          image-20210906162952714

                                                                        3. \u5982\u679CCAS\u66FF\u6362\u6210\u529F\uFF0C\u5BF9\u8C61\u5934\u4E2D\u5B58\u50A8\u4E86\u9501\u8BB0\u5F55\u5730\u5740\u548C\u72B6\u600100\uFF0C\u8868\u793A\u8FD9\u4E2A\u5BF9\u8C61\u5DF2\u7ECF\u52A0\u4E86\u8F7B\u91CF\u7EA7\u9501

                                                                          \u9501\u8BB0\u5F55\u91CC\u9762\u5B58\u653E\u4E86\u5BF9\u8C61\u7684\u5BF9\u8C61\u5934\u7684Mark Word\uFF08\u8FD0\u884C\u65F6\u5143\u6570\u636E--hashcode\uFF0C\u5206\u4EE3\u5E74\u9F84\u7B49\uFF09

                                                                          \u5C06\u6765\u89E3\u9501\u7684\u65F6\u5019\uFF0C\u518D\u6062\u590D\u56DE\u53BB

                                                                          image-20210906163537132

                                                                          \u4E0A\u9762\u8BF4\u7684\u662F\u6210\u529F\u7684\u60C5\u51B5\uFF0C\u5982\u679C\u5BF9\u8C61\u7684\u5BF9\u8C61\u5934\u7684Mark Word\u6807\u8BB0\u4F4D\u662F01\uFF0C\u4EE3\u8868\u662F\u6B63\u5E38\u60C5\u51B5\uFF0C\u6CA1\u6709\u52A0\u9501\uFF0C\u90A3\u4E48\u8FD9\u79CD\u60C5\u51B5\uFF0C\u4EA4\u6362\u53EF\u4EE5\u6210\u529F\uFF0C\u5373\u52A0\u9501\u53EF\u4EE5\u6210\u529F

                                                                        4. \u5982\u679CCAS\u66FF\u6362\u5931\u8D25\uFF0C\u6709\u4E24\u79CD\u60C5\u51B5

                                                                          • \u5982\u679C\u662F\u5176\u4ED6\u7EBF\u7A0B\u5DF2\u7ECF\u6301\u6709\u4E86\u8BE5Object\u5BF9\u8C61\u7684\u8F7B\u91CF\u7EA7\u9501\uFF08Object\u5BF9\u8C61\u5BF9\u8C61\u5934\u91CC\u6807\u8BB0\u662F00\uFF09\uFF0C\u8FD9\u65F6\u8868\u660E\u6709\u7ADE\u4E89\uFF0C\u8FDB\u5165\u9501\u81A8\u80C0\u8FC7\u7A0B

                                                                          • \u5982\u679C\u662F\u81EA\u5DF1\u6267\u884C\u4E86synchronized\u9501\u91CD\u5165\uFF0C\u90A3\u4E48\u518D\u6DFB\u52A0\u4E00\u6761Lock Record\u4F5C\u4E3A\u91CD\u5165\u7684\u8BA1\u6570\u3002

                                                                            \u4F46\u662F\u8FD9\u79CD\u5931\u8D25\u6CA1\u5173\u7CFB\uFF0C\u56E0\u4E3A\u662F\u540C\u4E00\u4E2A\u7EBF\u7A0B\u53C8\u5BF9\u540C\u4E00\u4E2A\u5BF9\u8C61\u52A0\u9501\uFF0C\u4E5F\u4F1A\u5728\u65B0\u7684\u6808\u5E27\uFF08\u865A\u62DF\u673A\u6808\u7684\u5B58\u50A8\u5355\u4F4D\uFF09\u91CC\u521B\u5EFA\u9501\u8BB0\u5F55\uFF0C\u9501\u8BB0\u5F55\u5730\u5740\u90E8\u5206\u5B58\u4E3Anull\uFF0C\u8FD9\u79CD\u60C5\u51B5\u53EB\u505Asynchronized\u9501\u91CD\u5165

                                                                            image-20210906164102507

                                                                          CAS\u64CD\u4F5C\u662F\u539F\u5B50\u6027\u7684\uFF0C\u4E0D\u4F1A\u88AB\u6253\u65AD

                                                                          \u603B\u7ED3\uFF1A\u540C\u4E00\u4E2A\u7EBF\u7A0B\u5BF9\u540C\u4E00\u4E2A\u5BF9\u8C61\u518D\u52A0\u9501\uFF0C\u8FD9\u79CD\u60C5\u51B5\u53EBsynchronized\u9501\u91CD\u5165

                                                                        5. \u89E3\u9501\uFF1A

                                                                          • \u5982\u679C\u6709\u53D6\u503C\u4E3Anull\u7684\u9501\u8BB0\u5F55\uFF0C\u8868\u793A\u6709\u91CD\u5165\uFF0C\u8FD9\u65F6\u91CD\u7F6E\u9501\u8BB0\u5F55\uFF0C\u8868\u793A\u91CD\u5165\u8BA1\u6570\u51CF\u4E00

                                                                            image-20210906164652141

                                                                          • \u5F53\u9000\u51FAsynchronized\u4EE3\u7801\u5757\u65F6\uFF0C\u9501\u8BB0\u5F55\u7684\u503C\u4E0D\u4E3Anull\uFF0C\u8FD9\u65F6\u4F7F\u7528cas\u5C06 Mark Word\u7684\u503C\u6062\u590D\u7ED9\u5BF9\u8C61\u5934

                                                                            • \u6210\u529F\uFF0C\u5219\u89E3\u9501\u6210\u529F
                                                                            • \u5931\u8D25\uFF0C\u8BF4\u660E\u8F7B\u91CF\u7EA7\u9501\u8FDB\u884C\u4E86\u9501\u81A8\u80C0\u6216\u5DF2\u7ECF\u5347\u7EA7\u4E3A\u91CD\u91CF\u7EA7\u9501\uFF0C\u8FDB\u5165\u91CD\u91CF\u7EA7\u9501\u89E3\u9501\u6D41\u7A0B

                                                                      \u9501\u81A8\u80C0

                                                                      1. \u5982\u679C\u5728\u5C1D\u8BD5\u52A0\u8F7B\u91CF\u7EA7\u9501\u7684\u8FC7\u7A0B\u4E2D\uFF0CCAS\u64CD\u4F5C\u65E0\u6CD5\u6210\u529F\uFF0C\u8FD9\u65F6\u4E00\u79CD\u60C5\u51B5\u5C31\u662F\u6709\u5176\u4ED6\u7EBF\u7A0B\u4E3A\u6B64\u5BF9\u8C61\u52A0\u4E0A\u4E86\u8F7B\u91CF\u7EA7\u9501\uFF08\u6709\u7ADE\u4E89\uFF09\uFF0C\u8FD9\u65F6\u9700\u8981\u8FDB\u884C\u9501\u81A8\u80C0\uFF0C\u5C06\u8F7B\u91CF\u7EA7\u9501\u53D8\u4E3A\u91CD\u91CF\u7EA7\u9501\u3002

                                                                      2. \u9501\u81A8\u80C0\u8FC7\u7A0B

                                                                        • \u5F53Thread-1\u8FDB\u884C\u8F7B\u91CF\u7EA7\u52A0\u9501\u65F6\uFF0CThread-0\u5DF2\u7ECF\u5BF9\u8BE5\u5BF9\u8C61\u52A0\u4E86\u8F7B\u91CF\u7EA7\u9501

                                                                          image-20210906165418735

                                                                        • \u8FD9\u65F6Thread-1\u52A0\u8F7B\u91CF\u7EA7\u9501\u5931\u8D25\uFF0C\u8FDB\u5165\u9501\u81A8\u80C0\u6D41\u7A0B

                                                                          • \u5373\u4E3AObject\u5BF9\u8C61\u7533\u8BF7Monitor\u9501\uFF0C\u8BA9Object\u5BF9\u8C61\u6307\u5411\u91CD\u91CF\u7EA7\u9501\u5730\u5740\u3002\u5E76\u4E14Mark Word\u540E\u4E24\u4F4D\u4F1A\u53D8\u4E3A10\uFF0C\u8868\u793A\u91CD\u91CF\u7EA7\u9501\u3002
                                                                          • \u7136\u540E\u81EA\u5DF1\u8FDB\u5165Monitor\u7684EntryList \u8FDB\u5165\u963B\u585E\u72B6\u6001BLOCKED

                                                                          image-20210906165650753

                                                                        • \u5F53Thread-0\u9000\u51FA\u540C\u6B65\u5757\u89E3\u9501\u65F6\uFF0C\u4F7F\u7528cas\u5C06Lock Record\u4E2DMark Word\u7684\u503C\u6062\u590D\u7ED9\u5BF9\u8C61\u5934\uFF0C\u5931\u8D25

                                                                          \u8FDB\u5165\u91CD\u91CF\u7EA7\u9501\u89E3\u9501\u6D41\u7A0B\u3002\u5373\u6309\u7167Monitor\u5730\u5740\u627E\u5230Monitor\u5BF9\u8C61\uFF0C\u8BBE\u7F6EOwner\u4E3Anull\uFF0C\u5524\u9192EntryList\u4E2DBLOCKED\u7EBF\u7A0B

                                                                      \u81EA\u65CB\u4F18\u5316

                                                                      1. \u7EBF\u7A0B\u963B\u585E\uFF0C\u90A3\u4E48\u5C31\u8981\u53D1\u751F\u4E00\u6B21\u4E0A\u4E0B\u6587\u5207\u6362\uFF0C\u8FD9\u662F\u6BD4\u8F83\u8017\u8D39\u6027\u80FD\u7684\u3002

                                                                        \u91CD\u91CF\u7EA7\u9501\u7ADE\u4E89\u7684\u65F6\u5019\uFF0C\u8FD8\u53EF\u4EE5\u4F7F\u7528\u81EA\u65CB\u6765\u8FDB\u884C\u4F18\u5316\uFF0C\u5982\u679C\u5F53\u524D\u7EBF\u7A0B\u81EA\u65CB\u6210\u529F\uFF08\u5373\u8FD9\u65F6\u5019\u6301\u9501\u7EBF\u7A0B\u5DF2\u7ECF\u9000\u51FA\u4E86\u540C\u6B65\u5757\uFF0C\u91CA\u653E\u4E86\u9501\uFF09\uFF0C\u8FD9\u65F6\u5F53\u524D\u7EBF\u7A0B\u5C31\u53EF\u4EE5\u907F\u514D\u963B\u585E\u3002

                                                                        \u610F\u601D\u5C31\u662F\u4E0D\u7ACB\u523B\u53BBEntryList\uFF0C\u8FDB\u5165\u963B\u585E\u72B6\u6001\uFF0C\u800C\u662F\u5FAA\u73AF\u51E0\u6B21\uFF0C\u5C31\u662F\u81EA\u65CB

                                                                      2. \u81EA\u65CB\u8981\u4F7F\u7528CPU\uFF0C\u6240\u4EE5\u81EA\u65CB\u4F18\u5316\u9002\u5408\u591A\u6838CPU\uFF0C\u8FD9\u6837\u624D\u6709\u610F\u4E49\uFF0C\u5426\u5219\u5355\u6838CPU\uFF0C\u6B63\u5728\u88AB\u6301\u9501\u7EBF\u7A0B\u6240\u5360\u6709\uFF0C\u90A3\u4E48\u8FD9\u4E2A\u7EBF\u7A0B\u81EA\u65CB\uFF0C\u5C31\u6CA1\u6709\u610F\u4E49\u3002

                                                                      3. \u5982\u679C\u6301\u9501\u7EBF\u7A0B1\u8FDF\u8FDF\u6CA1\u6709\u91CA\u653E\u9501\uFF0C\u90A3\u4E48\u7EBF\u7A0B2\u81EA\u65CB\u91CD\u8BD5\u5931\u8D25\uFF0C\u4ECD\u7136\u8FDB\u5165EntryList\uFF0C\u8FDB\u5165\u963B\u585E\u6001\u3002

                                                                      4. \u81EA\u65CB\u4F1A\u5360\u7528CPU\u65F6\u95F4\uFF0C\u5355\u6838CPU\u81EA\u65CB\u5C31\u662F\u6D6A\u8D39\uFF0C\u591A\u6838CPU\u81EA\u65CB\u624D\u80FD\u53D1\u6325\u4F18\u52BF\u3002

                                                                      \u504F\u5411\u9501

                                                                      1. image-20210906171021229

                                                                      2. image-20210906172322150

                                                                      3. \u504F\u5411\u9501\u7684\u8BED\u6CD5\u4ECD\u7136\u662Fsynchronized

                                                                        \u9ED8\u8BA4\u5F00\u542F\u504F\u5411\u9501\uFF0C\u521D\u59CB\u7EBF\u7A0BID\u662F0\uFF0C\u4E0A\u9501\u4E4B\u540E\uFF08\u52A0\u4E86synchronized\uFF09\uFF0C\u624D\u6709\u7EBF\u7A0BID

                                                                        \u91CA\u653E\u4E86\u9501\u4E4B\u540E\uFF0C\u5BF9\u8C61\u7684\u5BF9\u8C61\u5934\u7684Mark Word\u91CC\u7684\u7EBF\u7A0BID\u4ECD\u7136\u662F\u4E4B\u524D\u7684\u7EBF\u7A0BID\uFF0C\u8FD9\u5C31\u662F\u504F\u5411\uFF01

                                                                      4. \u52A0\u9501\u7684\u4F18\u5148\u987A\u5E8F\u662F

                                                                        • \u504F\u5411\u9501
                                                                        • \u8F7B\u91CF\u7EA7\u9501
                                                                        • \u91CD\u91CF\u7EA7\u9501\uFF08\u7EBF\u7A0B2\u60F3\u8FDB\u5165\u4E34\u754C\u4EE3\u7801\uFF0C\u53D1\u73B0\u9501\u5BF9\u8C61\u5DF2\u7ECF\u88AB\u7EBF\u7A0B1\u52A0\u8F7B\u91CF\u7EA7\u9501\uFF0C\u8FD9\u65F6\u5C31\u901A\u8FC7\u9501\u81A8\u80C0\uFF0C\u7ED9Object\u5BF9\u8C61\u52A0\u91CD\u91CF\u7EA7\u9501\uFF09
                                                                      5. \u504F\u5411\u9501\u7684\u64A4\u9500

                                                                        • \u5F53\u4E00\u4E2A\u9ED8\u8BA4\u6253\u5F00\u504F\u5411\u9501\u7684\u5BF9\u8C61\uFF0C\u8C03\u7528\u4E86hashcode()\u4E4B\u540E\uFF0C\u4F1A\u64A4\u9500\u8FD9\u4E2A\u5BF9\u8C61\u7684\u504F\u5411\u9501\u72B6\u6001\uFF0C\u56E0\u4E3A\u5982\u679C\u5F00\u4E86\u504F\u5411\u9501\uFF0C\u8981\u5B58\u7EBF\u7A0BID\u90A3\u4E9B\u6570\u636E\uFF0C\u5BF9\u8C61\u5934\u91CC\u4FBF\u5B58\u4E0D\u4E0Bhashcode\uFF0C\u6240\u4EE5\u5C31\u628A\u504F\u5411\u9501\u72B6\u6001\u5173\u95ED\u3002

                                                                          \u8F7B\u91CF\u7EA7\u9501\u7684\u5BF9\u8C61\u7684hashcode\u4F1A\u5B58\u5728\u7EBF\u7A0B\u7684\u6808\u7684\u6808\u5E27\u91CC\u7684lock record\u7684\u9501\u8BB0\u5F55\u5730\u5740\u90E8\u5206\uFF0C\u89E3\u9501\u7684\u65F6\u5019\u4F1A\u6062\u590D\u7ED9\u5BF9\u8C61\u3002

                                                                          \u91CD\u91CF\u7EA7\u9501\u7684\u5BF9\u8C61\u7684hashcode\u4F1A\u5B58\u5728monitor\u5BF9\u8C61\u91CC\uFF0C\u6240\u4EE5\u4E0D\u4F1A\u5F71\u54CD\u3002

                                                                        • \u504F\u5411\u9501\u672C\u8D28\u5C31\u662F\u53EA\u6709\u4E00\u4E2A\u7EBF\u7A0B\u5728\u4F7F\u7528\uFF0C\u7EBF\u7A0B\u591A\u4E86\u4E4B\u540E\uFF0C\u4EA7\u751F\u7ADE\u4E89\uFF0C\u9501\u81EA\u7136\u4F1A\u5347\u7EA7\u3002

                                                                          \u5F53\u6709\u5176\u4ED6\u7EBF\u7A0B\u4F7F\u7528\u504F\u5411\u9501\u5BF9\u8C61\uFF08synchronized\u62EC\u53F7\u5185\u7684\u5BF9\u8C61\uFF09\u65F6\uFF0C\u4F1A\u5C06\u504F\u5411\u9501\u5347\u7EA7\u4E3A\u8F7B\u91CF\u7EA7\u9501\u3002

                                                                          \u89E3\u9501\u4E4B\u540E\uFF0C\u8FD9\u4E2A\u5BF9\u8C61\u5C31\u662F\u4E0D\u5F00\u542F\u504F\u5411\u9501\u7684\u72B6\u6001

                                                                          \u8FD9\u4E5F\u662F\u504F\u5411\u9501\u7684\u64A4\u9500\u3002

                                                                      6. \u504F\u5411\u9501\u5728jdk6\u548C7\u91CC\u662F\u9ED8\u8BA4\u542F\u7528\u7684\uFF0C\u4F46\u662F\u5B83\u5728\u5E94\u7528\u7A0B\u5E8F\u542F\u7528\u51E0\u79D2\u949F\u540E\u624D\u80FD\u751F\u6548\uFF0C\u5982\u6709\u5FC5\u8981\u53EF\u4EE5\u4F7F\u7528JVM\u53C2\u6570\u6765\u5173\u95ED\u5EF6\u8FDF\uFF1A-XX:BiasedLockingStartupDelay = 0\uFF0C\u5982\u679C\u786E\u5B9A\u5E94\u7528\u7A0B\u5E8F\u91CC\u6240\u6709\u7684\u9501\u901A\u5E38\u60C5\u51B5\u4E0B\u5904\u4E8E\u7ADE\u4E89\u72B6\u6001\uFF0C\u53EF\u4EE5\u901A\u8FC7JVM\u53C2\u6570\u5173\u95ED\u504F\u5411\u9501\uFF0C\u90A3\u4E48\u7A0B\u5E8F\u9ED8\u8BA4\u4F1A\u8FDB\u5165\u8F7B\u91CF\u7EA7\u9501\u72B6\u6001\u3002

                                                                      7. \u6279\u91CF\u91CD\u504F\u5411

                                                                        \u8FC7\u7A0B\uFF1A

                                                                        \u5047\u5982\u9501\u5BF9\u8C61\u88AB\u4E24\u4E2A\u7EBF\u7A0B\u8BBF\u95EE\uFF0C\u4F46\u662F\u6CA1\u6709\u7ADE\u4E89\uFF0C\u8FD9\u65F6\u504F\u5411\u4E86\u7EBF\u7A0BT1\u7684\u5BF9\u8C61\u4ECD\u7136\u6709\u673A\u4F1A\u91CD\u65B0\u504F\u5411T2

                                                                        \u91CD\u504F\u5411\u4F1A\u91CD\u7F6E\u5BF9\u8C61\u7684\u5BF9\u8C61\u5934\u91CC\u7684Mark Word\u7684\u7EBF\u7A0BID

                                                                        • \u7EBF\u7A0BT1\uFF0C\u7ED9\u4E00\u4E2A\u5BF9\u8C61\u91CD\u590D\u4E0A\u9501\uFF0C\u7EBF\u7A0BT2\u8C03\u7528wait()\uFF0C\u8FDB\u5165\u963B\u585E\u6001\uFF0C\u6240\u4EE5\u6B64\u65F6\u53EA\u6709T1\u6765\u7ED9\u5BF9\u8C61\u4E0A\u9501\uFF0C\u5E76\u4E14\u5728\u4E00\u4E2A\u5FAA\u73AF\u5185\u591A\u6B21\u4E0A\u9501\uFF0C\u90A3\u4E48\u4E0A\u7684\u662F\u504F\u5411\u9501\uFF0C\u56E0\u4E3A\u6CA1\u6709\u7ADE\u4E89\uFF08\u5FAA\u73AF30\u6B21\uFF09
                                                                        • \u5FAA\u73AF\u5B8C\u4E4B\u540E\uFF0C\u5524\u9192T2\u7EBF\u7A0B\uFF0CT2\u7EBF\u7A0B\u8BBF\u95EE\u5BF9\u8C61\uFF0C\u6B64\u65F6\u53D1\u73B0\u5BF9\u8C61\u5DF2\u7ECF\u88AB\u4E0A\u4E86\u504F\u5411\u9501\uFF0C\u90A3\u4E48\u5C31\u5982\u4E0A\u9762\u8BF4\u7684\uFF0C\u4F1A\u8FDB\u884C\u504F\u5411\u9501\u7684\u64A4\u9500\uFF0C\u9996\u5148\u4F1A\u5C06\u504F\u5411\u9501\u5347\u7EA7\u4E3A\u8F7B\u91CF\u7EA7\u9501\uFF0C\u89E3\u9501\u4E4B\u540E\uFF0C\u8FD9\u4E2A\u5BF9\u8C61\u5C31\u662F\u4E0D\u5F00\u542F\u504F\u5411\u9501\u7684\u72B6\u6001\u5373\u64A4\u9500\u4E86\u504F\u5411\u9501
                                                                        • \u4E0A\u9762\u8FD9\u4E00\u6B65\u8981\u8FDB\u884C19\u6B21\uFF08\u524D19\u6B21\u7684\u5BF9\u8C61\u90FD\u5DF2\u7ECF\u53D8\u6210\u4E86\u4E0D\u53EF\u504F\u5411\u7684\u72B6\u6001\uFF09\uFF0C\u5230\u7B2C20\u6B21\u7684\u65F6\u5019\uFF0CJVM\u4F1A\u89C9\u5F97\u4E4B\u524D\u504F\u5411T1\u504F\u5411\u9519\u4E86\uFF0C\u4E8E\u662F\u5728\u7ED9\u8FD9\u4E9B\u5BF9\u8C61\u52A0\u9501\u65F6\uFF0C\u91CD\u65B0\u504F\u5411T2\u7EBF\u7A0B\u3002
                                                                      8. \u6279\u91CF\u64A4\u9500

                                                                        \u5F53\u64A4\u9500\u504F\u5411\u9501\u9608\u503C\u8D85\u8FC740\u6B21\u540E\uFF0CJVM\u4F1A\u89C9\u5F97\u504F\u5411\u9519\u4E86\uFF0C\u4E0D\u5E94\u8BE5\u91C7\u53D6\u504F\u5411\u9501\uFF0C\u4E8E\u662F\u6574\u4E2A\u7C7B\u7684\u6240\u6709\u5BF9\u8C61\u90FD\u4F1A\u53D8\u4E3A\u4E0D\u53EF\u504F\u5411\u7684\uFF0C\u65B0\u5EFA\u7684\u5BF9\u8C61\u4E5F\u662F\u4E0D\u53EF\u504F\u5411\u7684\u3002

                                                                      9. \u6279\u91CF\u91CD\u504F\u5411\u548C\u6279\u91CF\u64A4\u9500\uFF0C\u90FD\u662F\u5C5E\u4E8E\u4F18\u5316\u3002

                                                                      \u9501\u6D88\u9664

                                                                      1. \u9501\u6D88\u9664\u5F00\u5173\u662F\u9ED8\u8BA4\u6253\u5F00\u7684\uFF0CJVM\u4F1A\u81EA\u52A8\u6D88\u9664\u6389\u6CA1\u6709\u610F\u4E49\u7684\u9501
                                                                      2. \u56E0\u4E3A\u4E0A\u9501\u548C\u89E3\u9501\u90FD\u662F\u6709\u6210\u672C\u7684\uFF0C\u800C\u4E14\u4E0A\u9501\u4F1A\u5BFC\u81F4\u6709\u7684\u7EBF\u7A0B\u83B7\u53D6\u4E0D\u5230\u9501\u8FDB\u800C\u4F1A\u5230\u963B\u585E\u72B6\u6001\uFF0C\u8FD9\u4E2A\u8FC7\u7A0B\u4F1A\u5F15\u8D77\u7EBF\u7A0B\u7684\u4E0A\u4E0B\u6587\u5207\u6362\uFF0C\u4E5F\u8981\u6D88\u8017\u6210\u672C

                                                                      wait-notify

                                                                      1. \u88AB\u5524\u9192\u540E\u7684\u7EBF\u7A0B\uFF0C\u662F\u8FDB\u5165\u5C31\u7EEA\u72B6\u6001\uFF0C\u4E0E\u5176\u4ED6\u7EBF\u7A0B\u4E00\u8D77\u7B49\u5F85CPU\u5206\u914D\u65F6\u95F4\u7247\uFF0C\u518D\u6267\u884C\uFF0C\u800C\u4E0D\u662F\u88AB\u5524\u9192\u540E\u9A6C\u4E0A\u6267\u884C

                                                                        \u88AB\u5524\u9192\u540E\u7684\u7EBF\u7A0B\u91CD\u65B0\u8FDB\u5165\u7ADE\u4E89\u9501\u7684\u961F\u5217

                                                                      2. wait()\u3001notify()\u3001notifyAll()

                                                                        • \u8FD9\u4E09\u4E2A\u65B9\u6CD5\u53EA\u80FD\u51FA\u73B0\u5728\u540C\u6B65\u4EE3\u7801\u5757\u548C\u540C\u6B65\u65B9\u6CD5\u4E2D

                                                                        • \u4EE5\u4E0A\u8FD9\u4E09\u4E2A\u65B9\u6CD5\u7684\u8C03\u7528\u8005\u5FC5\u987B\u662F\u540C\u6B65\u4EE3\u7801\u5757\u6216\u540C\u6B65\u65B9\u6CD5\u4E2D\u7684\u540C\u6B65\u76D1\u89C6\u5668\u3002

                                                                        • \u4EE5\u4E0A\u8FD9\u4E09\u4E2A\u65B9\u6CD5\u662F\u5B9A\u4E49\u5728java.lang.Object\u4E2D\u7684\u3002\u56E0\u4E3A\u540C\u6B65\u76D1\u89C6\u5668\u4EFB\u4F55\u4E00\u4E2A\u5BF9\u8C61\u90FD\u53EF\u4EE5\u5145\u5F53\uFF0C\u7ED3\u5408\u7B2C\u4E8C\u70B9\uFF0C\u4EFB\u4F55\u4E00\u4E2A\u5BF9\u8C61\u90FD\u5FC5\u987B\u80FD\u591F\u8C03\u7528\u4EE5\u4E0A\u4E09\u4E2A\u65B9\u6CD5\uFF0C\u8BF4\u660E\uFF0C\u4EFB\u4F55\u4E00\u4E2A\u5BF9\u8C61\u90FD\u6709\u8FD9\u4E09\u4E2A\u65B9\u6CD5\uFF0C\u6240\u4EE5\u8FD9\u4E09\u4E2A\u65B9\u6CD5\u662F\u58F0\u660E\u5728Object\u7C7B\u4E2D\u3002

                                                                      3. \u539F\u7406

                                                                        image-20210906200431146

                                                                        • Owner\u7EBF\u7A0B\u53D1\u73B0\u6761\u4EF6\u4E0D\u6EE1\u8DB3\uFF0C\u8C03\u7528wait()\u65B9\u6CD5\uFF0C\u5373\u53EF\u8FDB\u5165WaitSet\u53D8\u4E3AWAITING\u72B6\u6001

                                                                        • BLOCKED\u548CWAITING\u7684\u7EBF\u7A0B\u90FD\u5904\u4E8E\u963B\u585E\u72B6\u6001\uFF0C\u4E0D\u5360\u7528CPU\u65F6\u95F4\u7247

                                                                        • BLOCKED\u7EBF\u7A0B\u4F1A\u5728Owner\u7EBF\u7A0B\u91CA\u653E\u9501\u65F6\u5524\u9192

                                                                        • WAITING\u7EBF\u7A0B\u4F1A\u5728Owner\u7EBF\u7A0B\uFF08\u540C\u6B65\u76D1\u89C6\u5668\u9501\u5BF9\u8C61\uFF09\u8C03\u7528notify\u6216notifyAll\u65F6\u5524\u9192\u3002

                                                                          \u4F46\u662F\u5524\u9192\u540E\u5E76\u4E0D\u610F\u5473\u7740\u7ACB\u523B\u83B7\u5F97\u9501\uFF0C\u4ECD\u9700\u8FDB\u5165EntryList\uFF08BLOCKED\u7684\u5BF9\u8C61\u5728\u8FD9\u91CC\uFF09\u91CD\u65B0\u7ADE\u4E89\u3002

                                                                        • wait()\u3001join()\u662F\u8FDB\u5165waiting\u72B6\u6001

                                                                        • yield()\u662F\u4ECErunning\u5230runnable\u5C31\u7EEA\u72B6\u6001\uFF0C\u8BA9\u51FA\u65F6\u95F4\u7247\u4F46\u662F\u4E0D\u963B\u585E

                                                                        • \u65F6\u95F4\u7247\u7528\u5B8C\u4E5F\u662F\u4ECErunning\u5230runnable\u5C31\u7EEA\u72B6\u6001\uFF0C\u4E0D\u963B\u585E\uFF0C\u56DE\u5230\u5C31\u7EEA\u72B6\u6001\u7B49\u5F85\u4E0B\u4E00\u6B21\u65F6\u95F4\u7247\u5206\u914D

                                                                        • sleep\u662F\u5230timed_waiting\u72B6\u6001

                                                                        • \u7B49\u5F85\u540C\u6B65\u9501\u662F\u5230BLOCKED\u72B6\u6001\u3002

                                                                          \u8981\u533A\u5206WAITING\u72B6\u6001\u548CBLOCKED\u72B6\u6001\u3002

                                                                        • WAITING\u72B6\u6001\u7684\u7EBF\u7A0B\u901A\u8FC7notify()\u6216notifyAll()\u5524\u9192\uFF0C\u5524\u9192\u540E\u7684\u7EBF\u7A0B\u4ECD\u7136\u8981\u8FDB\u5165EntryList\u961F\u5217\uFF0C\u7B49\u5F85CPU\u8D44\u6E90\u5206\u914D
                                                                        • BLOCKED\u72B6\u6001\u901A\u8FC7\u7EBF\u7A0B\u91CA\u653E\u9501\u5524\u9192
                                                                      4. \u9501\u548C\u65F6\u95F4\u7247\u90FD\u53EF\u4EE5\u7406\u89E3\u4E3ACPU\u7684\u8D44\u6E90

                                                                      5. obj\u662F\u540C\u6B65\u76D1\u89C6\u5668\u9501\u5BF9\u8C61

                                                                        • obj.wait()\u8BA9\u8FDB\u5165object\u76D1\u89C6\u5668\uFF08monitor\uFF09\u7684\u7EBF\u7A0B\u5230waitSet\u7B49\u5F85
                                                                        • obj.notify()\u5728object\u4E0A\u6B63\u5728waitSet\u7B49\u5F85\u7684\u7EBF\u7A0B\u4E2D\u6311\u4E00\u4E2A\u5524\u9192
                                                                        • obj.notifyAll()\u5728object\u4E0A\u6B63\u5728waitSet\u7B49\u5F85\u7684\u7EBF\u7A0B\u5168\u90E8\u5524\u9192

                                                                        \u4EE5\u4E0A\u4E09\u4E2A\u65B9\u6CD5\u90FD\u5C5E\u4E8EObject\u5BF9\u8C61\u7684\u65B9\u6CD5

                                                                        \u8981\u6CE8\u610F\u53EA\u6709\u5F53\u67D0\u4E2A\u7EBF\u7A0B\u83B7\u53D6\u5230\u9501\u4E4B\u540E\uFF0C\u624D\u80FD\u8C03\u7528\u4EE5\u4E0A\u8FD9\u4E09\u4E2A\u65B9\u6CD5

                                                                        \u6CE8\u610F\uFF0C\u8C03\u7528wait()\uFF0C\u662F\u4F7F\u672C\u7EBF\u7A0B\u8FDB\u5165\u5230WAITING\u72B6\u6001\uFF08\u963B\u585E\u72B6\u6001\uFF09

                                                                        \u800C\u8C03\u7528notify\u548CnotifyAll\u662F\u5524\u9192\u522B\u7684\u7EBF\u7A0B

                                                                      6. image-20210906204102015

                                                                      \u540C\u6B65\u6A21\u5F0F\u4E4B\u4FDD\u62A4\u6027\u6682\u505C

                                                                      1. join()\u7684\u5B9E\u73B0\u91C7\u7528\u7684\u5C31\u662F\u6B64\u6A21\u5F0F\uFF0C\u4E00\u4E2A\u7EBF\u7A0B\u7B49\u53E6\u4E00\u4E2A\u7EBF\u7A0B\u6267\u884C\u5B8C\u4E4B\u540E\u518D\u6267\u884C\u3002
                                                                      2. join()\u4F7F\u7EBF\u7A0B\u8FDB\u5165WAITING\u72B6\u6001
                                                                      3. \u8FD9\u79CD\u6A21\u5F0F\u662F\u5728\u4E24\u4E2A\u7EBF\u7A0B\u95F4\u4EA4\u4E92\u7ED3\u679C\u7684\u6A21\u5F0F
                                                                      4. image-20210906211624798

                                                                      join\u539F\u7406

                                                                      1. \u4FDD\u62A4\u6027\u6682\u505C\u662F\u4E00\u4E2A\u7EBF\u7A0B\u7B49\u5F85\u53E6\u4E00\u4E2A\u7EBF\u7A0B\u7684\u7ED3\u679C

                                                                      2. join()\u662F\u4E00\u4E2A\u7EBF\u7A0B\u7B49\u5F85\u53E6\u4E00\u4E2A\u7EBF\u7A0B\u7684\u7ED3\u675F

                                                                      3. \u8BBE\u7F6E\u4E86\u6700\u5927\u7B49\u5F85\u65F6\u95F4

                                                                        image-20210906221104293

                                                                      \u5F02\u6B65\u6A21\u5F0F\u4E4B\u751F\u4EA7\u8005\u6D88\u8D39\u8005\u6A21\u5F0F

                                                                      1. \u4E0E\u4FDD\u62A4\u6027\u6682\u505C\u6A21\u5F0F\u4E0D\u540C\uFF0C\u4E0D\u9700\u8981\u4EA7\u751F\u7ED3\u679C\u548C\u6D88\u8D39\u7ED3\u679C\u7684\u7EBF\u7A0B\u4E00\u4E00\u5BF9\u5E94\u3002
                                                                      2. \u751F\u4EA7\u8005\u4EC5\u8D1F\u8D23\u4EA7\u751F\u7ED3\u679C\u6570\u636E\uFF0C\u4E0D\u5173\u5FC3\u6570\u636E\u8BE5\u5982\u4F55\u5904\u7406\uFF0C\u800C\u6D88\u8D39\u8005\u4E13\u5FC3\u5904\u7406\u7ED3\u679C\u6570\u636E
                                                                      3. \u6D88\u606F\u961F\u5217\u662F\u6709\u5BB9\u91CF\u9650\u5236\u7684\uFF0C\u6EE1\u65F6\u4E0D\u4F1A\u518D\u52A0\u5165\u6570\u636E\uFF0C\u7A7A\u65F6\u4E0D\u4F1A\u518D\u6D88\u8017\u6570\u636E
                                                                      4. \u548C\u4FDD\u62A4\u6027\u6682\u505C\u7684\u5171\u540C\u70B9\u90FD\u662F\u5904\u7406\u591A\u4E2A\u7EBF\u7A0B\u95F4\u7684\u7ED3\u679C\u7684\u4EA4\u4E92

                                                                      park\u548Cunpark

                                                                      1. image-20210907152327885

                                                                      2. \u539F\u7406\uFF1A

                                                                        \u5148\u8C03\u7528park\uFF0C\u518D\u8C03\u7528unpark

                                                                        image-20210907153022187

                                                                        image-20210907153037877

                                                                        \u5148\u8C03\u7528unpark\uFF0C\u518D\u8C03\u7528park

                                                                        image-20210907153118988

                                                                      \u7EBF\u7A0B\u72B6\u6001\u8F6C\u6362

                                                                      1. \u60C5\u51B51 NEW---> RUNNABLE

                                                                        \u5F53\u8C03\u7528t.start() \u65B9\u6CD5\u65F6\uFF0C\u7531NEW ---> RUNNABLE

                                                                      2. \u60C5\u51B52 RUNNABLE ---> WAITING

                                                                        t\u7EBF\u7A0B\u7528synchronized(obj)\u83B7\u53D6\u4E86\u5BF9\u8C61\u9501\u540E

                                                                        • \u8C03\u7528obj.wait() \u65B9\u6CD5\u65F6\uFF0Ct\u7EBF\u7A0B\u4ECERUNNABLE ---> WAITING
                                                                        • \u8C03\u7528obj.notify() , obj.notifyAll(), t.interrupt() \u65F6
                                                                          • \u7ADE\u4E89\u9501\u6210\u529F\uFF0Ct\u7EBF\u7A0B\u4ECEWAITING --> RUNNABLE
                                                                          • \u7ADE\u4E89\u9501\u5931\u8D25\uFF0C t\u7EBF\u7A0B\u4ECEWAITING ---> BLOCKED
                                                                      3. \u60C5\u51B53 RUNNABLE ---> WAITING

                                                                        • \u8C03\u7528t\u7EBF\u7A0B.join()\u65B9\u6CD5\uFF0C\u8981\u6CE8\u610F\u4E00\u5B9A\u4E0D\u662Ft\u7EBF\u7A0B\u4ECERUNNABLE ---> WAITING

                                                                          \u662F\u5F53\u524D\u7EBF\u7A0B\u8FDB\u5165WAITING\u800C\u4E0D\u662Ft\u7EBF\u7A0B\uFF0C\u662F\u5F53\u524D\u7EBF\u7A0B\u7B49\u5F85t\u7EBF\u7A0B\u8FD0\u884C\u5B8C\uFF01

                                                                          \u6CE8\u610F\u5F53\u524D\u7EBF\u7A0B\u662F\u5728t\u7EBF\u7A0B\u5BF9\u8C61\u7684\u76D1\u89C6\u5668\u4E0A\u7B49\u5F85\u3002

                                                                        • t\u7EBF\u7A0B\u8FD0\u884C\u7ED3\u675F\uFF0C\u6216\u8C03\u7528\u4E86\u5F53\u524D\u7EBF\u7A0B\u7684interrupt()\uFF0C\u4F1A\u8BA9\u5F53\u524D\u7EBF\u7A0B\u4ECEWAITING -- RUNNABLE

                                                                      4. \u60C5\u51B54 RUNNABLE ---> WAITING

                                                                        • \u5F53\u524D\u7EBF\u7A0B\u8C03\u7528LockSuppor.park()\u65B9\u6CD5\u4F1A\u8BA9\u5F53\u524D\u7EBF\u7A0B\u4ECERUNNABLE -- WAITING \uFF08\u4ECE\u539F\u7406\u4E0A\u5206\u6790\u8FC7\u4E86\uFF0C\u4E5F\u4E0D\u4E00\u5B9A\uFF0C\u8981\u770Bcounter\u7684\u72B6\u6001\u3002\uFF09
                                                                        • \u8C03\u7528LockSupport.unpark(\u76EE\u6807\u7EBF\u7A0B)\u6216\u8C03\u7528\u4E86\u7EBF\u7A0B\u7684interrupt()\uFF0C\u4F1A\u8BA9\u76EE\u6807\u7EBF\u7A0B\u4ECEWAITING -- RUNNABLE
                                                                      5. \u60C5\u51B55 RUNNABLE -- > TIMED_WAITING

                                                                        • Thread.sleep(long time)

                                                                        • obj.wait(long time)

                                                                        • \u5F53\u524D\u7EBF\u7A0B\u8C03\u7528t.join(long n)\u65B9\u6CD5\u65F6\uFF0C\u5F53\u524D\u7EBF\u7A0B\u4ECERUNNABLE---TIMED_WAITING,\u5F53\u524D\u7EBF\u7A0B\u7B49\u5F85t\u7EBF\u7A0B\u8FD0\u884C\u3002

                                                                          \u5F53\u524D\u7EBF\u7A0B\u7B49\u5F85\u65F6\u95F4\u8D85\u8FC7\u4E86n\u6BEB\u79D2\uFF0C\u6216t\u7EBF\u7A0B\u8FD0\u884C\u7ED3\u675F\uFF0C\u6216\u8C03\u7528\u4E86\u5F53\u524D\u7EBF\u7A0B\u7684interrupt\u65F6\uFF0C\u5F53\u524D\u7EBF\u7A0B\u4ECETIMED_WAITING --- > RUNNABLE

                                                                      6. \u60C5\u51B56 RUNNBALE -- > BLOCKED

                                                                        • t\u7EBF\u7A0B\u7528synchronized(obj)\u83B7\u53D6\u5BF9\u8C61\u9501\u65F6\uFF0C\u5982\u679C\u7ADE\u4E89\u5931\u8D25\uFF0C\u4ECERUNNABLE -- > BLOCKED

                                                                      ReentrantLock

                                                                      1. \u4F7F\u7528jconsole\u53EF\u4EE5\u68C0\u6D4B\u6B7B\u9501

                                                                      2. \u9965\u997F\uFF0C\u4E00\u4E2A\u7EBF\u7A0B\u7531\u4E8E\u4F18\u5148\u7EA7\u592A\u4F4E\uFF0C\u59CB\u7EC8\u5F97\u4E0D\u5230CPU\u8C03\u5EA6\u6267\u884C\uFF0C\u4E5F\u4E0D\u80FD\u591F\u7ED3\u675F

                                                                      3. \u7528ReentrantLock\u53EF\u4EE5\u89E3\u51B3\u6B7B\u9501\u548C\u9965\u997F\u73B0\u8C61\u3002

                                                                      4. ReentrantLock\u662F\u53EF\u91CD\u5165\u9501\uFF0C\u662FJUC\u5E76\u53D1\u5DE5\u5177\u5305\u4E0B\u7684\u4E00\u4E2A\u91CD\u8981\u7684\u7C7B

                                                                      5. \u76F8\u5BF9\u4E8Esynchronized\uFF0C\u5B83\u5177\u5907\u5982\u4E0B\u7279\u70B9\uFF1A

                                                                        • \u53EF\u4E2D\u65AD\uFF08synchronized\u52A0\u4E0A\u9501\u4E4B\u540E\uFF0C\u662F\u4E0D\u53EF\u4EE5\u4E2D\u65AD\u7684\u3002\uFF09\uFF0C\u52A0\u5165\u6253\u65AD\u673A\u5236\u53EF\u4EE5\u9632\u6B62\u7EBF\u7A0B\u7B49\u5F85\u9501\u65F6\u65E0\u9650\u5236\u5730\u7B49\u5F85\u4E0B\u53BB\u3002\u4E3A\u4E86\u907F\u514D\u6B7B\u7B49\u3002

                                                                          lock.lockInterruptibly()

                                                                        • \u53EF\u4EE5\u8BBE\u7F6E\u8D85\u65F6\u65F6\u95F4\uFF08\u89C4\u5B9A\u65F6\u95F4\u5185\uFF0C\u5982\u679C\u83B7\u53D6\u4E0D\u5230\u9501\uFF0C\u5C31\u653E\u5F03\u4E89\u8FD9\u4E2A\u9501\u4E86\uFF0C\u53BB\u6267\u884C\u4E00\u4E9B\u5176\u4ED6\u7684\u903B\u8F91\uFF09\uFF0C\u4E5F\u662F\u9632\u6B62\u7EBF\u7A0B\u56E0\u4E3A\u7B49\u5F85\u9501\u8FDB\u5165\u963B\u585E\u72B6\u6001\u65F6\uFF0C\u9632\u6B62\u7EBF\u7A0B\u65E0\u9650\u5236\u5730\u7B49\u5F85\u4E0B\u53BB\u3002\u4E00\u5B9A\u65F6\u95F4\u4E4B\u540E\uFF0C\u5C31\u4E0D\u518D\u963B\u585E\u4E86\uFF0C\u4E0D\u518D\u65E0\u9650\u5236\u5730\u7B49\u5F85\u4E0B\u53BB\u3002

                                                                          lock.tryLock()

                                                                          \u8FD9\u79CD\u65B9\u5F0F\u540C\u6837\u652F\u6301\u6253\u65AD\u3002\u62EC\u53F7\u91CC\u53EF\u4EE5\u586B\u5165\u65F6\u95F4\u53C2\u6570\uFF0C\u8868\u793A\u7B49\u5F85\u591A\u957F\u65F6\u95F4\uFF0C\u5982\u679C\u8FD9\u6BB5\u65F6\u95F4\u6CA1\u6709\u83B7\u53D6\u5230\u9501\uFF0C\u90A3\u4E48\u5C31\u4E0D\u4F1A\u518D\u7EE7\u7EED\u7B49\u5F85\u3002

                                                                          \u7528tryLock()\u53EF\u4EE5\u89E3\u51B3\u54F2\u5B66\u5BB6\u5C31\u9910\u95EE\u9898

                                                                        • \u53EF\u4EE5\u8BBE\u7F6E\u4E3A\u516C\u5E73\u9501\uFF08\u9632\u6B62\u7EBF\u7A0B\u9965\u997F\u7684\u60C5\u51B5\uFF09

                                                                          ReentrantLock\u9ED8\u8BA4\u662F\u4E0D\u516C\u5E73\u7684

                                                                        • \u652F\u6301\u591A\u4E2A\u6761\u4EF6\u53D8\u91CF\u3002\uFF08\u4E0D\u50CFsynchronized\u53EA\u6709\u4E00\u4E2AwaitSet\uFF0C\u6BD4\u5982\u8981\u7528notifyAll\u53EB\u9192\u7EBF\u7A0B\uFF0C\u4F1A\u628A\u7B49\u5F85\u7684\u7EBF\u7A0B\u90FD\u53EB\u9192\uFF0C\u800CReentrantLock\u53EF\u4EE5\u5BF9waitSet\u8FDB\u884C\u7EC6\u5206\uFF0C\u76F8\u5F53\u4E8E\u8FD9\u4E2A\u610F\u601D\uFF09

                                                                        • \u4E0Esynchronized\u4E00\u6837\uFF0C\u90FD\u652F\u6301\u53EF\u91CD\u5165\u3002

                                                                      6. \u53EF\u91CD\u5165---\u540C\u4E00\u4E2A\u7EBF\u7A0B\u5BF9\u540C\u4E00\u4E2A\u9501\u7684\u91CD\u590D\u83B7\u53D6

                                                                        \u662F\u6307\u540C\u4E00\u4E2A\u7EBF\u7A0B\u5982\u679C\u9996\u6B21\u83B7\u5F97\u4E86\u8FD9\u628A\u9501\uFF0C\u90A3\u4E48\u56E0\u4E3A\u5B83\u662F\u8FD9\u628A\u9501\u7684\u62E5\u6709\u8005\uFF0C\u56E0\u6B64\u6709\u6743\u5229\u518D\u6B21\u83B7\u5F97\u8FD9\u628A\u9501\u3002

                                                                        \u5982\u679C\u662F\u4E0D\u53EF\u91CD\u5165\u9501\uFF0C\u90A3\u4E48\u7B2C\u4E8C\u6B21\u83B7\u5F97\u9501\u65F6\uFF0C\u81EA\u5DF1\u4E5F\u4F1A\u88AB\u9501\u6321\u4F4F\u3002

                                                                      7. Synchronized\u7684monitor\u9501\u662F\u4E0D\u516C\u5E73\u9501

                                                                        \u8C01\u5148\u62A2\u5230\u8C01\u5C31\u62E5\u6709\u9501\uFF0C\u800C\u4E0D\u4F1A\u6309\u7167\u963B\u585E\u961F\u5217\u7684\u987A\u5E8F\u5148\u6765\u5148\u5F97\u3002\u6240\u4EE5\u662F\u4E0D\u516C\u5E73\u7684\u3002

                                                                        **ReentrantLock\u9ED8\u8BA4\u662F\u4E0D\u516C\u5E73\u7684\uFF0C**\u4F46\u662F\u53EF\u4EE5\u901A\u8FC7\u6784\u9020\u65B9\u6CD5\u8BBE\u7F6E\u662F\u516C\u5E73\u8FD8\u662F\u4E0D\u516C\u5E73\u3002

                                                                        \u516C\u5E73\u9501\u4E00\u822C\u6CA1\u6709\u5FC5\u8981\uFF0C\u4F1A\u964D\u4F4E\u5E76\u53D1\u5EA6

                                                                        \u516C\u5E73\u9501\u662F\u6309\u7167\u7B49\u5F85\u961F\u5217\uFF0C\u5148\u5165\u5148\u5F97\u7684\u65B9\u5F0F\u5B9E\u73B0\u7684\u3002

                                                                      8. \u516C\u5E73\u9501\u672C\u610F\u662F\u89E3\u51B3\u9965\u997F\u95EE\u9898\u7684\uFF0C\u4F46\u662F\u5B9E\u9645\u4E0A\u6CA1\u6709\u5FC5\u8981\uFF0C\u7528tryLock\u53EF\u4EE5\u89E3\u51B3\u3002

                                                                        \u4E00\u822C\u90FD\u4E0D\u4F1A\u8BBE\u7F6E\u4E3A\u516C\u5E73\u9501\u3002

                                                                      9. ReentrantLock\u9ED8\u8BA4\u662F\u4E0D\u53EF\u6253\u65AD\u7684\u3002

                                                                      10. image-20210907164801520

                                                                      \u548C\u4E4B\u524D\u7684wait-notify-notifyAll\u76F8\u6BD4\uFF0C\u662F\u6839\u636E\u6761\u4EF6\u53D8\u91CF\u6765\u53EB\u9192\u3002

                                                                      \u8C03\u7528await()\u4E4B\u524D\uFF0C\u5FC5\u987B\u83B7\u5F97\u9501\u624D\u6709\u8D44\u683C\u3002\uFF08\u548Cwait\uFF0Cnotify\uFF0CnotifyAll\u4E00\u6837\uFF09

                                                                      \u6CE8\u610F\u8C03\u7528await()\u548Csignal()\u65B9\u6CD5\u7684\u5BF9\u8C61\u662FCondition\u5BF9\u8C61\u3002

                                                                      1. ReentrantLock\u7684lock()\u3001unlock()\u5FC5\u987B\u6210\u5BF9\u51FA\u73B0\uFF0C\u624B\u52A8\u89E3\u9501\uFF0C\u800Csynchronized\u5173\u952E\u5B57\u4E0D\u9700\u8981

                                                                      \u672C\u7AE0\u5C0F\u7ED3

                                                                      1. \u540C\u6B65\u89E3\u51B3\u7684\u95EE\u9898\u548C\u4E92\u65A5\u89E3\u51B3\u7684\u95EE\u9898\u4E0D\u4E00\u6837

                                                                        \u4E92\u65A5\u4E3B\u8981\u4FDD\u8BC1\u5171\u4EAB\u8D44\u6E90\u7684\u4E92\u65A5\u6548\u679C\uFF0C\u4E00\u6BB5\u4E34\u754C\u533A\u4EE3\u7801\u5728\u5728\u67D0\u4E00\u6BB5\u65F6\u95F4\u5185\u53EA\u80FD\u7531\u4E00\u4E2A\u7EBF\u7A0B\u53BB\u6267\u884C

                                                                        \u800C\u540C\u6B65\u6307\u7684\u662F\u67D0\u4E2A\u7EBF\u7A0B\u62FF\u5230\u5176\u4ED6\u7EBF\u7A0B\u6267\u884C\u4EE3\u7801\u7684\u7ED3\u679C\u4E4B\u540E\u624D\u53EF\u4EE5\u88AB\u5524\u9192\u7EE7\u7EED\u8FDB\u5165\u963B\u585E\u961F\u5217\u53BB\u7ADE\u4E89\u9501\u3002\u4E5F\u5C31\u662F\u67D0\u4E2A\u7EBF\u7A0B\u9700\u8981\u8D44\u6E90\uFF0C\u4F46\u662F\u5F97\u4E0D\u5230\u8D44\u6E90\uFF0C\u4E8E\u662F\u8FDB\u5165\u963B\u585E\u961F\u5217\uFF0C\u4F46\u662F\u83B7\u5F97\u8D44\u6E90\u540E\uFF0C\u4FBF\u88AB\u5524\u9192\u8FDB\u5165\u5C31\u7EEA\u72B6\u6001\uFF0C\u4E00\u5B9A\u8981\u6CE8\u610F\uFF0C\u8FD9\u91CC\u88AB\u5524\u9192\u662F\u8FDB\u5165\u5C31\u7EEA\u72B6\u6001\u800C\u4E0D\u662F\u76F4\u63A5\u6267\u884C\uFF0C\u4ECD\u7136\u8981\u7B49\u5F85CPU\u5206\u914D\u65F6\u95F4\u7247\u3002

                                                                      2. \u7EBF\u7A0B\u83B7\u53D6\u4E0D\u5230\u9501\uFF0C\u662F\u8FDB\u5165EntryList\u963B\u585E\u961F\u5217

                                                                        \u800C\u7EBF\u7A0B\u67D0\u6837\u6761\u4EF6\u4E0D\u6EE1\u8DB3\uFF0C\u662F\u8FDB\u5165WaitSet\u4F11\u606F\u5BA4\uFF0C\u53EF\u4EE5\u8FD9\u4E48\u7406\u89E3\u3002

                                                                        \u5E73\u65F6\u90FD\u628A\u9501\u548C\u7EBF\u7A0B\u9700\u8981\u83B7\u5F97\u7684\u5176\u4ED6\u8D44\u6E90\u90FD\u770B\u4F5C\u7EBF\u7A0B\u9700\u8981\u7684\u8D44\u6E90\uFF0C\u4F46\u662F\u4ECE\u7EBF\u7A0B\u5DEE\u54EA\u6837\u4E1C\u897F\u800C\u8FDB\u5165\u54EA\u79CD\u72B6\u6001\u6765\u770B\uFF0C\u9700\u8981\u628A\u9501\u548C\u7EBF\u7A0B\u9700\u8981\u7684\u67D0\u4E9B\u6761\u4EF6\u5206\u5F00

                                                                        \u7EBF\u7A0B\u9700\u8981\u9501\u4F46\u662F\u6CA1\u6709\u83B7\u5F97\uFF0C\u4E8E\u662F\u8FDB\u5165BLOCKED\u72B6\u6001

                                                                        \u7EBF\u7A0B\u9700\u8981\u8D44\u6E90\u4F46\u662F\u6CA1\u6709\u83B7\u5F97\uFF0C\u8FDB\u5165WAITING\u72B6\u6001\u3002

                                                                      3. Synchronized\u548CLock\u9ED8\u8BA4\u90FD\u662F\u975E\u516C\u5E73\u7684\uFF0C\u4E0D\u8FC7ReentrantLock\u53EF\u4EE5\u8BBE\u7F6E\u516C\u5E73\u9501\u3002

                                                                      4. Synchronized

                                                                        • monitor\uFF0CJVM\u5C42\u9762\u7684\u91CD\u91CF\u7EA7\u9501
                                                                        • \u8F7B\u91CF\u7EA7\u9501
                                                                        • \u504F\u5411\u9501
                                                                      5. \u4E92\u65A5\u662F\u6307\u5171\u4EAB\u8D44\u6E90\u7684\u4E92\u65A5\u6548\u679C

                                                                        \u540C\u6B65\u662F\u6307\u4F7F\u7528\u6761\u4EF6\u53D8\u91CFwaitSet\u6765\u8FBE\u5230\u7EBF\u7A0B\u95F4\u7684\u901A\u4FE1\u6548\u679C\u3002

                                                                      \u5E76\u53D1\u4E4B\u5171\u4EAB\u6A21\u578B

                                                                      1. JMM---Java\u5185\u5B58\u6A21\u578B

                                                                        • \u539F\u5B50\u6027--\u4FDD\u8BC1\u6307\u4EE4\u4E0D\u4F1A\u6536\u5230\u7EBF\u7A0B\u4E0A\u4E0B\u6587\u7684\u5207\u6362
                                                                        • \u53EF\u89C1\u6027--- \u4FDD\u8BC1\u6307\u4EE4\u4E0D\u4F1A\u53D7CPU\u7F13\u5B58\u7684\u5F71\u54CD
                                                                        • \u6709\u5E8F\u6027---\u4FDD\u8BC1\u6307\u4EE4\u4E0D\u4F1A\u53D7CPU\u6307\u4EE4\u5E76\u884C\u4F18\u5316\u7684\u5F71\u54CD
                                                                      2. JMM\u5B9A\u4E49\u4E86

                                                                        • \u4E3B\u5B58---\u6210\u5458\u53D8\u91CF\u7B49\uFF0C\u5171\u4EAB\u6570\u636E
                                                                        • \u5DE5\u4F5C\u5185\u5B58----\u7EBF\u7A0B\u7684\u79C1\u6709\u6570\u636E\uFF0C\u6BD4\u5982\u5C40\u90E8\u53D8\u91CF\u7B49
                                                                      3. \u52A0\u4E86volatile\u7684\u610F\u601D\u5C31\u662F\u8BF4\u5C31\u4E0D\u80FD\u4ECE\u7F13\u5B58\u5373\u7EBF\u7A0B\u7684\u5DE5\u4F5C\u5185\u5B58\u4E2D\u8BFB\u53D6\u4E86\uFF0C\u6BCF\u6B21\u90FD\u5FC5\u987B\u4ECE\u4E3B\u5B58\u4E2D\u8BFB\u53D6\u53D8\u91CF\u7684\u6700\u65B0\u503C\u3002

                                                                      4. volatile\u53EF\u4EE5\u7528\u6765\u4FEE\u9970\u6210\u5458\u53D8\u91CF\u548C\u9759\u6001\u6210\u5458\u53D8\u91CF

                                                                        \u4E0D\u80FD\u4FEE\u9970\u5C40\u90E8\u53D8\u91CF\uFF0C\u56E0\u4E3A\u5C40\u90E8\u53D8\u91CF\u662F\u7EBF\u7A0B\u79C1\u6709\u7684\uFF0C\u4E0D\u5141\u8BB8\u5171\u4EAB\u3002

                                                                        \u5B83\u53EF\u4EE5\u907F\u514D\u7EBF\u7A0B\u4ECE\u81EA\u5DF1\u7684\u5DE5\u4F5C\u7F13\u5B58\u4E2D\u67E5\u627E\u53D8\u91CF\u7684\u503C\uFF0C\u5FC5\u987B\u5230\u4E3B\u5B58\u83B7\u53D6\u5B83\u7684\u503C

                                                                        \u7EBF\u7A0B\u64CD\u4F5Cvolatile\u53D8\u91CF\u90FD\u662F\u76F4\u63A5\u64CD\u4F5C\u4E3B\u5B58

                                                                      5. \u53EF\u89C1\u6027\u5C31\u662F\u8BF4\u5F53\u70ED\u70B9\u4EE3\u7801\u7684\u53D8\u91CF\u88AB\u7F13\u5B58\u5230\u7EBF\u7A0B\u7684\u5DE5\u4F5C\u5185\u5B58\u4E2D\uFF0C\u800C\u8981\u5BF9\u67D0\u4E2A\u53D8\u91CF\u8FDB\u884C\u4FEE\u6539\uFF0C\u662F\u5728\u4E3B\u5B58\u4E2D\u8FDB\u884C\u4FEE\u6539\u3002

                                                                        \u90A3\u4E48\u7EBF\u7A0B\u80FD\u4E0D\u80FD\u83B7\u53D6\u5230\u8FD9\u4E2A\u4E3B\u5B58\u4E2D\u7684\u4FEE\u6539\u7684\u53D8\u91CF\uFF0C\u8FD8\u662F\u7EE7\u7EED\u5728\u81EA\u5DF1\u7684\u5DE5\u4F5C\u7F13\u5B58\u4E2D\u627E\u8FD9\u4E2A\u53D8\u91CF\u3002

                                                                        \u5C31\u662F\u8FD9\u4E2A\u4FEE\u6539\u7684\u53D8\u91CF\u5BF9\u4E8E\u7EBF\u7A0B\u662F\u5426\u53EF\u89C1\u3002

                                                                      6. synchronized\u4E5F\u80FD\u4FDD\u8BC1\u53D8\u91CF\u7684\u53EF\u89C1\u6027\uFF0C\u4F46\u662F\u8981\u521B\u5EFAmonitor\u9501\uFF0C\u4E5F\u5C31\u662F\u540C\u6B65\u76D1\u89C6\u5668\u9501\uFF0C\u662F\u6BD4\u8F83\u91CD\u91CF\u7EA7\u7684\u64CD\u4F5C

                                                                        \u4F46\u662Fvolatile\u662F\u6BD4\u8F83\u8F7B\u91CF\u7EA7\u7684

                                                                        \u5982\u679C\u53EA\u662F\u8981\u4FDD\u8BC1\u53EF\u89C1\u6027\uFF0C\u90A3\u4E48\u63A8\u8350volatile

                                                                      7. \u4E00\u4E2A\u53D8\u91CF\u52A0\u4E86volatile\u4FEE\u9970\uFF0C\u4FDD\u8BC1\u7684\u662F\u4E00\u4E2A\u7EBF\u7A0B\u5BF9volatile\u53D8\u91CF\u7684\u4FEE\u6539\uFF0C\u5BF9\u53E6\u4E00\u4E2A\u7EBF\u7A0B\u53EF\u89C1\uFF0C\u4E0D\u80FD\u4FDD\u8BC1\u539F\u5B50\u6027\u3002\u4EC5\u7528\u5728\u4E00\u4E2A\u7EBF\u7A0B\u662F\u4FEE\u6539\u53D8\u91CF\uFF0C\u53E6\u5916\u7684\u7EBF\u7A0B\u53EA\u662F\u8BFB\u53D6\u53D8\u91CF

                                                                      8. volatile\u53EA\u662F\u4FDD\u8BC1\u7EBF\u7A0B\u80FD\u770B\u5230\u53D8\u91CF\u7684\u6700\u65B0\u503C\uFF0C\u5E76\u4E0D\u80FD\u89E3\u51B3\u6307\u4EE4\u4EA4\u9519\uFF0C\u5373\u5E76\u4E0D\u80FD\u4FDD\u8BC1\u67D0\u6BB5\u4EE3\u7801\u7684\u539F\u5B50\u6027\u3002

                                                                        synchronized\u65E2\u80FD\u4FDD\u8BC1\u4EE3\u7801\u5757\u7684\u539F\u5B50\u6027\u4E5F\u80FD\u4FDD\u8BC1\u4EE3\u7801\u5757\u5185\u53D8\u91CF\u53EF\u89C1\u6027\u3002\u7F3A\u70B9\u5C31\u662F\u5C5E\u4E8E\u91CD\u91CF\u7EA7\u64CD\u4F5C\uFF0C\u6027\u80FD\u66F4\u4F4E

                                                                      9. i++\uFF0Ci--\u8FD9\u79CD\u64CD\u4F5C\uFF0C\u5728\u5B57\u8282\u7801\u6307\u4EE4\u5C42\u9762\uFF0C\u4ED6\u4EEC\u7684\u6307\u4EE4\u4E0D\u662F\u539F\u5B50\u6027\u7684\u3002\u53EF\u80FD\u4EA7\u751F\u6307\u4EE4\u4EA4\u9519\u3002

                                                                      10. \u4E24\u4E2A\u7EBF\u7A0B\u5171\u4EAB\u67D0\u4E2A\u53D8\u91CF\uFF0Cvolatile\u5C31\u662F\u4FDD\u8BC1\u8FD9\u4E24\u4E2A\u7EBF\u7A0B\u5BF9\u8FD9\u4E2A\u53D8\u91CF\u7684\u53EF\u89C1\u6027\uFF0C\u5373\u4FEE\u6539\u4E86\u4E4B\u540E\u7EBF\u7A0B\u4E5F\u80FD\u83B7\u5F97\u8FD9\u4E2A\u53D8\u91CF\u7684\u6700\u65B0\u503C\u3002\u800C\u4E0D\u662F\u83B7\u5F97\u4E4B\u524D\u7EBF\u7A0B\u7684\u5DE5\u4F5C\u5185\u5B58\uFF08\u7F13\u5B58\uFF09\u7684\u53D8\u91CF\u7684\u503C\u3002

                                                                      \u6307\u4EE4\u91CD\u6392\u5E8F\u4F18\u5316

                                                                      1. \u5728\u4E0D\u6539\u53D8\u7A0B\u5E8F\u7ED3\u679C\u7684\u524D\u63D0\u4E0B\uFF0C\u8FD9\u4E9B\u6307\u4EE4\u7684\u5404\u4E2A\u9636\u6BB5\u53EF\u4EE5\u901A\u8FC7\u91CD\u6392\u5E8F\u548C\u7EC4\u5408\u6765\u5B9E\u73B0\u6307\u4EE4\u7EA7\u5C42\u9762\u7684\u5E76\u884C\u3002
                                                                      2. CPU\u5728\u67D0\u4E00\u523B\u6267\u884C\u591A\u6761\u6307\u4EE4\u7684\u4E0D\u540C\u9636\u6BB5\uFF0C\u4E0D\u6539\u53D8\u7A0B\u5E8F\u7ED3\u679C\u3002
                                                                      3. \u5982\u679C\u4E0B\u4E00\u6761\u6307\u4EE4\u4F9D\u8D56\u4E0A\u4E00\u6761\u6307\u4EE4\u7684\u7ED3\u679C\uFF0C\u90A3\u4E48\u8FD9\u79CD\u60C5\u51B5\u5C31\u4E0D\u80FD\u91CD\u6392\u5E8F\u3002

                                                                      volatile\u539F\u7406

                                                                      1. volatile\u7684\u5E95\u5C42\u5B9E\u73B0\u539F\u7406\u662F\u5185\u5B58\u5C4F\u969C

                                                                      2. \u5BF9volatile\u53D8\u91CF\u7684\u5199\u6307\u4EE4\u540E\u4F1A\u52A0\u5165\u5199\u5C4F\u969C

                                                                        \u5BF9volatile\u53D8\u91CF\u7684\u8BFB\u6307\u4EE4\u524D\u4F1A\u52A0\u5165\u8BFB\u5C4F\u969C

                                                                      3. \u5199\u5C4F\u969C\u4FDD\u8BC1\u5728\u8BE5\u5C4F\u969C\u4E4B\u524D\u7684\uFF0C\u5BF9\u5171\u4EAB\u53D8\u91CF\u7684\u6539\u52A8\uFF0C\u90FD\u540C\u6B65\u5230\u4E3B\u5B58\u5F53\u4E2D

                                                                        \u8BFB\u5C4F\u969C\u4FDD\u8BC1\u5728\u8BE5\u5C4F\u969C\u4E4B\u540E\u7684\uFF0C\u5BF9\u5171\u4EAB\u53D8\u91CF\u7684\u8BFB\u53D6\uFF0C\u52A0\u8F7D\u7684\u662F\u4E3B\u5B58\u4E2D\u6700\u65B0\u6570\u636E

                                                                      4. \u5199\u5C4F\u969C\u4E4B\u524D\u7684\u4EE3\u7801\u53EF\u4EE5\u4FDD\u8BC1\u4E0D\u4F1A\u53D1\u751F\u6307\u4EE4\u91CD\u6392\uFF0C\u5C31\u662F\u5199\u5C4F\u969C\u4E4B\u524D\u7684\u4EE3\u7801\u4E0D\u4F1A\u51FA\u73B0\u5728\u5199\u5C4F\u969C\u540E\u3002

                                                                        \u8BFB\u5C4F\u969C\u4F1A\u4FDD\u8BC1\u8BFB\u5C4F\u969C\u4E4B\u540E\u7684\u6307\u4EE4\u4E0D\u4F1A\u56E0\u4E3A\u6307\u4EE4\u91CD\u6392\u5E8F\u51FA\u73B0\u5728\u8BFB\u5C4F\u969C\u524D\u3002

                                                                        \u5199\u5C4F\u969C\u548C\u8BFB\u5C4F\u969C\u90FD\u662F\u5BF9volatile\u4FEE\u9970\u7684\u53D8\u91CF\u8FDB\u884C\u4FEE\u6539\u548C\u8BFB\u53D6\u65F6\u9644\u5E26\u7684\u5C4F\u969C\u3002

                                                                      5. volatile\u4FDD\u8BC1\u4E86\u5171\u4EAB\u53D8\u91CF\u7684\u53EF\u89C1\u6027\u548C\u6709\u5E8F\u6027\uFF0C\u4F46\u662F\u4E0D\u80FD\u89E3\u51B3\u6307\u4EE4\u4EA4\u9519

                                                                        \u6709\u5E8F\u6027\u7684\u4FDD\u8BC1\u53EA\u662F\u4FDD\u8BC1\u4E86\u672C\u7EBF\u7A0B\u5185\u76F8\u5173\u4EE3\u7801\u4E0D\u88AB\u91CD\u6392\u5E8F\uFF0C\u901A\u8FC7\u5199\u5C4F\u969C\u548C\u8BFB\u5C4F\u969C\u3002

                                                                      6. \u997F\u6C49\u5F0F\u5355\u4F8B\u6A21\u5F0F\uFF0C\u7C7B\u52A0\u8F7D\u5C31\u4F1A\u5BFC\u81F4\u8BE5\u5355\u5B9E\u4F8B\u5BF9\u8C61\u88AB\u521B\u5EFA

                                                                        \u61D2\u6C49\u5F0F\uFF0C\u7C7B\u52A0\u8F7D\u4E0D\u4F1A\u5BFC\u81F4\u8BE5\u5355\u4F8B\u5BF9\u8C61\u88AB\u521B\u5EFA\uFF0C\u800C\u662F\u9996\u6B21\u4F7F\u7528\u8BE5\u5BF9\u8C61\u65F6\u624D\u4F1A\u521B\u5EFA\u3002

                                                                      \u5171\u4EAB\u6A21\u578B\u4E4B\u65E0\u9501\uFF08\u975E\u963B\u585E\uFF09

                                                                      1. \u7BA1\u7A0B\u4E5F\u53EBmonitor\u6216\u76D1\u89C6\u5668\u9501

                                                                        \u662F\u60B2\u89C2\u9501

                                                                      2. CAS\u4E0Evolatile\u7ED3\u5408\u5C31\u53EF\u4EE5\u5B9E\u73B0\u65E0\u9501\u5E76\u53D1\u3002

                                                                      3. CAS\u4E0Evolatile\u7ED3\u5408\u7684\u5DE5\u4F5C\u65B9\u5F0F

                                                                        image-20210908142615745

                                                                        compareAndSet\u6BD4\u8F83\u5E76\u8BBE\u7F6E\u503C\uFF0C\u5728CPU\u7684\u6307\u4EE4\u7EA7\u522B\u6216\u8005\u8BF4\u5B57\u8282\u7801\u6307\u4EE4\u7EA7\u522B\u53EF\u4EE5\u5B9E\u73B0\u5176\u539F\u5B50\u6027\u3002

                                                                      4. image-20210908143216090

                                                                        CAS\u53EF\u80FD\u4F1A\u5931\u8D25\uFF0C\u5C31\u662F\u5982\u679Ccas\u7684\u7B2C\u4E00\u4E2A\u53C2\u6570\u7684\u503C\u548C\u8C03\u7528cas\u65B9\u6CD5\u7684\u5BF9\u8C61\u7684\u5C5E\u6027\u7684\u6700\u65B0\u503C\u4E0D\u76F8\u540C\uFF08\u4E0D\u76F8\u540C\u662F\u56E0\u4E3A\uFF0C\u5728\u83B7\u53D6\u5230\u201C\u6700\u65B0\u503C\u201D\u4E4B\u540E\uFF0C\u6267\u884C\u4E4B\u540E\u7684\u903B\u8F91\u65F6\uFF0C\u6709\u5176\u4ED6\u7684\u7EBF\u7A0B\u8FDB\u6765\u64CD\u4F5C\u8FD9\u4E2A\u5171\u4EAB\u53D8\u91CF\uFF0C\u5BFC\u81F4\u4E4B\u524D\u83B7\u53D6\u7684\u6700\u65B0\u503C\u5DF2\u7ECF\u4E0D\u662F\u6700\u65B0\u4E86\uFF09\uFF0C\u5C31\u4F1A\u5931\u8D25\uFF0C\u5931\u8D25\u4E4B\u540E\u4F1A\u7EE7\u7EED\u4E0B\u4E00\u6B21\u5FAA\u73AF\uFF0C\u7EE7\u7EED\u83B7\u5F97\u6700\u65B0\u503C\uFF0C\u518D\u6267\u884C\u4E4B\u540E\u7684\u903B\u8F91\u3002

                                                                      5. cas\u9700\u8981volatile\u7684\u652F\u6301\uFF0Ccas\u5FC5\u987B\u501F\u52A9volatile\u624D\u80FD\u8BFB\u53D6\u5230\u5171\u4EAB\u53D8\u91CF\u7684\u6700\u65B0\u503C\u6765\u5B9E\u73B0\u6BD4\u8F83\u5E76\u4EA4\u6362\u7684\u6548\u679C\u3002

                                                                        volatile\u53EF\u4EE5\u4FDD\u8BC1\u5171\u4EAB\u53D8\u91CF\u7684\u53EF\u89C1\u6027\u548C\u76F8\u5173\u4EE3\u7801\u7684\u6709\u5E8F\u6027\uFF0C\u4F46\u662F\u5B83\u4E0D\u80FD\u89E3\u51B3\u6307\u4EE4\u4EA4\u9519\u7684\u95EE\u9898\uFF0C\u5B83\u4E0D\u80FD\u4FDD\u8BC1\u4EE3\u7801\u5757\u7684\u539F\u5B50\u6027\u3002\u800CCAS\u7684\u64CD\u4F5C\u5728\u5B57\u8282\u7801\u6307\u4EE4\u5C42\u9762\u662F\u539F\u5B50\u7684\uFF0C\u4E0D\u53EF\u88AB\u6253\u65AD\u3002\u6240\u4EE5CAS\u548Cvolatile\u7ED3\u5408\u8D77\u6765\u53EF\u4EE5\u5B9E\u73B0\u65E0\u9501\u5E76\u53D1\u3002

                                                                        synchronized\u5173\u952E\u5B57\u53EF\u4EE5\u4FDD\u8BC1\u4EE3\u7801\u5757\u7684\u539F\u5B50\u6027\u548C\u4EE3\u7801\u5757\u5185\u90E8\u5171\u4EAB\u53D8\u91CF\u7684\u53EF\u89C1\u6027\u3002

                                                                        • \u539F\u5B50\u6027 -- synchronized
                                                                        • \u53EF\u89C1\u6027--synchronized\uFF0Cvolatile
                                                                        • \u6709\u5E8F\u6027---volatile
                                                                      6. cas\u662F\u6BD4\u8F83\u548C\u8BBE\u7F6E\uFF0C\u6D89\u53CA\u5230\u6BD4\u8F83\uFF0C\u6307\u7684\u5C31\u662F\u5373\u4F7F\u5931\u8D25\uFF0C\u4E0B\u4E00\u6B21\u8FDB\u53BB\u5FAA\u73AF\uFF0C\u4ECD\u7136\u80FD\u591F\u83B7\u53D6\u5230\u6700\u65B0\u503C\uFF0C\u7528\u5F53\u524D\u6700\u65B0\u503C\u6765\u8FDB\u884C\u6BD4\u8F83\uFF0C\u5373\u4F7F\u8FD9\u4E2A\u8FC7\u7A0B\u4E2D\uFF0C\u6700\u65B0\u503C\u88AB\u53E6\u4E00\u4E2A\u7EBF\u7A0B\u6240\u4FEE\u6539\u800C\u4E0D\u662F\u6700\u65B0\u503C\uFF0C\u5728\u4E0B\u4E00\u6B21\u5FAA\u73AF\u4ECD\u7136\u80FD\u591F\u62FF\u5230\u6700\u65B0\u503C\u6BD4\u8F83\u3002\u90A3\u4E48\u8981\u4FDD\u8BC1\u6BCF\u6B21\u5FAA\u73AF\u90FD\u80FD\u62FF\u5230\u8FD9\u4E2A\u6700\u65B0\u503C\uFF0C\u5C31\u8981volatile\u7684\u914D\u5408\u3002

                                                                      7. \u65E0\u9501\u60C5\u51B5\u4E0B\uFF0C\u5373\u4F7F\u91CD\u8BD5\u5931\u8D25\uFF0C\u7EBF\u7A0B\u59CB\u7EC8\u5728\u9AD8\u901F\u8FD0\u884C\uFF0C\u6CA1\u6709\u505C\u6B47

                                                                        \u800Csynchronized\u4F1A\u8BA9\u7EBF\u7A0B\u5728\u6CA1\u6709\u83B7\u5F97\u9501\u7684\u65F6\u5019\uFF0C\u53D1\u751F\u4E0A\u4E0B\u6587\u5207\u6362\uFF0C\u8FDB\u5165\u963B\u585E\u3002

                                                                        image-20210908144636043

                                                                        \u65E0\u9501\u72B6\u6001\u4E5F\u53EF\u80FD\u4F1A\u6709\u4E0A\u4E0B\u6587\u5207\u6362\uFF0C\u53EA\u4E0D\u8FC7\u8FD9\u91CC\u4E0D\u662F\u8FDB\u5165\u963B\u585E\u72B6\u6001\uFF0C\u800C\u662F\u56E0\u4E3A\u6CA1\u6709\u5206\u5230\u65F6\u95F4\u7247\u4ECE\u8FD0\u884C\u6001\u8FDB\u5165\u5C31\u7EEA\u72B6\u6001\uFF08\u53EF\u8FD0\u884C\u72B6\u6001\uFF09\uFF0C\u8FD8\u662F\u4F1A\u5BFC\u81F4\u4E0A\u4E0B\u6587\u5207\u6362\u3002

                                                                      8. \u5728\u7EBF\u7A0B\u6570\u5C0F\u4E8ECPU\u6838\u5FC3\u6570\u7684\u65F6\u5019\uFF0C\u7528CAS\u662F\u975E\u5E38\u5408\u9002\u7684\u3002

                                                                      9. CAS\u662F\u57FA\u4E8E\u4E50\u89C2\u9501\u7684\u601D\u60F3\uFF0C\u4E0D\u6015\u522B\u7684\u7EBF\u7A0B\u6765\u4FEE\u6539\u5171\u4EAB\u53D8\u91CF\uFF0C\u800Csynchronized\u662F\u62FF\u5230\u9501\uFF0C\u7981\u6B62\u5176\u4ED6\u7EBF\u7A0B\u6765\u4FEE\u6539\u5171\u4EAB\u53D8\u91CF\uFF0C\u800CCAS+volatile\u662F\u4E0D\u6015\u522B\u7684\u7EBF\u7A0B\u4FEE\u6539\u5171\u4EAB\u53D8\u91CF\uFF0C\u5927\u4E0D\u4E86\u81EA\u5DF1\u518D\u91CD\u8BD5\u51E0\u6B21\uFF0C\u7ED3\u5408volatile\u6BCF\u6B21\u90FD\u53EF\u4EE5\u4ECE\u4E3B\u5B58\u62FF\u5230\u6700\u65B0\u4FEE\u6539\u7684\u503C\uFF0C\u6765\u91CD\u8BD5\u3002

                                                                        \u4E50\u89C2\u9501\u867D\u7136\u6709\u4E00\u4E2A\u201C\u9501\u201D\u5B57\uFF0C\u4F46\u662F\u5176\u5B9E\u6CA1\u6709\u4E0A\u9501

                                                                      10. synchronized\u662F\u57FA\u4E8E\u60B2\u89C2\u9501\u7684\u601D\u60F3\uFF0C\u7981\u6B62\u5176\u4ED6\u7EBF\u7A0B\u6765\u4FEE\u6539\u5171\u4EAB\u53D8\u91CF\uFF0C\u62FF\u5230\u9501\u7684\u7EBF\u7A0B\u89E3\u5F00\u9501\uFF0C\u522B\u7684\u7EBF\u7A0B\u624D\u53EF\u4EE5\u8FDB\u6765\u3002

                                                                      11. CAS\u4FDD\u8BC1\u4E86\u539F\u5B50\u6027\uFF0Cvolatile\u4FDD\u8BC1\u4E86\u5171\u4EAB\u53D8\u91CF\u7684\u53EF\u89C1\u6027\uFF0C\u90A3\u4E48\u901A\u8FC7\u4E0D\u65AD\u91CD\u8BD5\u603B\u80FD\u62FF\u5230\u6B63\u786E\u7684\u6700\u65B0\u503C\uFF0C\u4E0D\u6015\u522B\u7684\u7EBF\u7A0B\u5BF9\u5171\u4EAB\u53D8\u91CF\u8FDB\u884C\u4FEE\u6539\uFF0C\u6240\u4EE5\u8BF4\u8FD9\u662F\u4E50\u89C2\u9501\u3002

                                                                      12. CAS\u4F53\u73B0\u7684\u662F\u65E0\u9501\u5E76\u53D1\u3001\u65E0\u963B\u585E\u5E76\u53D1\u3002\uFF08\u5F53\u7EBF\u7A0B\u6570\u5927\u4E8ECPU\u6838\u5FC3\u6570\u7684\u65F6\u5019\uFF0C\u8FD8\u662F\u53EF\u80FD\u51FA\u73B0\u7EBF\u7A0B\u7684\u4E0A\u4E0B\u6587\u5207\u6362\uFF0C\u4F46\u662F\u4E0D\u4F1A\u6709\u963B\u585E\uFF0C\u8FD9\u91CC\u7684\u4E0A\u4E0B\u6587\u5207\u6362\u662F\u7EBF\u7A0B\u7531\u8FD0\u884C\u72B6\u6001\u5230\u53EF\u8FD0\u884C\u72B6\u6001\u5F15\u8D77\u7684\u3002\uFF09

                                                                        • \u6CA1\u6709\u4F7F\u7528synchronized\uFF0C\u7EBF\u7A0B\u4E0D\u4F1A\u9677\u5165\u963B\u585E\uFF0C\u8FD9\u662F\u6548\u7387\u63D0\u5347\u7684\u56E0\u7D20\u4E4B\u4E00

                                                                        • \u4F46\u662F\u5982\u679C\u7ADE\u4E89\u6FC0\u70C8\uFF0C\u91CD\u8BD5\u5FC5\u7136\u9891\u7E41\u53D1\u751F\uFF0C\u53CD\u800C\u6548\u7387\u4F1A\u53D7\u5F71\u54CD\u3002

                                                                      13. value.compareAndSet(int expect, int update)

                                                                        \u4F1A\u628A\u7B2C\u4E00\u4E2A\u53C2\u6570\u671F\u671B\u503C\u548Cvalue\u7684\u6700\u65B0\u503C\u505A\u5BF9\u6BD4\uFF0C\u5982\u679C\u4E00\u81F4\uFF0C\u90A3\u4E48\u53EF\u4EE5\u7528\u540E\u9762\u7684update\uFF0C\u66F4\u65B0value\uFF0C\u5982\u679C\u66F4\u65B0\u5931\u8D25\u5219\u8FD4\u56DEfalse

                                                                      14. ++i,i++\u8FD9\u79CD\u64CD\u4F5C\u5728\u5B57\u8282\u7801\u5C42\u9762\u4E0D\u662F\u539F\u5B50\u6027\u7684\uFF0C\u6240\u4EE5\u53EF\u80FD\u4F1A\u51FA\u73B0\u7EBF\u7A0B\u5B89\u5168\u95EE\u9898\uFF0C\u5728\u5B57\u8282\u7801\u5C42\u9762\uFF0C\u4F1A\u51FA\u73B0\u6307\u4EE4\u4EA4\u9519\uFF0C\u6BD4\u5982\u591A\u4E2A\u7EBF\u7A0B\u5BF9i\u8FD9\u4E2A\u5171\u4EAB\u53D8\u91CF\uFF0C\u8FDB\u884C\u8FD9\u7C7B\u64CD\u4F5C\u3002

                                                                      15. \u539F\u5B50\u6574\u578BAtomicInteger\u91CC\u4F1A\u7EF4\u62A4\u4E00\u4E2Avalue\u503C\uFF0C\u8FD9\u4E2Avalue\u503C\uFF0C\u5C31\u662F\u4F1A\u7528CAS\u6765\u4FDD\u8BC1\u5B83\u7684\u7EBF\u7A0B\u5B89\u5168\uFF0CCAS\u4FDD\u8BC1\u6307\u4EE4\u7684\u539F\u5B50\u6027\uFF0C\u4F46\u662F\u8FD9\u4E2Avalue\u503C\u662F\u7528\u4E86volatile\u6765\u4FEE\u9970\u4FDD\u8BC1\u4E86\u5B83\u7684\u53EF\u89C1\u6027\uFF0C\u5C31\u662F\u5B83\u6BCF\u4E00\u6B21\u4FEE\u6539\u4E4B\u540E\uFF0C\u90FD\u4FDD\u8BC1\u80FD\u5728\u4E3B\u5B58\u62FF\u5230\u6700\u65B0\u503C\u6765\u8FDB\u884C\u6BD4\u8F83\u548C\u8BBE\u7F6E\u3002

                                                                        image-20210908152216836

                                                                      16. CAS\u5E94\u7528\u5728\u7EBF\u7A0B\u6570\u6BD4\u8F83\u5C11\u7684\u65F6\u5019\uFF0C\u6700\u597D\u662F\u4E0D\u8981\u8D85\u8FC7CPU\u6838\u5FC3\u6570\u3002

                                                                      17. AtomixStampedReference\u53EF\u4EE5\u7ED9\u539F\u5B50\u5F15\u7528\u52A0\u4E0A\u7248\u672C\u53F7\uFF0C\u8FFD\u8E2A\u539F\u5B50\u5F15\u7528\u6574\u4E2A\u7684\u53D8\u5316\u8FC7\u7A0B\uFF0C\u53EF\u4EE5\u77E5\u9053\u5F15\u7528\u53D8\u91CF\u4E2D\u9014\u88AB\u66F4\u6539\u4E86\u51E0\u6B21

                                                                        \u5982\u679C\u53EA\u662F\u5355\u7EAF\u5173\u5FC3\u539F\u5B50\u5F15\u7528\u53D8\u91CF\u662F\u5426\u66F4\u6539\u8FC7\uFF0C\u5C31\u7528AtomicMarkableReference

                                                                      \u539F\u5B50\u7D2F\u52A0\u5668

                                                                      1. \u539F\u5B50\u7D2F\u52A0\u5668 LongAdder\u6027\u80FD\u63D0\u5347\u7684\u539F\u56E0\uFF1A

                                                                        \u5728\u6709\u7ADE\u4E89\u65F6\uFF0C\u8BBE\u7F6E\u591A\u4E2A\u7D2F\u52A0\u5355\u5143\uFF0C\u6700\u540E\u5C06\u7ED3\u679C\u6C47\u603B\uFF0C\u8FD9\u6837\u4ED6\u4EEC\u5728\u7D2F\u52A0\u65F6\u64CD\u4F5C\u7684\u4E0D\u540C\u7684cell\u53D8\u91CF\uFF0C\u56E0\u6B64\u51CF\u5C11\u4E86CAS\u91CD\u8BD5\u5931\u8D25\u3002\u4ECE\u800C\u63D0\u9AD8\u4E86\u6027\u80FD\u3002

                                                                      final\u539F\u7406

                                                                      1. final\u53D8\u91CF\u7684\u8D4B\u503C\u4E5F\u4F1A\u901A\u8FC7putfield\u6307\u4EE4\u6765\u5B8C\u6210\uFF0C\u540C\u6837\u5728\u8FD9\u6761\u6307\u4EE4\u540E\u4E5F\u4F1A\u52A0\u5165\u5199\u5C4F\u969C

                                                                        \u5199\u5C4F\u969C\u5C31\u662F\u4E4B\u524D\u7684\u6307\u4EE4\u4E0D\u4F1A\u5728\u5199\u5C4F\u969C\u4E4B\u540E\u6267\u884C\uFF0C\u5199\u5C4F\u969C\u4E4B\u524D\u5BF9\u53D8\u91CF\u7684\u4FEE\u6539\u4F1A\u540C\u6B65\u5230\u4E3B\u5B58\u4E2D

                                                                        \u52A0\u5165\u4E86\u5199\u5C4F\u969C\uFF0C\u4FDD\u8BC1\u5728\u5176\u4ED6\u7EBF\u7A0B\u8BFB\u5230\u5B83\u7684\u503C\u65F6\u4E0D\u4F1A\u51FA\u73B0\u4E3A0\u7684\u60C5\u51B5

                                                                      2. \u5982\u679C\u4E00\u4E2A\u6210\u5458\u53D8\u91CF\u4E0D\u52A0final\u4FEE\u9970\uFF0C\u90A3\u4E48\u76F8\u5F53\u4E8E\u662F\u7ED9\u4E00\u4E2A\u53D8\u91CF\u8D4B\u503C\u3002\u8FD9\u4E2A\u53D8\u91CF\u5148\u8981\u9ED8\u8BA4\u8D4B\u521D\u59CB\u503C0\uFF0C\u7136\u540E\u624D\u4F1A\u663E\u5F0F\u8D4B\u503C\u3002\u5176\u4ED6\u7EBF\u7A0B\u6709\u53EF\u80FD\u4F1A\u770B\u5230\u8FD9\u4E2A0\u4ECE\u800C\u5BFC\u81F4\u7EBF\u7A0B\u5B89\u5168\u95EE\u9898\u3002

                                                                        \u5728\u7C7B\u52A0\u8F7D\u8FC7\u7A0B\u4E2D\u7684\u94FE\u63A5\u9636\u6BB5\u7684\u51C6\u5907\u9636\u6BB5\uFF0C\u4F1A\u7ED9\u6210\u5458\u53D8\u91CF\u4E2D\u7684\u9759\u6001\u5C5E\u6027\u9ED8\u8BA4\u8D4B\u521D\u59CB\u503C\uFF0C\u7136\u540E\u5728\u521D\u59CB\u5316\u9636\u6BB5\u7ED9\u5176\u663E\u5F0F\u8D4B\u503C\u3002\u8FD9\u4E2A\u51C6\u5907\u9636\u6BB5\uFF0C\u4E0D\u4F1A\u7ED9\u6210\u5458\u53D8\u91CF\u4E2D\u7684\u975E\u9759\u6001\u5C5E\u6027\u8D4B\u503C\uFF0C\u56E0\u4E3A\u975E\u9759\u6001\u5C5E\u6027\u662F\u5C5E\u4E8E\u5BF9\u8C61\u7684\u53D8\u91CF\uFF0C\u9700\u8981\u968F\u7740\u5BF9\u8C61\u7684\u521B\u5EFA\u800C\u88AB\u5206\u914D\u5728\u5806\u7A7A\u95F4\u4E2D\uFF0C\u4E5F\u4E0D\u4F1A\u7ED9final\u4FEE\u9970\u7684\u9759\u6001\u5C5E\u6027\u8D4B\u503C\uFF0C\u56E0\u4E3Afinal\u4FEE\u9970\u7684\u9759\u6001\u5C5E\u6027\u65E9\u5728\u7F16\u8BD1\u9636\u6BB5\u5C31\u4F1A\u8FDB\u884C\u8D4B\u503C\u4E86\u3002

                                                                        \u7C7B\u52A0\u8F7D\u8FC7\u7A0B\u4E2D\u7684\u521D\u59CB\u5316\u9636\u6BB5\uFF0C<clinit>\uFF0C\u7ED9\u9759\u6001\u5C5E\u6027\u663E\u5F0F\u8D4B\u521D\u59CB\u503C\uFF0C\u6267\u884C\u9759\u6001\u4EE3\u7801\u5757\u5185\u7684\u5185\u5BB9\u3002

                                                                      \u81EA\u5B9A\u4E49\u7EBF\u7A0B\u6C60

                                                                      1. \u6211\u4EEC\u5E94\u8BE5\u5145\u5206\u5229\u7528\u5DF2\u6709\u7EBF\u7A0B\u7684\u6F5C\u529B\uFF0C\u4E0D\u5E94\u8BE5\u6BCF\u6B21\u4E00\u6709\u4EFB\u52A1\u90FD\u65B0\u5EFA\u65B0\u7684\u7EBF\u7A0B\uFF0C\u4E0D\u7136\u7EBF\u7A0B\u5F88\u591A\uFF0C\u4F1A\u9891\u7E41\u5730\u51FA\u73B0\u4E0A\u4E0B\u6587\u5207\u6362\uFF0C\u751A\u81F3\u662F\u6B7B\u9501\uFF0C\u8FD8\u6709\u7CFB\u7EDF\u8D44\u6E90\u9650\u5236\u7684\u95EE\u9898\uFF0C\u90FD\u8BF4\u660E\u4E86\u7EBF\u7A0B\u4E0D\u662F\u8D8A\u591A\u8D8A\u597D\uFF0C\u6240\u4EE5\u8981\u5145\u5206\u5229\u7528\u5DF2\u6709\u7EBF\u7A0B\u3002

                                                                      2. \u6BCF\u521B\u5EFA\u4E00\u4E2A\u7EBF\u7A0B\u90FD\u8981\u5360\u7528\u4E00\u5B9A\u5185\u5B58\uFF0C\u8981\u5206\u914D\u865A\u62DF\u673A\u6808\u7B49\u7EBF\u7A0B\u79C1\u6709\u7A7A\u95F4

                                                                        \u5982\u679C\u521B\u5EFA\u5F88\u591A\u7EBF\u7A0B

                                                                        • \u5BF9\u5185\u5B58\u7684\u5360\u7528\u5927\uFF0C\u4E5F\u5C31\u662F\u7CFB\u7EDF\u8D44\u6E90\u9650\u5236\u95EE\u9898
                                                                        • \u4E0A\u4E0B\u6587\u5207\u6362\u5BFC\u81F4\u6548\u7387\u4E0D\u9AD8
                                                                        • \u6B7B\u9501
                                                                      3. \u7EBF\u7A0B\u4E00\u5B9A\u4E0D\u662F\u521B\u5EFA\u5F97\u8D8A\u591A\u8D8A\u597D\u3002

                                                                      4. \u7EBF\u7A0B\u6C60\u5C31\u662F\u521B\u5EFA\u4E00\u4E9B\u7EBF\u7A0B\uFF0C\u8BA9\u7EBF\u7A0B\u80FD\u591F\u5F97\u5230\u91CD\u590D\u7684\u5229\u7528\uFF0C\u7EBF\u7A0B\u7528\u5B8C\u4E86\uFF0C\u4E0D\u9500\u6BC1\uFF0C\u653E\u8FDB\u7EBF\u7A0B\u6C60\u3002

                                                                      5. \u7EBF\u7A0B\u6C60

                                                                        • jdk\u63D0\u4F9B\u7684\u529F\u80FD\u5B8C\u5907\u7684\u7EBF\u7A0B\u6C60
                                                                        • \u81EA\u5B9A\u4E49\u7EBF\u7A0B\u6C60
                                                                      6. \u81EA\u5B9A\u4E49\u7EBF\u7A0B\u6C60\u5206\u6210\u4EE5\u4E0B\u7EC4\u4EF6

                                                                        • \u7EBF\u7A0B\u6C60\uFF0C\u91CC\u9762\u6709\u53EF\u91CD\u7528\u7684\u7EBF\u7A0B
                                                                        • \u963B\u585E\u961F\u5217\uFF0C\u5E73\u8861\u751F\u4EA7\u8005\u7EBF\u7A0B\u3001\u6D88\u8D39\u8005\u7EBF\u7A0B\u901F\u5EA6\u5DEE\u5F02\u7684\u7EC4\u4EF6
                                                                        • \u7EBF\u7A0B\u7684\u751F\u4EA7\u8005

                                                                        image-20210908183204652

                                                                      jdk\u5B9A\u4E49\u7684\u7EBF\u7A0B\u6C60

                                                                      \u7EBF\u7A0B\u6C60\u72B6\u6001

                                                                      1. image-20210908205551426

                                                                        ExecutorService\u662F\u7EBF\u7A0B\u6C60\u7684\u6700\u57FA\u672C\u7684\u63A5\u53E3\uFF0C\u63D0\u4F9B\u4E86\u63D0\u4EA4\u4EFB\u52A1\uFF0C\u5173\u95ED\u7EBF\u7A0B\u6C60\u7B49\u65B9\u6CD5\u3002

                                                                        ScheduledExecutorService\u65B0\u589E\u4E86\u8C03\u5EA6\u4EFB\u52A1\u7684\u529F\u80FD\uFF0C\u7528\u4E8E\u5B9A\u65F6\u6267\u884C\u4EFB\u52A1

                                                                        ThreadPoolExecutor\u662F\u6700\u57FA\u7840\u7684\u5B9E\u73B0

                                                                        ScheduledThreadPoolExecutor\u662F\u5E26\u6709\u4EFB\u52A1\u8C03\u5EA6\u529F\u80FD\u7684\u7EBF\u7A0B\u6C60\u5B9E\u73B0

                                                                      2. \u8BA9\u6709\u9650\u7684\u5DE5\u4F5C\u7EBF\u7A0B\uFF08Worker Thread\uFF09\u6765\u8F6E\u6D41\u5730\u5F02\u6B65\u5730\u5904\u7406\u65E0\u9650\u591A\u7684\u4EFB\u52A1\uFF0C\u7EBF\u7A0B\u6C60\u505A\u7684\u5C31\u662F\u8FD9\u4E2A\u4E8B\u60C5\u3002

                                                                      3. \u7EBF\u7A0B\u6C60\u72B6\u6001

                                                                        ThreadPoolExecutor\u4F7F\u7528int\u7684\u9AD83\u4F4D\u6765\u8868\u793A\u7EBF\u7A0B\u6C60\u72B6\u6001\uFF0C\u4F4E29\u4F4D\u8868\u793A\u7EBF\u7A0B\u6570\u91CF

                                                                        image-20210908205814692

                                                                        \u7EBF\u7A0B\u6C60\u72B6\u6001\u548C\u7EBF\u7A0B\u6570\u91CF\u5B58\u50A8\u5728\u4E00\u4E2A\u539F\u5B50\u53D8\u91CFctl\u4E2D\uFF0C\u76EE\u7684\u662F\u5C06\u7EBF\u7A0B\u6C60\u72B6\u6001\u4E0E\u7EBF\u7A0B\u4E2A\u6570\u5408\u4E8C\u4E3A\u4E00\uFF0C\u8FD9\u6837\u5C31\u53EF\u4EE5\u7528\u4E00\u6B21cas\u539F\u5B50\u64CD\u4F5C\u8FDB\u884C\u8D4B\u503C\u3002

                                                                      \u6784\u9020\u65B9\u6CD5

                                                                      1. \u7EBF\u7A0B\u6C60\u7684\u6784\u9020\u65B9\u6CD5

                                                                        image-20210908210307737

                                                                        \u963B\u585E\u961F\u5217\u6307\u7684\u662F\u4EFB\u52A1\u963B\u585E\u961F\u5217\u3002\u8981\u6E05\u695A\u4EFB\u52A1\u662F\u4EC0\u4E48\uFF0C\u770B\u6CDB\u578B\u5F88\u6E05\u695A\uFF0C\u91CC\u9762\u5199\u7684Runnable\uFF0CRunnable\u6216Callable\u63A5\u53E3\u7684\u5B9E\u73B0\u7C7B\u7684\u5BF9\u8C61\u5C31\u662F\u4EFB\u52A1\u5BF9\u8C61

                                                                      \u6838\u5FC3\u7EBF\u7A0B\u548C\u6551\u6025\u7EBF\u7A0B

                                                                      1. \u7EBF\u7A0B\u6C60\u4E2D\u7684\u7EBF\u7A0B\u5206\u4E3A\u4E24\u79CD

                                                                        • \u6838\u5FC3\u7EBF\u7A0B
                                                                        • \u6551\u6025\u7EBF\u7A0B

                                                                        \u6838\u5FC3\u7EBF\u7A0B\u6570 + \u6551\u6025\u7EBF\u7A0B\u6570 = \u6700\u5927\u7EBF\u7A0B\u6570

                                                                      2. \u6551\u6025\u7EBF\u7A0B\u7528\u4E8E\u4EFB\u52A1\u91CF\u7279\u522B\u5927\uFF0C\u4EFB\u52A1\u5982\u679C\u6CA1\u6709\u6838\u5FC3\u7EBF\u7A0B\u6765\u6267\u884C\uFF0C\u90A3\u4E48\u4F1A\u8FDB\u5165\u963B\u585E\u961F\u5217\uFF0C\u5F53\u963B\u585E\u961F\u5217\u90FD\u653E\u4E0D\u4E0B\u4E86\uFF0C\u6765\u7684\u4E0B\u4E00\u4E2A\u4EFB\u52A1\u4F1A\u4EA4\u7ED9\u6551\u6025\u7EBF\u7A0B\u53BB\u6267\u884C\u3002

                                                                        image-20210908211936243

                                                                      3. \u6551\u6025\u7EBF\u7A0B\u548C\u6838\u5FC3\u7EBF\u7A0B\u6700\u5927\u7684\u533A\u522B\u662F\uFF1A

                                                                        \u6551\u6025\u7EBF\u7A0B\u6709\u751F\u5B58\u65F6\u95F4\uFF0C\u4EFB\u52A1\u6267\u884C\u5B8C\u4E86\uFF0C\u6551\u6025\u7EBF\u7A0B\u4F1A\u9500\u6BC1\uFF0C\u4E0B\u4E00\u6B21\u9AD8\u5CF0\u671F\u6765\u4E86\uFF0C\u624D\u4F1A\u518D\u521B\u5EFA

                                                                        \u6838\u5FC3\u7EBF\u7A0B\u6CA1\u6709\u751F\u5B58\u65F6\u95F4\uFF0C\u6267\u884C\u5B8C\u4EFB\u52A1\uFF0C\u4ECD\u7136\u4F1A\u4FDD\u7559\u5728\u7EBF\u7A0B\u6C60\u4E2D\u3002

                                                                        • \u7EBF\u7A0B\u6C60\u4E2D\u521A\u5F00\u59CB\u6CA1\u6709\u7EBF\u7A0B\uFF0C\u5F53\u4E00\u4E2A\u4EFB\u52A1\u63D0\u4EA4\u7ED9\u7EBF\u7A0B\u6C60\u540E\uFF0C\u7EBF\u7A0B\u6C60\u4F1A\u521B\u5EFA\u4E00\u4E2A\u65B0\u7EBF\u7A0B\u6765\u6267\u884C\u4EFB\u52A1
                                                                        • \u5F53\u7EBF\u7A0B\u6570\u8FBE\u5230corePoolSize\u540E\uFF0C\u5E76\u6CA1\u6709\u7EBF\u7A0B\u7A7A\u95F2\uFF0C\u8FD9\u65F6\u518D\u52A0\u5165\u4EFB\u52A1\uFF0C\u65B0\u52A0\u7684\u4EFB\u52A1\u4F1A\u88AB\u52A0\u5165workQueue\u961F\u5217\u6392\u961F\uFF0C\u76F4\u5230\u6709\u7A7A\u95F2\u7684\u7EBF\u7A0B\u3002
                                                                      4. \u5982\u679C\u7EBF\u7A0B\u6570\u8FBE\u5230maximumPoolSize\uFF0C\u4ECD\u7136\u6709\u65B0\u4EFB\u52A1\u8FD9\u65F6\u4F1A\u6267\u884C\u62D2\u7EDD\u7B56\u7565\uFF0C\u62D2\u7EDD\u7B56\u7565jdk\u63D0\u4F9B\u4E864\u79CD\u5B9E\u73B0\uFF1A

                                                                        image-20210908212728493

                                                                        image-20210908212946761

                                                                      5. jdk\u63D0\u4F9B\u4E86Executors\u5DE5\u5177\u7C7B\uFF0C\u8FD9\u4E2A\u5DE5\u5177\u7C7B\u63D0\u4F9B\u4E86\u5F88\u591A\u5DE5\u5382\u65B9\u6CD5\u6765\u521B\u5EFA\u5404\u79CD\u7528\u9014\u7684\u7EBF\u7A0B\u6C60\uFF0C\u4F46\u662F\u5185\u90E8\u5C31\u662F\u8C03\u7528\u6784\u9020\u65B9\u6CD5\uFF0C\u4F20\u9012\u4E0D\u540C\u53C2\u6570\uFF0C\u521B\u5EFA\u7EBF\u7A0B\u6C60

                                                                      6. \u603B\u7ED3\uFF1A

                                                                        \u7EBF\u7A0B\u6570\u8FBE\u5230corePoolSize\uFF1A

                                                                        • \u65B0\u52A0\u7684\u4EFB\u52A1\u52A0\u5165\u4EFB\u52A1\u963B\u585E\u961F\u5217\u6392\u961F\uFF0C\u76F4\u5230\u6709\u7A7A\u95F2\u7684\u7EBF\u7A0B
                                                                        • \u82E5\u4EFB\u52A1\u963B\u585E\u961F\u5217\u5DF2\u6EE1\uFF08\u5373\u4EFB\u52A1\u963B\u585E\u961F\u5217\u5DF2\u7ECF\u653E\u4E0D\u4E0B\u65B0\u52A0\u7684\u4EFB\u52A1\uFF09\uFF1A
                                                                          • \u6551\u6025\u7EBF\u7A0B\u6765\u6267\u884C\u65B0\u52A0\u7684\u4EFB\u52A1
                                                                          • \u82E5\u6838\u5FC3\u7EBF\u7A0B\u6570 + \u6551\u6025\u7EBF\u7A0B\u6570 \u5373\u6700\u5927\u7EBF\u7A0B\u6570\u5DF2\u7ECF\u8FBE\u5230maximumPoolSize\uFF0C\u5982\u679C\u4ECD\u7136\u6709\u65B0\u4EFB\u52A1\uFF0C\u6267\u884C\u62D2\u7EDD\u7B56\u7565\uFF084\u79CD\uFF09

                                                                      \u51E0\u79CD\u7C7B\u578B\u7684\u7EBF\u7A0B\u6C60

                                                                      1. \u56FA\u5B9A\u5927\u5C0F\u7EBF\u7A0B\u6C60

                                                                        newFixedThreadPool

                                                                        image-20210908213524594

                                                                        \u7279\u70B9\uFF1A

                                                                        • \u6838\u5FC3\u7EBF\u7A0B\u6570 == \u6700\u5927\u7EBF\u7A0B\u6570\uFF08\u6CA1\u6709\u6551\u6025\u7EBF\u7A0B\u88AB\u521B\u5EFA\uFF09\uFF0C\u56E0\u6B64\u4E5F\u65E0\u9700\u8D85\u65F6\u65F6\u95F4

                                                                        • \u963B\u585E\u961F\u5217\u662F\u65E0\u754C\u7684\uFF0C\u53EF\u4EE5\u653E\u4EFB\u610F\u6570\u91CF\u7684\u4EFB\u52A1

                                                                          \u9002\u7528\u4E8E\u4EFB\u52A1\u91CF\u5DF2\u77E5\uFF0C\u76F8\u5BF9\u8017\u65F6\u7684\u4EFB\u52A1

                                                                      2. \u5E26\u7F13\u51B2\u7EBF\u7A0B\u6C60

                                                                        newCachedThreadPool

                                                                        image-20210908214251452

                                                                        \u7279\u70B9\uFF1A

                                                                        • \u6838\u5FC3\u7EBF\u7A0B\u6570\u662F0\uFF0C\u6700\u5927\u7EBF\u7A0B\u6570\u662FInteger.MAX_VALUE\uFF0C\u6551\u6025\u7EBF\u7A0B\u7684\u7A7A\u95F2\u751F\u5B58\u65F6\u95F4\u662F60s
                                                                        • \u5168\u90E8\u90FD\u662F\u6551\u6025\u7EBF\u7A0B\uFF0860s\u540E\u53EF\u4EE5\u56DE\u6536\uFF09
                                                                        • \u6551\u6025\u7EBF\u7A0B\u53EF\u4EE5\u65E0\u9650\u521B\u5EFA

                                                                        \u9002\u7528\u4E8E\u4EFB\u52A1\u5BC6\u96C6\uFF0C\u4F46\u662F\u6BCF\u4E2A\u4EFB\u52A1\u65F6\u95F4\u90FD\u5F88\u77ED\u7684\u60C5\u51B5

                                                                      3. \u5355\u7EBF\u7A0B\u7EBF\u7A0B\u6C60

                                                                        image-20210909140256403

                                                                        \u4F7F\u7528\u573A\u666F\uFF1A

                                                                        \u5E0C\u671B\u591A\u4E2A\u4EFB\u52A1\u6392\u961F\u6267\u884C\uFF0C\u7EBF\u7A0B\u6570\u56FA\u5B9A\u4E3A1\uFF0C\u4EFB\u52A1\u6570\u591A\u4E8E1\u65F6\uFF0C\u4F1A\u653E\u5165\u65E0\u754C\u961F\u5217\u6392\u961F

                                                                        \u4EFB\u52A1\u6267\u884C\u5B8C\u6BD5\uFF0C\u8FD9\u552F\u4E00\u7684\u7EBF\u7A0B\u4E5F\u4E0D\u4F1A\u91CA\u653E\u3002

                                                                        \u53EA\u6709\u4E00\u4E2A\u6838\u5FC3\u7EBF\u7A0B\uFF0C\u6CA1\u6709\u6551\u6025\u7EBF\u7A0B

                                                                        \u533A\u522B\uFF1A

                                                                        \u81EA\u5DF1\u521B\u5EFA\u4E00\u4E2A\u5355\u7EBF\u7A0B\u4E32\u884C\u6267\u884C\u4EFB\u52A1\uFF0C\u5982\u8FC7\u4EFB\u52A1\u6267\u884C\u5931\u8D25\u800C\u7EC8\u6B62\u6CA1\u6709\u4EFB\u4F55\u8865\u6551\u63AA\u65BD\uFF0C\u800C\u7EBF\u7A0B\u6C60\u8FD8\u4F1A\u65B0\u5EFA\u4E00\u4E2A\u7EBF\u7A0B\uFF0C\u4FDD\u8BC1\u7EBF\u7A0B\u6C60\u7684\u6B63\u5E38\u5DE5\u4F5C

                                                                        image-20210909141045584

                                                                        \u5355\u7EBF\u7A0B\u6267\u884C\u5668\u8FD4\u56DE\u7684\u662F\u5305\u88C5\u540E\u7684\u5BF9\u8C61\uFF0C\u6838\u5FC3\u7EBF\u7A0B\u6570\u5927\u5C0F\u4E0D\u80FD\u4FEE\u6539\u3002

                                                                      \u63D0\u4EA4\u4EFB\u52A1

                                                                      1. \u63D0\u4EA4\u4EFB\u52A1

                                                                        image-20210909141325138

                                                                        • submit

                                                                          Future\u7528\u7684\u5C31\u662F\u4FDD\u62A4\u6027\u6682\u505C\u6A21\u5F0F\u6765\u63A5\u6536\u53E6\u4E00\u4E2A\u7EBF\u7A0B\u8FD4\u56DE\u7684\u7ED3\u679C\u3002

                                                                        • invokeAll

                                                                          image-20210909142412154

                                                                          image-20210909142301150

                                                                          \u610F\u601D\u5C31\u662F\u8BF4\uFF0CinvokeAll()\u65B9\u6CD5\u4F20\u5165\u7684\u53C2\u6570\u662F\u4EFB\u52A1tasks\uFF0C\u4EFB\u52A1\u7684\u672C\u8D28\u4E5F\u662F\u5B9E\u73B0Callable\u63A5\u53E3\u7684\u7C7B\u7684\u5BF9\u8C61

                                                                          \u800C\u521B\u5EFA\u7EBF\u7A0B\u6C60\u65F6\u6307\u5B9A\u7684\u6700\u5927\u7EBF\u7A0B\u6570\u5373\u6838\u5FC3\u7EBF\u7A0B\u6570\uFF08\u56E0\u4E3A\u91C7\u7528\u7684\u662F\u56FA\u5B9A\u5927\u5C0F\u7EBF\u7A0B\u6C60\uFF0C\u6240\u4EE5\u6CA1\u6709\u6551\u6025\u7EBF\u7A0B\uFF09\u662F2\uFF0C\u6240\u4EE5\u524D\u4E24\u4E2A\u4EFB\u52A1\uFF0C\u4E5F\u5C31\u662F\u5B9E\u73B0Callable\u63A5\u53E3\u7684\u7C7B\u7684\u5BF9\u8C61\uFF0C\uFF08\u6211\u8BA4\u4E3A\u4EFB\u52A1\u7684\u672C\u8D28\u5C31\u662F\u5B9E\u73B0Runnable\u6216Callable\u63A5\u53E3\u7684\u7C7B\u7684\u5BF9\u8C61\uFF0C\u628A\u8FD9\u4E2A\u5BF9\u8C61\uFF0C\u4F5C\u4E3A\u54EA\u4E2A\u7EBF\u7A0B\u521B\u5EFA\u7684\u6784\u9020\u51FD\u6570\u7684\u53C2\u6570\u4F20\u5165\uFF0C\u5C31\u662F\u4EFB\u52A1\u4EA4\u7ED9\u54EA\u4E2A\u7EBF\u7A0B\u6267\u884C\u3002\uFF09

                                                                          \u524D\u4E24\u4E2A\u4EFB\u52A1\u88AB\u7EBF\u7A0B\u6267\u884C\u4E86\uFF0C\u7B2C\u4E09\u4E2A\u4EFB\u52A1\u8FDB\u5165\u963B\u585E\u961F\u5217\uFF0C\u524D\u4E24\u4E2A\u4EFB\u52A1\u6267\u884C\u5B8C\u540E\uFF0C\u7B2C\u4E8C\u4E2A\u7EBF\u7A0B\u5C06\u7B2C\u4E09\u4E2A\u4EFB\u52A1\u53D6\u51FA\u6267\u884C\u3002

                                                                          \u4EFB\u52A1\u5C31\u662F\u5B9E\u73B0Runnable\u63A5\u53E3\u6216Callable\u63A5\u53E3\u7684\u5B9E\u73B0\u7C7B\u7684\u5BF9\u8C61

                                                                          \u600E\u4E48\u628A\u4EFB\u52A1\u4EA4\u7ED9\u67D0\u4E2A\u7EBF\u7A0B\u6267\u884C\u5462\uFF1F\u6211\u4EEC\u4E4B\u524D\u8BF4\u628A\u4EFB\u52A1\u548C\u7EBF\u7A0B\u5206\u5F00\uFF0C\u5C31\u662F\u91C7\u7528\u7684\u5B9E\u73B0Runnable\u6216Callable\u63A5\u53E3\u7684\u65B9\u5F0F\uFF0C\u90A3\u4E48\u8FD9\u91CC\u540C\u6837\uFF0C\u628A\u4EFB\u52A1\u4EA4\u7ED9\u67D0\u4E2A\u7EBF\u7A0B\u6267\u884C\uFF0C\u5C31\u76F8\u5F53\u4E8E\u628A\u5B9E\u73B0Runnable\u6216Callable\u63A5\u53E3\u7684\u5BF9\u8C61\uFF0C\u4F5C\u4E3A\u521B\u5EFA\u7EBF\u7A0B\u7684\u6784\u9020\u51FD\u6570\u7684\u53C2\u6570\u4F20\u5165

                                                                        • invokeAny\uFF0C \u627E\u5230\u4E00\u4E2A\u6700\u5148\u6267\u884C\u7684\u4EFB\u52A1\uFF0C\u8FD4\u56DE\u7ED3\u679C\u4E4B\u540E\uFF0C\u5176\u4ED6\u4EFB\u52A1\u5C31\u4E0D\u6267\u884C\u4E86\u3002

                                                                          \u8FD4\u56DE\u7ED3\u679C\u7C7B\u578B\u662FObject\uFF0C\u4E5F\u5C31\u662F\u8BF4\u6700\u7EC8\u53EA\u5F97\u5230\u4E00\u4E2A\u4EFB\u52A1\u7684\u7ED3\u679C\u3002

                                                                      2. \u4EFB\u52A1\u5BF9\u8C61\uFF1A\u5B9E\u73B0Runnable\u63A5\u53E3\u6216\u5B9E\u73B0Callable\u63A5\u53E3\u7684\u5BF9\u8C61\u53EB\u505A\u4EFB\u52A1\u5BF9\u8C61\uFF0C\u4EA4\u7ED9\u7EBF\u7A0B\u6267\u884C\uFF0C\u5373\u4F5C\u4E3A\u7EBF\u7A0B\u521B\u5EFA\u7684\u6784\u9020\u51FD\u6570\u7684\u53C2\u6570\u4F20\u5165

                                                                      \u5173\u95ED\u7EBF\u7A0B\u6C60

                                                                      1. shutdown---\u4F7F\u7EBF\u7A0B\u6C60\u72B6\u6001\u4ECERUNNING\u53D8\u4E3ASHUTDOWN

                                                                        \u4E0D\u4F1A\u63A5\u6536\u65B0\u4EFB\u52A1

                                                                        \u4F46\u5DF2\u63D0\u4EA4\u7684\u4EFB\u52A1\u4F1A\u6267\u884C\u5B8C\uFF0C\u4F1A\u628A\u963B\u585E\u961F\u5217\u4E2D\u7B49\u5F85\u4EFB\u52A1\u5BF9\u8C61\u6267\u884C\u5B8C\u6BD5

                                                                        \u6B64\u65B9\u6CD5\u4E0D\u4F1A\u963B\u585E\u8C03\u7528\u7EBF\u7A0B\u7684\u6267\u884C\uFF0C\u6BD4\u5982\u4E3B\u7EBF\u7A0B\u8C03\u7528\u4E86shutdown\uFF0C\u4E3B\u7EBF\u7A0B\u5982\u679C\u8FD8\u6709\u5176\u4ED6\u4EE3\u7801\uFF0C\u4F1A\u7EE7\u7EED\u8FD0\u884C\u3002

                                                                      2. shutdownNow---\u4F7F\u7EBF\u7A0B\u6C60\u72B6\u6001\u4ECERUNNING\u53D8\u4E3ASTOP

                                                                        \u4E0D\u4F1A\u63A5\u6536\u65B0\u4EFB\u52A1

                                                                        \u4F1A\u629B\u5F03\u963B\u585E\u961F\u5217\u4E2D\u7684\u4EFB\u52A1\uFF08\u5176\u5B9E\u4E0D\u51C6\u786E\uFF0C\u963B\u585E\u961F\u5217\u4E2D\u6CA1\u6267\u884C\u7684\u4EFB\u52A1\u4F1A\u4F5C\u4E3A\u7ED3\u679C\u8FD4\u56DE\uFF09

                                                                        \u4F1A\u7528interrupt\u7684\u65B9\u5F0F\u4E2D\u65AD\u6B63\u5728\u6267\u884C\u7684\u4EFB\u52A1

                                                                        \u961F\u5217\u4E2D\u7684\u4EFB\u52A1\u4F1A\u4F5C\u4E3A\u8FD4\u56DE\u7ED3\u679C\uFF0C\u62FF\u5230\u8FD9\u4E2A\u8FD4\u56DE\u7ED3\u679C\u662F\u91CD\u65B0\u6267\u884C\uFF0C\u8FD8\u662F\u629B\u5F03\uFF0C\u7531\u4E1A\u52A1\u6765\u51B3\u5B9A\u3002

                                                                        image-20210909152652554

                                                                        \u8FD9\u91CC\u53C8\u8BC1\u660E\u4E86\uFF0CRunnable\uFF0CCallable\u63A5\u53E3\u5B9E\u73B0\u7C7B\u7684\u5BF9\u8C61\u5C31\u662F\u4EFB\u52A1\u5BF9\u8C61

                                                                      \u4EFB\u52A1\u8C03\u5EA6\u7EBF\u7A0B\u6C60

                                                                      1. \u6709\u7684\u65F6\u5019\u6211\u4EEC\u5E0C\u671B\u4EFB\u52A1\u5EF6\u65F6\u6267\u884C\uFF0C\u6216\u8005\u5E0C\u671B\u4EFB\u52A1\u6BCF\u9694\u51E0\u79D2\u5C31\u6267\u884C\u4E00\u6B21\uFF08\u5B9A\u65F6\uFF09\uFF0C\u8FD9\u79CD\u60C5\u51B5\u6211\u4EEC\u5C31\u8981\u7528\u5230\u4EFB\u52A1\u8C03\u5EA6\u7EBF\u7A0B\u6C60

                                                                        \u4EFB\u52A1\u8C03\u5EA6\u7EBF\u7A0B\u6C60\u662F\u5728jdk1.5\u52A0\u5165\u3002

                                                                      2. \u5728\u4EFB\u52A1\u8C03\u5EA6\u7EBF\u7A0B\u6C60\u52A0\u5165\u4E4B\u524D\uFF0C\u6709\u4E00\u79CDjava.util.Timer\u6765\u5B9E\u73B0\u5B9A\u65F6\u529F\u80FD\uFF0CTimer\u7684\u4F18\u70B9\u662F\u7B80\u5355\u6613\u7528\uFF0C\u4F46\u7531\u4E8E\u6240\u6709\u7684\u5EF6\u65F6\u6216\u5B9A\u65F6\u7684\u4EFB\u52A1\u90FD\u662F\u7531\u540C\u4E00\u4E2A\u7EBF\u7A0B\u6765\u8C03\u5EA6\u6267\u884C\uFF0C\u6240\u4EE5\u6240\u6709\u7684\u4EFB\u52A1\u90FD\u662F\u4E32\u884C\u3002

                                                                      3. Timer\u5DF2\u7ECF\u8FC7\u65F6\u4E86

                                                                        Timer\u7684\u8FD9\u4E2A\u7EBF\u7A0B\u5F88\u8106\u5F31\uFF0C\u524D\u4E00\u4E2A\u4EFB\u52A1\u51FA\u73B0\u4E86\u5F02\u5E38\uFF0C\u540E\u9762\u7684\u4EFB\u52A1\u5C31\u4E0D\u80FD\u6267\u884C\u4E86\u3002

                                                                        \u5E94\u8BE5\u7528\u5E26\u6709\u4EFB\u52A1\u8C03\u5EA6\u529F\u80FD\u7684\u7EBF\u7A0B\u6C60\uFF0C\u53EF\u4EE5\u8BBE\u7F6E\u7EBF\u7A0B\u6C60\u4E2D\u7EBF\u7A0B\u6570\u91CF\uFF0C\u5C31\u4E0D\u662F\u6240\u6709\u7684\u4EFB\u52A1\u90FD\u662F\u4E00\u4E2A\u7EBF\u7A0B\u6765\u6267\u884C\u4E86\u3002\uFF08\u591A\u7EBF\u7A0B\u89E3\u51B3\u4E32\u884C\uFF0C\u5B9E\u73B0\u5E76\u884C\uFF08CPU\u591A\u6838\u7684\u60C5\u51B5\u4E0B\uFF0C\u5355\u6838\u7684\u60C5\u51B5\u4E0B\u5FAE\u89C2\u4E0A\u4ECD\u662F\u4E32\u884C\uFF0C\u4E0A\u4E0B\u6587\u5207\u6362\uFF09\uFF09

                                                                      4. image-20210909163938947

                                                                        Executors\u662F\u5DE5\u5177\u7C7B\uFF0C\u521B\u5EFA\u5404\u79CD\u7EBF\u7A0B\u6C60\uFF0C\u672C\u8D28\u4E0A\u662F\u4FEE\u6539\u6784\u9020\u65B9\u6CD5\u7684\u90A3\u4E03\u79CD\u53C2\u6570

                                                                      5. \u6B63\u786E\u5904\u7406\u5F02\u5E38

                                                                        1. \u7B2C\u4E00\u79CD\u65B9\u5F0F\uFF0C\u81EA\u5DF1\u624B\u52A8\u5728Callable\u5B9E\u73B0\u7C7B\u590D\u5199call()\u65B9\u6CD5\u65F6\uFF0C\u6216\u5728\u5B9E\u73B0Runnable\u7C7B\u590D\u5199run()\u65F6\uFF0C\u7528try-catch\u5904\u7406
                                                                        2. \u7B2C\u4E8C\u79CD\uFF0C\u7528\u5B9E\u73B0Callable\u63A5\u53E3\u7ED3\u5408Future\u7684\u65B9\u5F0F\u66FF\u4EE3\u5B9E\u73B0Runnable\u63A5\u53E3\u7684\u65B9\u5F0F\uFF0C\u56E0\u4E3A\u5B9E\u73B0Callable\u63A5\u53E3\u7ED3\u5408Future\u7684\u65B9\u5F0F\uFF0C\u91CD\u5199call()\u65B9\u6CD5\uFF0Ccall()\u65B9\u6CD5\u6709\u8FD4\u56DE\u503C\uFF0C\u8FD9\u4E2A\u8FD4\u56DE\u503C\uFF0C\u901A\u8FC7Future\u5BF9\u8C61\u7684get()\u65B9\u6CD5\u62FF\u5230\uFF0C\u5982\u679C\u8BF4call()\u5185\u90E8\u6709\u5F02\u5E38\uFF0C\u90A3\u4E48\u5728\u901A\u8FC7Future\u5BF9\u8C61\u7684get()\u65B9\u6CD5\u62FF\u8FD4\u56DE\u7ED3\u679C\u65F6\uFF0C\u4F1A\u5C06\u5F02\u5E38\u4FE1\u606F\u6253\u5370\u51FA\u6765\u3002

                                                                      Fork/Join\u7EBF\u7A0B\u6C60\u5B9E\u73B0

                                                                      1. Fork/Join\u7EBF\u7A0B\u6C60\u662Fjdk1.7\u52A0\u5165\u7684\u65B0\u7684\u7EBF\u7A0B\u6C60\u5B9E\u73B0

                                                                        \u4F53\u73B0\u7684\u5206\u6CBB\u601D\u60F3

                                                                        \u9002\u7528\u4E8E\u80FD\u591F\u8FDB\u884C\u4EFB\u52A1\u62C6\u5206\u7684cpu\u5BC6\u96C6\u578B\u8FD0\u7B97

                                                                      2. \u6240\u8C13\u4EFB\u52A1\u62C6\u5206\uFF0C\u662F\u5C06\u4E00\u4E2A\u5927\u4EFB\u52A1\u62C6\u5206\u4E3A\u7B97\u6CD5\u4E0A\u76F8\u540C\u7684\u5C0F\u4EFB\u52A1

                                                                        \u8FD9\u4E9B\u5C0F\u4EFB\u52A1\u5C31\u53EF\u4EE5\u4EA4\u7ED9\u4E0D\u540C\u7684\u7EBF\u7A0B\u6765\u5B8C\u6210\uFF0C\u63D0\u5347\u8FD0\u884C\u6548\u7387

                                                                      3. Fork\\Join\u9ED8\u8BA4\u4F1A\u521B\u5EFA\u4E0ECPU\u6838\u5FC3\u6570\u5927\u5C0F\u76F8\u540C\u7684\u7EBF\u7A0B\u6C60\u3002\uFF08\u8981\u5145\u5206\u5229\u7528CPU\uFF09

                                                                      4. \u4F7F\u7528Fork\\Join\u7EBF\u7A0B\u6C60

                                                                        • \u521B\u5EFA\u4EFB\u52A1\u5BF9\u8C61\uFF0C\u4E0D\u80FD\u4F7F\u7528Runnable\u6216Callable\u4EFB\u52A1\u5BF9\u8C61
                                                                        • \u4F7F\u7528Fork\\Join\u7EBF\u7A0B\u6C60\u6267\u884C\u4EFB\u52A1\u5BF9\u8C61
                                                                      5. image-20210909175235649

                                                                        \u5982\u679C\u662F\u65E0\u53C2\u7684\uFF0C\u90A3\u4E48\u521B\u5EFA\u7684\u7EBF\u7A0B\u6570\u5C31\u7B49\u4E8ECPU\u6838\u5FC3\u6570

                                                                        \u54EA\u79CD\u7EBF\u7A0B\u6C60\u7528\u4EC0\u4E48\u65B9\u6CD5\u6765\u6267\u884C\u4EFB\u52A1\u8981\u641E\u6E05\u695A\u3002

                                                                        \u6BD4\u5982\u4EFB\u52A1\u8C03\u5EA6\u7EBF\u7A0B\u6C60\u7528\u7684schedule

                                                                        Fork\\Join\u7EBF\u7A0B\u6C60\u7528\u7684invoke

                                                                      6. Future\u662F\u4E00\u4E2A\u63A5\u53E3\uFF0CFutureTask\u662F\u5B9E\u73B0\u4E86RunnableFuture\u63A5\u53E3\u7684\u5B9E\u73B0\u7C7B\uFF0CRunnableFuture\u63A5\u53E3\u7EE7\u627F\u4E8EFuture\u63A5\u53E3\u548CRunnable\u63A5\u53E3

                                                                      \u5F02\u6B65\u6A21\u5F0F\u4E4B\u5DE5\u4F5C\u7EBF\u7A0B

                                                                      \u5B9A\u4E49

                                                                      1. \u8BA9\u6709\u9650\u7684\u8D44\u6E90\u5373\u5DE5\u4F5C\u7EBF\u7A0B\u5904\u7406\u65E0\u9650\u7684\u4EFB\u52A1\uFF0C\u5178\u578B\u5B9E\u73B0\u5C31\u662F\u7EBF\u7A0B\u6C60\u3002\u800C\u4E14\u4F7F\u7528\u7EBF\u7A0B\u6C60\u53EF\u4EE5\u505A\u5230\u5C06\u7EBF\u7A0B\u91CD\u590D\u4F7F\u7528\uFF0C\u4E5F\u4E0D\u7528\u6BCF\u6B21\u65B0\u5EFA\u7EBF\u7A0B\u6216\u9500\u6BC1\u7EBF\u7A0B\uFF0C\u63D0\u9AD8\u4E86\u6548\u7387\uFF0C\u8282\u7701\u4E86\u65F6\u95F4\u6210\u672C\u3002

                                                                        \u7EBF\u7A0B\u6C60\u53EF\u4EE5\u8BBE\u7F6E\u6700\u5927\u7EBF\u7A0B\u6570\u548C\u6838\u5FC3\u7EBF\u7A0B\u6570\uFF0C\u53EF\u4EE5\u901A\u8FC7\u6709\u9650\u7684\u7EBF\u7A0B\u5904\u7406\u65E0\u9650\u7684\u4EFB\u52A1\uFF0C\u4E00\u4E2A\u7EBF\u7A0B\u6267\u884C\u4E00\u4E2A\u4EFB\u52A1\u5BF9\u8C61\u5B8C\u6210\u4E4B\u540E\uFF0C\u5E76\u4E0D\u9500\u6BC1\uFF0C\u800C\u662F\u653E\u56DE\u5230\u7EBF\u7A0B\u6C60\u4E2D\uFF0C\u8FDB\u884C\u4E0B\u4E00\u4E2A\u4EFB\u52A1\u5BF9\u8C61\u7684\u6267\u884C\u3002

                                                                        \u4EFB\u52A1\u5BF9\u8C61\u9664\u4E86\u4E00\u8FDB\u6765\u5C31\u80FD\u591F\u88AB\u7EBF\u7A0B\u6267\u884C\u4EE5\u5916\uFF0C\u6CA1\u6709\u80FD\u88AB\u6267\u884C\u7684\u7EBF\u7A0B\u90FD\u653E\u8FDB\u7EBF\u7A0B\u963B\u585E\u961F\u5217\u4E2D\u3002

                                                                        \u4EFB\u52A1\u5BF9\u8C61\u51FA\u961F\u5217\uFF0C\u88AB\u7EBF\u7A0B\u6267\u884C\uFF0C\u662F\u8FD9\u79CD\u6D41\u7A0B\u3002

                                                                        \u81EA\u5B9A\u4E49\u7EBF\u7A0B\u6C60\u7684\u65F6\u5019\u5982\u679C\u5DF2\u6709\u7EBF\u7A0B\u6570\u5C0F\u4E8E\u6700\u5927\u7EBF\u7A0B\u6570\uFF0C\u90A3\u4E48\u5C31\u521B\u5EFA\u5DE5\u4F5C\u7EBF\u7A0B

                                                                      2. \u5BF9\u5E94\u4E8E\u4E00\u4E2A\u4E1A\u52A1\uFF0C\u4E5F\u53EF\u4EE5\u521B\u5EFA\u591A\u4E2A\u7EBF\u7A0B\u6C60\uFF0C\u4E0D\u662F\u53EA\u80FD\u6709\u4E00\u4E2A\u7EBF\u7A0B\u6C60\u3002

                                                                      \u9965\u997F\u73B0\u8C61

                                                                      1. \u7528\u56FA\u5B9A\u5927\u5C0F\u7684\u7EBF\u7A0B\u6C60\uFF0C\u4F1A\u6709\u9965\u997F\u73B0\u8C61\uFF0C\u7EBF\u7A0B\u6570\u4E0D\u8DB3\uFF0C\u5BFC\u81F4\u9965\u997F

                                                                        \u7528\u5E26\u7F13\u51B2\u7684\u7EBF\u7A0B\u6C60\uFF0C\u4E0D\u4F1A\u6709\u9965\u997F\u73B0\u8C61

                                                                        \u5355\u7EBF\u7A0B\u7EBF\u7A0B\u6C60\uFF0C\u4F1A\u6709\u9965\u997F\u73B0\u8C61\u3002

                                                                      2. \u5BF9\u4E8E\u4E0D\u540C\u7684\u5DE5\u4F5C\u4EFB\u52A1\uFF0C\u5E94\u8BE5\u4F7F\u7528\u4E0D\u540C\u7684\u7EBF\u7A0B\u6C60\uFF0C\u6765\u907F\u514D\u9965\u997F\u73B0\u8C61\u3002

                                                                        \u907F\u514D\u56E0\u4E3A\u591A\u4E2A\u7EBF\u7A0B\u90FD\u53BB\u6267\u884C\u4EFB\u52A1A\uFF0C\u800C\u6CA1\u6709\u7EBF\u7A0B\u53BB\u6267\u884C\u4EFB\u52A1B\uFF0C\u5982\u679C\u6309\u4EFB\u52A1\u6765\u5212\u5206\u4E86\u7EBF\u7A0B\u6C60\uFF0C\u90A3\u4E48\u5C31\u4E0D\u5B58\u5728\u6CA1\u6709\u7EBF\u7A0B\u53BB\u6267\u884C\u4EFB\u52A1B\u7684\u60C5\u51B5\u3002

                                                                        \u8FD9\u79CD\u65B9\u5F0F\u6BD4\u5355\u7EAF\u589E\u52A0\u7EBF\u7A0B\u6C60\u7684\u5BB9\u91CF\u66F4\u4E3A\u91CD\u8981

                                                                      3. \u7EBF\u7A0B\u6C60\u4E2D\u7684\u7EBF\u7A0B\u6570\u91CF\u8FC7\u5C0F\uFF0C\u53EF\u80FD\u4F1A\u5BFC\u81F4\u9965\u997F

                                                                        \u8FC7\u5927\u7684\u8BDD\u4F1A\u5BFC\u81F4\u66F4\u591A\u7684\u7EBF\u7A0B\u4EA7\u751F\u4E0A\u4E0B\u6587\u5207\u6362\uFF08\u4E0A\u4E0B\u6587\u5207\u6362\u5BF9\u4E8ECPU\u6765\u8BF4\u662F\u4E00\u79CD\u5F00\u9500\uFF09\uFF0C\u5E76\u4E14\u6D89\u53CA\u5230\u7CFB\u7EDF\u8D44\u6E90\u4E0D\u8DB3\u7684\u95EE\u9898\uFF0C\u7EBF\u7A0B\u8FC7\u591A\u4E5F\u53EF\u80FD\u4F1A\u53D1\u751FOOM

                                                                        • CPU\u5BC6\u96C6\u578B\u8FD0\u7B97

                                                                          \u901A\u5E38\u91C7\u7528cpu\u6838\u6570 + 1\uFF0C\u80FD\u591F\u5B9E\u73B0\u6700\u4F18\u7684CPU\u5229\u7528\u7387\u3002

                                                                          +1 \u4FDD\u8BC1\u5F53\u7EBF\u7A0B\u7531\u4E8E\u9875\u7F3A\u5931\u6545\u969C\u6216\u5176\u4ED6\u539F\u56E0\u5BFC\u81F4\u6682\u505C\u65F6\uFF0C\u989D\u5916\u7684\u8FD9\u4E2A\u7EBF\u7A0B\u80FD\u9876\u4E0A\u53BB\uFF0C\u4FDD\u8BC1CPU\u65F6\u949F\u5468\u671F\u4E0D\u88AB\u6D6A\u8D39\uFF0C\u4FDD\u8BC1CPU\u7684\u5229\u7528\u7387\u3002

                                                                        • IO\u5BC6\u96C6\u578B\u8FD0\u7B97

                                                                      JUC

                                                                      AQS\u539F\u7406

                                                                      1. \u5176\u4ED6\u7684\u5E76\u53D1\u5DE5\u5177\u90FD\u662F\u4F9D\u8D56\u4E8EAQS\u7684\uFF0C\u62BD\u8C61\u7684\u57FA\u4E8E\u961F\u5217\u7684\u540C\u6B65\u5668\u3002\u662F\u963B\u585E\u5F0F\u9501\u548C\u76F8\u5173\u7684\u540C\u6B65\u5668\u5DE5\u5177\u7684\u6846\u67B6

                                                                        Synchronized\u9501\u5C31\u662F\u963B\u585E\u5F0F\u7684\u9501\uFF0CCAS+volatile\u5C31\u662F\u5B9E\u73B0\u7684\u65E0\u9501\u5E76\u53D1\uFF0C\u662F\u4E50\u89C2\u9501\uFF0C\u7EBF\u7A0B\u4E0D\u963B\u585E\u3002

                                                                        \u4F46\u662FAQS\u5E76\u4E0D\u662FSynchronized\u7684\u539F\u7406\uFF0C\u800C\u662FReentrantLock\u7684\u5B9E\u73B0\u539F\u7406\uFF0CReentrantLock\u662F\u963B\u585E\u5F0F\u9501

                                                                        Synchronized\u7684\u5B9E\u73B0\u539F\u7406\u662FMonitor\uFF0C\u662FJVM\u5C42\u9762\u7684\uFF0C\u5E95\u5C42\u662F\u7528C++\u6765\u5B9E\u73B0\u7684\u3002

                                                                      2. AQS ---- AbstractQueuedSynchronizer\uFF0C\u662F\u4E00\u4E2A\u62BD\u8C61\u7C7B\uFF0C\u62BD\u8C61\u7684\u57FA\u4E8E\u961F\u5217\u7684\u540C\u6B65\u5668

                                                                      3. AQS\u7684\u4F7F\u7528\u65B9\u5F0F\u901A\u5E38\u90FD\u662F\u901A\u8FC7\u5185\u90E8\u7C7B\u7EE7\u627FAQS\u5B9E\u73B0\u540C\u6B65\u529F\u80FD\uFF0CAQS\u662F\u5F88\u591A\u540C\u6B65\u5668\u7684\u57FA\u7840\u6846\u67B6\uFF0C\u6211\u4EEC\u8FD8\u53EF\u4EE5\u57FA\u4E8EAQS\uFF0C\u5B9A\u5236\u51FA\u6211\u4EEC\u6240\u9700\u8981\u7684\u540C\u6B65\u5668

                                                                      4. \u5728AQS\u5185\u90E8\uFF0C\u901A\u8FC7\u7EF4\u62A4\u4E00\u4E2AFIFO\u961F\u5217\uFF0C\u6765\u7BA1\u7406\u591A\u7EBF\u7A0B\u7684\u6392\u961F\u5DE5\u4F5C\uFF0C\u5728\u516C\u5E73\u7ADE\u4E89\u7684\u60C5\u51B5\u4E0B\uFF0C\u65E0\u6CD5\u83B7\u53D6\u9501\u7684\u7EBF\u7A0B\u4F1A\u88AB\u5C01\u88C5\u6210\u4E00\u4E2A\u8282\u70B9\uFF0C\u7F6E\u4E8EAQS\u961F\u5217\u5C3E\u90E8\uFF0C\u5165\u961F\u7684\u7EBF\u7A0B\u901A\u8FC7\u81EA\u65CB\u7684\u65B9\u5F0F\u83B7\u53D6\u9501\uFF0C\u82E5\u5728\u6709\u9650\u6B21\u7684\u5C1D\u8BD5\u540E\uFF0C\u4ECD\u672A\u83B7\u53D6\u6210\u529F\uFF0C\u7EBF\u7A0B\u4F1A\u88AB\u963B\u585E\u4F4F\uFF0C\u540E\u9762\u6709\u5177\u4F53\u7684\u8FC7\u7A0B\u8BF4\u660E

                                                                      5. state\u5C5E\u6027\uFF0C\u8868\u793A\u8D44\u6E90\u7684\u72B6\u6001

                                                                        • \u72EC\u5360\u6A21\u5F0F---\u53EA\u6709\u4E00\u4E2A\u7EBF\u7A0B\u80FD\u591F\u8BBF\u95EE\u8D44\u6E90\uFF0C\u6BD4\u5982\u4E4B\u524D\u7684\u76D1\u89C6\u5668\u9501\u4F7F\u67D0\u4E00\u4E2A\u65F6\u95F4\u6BB5\u53EA\u6709\u4E00\u4E2A\u7EBF\u7A0B\u80FD\u591F\u8BBF\u95EE\u8D44\u6E90

                                                                        • \u5171\u4EAB\u6A21\u5F0F----\u5141\u8BB8\u591A\u4E2A\u7EBF\u7A0B\u8BBF\u95EE\u8D44\u6E90\uFF0C\u4F46\u662F\u6709\u4E0A\u9650

                                                                          \u5B50\u7C7B\u9700\u8981\u5B9A\u4E49\u5982\u4F55\u7EF4\u62A4\u8FD9\u4E2A\u72B6\u6001\uFF0C\u63A7\u5236\u5982\u4F55\u83B7\u53D6\u9501\u548C\u91CA\u653E\u9501

                                                                      image-20210909190349224

                                                                      \u200B \u7528cas\u4FEE\u6539state\u72B6\u6001\uFF0C\u4FDD\u8BC1\u4E86\u4FEE\u6539state\u72B6\u6001\u8FD9\u4E2A\u8FC7\u7A0B\u662F\u539F\u5B50\u6027\u7684\u3002

                                                                      1. \u63D0\u4F9B\u4E86\u57FA\u4E8EFIFO\u7684\u7B49\u5F85\u961F\u5217\uFF0C\u7C7B\u4F3C\u4E8EMonitor\u7684EntryList\uFF0CMonitor\u662F\u64CD\u4F5C\u7CFB\u7EDF\u5C42\u9762\u7684\uFF0C\u6216\u8005\u8BF4\u662FJVM\u5C42\u9762\u7684\uFF0CEntryList\u662F\u7528C++\u6765\u5B9E\u73B0\u7684\uFF0C\u800CAQS\u662F\u7EAFJava\u5B9E\u73B0\u7684\u3002

                                                                      2. ReentrantLock\u662FJava\u5C42\u9762\u7684\u9501

                                                                      3. \u6761\u4EF6\u53D8\u91CF\u6765\u5B9E\u73B0\u7B49\u5F85\u3001\u5524\u9192\u673A\u5236\uFF0C\u652F\u6301\u591A\u4E2A\u6761\u4EF6\u53D8\u91CF\uFF0C\u7C7B\u4F3C\u4E8EMonitor\u7684WaitSet

                                                                      4. Lock\u662F\u4E00\u4E2A\u63A5\u53E3\uFF0CReentrantLock\u662F\u4E00\u4E2ALock\u63A5\u53E3\u7684\u5B9E\u73B0\u7C7B\u3002

                                                                      5. \u5B50\u7C7B\uFF08\u7EE7\u627F\u4E8EAbstractQueuedSynchronizer\uFF09\u4E3B\u8981\u5B9E\u73B0\u8FD9\u6837\u4E00\u4E9B\u65B9\u6CD5\uFF08\u9ED8\u8BA4\u629B\u51FAUnsupportedOperationException\uFF09

                                                                        • tryAcquire
                                                                        • tryRelease
                                                                        • tryAcquireShared
                                                                        • tryRealeaseShared
                                                                        • isHeldExclusively

                                                                        image-20210909191200097

                                                                        image-20210909191210548

                                                                        \u81EA\u5B9A\u4E49\u9501\u6216ReentrantLock\u91CC\u5B9A\u4E49\u7684\u4E0A\u9501\u3001\u4E0A\u9501\u5E26\u8D85\u65F6\u3001\u4E0A\u9501\u53EF\u6253\u65AD\u3001\u5C1D\u8BD5\u4E0A\u9501\u3001\u89E3\u9501\u3001\u591A\u4E2A\u6761\u4EF6\u53D8\u91CF\u7B49\u65B9\u6CD5\u90FD\u662F\u901A\u8FC7\u8C03\u7528\u7EE7\u627F\u4E8EAQS\u7684\u5B50\u7C7B\u5B9A\u4E49\u7684\u65B9\u6CD5\u3002

                                                                      ReentrantLock\u539F\u7406

                                                                      1. image-20210909194450657
                                                                      2. ReentrantLock\u5B9E\u73B0\u4E86Lock\u63A5\u53E3\uFF0C\u5185\u90E8\u4E5F\u7EF4\u62A4\u4E86\u7EE7\u627F\u4E8EAQS\u7684\u540C\u6B65\u5668Sync\uFF0C\u4E0D\u8FC7\u8FD9\u4E2A\u540C\u6B65\u5668Sync\u662F\u62BD\u8C61\u7684\uFF0C\u8FD8\u6709\u4E24\u4E2A\u7EE7\u627F
                                                                        • NonfairSync -- \u975E\u516C\u5E73\u9501
                                                                        • FairSync -- \u516C\u5E73\u9501

                                                                      \u975E\u516C\u5E73\u9501\u5B9E\u73B0\u539F\u7406

                                                                      1. \u6784\u9020\u5668\uFF1A

                                                                        \u9ED8\u8BA4\u901A\u8FC7\u975E\u516C\u5E73\u9501\u6765\u5B9E\u73B0\u5185\u90E8\u7EF4\u62A4\u7684Sync\u62BD\u8C61\u7C7B

                                                                        image-20210909194836695

                                                                      2. NonfairSync\u8FD9\u4E2A\u7C7B\u7EE7\u627F\u4E8ESync\uFF08ReentrantLock\u5185\u90E8\u7684\u62BD\u8C61\u7C7B\uFF09

                                                                      3. \u539F\u7406\uFF1A

                                                                        1. \u6CA1\u6709\u7ADE\u4E89\u65F6\uFF0CThread-0\u6210\u4E3A\u975E\u516C\u5E73\u9501\u7684Owner

                                                                          image-20210909201243193

                                                                        2. \u7B2C\u4E00\u4E2A\u7ADE\u4E89\u51FA\u73B0\u65F6\uFF0C\u9996\u5148\u5C1D\u8BD5CAS\uFF0C\u60F3\u8981\u901A\u8FC7CAS\u5C06state\u7F6E\u4E3A1\uFF0C\u4F46\u662F\u76EE\u524Dstate\u5DF2\u662F1\uFF0C\u800C\u8FD9\u6B21\u8C03\u7528cas\u7684\u53C2\u6570\u662F\u671F\u671B\u503C\uFF1A0\uFF0C\u66F4\u65B0\u503C\uFF1A1.

                                                                          \u6240\u4EE5\u671F\u671B\u503C\u548C\u5F53\u524D\u5BF9\u8C61\u7684state\u5C5E\u6027\u4E0D\u4E00\u6837\uFF0C\u66F4\u65B0\u5931\u8D25\uFF0C\u8FDB\u5165accquire

                                                                          image-20210909201251908

                                                                          image-20210909203507236

                                                                        3. \u8FDB\u5165accquire\u65B9\u6CD5\u4E4B\u540E\uFF0C\u9996\u5148\u4F1A\u518D\u6B21\u5C1D\u8BD5\uFF0C\u4F1A\u8FDB\u884CtryAccquire\uFF0C\u8FD9\u65F6state\u5DF2\u662F1\uFF0C\u7ED3\u679C\u4ECD\u7136\u662Ffalse

                                                                          \u7136\u540E\u8FDB\u5165addWaiter\u903B\u8F91

                                                                          • \u5982\u679C\u662F\u975E\u516C\u5E73\u9501\uFF0C\u90A3\u4E48\u8FDB\u5165tryAccquire\uFF0C\u4F1A\u62A2\u5360\u9501\uFF0C\u62A2\u5360\u9501\u5931\u8D25\uFF0C\u624D\u4F1A\u5C01\u88C5\u6210\u8282\u70B9\u5165AQS\u961F\u5217
                                                                          • \u516C\u5E73\u9501\u7684tryAccquire\u6BD4\u975E\u516C\u5E73\u9501\u591A\u4E86\u4E00\u4E2A\u6761\u4EF6\uFF0C\u5373!hasQueuedPredecessors()\uFF0C\u68C0\u67E5AQS\u961F\u5217\u91CC\u662F\u5426\u6709\u7B49\u5F85\u65F6\u95F4\u66F4\u957F\u7684\u7EBF\u7A0B\u8282\u70B9
                                                                        4. \u8FDB\u5165addWaiter\u903B\u8F91\uFF0C\u6784\u9020Node\u961F\u5217

                                                                          image-20210909203742017

                                                                          \u7B2C\u4E00\u4E2ANode\u79F0\u4E3A\u54D1\u5143\u6216\u54E8\u5175\uFF0C\u7528\u6765\u7AD9\u4F4D\uFF0C\u5E76\u4E0D\u5173\u8054\u7EBF\u7A0B\u3002

                                                                          Node\u961F\u5217\u5E95\u5C42\u662F\u901A\u8FC7\u53CC\u5411\u94FE\u8868\u5B9E\u73B0

                                                                        5. AQS\u7EF4\u62A4\u7684\u7EBF\u7A0B\u8282\u70B9\u540C\u6B65\u7B49\u5F85\u961F\u5217\u4E2D\uFF0C\u5934\u8282\u70B9\u662F\u6210\u529F\u83B7\u53D6\u5230\u540C\u6B65\u72B6\u6001\u7684\u8282\u70B9\u3002

                                                                        6. \u53EA\u6709\u524D\u9A71\u8282\u70B9\u662F\u5934\u8282\u70B9\u7684\u7EBF\u7A0B\u8282\u70B9\u624D\u80FD\u591F\u5C1D\u8BD5\u83B7\u53D6\u540C\u6B65\u72B6\u6001\u3002

                                                                          \u5982\u679C\u975E\u9996\u8282\u70B9\u7EBF\u7A0B\u524D\u9A71\u8282\u70B9\u51FA\u961F\u6216\u8005\u88AB\u4E2D\u65AD\uFF0C\u5219\u68C0\u67E5\u81EA\u5DF1\u7684\u524D\u9A71\u8282\u70B9\u662F\u5426\u662F\u5934\u8282\u70B9\uFF0C\u5982\u679C\u662F\u5219\u5C1D\u8BD5\u83B7\u53D6\u540C\u6B65\u72B6\u6001\uFF0C\u5982\u679C\u4E0D\u662F\u5F53\u524D\u7EBF\u7A0B\u8282\u70B9\u5219\u963B\u585E\uFF08park\uFF09\u3002\u53EF\u4EE5\u8BF4\u662F\u963B\u585E\uFF0C\u4E5F\u53EF\u4EE5\u8BF4\u662F\u8FDB\u5165\u7B49\u5F85\u72B6\u6001\u3002

                                                                        7. \u7136\u540E\u8FDB\u5165acquireQueued\u903B\u8F91

                                                                          • acquireQueued\u4F1A\u5728\u4E00\u4E2A\u5FAA\u73AF\u4E2D\u4E0D\u65AD\u5C1D\u8BD5\u83B7\u5F97\u9501\uFF0C\u5931\u8D25\u540E\u8FDB\u5165park\u963B\u585E

                                                                          • \u5982\u679C\u5F53\u524DNode\u662F\u7B2C\u4E8C\u4F4D\uFF0C\u90A3\u4E48\u518D\u6B21tryAcquire\u5C1D\u8BD5\u83B7\u53D6\u9501\uFF0Cstate\u4ECD\u662F1\uFF0C\u5931\u8D25

                                                                          • \u8FDB\u5165shouldParkAfterFailedAcquire\u903B\u8F91\uFF0C\u5C06\u524D\u9A71node\u5373head\u7684waitStatus\u6539\u4E3A-1\uFF0C\u8FD9\u6B21\u8FD4\u56DEfalse

                                                                            image-20210909204148130

                                                                          • shouldParkAfterFailedAcquire\u6267\u884C\u5B8C\u6BD5\u540E\uFF0C\u56DE\u5230acquireQueued\uFF0C\u518D\u6B21tryAcquire\u5C1D\u8BD5\u83B7\u53D6\u9501\uFF0C\u5F53\u7136\u8FD9\u65F6state\u4ECD\u4E3A1\uFF0C\u5931\u8D25

                                                                          • \u5F53\u518D\u6B21\u8FDB\u5165shouldParkAfterFailedAcquire\u65F6\uFF0C\u8FD9\u65F6\u56E0\u4E3A\u524D\u9A71node\u7684waitStatus\u5DF2\u7ECF\u662F-1\uFF0C\u8FD9\u6B21\u8FD4\u56DEtrue

                                                                          • \u8FDB\u5165parkAndCheckInterrupt\uFF0C\u8FDB\u5165\u963B\u585E\u6001\u3002

                                                                            image-20210909204356085

                                                                            \u53EF\u4EE5\u53D1\u73B0\u9664\u4E86\u6700\u540E\u4E00\u4E2Anode\uFF0C\u524D\u9762\u7684node\u7684waitStatus\u90FD\u88AB\u6539\u6210\u4E86-1\uFF0C\u6BCF\u4E2Anode\u90FD\u5E94\u8BE5\u7531\u4E0A\u4E00\u4E2A\u8282\u70B9\u5524\u9192\u3002

                                                                            -1\u8868\u793A-1\u7684node\u6709\u8D23\u4EFB\u5524\u9192\u540E\u7EE7\u8282\u70B9

                                                                        8. Thread-0 \u91CA\u653E\u9501\uFF0C\u8FDB\u5165tryRelease\u6D41\u7A0B\uFF0C\u5982\u679C\u6210\u529F

                                                                          • \u8BBE\u7F6EexclusiveOwnerThread \u4E3Anull
                                                                          • state = 0
                                                                        9. \u5F53\u524DNode\u961F\u5217\u4E0D\u4E3Anull\uFF0C\u5E76\u4E14head\u7684waitStatus = -1\uFF0C\u8FDB\u5165unparkSuccessor\u6D41\u7A0B

                                                                          \u627E\u5230\u961F\u5217\u4E2D\u79BBhead\u6700\u8FD1\u7684\u4E00\u4E2ANode\uFF0Cunpark\u6062\u590D\u5176\u8FD0\u884C\uFF0C\u672C\u4F8B\u4E2D\u5373\u4E3AThread-1

                                                                          • head\u6307\u5411Thread-1\u6240\u5728Node
                                                                          • \u539F\u672C\u7684head Node\u4ECE\u94FE\u8868\u65AD\u5F00\uFF0C\u88AB\u5783\u573E\u56DE\u6536\u5668\u56DE\u6536
                                                                        10. \u8FD9\u65F6\u5019\u5982\u679C\u6709\u5176\u4ED6\u7EBF\u7A0B\u6765\u7ADE\u4E89\uFF08\u975E\u516C\u5E73\u7684\u4F53\u73B0\uFF09\uFF0C\u6BD4\u5982Thread-4

                                                                          \u8FD9\u4E2AThread-4\u53EF\u4EE5\u548CThread-1\u7ADE\u4E89\uFF0C\u53EF\u80FDThread-1\u7ADE\u4E89\u9501\u53C8\u5931\u8D25\u4E86\u3002

                                                                        11. \u975E\u516C\u5E73\u7684\u610F\u601D\u5C31\u662F\u8BF4\uFF0C\u5373\u4F7F\u6392\u5728Node\u961F\u5217\uFF08\u53CC\u5411\u94FE\u8868\uFF09\u7684\u5934\u4F4D\uFF0C\u4ECD\u7136\u6709\u53EF\u80FD\u4E0D\u4F1A\u83B7\u5F97\u9501

                                                                      \u53EF\u91CD\u5165\u539F\u7406

                                                                      1. \u5982\u679C\u9501\u91CD\u5165\uFF0C\u8BA9state++\uFF0C\u8BF4\u660E\u540C\u4E00\u7EBF\u7A0B\u83B7\u5F97\u4E86\u591A\u6B21\u9501
                                                                      2. \u91CA\u653E\u9501\u7684\u65F6\u5019\uFF0C\u4E5F\u8981\u8BA9state\u51CF1\uFF08\u81EA\u51CF\uFF09\uFF0C\u53EA\u6709state\u51CF\u4E3A0\uFF0C\u624D\u91CA\u653E\u6210\u529F\u3002

                                                                      \u53EF\u6253\u65AD\u539F\u7406

                                                                      1. ReentrantLock\u9ED8\u8BA4\u662F\u4E0D\u53EF\u6253\u65AD\u7684
                                                                      2. \u53EF\u6253\u65AD\uFF0C\u5728park\u8FC7\u7A0B\u4E2D\u5982\u679C\u88AB\u6253\u65AD\uFF0C\u91C7\u7528\u4E86\u629B\u51FA\u5F02\u5E38\u7684\u65B9\u5F0F\uFF0C\u4E0D\u4F1A\u518D\u6B21\u8FDB\u5165for(;;)\u53BB\u7ADE\u4E89\u9501

                                                                      \u516C\u5E73\u9501\u539F\u7406

                                                                      1. \u975E\u516C\u5E73\u9501\u53EA\u4F1A\u68C0\u67E5state\uFF0C\u4E0D\u4F1A\u68C0\u67E5AQS\u7B49\u5F85\u961F\u5217\uFF08\u5728\u6E90\u7801\u4E2D\u53EF\u4EE5\u53D1\u73B0\u53EA\u68C0\u67E5\u4E86state\uFF0C\u6CA1\u6709\u505AAQS\u961F\u5217\u7684\u5224\u65AD\uFF09\uFF0C\u4E0D\u4F1A\u7BA1\u662F\u5426\u6709\u7EBF\u7A0B\u5BF9\u5E94\u7684\u8282\u70B9\u5728AQS\u961F\u5217\u4E2D\u7B49\u5F85\uFF0C\u4E0D\u4F1A\u7BA1AQS\u7B49\u5F85\u961F\u5217\uFF0C\u76F4\u63A5\u5C31\u53BB\u7ADE\u4E89

                                                                        \u5373\u4F7F\u67D0\u4E2A\u7EBF\u7A0B\u5BF9\u5E94\u7684\u8282\u70B9\u5728AQS\u7B49\u5F85\u961F\u5217\u7684\u7D27\u63A5\u7740\u5360\u4F4D\u8282\u70B9\u7684\u4E0B\u4E00\u4E2A\u8282\u70B9\uFF0C\u4E5F\u4E0D\u4E00\u5B9A\u4F1A\u6210\u529F\u7ADE\u4E89\u5230\u9501

                                                                      2. \u800C\u516C\u5E73\u9501\u4F1A\u68C0\u67E5AQS\u961F\u5217\u4E2D\u662F\u5426\u6709\u524D\u9A71\u8282\u70B9\uFF0C\u6CA1\u6709\u524D\u9A71\u8282\u70B9\uFF0C\u624D\u53BB\u7ADE\u4E89\u3002

                                                                        \u5982\u679C\u6709\u524D\u9A71\u8282\u70B9\uFF0C\u8BE5\u7EBF\u7A0B\u90FD\u4E0D\u4F1A\u53BB\u6267\u884Ccas\uFF0C\u90FD\u4E0D\u4F1A\u53BB\u6BD4\u8F83state\u3002

                                                                      \u6761\u4EF6\u53D8\u91CF\u5B9E\u73B0\u539F\u7406

                                                                      1. \u6BCF\u4E2A\u6761\u4EF6\u53D8\u91CF\u5BF9\u5E94\u4E8E\u4E00\u4E2AConditionObject

                                                                        ConditionObject\u4E5F\u7EF4\u62A4\u4E86\u4E00\u4E2A\u53CC\u5411\u94FE\u8868\uFF0C\u4F5C\u4E3A\u90A3\u4E9B\u4E0D\u6EE1\u8DB3\u6761\u4EF6\uFF0C\u9700\u8981\u4F11\u606F\u7684\u7EBF\u7A0B

                                                                      2. await\u6D41\u7A0B

                                                                        1. \u8C03\u7528await\u4E4B\u524D\uFF0C\u5FC5\u987B\u62E5\u6709\u9501\u624D\u6709\u8D44\u683C\u8C03\u7528

                                                                          await\u65B9\u6CD5\u662FConditionObject\u7684\u65B9\u6CD5\u800C\u4E0D\u662FLock\u7684\u65B9\u6CD5

                                                                        2. \u5F00\u59CBThread-0\u6301\u6709\u9501\uFF0C\u6709\u8D44\u683C\u8C03\u7528await\uFF0C\u7136\u540E\u8C03\u7528await()\uFF0C\u8FDB\u5165ConditionObject\u7684addConditionWaiter\u6D41\u7A0B

                                                                          \u521B\u5EFA\u65B0\u7684Node\u72B6\u6001\u4E3A-2\u7684\u8282\u70B9\uFF0C\u5173\u8054Thread-0\uFF0C\u52A0\u5165\u7B49\u5F85\u961F\u5217\u5C3E\u90E8

                                                                          image-20210909220203679

                                                                        3. \u63A5\u4E0B\u6765\u8FDB\u5165AQS\u7684fullRelease()\u6D41\u7A0B\uFF0C\u91CA\u653E\u540C\u6B65\u76D1\u89C6\u5668\u4E0A\u7684\u9501

                                                                          image-20210909220242221

                                                                        4. unpark AQS\u961F\u5217\u4E2D\u7684\u4E0B\u4E00\u4E2A\u8282\u70B9\uFF0C\u7ADE\u4E89\u9501\uFF0C\u7D27\u63A5\u7740\u5360\u4F4D\u8282\u70B9\u4E4B\u540E\u7684\u90A3\u4E2A\u8282\u70B9\u5BF9\u5E94\u7684\u7EBF\u7A0B\u7ADE\u4E89\u6210\u529F\uFF08\u5982\u679C\u662F\u975E\u516C\u5E73\u9501\u7684\u673A\u5236\uFF0C\u4F46\u662F\u6CA1\u6709\u5176\u4ED6\u7EBF\u7A0B\u6765\u7ADE\u4E89\u7684\u60C5\u51B5\uFF0C\u6216\u8005\u662F\u516C\u5E73\u9501\u7684\u673A\u5236\uFF09

                                                                          image-20210909220502184

                                                                          Thread-1\u8282\u70B9\u7684\u524D\u4E00\u4E2A\u8282\u70B9\uFF08\u5360\u4F4D\u8282\u70B9\uFF09\u8981\u65AD\u5F00\uFF0C\u7136\u540Ehead\u8981\u6307\u5411\u65B0\u7684\u8282\u70B9\u5373\u539F\u5360\u4F4D\u8282\u70B9\u7684\u4E0B\u4E00\u4E2A\u8282\u70B9\u6210\u4E3A\u65B0\u7684\u5360\u4F4D\u8282\u70B9\uFF0C\u4E0B\u4E00\u4E2A\u7ADE\u4E89\u9501\u7684\u8282\u70B9\u5C31\u662F\u5F53\u524Dhead\u8282\u70B9\u7684\u4E0B\u4E00\u4E2A\u8282\u70B9\u3002\u5728\u56FE\u4E2D\u5373Thread-2

                                                                        5. \u5728ConditionObject\u7B49\u5F85\u961F\u5217\u7684\u7EBF\u7A0B\u8282\u70B9\u963B\u585E

                                                                          image-20210909220707854

                                                                      3. AQS\u961F\u5217\u548CConditionObject\u7B49\u5F85\u961F\u5217\u7684\u7EBF\u7A0B\u6700\u540E\u963B\u585E\uFF0C\u90FD\u662F\u901A\u8FC7\u8C03\u7528park()\u963B\u585E\u7684

                                                                      4. signal\u6D41\u7A0B

                                                                        1. \u5047\u8BBE\u73B0\u5728\u5360\u6709\u9501\u7684Thread-1\u8981\u6765\u5524\u9192ConditionObject\u7B49\u5F85\u961F\u5217\u4E2D\u7684\u7EBF\u7A0B\uFF0C\u90A3\u4E48Thread-1\u8981\u5524\u9192\u7B49\u5F85\u961F\u5217\u4E2D\u7684Thread-0

                                                                        2. \u8FDB\u5165ConditionObject\u7684doSignal\u6D41\u7A0B\uFF0C\u53D6\u5F97\u7B49\u5F85\u961F\u5217\u4E2D\u7B2C\u4E00\u4E2ANode\uFF0C\u5373Thread-0\u6240\u5728Node

                                                                          image-20210910125940213

                                                                        3. \u6267\u884CTransferForSignal\u6D41\u7A0B\uFF0C\u5C06\u7B49\u5F85\u961F\u5217\u4E2D\u53D6\u5F97\u7684Node\uFF0C\u52A0\u5165AQS\u961F\u5217\u5C3E\u90E8\uFF0C\u5C06Thread-0\u7684\u72B6\u6001\u7531-2\u6539\u4E3A0\uFF0C\u5C06AQS\u961F\u5217\u4E2D\uFF0CThread-0\u7684\u524D\u4E00\u4E2A\u7EBF\u7A0B\u8282\u70B9\u7684\u72B6\u6001\u6539\u4E3A-1\uFF0C\u8868\u793A\u524D\u4E00\u4E2A\u7EBF\u7A0B\u6709\u8D44\u683C\u5524\u9192Thread-0\u8FD9\u4E2A\u7EBF\u7A0B

                                                                          image-20210910125952369

                                                                        4. \u73B0\u5728\u5360\u6709\u9501\u7684Thread-1\u91CA\u653E\u9501\uFF0C\u8FDB\u5165unlock\u6D41\u7A0B

                                                                      \u516C\u5E73\u4E0E\u975E\u516C\u5E73

                                                                      1. \u516C\u5E73\u4E0E\u975E\u516C\u5E73\u6307\u7684\u662F\u7EBF\u7A0B\u83B7\u53D6\u9501\u7684\u65B9\u5F0F\u3002\u516C\u5E73\u6A21\u5F0F\u4E0B\uFF0C\u7EBF\u7A0B\u5728\u540C\u6B65\u961F\u5217\u4E2D\u901A\u8FC7 FIFO \u7684\u65B9\u5F0F\u83B7\u53D6\u9501\uFF0C\u6BCF\u4E2A\u7EBF\u7A0B\u6700\u7EC8\u90FD\u80FD\u83B7\u53D6\u9501\u3002\u5728\u975E\u516C\u5E73\u6A21\u5F0F\u4E0B\uFF0C\u7EBF\u7A0B\u4F1A\u901A\u8FC7\u201C\u63D2\u961F\u201D\u7684\u65B9\u5F0F\u53BB\u62A2\u5360\u9501\uFF08\u4E5F\u5C31\u662F\u961F\u5217\u5185\u7684\u7EBF\u7A0B\u5C01\u88C5\u6210\u7684\u8282\u70B9\uFF0C\u5C31\u53EF\u4EE5\u7406\u89E3\u4E3A\u7EBF\u7A0B\uFF0C\u662F\u6309\u7167\u961F\u5217FIFO\u987A\u5E8F\u83B7\u5F97\u9501\u7684\uFF0C\u4F46\u662F\u961F\u5217\u5916\u7684\u7EBF\u7A0B\uFF0C\u5C31\u770B\u5B83\u662F\u5426\u68C0\u67E5\u8FD9\u4E2AAQS\u961F\u5217\u4E86\uFF0C\u5982\u679C\u4E0D\u68C0\u67E5\uFF0C\u5C31\u662F\u975E\u516C\u5E73\u6A21\u5F0F\uFF0C\u961F\u5217\u5916\u7684\u7EBF\u7A0B\u5C31\u53EF\u4EE5\u63D2\u961F\u3002\uFF09\uFF0C\u62A2\u4E0D\u5230\u7684\u5219\u8FDB\u5165\u540C\u6B65\u961F\u5217\u8FDB\u884C\u6392\u961F\u3002\u9ED8\u8BA4\u60C5\u51B5\u4E0B\uFF0CReentrantLock \u4F7F\u7528\u7684\u662F\u975E\u516C\u5E73\u6A21\u5F0F\u83B7\u53D6\u9501\uFF0C\u800C\u4E0D\u662F\u516C\u5E73\u6A21\u5F0F\u3002\u4E0D\u8FC7\u6211\u4EEC\u4E5F\u53EF\u901A\u8FC7 ReentrantLock \u6784\u9020\u65B9\u6CD5ReentrantLock(boolean fair)\u8C03\u6574\u52A0\u9501\u7684\u6A21\u5F0F\u3002

                                                                      2. \u516C\u5E73\u4E0E\u975E\u516C\u5E73\u9501\u7684\u4F18\u7F3A\u70B9\uFF1A

                                                                        \u516C\u5E73\u6A21\u5F0F\u4E0B\uFF0C\u53EF\u4FDD\u8BC1\u6BCF\u4E2A\u7EBF\u7A0B\u6700\u7EC8\u90FD\u80FD\u83B7\u5F97\u9501\uFF0C\u4F46\u6548\u7387\u76F8\u5BF9\u6BD4\u8F83\u8F83\u4F4E\uFF0C\u53EF\u4EE5\u89E3\u51B3\u9965\u997F\u95EE\u9898\u3002

                                                                        \u975E\u516C\u5E73\u6A21\u5F0F\u4E0B\uFF0C\u6548\u7387\u6BD4\u8F83\u9AD8\uFF0C\u4F46\u53EF\u80FD\u4F1A\u5BFC\u81F4\u7EBF\u7A0B\u51FA\u73B0\u9965\u997F\u7684\u60C5\u51B5\u3002\u5373\u4F7F\u51FA\u73B0\u9965\u997F\uFF0C\u4E5F\u5F88\u5C11\u4F7F\u7528\u4FEE\u6539\u4E3A\u516C\u5E73\u9501\u7684\u65B9\u5F0F\u89E3\u51B3\uFF0C\u800C\u901A\u8FC7tryLock()\u7684\u65B9\u5F0F\u89E3\u51B3

                                                                      3. \u4E3A\u5565\u975E\u516C\u5E73\u6A21\u5F0F\u62A2\u4E86\u5176\u4ED6\u7EBF\u7A0B\u83B7\u53D6\u9501\u7684\u673A\u4F1A\uFF0C\u800C\u6574\u4E2A\u7A0B\u5E8F\u7684\u8FD0\u884C\u6548\u7387\u4F1A\u66F4\u9AD8\u5462\uFF1F

                                                                        \u5728\u6FC0\u70C8\u7ADE\u4E89\u7684\u60C5\u51B5\u4E0B\uFF0C\u975E\u516C\u5E73\u9501\u7684\u6027\u80FD\u9AD8\u4E8E\u516C\u5E73\u9501\u7684\u6027\u80FD\u7684\u4E00\u4E2A\u539F\u56E0\u662F\uFF1A\u5728\u6062\u590D\u4E00\u4E2A\u88AB\u6302\u8D77\u7684\u7EBF\u7A0B\u4E0E\u8BE5\u7EBF\u7A0B\u771F\u6B63\u5F00\u59CB\u8FD0\u884C\u4E4B\u95F4\u5B58\u5728\u7740\u4E25\u91CD\u7684\u5EF6\u8FDF\u3002\u4E0E\u6B64\u540C\u65F6\uFF0C\u5982\u679C C \u4E5F\u8BF7\u6C42\u8FD9\u4E2A\u9501\uFF0C\u90A3\u4E48 C \u5F88\u6709\u53EF\u80FD\u4F1A\u5728 B \u88AB\u5B8C\u5168\u5524\u9192\u524D\u83B7\u5F97\u3001\u4F7F\u7528\u4EE5\u53CA\u91CA\u653E\u8FD9\u4E2A\u9501\u3002\u8FD9\u6837\u7684\u60C5\u51B5\u65F6\u4E00\u79CD\u201C\u53CC\u8D62\u201D\u7684\u5C40\u9762\uFF1AB \u83B7\u5F97\u9501\u7684\u65F6\u523B\u5E76\u6CA1\u6709\u63A8\u8FDF\uFF0CC \u66F4\u65E9\u7684\u83B7\u5F97\u4E86\u9501\uFF0C\u5E76\u4E14\u541E\u5410\u91CF\u4E5F\u83B7\u5F97\u4E86\u63D0\u9AD8\u3002\uFF08\u541E\u5410\u91CF\u662F\u6307\u7528\u6237\u7EBF\u7A0B\u6267\u884C\u65F6\u95F4\u5360\u6BD4\uFF0C\u5176\u4ED6\u65F6\u95F4\u6709\u5783\u573E\u56DE\u6536\u65F6\u95F4\uFF0C\u7EBF\u7A0B\u4E0A\u4E0B\u6587\u5207\u6362\u6D88\u8017\u7B49\uFF09

                                                                        image-20210910183523679

                                                                      4. AQS \u7EF4\u62A4\u4E86\u4E00\u4E2A\u57FA\u4E8E\u53CC\u5411\u94FE\u8868\u7684\u540C\u6B65\u961F\u5217\uFF0C\u7EBF\u7A0B\u5728\u83B7\u53D6\u540C\u6B65\u72B6\u6001\u5931\u8D25\u7684\u60C5\u51B5\u4E0B\uFF0C\u90FD\u4F1A\u88AB\u5C01\u88C5\u6210\u8282\u70B9\uFF0C\u7136\u540E\u52A0\u5165\u961F\u5217\u4E2D\u3002\u52A0\u5165\u8FD9\u4E2A\u961F\u5217\u4E2D\uFF0C\u4E0D\u4EE3\u8868\u7EBF\u7A0B\u5C01\u88C5\u6210\u7684\u8282\u70B9\u963B\u585E\u4E86\uFF0C\u52A0\u5165\u8FD9\u4E2A\u961F\u5217\uFF0C\u8FD8\u4F1A\u901A\u8FC7\u81EA\u65CB\u7684\u65B9\u5F0F\u83B7\u5F97\u9501\uFF0C\u591A\u6B21\uFF08\u6709\u9650\u6B21\uFF09\u5C1D\u8BD5\u5931\u8D25\u540E\uFF0C\u624D\u4F1A\u901A\u8FC7park\u963B\u585E\uFF0C\u5E76\u4E0D\u662F\u8BF4\u5165\u961F\u5C31\u963B\u585E

                                                                        • **\u975E\u516C\u5E73\u9501\u7684 lock \u65B9\u6CD5\u4F1A\u9996\u5148\u5C1D\u8BD5\u53BB\u62A2\u5360\u8BBE\u7F6E\u540C\u6B65\u72B6\u6001\uFF08\u901A\u8FC7CAS\uFF09\uFF0C\u800C\u4E0D\u662F\u76F4\u63A5\u8C03\u7528 acquire()\u65B9\u6CD5 \u5C06\u7EBF\u7A0B\u653E\u5165\u540C\u6B65\u961F\u5217\u4E2D\u7B49\u5F85\u83B7\u53D6\u9501\u3002**\u5982\u679C\u8BBE\u7F6E\u540C\u6B65\u72B6\u6001state\u5931\u8D25\uFF0C\u5373CAS\u6BD4\u8F83\u4E0D\u6210\u529F\uFF0C\u90A3\u4E48\u624D\u8FDB\u5165acquire()

                                                                        • \u516C\u5E73\u9501\u7684lock()\u5219\u76F4\u63A5\u8C03\u7528acquire()

                                                                        • \u8FDB\u5165acquire()\u4E4B\u540E\uFF0C\u5148\u8FDB\u884CtryAcquire()

                                                                          • \u516C\u5E73\u9501\u7684tryAcquire \u591A\u51FA\u4E86\u4E00\u4E2A\u6761\u4EF6\uFF0C\u5373!hasQueuedPredecessors()\u3002\u8FD9\u4E2A\u65B9\u6CD5\u7684\u76EE\u7684\u662F\u5224\u65AD\u662F\u5426\u6709\u5176\u4ED6\u7EBF\u7A0B\u6BD4\u5F53\u524D\u7EBF\u7A0B\u5728\u540C\u6B65\u961F\u5217\u4E2D\u7B49\u5F85\u7684\u65F6\u95F4\u66F4\u957F\u3002
                                                                          • \u5982\u679C\u6211\u4EEC\u628A tryAcquire \u4E2D\u7684\u6761\u4EF6!hasQueuedPredecessors()\u53BB\u6389\uFF0C\u516C\u5E73\u9501\u5C06\u4E0D\u518D\u90A3\u4E48\u201C\u8C26\u8BA9\u201D\uFF0C\u5B83\u5C06\u4F1A\u50CF\u975E\u516C\u5E73\u9501\u90A3\u6837\u62A2\u5360\u83B7\u53D6\u9501\uFF0C\u62A2\u5360\u5931\u8D25\u624D\u4F1A\u5165\u961F\uFF0C\u5C31\u53D8\u6210\u4E86\u975E\u516C\u5E73\u9501\u3002

                                                                      ReentrantReadWriteLock

                                                                      1. ReentrantReadWriteLock\u548CStampedLock\u90FD\u662F\u8BFB\u5199\u9501

                                                                      2. ReentrantReadWriteLock\u652F\u6301\u91CD\u5165\uFF0C\u662F\u53EF\u91CD\u5165\u9501

                                                                      3. ReentrantReadWriteLock\u7684\u76EE\u7684\u662F\u63D0\u9AD8\u8BFB\u64CD\u4F5C\u7684\u6027\u80FD

                                                                        \u5F53\u8BFB\u64CD\u4F5C\u8FDC\u8FDC\u9AD8\u4E8E\u5199\u64CD\u4F5C\u65F6\uFF0C\u8FD9\u65F6\u5019\u4F7F\u7528\u8BFB\u5199\u9501\u8BA9\u8BFB-\u8BFB\u53EF\u4EE5\u5E76\u53D1\uFF0C\u63D0\u9AD8\u6027\u80FD\u3002

                                                                        \u8BFB\u8BFB\u53EF\u4EE5\u5E76\u53D1\uFF0C \u800C\u8BFB\u5199\u4E92\u65A5

                                                                      \u7EBF\u7A0B\u5B89\u5168\u96C6\u5408\u7C7B\u6982\u8FF0

                                                                        • \u9057\u7559\u7684\u7EBF\u7A0B\u5B89\u5168\u96C6\u5408\u5982Hashtable\uFF0CVector

                                                                          Hashtable\u662FMap\u63A5\u53E3\u7684\u5B9E\u73B0\u7C7B

                                                                          Vector\u662FList\u63A5\u53E3\u7684\u5B9E\u73B0\u7C7B

                                                                        • image-20210910130603196

                                                                        • JUC\u5B89\u5168\u96C6\u5408

                                                                          • BLOCKING\u7C7B\uFF0C\u5927\u90E8\u5206\u57FA\u4E8E\u9501\uFF0C\u5E76\u63D0\u4F9B\u7528\u6765\u963B\u585E\u7684\u65B9\u6CD5\u3002\uFF08\u8FD9\u79CD\u79F0\u4E3A\u60B2\u89C2\u9501\uFF0C\u4E50\u89C2\u9501\u5176\u5B9E\u6CA1\u6709\u9501\uFF0C\u662F\u5B9E\u73B0\u65E0\u9501\u5E76\u53D1\uFF0CCAS+volatile\u5B9E\u73B0\uFF09
                                                                          • CopyOnWrite\u7C7B\uFF0C\u9002\u7528\u4E8E\u8BFB\u591A\u5199\u5C11\u7684\u573A\u666F
                                                                          • Concurrent\u7C7B
                                                                      1. image-20210910130839000

                                                                      2. Concurrent\u7C7B\u578B\u7684\u5BB9\u5668

                                                                        • \u5927\u591A\u6027\u80FD\u90FD\u6BD4\u8F83\u9AD8

                                                                          \u5185\u90E8\u5F88\u591A\u64CD\u4F5C\u4F7F\u7528cas\u4F18\u5316\uFF0C\u4E00\u822C\u53EF\u4EE5\u63D0\u9AD8\u8F83\u9AD8\u541E\u5410\u91CF\uFF0C\u7528\u6237\u7EBF\u7A0B\u6267\u884C\u7684\u65F6\u95F4\u5360\u6BD4\u9AD8\u3002

                                                                          \u56E0\u4E3A\u7528cas+volatile\u5B9E\u73B0\u7684\u65E0\u9501\u5E76\u53D1\uFF0C\u5373\u4E50\u89C2\u9501

                                                                        • \u5F31\u4E00\u81F4\u6027

                                                                          \u5F53\u5229\u7528\u8FED\u4EE3\u5668\u904D\u5386\u65F6\uFF0C\u5982\u679C\u5BB9\u5668\u53D1\u751F\u4FEE\u6539\uFF0C\u8FED\u4EE3\u5668\u4ECD\u7136\u53EF\u4EE5\u7EE7\u7EED\u8FDB\u884C\u904D\u5386\uFF08\u56E0\u4E3A\u4E0D\u963B\u585E\uFF0C\u6CA1\u6709\u4E0A\u9501\uFF09\uFF0C\u8FD9\u65F6\u5185\u5BB9\u662F\u65E7\u7684

                                                                          \u6C42\u5927\u5C0F\uFF0C\u56E0\u4E3A\u5F31\u4E00\u81F4\u6027\uFF0C\u5E76\u4E0D\u4E00\u5B9A\u51C6\u786E

                                                                          \u5BF9\u4E8E\u975E\u5B89\u5168\u5BB9\u5668\u6765\u8BB2\uFF0C\u904D\u5386\u65F6\u5982\u679C\u53D1\u751F\u4E86\u4FEE\u6539\uFF0C\u4F7F\u7528fail-fast\u673A\u5236\u4E5F\u5C31\u662F\u8BA9\u904D\u5386\u7ACB\u523B\u5931\u8D25\uFF0C\u4E0D\u518D\u7EE7\u7EED\u904D\u5386

                                                                          Concurrent\u7C7B\u578B\u7684\u5BB9\u5668\u662F\u7EBF\u7A0B\u5B89\u5168\u7684

                                                                      ConcurrentHashMap

                                                                      1. \u5185\u90E8\u65B9\u6CD5\u8DDF\u666E\u901AHashMap\u65B9\u6CD5\u4E00\u6837\uFF0C\u90FD\u662F\u5B9E\u73B0\u4E86Map\u63A5\u53E3

                                                                      2. \u91CD\u8981\u65B9\u6CD5computeIfAbsent

                                                                        \u5148\u8981\u8FDB\u884C\u68C0\u67E5\uFF0C\u5982\u679C\u7F3A\u5C11key\uFF0C\u5219\u8BA1\u7B97\u751F\u6210\u4E00\u4E2A\u503C\uFF0C\u7136\u540E\u5C06key value\u653E\u5165map

                                                                      3. HashMap\u5728put\u8FC7\u7A0B\u4E2D\u7684\u539F\u7406

                                                                        \u5148\u8BA1\u7B97hashCode\uFF0C\u627E\u5230\u5E95\u5C42Entry[]\u6570\u7EC4\u7684\u4E00\u4E2A\u4F4D\u7F6E\u8FDB\u884C\u5B58\u653E\uFF0C\u4E0D\u540ChashCode\u4ECD\u7136\u53EF\u80FD\u653E\u5230\u4E00\u4E2A\u4F4D\u7F6E

                                                                        \u5982\u679C\u6B64\u4F4D\u7F6E\u4E0A\u7684\u6570\u636E\u4E0D\u4E3A\u7A7A\uFF08\u610F\u5473\u7740\u6B64\u4F4D\u7F6E\u4E0A\u5B58\u5728\u4E00\u4E2A\u6216\u591A\u4E2A\u6570\u636E\uFF08\u591A\u4E2A\u6570\u636E\u4EE5\u94FE\u8868\u5F62\u5F0F\u5B58\u5728\uFF09\uFF09\uFF0C\u6BD4\u8F83key1\u548C\u5DF2\u7ECF\u5B58\u5728\u7684\u4E00\u4E2A\u6216\u591A\u4E2A\u6570\u636E\u7684\u54C8\u5E0C\u503C\uFF1A

                                                                        • \u5982\u679Ckey1\u7684\u54C8\u5E0C\u503C\u4E0E\u5DF2\u7ECF\u5B58\u5728\u7684\u6570\u636E\u7684\u54C8\u5E0C\u503C\u90FD\u4E0D\u76F8\u540C\uFF0C\u6B64\u65F6key1-value1\u8FD9\u4E2AEntry\u6DFB\u52A0\u6210\u529F-----\u60C5\u51B52
                                                                        • \u5982\u679Ckey1\u7684\u54C8\u5E0C\u503C\u548C\u5DF2\u7ECF\u5B58\u5728\u7684\u67D0\u4E00\u4E2A\u6570\u636E\u7684\u54C8\u5E0C\u503C\u76F8\u540C\uFF0C\u90A3\u4E48\u7EE7\u7EED\u6BD4\u8F83\uFF0C\u8C03\u7528key1\u6240\u5728\u7C7B\u7684equals()\u65B9\u6CD5\uFF1A
                                                                          • \u5982\u679Cequals()\u8FD4\u56DEfalse\uFF1A\u6B64\u65F6key1-value1\u6DFB\u52A0\u6210\u529F------\u60C5\u51B53
                                                                          • \u5982\u679Cequals()\u8FD4\u56DEtrue\uFF1A\u4F7F\u7528value1\u66FF\u6362\u76F8\u540Ckey\u7684value\u503C\u3002
                                                                      4. \u8981\u6CE8\u610F\u5982\u679C\u5728\u5E95\u5C42Entry[]\u6570\u7EC4\uFF0C\u5143\u7D20\u88AB\u653E\u5728\u540C\u4E00\u4E2A\u4F4D\u7F6E\uFF0C\u4EE5\u94FE\u8868\u5F62\u5F0F\u5B58\u50A8\uFF0C\u5728JDK8\uFF0C\u65B0\u52A0\u5165\u7684\u5143\u7D20\u603B\u662F\u653E\u5728\u94FE\u8868\u7684\u5C3E\u90E8\uFF0C\u5728jdk7\uFF0C\u65B0\u52A0\u5165\u7684\u5143\u7D20\u603B\u662F\u653E\u5728\u94FE\u8868\u7684\u5934\u90E8\u3002

                                                                        \u5728jdk7\uFF0C\u65B0\u52A0\u5165\u7684\u5143\u7D20\u603B\u662F\u653E\u5728\u94FE\u8868\u7684\u5934\u90E8\uFF0C\u8FD9\u4E5F\u662F\u4EA7\u751F\u6B7B\u94FE\u7684\u91CD\u8981\u539F\u56E0\uFF0C\u6240\u4EE5\u5728jdk8\u8FDB\u884C\u4E86\u4FEE\u6539\u3002

                                                                        \u6B7B\u94FE\u662F\u53D1\u751F\u5728\u6269\u5BB9\u7684\u65F6\u5019

                                                                        \u6269\u5BB9\u662F\u5F80HashMap\u91CCput\u5143\u7D20\uFF0C\u5F53\u5143\u7D20\u8FBE\u5230\u4E00\u4E2A\u9608\u503C\u65F6\u8FDB\u884C\u6269\u5BB9\uFF0C\u8FD9\u4E2A\u9608\u503C\u662F\u6570\u7EC4\u957F\u5EA6 * \u52A0\u8F7D\u56E0\u5B50\uFF0C\u52A0\u8F7D\u56E0\u5B50\u9ED8\u8BA4\u662F0.75\uFF0C\u6269\u5BB9\u662F\u6269\u5BB9\u4E3A\u539F\u6765\u7684\u4E24\u500D\uFF0C\u5E95\u5C42Entry[]\u6570\u7EC4\u521D\u59CB\u5927\u5C0F\u662F16\uFF08\u6216\u8005\u8BF4HashMap\u5728\u5E95\u5C42\u521D\u59CB\u5927\u5C0F\u662F16\uFF0C\u90A3\u4E48\u9608\u503C\u662F12\uFF0C\u8D85\u8FC712\u65F6\uFF0C\u5C31\u8981\u5F00\u59CB\u6269\u5BB9\uFF09

                                                                        ArrayList\u5E95\u5C42\u662FObject[]\u6570\u7EC4\uFF0C\u521D\u59CB\u5927\u5C0F\u662F10\uFF0C\u5982\u679C\u4E0D\u8DB310\uFF0C\u7B2C\u4E00\u6B21\u6269\u5BB9\uFF0C\u6269\u5BB9\u4E3A10\uFF0C\u4E4B\u540E\u90FD\u6269\u5BB9\u4E3A\u539F\u6765\u5927\u5C0F\u76841.5\u500D

                                                                        \u800CStringBuffer\u548CStringBuilder\u6269\u5BB9\u90FD\u662F\u6269\u5BB9\u4E3A\u539F\u6765\u76842\u500D+2\uFF0C\u5E95\u5C42\u6570\u7EC4\u521D\u59CB\u5927\u5C0F\u662F16.

                                                                        \u53EA\u8981\u662F\u6570\u7EC4\u6269\u5BB9\uFF0C\u90FD\u662F\u4F1A\u9020\u4E00\u4E2A\u65B0\u7684\u6570\u7EC4\uFF0C\u56E0\u4E3A\u6570\u7EC4\u5728\u5E95\u5C42\u7684\u957F\u5EA6\u662F\u521B\u5EFA\u65F6\u5C31\u786E\u5B9A\u4E86\u7684\uFF0C\u65B0\u5EFA\u4E00\u4E2A\u6570\u7EC4\u4E4B\u540E\uFF0C\u5C06\u539F\u6765\u6570\u7EC4\u7684\u6570\u636E\u590D\u5236\u8FC7\u6765\u3002

                                                                        \u6269\u5BB9\u4E4B\u540E\uFF0C\u5143\u7D20\u5728\u65B0\u7684\u6570\u7EC4\u53C8\u4F1A\u5206\u5F97\u66F4\u52A0\u5747\u5300

                                                                      5. \u6269\u5BB9\u7684\u65F6\u5019\u4F1A\u904D\u5386\u539FEntry[]\u6570\u7EC4\u7684\u67D0\u4E2A\u4F4D\u7F6E\u4E0A\u7684\u94FE\u8868\uFF0C\u904D\u5386\u6BCF\u4E00\u4E2AEntry\uFF0C\u628A\u4ED6\u4EEC\u653E\u5230\u65B0\u7684\u6570\u7EC4\u53BB

                                                                      6. HashMap\u5728jdk7\u4EA7\u751F\u7684\u6B7B\u94FE\u95EE\u9898\uFF1A

                                                                        \u6BD4\u5982\u5728Entry[]\u6570\u7EC4\u7684\u67D0\u4E2A\u4E0B\u6807\u4F4D\u7F6E\uFF0C\u6709\u4E00\u4E2A\u94FE\u8868\u662F\u8282\u70B91-\u8282\u70B92-null\uFF0C\u5373\u5934\u8282\u70B9\u5143\u7D20\u4E3A\u8282\u70B91\uFF0C\u4E0B\u4E00\u4E2A\u8282\u70B9\u4E3A\u8282\u70B92\uFF0C\u518D\u4E0B\u4E00\u4E2A\u8282\u70B9\u4E3Anull

                                                                        \u6B64\u65F6\u7EBF\u7A0BThread-0\u5728\u6267\u884Cput\u64CD\u4F5C

                                                                        \u9996\u5148\u8981\u660E\u786E\u6B7B\u94FE\u662F\u53D1\u751F\u5728\u6269\u5BB9\u65F6\uFF0C\u867D\u7136JDK8\u6539\u53D8\u4E86\u65B0\u8282\u70B9\u52A0\u5165\u94FE\u8868\u7684\u5B58\u50A8\u65B9\u5F0F\uFF0C\u89E3\u51B3\u4E86\u6B7B\u94FE\uFF0C\u4F46\u662F\u8FD8\u6709\u5176\u4ED6\u95EE\u9898\uFF0C\u6BD4\u5982\u6269\u5BB9\u4E22\u6570\u636E\uFF0C\u6839\u672C\u539F\u56E0\u662F\u56E0\u4E3A\u5728\u591A\u7EBF\u7A0B\u73AF\u5883\u4E0B\u91C7\u7528\u4E86HashMap\u8FD9\u79CD\u4E0D\u5B89\u5168\u7684\u96C6\u5408

                                                                        \u90A3\u4E48\u6B64\u65F6\u5982\u679C\u53D1\u751F\u6269\u5BB9\uFF0C\u5E76\u4E14\u8FD9\u4E2A\u6269\u5BB9\u64CD\u4F5C\u7531\u53E6\u4E00\u4E2A\u7EBF\u7A0BThread-1\u6765\u6267\u884C\uFF0C\u5047\u8BBE\u6269\u5BB9\u540E\u8282\u70B91\u548C\u8282\u70B92\u8FD8\u5728\u65B0\u6570\u7EC4\uFF08\u6269\u5BB9\u90FD\u4F1A\u9020\u4E00\u4E2A\u65B0\u6570\u7EC4\uFF09\u7684\u540C\u4E00\u4E2A\u4E0B\u6807\u4F4D\u7F6E\u4E0A\uFF0C\u90A3\u4E48\u9996\u5148\u8282\u70B91\u4F1A\u5B58\u50A8\u5230\u8FD9\u4E2A\u4E0B\u6807\u4F4D\u7F6E\uFF0C\u7531\u4E8EJDK7\u4F1A\u5C06\u65B0\u52A0\u5165\u7684\u5143\u7D20\u653E\u5728\u94FE\u8868\u7684\u5934\u90E8\u800C\u4E0D\u662F\u5C3E\u90E8\uFF0C\u6240\u4EE5\u8282\u70B92\u4F1A\u52A0\u5165\u5230\u94FE\u8868\u7684\u5934\u90E8\uFF0C\u90A3\u4E48\u5728\u65B0\u6570\u7EC4\u7684\u8FD9\u4E2A\u4E0B\u6807\u4F4D\u7F6E\u4E0A\uFF0C\u94FE\u8868\u4E3A\u8282\u70B92-\u8282\u70B91-null

                                                                        \u4F46\u662FThread-0\u8BB0\u5F55\u4E86\u5F53\u524D\u7684e\u4E3A\u8282\u70B91\uFF0Cnext\u4E3A\u8282\u70B92

                                                                        \u6240\u4EE5\u5F53\u524D\u7684e\u662F\u8282\u70B91-null

                                                                        next\u662F\u8282\u70B92-\u8282\u70B91-null

                                                                        \u6240\u4EE5\u6B64\u65F6Thread\u8BA4\u4E3A\u8282\u70B91\u6307\u5411\u8282\u70B92\uFF0C\u4F46\u662F\u5B9E\u9645\u4E0A\u662F\u8282\u70B92\u6307\u5411\u8282\u70B91\uFF0C

                                                                        \u90A3\u4E48\u5728\u4E0B\u4E00\u6B21\u5FAA\u73AF\u4F1A\u53D1\u751F\u5C06\u8282\u70B91-null\u79FB\u5230\u65B0\u7684\u6570\u7EC4\u7684\u94FE\u8868\u5934

                                                                        e\u53D8\u4E3A\u8282\u70B92-\u8282\u70B91-null

                                                                        next\u53D8\u4E3A\u8282\u70B91-null

                                                                        \u518D\u4E0B\u4E00\u6B21\u5FAA\u73AF\u4F1A\u53D1\u751F\u5C06\u8282\u70B92-\u8282\u70B91-null\u79FB\u5230\u65B0\u7684\u6570\u7EC4\u7684\u94FE\u8868\u5934

                                                                        e\u53D8\u4E3A\u8282\u70B91-null

                                                                        next\u53D8\u4E3Anull\uFF0C\u5F62\u6210\u6B7B\u94FE

                                                                      7. \u603B\u7ED3\uFF1A

                                                                        jdk1.7HashMap\u5728\u5E76\u53D1\u73AF\u5883\u4E0B\uFF0C\u6267\u884Cput\u64CD\u4F5C\u65F6\uFF0C\u4F1A\u5F15\u8D77\u6B7B\u5FAA\u73AF\uFF0C\u56E0\u4E3A\u591A\u7EBF\u7A0B\u4F1A\u5BFC\u81F4HashMap\u7684Entry\u94FE\u8868\u5F62\u6210\u6B7B\u94FE\u5373\u73AF\u5F62\u6570\u636E\u7ED3\u6784\uFF0C\u4E00\u65E6\u5F62\u6210\u73AF\u5F62\u6570\u636E\u7ED3\u6784\uFF0CEntry\u7684next\u8282\u70B9\u6C38\u8FDC\u4E0D\u4E3A\u7A7A\uFF0C\u5C31\u4F1A\u4EA7\u751F\u6B7B\u5FAA\u73AF

                                                                      8. JDK8\u867D\u7136\u5C06\u6269\u5BB9\u7B97\u6CD5\u505A\u4E86\u8C03\u6574\uFF0C\u5728\u6269\u5BB9\u65F6\uFF0C\u8282\u70B9\u4FDD\u6301\u4E86\u548C\u4E4B\u524D\u4E00\u6837\u7684\u987A\u5E8F\uFF0C\u65B0\u7684\u8282\u70B9\u88AB\u52A0\u5165\u5230\u94FE\u8868\u7684\u5C3E\u90E8\uFF0C\u89E3\u51B3\u4E86\u6B7B\u94FE\u95EE\u9898\uFF08\u53EA\u6709jdk7\u6709\u6B7B\u94FE\u95EE\u9898\uFF0C\u5728\u6269\u5BB9\u65F6\u4F1A\u53D1\u751F\uFF09

                                                                        \u4F46JDK8\u4ECD\u4E0D\u610F\u5473\u7740\u5728\u591A\u7EBF\u7A0B\u73AF\u5883\u4E0B\u80FD\u591F\u5B89\u5168\u6269\u5BB9\uFF0C\u8FD8\u4F1A\u51FA\u73B0\u5176\u4ED6\u95EE\u9898\uFF0C\u5728jdk8\u4E0B\uFF0CHashMap\u4ECD\u7136\u662F\u7EBF\u7A0B\u4E0D\u5B89\u5168\u7684\u3002

                                                                      \u91CD\u8981\u5C5E\u6027\u548C\u5185\u90E8\u7C7B

                                                                      1. image-20210910144345408

                                                                        \u5185\u90E8\u7C7Bclass Node\u662F\u6307\u540C\u4E00\u4E2A\u4E0B\u6807\u4F4D\u7F6E\u4E0A\u7684\u94FE\u8868

                                                                        ForwardingNode\u4F5C\u4E3A\u65E7table\u7684\u5934\u8282\u70B9\uFF0C\u4EE3\u8868\u65E7Entry[]\u6570\u7EC4\u7684\u8FD9\u4E2A\u4F4D\u7F6E\u4E0A\u7684\u8282\u70B9\u662F\u5904\u7406\u8FC7\u7684\uFF01

                                                                        TreeBin\u6307\u7EA2\u9ED1\u6811\uFF0C\u662Fjdk8\u5BF9HashMap\u5E95\u5C42\u7684\u4F18\u5316\uFF0C\u5728hash\u8868\u7684\u957F\u5EA6\u5927\u4E8E64\u548C\u94FE\u8868\u7684\u957F\u5EA6\u5927\u4E8E8\u65F6\uFF0C\u4F1A\u91C7\u7528\u7EA2\u9ED1\u6811\u6765\u4EE3\u66FF\u94FE\u8868\uFF0C\u53EF\u4EE5\u63D0\u9AD8\u67E5\u8BE2\u6548\u7387\uFF0C\u5E76\u4E14\u53EF\u4EE5\u4E00\u5B9A\u7A0B\u5EA6\u4E0A\u9632\u6B62DOS\u653B\u51FB\uFF08\u6076\u610F\u9020\u5927\u91CFhashcode\u4E00\u6837\u7684\u5BF9\u8C61\u5F80hashmap\u586B\u5145\uFF09

                                                                        \u94FE\u8868\u7684\u957F\u5EA6\u5927\u4E8E8\u65F6\uFF0C\u4F1A\u5C1D\u8BD5\u628A\u94FE\u8868\u8F6C\u6362\u6210\u7EA2\u9ED1\u6811\uFF0C\u4F46\u662F\u5728\u8F6C\u6362\u4E4B\u524D\uFF0C\u4F1A\u5C1D\u8BD5\u6269\u5BB9\uFF0C\u5982\u679C\u54C8\u5E0C\u8868\u7684\u957F\u5EA6\u6CA1\u6709\u8FBE\u523064\u65F6\uFF0C\u5148\u4E0D\u4F1A\u628A\u94FE\u8868\u53D8\u4E3A\u7EA2\u9ED1\u6811\uFF0C\u5148\u4F1A\u6269\u5BB9\u3002\u5F53\u54C8\u5E0C\u8868\u7684\u5BB9\u91CF\u6269\u5BB9\u523064\u65F6\uFF0C\u90A3\u4E48\u624D\u4F1A\u5C06\u94FE\u8868\u8F6C\u6362\u6210\u7EA2\u9ED1\u6811\u3002

                                                                      \u6784\u9020\u5668

                                                                      1. image-20210910145407027

                                                                        initialCapacity\u662F\u6307\u521D\u59CB\u5BB9\u91CF

                                                                        • \u521D\u59CB\u5BB9\u91CF\u8FBE\u4E0D\u5230\u5E76\u53D1\u5EA6\u65F6\uFF0C\u4F1A\u8BA9\u521D\u59CB\u5BB9\u91CF = \u5E76\u53D1\u5EA6
                                                                        • \u8BBE\u7F6E\u7684\u521D\u59CB\u5BB9\u91CF\u4E0D\u4E00\u5B9A\u662F\u771F\u6B63\u7684\u521D\u59CB\u5BB9\u91CF\uFF0C\u56E0\u4E3AtableSizeFor\u8981\u4FDD\u8BC1\u5BB9\u91CF\u662F2\u7684n\u6B21\u65B9\uFF0C\u6700\u5C0F\u662F16\uFF0C\u5982\u679C\u5C06\u521D\u59CB\u5BB9\u91CF\u8BBE\u7F6E\u4E3A8\uFF0C\u4F1A\u901A\u8FC7\u8FD9\u79CD\u8BA1\u7B97\u65B9\u5F0F\u5C06\u521D\u59CB\u5BB9\u91CF\u8BBE\u7F6E\u4E3A16

                                                                        loadFactor\u662F\u8D1F\u8F7D\u56E0\u5B50\uFF0C\u9ED8\u8BA4\u4E3A0.75

                                                                        concurrencyLevel \u5E76\u53D1\u5EA6

                                                                      2. ConcurrentHashMap\u6709\u5728table\u4E0B\u6807\u51B2\u7A81\u7684\u65F6\u5019\u624D\u4F1A\u52A0\u9501\uFF0C\u9501\u7684\u4E0D\u662F\u6574\u4E2Atable\uFF0C\u9501\u7684\u662F\u8FD9\u4E2A\u94FE\u8868\u7684\u5934\u8282\u70B9

                                                                        \u8FD9\u4E2A\u5730\u65B9\u4FDD\u8BC1\u4E86\u7EBF\u7A0B\u5B89\u5168\u6027\u3002\u5E76\u4E14\u662F\u7EC6\u7C92\u5EA6\u7684\u9501\uFF0C\u4FDD\u8BC1\u4E86Entry[]\u6570\u7EC4\u5176\u4ED6\u5143\u7D20\u8FD8\u80FD\u88AB\u7EBF\u7A0B\u8BBF\u95EE\u5230\u3002

                                                                        \u800CHashMap\u5219\u6CA1\u6709\u8FD9\u4E2A\u64CD\u4F5C\u3002

                                                                        \u5728\u521B\u5EFAConcurrentHashMap\u7684\u65F6\u5019\u4E5F\u4FDD\u8BC1\u7EBF\u7A0B\u5B89\u5168\uFF0C\u53EA\u6709\u4E00\u4E2A\u7EBF\u7A0B\u80FD\u591F\u521B\u5EFA

                                                                      jdk7 ConcurrentHashMap

                                                                      1. \u7EF4\u62A4\u4E86\u4E00\u4E2Asegment\u6570\u7EC4\uFF0C\u6BCF\u4E2Asegment\u5BF9\u5E94\u4E00\u628A\u9501\uFF08\u5206\u6BB5\u9501\uFF09

                                                                        jdk7\u662F\u628A\u9501\u52A0\u5728\u6BCF\u4E2Asegment\u5BF9\u8C61\u4E0A\uFF0C\u800Cjdk8\u662F\u628A\u9501\u52A0\u5728\u94FE\u8868\u7684\u5934\u8282\u70B9

                                                                        \u7F3A\u70B9\uFF1A

                                                                        • \u4E0D\u662F\u61D2\u60F0\u521D\u59CB\u5316
                                                                        • Segment\u6570\u7EC4\u9ED8\u8BA4\u5927\u5C0F\u4E3A16\uFF0C\u5BB9\u91CF\u521D\u59CB\u5316\u6307\u5B9A\u540E\u5C31\u4E0D\u80FD\u6539\u53D8\u4E86\uFF0C\u4F46\u662FJDK8\u7684Hash\u8868\u662F\u6709\u6269\u5BB9\u673A\u5236\u7684\u3002
                                                                      2. \u6BCF\u4E2Asegment\u5BF9\u5E94\u4E8E\u4E00\u4E2A\u5C0F\u7684Hash\u8868\uFF08HashEntry[]\u6570\u7EC4\uFF09\uFF0C\u6BCF\u4E2AHash\u8868\u91CC\u9762\u53C8\u662F\u6570\u7EC4\u52A0\u94FE\u8868\u7684\u7ED3\u6784

                                                                        \u4E00\u4E2Asegment\u5BF9\u5E94\u4E8E\u4E00\u4E2A\u6570\u7EC4+\u94FE\u8868\u7ED3\u6784\u3002\u6570\u7EC4\u662FHashEntry[]\u6570\u7EC4\uFF0C\u6570\u7EC4\u91CC\u6BCF\u4E2A\u5143\u7D20\u662F\u4E00\u4E2A\u94FE\u8868\uFF0C\u94FE\u8868\u91CC\u6BCF\u4E00\u4E2A\u5143\u7D20\u662FHashEntry

                                                                      3. jdk7\u7684HashMap\u5728\u591A\u7EBF\u7A0B\u73AF\u5883\u4E0B\uFF0C\u8FDB\u884Cput\u64CD\u4F5C\uFF0C\u4F1A\u4EA7\u751F\u73AF\u5F62\u94FE\u8868\u95EE\u9898\uFF0C\u4F1A\u4EA7\u751F\u6B7B\u94FE\uFF0C\u9020\u6210\u6B7B\u5FAA\u73AF\uFF0Cjdk8\u867D\u7136\u6539\u53D8\u4E86\u8FD9\u79CDput\u65F6\uFF0C\u5C06\u8282\u70B9\u63D2\u5165\u5230\u94FE\u8868\u7684\u5934\u90E8\u6539\u4E3A\u4E86\u8282\u70B9\u63D2\u5165\u5230\u94FE\u8868\u7684\u5C3E\u90E8\uFF0C\u89E3\u51B3\u4E86\u6B7B\u94FE\u95EE\u9898\uFF0C\u4F46\u662F\u5E76\u4E0D\u610F\u5473\u7740jdk8\u4E0B\u7684HashMap\u80FD\u591F\u5728\u591A\u7EBF\u7A0B\u73AF\u5883\u4E0B\u5B89\u5168\u6269\u5BB9\uFF0C\u4ECD\u7136\u6709\u5176\u4ED6\u7EBF\u7A0B\u5B89\u5168\u95EE\u9898\u3002\u6839\u672C\u539F\u56E0\u662F\u56E0\u4E3AHashMap\u662F\u7EBF\u7A0B\u4E0D\u5B89\u5168\u7684

                                                                        \u6240\u4EE5\u60F3\u8981\u91C7\u7528\u7EBF\u7A0B\u5B89\u5168\u7684HashMap\uFF0C\u5E94\u8BE5\u91C7\u7528ConcurrentHashMap

                                                                        \u800CConcurrentHashMap\u5728jdk7\u548Cjdk8\u5B9E\u73B0\u7EBF\u7A0B\u5B89\u5168\u95EE\u9898\u7684\u65B9\u5F0F\u662F\u4E0D\u540C\u7684

                                                                      4. ConcurrentHashMap\u5728jdk7\u4E0B\u662F\u91C7\u7528segment\u5206\u6BB5\u9501\u7684\u65B9\u5F0F\u5B9E\u73B0\u7684\u7EBF\u7A0B\u5B89\u5168\uFF0C\u5728jdk8\u4E2D\u662F\u91C7\u7528\u7684CAS+Synchronized\u9501\u7684\u65B9\u5F0F\u5B9E\u73B0\u7684\u7EBF\u7A0B\u5B89\u5168\uFF0C\u8FD9\u91CC\u7684Synchronized\u53EA\u6709\u5728put\u7684\u65F6\u5019\uFF0C\u5BF9\u94FE\u8868\u7684\u5934\u90E8\u8282\u70B9\u8FDB\u884C\u4E0A\u9501\uFF0C\u5E76\u4E0D\u662F\u5BF9\u6574\u4E2AMap\u8FDB\u884C\u4E0A\u9501\uFF0C\u91C7\u7528\u7684\u662F\u7EC6\u7C92\u5EA6\u9501\uFF0C\u800C\u4E14\u5728jdk6\u4E2D\u5DF2\u7ECF\u6DFB\u52A0\u4E86Synchronized\u4ECE\u504F\u5411\u9501\u5230\u8F7B\u91CF\u7EA7\u9501\u5230Monitor\u91CD\u91CF\u7EA7\u9501\u7684\u5347\u7EA7\u65B9\u5F0F\uFF0C\u6240\u4EE5\u6548\u7387\u6709\u6240\u63D0\u5347

                                                                        segment\u626E\u6F14\u7684\u9501\u7684\u89D2\u8272\uFF0C\u5B9E\u9645\u662F\u7EE7\u627F\u7684ReentrantLock\u7684\u65B9\u5F0F

                                                                      5. \u4E3A\u4EC0\u4E48\u91C7\u7528ConcurrentHashMap\uFF0C\u800C\u4E0D\u91C7\u7528HashTable\uFF1F

                                                                        HashTable\u5BB9\u5668\u4F7F\u7528synchronized\u6765\u4FDD\u8BC1\u7EBF\u7A0B\u5B89\u5168\uFF0C\u4F46\u5728\u7EBF\u7A0B\u7ADE\u4E89\u6FC0\u70C8\u7684\u60C5\u51B5\u4E0BHashTable\u7684\u6548\u7387\u5F88\u4F4E\u4E0B\uFF0C\u56E0\u4E3A\u53EA\u6709\u4E00\u628A\u76D1\u89C6\u5668\u9501\uFF0C\u5F53\u7136\u91C7\u7528synchronized\u672C\u6765\u5C31\u5E94\u8BE5\u4FDD\u8BC1\u53EA\u6709\u4E00\u628A\u76D1\u89C6\u5668\u9501\uFF0C\u6240\u4EE5\u540E\u9762\u91C7\u7528\u7684\u5206\u6BB5\u9501\u7684\u65B9\u5F0F\u3002HashTable\u5BF9get\u64CD\u4F5C\u548Cput\u64CD\u4F5C\u90FD\u8981\u4E0A\u9501\uFF0C\u6548\u7387\u4F4E\u4E0B\u3002ConcurrentHashMap\u7684get\u64CD\u4F5C\u662F\u4E0D\u9700\u8981\u4E0A\u9501\u7684\uFF0C\u56E0\u4E3A\u91C7\u7528\u4E86volatile\u6765\u4FEE\u9970\u5171\u4EAB\u53D8\u91CF\uFF0C\u6240\u6709\u7EBF\u7A0B\u5728get\u8FD9\u4E2A\u8BFB\u64CD\u4F5C\u90FD\u80FD\u4ECE\u4E3B\u5B58\u4E2D\u83B7\u5F97\u5171\u4EAB\u53D8\u91CF\u7684\u6700\u65B0\u503C\uFF0C\u4E0D\u4F1A\u5BFC\u81F4\u8BFB\u53D6\u9519\u8BEF\u7684\u60C5\u51B5\uFF0C\u6D89\u53CA\u5230\u5185\u5B58\u5C4F\u969C\uFF0C\u6240\u4EE5get\u64CD\u4F5C\u4E0D\u9700\u8981\u4E0A\u9501\u3002

                                                                        \u53EA\u6709\u4E00\u628A\u76D1\u89C6\u5668\u9501\uFF0C\u5BFC\u81F4\u4E86\u5F53\u4E00\u4E2A\u7EBF\u7A0B\u8BBF\u95EEHashTable\u7684\u540C\u6B65\u65B9\u6CD5\u7684\u65F6\u5019\uFF0C\u5176\u4ED6\u7EBF\u7A0B\u4E5F\u8BBF\u95EEHashTable\u7684\u540C\u6B65\u65B9\u6CD5\u65F6\uFF0C\u4F1A\u8FDB\u5165\u963B\u585E\u6216\u8F6E\u8BE2\u72B6\u6001\uFF0C\u65E2\u4E0D\u80FDget\u4E5F\u4E0D\u80FDput\u3002\uFF08\u8FDEget()\u8FD9\u79CD\u8BFB\u64CD\u4F5C\u90FD\u4E0D\u53EF\u4EE5\uFF0C\u5E76\u4E14\u5BB9\u6613\u5F15\u8D77\u7EBF\u7A0B\u963B\u585E\uFF0C\u8FDB\u800C\u9020\u6210\u7EBF\u7A0B\u7684\u9891\u7E41\u4E0A\u4E0B\u6587\u5207\u6362\u5BFC\u81F4\u5F00\u9500\uFF09

                                                                      6. \u6240\u4EE5ConcurrentHashMap\u5728jdk7\u4E0B\u662F\u91C7\u7528segment\u5206\u6BB5\u9501\u7684\u65B9\u5F0F\u5B9E\u73B0\u7684\u7EBF\u7A0B\u5B89\u5168

                                                                        \u5206\u6BB5\u9501\uFF0C\u901A\u4FD7\u7406\u89E3\u4E3A\u6709\u591A\u4E2A\u6570\u636E\u6BB5\uFF0C\u6BCF\u4E2A\u6570\u636E\u6BB5\u5BF9\u5E94\u4E00\u628A\u9501\uFF0C\u62FF\u5230\u67D0\u4E00\u4E2A\u6570\u636E\u6BB5\u7684\u9501\uFF0C\u5C31\u53EF\u4EE5\u64CD\u4F5C\u8FD9\u4E2A\u6570\u636E\u6BB5\u7684\u5185\u5BB9\u3002

                                                                        \u5F53\u591A\u4E2A\u7EBF\u7A0B\u8BBF\u95EE\u5BB9\u5668\u91CC\u4E0D\u540C\u6570\u636E\u6BB5\u7684\u6570\u636E\u65F6\uFF0C\u7EBF\u7A0B\u95F4\u5C31\u4E0D\u4F1A\u4EA7\u751F\u9501\u7ADE\u4E89\uFF0C\u63D0\u9AD8\u6548\u7387

                                                                        \u9996\u5148\u5C06\u6570\u636E\u5206\u6210\u4E00\u6BB5\u4E00\u6BB5\u5730\u5B58\u50A8\uFF0C\u7136\u540E\u7ED9\u6BCF\u4E00\u6BB5\u6570\u636E\u914D\u4E00\u628A\u9501\uFF0C\u5F53\u4E00\u4E2A\u7EBF\u7A0B\u5360\u7528\u67D0\u4E00\u6BB5\u7684\u9501\u8BBF\u95EE\u5176\u4E2D\u4E00\u4E2A\u6BB5\u7684\u6570\u636E\u7684\u65F6\u5019\uFF0C\u5176\u4ED6\u6BB5\u7684\u6570\u636E\u4E5F\u80FD\u88AB\u5176\u4ED6\u7EBF\u7A0B\u8BBF\u95EE\u3002

                                                                      7. Segment\u662F\u4E00\u79CD\u53EF\u91CD\u5165\u9501---ReentrantLock\uFF0C\u5728ConcurrentHashMap\u91CC\u626E\u6F14\u9501\u7684\u89D2\u8272

                                                                      8. \u4E00\u4E2ASegment\u5305\u542B\u4E00\u4E2AHashEntry\u6570\u7EC4\uFF0C\u6BCF\u4E2AHashEntry\u662F\u4E00\u4E2A\u94FE\u8868\u7ED3\u6784\u7684\u5143\u7D20

                                                                        \u5C31\u76F8\u5F53\u4E8E\u4E00\u4E2ASegment\u5BF9\u5E94\u4E8E\u4E00\u4E2A\u5C0F\u7684Hash\u8868\uFF0C\u662F\u6570\u7EC4\u52A0\u94FE\u8868\u7684\u7ED3\u6784

                                                                        \u5F53\u5BF9HashEntry\u6570\u7EC4\u7684\u6570\u636E\u8FDB\u884C\u4FEE\u6539\u7684\u65F6\u5019\uFF0C\u5FC5\u987B\u9996\u5148\u83B7\u5F97\u4E0E\u5B83\u5BF9\u5E94\u7684segment\u9501

                                                                        image-20210910170942805

                                                                      9. segment\u5C31\u53EF\u4EE5\u76F4\u63A5\u7406\u89E3\u4E3A\u9501\uFF0C\u5206\u6BB5\u9501\uFF0Csegment\u5C31\u662F\u9501

                                                                      10. \u65E2\u7136ConcurrentHashMap\u4F7F\u7528\u5206\u6BB5\u9501segment\u6765\u4FDD\u62A4\u4E0D\u540C\u6BB5\u7684\u6570\u636E\uFF0C\u90A3\u4E48\u5FC5\u987B\u901A\u8FC7\u6563\u5217\u7B97\u6CD5\u5B9A\u4F4D\u5230Segment

                                                                        \u8FD9\u91CC\u7684\u901A\u8FC7\u6563\u5217\u7B97\u6CD5\u5B9A\u4F4D\uFF0C\u4E0D\u662F\u7528hashCode\u901A\u8FC7\u6563\u5217\u7B97\u6CD5\u5B9A\u4F4D\uFF0C\u662F\u5C06hashCode\u518D\u6563\u5217\u4E00\u6B21\u540E\u5F97\u5230\u65B0\u7684hash\u503C\uFF0C\u518D\u901A\u8FC7\u6563\u5217\u7B97\u6CD5\u6216\u8005\u8BF4\u6620\u5C04\u7B97\u6CD5\u5B9A\u4F4D\u3002

                                                                        ConcurrentHashMap\u4F1A\u9996\u5148\u4F7F\u7528Wang/Jenkins hash\u7684\u53D8\u79CD\u7B97\u6CD5\u5BF9\u5143\u7D20\u7684hashCode\u8FDB\u884C\u518D\u6563\u5217

                                                                      11. \u8FDB\u884C\u518D\u6563\u5217\u7684\u539F\u56E0\uFF1A

                                                                        \u51CF\u5C11\u6563\u5217\u51B2\u7A81\uFF0C\u4F7F\u5143\u7D20\u80FD\u591F\u5747\u5300\u5730\u5206\u5E03\u5728\u4E0D\u540C\u7684Segment\u4E0A\uFF0C\u52A0\u5165\u6563\u5217\u7684\u8D28\u91CF\u5DEE\u5230\u6781\u70B9\uFF0C\u90A3\u4E48\u6240\u6709\u7684\u5143\u7D20\u90FD\u5728\u4E00\u4E2Asegment\u4E2D\uFF0C\u8FD9\u6837\u4E5F\u5931\u53BB\u4E86\u5206\u6BB5\u9501\u7684\u610F\u4E49\u3002

                                                                        \u518D\u6563\u5217\u4E0D\u662F\u6307\u7684\u5B9A\u4F4D\u7684\u8FC7\u7A0B\uFF0C\u662F\u6307\u5BF9hashCode\u518D\u6563\u5217\u7684\u8FC7\u7A0B\uFF0C\u6BD4\u5982int hash = hash(key.hashCode())

                                                                        \u901A\u8FC7\u518D\u6563\u5217\u4E4B\u540E\u7684hash\u503C\uFF0C\u53BB\u5B9A\u4F4D\u3002\u5B9A\u4F4D\u662F\u901A\u8FC7\u6563\u5217\u7B97\u6CD5\u6216\u6620\u5C04\u7B97\u6CD5\u53BB\u5B9A\u4F4D

                                                                        • \u5F97\u5230hashCode\u503C
                                                                        • \u518D\u6563\u5217\u5F97\u5230\u65B0\u7684hash\u503C
                                                                        • \u901A\u8FC7\u65B0\u7684hash\u503C\uFF0C\u901A\u8FC7\u6563\u5217\u51FD\u6570\u6216\u8005\u6620\u5C04\u7B97\u6CD5\u53BB\u5B9A\u4F4D\u5230segment
                                                                      12. get()\u64CD\u4F5C

                                                                        • \u5F97\u5230hashCode\u503C
                                                                        • \u518D\u6563\u5217\u5F97\u5230\u65B0\u7684hash\u503C
                                                                        • \u901A\u8FC7\u65B0\u7684hash\u503C\uFF0C\u901A\u8FC7\u6563\u5217\u7B97\u6CD5\u5B9A\u4F4D\u5230segment
                                                                          • \u5B9A\u4F4Dsegment\u4F7F\u7528\u7684\u662FhashCode\u901A\u8FC7\u518D\u6563\u5217\u540E\u5F97\u5230\u7684\u503C\u5373\u7B2C\u4E8C\u6B65\u7684\u65B0\u7684hash\u503C\u7684\u9AD8\u4F4D\u53BB\u901A\u8FC7\u6563\u5217\u7B97\u6CD5\u8FDB\u884C\u5B9A\u4F4D
                                                                        • \u518D\u901A\u8FC7\u6563\u5217\u7B97\u6CD5\u5B9A\u4F4D\u5230\u5143\u7D20
                                                                          • \u5B9A\u4F4DHashEntry\uFF0C\u4F7F\u7528\u7684\u662F\u7B2C\u4E8C\u6B65\u7684hash\u503C\u53BB\u901A\u8FC7\u6563\u5217\u7B97\u6CD5\u53BB\u5B9A\u4F4D\u3002

                                                                        HashTable\u5BB9\u5668\u7684get\u65B9\u6CD5\u662F\u9700\u8981\u52A0\u9501\u7684\uFF0CConcurrentHashMap\u7684get\u64CD\u4F5C\u4E0D\u9700\u8981\u52A0\u9501\uFF0C\u5171\u4EAB\u53D8\u91CF\u90FD\u5B9A\u4E49\u6210volatile\u7C7B\u578B\uFF0C\u80FD\u591F\u5728\u7EBF\u7A0B\u4E4B\u95F4\u4FDD\u6301\u53EF\u89C1\u6027\uFF0C\u80FD\u591F\u88AB\u591A\u7EBF\u7A0B\u540C\u65F6\u8BFB\uFF0C\u5E76\u4E14\u4FDD\u8BC1\u4E0D\u4F1A\u8BFB\u5230\u8FC7\u671F\u7684\u503C\u3002\u8FD9\u91CC\u7684\u539F\u7406\u662F\u5185\u5B58\u5C4F\u969C\uFF0C\u9762\u8BD5\u7684\u65F6\u5019\u53EF\u4EE5\u591A\u8BF4\u4E00\u8BF4

                                                                      13. put()\u65B9\u6CD5

                                                                        • \u9996\u5148\u5B9A\u4F4D\u5230segment\uFF0C\u548C\u4E4B\u524Dget()\u65B9\u6CD5\u7684\u5B9A\u4F4D\u65B9\u5F0F\u76F8\u540C
                                                                        • get()\u53EF\u4EE5\u4E0D\u52A0\u9501\uFF0C\u4F46\u662Fput()\u5FC5\u987B\u52A0\u9501\uFF0C\u662F\u7531\u4E8Eput\u65B9\u6CD5\u662F\u5BF9\u5171\u4EAB\u53D8\u91CF\u8FDB\u884C\u5199\u5165\u64CD\u4F5C
                                                                        • \u5B9A\u4F4D\u5230segment\u4E4B\u540E\uFF0C\u9996\u5148\u4F1A\u5C1D\u8BD5\u83B7\u53D6\u9501\uFF0C\u5982\u679C\u83B7\u53D6\u5931\u8D25\u80AF\u5B9A\u6709\u5176\u4ED6\u7EBF\u7A0B\u7ADE\u4E89
                                                                        • \u7136\u540E\u5C1D\u8BD5\u81EA\u65CB\u83B7\u53D6\u9501
                                                                          • \u5982\u679C\u91CD\u8BD5\u7684\u6B21\u6570\u8FBE\u5230\u4E86MAX_SCAN_RETRIES\uFF0C\u5219\u6539\u4E3A\u963B\u585E\u9501\u83B7\u53D6\uFF0C\u4FDD\u8BC1\u80FD\u83B7\u53D6\u6210\u529F
                                                                        • \u5BF9\u5B9A\u4F4D\u5230\u7684segment\u7684HashEntry\u5224\u65AD\u662F\u5426\u9700\u8981\u8FDB\u884C\u6269\u5BB9\u3002\uFF08\u4E00\u4E2Asegment\u5BF9\u5E94\u4E8E\u4E00\u4E2AHashEntry\u6570\u7EC4\uFF0C\u6570\u7EC4\u7684\u6BCF\u4E2A\u5143\u7D20\u662F\u94FE\u8868\u7ED3\u6784\u7684\u5143\u7D20\uFF0C\u94FE\u8868\u7684\u6BCF\u4E2A\u5143\u7D20\u4E3AHashEntry\uFF09

                                                                        ConcurrentHashMap\u53EA\u5BF9\u67D0\u4E2ASegment\u8FDB\u884C\u6269\u5BB9\u800C\u4E0D\u4F1A\u5BF9\u6574\u4E2AMap\u8FDB\u884C\u6269\u5BB9\u3002

                                                                      14. size()\u65B9\u6CD5

                                                                        ConcurrentHashMap\u7684\u505A\u6CD5\u662F\u5148\u5C1D\u8BD52\u6B21\u901A\u8FC7\u4E0D\u9501\u4F4FSegment\u7684\u65B9\u5F0F\u6765\u7EDF\u8BA1\u5404\u4E2Asegment\u7684\u5927\u5C0F\uFF0C\u5982\u679C\u5BB9\u5668\u7684count\u53D1\u751F\u4E86\u53D8\u5316\uFF0C\u5219\u518D\u91C7\u7528\u52A0\u9501\u7684\u65B9\u5F0F\u6765\u7EDF\u8BA1\u6240\u6709segment\u7684\u5927\u5C0F

                                                                      15. \u7528 volatile \u4FEE\u9970\u4E86 HashEntry \u7684\u6570\u636E value \u548C \u4E0B\u4E00\u4E2A\u8282\u70B9 next\uFF0C\u4FDD\u8BC1\u4E86\u591A\u7EBF\u7A0B\u73AF\u5883\u4E0B\u6570\u636E\u83B7\u53D6\u65F6\u7684\u53EF\u89C1\u6027\uFF01

                                                                        \u6240\u4EE5get\u64CD\u4F5C\u4E0D\u9700\u8981\u52A0\u9501\uFF0C\u4F46\u662Fput\u64CD\u4F5C\u662F\u5199\u64CD\u4F5C\uFF0C\u9700\u8981\u52A0\u9501\uFF0Csegment\u5C31\u662F\u9501\uFF0C\u9700\u8981\u5148\u83B7\u5F97segment\uFF0C\u624D\u80FD\u5BF9segment\u4E0B\u7684HashEntry\u8FDB\u884C\u4E0B\u4E00\u6B65\u64CD\u4F5C\u3002

                                                                        image-20210910171404634

                                                                      jdk8 ConcurrentHashMap

                                                                      1. \u5728\u6570\u636E\u7ED3\u6784\u4E0A\uFF0C JDK1.8 \u4E2D\u7684ConcurrentHashMap \u9009\u62E9\u4E86\u4E0E HashMap \u76F8\u540C\u7684Node\u6570\u7EC4+\u94FE\u8868+\u7EA2\u9ED1\u6811\u7ED3\u6784\uFF1B\u5728\u9501\u7684\u5B9E\u73B0\u4E0A\uFF0C\u629B\u5F03\u4E86\u539F\u6709\u7684 Segment \u5206\u6BB5\u9501\uFF0C\u91C7\u7528 CAS + synchronized\u5B9E\u73B0\u66F4\u52A0\u7EC6\u7C92\u5EA6\u7684\u9501\u3002

                                                                        jdk7\u662F\u628A\u9501\u52A0\u5728\u6BCF\u4E2Asegment\u5BF9\u8C61\u4E0A\uFF0C\u800Cjdk8\u662F\u628A\u9501\u52A0\u5728\u94FE\u8868\u7684\u5934\u8282\u70B9

                                                                        jdk8\u5C06\u9501\u7684\u7EA7\u522B\u63A7\u5236\u5728\u4E86\u66F4\u52A0\u7EC6\u7C92\u5EA6\u7684\u5143\u7D20\u7EA7\u522B\uFF0C\u53EA\u9700\u8981\u9501\u4F4F\u94FE\u8868\u5934\u8282\u70B9\uFF08\u5982\u679C\u662F\u7EA2\u9ED1\u6811\uFF0C\u90A3\u4E48\u9501\u4F4F\u7EA2\u9ED1\u6811\u7684\u6839\u8282\u70B9\uFF09\uFF0C\u5C31\u4E0D\u4F1A\u5F71\u54CD\u5176\u4ED6\u6570\u7EC4\u5143\u7D20\u7684\u8BFB\u5199\uFF0C\u5927\u5927\u63D0\u9AD8\u4E86\u5E76\u53D1\u5EA6\u3002

                                                                      2. put()

                                                                        1. \u6839\u636E key \u8BA1\u7B97\u51FA hash \u503C\uFF1B
                                                                        2. \u5224\u65AD\u662F\u5426\u9700\u8981\u8FDB\u884C\u521D\u59CB\u5316\uFF1B
                                                                        3. \u5B9A\u4F4D\u5230 Node\uFF0C\u62FF\u5230\u9996\u8282\u70B9 f\uFF0C\u5224\u65AD\u9996\u8282\u70B9 f\uFF1A
                                                                          • \u5982\u679C\u4E3A null \uFF0C\u5219\u901A\u8FC7 CAS \u7684\u65B9\u5F0F\u5C1D\u8BD5\u6DFB\u52A0\uFF1B
                                                                          • \u5982\u679C\u4E3A f.hash = MOVED = -1 \uFF0C\u8BF4\u660E\u5176\u4ED6\u7EBF\u7A0B\u5728\u6269\u5BB9\uFF0C\u53C2\u4E0E\u4E00\u8D77\u6269\u5BB9\uFF1B
                                                                          • \u5982\u679C\u90FD\u4E0D\u6EE1\u8DB3 \uFF0Csynchronized \u9501\u4F4F f \u8282\u70B9(\u8FD9\u4E2A\u5730\u65B9\u7684\u7EA7\u522B\u662F\u5BF9\u94FE\u8868\u7684\u5934\u8282\u70B9\u8FDB\u884C\u52A0\u9501\uFF0C\u5E76\u4E0D\u5F71\u54CDEntry[]\u6570\u7EC4\u7684\u5176\u4ED6\u5143\u7D20\uFF0C\u5927\u5927\u63D0\u9AD8\u4E86\u6548\u7387)\uFF0C\u5224\u65AD\u662F\u94FE\u8868\u8FD8\u662F\u7EA2\u9ED1\u6811\uFF0C\u904D\u5386\u63D2\u5165\uFF1B
                                                                        4. \u5F53\u5728\u94FE\u8868\u957F\u5EA6\u8FBE\u5230 8 \u7684\u65F6\u5019\uFF0C\u6570\u7EC4\u6269\u5BB9\u6216\u8005\u5C06\u94FE\u8868\u8F6C\u6362\u4E3A\u7EA2\u9ED1\u6811\uFF08\u6269\u5BB9\u8FD8\u662F\u8F6C\u6362\u4E3A\u7EA2\u9ED1\u6811\uFF0C\u5C31\u770B\u5F53\u524D\u6570\u7EC4\u7684\u957F\u5EA6\u662F\u5426\u662F\u5927\u4E8E64\uFF0C\u5982\u679C\u6CA1\u6709\u5927\u4E8E64\uFF0C\u90A3\u4E48\u6269\u5BB9\uFF0C\u5927\u4E8E64\uFF0C\u4FBF\u8F6C\u6362\u4E3A\u7EA2\u9ED1\u6811\uFF09\u3002
                                                                      3. get()

                                                                        1. \u6839\u636E key \u8BA1\u7B97\u51FA hash \u503C\uFF0C\u5224\u65AD\u6570\u7EC4\u662F\u5426\u4E3A\u7A7A\uFF1B
                                                                        2. \u5982\u679C\u662F\u9996\u8282\u70B9\uFF0C\u5C31\u76F4\u63A5\u8FD4\u56DE\uFF1B
                                                                        3. \u5982\u679C\u662F\u7EA2\u9ED1\u6811\u7ED3\u6784\uFF0C\u5C31\u4ECE\u7EA2\u9ED1\u6811\u91CC\u9762\u67E5\u8BE2\uFF1B
                                                                        4. \u5982\u679C\u662F\u94FE\u8868\u7ED3\u6784\uFF0C\u5FAA\u73AF\u904D\u5386\u5224\u65AD\u3002

                                                                        get \u65B9\u6CD5\u548Cjdk1.7\u4E00\u6837\uFF0C\u540C\u6837\u4E0D\u9700\u8981\u52A0\u9501\u3002\u56E0\u4E3A Node \u7684\u5143\u7D20 value \u548C\u6307\u9488 next \u662F\u7528 volatile \u4FEE\u9970\u7684\uFF0C\u4FDD\u8BC1\u4E86\u5171\u4EAB\u53D8\u91CF\u7684\u53EF\u89C1\u6027\uFF0C\u5728\u591A\u7EBF\u7A0B\u73AF\u5883\u4E0B\u7EBF\u7A0BA\u4FEE\u6539\u8282\u70B9\u7684 value \u6216\u8005\u65B0\u589E\u8282\u70B9\u7684\u65F6\u5019\u662F\u5BF9\u7EBF\u7A0BB\u53EF\u89C1\u7684\u3002

                                                                        \u8FD9\u4E5F\u662F\u5B83\u6BD4\u5176\u4ED6\u5E76\u53D1\u96C6\u5408\u6BD4\u5982 Hashtable\u3001\u7528 Collections.synchronizedMap()\u5305\u88C5\u7684 HashMap \u6548\u7387\u9AD8\u7684\u539F\u56E0\u4E4B\u4E00\u3002

                                                                      4. \u603B\u7ED3\uFF1A

                                                                        jdk1.7\u548Cjdk1.8\u7684ConcurrentHashMap\u7684put()\u64CD\u4F5C\u90FD\u662F\u8981\u52A0\u9501\u7684\uFF0C\u5206\u522B\u662F\u5206\u6BB5\u9501\uFF08segment---ReentrantLock\uFF09\u548C\u5BF9\u94FE\u8868\u5934\u8282\u70B9\u8FDB\u884C\u52A0\u9501\u3002

                                                                        jdk1.7\u5728put\u7684\u65F6\u5019\u4F1A\u901A\u8FC7\u81EA\u65CB\u83B7\u5F97\u9501\uFF0C\u8FBE\u5230\u4E00\u5B9A\u6B21\u6570\u540E\uFF0C\u4E00\u5B9A\u80FD\u83B7\u5F97\u9501

                                                                        jdk1.8\u5728put\u7684\u65F6\u5019\u662F\u5BF9\u94FE\u8868\u5934\u90E8\u8282\u70B9\u52A0\u9501\uFF0C\u5E76\u4E0D\u5F71\u54CDEntry[]\u6570\u7EC4\u7684\u5176\u4ED6\u5143\u7D20

                                                                        \u800Cget\u65B9\u6CD5\uFF0C\u5728jdk1.7\u548C1.8\u90FD\u4E0D\u9700\u8981\u52A0\u9501\uFF0C\u539F\u56E0\u5C31\u662F\u4E0A\u9762\u7B2C\u56DB\u70B9\u8BF4\u7684\u539F\u56E0

                                                                      5. JDK1.8 \u4E2D\u4E3A\u4EC0\u4E48\u4F7F\u7528\u5185\u7F6E\u9501 synchronized\u66FF\u6362 ReentrantLock\uFF1F\u2605\u2605\u2605\u2605\u2605

                                                                        • \u5728 JDK1.6 \u4E2D\uFF0C\u5BF9 synchronized \u9501\u7684\u5B9E\u73B0\u5F15\u5165\u4E86\u5927\u91CF\u7684\u4F18\u5316\uFF0C\u5E76\u4E14 synchronized \u6709\u591A\u79CD\u9501\u72B6\u6001\uFF0C\u4F1A\u4ECE\u65E0\u9501 -> \u504F\u5411\u9501 -> \u8F7B\u91CF\u7EA7\u9501 -> \u91CD\u91CF\u7EA7\u9501\u4E00\u6B65\u6B65\u8F6C\u6362\u3002
                                                                        • \u51CF\u5C11\u5185\u5B58\u5F00\u9500 \u3002\u5047\u8BBE\u4F7F\u7528ReentrantLock\u6765\u83B7\u5F97\u540C\u6B65\u652F\u6301\uFF08ReentrantLock\u5B9E\u73B0\u539F\u7406\u662FAQS\u62BD\u8C61\u961F\u5217\u540C\u6B65\u673A\u5236\uFF09\uFF0C\u90A3\u4E48\u6BCF\u4E2A\u8282\u70B9\u90FD\u9700\u8981\u901A\u8FC7\u7EE7\u627F AQS \u6765\u83B7\u5F97\u540C\u6B65\u652F\u6301\u3002\u4F46\u5E76\u4E0D\u662F\u6BCF\u4E2A\u8282\u70B9\u90FD\u9700\u8981\u83B7\u5F97\u540C\u6B65\u652F\u6301\u7684\uFF0C\u53EA\u6709\u94FE\u8868\u7684\u5934\u8282\u70B9\uFF08\u7EA2\u9ED1\u6811\u7684\u6839\u8282\u70B9\uFF09\u9700\u8981\u540C\u6B65\uFF0C\u8FD9\u65E0\u7591\u5E26\u6765\u4E86\u5DE8\u5927\u5185\u5B58\u6D6A\u8D39\u3002
                                                                      6. ConcurrentHashMap \u4E0D\u652F\u6301 key \u6216\u8005 value \u4E3A null \u7684\u539F\u56E0\uFF1F\u2605\u2605\u2605

                                                                        \u6211\u4EEC\u5148\u6765\u8BF4value \u4E3A\u4EC0\u4E48\u4E0D\u80FD\u4E3A null\u3002\u56E0\u4E3A ConcurrentHashMap \u662F\u7528\u4E8E\u591A\u7EBF\u7A0B\u7684 \uFF0C\u5982\u679CConcurrentHashMap.get(key)\u5F97\u5230\u4E86 null \uFF0C\u8FD9\u5C31\u65E0\u6CD5\u5224\u65AD\uFF0C\u662F\u6620\u5C04\u7684value\u662F null \uFF0C\u8FD8\u662F\u6CA1\u6709\u627E\u5230\u5BF9\u5E94\u7684key\u800C\u4E3A null \uFF0C\u5C31\u6709\u4E86\u4E8C\u4E49\u6027\u3002

                                                                        \u800C\u7528\u4E8E\u5355\u7EBF\u7A0B\u72B6\u6001\u7684 HashMap \u5374\u53EF\u4EE5\u7528containsKey(key) \u53BB\u5224\u65AD\u5230\u5E95\u662F\u5426\u5305\u542B\u4E86\u8FD9\u4E2A null \u3002

                                                                      7. ConcurrentHashMap \u7684\u5E76\u53D1\u5EA6\u662F\u4EC0\u4E48\uFF1F\u2605\u2605

                                                                        \u5E76\u53D1\u5EA6\u53EF\u4EE5\u7406\u89E3\u4E3A\u7A0B\u5E8F\u8FD0\u884C\u65F6\u80FD\u591F\u540C\u65F6\u66F4\u65B0 ConccurentHashMap\u4E14\u4E0D\u4EA7\u751F\u9501\u7ADE\u4E89\u7684\u6700\u5927\u7EBF\u7A0B\u6570\u3002\u5728JDK1.7\u4E2D\uFF0C\u5B9E\u9645\u4E0A\u5C31\u662FConcurrentHashMap\u4E2D\u7684\u5206\u6BB5\u9501\u4E2A\u6570\uFF0C\u5373Segment[]\u7684\u6570\u7EC4\u957F\u5EA6\uFF0C\u9ED8\u8BA4\u662F16\uFF0C\u8FD9\u4E2A\u503C\u53EF\u4EE5\u5728\u6784\u9020\u51FD\u6570\u4E2D\u8BBE\u7F6E\u3002

                                                                        \u5982\u679C\u81EA\u5DF1\u8BBE\u7F6E\u4E86\u5E76\u53D1\u5EA6\uFF0CConcurrentHashMap \u4F1A\u4F7F\u7528\u5927\u4E8E\u7B49\u4E8E\u8BE5\u503C\u7684\u6700\u5C0F\u76842\u7684\u5E42\u6307\u6570\u4F5C\u4E3A\u5B9E\u9645\u5E76\u53D1\u5EA6\uFF0C\u4E5F\u5C31\u662F\u6BD4\u5982\u4F60\u8BBE\u7F6E\u7684\u503C\u662F17\uFF0C\u90A3\u4E48\u5B9E\u9645\u5E76\u53D1\u5EA6\u662F32\u3002\u5982\u679C\u5C0F\u4E8E16\uFF0C\u90A3\u4E48\u5B9E\u9645\u5E76\u53D1\u5EA6\u662F16.

                                                                      8. ConcurrentHashMap \u8FED\u4EE3\u5668\u662F\u5F3A\u4E00\u81F4\u6027\u8FD8\u662F\u5F31\u4E00\u81F4\u6027\uFF1F\u2605\u2605

                                                                        \u4E0E HashMap \u8FED\u4EE3\u5668\u662F\u5F3A\u4E00\u81F4\u6027\u4E0D\u540C\uFF0CConcurrentHashMap \u8FED\u4EE3\u5668\u662F\u5F31\u4E00\u81F4\u6027\u3002

                                                                        ConcurrentHashMap \u7684\u8FED\u4EE3\u5668\u521B\u5EFA\u540E\uFF0C\u5C31\u4F1A\u6309\u7167\u54C8\u5E0C\u8868\u7ED3\u6784\u904D\u5386\u6BCF\u4E2A\u5143\u7D20\uFF0C\u4F46\u5728\u904D\u5386\u8FC7\u7A0B\u4E2D\uFF0C\u5185\u90E8\u5143\u7D20\u53EF\u80FD\u4F1A\u53D1\u751F\u53D8\u5316\uFF0C\u5982\u679C\u53D8\u5316\u53D1\u751F\u5728\u5DF2\u904D\u5386\u8FC7\u7684\u90E8\u5206\uFF0C\u8FED\u4EE3\u5668\u5C31\u4E0D\u4F1A\u53CD\u6620\u51FA\u6765\uFF0C\u800C\u5982\u679C\u53D8\u5316\u53D1\u751F\u5728\u672A\u904D\u5386\u8FC7\u7684\u90E8\u5206\uFF0C\u8FED\u4EE3\u5668\u5C31\u4F1A\u53D1\u73B0\u5E76\u53CD\u6620\u51FA\u6765\uFF0C\u8FD9\u5C31\u662F\u5F31\u4E00\u81F4\u6027\u3002

                                                                      9. \u4E3A\u4EC0\u4E48\u8BF4JDK1.8 \u91C7\u7528CAS+synchronized \u4FDD\u8BC1\u7EBF\u7A0B\u5B89\u5168\uFF1F

                                                                        1. ConcurrentHashMap \u5728put\u65F6\uFF0C\u5B9A\u4F4D\u5230Node\uFF0C\u5982\u679C\u8282\u70B9\u4E3Anull\uFF0C\u91C7\u7528CAS\u7684\u65B9\u5F0F\u5C1D\u8BD5\u6DFB\u52A0
                                                                        2. put\u65F6\uFF0C\u5B9A\u4F4D\u5230Node\uFF0C\u5982\u679CNode\u4E0D\u4E3Anull\uFF0C\u4F1A\u9501\u4F4F\u94FE\u8868\u7684\u5934\u8282\u70B9
                                                                        3. \u5B9A\u4F4D\u5230Node\uFF0C\u9996\u5148\u9700\u8981\u6839\u636Ekey\u8BA1\u7B97\u51FAhash\u503C
                                                                      10. JDK1.7 \u4E0E JDK1.8 \u4E2DConcurrentHashMap \u7684\u533A\u522B\uFF1F\u2605\u2605\u2605\u2605\u2605

                                                                        • \u6570\u636E\u7ED3\u6784\uFF1A\u53D6\u6D88\u4E86 Segment \u5206\u6BB5\u9501\u7684\u6570\u636E\u7ED3\u6784\uFF0C\u53D6\u800C\u4EE3\u4E4B\u7684\u662F\u6570\u7EC4+\u94FE\u8868+\u7EA2\u9ED1\u6811\u7684\u7ED3\u6784\uFF0C\u5C31\u6CA1\u6709segment\u5206\u6BB5\u8FD9\u79CD\u8BF4\u6CD5\u4E86\u3002

                                                                        • \u4FDD\u8BC1\u7EBF\u7A0B\u5B89\u5168\u673A\u5236\uFF1AJDK1.7\u91C7\u7528 Segment \u7684\u5206\u6BB5\u9501\u673A\u5236\u5B9E\u73B0\u7EBF\u7A0B\u5B89\u5168\uFF0C\u5176\u4E2D Segment \u7EE7\u627F\u81EA ReentrantLock \u3002JDK1.8 \u91C7\u7528CAS+synchronized \u4FDD\u8BC1\u7EBF\u7A0B\u5B89\u5168\u3002

                                                                        • \u9501\u7684\u7C92\u5EA6\uFF1AJDK1.7 \u662F\u5BF9\u9700\u8981\u8FDB\u884C\u6570\u636E\u64CD\u4F5C\u7684 Segment \u52A0\u9501\uFF0CJDK1.8 \u8C03\u6574\u4E3A\u5BF9\u6BCF\u4E2A\u6570\u7EC4\u5143\u7D20\u52A0\u9501\uFF08Node\uFF09\u3002

                                                                        • \u94FE\u8868\u8F6C\u5316\u4E3A\u7EA2\u9ED1\u6811\uFF1A\u5B9A\u4F4D\u8282\u70B9\u7684 hash \u7B97\u6CD5\u7B80\u5316\u4F1A\u5E26\u6765\u5F0A\u7AEF\uFF0Chash \u51B2\u7A81\u52A0\u5267\uFF0C\u56E0\u6B64\u5728\u94FE\u8868\u8282\u70B9\u6570\u91CF\u5927\u4E8E 8\uFF08\u4E14\u6570\u636E\u603B\u91CF\u5927\u4E8E\u7B49\u4E8E 64\uFF09\u65F6\uFF0C\u4F1A\u5C06\u94FE\u8868\u8F6C\u5316\u4E3A\u7EA2\u9ED1\u6811\u8FDB\u884C\u5B58\u50A8\u3002

                                                                          • \u5C06\u94FE\u8868\u8F6C\u6362\u4E3A\u7EA2\u9ED1\u6811\u4E4B\u524D\uFF0C\u8981\u5224\u65AD\u80FD\u5426\u8FDB\u884C\u6269\u5BB9\uFF0C\u5982\u679C\u80FD\u8FDB\u884C\u6269\u5BB9\uFF0C\u90A3\u4E48\u8981\u5148\u8FDB\u884C\u6269\u5BB9\uFF0C\u6269\u5BB9\u5230\u6570\u7EC4\u7684\u5BB9\u91CF\u662F64\u4E4B\u540E\uFF0C\u8FD9\u65F6\u5982\u679C\u94FE\u8868\u957F\u5EA6\u5927\u4E8E8\uFF0C\u90A3\u4E48\u5C31\u5C06\u94FE\u8868\u8F6C\u6362\u4E3A\u7EA2\u9ED1\u6811\u3002

                                                                            \u5982\u679C\u54C8\u5E0C\u8868\u7684\u957F\u5EA6\u6CA1\u6709\u8FBE\u523064\u65F6\uFF0C\u5148\u4E0D\u4F1A\u628A\u94FE\u8868\u53D8\u4E3A\u7EA2\u9ED1\u6811\uFF0C\u5148\u4F1A\u6269\u5BB9\uFF0C\u6269\u5BB9\u4E4B\u540E\uFF0C\u4F1A\u5C06\u539FEntry[]\u6570\u7EC4\u7684\u6570\u636E\u8FC1\u79FB\uFF0C\u8FD9\u4E2A\u65F6\u5019\u4F1A\u6839\u636E\u65B0\u7684\u5BB9\u91CF\u91CD\u65B0\u8FDB\u884C\u6563\u5217\u5B58\u50A8\u3002\u6240\u4EE5\u5C31\u4E0D\u4E00\u5B9A\u94FE\u8868\u957F\u5EA6\u8D85\u8FC78\uFF0C\u5728\u8FD9\u4E4B\u540E\uFF0C\u8D85\u8FC78\uFF0C\u90A3\u4E48\u8F6C\u6362\u4E3A\u7EA2\u9ED1\u6811

                                                                        • \u67E5\u8BE2\u65F6\u95F4\u590D\u6742\u5EA6\uFF1A\u4ECE JDK1.7\u7684\u904D\u5386\u94FE\u8868O(n)\uFF0C JDK1.8 \u53D8\u6210\u904D\u5386\u7EA2\u9ED1\u6811O(logN)\u3002

                                                                      happens-before\u7684\u51E0\u79CD\u89C4\u5219

                                                                      1. \u7A0B\u5E8F\u987A\u5E8F\u89C4\u5219

                                                                      2. \u76D1\u89C6\u5668\u9501\u89C4\u5219---\u5BF9\u4E00\u4E2A\u9501\u7684\u89E3\u9501\uFF0Chappens-before\u4E8E\u968F\u540E\u5BF9\u8FD9\u4E2A\u9501\u7684\u52A0\u9501

                                                                      3. volatile\u53D8\u91CF\u89C4\u5219---\u5BF9\u4E00\u4E2Avolatile\u53D8\u91CF\u7684\u5199\uFF0Chappens-before\u4E8E\u4EFB\u610F\u540E\u7EED\u5BF9\u8FD9\u4E2Avolatile\u53D8\u91CF\u7684\u8BFB\uFF0C\u6D89\u53CA\u5230\u5185\u5B58\u5C4F\u969C

                                                                      4. \u4F20\u9012\u6027\uFF1A\u5982\u679CA happens-before B, \u4E14B happens-before C\uFF0C \u90A3\u4E48A happens-before C

                                                                      ',141);function _i(fi,Ai){return Ci}var Mi=i(ki,[["render",_i],["__file","\u5E76\u53D1\u7F16\u7A0B.html.vue"]]);export{Mi as default}; +import{_ as i,e as l}from"./app.f8791b52.js";var p="/study/assets/image-20210904170008584.9ae2a8f6.png",e="/study/assets/image-20210904170145964.0bd58d87.png",a="/study/assets/image-20210904171814442.cab9591e.png",r="/study/assets/image-20210906143610290.528cb25f.png",t="/study/assets/image-20210906171812809.363b01dc.png",n="/study/assets/image-20210906144113619.a2f3c5c0.png",o="/study/assets/image-20210906145616412.1f9a56da.png",s="/study/assets/image-20210906162329611.4aeaf574.png",d="/study/assets/image-20210906162952714.4ab2d7a4.png",h="/study/assets/image-20210906163537132.2ae5e1a6.png",g="/study/assets/image-20210906164102507.06a0f57c.png",c="/study/assets/image-20210906164652141.f4114c6d.png",u="/study/assets/image-20210906165418735.d4e940a9.png",m="/study/assets/image-20210906165650753.b4ead867.png",y="/study/assets/image-20210906171021229.847adf9b.png",b="/study/assets/image-20210906172322150.a19aa7e0.png",k="/study/assets/image-20210906200431146.322d30b9.png",C="/study/assets/image-20210906204102015.ee560150.png",_="/study/assets/image-20210906211624798.1e983e7e.png",f="/study/assets/image-20210906221104293.53356d9b.png",A="/study/assets/image-20210907152327885.fd5de064.png",v="/study/assets/image-20210907153022187.a7654d9b.png",M="/study/assets/image-20210907153037877.e43be6ba.png",S="/study/assets/image-20210907153118988.b218cc5c.png",T="/study/assets/image-20210907164801520.1d739494.png",N="/study/assets/image-20210908142615745.58119378.png",j="/study/assets/image-20210908143216090.b17deb87.png",L="/study/assets/image-20210908144636043.58ea9b75.png",E="/study/assets/image-20210908152216836.530d1011.png",x="/study/assets/image-20210908183204652.5c29db96.png",R="/study/assets/image-20210908205551426.6b105bd3.png",I="/study/assets/image-20210908205814692.348bf473.png",U="/study/assets/image-20210908210307737.74fd6924.png",H="/study/assets/image-20210908211936243.e49a9e21.png",P="/study/assets/image-20210908212728493.f94e54d5.png",O="/study/assets/image-20210908212946761.13e79584.png",w="/study/assets/image-20210908213524594.2796de8e.png",z="/study/assets/image-20210908214251452.dbec5cfa.png",W="/study/assets/image-20210909140256403.96bb1dac.png",D="/study/assets/image-20210909141045584.1c039d2d.png",J="/study/assets/image-20210909141325138.dc54b65c.png",B="/study/assets/image-20210909142412154.4f507845.png",K="/study/assets/image-20210909142301150.f77386b0.png",Q="/study/assets/image-20210909152652554.4b233dc1.png",q="/study/assets/image-20210909163938947.4746849b.png",F="/study/assets/image-20210909175235649.71692bdb.png",G="/study/assets/image-20210909190349224.68892225.png",V="/study/assets/image-20210909191200097.e7b4c7b6.png",X="/study/assets/image-20210909191210548.6c5b6aef.png",Y="/study/assets/image-20210909194450657.164d751a.png",Z="/study/assets/image-20210909194836695.ef1f5332.png",$="/study/assets/image-20210909201243193.2061ec64.png",ii="/study/assets/image-20210909201251908.bb55024d.png",li="/study/assets/image-20210909203507236.90565c2f.png",pi="/study/assets/image-20210909203742017.5d415a09.png",ei="/study/assets/image-20210909204148130.0deb1dbb.png",ai="/study/assets/image-20210909204356085.9982e796.png",ri="/study/assets/image-20210909220203679.668a59b8.png",ti="/study/assets/image-20210909220242221.33efead5.png",ni="/study/assets/image-20210909220502184.e5bb662a.png",oi="/study/assets/image-20210909220707854.648fa4b9.png",si="/study/assets/image-20210910125940213.7c096c9b.png",di="/study/assets/image-20210910125952369.fc2f30be.png",hi="/study/assets/image-20210910183523679.7f21dde5.png",gi="/study/assets/image-20210910130603196.2012b989.png",ci="/study/assets/image-20210910130839000.39b704f6.png",ui="/study/assets/image-20210910144345408.ab990a24.png",mi="/study/assets/image-20210910145407027.d393b697.png",yi="/study/assets/image-20210910170942805.515bc66e.png",bi="/study/assets/image-20210910171404634.2fceb33c.png";const ki={},Ci=l('

                                                                      \u5E76\u53D1\u7F16\u7A0B

                                                                      \u8FDB\u7A0B\u4E0E\u7EBF\u7A0B

                                                                      \u8FDB\u7A0B

                                                                      1. \u5F53\u4E00\u4E2A\u7A0B\u5E8F\u88AB\u8FD0\u884C\uFF0C\u4ECE\u78C1\u76D8\u52A0\u8F7D\u8FD9\u4E2A\u7A0B\u5E8F\u7684\u4EE3\u7801\u5230\u5185\u5B58\uFF0C\u8FD9\u5C31\u5F00\u542F\u4E86\u4E00\u4E2A\u8FDB\u7A0B

                                                                        \u8FDB\u7A0B\u662F\u6D3B\u52A8\u7684\uFF0C\u7A0B\u5E8F\u5DF2\u7ECF\u88ABCPU\u6267\u884C\u4E86\uFF0C\u8FD9\u5C31\u662F\u8FDB\u7A0B

                                                                        \u7A0B\u5E8F\u662F\u9759\u6001\u7684\uFF0C\u8FDB\u7A0B\u662F\u52A8\u6001\u7684\u3002

                                                                      \u7EBF\u7A0B

                                                                      1. \u4E00\u4E2A\u8FDB\u7A0B\u4E4B\u5185\u53EF\u4EE5\u5206\u4E3A\u4E00\u5230\u591A\u4E2A\u7EBF\u7A0B\uFF0C\u53EF\u4EE5\u8BA4\u4E3A\u4E00\u4E2A\u8FDB\u7A0B\u662F\u7531\u591A\u4E2A\u7EBF\u7A0B\u7EC4\u6210\u7684\u3002
                                                                      2. \u4E00\u4E2A\u7EBF\u7A0B\u5C31\u662F\u4E00\u4E2A\u6307\u4EE4\u6D41\uFF0C\u5C06\u6307\u4EE4\u6D41\u4E2D\u7684\u4E00\u6761\u6761\u6307\u4EE4\u4EE5\u4E00\u5B9A\u7684\u987A\u5E8F\u4EA4\u7ED9CPU\u6267\u884C
                                                                      3. Java\u4E2D\uFF0C\u7EBF\u7A0B\u4F5C\u4E3A\u6700\u5C0F\u7684\u8C03\u5EA6\u5355\u4F4D\uFF0C\u8FDB\u7A0B\u4F5C\u4E3A\u8D44\u6E90\u5206\u914D\u7684\u6700\u5C0F\u5355\u4F4D

                                                                      \u4E8C\u8005\u5BF9\u6BD4

                                                                      1. \u8FDB\u7A0B\u57FA\u672C\u4E0A\u76F8\u4E92\u72EC\u7ACB\uFF0C\u800C\u7EBF\u7A0B\u5B58\u5728\u4E8E\u8FDB\u7A0B\u5185\uFF0C\u662F\u8FDB\u7A0B\u7684\u4E00\u4E2A\u5B50\u96C6

                                                                      2. \u8FDB\u7A0B\u62E5\u6709\u5171\u4EAB\u7684\u8D44\u6E90\uFF0C\u4F9B\u5185\u90E8\u7684\u7EBF\u7A0B\u5171\u4EAB

                                                                      3. \u4E0D\u540C\u8BA1\u7B97\u673A\u4E4B\u95F4\u7684\u8FDB\u7A0B\u901A\u4FE1\uFF0C\u6BD4\u5982\u5BA2\u6237\u7AEF\u548C\u670D\u52A1\u5668\u4E4B\u95F4\u7684\u901A\u4FE1\uFF0C\u9700\u8981\u9075\u5FAA\u5171\u540C\u7684\u534F\u8BAE\uFF0C\u5982HTTP

                                                                        \u6D4F\u89C8\u5668\u662F\u4E00\u4E2A\u8FDB\u7A0B\uFF0C\u670D\u52A1\u5668\u662Ftomcat\uFF0C\u4ED6\u4EEC\u4E4B\u95F4\u7684\u901A\u4FE1\u9700\u8981\u9075\u5FAAhttp

                                                                      4. \u4E0A\u4E0B\u6587\u5207\u6362\uFF0C\u5C31\u662F\u4E00\u4E2A\u4EFB\u52A1\u6682\u505C\u4E0E\u7EE7\u7EED\u7684\u8FD9\u4E2A\u8FC7\u7A0B\uFF08\u4E00\u4E2A\u4EFB\u52A1\u4ECE\u4FDD\u5B58\u5230\u518D\u52A0\u8F7D\u7684\u8FC7\u7A0B\uFF09

                                                                      \u5E76\u884C\u4E0E\u5E76\u53D1

                                                                      1. \u5355\u6838CPU\u4E0B\uFF0C\u7EBF\u7A0B\u5B9E\u9645\u8FD8\u662F\u4E32\u884C\u6267\u884C\u7684\uFF0C\u53EA\u662F\u7531\u4E8ECPU\u5728\u7EBF\u7A0B\u95F4\u7684\u5207\u6362\u975E\u5E38\u5FEB\uFF0C\u6240\u4EE5\u611F\u89C9\u662F\u5E76\u884C\u7684\uFF0C\u603B\u7ED3\u5C31\u662F\u5FAE\u89C2\u4E32\u884C\uFF0C\u5B8F\u89C2\u5E76\u884C

                                                                        \u4E00\u822C\u5C06\u8FD9\u79CD\u7EBF\u7A0B\u8F6E\u6D41\u6267\u884C\u7684\uFF0C\u7EBF\u7A0B\u8F6E\u6D41\u4F7F\u7528CPU\u7684\u505A\u6CD5\u79F0\u4E3A\u5E76\u53D1

                                                                        image-20210904170008584

                                                                      2. CPU\u591A\u6838\u624D\u53EF\u4EE5\u5E76\u884C

                                                                        image-20210904170145964

                                                                        \u6BCF\u4E2A\u6838\u5FC3\u90FD\u53EF\u4EE5\u5904\u7406\u4E00\u4E2A\u7EBF\u7A0B\u7684\u6307\u4EE4\uFF0C\u53EA\u8981\u6709\u591A\u4E2A\u6838\u5FC3\uFF0C\u90A3\u4E48\u5C31\u53EF\u4EE5\u540C\u65F6\u6267\u884C\u3002

                                                                      3. \u66F4\u591A\u7684\u65F6\u5019\u662F\u65E2\u6709\u5E76\u53D1\u4E5F\u6709\u5E76\u884C

                                                                        \u7EBF\u7A0B\u6570\u6BD4\u6838\u5FC3\u6570\u591A\u7684\u65F6\u5019\uFF0C\u5C31\u662F\u5E76\u53D1\u548C\u5E76\u884C\u90FD\u5B58\u5728

                                                                      4. \u5E76\u4E0D\u662F\u591A\u7EBF\u7A0B\u6267\u884C\u7684\u6548\u7387\u4E00\u5B9A\u6BD4\u5355\u7EBF\u7A0B\u9AD8

                                                                        \u56E0\u4E3A\u6709\u4E0A\u4E0B\u6587\u5207\u6362\u3001\u6B7B\u9501\u3001\u8D44\u6E90\u9650\u5236

                                                                      5. \u5E76\u53D1\u5C31\u662F\u540C\u4E00\u65F6\u95F4\u5E94\u5BF9\u591A\u4EF6\u4E8B\u60C5\u7684\u80FD\u529B

                                                                        \u5E76\u884C\u5C31\u662F\u540C\u4E00\u65F6\u95F4\u52A8\u624B\u505A\u591A\u4EF6\u4E8B\u60C5\u7684\u80FD\u529B

                                                                      6. \u65E2\u6709\u5E76\u53D1\u53C8\u6709\u5E76\u884C\u662F\u6700\u5E38\u89C1\u7684\u573A\u666F

                                                                      7. \u540C\u6B65\uFF1A

                                                                        \u4ECE\u65B9\u6CD5\u8C03\u7528\u7684\u89D2\u5EA6

                                                                        • \u5982\u679C\u9700\u8981\u7B49\u5F85\u7ED3\u679C\u8FD4\u56DE\uFF0C\u624D\u80FD\u7EE7\u7EED\u8FD0\u884C\uFF0C\u5C31\u662F\u540C\u6B65
                                                                        • \u4E0D\u9700\u8981\u7B49\u5F85\u7ED3\u679C\u8FD4\u56DE\uFF0C\u5C31\u80FD\u7EE7\u7EED\u8FD0\u884C\uFF0C\u8FD9\u662F\u5F02\u6B65
                                                                      8. \u591A\u7EBF\u7A0B\u53EF\u4EE5\u8BA9\u65B9\u6CD5\u6267\u884C\u53D8\u4E3A\u5F02\u6B65\u7684\uFF0C\u4E0D\u9700\u8981\u5E72\u7B49\u7740\u4E0A\u4E00\u4E2A\u65B9\u6CD5\u7684\u7ED3\u679C\u8FD4\u56DE

                                                                        \u591A\u4E2A\u7EBF\u7A0B\u540C\u65F6\u6267\u884C\uFF0C\u6240\u4EE5\u624D\u6709\u7EBF\u7A0B\u5B89\u5168\u95EE\u9898\uFF0C\u7EBF\u7A0B\u4E4B\u95F4\u76F8\u4E92\u62A2\u5360\u8D44\u6E90

                                                                      9. \u6BD4\u5982\u5728\u9879\u76EE\u4E2D\uFF0C\u89C6\u9891\u6587\u4EF6\u683C\u5F0F\u8F6C\u6362\u6BD4\u8F83\u8D39\u65F6\uFF0C\u8FD9\u65F6\u65B0\u5F00\u4E00\u4E2A\u7EBF\u7A0B\u5904\u7406\u89C6\u9891\u8F6C\u6362\uFF0C\u907F\u514D\u963B\u585E\u4E3B\u7EBF\u7A0B\u3002

                                                                      10. \u591A\u7EBF\u7A0B\u53EF\u4EE5\u5145\u5206\u5229\u7528\u591A\u6838\uFF0C\u505A\u5230\u5E76\u884C\u6267\u884C\uFF01

                                                                        \u5355\u6838CPU\u540C\u6837\u53EF\u4EE5\u6267\u884C\u591A\u7EBF\u7A0B\uFF0C\u8FD9\u5C31\u662F\u5E76\u53D1\uFF0C\u591A\u4E2A\u7EBF\u7A0B\u540C\u65F6\u62A2\u5360\u540C\u4E00\u4EFDCPU\u8D44\u6E90\u3002

                                                                        image-20210904171814442

                                                                      11. \u5355\u6838\u662F\u5E76\u53D1\uFF0C\u5728\u5FAE\u89C2\u4E0A\u662F\u4E32\u884C\u6267\u884C\u7684\u3002

                                                                        \u5355\u6838CPU\u4E5F\u53EF\u4EE5\u591A\u7EBF\u7A0B\uFF0C\u4F46\u662F\u5FAE\u89C2\u4E0A\u4E32\u884C\uFF0C\u5B8F\u89C2\u4E0A\u5E76\u884C\uFF0C\u5E76\u4E0D\u80FD\u63D0\u9AD8\u6548\u7387\uFF0C\u591A\u6838CPU\u624D\u80FD\u63D0\u9AD8\u6548\u7387\uFF0C\u5355\u6838\u65F6\u4ECD\u7136\u662F\u8F6E\u6D41\u6267\u884C

                                                                        \u800C\u4E14\u8FD8\u53EF\u80FD\u6709\u6B7B\u9501\u3001\u8D44\u6E90\u9650\u5236\u3001\u4E0A\u4E0B\u6587\u5207\u6362\u7684\u5F71\u54CD\uFF0C\u5BFC\u81F4\u591A\u7EBF\u7A0B\u7684\u6267\u884C\u6548\u7387\u5E76\u4E0D\u4E00\u5B9A\u5C31\u6BD4\u5355\u7EBF\u7A0B\u9AD8\u3002

                                                                        \u5355\u6838CPU\u5373\u4F7F\u7528\u4E86\u591A\u7EBF\u7A0B\u4E5F\u6CA1\u6709\u529E\u6CD5\u63D0\u9AD8\u6548\u7387\uFF0C\u56E0\u4E3A\u5728\u5FAE\u89C2\u4E0A\u662F\u4E32\u884C\u7684\u3002

                                                                        \u5355\u6838CPU\u7528\u591A\u7EBF\u7A0B\u53CD\u800C\u6BD4\u5355\u7EBF\u7A0B\u6162\uFF0C\u800C\u4E0D\u662F\u6267\u884C\u65F6\u95F4\u76F8\u7B49\uFF0C\u56E0\u4E3A\u591A\u7EBF\u7A0B\u6D89\u53CA\u5230\u4E0A\u4E0B\u6587\u5207\u6362\u3002

                                                                        \u603B\u7ED3\uFF1A\u591A\u6838CPU\u7528\u591A\u7EBF\u7A0B\u53EF\u4EE5\u505A\u5230\u5E76\u884C\uFF0C\u53EF\u4EE5\u63D0\u9AD8\u6267\u884C\u6548\u7387\uFF0C\u800C\u5355\u6838CPU\u6267\u884C\u591A\u7EBF\u7A0B\uFF0C\u5728\u5FAE\u89C2\u4E0A\u4E32\u884C\uFF0C\u5E76\u4E14\u6709\u4E0A\u4E0B\u6587\u5207\u6362\uFF0C\u53CD\u800C\u4E0D\u80FD\u63D0\u9AD8\u6267\u884C\u6548\u7387

                                                                      12. \u5E76\u4E0D\u662F\u8BF4\u5355\u6838CPU\u4E0B\uFF0C\u591A\u7EBF\u7A0B\u6CA1\u6709\u610F\u4E49

                                                                        \u591A\u6838CPU\u53EF\u4EE5\u5E76\u884C\u8DD1\u591A\u4E2A\u7EBF\u7A0B\uFF0C\u4F46\u80FD\u5426\u63D0\u9AD8\u6548\u7387\u8FD8\u662F\u8981\u5206\u60C5\u51B5

                                                                      Java\u7EBF\u7A0B

                                                                      \u521B\u5EFA\u7EBF\u7A0B

                                                                      1. \u4F7F\u7528Runnable\u63A5\u53E3\uFF0C\u5BF9\u6BD4\u76F4\u63A5\u7EE7\u627FThread\u7684\u65B9\u5F0F\uFF0C\u6539\u53D8\u7684\u5730\u65B9\u662F\uFF1A\u628A\u4EFB\u52A1\u548C\u7EBF\u7A0B\u5206\u79BB\u4E86\uFF0C\u800C\u7EE7\u627FThread\u7684\u65B9\u5F0F\uFF0C\u58F0\u660EThread\u5BF9\u8C61\u662F\u548C\u4EFB\u52A1\u5728\u4E00\u8D77\u7684\u3002

                                                                      2. \u5982\u679C\u4E00\u4E2A\u63A5\u53E3\uFF0C\u53EA\u6709\u4E00\u4E2A\u62BD\u8C61\u65B9\u6CD5\uFF0C\u90A3\u4E48\u53EF\u4EE5\u7528lambda\u8868\u8FBE\u5F0F\u6765\u7B80\u5316\uFF0C\u63A5\u53E3\u7528FunctionalInterface\u6765\u4FEE\u9970\uFF0C\u5982\u679C\u4E00\u4E2A\u63A5\u53E3\u6709\u591A\u4E2A\u62BD\u8C61\u65B9\u6CD5\u662F\u6CA1\u6CD5\u7528lambda\u8868\u8FBE\u5F0F\u6765\u7B80\u5316\u7684\u3002

                                                                      3. \u539F\u7406\u4E4BThread\u548CRunnable\u7684\u5173\u7CFB

                                                                        • Thread\u662F\u628A\u7EBF\u7A0B\u548C\u4EFB\u52A1\u5408\u5E76\u5728\u4E86\u4E00\u8D77

                                                                          Runnable\u662F\u628A\u7EBF\u7A0B\u548C\u4EFB\u52A1\u5206\u5F00\u4E86

                                                                        • \u7528Runnable\u66F4\u5BB9\u6613\u4E0E\u7EBF\u7A0B\u6C60\u7B49\u9AD8\u7EA7API\u914D\u5408

                                                                        • \u7528Runnable\u8BA9\u4EFB\u52A1\u8131\u79BB\u4E86Thread\u7EE7\u627F\u4F53\u7CFB\uFF0C\u6CA1\u6709\u5355\u7EE7\u627F\u7684\u5C40\u9650\u6027\uFF0C\u66F4\u7075\u6D3B

                                                                      4. \u7528FutureTask\u914D\u5408Callable\u63A5\u53E3\u548CThread\u7684\u65B9\u5F0F\u521B\u5EFA\u7EBF\u7A0B

                                                                        FutureTask\u80FD\u591F\u63A5\u6536Callable\u7C7B\u578B\u7684\u53C2\u6570\uFF0C\u7528\u6765\u5904\u7406\u6709\u8FD4\u56DE\u7ED3\u679C\u7684\u60C5\u51B5

                                                                      5. Callable\u63A5\u53E3\u548CRunnable\u63A5\u53E3\u7684\u5DEE\u522B\uFF1A

                                                                        Callable\u91CC\u7684call()\u65B9\u6CD5\u53EF\u4EE5\u629B\u51FA\u5F02\u5E38\uFF0C\u800C\u4E14\u6BD4Runnable\u63A5\u53E3\u91CC\u7684run()\u65B9\u6CD5\u591A\u4E86\u4E00\u4E2A\u8FD4\u56DE\u503C

                                                                      6. \u5E95\u5C42\u662F\u591A\u6838\u6765\u5BF9\u591A\u7EBF\u7A0B\u8FDB\u884C\u5E76\u884C\u7684\u5904\u7406\u8FD8\u662F\u7531\u4E00\u4E2A\u5355\u6838CPU\u6765\u5BF9\u591A\u7EBF\u7A0B\u8FDB\u884C\u5E76\u53D1\u7684\u6267\u884C\uFF0C\u91C7\u7528\u65F6\u95F4\u7247\u8F6E\u8F6C\u7684\u65B9\u5F0F\uFF0C\u8FD9\u662F\u6211\u4EEC\u63A7\u5236\u4E0D\u4E86\u7684\uFF0C\u662F\u7531\u5E95\u5C42\u7684\u4EFB\u52A1\u8C03\u5EA6\u5668\u6765\u51B3\u5B9A\u7684\u3002

                                                                      \u7EBF\u7A0B\u8FD0\u884C\u7684\u539F\u7406

                                                                      1. JVM\u7684\u865A\u62DF\u673A\u6808\u3001\u672C\u5730\u65B9\u6CD5\u6808\u548C\u7A0B\u5E8F\u8BA1\u6570\u5668\u662F\u7EBF\u7A0B\u72EC\u6709\u7684

                                                                        \u865A\u62DF\u673A\u542F\u52A8\u540E\uFF0C\u865A\u62DF\u673A\u5C31\u4F1A\u4E3A\u7EBF\u7A0B\u5206\u914D\u4E00\u5757\u6808\u5185\u5B58

                                                                      2. \u6BCF\u4E2A\u6808\u7531\u591A\u4E2A\u6808\u5E27\u7EC4\u6210\uFF0C\u5BF9\u5E94\u7740\u6BCF\u6B21\u65B9\u6CD5\u8C03\u7528\u65F6\u6240\u5360\u7528\u7684\u5185\u5B58

                                                                        \u4E00\u4E2A\u6808\u5E27\u5BF9\u5E94\u7740\u4E00\u4E2A\u65B9\u6CD5\u8C03\u7528

                                                                        \u6BCF\u4E2A\u7EBF\u7A0B\u53EA\u80FD\u6709\u4E00\u4E2A\u6D3B\u52A8\u6808\u5E27\uFF0C\u5BF9\u5E94\u7740\u5F53\u524D\u6B63\u5728\u6267\u884C\u7684\u90A3\u4E2A\u65B9\u6CD5\u3002

                                                                      3. \u4E00\u4E2A\u65B9\u6CD5\u8C03\u7528\u5B8C\u6BD5\u540E\uFF0C\u5373\u8FD4\u56DE\u540E\uFF0C\u90A3\u4E2A\u65B9\u6CD5\u8C03\u7528\u5BF9\u5E94\u7684\u6808\u5E27\u5C31\u6CA1\u6709\u4E86\uFF0C\u5BF9\u5E94\u7684\u6808\u5E27\u7684\u5185\u5B58\u5C31\u88AB\u91CA\u653E\u6389\u4E86\uFF0C\u6CA1\u6709\u5783\u573E\u56DE\u6536\uFF0C\u4F46\u662F\u5B58\u5728\u6808\u6EA2\u51FA

                                                                        PC\u662F\u4E24\u6837\u90FD\u6CA1\u6709\uFF0C\u800C\u865A\u62DF\u673A\u6808\u548C\u672C\u5730\u65B9\u6CD5\u6808\u662F\u5B58\u5728\u6808\u6EA2\u51FA\uFF0C\u4F46\u662F\u6CA1\u6709\u5783\u573E\u56DE\u6536\uFF0C\u5806\u7A7A\u95F4\u548C\u65B9\u6CD5\u533A\u662F\u5B58\u5728OOM\uFF0C\u4E5F\u6709\u5783\u573E\u56DE\u6536\u673A\u5236

                                                                      4. \u6808\u5E27\u91CC\u6709\u5C40\u90E8\u53D8\u91CF\u8868\uFF0C\u64CD\u4F5C\u6570\u6808\uFF0C\u65B9\u6CD5\u8FD4\u56DE\u5730\u5740\uFF0C\u52A8\u6001\u94FE\u63A5\uFF0C\u4E00\u4E9B\u9644\u52A0\u4FE1\u606F

                                                                      5. \u6BCF\u4E2A\u7EBF\u7A0B\u62E5\u6709\u72EC\u7ACB\u7684\u865A\u62DF\u673A\u6808

                                                                      \u7EBF\u7A0B\u7684\u4E0A\u4E0B\u6587\u5207\u6362

                                                                      1. \u7EBF\u7A0B\u7684\u4E0A\u4E0B\u6587\u5207\u6362\uFF0C\u662F\u6307\u4E00\u4E2A\u7EBF\u7A0B\u6682\u505C\uFF0C\u7136\u540E\u6062\u590D\u6267\u884C\uFF0C\u8FD9\u662F\u4E00\u6B21\u4E0A\u4E0B\u6587\u5207\u6362
                                                                      2. \u4EE5\u4E0B\u4E00\u4E9B\u539F\u56E0\u89E6\u53D1\u7EBF\u7A0B\u7684\u4E0A\u4E0B\u6587\u5207\u6362\uFF08\u5373\u7EBF\u7A0B\u6682\u505C\u5C31\u4F1A\u51FA\u73B0\u4E0A\u4E0B\u6587\u5207\u6362\uFF09\uFF1A
                                                                        • \u7EBF\u7A0B\u7684CPU\u65F6\u95F4\u7247\u7528\u5B8C
                                                                        • \u5783\u573E\u56DE\u6536\uFF08\u7528\u6237\u7EBF\u7A0B\u6682\u505C\uFF08stw\uFF09\uFF0C\u5783\u573E\u56DE\u6536\u7EBF\u7A0B\u5DE5\u4F5C\uFF09
                                                                        • \u6709\u66F4\u9AD8\u4F18\u5148\u7EA7\u7684\u7EBF\u7A0B\u9700\u8981\u8FD0\u884C
                                                                        • \u7EBF\u7A0B\u81EA\u5DF1\u8C03\u7528\u4E86sleep \u3001wait\u3001join\u3001yield\u7B49\u65B9\u6CD5
                                                                      3. sleep\u548Cwait\u65B9\u6CD5\u90FD\u53EF\u4EE5\u4F7F\u8C03\u7528\u65B9\u6CD5\u7684\u7EBF\u7A0B\u8FDB\u5165\u963B\u585E\u72B6\u6001\uFF0C\u4F46\u662Fsleep\u4E0D\u4F1A\u91CA\u653E\u540C\u6B65\u76D1\u89C6\u5668\u9501\uFF0C\u800Cwait\u4F1A\u91CA\u653E\u540C\u6B65\u76D1\u89C6\u5668\u9501\uFF0C\u800C\u4E14sleep\u53EF\u4EE5\u5728\u4EFB\u4F55\u5730\u65B9\u8C03\u7528\uFF0C\u4F46\u662Fwait\u65B9\u6CD5\u53EA\u80FD\u5728\u540C\u6B65\u4EE3\u7801\u5757\u5185\u6216\u540C\u6B65\u65B9\u6CD5\u5185\u8C03\u7528
                                                                      4. \u5F53\u4E0A\u4E0B\u6587\u5207\u6362\u53D1\u751F\u65F6\uFF0C\u64CD\u4F5C\u7CFB\u7EDF\u9700\u8981\u4FDD\u5B58\u5F53\u524D\u7EBF\u7A0B\u7684\u72B6\u6001\uFF0C\u5E76\u6062\u590D\u53E6\u4E00\u4E2A\u7EBF\u7A0B\u7684\u72B6\u6001\uFF0CJava\u4E2D\u5BF9\u5E94\u7684\u6982\u5FF5\u5C31\u662F\u7A0B\u5E8F\u8BA1\u6570\u5668\uFF0C\u5DE6\u8FB9\u662F\u6307\u4EE4\u5730\u5740\uFF08\u504F\u79FB\u5730\u5740\uFF09\uFF0C\u53F3\u8FB9\u662F\u5B57\u8282\u7801\u6307\u4EE4\uFF0C\u4F5C\u7528\u5C31\u662F\u8BB0\u4F4F\u4E0B\u4E00\u6761JVM\u9700\u8981\u6267\u884C\u7684\u5B57\u8282\u7801\u6307\u4EE4\u7684\u6307\u4EE4\u5730\u5740\u3002
                                                                      5. \u9891\u7E41\u7684\u4E0A\u4E0B\u6587\u5207\u6362\u4F1A\u5F71\u54CD\u6027\u80FD\uFF0C\u800C\u4E14\u8003\u8651\u5230\u6B7B\u9501\u3001\u8D44\u6E90\u9650\u5236\uFF0C\u5E76\u4E0D\u662F\u7EBF\u7A0B\u6570\u8D8A\u591A\u8D8A\u597D

                                                                      start()\u4E0Erun()

                                                                      1. start()\u8868\u793A\u542F\u52A8\u7EBF\u7A0B\uFF0Crun()\u8868\u793A\u7EBF\u7A0B\u542F\u52A8\u540E\u8981\u6267\u884C\u7684\u4EE3\u7801

                                                                        \u4E0D\u80FD\u76F4\u63A5\u8C03\u7528run()\uFF0C\u56E0\u4E3A\u7EBF\u7A0B\u6CA1\u6709\u542F\u52A8\uFF0C\u8FD8\u662F\u53EA\u6709\u4E00\u4E2A\u7EBF\u7A0B\u5373\u4E3B\u7EBF\u7A0B

                                                                        \u8C03\u7528start()\u65B9\u6CD5\u540E\uFF0C\u7EBF\u7A0B\u4F1A\u8FDB\u5165\u5C31\u7EEA\u72B6\u6001\uFF0C\u7B49\u5F85CPU\u5206\u914D\u65F6\u95F4\u7247\u5373\u8D44\u6E90\uFF0C\u5C31\u53EF\u4EE5\u8FD0\u884C\u4E86\uFF0C\u5C31\u7EEA\u72B6\u6001\u548C\u8FD0\u884C\u72B6\u6001\u5728Java\u91CC\u90FD\u79F0\u4E3ARUNNABLE\u72B6\u6001

                                                                      2. \u76F4\u63A5\u8C03\u7528run\u662F\u5728\u4E3B\u7EBF\u7A0B\u4E2D\u6267\u884C\u4E86run\uFF0C\u6CA1\u6709\u542F\u52A8\u65B0\u7684\u7EBF\u7A0B

                                                                      3. \u4F7F\u7528start\u662F\u542F\u52A8\u65B0\u7684\u7EBF\u7A0B\uFF0C\u901A\u8FC7\u65B0\u7684\u7EBF\u7A0B\u95F4\u63A5\u6267\u884Crun\u4E2D\u7684\u4EE3\u7801

                                                                      sleep()\u4E0Eyield()

                                                                      1. \u8C03\u7528sleep\u4F1A\u8BA9\u5F53\u524D\u7EBF\u7A0B\u4ECERunnable\u8FDB\u5165\u5230Timed Waiting\u72B6\u6001\uFF08\u963B\u585E\uFF0C\u6216\u8005\u8BF4\u4E00\u4E2A\u6709\u65F6\u9650\u7684\u7B49\u5F85\u8FC7\u7A0B\uFF09

                                                                      2. \u5176\u4ED6\u7EBF\u7A0B\u53EF\u4EE5\u4F7F\u7528interrupt\u65B9\u6CD5\u6253\u65AD\u6B63\u5728\u7761\u7720\u7684\u7EBF\u7A0B\uFF0C\u8FD9\u662F\u7761\u7720\u7684\u7EBF\u7A0B\u4F1A\u629B\u51FAInterruptedException

                                                                      3. sleep()\u65B9\u6CD5\u5199\u5728\u54EA\u4E2A\u7EBF\u7A0B\u4E2D\uFF0C\u5C31\u8BA9\u54EA\u4E2A\u7EBF\u7A0B\u7761\u7720\uFF0C\u5BF9\u5F53\u524D\u7EBF\u7A0B\u8FDB\u884C\u7761\u7720\u64CD\u4F5C

                                                                      4. \u7761\u7720\u7ED3\u675F\u540E\u7684\u7EBF\u7A0B\u672A\u5FC5\u4F1A\u7ACB\u523B\u5F97\u5230\u6267\u884C\uFF0C\u4E5F\u8981\u91CD\u65B0\u7B49\u5F85\u76F4\u5230\u5F97\u5230cpu\u65F6\u95F4\u7247\u5206\u914D

                                                                      5. \u8C03\u7528yield\u4F1A\u8BA9\u5F53\u524D\u7EBF\u7A0B\u4ECERunning\u8FDB\u5165Runnable\u5C31\u7EEA\u72B6\u6001\uFF0C\u7136\u540E\u8C03\u5EA6\u6267\u884C\u5176\u4ED6\u7EBF\u7A0B

                                                                        \u5177\u4F53\u7684\u5B9E\u73B0\u4F9D\u8D56\u4E8E\u64CD\u4F5C\u7CFB\u7EDF\u7684\u4EFB\u52A1\u8C03\u5EA6\u5668

                                                                      \u7EBF\u7A0B\u4F18\u5148\u7EA7

                                                                      1. \u7EBF\u7A0B\u4F18\u5148\u7EA7\u4F1A\u63D0\u793A\u4EFB\u52A1\u8C03\u5EA6\u5668\u4F18\u5148\u8C03\u5EA6\u8BE5\u7EBF\u7A0B\uFF0C\u4F46\u662F\u5B83\u4EC5\u4EC5\u662F\u4E00\u4E2A\u63D0\u793A\uFF0C\u4F46\u662F\u8C03\u5EA6\u5668\u53EF\u4EE5\u5FFD\u7565\u5B83\u3002

                                                                        \u5982\u679CCPU\u6BD4\u8F83\u5FD9\uFF0C\u90A3\u4E48\u4F18\u5148\u7EA7\u8F83\u9AD8\u7684\u7EBF\u7A0B\u4F1A\u83B7\u5F97\u66F4\u591A\u7684\u65F6\u95F4\u7247\uFF0C\u4F46CPU\u95F2\u65F6\uFF0C\u4F18\u5148\u7EA7\u51E0\u4E4E\u6CA1\u6709\u4F5C\u7528

                                                                      2. sleep\u548Cwait\u7684\u5DEE\u522B

                                                                        • sleep()\u65B9\u6CD5\u9002\u7528\u4E8E\u65E0\u9700\u540C\u6B65\u9501\u7684\u573A\u666F\uFF0C\u53EF\u4EE5\u5E94\u7528\u5728\u4EFB\u4F55\u5730\u65B9\uFF0C\u800Cwait()\u5219\u9700\u8981\u5728\u540C\u6B65\u65B9\u6CD5\u6216\u540C\u6B65\u4EE3\u7801\u5757\u4E2D\u4F7F\u7528
                                                                        • sleep()\u548Cwait()\u90FD\u662F\u4F7F\u7EBF\u7A0B\u8FDB\u5165\u963B\u585E\u72B6\u6001\uFF0Csleep\u4F7F\u7EBF\u7A0B\u8FDB\u5165timed waiting\u72B6\u6001\uFF0C\u5373\u4E00\u4E2A\u6709\u65F6\u9650\u7684\u7B49\u5F85\u8FC7\u7A0B\uFF0C\u800C\u8C03\u7528wait()\u7684\u7EBF\u7A0B\u5219\u9700\u8981\u5524\u9192
                                                                        • \u5982\u679C\u4E24\u4E2A\u65B9\u6CD5\u90FD\u4F7F\u7528\u5728\u540C\u6B65\u4EE3\u7801\u5757\u6216\u540C\u6B65\u65B9\u6CD5\u4E2D\uFF0Csleep()\u4E0D\u4F1A\u91CA\u653E\u540C\u6B65\u76D1\u89C6\u5668\uFF0C\u800Cwait()\u4F1A\u91CA\u653E\u540C\u6B65\u76D1\u89C6\u5668
                                                                        • Thread\u7C7B\u4E2D\u58F0\u660Esleep()\u65B9\u6CD5\uFF0C Object\u7C7B\u4E2D\u58F0\u660Ewait()
                                                                      3. \u5B9E\u73B0Runnable\u63A5\u53E3\uFF0C\u9996\u5148\u907F\u514D\u4E86\u7EE7\u627FThread\u7C7B\u7684\u5355\u7EE7\u627F\u7684\u5C40\u9650\u6027\u3002

                                                                        \u5E76\u4E14\u5C06\u7EBF\u7A0B\u548C\u4EFB\u52A1\u5206\u5F00\u6765

                                                                      4. \u5B9E\u73B0Runnable\u63A5\u53E3\u548C\u5B9E\u73B0Callable\u63A5\u53E3\u7684\u533A\u522B

                                                                        • \u4E00\u4E2A\u91CD\u5199run()\uFF0C\u4E00\u4E2A\u91CD\u5199call()

                                                                        • call()\u65B9\u6CD5\u6709\u8FD4\u56DE\u503C\uFF0C\u5E76\u4E14\u8FD4\u56DE\u503C\u53EF\u4EE5\u5E26\u6CDB\u578B\uFF0C\u800Crun()\u65B9\u6CD5\u4E0D\u80FD\u6709\u8FD4\u56DE\u503C

                                                                        • run()\u65B9\u6CD5\u5185\u90E8\u6709\u5F02\u5E38\u7684\u8BDD\u4E0D\u80FD\u629B\u51FA\uFF0C\u53EA\u80FD\u901A\u8FC7try-catch\u8FDB\u884C\u5904\u7406\uFF0C\u4F46\u662Fcall()\u65B9\u6CD5\u5185\u90E8\u6709\u5F02\u5E38\uFF0C\u53EF\u4EE5\u5C06\u5F02\u5E38\u629B\u51FA

                                                                        • \u5B9E\u73B0Callable\u63A5\u53E3\u8981\u914D\u5408FutureTask\u4F7F\u7528\uFF0C\u6BD4\u5982\u83B7\u53D6\u8FD4\u56DE\u503C

                                                                          // FutureTask\u7684\u5B9E\u4F8B\u5316\u5BF9\u8C61\u7684get()\u65B9\u6CD5\u7684\u8FD4\u56DE\u503C\u5373\u4E3AFutureTask\u6784\u9020\u5668Callable\u5BF9\u8C61\u7684\u5B9E\u73B0\u7C7B\u6240\u91CD\u5199\u7684call()\u65B9\u6CD5\u7684\u8FD4\u56DE\u503C

                                                                      5. join()\u662F\u7B49\u5F85\u8C03\u7528join\u65B9\u6CD5\u7684\u7EBF\u7A0B\u8FD0\u884C\u7ED3\u675F

                                                                      6. sleep() \u3001join()\u3001wait()\uFF0Csuspend()\u3001\u7B49\u5F85\u540C\u6B65\u9501\u8FD9\u4E94\u79CD\u60C5\u51B5\u53EF\u4EE5\u8BA9\u7EBF\u7A0B\u4ECE\u8FD0\u884C\u72B6\u6001\u5230\u963B\u585E\u72B6\u6001\u3002

                                                                      interrupt\u65B9\u6CD5

                                                                      1. \u7EBF\u7A0B\u5728sleep\u65F6\uFF0C\u88ABinterrupt\u6253\u65AD\uFF0C\u4F1A\u7F6E\u6253\u65AD\u6807\u8BB0\u4E3Afalse

                                                                        \u5373\u6253\u65ADsleep\u7684\u7EBF\u7A0B\uFF0C\u4F1A\u6E05\u7A7A\u6253\u65AD\u72B6\u6001

                                                                        \u6253\u65AD\u6B63\u5E38\u8FD0\u884C\u7684\u7EBF\u7A0B\uFF0C\u4E0D\u4F1A\u6E05\u7A7A\u6253\u65AD\u72B6\u6001

                                                                        \u6253\u65ADpark\u7EBF\u7A0B\uFF0C\u4E0D\u4F1A\u6E05\u7A7A\u6253\u65AD\u72B6\u6001

                                                                        \u4E0D\u4F1A\u6E05\u7A7A\u6253\u65AD\u72B6\u6001\uFF0C\u5373\u6253\u65AD\u6807\u8BB0\u4E3A\u771F

                                                                      \u4E3B\u7EBF\u7A0B\u548C\u5B88\u62A4\u7EBF\u7A0B

                                                                      1. \u6709\u4E00\u79CD\u7279\u6B8A\u7684\u7EBF\u7A0B\u53EB\u505A\u5B88\u62A4\u7EBF\u7A0B\uFF0C\u53EA\u8981\u5176\u4ED6\u975E\u5B88\u62A4\u7EBF\u7A0B\u8FD0\u884C\u7ED3\u675F\u4E86\uFF0C\u5373\u65F6\u5B88\u62A4\u7EBF\u7A0B\u7684\u4EE3\u7801\u6CA1\u6709\u6267\u884C\u5B8C\uFF0C\u4E5F\u4F1A\u5F3A\u5236\u7ED3\u675F\u3002
                                                                      2. \u5783\u573E\u56DE\u6536\u5668\u7EBF\u7A0B\u5C31\u662F\u4E00\u79CD\u5B88\u62A4\u7EBF\u7A0B\u3002

                                                                      \u516D\u79CD\u72B6\u6001

                                                                      1. NEW \uFF0C\u7EBF\u7A0B\u521A\u88AB\u521B\u5EFA\uFF0C\u4F46\u662F\u8FD8\u6CA1\u6709\u8C03\u7528start()\u65B9\u6CD5

                                                                        RUNNABLE\u5F53\u8C03\u7528\u4E86start()\u65B9\u6CD5\u4E4B\u540E\uFF0C\u7EBF\u7A0B\u5C31\u662FRUNNABLE\u72B6\u6001\uFF0C\u8FD0\u884C\u72B6\u6001\u548C\u5C31\u7EEA\u72B6\u6001\u90FD\u662FRUNNABLE\u72B6\u6001

                                                                        \u4ECE\u7EBF\u7A0B\u7684\u751F\u547D\u5468\u671F\u56FE\u6765\u770B\uFF0C\u662F\u533A\u5206\u4E86\u5C31\u7EEA\u72B6\u6001\u548C\u8FD0\u884C\u72B6\u6001\u3002\u6BD4\u5982\u8C03\u7528yield\u65B9\u6CD5\uFF0C\u4F1A\u4ECE\u8FD0\u884C\u72B6\u6001\u5230\u5C31\u7EEA\u72B6\u6001\u3002

                                                                      2. NEW RUNNABLE BLOCKED WAITING TIMED_WAITING TERMINATED

                                                                      3. BLOCKED WAITING TIMED_WAITING \u8FD9\u4E09\u79CD\u72B6\u6001\uFF0C\u662FJava\u5C42\u9762\u7684\u963B\u585E\u3002

                                                                        \u6BD4\u5982sleep()\u5BF9\u5E94\u5C31\u662F\u8FDB\u5165TIMED_WAITING\u72B6\u6001

                                                                        join()\uFF0C\u5C31\u662F\u8FDB\u5165WAITING\u72B6\u6001

                                                                      4. join()\u662F\u7B49\u5F85\u8C03\u7528join()\u7684\u7EBF\u7A0B\u8FD0\u884C\u7ED3\u675F\uFF01

                                                                        \u54EA\u4E2A\u7EBF\u7A0B\u53BB\u8C03\u7528join()\uFF0C\u90A3\u4E48\u8FD9\u4E2A\u7EBF\u7A0B\u8FD8\u5728\u8FD0\u884C\u4E2D\uFF01\u522B\u7684\u7EBF\u7A0B\u5FC5\u987B\u7B49\u5F85\u8C03\u7528join\u7684\u8FD9\u4E2A\u7EBF\u7A0B\u8FD0\u884C\u7ED3\u675F\u624D\u53EF\u4EE5\u8FD0\u884C

                                                                        \u4E0D\u8981\u8BA4\u4E3A\u8C01\u8C03\u7528join()\uFF0C\u8C01\u5C31\u8FDB\u5165WAITING\u72B6\u6001\u4E86

                                                                      \u5171\u4EAB\u6A21\u578B\u4E4B\u7BA1\u7A0B

                                                                      1. \u591A\u4E2A\u7EBF\u7A0B\u5171\u4EAB\u5185\u5B58\u4E2D\u7684\u8D44\u6E90\u4F1A\u9020\u6210\u5B89\u5168\u9690\u60A3

                                                                        \u5982\u679C\u662F\u591A\u6838CPU\uFF0C\u90A3\u4E48\u591A\u4E2A\u7EBF\u7A0B\u5E76\u884C\u6267\u884C\uFF0C\u5982\u679C\u8BBF\u95EE\u5185\u5B58\u4E2D\u7684\u540C\u4E00\u4E2A\u8D44\u6E90\uFF0C\u7531\u4E8E\u7EBF\u7A0B\u90FD\u662F\u505A\u7684\u4E0D\u540C\u7684\u4EFB\u52A1\uFF0C\u80AF\u5B9A\u4F1A\u51FA\u73B0\u5B89\u5168\u95EE\u9898\uFF0C\u5373\u7ED3\u679C\u4E0D\u786E\u5B9A\u3002

                                                                        \u5982\u679C\u662F\u5355\u6838CPU\uFF0C\u91C7\u7528\u7684\u662F\u65F6\u95F4\u7247\u8F6E\u8F6C\u7684\u65B9\u5F0F\uFF0C**\u90A3\u4E48\u7EBF\u7A0B\u95F4\u4ECD\u7136\u662F\u53EF\u80FD\u8BBF\u95EE\u540C\u4E00\u4E2A\u8D44\u6E90\uFF0C\u4ECD\u7136\u53EF\u80FD\u51FA\u73B0\u7EBF\u7A0B\u5B89\u5168\u95EE\u9898\u3002**\u6BD4\u5982\u4E24\u4E2A\u7EBF\u7A0B\u4EA4\u66FF\u6267\u884C\uFF0C\u91C7\u7528\u65F6\u95F4\u7247\u8F6E\u8F6C\u7684\u65B9\u5F0F\uFF0C\u4F46\u662F\u4ED6\u4EEC\u6BCF\u6B21\u6267\u884C\u90FD\u53BB\u8BBF\u95EE\u4E00\u4E2A\u9759\u6001\u53D8\u91CF\uFF0C\u8FD9\u4E2A\u9759\u6001\u53D8\u91CF\u5C5E\u4E8E\u7C7B\u7684\u7ED3\u6784\uFF0C\u968F\u7740\u7C7B\u7684\u52A0\u8F7D\u800C\u52A0\u8F7D\uFF0C\u5C5E\u4E8E\u5171\u4EAB\u8D44\u6E90\uFF0C\u4ED6\u4EEC\u4F1A\u51FA\u73B0\u7EBF\u7A0B\u5B89\u5168\u95EE\u9898\u3002

                                                                        \u603B\u7ED3\uFF1A\u591A\u4E2A\u7EBF\u7A0B\u53EA\u8981\u8BBF\u95EE\u7684\u662F\u540C\u4E00\u5757\u8D44\u6E90\uFF0C\u5C31\u53EF\u80FD\u51FA\u73B0\u7EBF\u7A0B\u5B89\u5168\u95EE\u9898\uFF0C\u5FC5\u987B\u91C7\u53D6\u76F8\u5E94\u7684\u63AA\u65BD\u3002

                                                                      2. \u4E5F\u5C31\u662F\u8BF4\u591A\u4E2A\u7EBF\u7A0B\u5E76\u884C\u6267\u884C\uFF0C\u53BB\u8BBF\u95EE\u540C\u4E00\u4E2A\u8D44\u6E90\uFF0C\u4F1A\u9020\u6210\u7EBF\u7A0B\u5B89\u5168\u95EE\u9898\u3002

                                                                        \u5355\u6838CPU\uFF0C\u591A\u4E2A\u7EBF\u7A0B\u4EA4\u66FF\u6267\u884C\uFF0C\u7531\u4E8E\u4E0A\u4E0B\u6587\u5207\u6362\uFF0C\u9020\u6210\u7684\u6307\u4EE4\u4EA4\u9519\uFF0C\u8FD9\u591A\u4E2A\u7EBF\u7A0B\u53C8\u8BBF\u95EE\u540C\u4E00\u4E2A\u8D44\u6E90\uFF0C\u51FA\u73B0\u7EBF\u7A0B\u5B89\u5168\u95EE\u9898\u3002

                                                                      3. \u4E00\u4E2A\u7A0B\u5E8F\u8FD0\u884C\u591A\u4E2A\u7EBF\u7A0B\u672C\u8EAB\u662F\u6CA1\u6709\u95EE\u9898\u7684

                                                                        \u95EE\u9898\u51FA\u5728\u591A\u4E2A\u7EBF\u7A0B\u8BBF\u95EE\u5171\u4EAB\u8D44\u6E90

                                                                        \u591A\u4E2A\u7EBF\u7A0B\u8BFB\u53D6\u5171\u4EAB\u8D44\u6E90\u5176\u5B9E\u4E5F\u6CA1\u6709\u95EE\u9898

                                                                        \u5728\u591A\u4E2A\u7EBF\u7A0B\u5BF9\u5171\u4EAB\u8D44\u6E90\u8FDB\u884C\u8BFB\u5199\u64CD\u4F5C\u65F6\uFF0C\u53D1\u751F\u4E86\u6307\u4EE4\u4EA4\u9519\uFF0C\u5C31\u4F1A\u51FA\u73B0\u95EE\u9898

                                                                      4. \u4E00\u6BB5\u4EE3\u7801\u5757\u5185\uFF0C\u5982\u679C\u5B58\u5728\u5BF9\u5171\u4EAB\u8D44\u6E90\u7684\u591A\u7EBF\u7A0B\u8BFB\u5199\u64CD\u4F5C\uFF0C\u79F0\u8FD9\u6BB5\u4EE3\u7801\u5757\u4E3A\u4E34\u754C\u533A

                                                                      5. \u7ADE\u6001\u6761\u4EF6

                                                                        \u591A\u4E2A\u7EBF\u7A0B\u5728\u4E34\u754C\u533A\u5185\u6267\u884C\uFF0C\u7531\u4E8E\u4EE3\u7801\u7684\u6267\u884C\u5E8F\u5217\u4E0D\u540C\u800C\u5BFC\u81F4\u7ED3\u679C\u65E0\u6CD5\u9884\u6D4B\uFF0C\u79F0\u4E3A\u53D1\u751F\u4E86\u7ADE\u6001\u6761\u4EF6

                                                                      synchronized\u89E3\u51B3\u65B9\u6848

                                                                      1. \u4E3A\u4E86\u907F\u514D\u4E34\u754C\u533A\u7684\u7ADE\u6001\u6761\u4EF6\u53D1\u751F

                                                                        \u963B\u585E\u5F0F\u7684\u89E3\u51B3\u65B9\u6848\uFF1Asynchronized\uFF0CLock

                                                                        \u975E\u963B\u585E\u5F0F\u7684\u89E3\u51B3\u65B9\u6848\uFF1A\u539F\u5B50\u53D8\u91CF

                                                                      2. synchronized\u4FD7\u79F0\u5BF9\u8C61\u9501\uFF0C\u5B83\u4F1A\u91C7\u7528\u4E92\u65A5\u7684\u65B9\u5F0F\u8BA9\u540C\u4E00\u65F6\u523B\u81F3\u591A\u53EA\u6709\u4E00\u4E2A\u7EBF\u7A0B\u80FD\u6301\u6709\u5BF9\u8C61\u9501\u3002\u5176\u4ED6\u7EBF\u7A0B\u518D\u60F3\u83B7\u53D6\u8FD9\u4E2A\u5BF9\u8C61\u9501\u65F6\u5C31\u4F1A\u963B\u585E\u4F4F\u3002

                                                                        sleep() join() \u7B49\u5F85\u540C\u6B65\u9501 wait() suspend()

                                                                        \u8FD9\u51E0\u79CD\u4F1A\u8BA9\u7EBF\u7A0B\u4ECE\u8FD0\u884C\u6001\u5230\u963B\u585E\u6001\u3002

                                                                        \u8FD9\u91CC\u8BF4\u7684\u5C31\u662F\u7B49\u5F85\u540C\u6B65\u9501\u3002

                                                                        \u4E00\u4E2A\u7EBF\u7A0B\u9700\u8981\u67D0\u4E2A\u8D44\u6E90\u624D\u80FD\u6267\u884C\uFF0C\u8FD9\u91CC\u9501\u5C31\u662F\u8FD9\u4E2A\u8D44\u6E90\uFF0C\u4F46\u662F\u83B7\u53D6\u4E0D\u5230\u8FD9\u4E2A\u8D44\u6E90\uFF0C\u90A3\u4E48\u8FD9\u4E2A\u7EBF\u7A0B\u4F1A\u8FDB\u5165\u963B\u585E\u72B6\u6001\u3002

                                                                      3. synchronized\u80FD\u4FDD\u8BC1\u62E5\u6709\u9501\u7684\u7EBF\u7A0B\u53EF\u4EE5\u5B89\u5168\u5730\u6267\u884C\u4E34\u754C\u533A\u5185\u7684\u4EE3\u7801\uFF0C\u4E0D\u7528\u62C5\u5FC3\u7EBF\u7A0B\u4E0A\u4E0B\u6587\u5207\u6362\u3002

                                                                        \u56E0\u4E3A\u53EA\u8981\u8FD9\u4E2A\u7EBF\u7A0B\u4E0D\u91CA\u653E\u76D1\u89C6\u5668\uFF0C\u5176\u4ED6\u7EBF\u7A0B\u5C31\u65E0\u6CD5\u6267\u884C\u8FD9\u5757\u4EE3\u7801

                                                                      4. \u91C7\u7528\u7EE7\u627FThread\u7684\u65B9\u5F0F\u521B\u5EFA\u7684\u7EBF\u7A0B\uFF0C\u8981\u6CE8\u610F\u540C\u6B65\u76D1\u89C6\u5668\u8981\u4F7F\u7528\u7C7B\u7684\u5BF9\u8C61\uFF0C\u907F\u514D\u76F4\u63A5\u4F7F\u7528\u7EBF\u7A0B\u5BF9\u8C61\uFF0C\u56E0\u4E3A\u8981\u4FDD\u8BC1\u4F7F\u7528\u7684\u540C\u6B65\u76D1\u89C6\u5668\u662F\u552F\u4E00\u7684\u3002\u6240\u4EE5\u8FD9\u79CD\u60C5\u51B5\u4E0B\u4E0D\u80FD\u7528this

                                                                      5. \u4E0D\u8981\u9519\u8BEF\u7406\u89E3\u4E3A\u62E5\u6709\u9501\u7684\u7EBF\u7A0B\u5C31\u80FD\u4E00\u76F4\u6267\u884C\u4E0B\u53BB\uFF0C\u56E0\u4E3A\u8FD9\u4E2A\u7EBF\u7A0B\u53EF\u80FD\u4F1A\u65F6\u95F4\u7247\u7528\u5B8C\uFF0C\u4F46\u662F\u5373\u65F6\u8FD9\u4E2A\u7EBF\u7A0B\u7684\u65F6\u95F4\u7247\u7528\u5B8C\uFF0C\u53EA\u8981\u5B83\u6CA1\u6709\u91CA\u653E\u9501\uFF0C\u5176\u4ED6\u7EBF\u7A0B\u4ECD\u7136\u8FDB\u4E0D\u6765\u8FD9\u5757\u4EE3\u7801\u3002\u53EA\u6709\u7B49\u8FD9\u4E2A\u7EBF\u7A0B\u4E0B\u4E00\u6B21\u5206\u914D\u5230\u65F6\u95F4\u7247\uFF0C\u624D\u4F1A\u7EE7\u7EED\u8FDB\u53BB\u6267\u884C\u3002

                                                                      6. \u963B\u585E\u7684\u7EBF\u7A0B\u88AB\u5524\u9192\u4E4B\u540E\u4E5F\u4E0D\u662F\u8BF4\u5C31\u53EF\u4EE5\u7ACB\u5373\u6267\u884C\u4E86\uFF0C\u4ECD\u7136\u8981\u7B49CPU\u5206\u914D\u65F6\u95F4\u7247\u7ED9\u8FD9\u4E2A\u7EBF\u7A0B\u3002

                                                                        \u603B\u4E4B\u7EBF\u7A0B\u60F3\u8981\u6267\u884C\u67D0\u4E00\u6BB5\u4EE3\u7801\uFF0C\u9664\u4E86CPU\u9700\u8981\u5206\u914D\u7ED9\u8FD9\u4E2A\u7EBF\u7A0B\u65F6\u95F4\u7247\uFF0C\u8FD8\u8981\u8FD9\u6BB5\u4EE3\u7801\u7684\u9501\uFF08\u8FD9\u91CC\u8BA8\u8BBA\u7684\u662F\u540C\u6B65\u76D1\u89C6\u5668\u9501\u7684\u60C5\u51B5\uFF09\uFF0C\u5982\u679C\u83B7\u53D6\u4E0D\u5230\u9501\uFF0C\u5C31\u76F8\u5F53\u4E8E\u83B7\u53D6\u4E0D\u5230\u8D44\u6E90\uFF0C\u90A3\u4E48\u5C31\u4F1A\u88AB\u963B\u585E\u3002

                                                                        \u7EBF\u7A0B\u9700\u8981\u83B7\u53D6\u5230\u8D44\u6E90\u624D\u80FD\u6267\u884C\u67D0\u6BB5\u4EE3\u7801\uFF0C\u5982\u679C\u4E00\u76F4\u83B7\u53D6\u4E0D\u5230\u8D44\u6E90\uFF0C\u90A3\u4E48\u5C31\u4F1A\u88AB\u963B\u585E\u3002\u5F53\u7EBF\u7A0B\u6267\u884C\u8FD9\u6BB5\u4EE3\u7801\u9700\u8981\u7684\u8D44\u6E90\u88AB\u91CA\u653E\u540E\uFF0C\u90A3\u4E48\u8FD9\u4E2A\u7EBF\u7A0B\u4ECE\u963B\u585E\u6001\u88AB\u5524\u9192\uFF0C\u4E5F\u4E0D\u80FD\u9A6C\u4E0A\u6267\u884C\uFF0C\u800C\u662F\u8FDB\u5165\u5C31\u7EEA\u72B6\u6001\uFF0C\u7B49\u5F85CPU\u5206\u914D\u65F6\u95F4\u7247\u7ED9\u8FD9\u4E2A\u7EBF\u7A0B\u3002

                                                                      7. synchronized\u5B9E\u9645\u662F\u7528\u5BF9\u8C61\u9501\u4FDD\u8BC1\u4E86\u4E34\u754C\u533A\u5185\u4EE3\u7801\u7684\u539F\u5B50\u6027\uFF0C\u4E34\u754C\u533A\u5185\u7684\u4EE3\u7801\u6267\u884C\u4E0D\u4F1A\u88AB\u7EBF\u7A0B\u5207\u6362\u6240\u6253\u65AD\u3002

                                                                        \u6BD4\u5982\u8BF4\u67D0\u4E2A\u7EBF\u7A0B\u62E5\u6709\u67D0\u6BB5\u4EE3\u7801\u7684\u9501\uFF0C\u5373\u65F6\u8FD9\u4E2A\u7EBF\u7A0B\u65F6\u95F4\u7247\u7528\u5B8C\uFF0C\u53EA\u8981\u5B83\u6CA1\u6709\u91CA\u653E\u9501\uFF0C\u5176\u4ED6\u7EBF\u7A0B\u4ECD\u7136\u4E0D\u80FD\u8FDB\u6765\u6267\u884C\u8FD9\u6BB5\u4EE3\u7801\uFF0C\u8FD9\u6BB5\u4EE3\u7801\u53EA\u6709\u7B49CPU\u4E0B\u4E00\u6B21\u5206\u914D\u65F6\u95F4\u7247\u7ED9\u8FD9\u4E2A\u7EBF\u7A0B\uFF0C\u624D\u53EF\u4EE5\u7EE7\u7EED\u6267\u884C\u3002

                                                                        \u4F46\u5343\u4E07\u4E0D\u8981\u7406\u89E3\u4E3A\u4E00\u4E2A\u7EBF\u7A0B\u62E5\u6709\u67D0\u6BB5\u4EE3\u7801\u7684\u9501\uFF0C\u5C31\u53EF\u4EE5\u4E00\u76F4\u6267\u884C\u4E0B\u53BB\uFF0C\u4E2D\u95F4\u4ECD\u7136\u6709\u65F6\u95F4\u7247\u7528\u5B8C\u7684\u8FC7\u7A0B\uFF0C\u4ECD\u7136\u5B58\u5728\u4E0A\u4E0B\u6587\u5207\u6362\uFF0C\u4F46\u662F\u88AB\u9501\u4F4F\u7684\u8FD9\u6BB5\u4EE3\u7801\u4FDD\u8BC1\u4E86\u539F\u5B50\u6027\u3002

                                                                        **\u5373\u65F6\u53D1\u751F\u4E86\u4E0A\u4E0B\u6587\u5207\u6362\uFF0C\u8FD9\u6BB5\u4EE3\u7801\u4E5F\u4E0D\u4F1A\u8BA9\u5176\u4ED6\u6CA1\u6709\u62E5\u6709\u9501\u7684\u7EBF\u7A0B\u6765\u6267\u884C\u3002**\u53EA\u6709\u7B49\u8FD9\u4E2A\u62E5\u6709\u9501\u7684\u7EBF\u7A0B\u4E0B\u4E00\u6B21\u5206\u914D\u5230\u65F6\u95F4\u7247

                                                                      8. \u518D\u4E00\u6B21\u8BF4\u660E\u4E86\u5373\u4F7F\u662F\u5355\u6838CPU\u901A\u8FC7\u65F6\u95F4\u7247\u8F6E\u8F6C\u7684\u65B9\u5F0F\u4EA4\u66FF\u6267\u884C\u7EBF\u7A0B\uFF0C\u4ECD\u7136\u4F1A\u51FA\u73B0\u7EBF\u7A0B\u5B89\u5168\u95EE\u9898\uFF0C\u4E0D\u8981\u4EE5\u4E3A\u5728\u5FAE\u89C2\u4E0A\u662F\u4E32\u884C\u7684\uFF0C\u5B9E\u9645\u6CA1\u6709\u7EBF\u7A0B\u540C\u4E00\u65F6\u523B\u53BB\u64CD\u4F5C\u540C\u4E00\u4E2A\u8D44\u6E90\uFF0C\u5C31\u4E0D\u4F1A\u5B58\u5728\u7EBF\u7A0B\u5B89\u5168\u95EE\u9898\uFF0C\u5173\u952E\u5728\u4E8E\u65F6\u95F4\u7247\u4F1A\u7528\u5B8C\uFF0C\u7ED3\u679C\u6CA1\u4FDD\u5B58\u7684\u60C5\u51B5\u4E0B\uFF0C\u67D0\u4E2A\u8D44\u6E90\u53C8\u88AB\u53E6\u4E00\u4E2A\u7EBF\u7A0B\u53BB\u6267\u884C\u3002\u5173\u952E\u5728\u4E8E\u591A\u4E2A\u7EBF\u7A0B\u64CD\u4F5C\u5171\u4EAB\u6570\u636E\uFF0C\u5373\u65F6\u4ED6\u4EEC\u4E0D\u662F\u5728\u540C\u4E00\u65F6\u523B\u64CD\u4F5C\u5171\u4EAB\u6570\u636E\uFF0C\u800C\u662F\u5728\u591A\u4E2A\u65F6\u95F4\u6BB5\u64CD\u4F5C\u5171\u4EAB\u6570\u636E\uFF0C\u4ECD\u7136\u4F1A\u51FA\u73B0\u7EBF\u7A0B\u5B89\u5168\u95EE\u9898\u3002\uFF08\u56E0\u4E3A\u4E0A\u4E0B\u6587\u5207\u6362\uFF0C\u53D1\u751F\u6307\u4EE4\u4EA4\u9519\uFF09

                                                                      9. \u64CD\u4F5C\u5171\u4EAB\u6570\u636E\u7684\u4EE3\u7801\uFF0C\u5373\u4E3A\u9700\u8981\u88AB\u540C\u6B65\u7684\u4EE3\u7801

                                                                        \u5171\u4EAB\u6570\u636E\uFF1A\u591A\u4E2A\u7EBF\u7A0B\u5171\u540C\u64CD\u4F5C\u7684\u53D8\u91CF\u3002

                                                                      \u53D8\u91CF\u7684\u7EBF\u7A0B\u5B89\u5168\u5206\u6790

                                                                      1. \u6210\u5458\u53D8\u91CF\u548C\u9759\u6001\u53D8\u91CF

                                                                        • \u5982\u679C\u4ED6\u4EEC\u6CA1\u6709\u88AB\u5171\u4EAB\uFF0C\u5219\u7EBF\u7A0B\u5B89\u5168
                                                                        • \u5982\u679C\u4ED6\u4EEC\u88AB\u5171\u4EAB
                                                                          • \u5982\u679C\u53EA\u6709\u8BFB\u64CD\u4F5C\uFF0C\u5219\u7EBF\u7A0B\u5B89\u5168
                                                                          • \u5982\u679C\u6709\u8BFB\u5199\u64CD\u4F5C\uFF0C\u5219\u8FD9\u6BB5\u4EE3\u7801\u662F\u4E34\u754C\u533A\uFF0C\u9700\u8981\u8003\u8651\u7EBF\u7A0B\u5B89\u5168\u95EE\u9898
                                                                      2. \u5C40\u90E8\u53D8\u91CF\u662F\u7EBF\u7A0B\u5B89\u5168\u7684

                                                                        \u5C40\u90E8\u53D8\u91CF\u662F\u5728\u6808\u7684\u6808\u5E27\u91CC\u3002\u6808\u662F\u7EBF\u7A0B\u79C1\u6709\u7684\uFF0C\u6240\u4EE5\u5C40\u90E8\u53D8\u91CF\u662F\u7EBF\u7A0B\u5B89\u5168\u7684

                                                                        \u5C40\u90E8\u53D8\u91CF\u5F15\u7528\u7684\u5BF9\u8C61\uFF1A

                                                                        • \u5982\u679C\u8BE5\u5BF9\u8C61\u6CA1\u6709\u9003\u79BB\u65B9\u6CD5\u7684\u4F5C\u7528\u8303\u56F4\uFF0C\u5B83\u662F\u7EBF\u7A0B\u5B89\u5168\u7684
                                                                        • \u5982\u679C\u8BE5\u5BF9\u8C61\u9003\u79BB\u65B9\u6CD5\u7684\u4F5C\u7528\u8303\u56F4\uFF0C\u9700\u8981\u8003\u8651\u7EBF\u7A0B\u5B89\u5168
                                                                      3. i++\u867D\u7136\u5728\u5B57\u8282\u7801\u6307\u4EE4\u5C42\u9762\uFF0C\u5206\u4E3A\u597D\u51E0\u6761\u5B57\u8282\u7801\u6307\u4EE4\uFF0C\u4E0D\u662F\u539F\u5B50\u64CD\u4F5C\uFF0C\u4F46\u662F\u8FD9\u51E0\u6761\u5B57\u8282\u7801\u6307\u4EE4\u4E0D\u88AB\u7EBF\u7A0B\u6240\u5171\u4EAB\u3002

                                                                      Monitor\u6982\u5FF5

                                                                      1. Java\u5BF9\u8C61\u5728\u5806\u7A7A\u95F4\u4E2D\u88AB\u5B9E\u4F8B\u5316\u4EE5\u540E\uFF0C\u4E3B\u8981\u5206\u4E3A\u4E24\u90E8\u5206

                                                                        • \u5BF9\u8C61\u5934

                                                                          • \u8FD0\u884C\u65F6\u5143\u6570\u636E\uFF08Mark Word\uFF09----hashcode\uFF0C\u5206\u4EE3\u5E74\u9F84\uFF08\u4ECE\u5E78\u5B58\u8005\u533A\u5230\u8001\u5E74\u4EE3\uFF09\uFF0C\u504F\u5411\u9501\uFF0C\u52A0\u9501\u72B6\u6001
                                                                          • \u7C7B\u578B\u6307\u9488---\u6307\u5411\u65B9\u6CD5\u533A\u4E2D\u8FD9\u4E2A\u5BF9\u8C61\u7684\u7C7B\u7684\u4FE1\u606F\uFF0C\u901A\u8FC7\u8FD9\u4E2A\u6307\u9488\u53EF\u4EE5\u627E\u5230\u7C7B\u5BF9\u8C61
                                                                          • \uFF08\u5982\u679C\u662F\u6570\u7EC4\uFF0C\u8FD8\u6709\u6570\u7EC4\u7684\u957F\u5EA6\u7684\u4FE1\u606F\uFF09

                                                                          image-20210906143610290

                                                                          \u8FD0\u884C\u65F6\u5143\u6570\u636EMark Word\u683C\u5F0F\uFF1A

                                                                          image-20210906171812809

                                                                        • \u5B9E\u4F8B\u6570\u636E\uFF08\u771F\u6B63\u7684\u6709\u6548\u6570\u636E\uFF0C\u6210\u5458\u53D8\u91CF\u7B49\u7B49\uFF09

                                                                      2. \u5305\u88C5\u7C7B\u578B\u6BD4\u57FA\u672C\u7C7B\u578B\u5360\u7528\u7684\u7A7A\u95F4\u5927\u3002\u4ECE\u5BF9\u8C61\u5934\u7684\u89D2\u5EA6\u5C31\u53EF\u4EE5\u770B\u51FA\u6765\u3002

                                                                      3. Monitor\u662F\u975E\u5E38\u91CD\u8981\u7684\u6982\u5FF5\uFF0C\u4E5F\u662FSynchronized\u9501\u5E95\u5C42\u7684\u539F\u7406\u3002

                                                                        Monitor\u88AB\u7FFB\u8BD1\u4E3A\u76D1\u89C6\u5668\u6216\u7BA1\u7A0B

                                                                      4. \u6BCF\u4E2AJava\u5BF9\u8C61\u90FD\u53EF\u4EE5\u5173\u8054\u4E00\u4E2AMonitor\u5BF9\u8C61\uFF0C\u5982\u679C\u4F7F\u7528synchronized\u7ED9\u5BF9\u8C61\u4E0A\u9501\uFF08\u91CD\u91CF\u7EA7\uFF09\u4E4B\u540E\uFF0C\u8BE5\u5BF9\u8C61\u5934\u7684Mark Word\u4E2D\u5C31\u88AB\u8BBE\u7F6E\u6307\u5411Monitor\u5BF9\u8C61\u7684\u6307\u9488\u3002

                                                                      5. synchronized\u4E0A\u9501\u7ED9\u4EE3\u7801\u5757\u4E0A\u9501\uFF0C\u6216\u8005\u91C7\u7528\u540C\u6B65\u65B9\u6CD5\u7684\u65B9\u5F0F\uFF0C\u5E95\u5C42\u539F\u7406\u90FD\u662F\u7ED9\u5BF9\u8C61\u4E0A\u9501\u3002

                                                                        image-20210906144113619

                                                                      6. \u4E00\u4E2A\u5BF9\u8C61\u5728\u5806\u7A7A\u95F4\u4E2D\u5206\u4E3A\u5BF9\u8C61\u5934\u548C\u5B9E\u4F8B\u6570\u636E

                                                                        \u5BF9\u8C61\u5934\u91CC\u6709\u8FD0\u884C\u65F6\u5143\u6570\u636E\uFF08Mark Word\uFF09\u548C\u7C7B\u578B\u6307\u9488\uFF0C\u5982\u679C\u662F\u6570\u7EC4\u8FD8\u6709\u6570\u7EC4\u7684\u957F\u5EA6\u4FE1\u606F\uFF0C\u5728\u8FD0\u884C\u65F6\u5143\u6570\u636E\u91CC\u5C31\u6709hashcode\uFF0C\u5206\u4EE3\u5E74\u9F84\uFF0C\u504F\u5411\u9501\u548C\u52A0\u9501\u72B6\u6001\u7684\u4FE1\u606F\u3002

                                                                        \u7ED9\u4E00\u4E2A\u5BF9\u8C61\u4E0A\u9501\u4E4B\u540E\uFF0C\u8FD9\u4E2AJava\u5BF9\u8C61\u7684\u5BF9\u8C61\u5934\u7684\u8FD0\u884C\u65F6\u5143\u6570\u636E\uFF08Mark Word\uFF09\u5C31\u6307\u5411\uFF08\u5173\u8054\uFF09\u4E00\u4E2AMonitor\u5BF9\u8C61\u3002\u8FD0\u884C\u65F6\u5143\u6570\u636E\u91CC\u5B58\u50A8\u4E86\u4E00\u4E2A\u6307\u5411Monitor\u7684\u5730\u5740\u6307\u9488

                                                                      7. Monitor\u91CC\u7684\u5C5E\u6027

                                                                        • Owner\uFF0C\u662F\u9501\u7684\u6240\u6709\u8005

                                                                          Monitor\u7684\u8FD9\u4E2AOwner\u53EA\u80FD\u6709\u4E00\u4E2A\u6240\u6709\u8005\u3002

                                                                        • EntryList\uFF0C\u662F\u7B49\u5F85\u961F\u5217

                                                                          \u6BD4\u5982\u5F53\u524DMonitor\u7684Owner\uFF0C\u5373\u62E5\u6709\u5F53\u524D\u8FD9\u4E2AMonitor\u7684\u7EBF\u7A0B\u662FThread1\uFF0C\u90A3\u4E48\u5F53Thread2\u6765\u5224\u65AD\u662F\u5426\u53EF\u4EE5\u8BBF\u95EE\u8FD9\u6BB5\u4E34\u754C\u4EE3\u7801\u65F6\uFF0C\u9996\u5148\u5224\u65AD\u8FD9\u4E2A\u9501\u5BF9\u8C61obj\u7684\u8FD0\u884C\u65F6\u5143\u6570\u636E\uFF08Mark Word\uFF09\u6709\u6CA1\u6709\u6307\u5411Monitor\u7684\u6307\u9488\uFF0C\u5373\u6709\u6CA1\u6709\u5173\u8054\u4E00\u4E2AMonitor\u5BF9\u8C61\uFF0C\u5982\u679C\u6709\uFF0C\u518D\u5224\u65AD\u8FD9\u4E2AMonitor\u7684Owner\u6709\u6CA1\u6709\u6240\u6709\u8005\uFF0C\u5982\u679C\u6709\u7684\u8BDD\uFF0C\u5C31\u8FDB\u5165EntryList\u7B49\u5F85\u961F\u5217\uFF08\u6216\u8005\u53EB\u963B\u585E\u72B6\u6001\uFF09\uFF0C\u90A3\u4E48\u8FD9\u4E2AThread2\u672C\u8EAB\u8FDB\u5165\u963B\u585E\u72B6\u6001\uFF08BLOCKED\uFF09\uFF0C\u7B49\u5F85\u5176\u4ED6\u7EBF\u7A0B\u91CA\u653E\u5BF9Monitor\u7684\u6240\u6709\u6743\u3002

                                                                          \u5982\u679C\u6B64\u65F6\u53C8\u6709\u4E00\u4E2A\u7EBF\u7A0B\u6765\u4E86\uFF0C\u4E5F\u8981\u6765\u6267\u884C\u8FD9\u6BB5\u4E34\u754C\u4EE3\u7801\uFF0C\u9996\u5148\u53D1\u73B0obj\u5173\u8054\u4E86Monitor\u5BF9\u8C61\uFF0C\u7136\u540EOwner\u6709\u4E3B\u4EBA\uFF0C\u4E5F\u8FDB\u5165EntryList\u963B\u585E\u961F\u5217\uFF0C\u90A3\u4E48\u8BE5\u7EBF\u7A0B\uFF0C\u4ECE\u8FD0\u884C\u72B6\u6001\u4E5F\u8FDB\u5165\u963B\u585E\u72B6\u6001\uFF08BLOCKED\uFF09\u3002

                                                                          \u5F53\u4E00\u4E2A\u7EBF\u7A0B\u9700\u8981\u67D0\u6837\u8D44\u6E90\u7EE7\u7EED\u6267\u884C\u7684\u65F6\u5019\uFF0C\u4F46\u662F\u53C8\u83B7\u53D6\u4E0D\u5230\u8FD9\u6837\u8D44\u6E90\uFF0C\u90A3\u4E48\u4F1A\u8FDB\u5165\u963B\u585E\u72B6\u6001\u3002

                                                                          \u4E0A\u9762\u8BF4\u7684\u7EBF\u7A0B\u8FDB\u5165\u963B\u585E\u72B6\u6001\u7684\u60C5\u51B5\uFF0C\u662F\u7B49\u5F85\u540C\u6B65\u9501\uFF0C\u7136\u540E\u8FDB\u5165\u963B\u585E\u72B6\u6001\u3002

                                                                          \u4E00\u4E2A\u7EBF\u7A0B\u4ECE\u8FD0\u884C\u72B6\u6001\u8FDB\u5165\u963B\u585E\u72B6\u6001\uFF0C\u6709\u4EE5\u4E0B\u4E94\u79CD\u60C5\u51B5

                                                                          • join()---\u7531RUNNABLE\u5230WAITING
                                                                          • sleep()----\u7531RUNNABLE \u5230 TIMED_WAITING
                                                                          • wait()---\u7531RUNNABLE\u5230WAITING
                                                                          • suspend() \uFF08\u5DF2\u7ECFdeprecated\uFF09
                                                                          • \u7B49\u5F85\u540C\u6B65\u9501---\u7531RUNNABLE\u5230BLOCKED

                                                                          BLOCKED, WAITING, TIMED_WATING\u4E09\u79CD\u72B6\u6001\u5728Java\u7684\u7EBF\u7A0B\u72B6\u6001\u8FD9\u4E2A\u89D2\u5EA6\u6765\u8BF4\uFF0C\u90FD\u53EB\u963B\u585E\u72B6\u6001

                                                                          image-20210906145616412

                                                                      8. \u5BF9synchronized\u5BF9\u4EE3\u7801\u5757\u6216\u65B9\u6CD5\u4E0A\u9501\u7684\u539F\u7406\u63CF\u8FF0

                                                                        • \u521A\u5F00\u59CBMonitor\u4E2DOwner\u4E3Anull
                                                                        • \u5F53Thread-2\u6267\u884Csynchronized(obj)\u5C31\u4F1A\u5C06Monitor\u7684\u6240\u6709\u8005Owner\u7F6E\u4E3AThread-2\uFF0CMonitor\u4E2D\u53EA\u80FD\u6709\u4E00\u4E2AOwner
                                                                        • \u5728Thread-2\u4E0A\u9501\u7684\u8FC7\u7A0B\u4E2D\uFF0C\u5982\u679CThread-3\uFF0CThread-4\uFF0CThread-5\u4E5F\u6765\u6267\u884Csynchronized(obj)\uFF0C\u5C31\u4F1A\u8FDB\u5165EntryList \u7531\u8FD0\u884C\u6001\u5230BLOCKED
                                                                        • Thread-2\u6267\u884C\u5B8C\u540C\u6B65\u4EE3\u7801\u5757\u7684\u5185\u5BB9\uFF0C\u5373\u4E34\u754C\u533A\u7684\u4EE3\u7801\uFF0C\u7136\u540E\u5524\u9192EntryList\u4E2D\u7B49\u5F85\u7684\u7EBF\u7A0B\u6765\u7ADE\u4E89\u9501\uFF0C\u7ADE\u4E89\u7684\u65F6\u5019\u662F\u975E\u516C\u5E73\u7684\u3002
                                                                      9. JVM\u57FA\u4E8E\u8FDB\u5165\u548C\u9000\u51FAMonitor\u5BF9\u8C61\u6765\u5B9E\u73B0\u540C\u6B65\u65B9\u6CD5\u548C\u540C\u6B65\u4EE3\u7801\u5757

                                                                        \u4F46\u4E24\u8005\u7684\u5B9E\u73B0\u7EC6\u8282\u4E0D\u4E00\u6837\uFF0C\u4EE3\u7801\u5757\u540C\u6B65\u662F\u4F7F\u7528monitorenter\u548Cmonitorexit\u5B57\u8282\u7801\u6307\u4EE4\u5B9E\u73B0\u7684\uFF0C\u800C\u65B9\u6CD5\u540C\u6B65\u662F\u4F7F\u7528\u53E6\u5916\u4E00\u79CD\u65B9\u5F0F\u5B9E\u73B0\u7684\uFF0C\u7EC6\u8282\u5728JVM\u89C4\u8303\u91CC\u5E76\u6CA1\u6709\u8BE6\u7EC6\u8BF4\u660E\uFF0C\u4F46\u662F\uFF0C\u65B9\u6CD5\u7684\u540C\u6B65\u540C\u6837\u53EF\u4EE5\u4F7F\u7528\u8FD9\u4E24\u4E2A\u6307\u4EE4\u6765\u5B9E\u73B0\u3002

                                                                        monitorenter\u6307\u4EE4\u662F\u5728\u7F16\u8BD1\u540E\u63D2\u5165\u5230\u540C\u6B65\u4EE3\u7801\u5757\u7684\u5F00\u59CB\u4F4D\u7F6E\uFF0C\u800Cmonitorexit\u662F\u63D2\u5165\u5230\u65B9\u6CD5\u7ED3\u675F\u5904\u548C\u5F02\u5E38\u5904\u3002

                                                                        JVM\u8981\u4FDD\u8BC1\u6BCF\u4E2Amonitorenter\u5FC5\u987B\u6709\u5BF9\u5E94\u7684monitorexit\u4E0E\u4E4B\u914D\u5BF9\u3002

                                                                        \u4EFB\u4F55\u5BF9\u8C61\u90FD\u6709\u4E00\u4E2Amonitor\u4E0E\u4E4B\u5173\u8054\uFF0C\u5F53\u4E14\u4E00\u4E2Amonitor\u88AB\u6301\u6709\u540E\uFF0C\u5B83\u5C06\u5904\u4E8E\u9501\u5B9A\u72B6\u6001\uFF0C\u7EBF\u7A0B\u6267\u884C\u5230monitorenter\u5B57\u8282\u7801\u6307\u4EE4\u65F6\uFF0C\u5C06\u4F1A\u5C1D\u8BD5\u83B7\u53D6\u4E0A\u9501\u5BF9\u8C61\u6240\u5BF9\u5E94\u7684monitor\u7684\u6240\u6709\u6743\uFF0C\u5373\u5C1D\u8BD5\u83B7\u5F97\u5BF9\u8C61\u7684\u9501

                                                                      10. synchronized\u5FC5\u987B\u662F\u8FDB\u5165\u540C\u4E00\u4E2A\u5BF9\u8C61\u7684monitor\u624D\u6709\u6548\u679C\uFF0C\u6240\u4EE5\u4E00\u5B9A\u8981\u4FDD\u8BC1\u540C\u6B65\u76D1\u89C6\u5668\u53EA\u6709\u4E00\u4E2A\u3002

                                                                      synchronized\u8FDB\u9636\u539F\u7406

                                                                      1. synchronized\u5DE5\u4F5C\u65B9\u5F0F\u662F\u8BA9\u5BF9\u8C61\u5173\u8054monitor\u5BF9\u8C61\uFF0C\u4F46\u662Fmonitor\u8FD9\u4E2A\u9501\u662F\u7531\u64CD\u4F5C\u7CFB\u7EDF\u63D0\u4F9B\u7684\uFF0C\u4F7F\u7528Monitor\u6210\u672C\u6BD4\u8F83\u9AD8\uFF0C\u5982\u679C\u6BCF\u6B21\u8FDB\u5165synchronized(xxx)\u90FD\u8981\u83B7\u53D6Monitor\u9501\uFF0C\u5BF9\u7A0B\u5E8F\u8FD0\u884C\u7684\u6027\u80FD\u662F\u6709\u5F71\u54CD\u7684\u3002

                                                                      2. \u4ECEJava6\u5BF9synchronized\u5173\u952E\u5B57\u83B7\u53D6\u9501\u7684\u65B9\u5F0F\u8FDB\u884C\u4E86\u6539\u8FDB\u548C\u4F18\u5316\u3002

                                                                        \u4ECE\u76F4\u63A5\u4F7F\u7528Monitor\u9501\u6539\u6210\u4E86\u53EF\u4EE5\u4F7F\u7528\u8F7B\u91CF\u7EA7\u9501\u548C\u504F\u5411\u9501

                                                                      3. Monitor\u662F\u5C5E\u4E8E\u91CD\u91CF\u7EA7\u9501

                                                                      4. \u6CA1\u6709\u7ADE\u4E89\u7684\u65F6\u5019\uFF0C\u5C31\u662F\u8BF4\u5982\u679C\u4F7F\u7528\u5171\u4EAB\u8D44\u6E90\u7684\u65F6\u95F4\u662F\u9519\u5F00\u7684\u65F6\u5019\uFF0C\u53EF\u4EE5\u4F7F\u7528\u8F7B\u91CF\u7EA7\u9501\uFF0C\u5982\u679C\u4F7F\u7528\u5171\u4EAB\u6570\u636E\u7684\u65F6\u95F4\u6CA1\u6709\u9519\u5F00\uFF0C\u90A3\u4E48\u8F7B\u91CF\u7EA7\u9501\u4E5F\u4F1A\u5347\u7EA7\u4E3A\u91CD\u91CF\u7EA7\u9501\u3002

                                                                      5. jdk1.6\u7248\u672C\uFF0C\u4E3A\u4E86\u51CF\u5C11\u83B7\u5F97\u9501\u548C\u91CA\u653E\u9501\u5E26\u6765\u7684\u6027\u80FD\u6D88\u8017\uFF0C\u5F15\u5165\u4E86\u504F\u5411\u9501\u548C\u8F7B\u91CF\u7EA7\u9501\uFF0C\u5728jdk1.6\u4E2D\uFF0C\u9501\u4E00\u5171\u67094\u79CD\u72B6\u6001\uFF0C\u7EA7\u522B\u4ECE\u4F4E\u5230\u9AD8\u4F9D\u6B21\u662F\uFF1A\u65E0\u9501\u72B6\u6001\u3001\u504F\u5411\u9501\u72B6\u6001\u3001\u8F7B\u91CF\u7EA7\u9501\u72B6\u6001\u548C\u91CD\u91CF\u7EA7\u9501\u72B6\u6001\u3002\u8FD9\u51E0\u4E2A\u72B6\u6001\u4F1A\u968F\u7740\u7ADE\u4E89\u60C5\u51B5\u9010\u6E10\u5347\u7EA7\uFF0C\u9501\u53EF\u4EE5\u5347\u7EA7\u4F46\u662F\u4E0D\u80FD\u964D\u7EA7\uFF0C\u610F\u5473\u7740\u504F\u5411\u9501\u5347\u7EA7\u4E3A\u8F7B\u91CF\u7EA7\u9501\u4E4B\u540E\u4E0D\u80FD\u964D\u7EA7\u6210\u504F\u5411\u9501\u3002

                                                                      \u8F7B\u91CF\u7EA7\u9501

                                                                      1. \u8F7B\u91CF\u7EA7\u9501\u7684\u4F7F\u7528\u573A\u666F\uFF1A\u5982\u679C\u4E00\u4E2A\u5BF9\u8C61\u867D\u7136\u6709\u591A\u7EBF\u7A0B\u8BBF\u95EE\uFF0C\u4F46\u591A\u7EBF\u7A0B\u8BBF\u95EE\u7684\u65F6\u95F4\u662F\u9519\u5F00\u7684\uFF08\u4E5F\u5C31\u662F\u6CA1\u6709\u7ADE\u4E89\uFF09\uFF0C\u90A3\u4E48\u53EF\u4EE5\u4F7F\u7528\u8F7B\u91CF\u7EA7\u9501\u6765\u4F18\u5316\u3002

                                                                        \u5982\u679C\u6709\u7ADE\u4E89\uFF0C\u8F7B\u91CF\u7EA7\u9501\u4F1A\u5347\u7EA7\u4E3A\u91CD\u91CF\u7EA7\u9501

                                                                        \u8F7B\u91CF\u7EA7\u9501\u7684\u8BED\u6CD5\u4ECD\u7136\u662Fsynchronized

                                                                      2. \u8F7B\u91CF\u7EA7\u9501\u5DE5\u4F5C\u539F\u7406

                                                                        1. \u5728\u7EBF\u7A0B\u7684\u865A\u62DF\u673A\u6808\u7684\u6808\u5E27\u521B\u5EFA\u9501\u8BB0\u5F55\uFF08Lock Record\uFF09\u5BF9\u8C61

                                                                          \u6BCF\u4E2A\u7EBF\u7A0B\u7684\u6808\u5E27\u90FD\u4F1A\u5305\u542B\u4E00\u4E2A\u9501\u8BB0\u5F55\u7684\u7ED3\u6784\u3002

                                                                          \u5185\u90E8\u53EF\u4EE5\u5B58\u50A8\u9501\u5B9A\u5BF9\u8C61\u7684Mark Word\uFF08\u8FD0\u884C\u65F6\u5143\u6570\u636E\uFF09

                                                                          image-20210906162329611

                                                                          \u8FD9\u4E2ALock Record\u5305\u542B\u4E86\u4E24\u90E8\u5206

                                                                          • \u4E00\u90E8\u5206\u662F\u5BF9\u8C61\u6307\u9488\uFF0C\u9501\u4F4F\u54EA\u4E2A\u5BF9\u8C61\uFF0C\u5F97\u77E5\u9053\u5BF9\u8C61\u5730\u5740\uFF0C\u8FD9\u4E00\u90E8\u5206\u5C31\u662F\u6307\u5411\u52A0\u9501\u5BF9\u8C61\u7684\u5BF9\u8C61\u5F15\u7528
                                                                          • \u53E6\u4E00\u90E8\u5206\u662F\u9501\u8BB0\u5F55\u5730\u5740\u548C\u540E\u4E24\u4F4D\u6807\u8BC600\uFF0800\u4EE3\u8868\u8F7B\u91CF\u7EA7\u9501\uFF09\uFF0C\u8FD9\u4E00\u90E8\u5206\u5C06\u6765\u7528\u6765\u5B58\u50A8\u52A0\u9501\u5BF9\u8C61\u7684Mark Word
                                                                        2. \u8BA9\u9501\u8BB0\u5F55\u4E2DObject reference\u6307\u5411\u9501\u5BF9\u8C61\uFF0C\u5E76\u5C1D\u8BD5\u7528cas\u66FF\u6362Object\u7684Mark Word\uFF0C\u5C06Mark Word\u7684\u503C\u5B58\u5165\u9501\u8BB0\u5F55\uFF08\u5173\u952E\uFF09\u3002

                                                                          \u505A\u8FD9\u4E00\u6B65\u4EA4\u6362\u7684\u64CD\u4F5C\u5C31\u8868\u793A\u52A0\u9501

                                                                          image-20210906162952714

                                                                        3. \u5982\u679CCAS\u66FF\u6362\u6210\u529F\uFF0C\u5BF9\u8C61\u5934\u4E2D\u5B58\u50A8\u4E86\u9501\u8BB0\u5F55\u5730\u5740\u548C\u72B6\u600100\uFF0C\u8868\u793A\u8FD9\u4E2A\u5BF9\u8C61\u5DF2\u7ECF\u52A0\u4E86\u8F7B\u91CF\u7EA7\u9501

                                                                          \u9501\u8BB0\u5F55\u91CC\u9762\u5B58\u653E\u4E86\u5BF9\u8C61\u7684\u5BF9\u8C61\u5934\u7684Mark Word\uFF08\u8FD0\u884C\u65F6\u5143\u6570\u636E--hashcode\uFF0C\u5206\u4EE3\u5E74\u9F84\u7B49\uFF09

                                                                          \u5C06\u6765\u89E3\u9501\u7684\u65F6\u5019\uFF0C\u518D\u6062\u590D\u56DE\u53BB

                                                                          image-20210906163537132

                                                                          \u4E0A\u9762\u8BF4\u7684\u662F\u6210\u529F\u7684\u60C5\u51B5\uFF0C\u5982\u679C\u5BF9\u8C61\u7684\u5BF9\u8C61\u5934\u7684Mark Word\u6807\u8BB0\u4F4D\u662F01\uFF0C\u4EE3\u8868\u662F\u6B63\u5E38\u60C5\u51B5\uFF0C\u6CA1\u6709\u52A0\u9501\uFF0C\u90A3\u4E48\u8FD9\u79CD\u60C5\u51B5\uFF0C\u4EA4\u6362\u53EF\u4EE5\u6210\u529F\uFF0C\u5373\u52A0\u9501\u53EF\u4EE5\u6210\u529F

                                                                        4. \u5982\u679CCAS\u66FF\u6362\u5931\u8D25\uFF0C\u6709\u4E24\u79CD\u60C5\u51B5

                                                                          • \u5982\u679C\u662F\u5176\u4ED6\u7EBF\u7A0B\u5DF2\u7ECF\u6301\u6709\u4E86\u8BE5Object\u5BF9\u8C61\u7684\u8F7B\u91CF\u7EA7\u9501\uFF08Object\u5BF9\u8C61\u5BF9\u8C61\u5934\u91CC\u6807\u8BB0\u662F00\uFF09\uFF0C\u8FD9\u65F6\u8868\u660E\u6709\u7ADE\u4E89\uFF0C\u8FDB\u5165\u9501\u81A8\u80C0\u8FC7\u7A0B

                                                                          • \u5982\u679C\u662F\u81EA\u5DF1\u6267\u884C\u4E86synchronized\u9501\u91CD\u5165\uFF0C\u90A3\u4E48\u518D\u6DFB\u52A0\u4E00\u6761Lock Record\u4F5C\u4E3A\u91CD\u5165\u7684\u8BA1\u6570\u3002

                                                                            \u4F46\u662F\u8FD9\u79CD\u5931\u8D25\u6CA1\u5173\u7CFB\uFF0C\u56E0\u4E3A\u662F\u540C\u4E00\u4E2A\u7EBF\u7A0B\u53C8\u5BF9\u540C\u4E00\u4E2A\u5BF9\u8C61\u52A0\u9501\uFF0C\u4E5F\u4F1A\u5728\u65B0\u7684\u6808\u5E27\uFF08\u865A\u62DF\u673A\u6808\u7684\u5B58\u50A8\u5355\u4F4D\uFF09\u91CC\u521B\u5EFA\u9501\u8BB0\u5F55\uFF0C\u9501\u8BB0\u5F55\u5730\u5740\u90E8\u5206\u5B58\u4E3Anull\uFF0C\u8FD9\u79CD\u60C5\u51B5\u53EB\u505Asynchronized\u9501\u91CD\u5165

                                                                            image-20210906164102507

                                                                          CAS\u64CD\u4F5C\u662F\u539F\u5B50\u6027\u7684\uFF0C\u4E0D\u4F1A\u88AB\u6253\u65AD

                                                                          \u603B\u7ED3\uFF1A\u540C\u4E00\u4E2A\u7EBF\u7A0B\u5BF9\u540C\u4E00\u4E2A\u5BF9\u8C61\u518D\u52A0\u9501\uFF0C\u8FD9\u79CD\u60C5\u51B5\u53EBsynchronized\u9501\u91CD\u5165

                                                                        5. \u89E3\u9501\uFF1A

                                                                          • \u5982\u679C\u6709\u53D6\u503C\u4E3Anull\u7684\u9501\u8BB0\u5F55\uFF0C\u8868\u793A\u6709\u91CD\u5165\uFF0C\u8FD9\u65F6\u91CD\u7F6E\u9501\u8BB0\u5F55\uFF0C\u8868\u793A\u91CD\u5165\u8BA1\u6570\u51CF\u4E00

                                                                            image-20210906164652141

                                                                          • \u5F53\u9000\u51FAsynchronized\u4EE3\u7801\u5757\u65F6\uFF0C\u9501\u8BB0\u5F55\u7684\u503C\u4E0D\u4E3Anull\uFF0C\u8FD9\u65F6\u4F7F\u7528cas\u5C06 Mark Word\u7684\u503C\u6062\u590D\u7ED9\u5BF9\u8C61\u5934

                                                                            • \u6210\u529F\uFF0C\u5219\u89E3\u9501\u6210\u529F
                                                                            • \u5931\u8D25\uFF0C\u8BF4\u660E\u8F7B\u91CF\u7EA7\u9501\u8FDB\u884C\u4E86\u9501\u81A8\u80C0\u6216\u5DF2\u7ECF\u5347\u7EA7\u4E3A\u91CD\u91CF\u7EA7\u9501\uFF0C\u8FDB\u5165\u91CD\u91CF\u7EA7\u9501\u89E3\u9501\u6D41\u7A0B

                                                                      \u9501\u81A8\u80C0

                                                                      1. \u5982\u679C\u5728\u5C1D\u8BD5\u52A0\u8F7B\u91CF\u7EA7\u9501\u7684\u8FC7\u7A0B\u4E2D\uFF0CCAS\u64CD\u4F5C\u65E0\u6CD5\u6210\u529F\uFF0C\u8FD9\u65F6\u4E00\u79CD\u60C5\u51B5\u5C31\u662F\u6709\u5176\u4ED6\u7EBF\u7A0B\u4E3A\u6B64\u5BF9\u8C61\u52A0\u4E0A\u4E86\u8F7B\u91CF\u7EA7\u9501\uFF08\u6709\u7ADE\u4E89\uFF09\uFF0C\u8FD9\u65F6\u9700\u8981\u8FDB\u884C\u9501\u81A8\u80C0\uFF0C\u5C06\u8F7B\u91CF\u7EA7\u9501\u53D8\u4E3A\u91CD\u91CF\u7EA7\u9501\u3002

                                                                      2. \u9501\u81A8\u80C0\u8FC7\u7A0B

                                                                        • \u5F53Thread-1\u8FDB\u884C\u8F7B\u91CF\u7EA7\u52A0\u9501\u65F6\uFF0CThread-0\u5DF2\u7ECF\u5BF9\u8BE5\u5BF9\u8C61\u52A0\u4E86\u8F7B\u91CF\u7EA7\u9501

                                                                          image-20210906165418735

                                                                        • \u8FD9\u65F6Thread-1\u52A0\u8F7B\u91CF\u7EA7\u9501\u5931\u8D25\uFF0C\u8FDB\u5165\u9501\u81A8\u80C0\u6D41\u7A0B

                                                                          • \u5373\u4E3AObject\u5BF9\u8C61\u7533\u8BF7Monitor\u9501\uFF0C\u8BA9Object\u5BF9\u8C61\u6307\u5411\u91CD\u91CF\u7EA7\u9501\u5730\u5740\u3002\u5E76\u4E14Mark Word\u540E\u4E24\u4F4D\u4F1A\u53D8\u4E3A10\uFF0C\u8868\u793A\u91CD\u91CF\u7EA7\u9501\u3002
                                                                          • \u7136\u540E\u81EA\u5DF1\u8FDB\u5165Monitor\u7684EntryList \u8FDB\u5165\u963B\u585E\u72B6\u6001BLOCKED

                                                                          image-20210906165650753

                                                                        • \u5F53Thread-0\u9000\u51FA\u540C\u6B65\u5757\u89E3\u9501\u65F6\uFF0C\u4F7F\u7528cas\u5C06Lock Record\u4E2DMark Word\u7684\u503C\u6062\u590D\u7ED9\u5BF9\u8C61\u5934\uFF0C\u5931\u8D25

                                                                          \u8FDB\u5165\u91CD\u91CF\u7EA7\u9501\u89E3\u9501\u6D41\u7A0B\u3002\u5373\u6309\u7167Monitor\u5730\u5740\u627E\u5230Monitor\u5BF9\u8C61\uFF0C\u8BBE\u7F6EOwner\u4E3Anull\uFF0C\u5524\u9192EntryList\u4E2DBLOCKED\u7EBF\u7A0B

                                                                      \u81EA\u65CB\u4F18\u5316

                                                                      1. \u7EBF\u7A0B\u963B\u585E\uFF0C\u90A3\u4E48\u5C31\u8981\u53D1\u751F\u4E00\u6B21\u4E0A\u4E0B\u6587\u5207\u6362\uFF0C\u8FD9\u662F\u6BD4\u8F83\u8017\u8D39\u6027\u80FD\u7684\u3002

                                                                        \u91CD\u91CF\u7EA7\u9501\u7ADE\u4E89\u7684\u65F6\u5019\uFF0C\u8FD8\u53EF\u4EE5\u4F7F\u7528\u81EA\u65CB\u6765\u8FDB\u884C\u4F18\u5316\uFF0C\u5982\u679C\u5F53\u524D\u7EBF\u7A0B\u81EA\u65CB\u6210\u529F\uFF08\u5373\u8FD9\u65F6\u5019\u6301\u9501\u7EBF\u7A0B\u5DF2\u7ECF\u9000\u51FA\u4E86\u540C\u6B65\u5757\uFF0C\u91CA\u653E\u4E86\u9501\uFF09\uFF0C\u8FD9\u65F6\u5F53\u524D\u7EBF\u7A0B\u5C31\u53EF\u4EE5\u907F\u514D\u963B\u585E\u3002

                                                                        \u610F\u601D\u5C31\u662F\u4E0D\u7ACB\u523B\u53BBEntryList\uFF0C\u8FDB\u5165\u963B\u585E\u72B6\u6001\uFF0C\u800C\u662F\u5FAA\u73AF\u51E0\u6B21\uFF0C\u5C31\u662F\u81EA\u65CB

                                                                      2. \u81EA\u65CB\u8981\u4F7F\u7528CPU\uFF0C\u6240\u4EE5\u81EA\u65CB\u4F18\u5316\u9002\u5408\u591A\u6838CPU\uFF0C\u8FD9\u6837\u624D\u6709\u610F\u4E49\uFF0C\u5426\u5219\u5355\u6838CPU\uFF0C\u6B63\u5728\u88AB\u6301\u9501\u7EBF\u7A0B\u6240\u5360\u6709\uFF0C\u90A3\u4E48\u8FD9\u4E2A\u7EBF\u7A0B\u81EA\u65CB\uFF0C\u5C31\u6CA1\u6709\u610F\u4E49\u3002

                                                                      3. \u5982\u679C\u6301\u9501\u7EBF\u7A0B1\u8FDF\u8FDF\u6CA1\u6709\u91CA\u653E\u9501\uFF0C\u90A3\u4E48\u7EBF\u7A0B2\u81EA\u65CB\u91CD\u8BD5\u5931\u8D25\uFF0C\u4ECD\u7136\u8FDB\u5165EntryList\uFF0C\u8FDB\u5165\u963B\u585E\u6001\u3002

                                                                      4. \u81EA\u65CB\u4F1A\u5360\u7528CPU\u65F6\u95F4\uFF0C\u5355\u6838CPU\u81EA\u65CB\u5C31\u662F\u6D6A\u8D39\uFF0C\u591A\u6838CPU\u81EA\u65CB\u624D\u80FD\u53D1\u6325\u4F18\u52BF\u3002

                                                                      \u504F\u5411\u9501

                                                                      1. image-20210906171021229

                                                                      2. image-20210906172322150

                                                                      3. \u504F\u5411\u9501\u7684\u8BED\u6CD5\u4ECD\u7136\u662Fsynchronized

                                                                        \u9ED8\u8BA4\u5F00\u542F\u504F\u5411\u9501\uFF0C\u521D\u59CB\u7EBF\u7A0BID\u662F0\uFF0C\u4E0A\u9501\u4E4B\u540E\uFF08\u52A0\u4E86synchronized\uFF09\uFF0C\u624D\u6709\u7EBF\u7A0BID

                                                                        \u91CA\u653E\u4E86\u9501\u4E4B\u540E\uFF0C\u5BF9\u8C61\u7684\u5BF9\u8C61\u5934\u7684Mark Word\u91CC\u7684\u7EBF\u7A0BID\u4ECD\u7136\u662F\u4E4B\u524D\u7684\u7EBF\u7A0BID\uFF0C\u8FD9\u5C31\u662F\u504F\u5411\uFF01

                                                                      4. \u52A0\u9501\u7684\u4F18\u5148\u987A\u5E8F\u662F

                                                                        • \u504F\u5411\u9501
                                                                        • \u8F7B\u91CF\u7EA7\u9501
                                                                        • \u91CD\u91CF\u7EA7\u9501\uFF08\u7EBF\u7A0B2\u60F3\u8FDB\u5165\u4E34\u754C\u4EE3\u7801\uFF0C\u53D1\u73B0\u9501\u5BF9\u8C61\u5DF2\u7ECF\u88AB\u7EBF\u7A0B1\u52A0\u8F7B\u91CF\u7EA7\u9501\uFF0C\u8FD9\u65F6\u5C31\u901A\u8FC7\u9501\u81A8\u80C0\uFF0C\u7ED9Object\u5BF9\u8C61\u52A0\u91CD\u91CF\u7EA7\u9501\uFF09
                                                                      5. \u504F\u5411\u9501\u7684\u64A4\u9500

                                                                        • \u5F53\u4E00\u4E2A\u9ED8\u8BA4\u6253\u5F00\u504F\u5411\u9501\u7684\u5BF9\u8C61\uFF0C\u8C03\u7528\u4E86hashcode()\u4E4B\u540E\uFF0C\u4F1A\u64A4\u9500\u8FD9\u4E2A\u5BF9\u8C61\u7684\u504F\u5411\u9501\u72B6\u6001\uFF0C\u56E0\u4E3A\u5982\u679C\u5F00\u4E86\u504F\u5411\u9501\uFF0C\u8981\u5B58\u7EBF\u7A0BID\u90A3\u4E9B\u6570\u636E\uFF0C\u5BF9\u8C61\u5934\u91CC\u4FBF\u5B58\u4E0D\u4E0Bhashcode\uFF0C\u6240\u4EE5\u5C31\u628A\u504F\u5411\u9501\u72B6\u6001\u5173\u95ED\u3002

                                                                          \u8F7B\u91CF\u7EA7\u9501\u7684\u5BF9\u8C61\u7684hashcode\u4F1A\u5B58\u5728\u7EBF\u7A0B\u7684\u6808\u7684\u6808\u5E27\u91CC\u7684lock record\u7684\u9501\u8BB0\u5F55\u5730\u5740\u90E8\u5206\uFF0C\u89E3\u9501\u7684\u65F6\u5019\u4F1A\u6062\u590D\u7ED9\u5BF9\u8C61\u3002

                                                                          \u91CD\u91CF\u7EA7\u9501\u7684\u5BF9\u8C61\u7684hashcode\u4F1A\u5B58\u5728monitor\u5BF9\u8C61\u91CC\uFF0C\u6240\u4EE5\u4E0D\u4F1A\u5F71\u54CD\u3002

                                                                        • \u504F\u5411\u9501\u672C\u8D28\u5C31\u662F\u53EA\u6709\u4E00\u4E2A\u7EBF\u7A0B\u5728\u4F7F\u7528\uFF0C\u7EBF\u7A0B\u591A\u4E86\u4E4B\u540E\uFF0C\u4EA7\u751F\u7ADE\u4E89\uFF0C\u9501\u81EA\u7136\u4F1A\u5347\u7EA7\u3002

                                                                          \u5F53\u6709\u5176\u4ED6\u7EBF\u7A0B\u4F7F\u7528\u504F\u5411\u9501\u5BF9\u8C61\uFF08synchronized\u62EC\u53F7\u5185\u7684\u5BF9\u8C61\uFF09\u65F6\uFF0C\u4F1A\u5C06\u504F\u5411\u9501\u5347\u7EA7\u4E3A\u8F7B\u91CF\u7EA7\u9501\u3002

                                                                          \u89E3\u9501\u4E4B\u540E\uFF0C\u8FD9\u4E2A\u5BF9\u8C61\u5C31\u662F\u4E0D\u5F00\u542F\u504F\u5411\u9501\u7684\u72B6\u6001

                                                                          \u8FD9\u4E5F\u662F\u504F\u5411\u9501\u7684\u64A4\u9500\u3002

                                                                      6. \u504F\u5411\u9501\u5728jdk6\u548C7\u91CC\u662F\u9ED8\u8BA4\u542F\u7528\u7684\uFF0C\u4F46\u662F\u5B83\u5728\u5E94\u7528\u7A0B\u5E8F\u542F\u7528\u51E0\u79D2\u949F\u540E\u624D\u80FD\u751F\u6548\uFF0C\u5982\u6709\u5FC5\u8981\u53EF\u4EE5\u4F7F\u7528JVM\u53C2\u6570\u6765\u5173\u95ED\u5EF6\u8FDF\uFF1A-XX:BiasedLockingStartupDelay = 0\uFF0C\u5982\u679C\u786E\u5B9A\u5E94\u7528\u7A0B\u5E8F\u91CC\u6240\u6709\u7684\u9501\u901A\u5E38\u60C5\u51B5\u4E0B\u5904\u4E8E\u7ADE\u4E89\u72B6\u6001\uFF0C\u53EF\u4EE5\u901A\u8FC7JVM\u53C2\u6570\u5173\u95ED\u504F\u5411\u9501\uFF0C\u90A3\u4E48\u7A0B\u5E8F\u9ED8\u8BA4\u4F1A\u8FDB\u5165\u8F7B\u91CF\u7EA7\u9501\u72B6\u6001\u3002

                                                                      7. \u6279\u91CF\u91CD\u504F\u5411

                                                                        \u8FC7\u7A0B\uFF1A

                                                                        \u5047\u5982\u9501\u5BF9\u8C61\u88AB\u4E24\u4E2A\u7EBF\u7A0B\u8BBF\u95EE\uFF0C\u4F46\u662F\u6CA1\u6709\u7ADE\u4E89\uFF0C\u8FD9\u65F6\u504F\u5411\u4E86\u7EBF\u7A0BT1\u7684\u5BF9\u8C61\u4ECD\u7136\u6709\u673A\u4F1A\u91CD\u65B0\u504F\u5411T2

                                                                        \u91CD\u504F\u5411\u4F1A\u91CD\u7F6E\u5BF9\u8C61\u7684\u5BF9\u8C61\u5934\u91CC\u7684Mark Word\u7684\u7EBF\u7A0BID

                                                                        • \u7EBF\u7A0BT1\uFF0C\u7ED9\u4E00\u4E2A\u5BF9\u8C61\u91CD\u590D\u4E0A\u9501\uFF0C\u7EBF\u7A0BT2\u8C03\u7528wait()\uFF0C\u8FDB\u5165\u963B\u585E\u6001\uFF0C\u6240\u4EE5\u6B64\u65F6\u53EA\u6709T1\u6765\u7ED9\u5BF9\u8C61\u4E0A\u9501\uFF0C\u5E76\u4E14\u5728\u4E00\u4E2A\u5FAA\u73AF\u5185\u591A\u6B21\u4E0A\u9501\uFF0C\u90A3\u4E48\u4E0A\u7684\u662F\u504F\u5411\u9501\uFF0C\u56E0\u4E3A\u6CA1\u6709\u7ADE\u4E89\uFF08\u5FAA\u73AF30\u6B21\uFF09
                                                                        • \u5FAA\u73AF\u5B8C\u4E4B\u540E\uFF0C\u5524\u9192T2\u7EBF\u7A0B\uFF0CT2\u7EBF\u7A0B\u8BBF\u95EE\u5BF9\u8C61\uFF0C\u6B64\u65F6\u53D1\u73B0\u5BF9\u8C61\u5DF2\u7ECF\u88AB\u4E0A\u4E86\u504F\u5411\u9501\uFF0C\u90A3\u4E48\u5C31\u5982\u4E0A\u9762\u8BF4\u7684\uFF0C\u4F1A\u8FDB\u884C\u504F\u5411\u9501\u7684\u64A4\u9500\uFF0C\u9996\u5148\u4F1A\u5C06\u504F\u5411\u9501\u5347\u7EA7\u4E3A\u8F7B\u91CF\u7EA7\u9501\uFF0C\u89E3\u9501\u4E4B\u540E\uFF0C\u8FD9\u4E2A\u5BF9\u8C61\u5C31\u662F\u4E0D\u5F00\u542F\u504F\u5411\u9501\u7684\u72B6\u6001\u5373\u64A4\u9500\u4E86\u504F\u5411\u9501
                                                                        • \u4E0A\u9762\u8FD9\u4E00\u6B65\u8981\u8FDB\u884C19\u6B21\uFF08\u524D19\u6B21\u7684\u5BF9\u8C61\u90FD\u5DF2\u7ECF\u53D8\u6210\u4E86\u4E0D\u53EF\u504F\u5411\u7684\u72B6\u6001\uFF09\uFF0C\u5230\u7B2C20\u6B21\u7684\u65F6\u5019\uFF0CJVM\u4F1A\u89C9\u5F97\u4E4B\u524D\u504F\u5411T1\u504F\u5411\u9519\u4E86\uFF0C\u4E8E\u662F\u5728\u7ED9\u8FD9\u4E9B\u5BF9\u8C61\u52A0\u9501\u65F6\uFF0C\u91CD\u65B0\u504F\u5411T2\u7EBF\u7A0B\u3002
                                                                      8. \u6279\u91CF\u64A4\u9500

                                                                        \u5F53\u64A4\u9500\u504F\u5411\u9501\u9608\u503C\u8D85\u8FC740\u6B21\u540E\uFF0CJVM\u4F1A\u89C9\u5F97\u504F\u5411\u9519\u4E86\uFF0C\u4E0D\u5E94\u8BE5\u91C7\u53D6\u504F\u5411\u9501\uFF0C\u4E8E\u662F\u6574\u4E2A\u7C7B\u7684\u6240\u6709\u5BF9\u8C61\u90FD\u4F1A\u53D8\u4E3A\u4E0D\u53EF\u504F\u5411\u7684\uFF0C\u65B0\u5EFA\u7684\u5BF9\u8C61\u4E5F\u662F\u4E0D\u53EF\u504F\u5411\u7684\u3002

                                                                      9. \u6279\u91CF\u91CD\u504F\u5411\u548C\u6279\u91CF\u64A4\u9500\uFF0C\u90FD\u662F\u5C5E\u4E8E\u4F18\u5316\u3002

                                                                      \u9501\u6D88\u9664

                                                                      1. \u9501\u6D88\u9664\u5F00\u5173\u662F\u9ED8\u8BA4\u6253\u5F00\u7684\uFF0CJVM\u4F1A\u81EA\u52A8\u6D88\u9664\u6389\u6CA1\u6709\u610F\u4E49\u7684\u9501
                                                                      2. \u56E0\u4E3A\u4E0A\u9501\u548C\u89E3\u9501\u90FD\u662F\u6709\u6210\u672C\u7684\uFF0C\u800C\u4E14\u4E0A\u9501\u4F1A\u5BFC\u81F4\u6709\u7684\u7EBF\u7A0B\u83B7\u53D6\u4E0D\u5230\u9501\u8FDB\u800C\u4F1A\u5230\u963B\u585E\u72B6\u6001\uFF0C\u8FD9\u4E2A\u8FC7\u7A0B\u4F1A\u5F15\u8D77\u7EBF\u7A0B\u7684\u4E0A\u4E0B\u6587\u5207\u6362\uFF0C\u4E5F\u8981\u6D88\u8017\u6210\u672C

                                                                      wait-notify

                                                                      1. \u88AB\u5524\u9192\u540E\u7684\u7EBF\u7A0B\uFF0C\u662F\u8FDB\u5165\u5C31\u7EEA\u72B6\u6001\uFF0C\u4E0E\u5176\u4ED6\u7EBF\u7A0B\u4E00\u8D77\u7B49\u5F85CPU\u5206\u914D\u65F6\u95F4\u7247\uFF0C\u518D\u6267\u884C\uFF0C\u800C\u4E0D\u662F\u88AB\u5524\u9192\u540E\u9A6C\u4E0A\u6267\u884C

                                                                        \u88AB\u5524\u9192\u540E\u7684\u7EBF\u7A0B\u91CD\u65B0\u8FDB\u5165\u7ADE\u4E89\u9501\u7684\u961F\u5217

                                                                      2. wait()\u3001notify()\u3001notifyAll()

                                                                        • \u8FD9\u4E09\u4E2A\u65B9\u6CD5\u53EA\u80FD\u51FA\u73B0\u5728\u540C\u6B65\u4EE3\u7801\u5757\u548C\u540C\u6B65\u65B9\u6CD5\u4E2D

                                                                        • \u4EE5\u4E0A\u8FD9\u4E09\u4E2A\u65B9\u6CD5\u7684\u8C03\u7528\u8005\u5FC5\u987B\u662F\u540C\u6B65\u4EE3\u7801\u5757\u6216\u540C\u6B65\u65B9\u6CD5\u4E2D\u7684\u540C\u6B65\u76D1\u89C6\u5668\u3002

                                                                        • \u4EE5\u4E0A\u8FD9\u4E09\u4E2A\u65B9\u6CD5\u662F\u5B9A\u4E49\u5728java.lang.Object\u4E2D\u7684\u3002\u56E0\u4E3A\u540C\u6B65\u76D1\u89C6\u5668\u4EFB\u4F55\u4E00\u4E2A\u5BF9\u8C61\u90FD\u53EF\u4EE5\u5145\u5F53\uFF0C\u7ED3\u5408\u7B2C\u4E8C\u70B9\uFF0C\u4EFB\u4F55\u4E00\u4E2A\u5BF9\u8C61\u90FD\u5FC5\u987B\u80FD\u591F\u8C03\u7528\u4EE5\u4E0A\u4E09\u4E2A\u65B9\u6CD5\uFF0C\u8BF4\u660E\uFF0C\u4EFB\u4F55\u4E00\u4E2A\u5BF9\u8C61\u90FD\u6709\u8FD9\u4E09\u4E2A\u65B9\u6CD5\uFF0C\u6240\u4EE5\u8FD9\u4E09\u4E2A\u65B9\u6CD5\u662F\u58F0\u660E\u5728Object\u7C7B\u4E2D\u3002

                                                                      3. \u539F\u7406

                                                                        image-20210906200431146

                                                                        • Owner\u7EBF\u7A0B\u53D1\u73B0\u6761\u4EF6\u4E0D\u6EE1\u8DB3\uFF0C\u8C03\u7528wait()\u65B9\u6CD5\uFF0C\u5373\u53EF\u8FDB\u5165WaitSet\u53D8\u4E3AWAITING\u72B6\u6001

                                                                        • BLOCKED\u548CWAITING\u7684\u7EBF\u7A0B\u90FD\u5904\u4E8E\u963B\u585E\u72B6\u6001\uFF0C\u4E0D\u5360\u7528CPU\u65F6\u95F4\u7247

                                                                        • BLOCKED\u7EBF\u7A0B\u4F1A\u5728Owner\u7EBF\u7A0B\u91CA\u653E\u9501\u65F6\u5524\u9192

                                                                        • WAITING\u7EBF\u7A0B\u4F1A\u5728Owner\u7EBF\u7A0B\uFF08\u540C\u6B65\u76D1\u89C6\u5668\u9501\u5BF9\u8C61\uFF09\u8C03\u7528notify\u6216notifyAll\u65F6\u5524\u9192\u3002

                                                                          \u4F46\u662F\u5524\u9192\u540E\u5E76\u4E0D\u610F\u5473\u7740\u7ACB\u523B\u83B7\u5F97\u9501\uFF0C\u4ECD\u9700\u8FDB\u5165EntryList\uFF08BLOCKED\u7684\u5BF9\u8C61\u5728\u8FD9\u91CC\uFF09\u91CD\u65B0\u7ADE\u4E89\u3002

                                                                        • wait()\u3001join()\u662F\u8FDB\u5165waiting\u72B6\u6001

                                                                        • yield()\u662F\u4ECErunning\u5230runnable\u5C31\u7EEA\u72B6\u6001\uFF0C\u8BA9\u51FA\u65F6\u95F4\u7247\u4F46\u662F\u4E0D\u963B\u585E

                                                                        • \u65F6\u95F4\u7247\u7528\u5B8C\u4E5F\u662F\u4ECErunning\u5230runnable\u5C31\u7EEA\u72B6\u6001\uFF0C\u4E0D\u963B\u585E\uFF0C\u56DE\u5230\u5C31\u7EEA\u72B6\u6001\u7B49\u5F85\u4E0B\u4E00\u6B21\u65F6\u95F4\u7247\u5206\u914D

                                                                        • sleep\u662F\u5230timed_waiting\u72B6\u6001

                                                                        • \u7B49\u5F85\u540C\u6B65\u9501\u662F\u5230BLOCKED\u72B6\u6001\u3002

                                                                          \u8981\u533A\u5206WAITING\u72B6\u6001\u548CBLOCKED\u72B6\u6001\u3002

                                                                        • WAITING\u72B6\u6001\u7684\u7EBF\u7A0B\u901A\u8FC7notify()\u6216notifyAll()\u5524\u9192\uFF0C\u5524\u9192\u540E\u7684\u7EBF\u7A0B\u4ECD\u7136\u8981\u8FDB\u5165EntryList\u961F\u5217\uFF0C\u7B49\u5F85CPU\u8D44\u6E90\u5206\u914D
                                                                        • BLOCKED\u72B6\u6001\u901A\u8FC7\u7EBF\u7A0B\u91CA\u653E\u9501\u5524\u9192
                                                                      4. \u9501\u548C\u65F6\u95F4\u7247\u90FD\u53EF\u4EE5\u7406\u89E3\u4E3ACPU\u7684\u8D44\u6E90

                                                                      5. obj\u662F\u540C\u6B65\u76D1\u89C6\u5668\u9501\u5BF9\u8C61

                                                                        • obj.wait()\u8BA9\u8FDB\u5165object\u76D1\u89C6\u5668\uFF08monitor\uFF09\u7684\u7EBF\u7A0B\u5230waitSet\u7B49\u5F85
                                                                        • obj.notify()\u5728object\u4E0A\u6B63\u5728waitSet\u7B49\u5F85\u7684\u7EBF\u7A0B\u4E2D\u6311\u4E00\u4E2A\u5524\u9192
                                                                        • obj.notifyAll()\u5728object\u4E0A\u6B63\u5728waitSet\u7B49\u5F85\u7684\u7EBF\u7A0B\u5168\u90E8\u5524\u9192

                                                                        \u4EE5\u4E0A\u4E09\u4E2A\u65B9\u6CD5\u90FD\u5C5E\u4E8EObject\u5BF9\u8C61\u7684\u65B9\u6CD5

                                                                        \u8981\u6CE8\u610F\u53EA\u6709\u5F53\u67D0\u4E2A\u7EBF\u7A0B\u83B7\u53D6\u5230\u9501\u4E4B\u540E\uFF0C\u624D\u80FD\u8C03\u7528\u4EE5\u4E0A\u8FD9\u4E09\u4E2A\u65B9\u6CD5

                                                                        \u6CE8\u610F\uFF0C\u8C03\u7528wait()\uFF0C\u662F\u4F7F\u672C\u7EBF\u7A0B\u8FDB\u5165\u5230WAITING\u72B6\u6001\uFF08\u963B\u585E\u72B6\u6001\uFF09

                                                                        \u800C\u8C03\u7528notify\u548CnotifyAll\u662F\u5524\u9192\u522B\u7684\u7EBF\u7A0B

                                                                      6. image-20210906204102015

                                                                      \u540C\u6B65\u6A21\u5F0F\u4E4B\u4FDD\u62A4\u6027\u6682\u505C

                                                                      1. join()\u7684\u5B9E\u73B0\u91C7\u7528\u7684\u5C31\u662F\u6B64\u6A21\u5F0F\uFF0C\u4E00\u4E2A\u7EBF\u7A0B\u7B49\u53E6\u4E00\u4E2A\u7EBF\u7A0B\u6267\u884C\u5B8C\u4E4B\u540E\u518D\u6267\u884C\u3002
                                                                      2. join()\u4F7F\u7EBF\u7A0B\u8FDB\u5165WAITING\u72B6\u6001
                                                                      3. \u8FD9\u79CD\u6A21\u5F0F\u662F\u5728\u4E24\u4E2A\u7EBF\u7A0B\u95F4\u4EA4\u4E92\u7ED3\u679C\u7684\u6A21\u5F0F
                                                                      4. image-20210906211624798

                                                                      join\u539F\u7406

                                                                      1. \u4FDD\u62A4\u6027\u6682\u505C\u662F\u4E00\u4E2A\u7EBF\u7A0B\u7B49\u5F85\u53E6\u4E00\u4E2A\u7EBF\u7A0B\u7684\u7ED3\u679C

                                                                      2. join()\u662F\u4E00\u4E2A\u7EBF\u7A0B\u7B49\u5F85\u53E6\u4E00\u4E2A\u7EBF\u7A0B\u7684\u7ED3\u675F

                                                                      3. \u8BBE\u7F6E\u4E86\u6700\u5927\u7B49\u5F85\u65F6\u95F4

                                                                        image-20210906221104293

                                                                      \u5F02\u6B65\u6A21\u5F0F\u4E4B\u751F\u4EA7\u8005\u6D88\u8D39\u8005\u6A21\u5F0F

                                                                      1. \u4E0E\u4FDD\u62A4\u6027\u6682\u505C\u6A21\u5F0F\u4E0D\u540C\uFF0C\u4E0D\u9700\u8981\u4EA7\u751F\u7ED3\u679C\u548C\u6D88\u8D39\u7ED3\u679C\u7684\u7EBF\u7A0B\u4E00\u4E00\u5BF9\u5E94\u3002
                                                                      2. \u751F\u4EA7\u8005\u4EC5\u8D1F\u8D23\u4EA7\u751F\u7ED3\u679C\u6570\u636E\uFF0C\u4E0D\u5173\u5FC3\u6570\u636E\u8BE5\u5982\u4F55\u5904\u7406\uFF0C\u800C\u6D88\u8D39\u8005\u4E13\u5FC3\u5904\u7406\u7ED3\u679C\u6570\u636E
                                                                      3. \u6D88\u606F\u961F\u5217\u662F\u6709\u5BB9\u91CF\u9650\u5236\u7684\uFF0C\u6EE1\u65F6\u4E0D\u4F1A\u518D\u52A0\u5165\u6570\u636E\uFF0C\u7A7A\u65F6\u4E0D\u4F1A\u518D\u6D88\u8017\u6570\u636E
                                                                      4. \u548C\u4FDD\u62A4\u6027\u6682\u505C\u7684\u5171\u540C\u70B9\u90FD\u662F\u5904\u7406\u591A\u4E2A\u7EBF\u7A0B\u95F4\u7684\u7ED3\u679C\u7684\u4EA4\u4E92

                                                                      park\u548Cunpark

                                                                      1. image-20210907152327885

                                                                      2. \u539F\u7406\uFF1A

                                                                        \u5148\u8C03\u7528park\uFF0C\u518D\u8C03\u7528unpark

                                                                        image-20210907153022187

                                                                        image-20210907153037877

                                                                        \u5148\u8C03\u7528unpark\uFF0C\u518D\u8C03\u7528park

                                                                        image-20210907153118988

                                                                      \u7EBF\u7A0B\u72B6\u6001\u8F6C\u6362

                                                                      1. \u60C5\u51B51 NEW---> RUNNABLE

                                                                        \u5F53\u8C03\u7528t.start() \u65B9\u6CD5\u65F6\uFF0C\u7531NEW ---> RUNNABLE

                                                                      2. \u60C5\u51B52 RUNNABLE ---> WAITING

                                                                        t\u7EBF\u7A0B\u7528synchronized(obj)\u83B7\u53D6\u4E86\u5BF9\u8C61\u9501\u540E

                                                                        • \u8C03\u7528obj.wait() \u65B9\u6CD5\u65F6\uFF0Ct\u7EBF\u7A0B\u4ECERUNNABLE ---> WAITING
                                                                        • \u8C03\u7528obj.notify() , obj.notifyAll(), t.interrupt() \u65F6
                                                                          • \u7ADE\u4E89\u9501\u6210\u529F\uFF0Ct\u7EBF\u7A0B\u4ECEWAITING --> RUNNABLE
                                                                          • \u7ADE\u4E89\u9501\u5931\u8D25\uFF0C t\u7EBF\u7A0B\u4ECEWAITING ---> BLOCKED
                                                                      3. \u60C5\u51B53 RUNNABLE ---> WAITING

                                                                        • \u8C03\u7528t\u7EBF\u7A0B.join()\u65B9\u6CD5\uFF0C\u8981\u6CE8\u610F\u4E00\u5B9A\u4E0D\u662Ft\u7EBF\u7A0B\u4ECERUNNABLE ---> WAITING

                                                                          \u662F\u5F53\u524D\u7EBF\u7A0B\u8FDB\u5165WAITING\u800C\u4E0D\u662Ft\u7EBF\u7A0B\uFF0C\u662F\u5F53\u524D\u7EBF\u7A0B\u7B49\u5F85t\u7EBF\u7A0B\u8FD0\u884C\u5B8C\uFF01

                                                                          \u6CE8\u610F\u5F53\u524D\u7EBF\u7A0B\u662F\u5728t\u7EBF\u7A0B\u5BF9\u8C61\u7684\u76D1\u89C6\u5668\u4E0A\u7B49\u5F85\u3002

                                                                        • t\u7EBF\u7A0B\u8FD0\u884C\u7ED3\u675F\uFF0C\u6216\u8C03\u7528\u4E86\u5F53\u524D\u7EBF\u7A0B\u7684interrupt()\uFF0C\u4F1A\u8BA9\u5F53\u524D\u7EBF\u7A0B\u4ECEWAITING -- RUNNABLE

                                                                      4. \u60C5\u51B54 RUNNABLE ---> WAITING

                                                                        • \u5F53\u524D\u7EBF\u7A0B\u8C03\u7528LockSuppor.park()\u65B9\u6CD5\u4F1A\u8BA9\u5F53\u524D\u7EBF\u7A0B\u4ECERUNNABLE -- WAITING \uFF08\u4ECE\u539F\u7406\u4E0A\u5206\u6790\u8FC7\u4E86\uFF0C\u4E5F\u4E0D\u4E00\u5B9A\uFF0C\u8981\u770Bcounter\u7684\u72B6\u6001\u3002\uFF09
                                                                        • \u8C03\u7528LockSupport.unpark(\u76EE\u6807\u7EBF\u7A0B)\u6216\u8C03\u7528\u4E86\u7EBF\u7A0B\u7684interrupt()\uFF0C\u4F1A\u8BA9\u76EE\u6807\u7EBF\u7A0B\u4ECEWAITING -- RUNNABLE
                                                                      5. \u60C5\u51B55 RUNNABLE -- > TIMED_WAITING

                                                                        • Thread.sleep(long time)

                                                                        • obj.wait(long time)

                                                                        • \u5F53\u524D\u7EBF\u7A0B\u8C03\u7528t.join(long n)\u65B9\u6CD5\u65F6\uFF0C\u5F53\u524D\u7EBF\u7A0B\u4ECERUNNABLE---TIMED_WAITING,\u5F53\u524D\u7EBF\u7A0B\u7B49\u5F85t\u7EBF\u7A0B\u8FD0\u884C\u3002

                                                                          \u5F53\u524D\u7EBF\u7A0B\u7B49\u5F85\u65F6\u95F4\u8D85\u8FC7\u4E86n\u6BEB\u79D2\uFF0C\u6216t\u7EBF\u7A0B\u8FD0\u884C\u7ED3\u675F\uFF0C\u6216\u8C03\u7528\u4E86\u5F53\u524D\u7EBF\u7A0B\u7684interrupt\u65F6\uFF0C\u5F53\u524D\u7EBF\u7A0B\u4ECETIMED_WAITING --- > RUNNABLE

                                                                      6. \u60C5\u51B56 RUNNBALE -- > BLOCKED

                                                                        • t\u7EBF\u7A0B\u7528synchronized(obj)\u83B7\u53D6\u5BF9\u8C61\u9501\u65F6\uFF0C\u5982\u679C\u7ADE\u4E89\u5931\u8D25\uFF0C\u4ECERUNNABLE -- > BLOCKED

                                                                      ReentrantLock

                                                                      1. \u4F7F\u7528jconsole\u53EF\u4EE5\u68C0\u6D4B\u6B7B\u9501

                                                                      2. \u9965\u997F\uFF0C\u4E00\u4E2A\u7EBF\u7A0B\u7531\u4E8E\u4F18\u5148\u7EA7\u592A\u4F4E\uFF0C\u59CB\u7EC8\u5F97\u4E0D\u5230CPU\u8C03\u5EA6\u6267\u884C\uFF0C\u4E5F\u4E0D\u80FD\u591F\u7ED3\u675F

                                                                      3. \u7528ReentrantLock\u53EF\u4EE5\u89E3\u51B3\u6B7B\u9501\u548C\u9965\u997F\u73B0\u8C61\u3002

                                                                      4. ReentrantLock\u662F\u53EF\u91CD\u5165\u9501\uFF0C\u662FJUC\u5E76\u53D1\u5DE5\u5177\u5305\u4E0B\u7684\u4E00\u4E2A\u91CD\u8981\u7684\u7C7B

                                                                      5. \u76F8\u5BF9\u4E8Esynchronized\uFF0C\u5B83\u5177\u5907\u5982\u4E0B\u7279\u70B9\uFF1A

                                                                        • \u53EF\u4E2D\u65AD\uFF08synchronized\u52A0\u4E0A\u9501\u4E4B\u540E\uFF0C\u662F\u4E0D\u53EF\u4EE5\u4E2D\u65AD\u7684\u3002\uFF09\uFF0C\u52A0\u5165\u6253\u65AD\u673A\u5236\u53EF\u4EE5\u9632\u6B62\u7EBF\u7A0B\u7B49\u5F85\u9501\u65F6\u65E0\u9650\u5236\u5730\u7B49\u5F85\u4E0B\u53BB\u3002\u4E3A\u4E86\u907F\u514D\u6B7B\u7B49\u3002

                                                                          lock.lockInterruptibly()

                                                                        • \u53EF\u4EE5\u8BBE\u7F6E\u8D85\u65F6\u65F6\u95F4\uFF08\u89C4\u5B9A\u65F6\u95F4\u5185\uFF0C\u5982\u679C\u83B7\u53D6\u4E0D\u5230\u9501\uFF0C\u5C31\u653E\u5F03\u4E89\u8FD9\u4E2A\u9501\u4E86\uFF0C\u53BB\u6267\u884C\u4E00\u4E9B\u5176\u4ED6\u7684\u903B\u8F91\uFF09\uFF0C\u4E5F\u662F\u9632\u6B62\u7EBF\u7A0B\u56E0\u4E3A\u7B49\u5F85\u9501\u8FDB\u5165\u963B\u585E\u72B6\u6001\u65F6\uFF0C\u9632\u6B62\u7EBF\u7A0B\u65E0\u9650\u5236\u5730\u7B49\u5F85\u4E0B\u53BB\u3002\u4E00\u5B9A\u65F6\u95F4\u4E4B\u540E\uFF0C\u5C31\u4E0D\u518D\u963B\u585E\u4E86\uFF0C\u4E0D\u518D\u65E0\u9650\u5236\u5730\u7B49\u5F85\u4E0B\u53BB\u3002

                                                                          lock.tryLock()

                                                                          \u8FD9\u79CD\u65B9\u5F0F\u540C\u6837\u652F\u6301\u6253\u65AD\u3002\u62EC\u53F7\u91CC\u53EF\u4EE5\u586B\u5165\u65F6\u95F4\u53C2\u6570\uFF0C\u8868\u793A\u7B49\u5F85\u591A\u957F\u65F6\u95F4\uFF0C\u5982\u679C\u8FD9\u6BB5\u65F6\u95F4\u6CA1\u6709\u83B7\u53D6\u5230\u9501\uFF0C\u90A3\u4E48\u5C31\u4E0D\u4F1A\u518D\u7EE7\u7EED\u7B49\u5F85\u3002

                                                                          \u7528tryLock()\u53EF\u4EE5\u89E3\u51B3\u54F2\u5B66\u5BB6\u5C31\u9910\u95EE\u9898

                                                                        • \u53EF\u4EE5\u8BBE\u7F6E\u4E3A\u516C\u5E73\u9501\uFF08\u9632\u6B62\u7EBF\u7A0B\u9965\u997F\u7684\u60C5\u51B5\uFF09

                                                                          ReentrantLock\u9ED8\u8BA4\u662F\u4E0D\u516C\u5E73\u7684

                                                                        • \u652F\u6301\u591A\u4E2A\u6761\u4EF6\u53D8\u91CF\u3002\uFF08\u4E0D\u50CFsynchronized\u53EA\u6709\u4E00\u4E2AwaitSet\uFF0C\u6BD4\u5982\u8981\u7528notifyAll\u53EB\u9192\u7EBF\u7A0B\uFF0C\u4F1A\u628A\u7B49\u5F85\u7684\u7EBF\u7A0B\u90FD\u53EB\u9192\uFF0C\u800CReentrantLock\u53EF\u4EE5\u5BF9waitSet\u8FDB\u884C\u7EC6\u5206\uFF0C\u76F8\u5F53\u4E8E\u8FD9\u4E2A\u610F\u601D\uFF09

                                                                        • \u4E0Esynchronized\u4E00\u6837\uFF0C\u90FD\u652F\u6301\u53EF\u91CD\u5165\u3002

                                                                      6. \u53EF\u91CD\u5165---\u540C\u4E00\u4E2A\u7EBF\u7A0B\u5BF9\u540C\u4E00\u4E2A\u9501\u7684\u91CD\u590D\u83B7\u53D6

                                                                        \u662F\u6307\u540C\u4E00\u4E2A\u7EBF\u7A0B\u5982\u679C\u9996\u6B21\u83B7\u5F97\u4E86\u8FD9\u628A\u9501\uFF0C\u90A3\u4E48\u56E0\u4E3A\u5B83\u662F\u8FD9\u628A\u9501\u7684\u62E5\u6709\u8005\uFF0C\u56E0\u6B64\u6709\u6743\u5229\u518D\u6B21\u83B7\u5F97\u8FD9\u628A\u9501\u3002

                                                                        \u5982\u679C\u662F\u4E0D\u53EF\u91CD\u5165\u9501\uFF0C\u90A3\u4E48\u7B2C\u4E8C\u6B21\u83B7\u5F97\u9501\u65F6\uFF0C\u81EA\u5DF1\u4E5F\u4F1A\u88AB\u9501\u6321\u4F4F\u3002

                                                                      7. Synchronized\u7684monitor\u9501\u662F\u4E0D\u516C\u5E73\u9501

                                                                        \u8C01\u5148\u62A2\u5230\u8C01\u5C31\u62E5\u6709\u9501\uFF0C\u800C\u4E0D\u4F1A\u6309\u7167\u963B\u585E\u961F\u5217\u7684\u987A\u5E8F\u5148\u6765\u5148\u5F97\u3002\u6240\u4EE5\u662F\u4E0D\u516C\u5E73\u7684\u3002

                                                                        **ReentrantLock\u9ED8\u8BA4\u662F\u4E0D\u516C\u5E73\u7684\uFF0C**\u4F46\u662F\u53EF\u4EE5\u901A\u8FC7\u6784\u9020\u65B9\u6CD5\u8BBE\u7F6E\u662F\u516C\u5E73\u8FD8\u662F\u4E0D\u516C\u5E73\u3002

                                                                        \u516C\u5E73\u9501\u4E00\u822C\u6CA1\u6709\u5FC5\u8981\uFF0C\u4F1A\u964D\u4F4E\u5E76\u53D1\u5EA6

                                                                        \u516C\u5E73\u9501\u662F\u6309\u7167\u7B49\u5F85\u961F\u5217\uFF0C\u5148\u5165\u5148\u5F97\u7684\u65B9\u5F0F\u5B9E\u73B0\u7684\u3002

                                                                      8. \u516C\u5E73\u9501\u672C\u610F\u662F\u89E3\u51B3\u9965\u997F\u95EE\u9898\u7684\uFF0C\u4F46\u662F\u5B9E\u9645\u4E0A\u6CA1\u6709\u5FC5\u8981\uFF0C\u7528tryLock\u53EF\u4EE5\u89E3\u51B3\u3002

                                                                        \u4E00\u822C\u90FD\u4E0D\u4F1A\u8BBE\u7F6E\u4E3A\u516C\u5E73\u9501\u3002

                                                                      9. ReentrantLock\u9ED8\u8BA4\u662F\u4E0D\u53EF\u6253\u65AD\u7684\u3002

                                                                      10. image-20210907164801520

                                                                      \u548C\u4E4B\u524D\u7684wait-notify-notifyAll\u76F8\u6BD4\uFF0C\u662F\u6839\u636E\u6761\u4EF6\u53D8\u91CF\u6765\u53EB\u9192\u3002

                                                                      \u8C03\u7528await()\u4E4B\u524D\uFF0C\u5FC5\u987B\u83B7\u5F97\u9501\u624D\u6709\u8D44\u683C\u3002\uFF08\u548Cwait\uFF0Cnotify\uFF0CnotifyAll\u4E00\u6837\uFF09

                                                                      \u6CE8\u610F\u8C03\u7528await()\u548Csignal()\u65B9\u6CD5\u7684\u5BF9\u8C61\u662FCondition\u5BF9\u8C61\u3002

                                                                      1. ReentrantLock\u7684lock()\u3001unlock()\u5FC5\u987B\u6210\u5BF9\u51FA\u73B0\uFF0C\u624B\u52A8\u89E3\u9501\uFF0C\u800Csynchronized\u5173\u952E\u5B57\u4E0D\u9700\u8981

                                                                      \u672C\u7AE0\u5C0F\u7ED3

                                                                      1. \u540C\u6B65\u89E3\u51B3\u7684\u95EE\u9898\u548C\u4E92\u65A5\u89E3\u51B3\u7684\u95EE\u9898\u4E0D\u4E00\u6837

                                                                        \u4E92\u65A5\u4E3B\u8981\u4FDD\u8BC1\u5171\u4EAB\u8D44\u6E90\u7684\u4E92\u65A5\u6548\u679C\uFF0C\u4E00\u6BB5\u4E34\u754C\u533A\u4EE3\u7801\u5728\u5728\u67D0\u4E00\u6BB5\u65F6\u95F4\u5185\u53EA\u80FD\u7531\u4E00\u4E2A\u7EBF\u7A0B\u53BB\u6267\u884C

                                                                        \u800C\u540C\u6B65\u6307\u7684\u662F\u67D0\u4E2A\u7EBF\u7A0B\u62FF\u5230\u5176\u4ED6\u7EBF\u7A0B\u6267\u884C\u4EE3\u7801\u7684\u7ED3\u679C\u4E4B\u540E\u624D\u53EF\u4EE5\u88AB\u5524\u9192\u7EE7\u7EED\u8FDB\u5165\u963B\u585E\u961F\u5217\u53BB\u7ADE\u4E89\u9501\u3002\u4E5F\u5C31\u662F\u67D0\u4E2A\u7EBF\u7A0B\u9700\u8981\u8D44\u6E90\uFF0C\u4F46\u662F\u5F97\u4E0D\u5230\u8D44\u6E90\uFF0C\u4E8E\u662F\u8FDB\u5165\u963B\u585E\u961F\u5217\uFF0C\u4F46\u662F\u83B7\u5F97\u8D44\u6E90\u540E\uFF0C\u4FBF\u88AB\u5524\u9192\u8FDB\u5165\u5C31\u7EEA\u72B6\u6001\uFF0C\u4E00\u5B9A\u8981\u6CE8\u610F\uFF0C\u8FD9\u91CC\u88AB\u5524\u9192\u662F\u8FDB\u5165\u5C31\u7EEA\u72B6\u6001\u800C\u4E0D\u662F\u76F4\u63A5\u6267\u884C\uFF0C\u4ECD\u7136\u8981\u7B49\u5F85CPU\u5206\u914D\u65F6\u95F4\u7247\u3002

                                                                      2. \u7EBF\u7A0B\u83B7\u53D6\u4E0D\u5230\u9501\uFF0C\u662F\u8FDB\u5165EntryList\u963B\u585E\u961F\u5217

                                                                        \u800C\u7EBF\u7A0B\u67D0\u6837\u6761\u4EF6\u4E0D\u6EE1\u8DB3\uFF0C\u662F\u8FDB\u5165WaitSet\u4F11\u606F\u5BA4\uFF0C\u53EF\u4EE5\u8FD9\u4E48\u7406\u89E3\u3002

                                                                        \u5E73\u65F6\u90FD\u628A\u9501\u548C\u7EBF\u7A0B\u9700\u8981\u83B7\u5F97\u7684\u5176\u4ED6\u8D44\u6E90\u90FD\u770B\u4F5C\u7EBF\u7A0B\u9700\u8981\u7684\u8D44\u6E90\uFF0C\u4F46\u662F\u4ECE\u7EBF\u7A0B\u5DEE\u54EA\u6837\u4E1C\u897F\u800C\u8FDB\u5165\u54EA\u79CD\u72B6\u6001\u6765\u770B\uFF0C\u9700\u8981\u628A\u9501\u548C\u7EBF\u7A0B\u9700\u8981\u7684\u67D0\u4E9B\u6761\u4EF6\u5206\u5F00

                                                                        \u7EBF\u7A0B\u9700\u8981\u9501\u4F46\u662F\u6CA1\u6709\u83B7\u5F97\uFF0C\u4E8E\u662F\u8FDB\u5165BLOCKED\u72B6\u6001

                                                                        \u7EBF\u7A0B\u9700\u8981\u8D44\u6E90\u4F46\u662F\u6CA1\u6709\u83B7\u5F97\uFF0C\u8FDB\u5165WAITING\u72B6\u6001\u3002

                                                                      3. Synchronized\u548CLock\u9ED8\u8BA4\u90FD\u662F\u975E\u516C\u5E73\u7684\uFF0C\u4E0D\u8FC7ReentrantLock\u53EF\u4EE5\u8BBE\u7F6E\u516C\u5E73\u9501\u3002

                                                                      4. Synchronized

                                                                        • monitor\uFF0CJVM\u5C42\u9762\u7684\u91CD\u91CF\u7EA7\u9501
                                                                        • \u8F7B\u91CF\u7EA7\u9501
                                                                        • \u504F\u5411\u9501
                                                                      5. \u4E92\u65A5\u662F\u6307\u5171\u4EAB\u8D44\u6E90\u7684\u4E92\u65A5\u6548\u679C

                                                                        \u540C\u6B65\u662F\u6307\u4F7F\u7528\u6761\u4EF6\u53D8\u91CFwaitSet\u6765\u8FBE\u5230\u7EBF\u7A0B\u95F4\u7684\u901A\u4FE1\u6548\u679C\u3002

                                                                      \u5E76\u53D1\u4E4B\u5171\u4EAB\u6A21\u578B

                                                                      1. JMM---Java\u5185\u5B58\u6A21\u578B

                                                                        • \u539F\u5B50\u6027--\u4FDD\u8BC1\u6307\u4EE4\u4E0D\u4F1A\u6536\u5230\u7EBF\u7A0B\u4E0A\u4E0B\u6587\u7684\u5207\u6362
                                                                        • \u53EF\u89C1\u6027--- \u4FDD\u8BC1\u6307\u4EE4\u4E0D\u4F1A\u53D7CPU\u7F13\u5B58\u7684\u5F71\u54CD
                                                                        • \u6709\u5E8F\u6027---\u4FDD\u8BC1\u6307\u4EE4\u4E0D\u4F1A\u53D7CPU\u6307\u4EE4\u5E76\u884C\u4F18\u5316\u7684\u5F71\u54CD
                                                                      2. JMM\u5B9A\u4E49\u4E86

                                                                        • \u4E3B\u5B58---\u6210\u5458\u53D8\u91CF\u7B49\uFF0C\u5171\u4EAB\u6570\u636E
                                                                        • \u5DE5\u4F5C\u5185\u5B58----\u7EBF\u7A0B\u7684\u79C1\u6709\u6570\u636E\uFF0C\u6BD4\u5982\u5C40\u90E8\u53D8\u91CF\u7B49
                                                                      3. \u52A0\u4E86volatile\u7684\u610F\u601D\u5C31\u662F\u8BF4\u5C31\u4E0D\u80FD\u4ECE\u7F13\u5B58\u5373\u7EBF\u7A0B\u7684\u5DE5\u4F5C\u5185\u5B58\u4E2D\u8BFB\u53D6\u4E86\uFF0C\u6BCF\u6B21\u90FD\u5FC5\u987B\u4ECE\u4E3B\u5B58\u4E2D\u8BFB\u53D6\u53D8\u91CF\u7684\u6700\u65B0\u503C\u3002

                                                                      4. volatile\u53EF\u4EE5\u7528\u6765\u4FEE\u9970\u6210\u5458\u53D8\u91CF\u548C\u9759\u6001\u6210\u5458\u53D8\u91CF

                                                                        \u4E0D\u80FD\u4FEE\u9970\u5C40\u90E8\u53D8\u91CF\uFF0C\u56E0\u4E3A\u5C40\u90E8\u53D8\u91CF\u662F\u7EBF\u7A0B\u79C1\u6709\u7684\uFF0C\u4E0D\u5141\u8BB8\u5171\u4EAB\u3002

                                                                        \u5B83\u53EF\u4EE5\u907F\u514D\u7EBF\u7A0B\u4ECE\u81EA\u5DF1\u7684\u5DE5\u4F5C\u7F13\u5B58\u4E2D\u67E5\u627E\u53D8\u91CF\u7684\u503C\uFF0C\u5FC5\u987B\u5230\u4E3B\u5B58\u83B7\u53D6\u5B83\u7684\u503C

                                                                        \u7EBF\u7A0B\u64CD\u4F5Cvolatile\u53D8\u91CF\u90FD\u662F\u76F4\u63A5\u64CD\u4F5C\u4E3B\u5B58

                                                                      5. \u53EF\u89C1\u6027\u5C31\u662F\u8BF4\u5F53\u70ED\u70B9\u4EE3\u7801\u7684\u53D8\u91CF\u88AB\u7F13\u5B58\u5230\u7EBF\u7A0B\u7684\u5DE5\u4F5C\u5185\u5B58\u4E2D\uFF0C\u800C\u8981\u5BF9\u67D0\u4E2A\u53D8\u91CF\u8FDB\u884C\u4FEE\u6539\uFF0C\u662F\u5728\u4E3B\u5B58\u4E2D\u8FDB\u884C\u4FEE\u6539\u3002

                                                                        \u90A3\u4E48\u7EBF\u7A0B\u80FD\u4E0D\u80FD\u83B7\u53D6\u5230\u8FD9\u4E2A\u4E3B\u5B58\u4E2D\u7684\u4FEE\u6539\u7684\u53D8\u91CF\uFF0C\u8FD8\u662F\u7EE7\u7EED\u5728\u81EA\u5DF1\u7684\u5DE5\u4F5C\u7F13\u5B58\u4E2D\u627E\u8FD9\u4E2A\u53D8\u91CF\u3002

                                                                        \u5C31\u662F\u8FD9\u4E2A\u4FEE\u6539\u7684\u53D8\u91CF\u5BF9\u4E8E\u7EBF\u7A0B\u662F\u5426\u53EF\u89C1\u3002

                                                                      6. synchronized\u4E5F\u80FD\u4FDD\u8BC1\u53D8\u91CF\u7684\u53EF\u89C1\u6027\uFF0C\u4F46\u662F\u8981\u521B\u5EFAmonitor\u9501\uFF0C\u4E5F\u5C31\u662F\u540C\u6B65\u76D1\u89C6\u5668\u9501\uFF0C\u662F\u6BD4\u8F83\u91CD\u91CF\u7EA7\u7684\u64CD\u4F5C

                                                                        \u4F46\u662Fvolatile\u662F\u6BD4\u8F83\u8F7B\u91CF\u7EA7\u7684

                                                                        \u5982\u679C\u53EA\u662F\u8981\u4FDD\u8BC1\u53EF\u89C1\u6027\uFF0C\u90A3\u4E48\u63A8\u8350volatile

                                                                      7. \u4E00\u4E2A\u53D8\u91CF\u52A0\u4E86volatile\u4FEE\u9970\uFF0C\u4FDD\u8BC1\u7684\u662F\u4E00\u4E2A\u7EBF\u7A0B\u5BF9volatile\u53D8\u91CF\u7684\u4FEE\u6539\uFF0C\u5BF9\u53E6\u4E00\u4E2A\u7EBF\u7A0B\u53EF\u89C1\uFF0C\u4E0D\u80FD\u4FDD\u8BC1\u539F\u5B50\u6027\u3002\u4EC5\u7528\u5728\u4E00\u4E2A\u7EBF\u7A0B\u662F\u4FEE\u6539\u53D8\u91CF\uFF0C\u53E6\u5916\u7684\u7EBF\u7A0B\u53EA\u662F\u8BFB\u53D6\u53D8\u91CF

                                                                      8. volatile\u53EA\u662F\u4FDD\u8BC1\u7EBF\u7A0B\u80FD\u770B\u5230\u53D8\u91CF\u7684\u6700\u65B0\u503C\uFF0C\u5E76\u4E0D\u80FD\u89E3\u51B3\u6307\u4EE4\u4EA4\u9519\uFF0C\u5373\u5E76\u4E0D\u80FD\u4FDD\u8BC1\u67D0\u6BB5\u4EE3\u7801\u7684\u539F\u5B50\u6027\u3002

                                                                        synchronized\u65E2\u80FD\u4FDD\u8BC1\u4EE3\u7801\u5757\u7684\u539F\u5B50\u6027\u4E5F\u80FD\u4FDD\u8BC1\u4EE3\u7801\u5757\u5185\u53D8\u91CF\u53EF\u89C1\u6027\u3002\u7F3A\u70B9\u5C31\u662F\u5C5E\u4E8E\u91CD\u91CF\u7EA7\u64CD\u4F5C\uFF0C\u6027\u80FD\u66F4\u4F4E

                                                                      9. i++\uFF0Ci--\u8FD9\u79CD\u64CD\u4F5C\uFF0C\u5728\u5B57\u8282\u7801\u6307\u4EE4\u5C42\u9762\uFF0C\u4ED6\u4EEC\u7684\u6307\u4EE4\u4E0D\u662F\u539F\u5B50\u6027\u7684\u3002\u53EF\u80FD\u4EA7\u751F\u6307\u4EE4\u4EA4\u9519\u3002

                                                                      10. \u4E24\u4E2A\u7EBF\u7A0B\u5171\u4EAB\u67D0\u4E2A\u53D8\u91CF\uFF0Cvolatile\u5C31\u662F\u4FDD\u8BC1\u8FD9\u4E24\u4E2A\u7EBF\u7A0B\u5BF9\u8FD9\u4E2A\u53D8\u91CF\u7684\u53EF\u89C1\u6027\uFF0C\u5373\u4FEE\u6539\u4E86\u4E4B\u540E\u7EBF\u7A0B\u4E5F\u80FD\u83B7\u5F97\u8FD9\u4E2A\u53D8\u91CF\u7684\u6700\u65B0\u503C\u3002\u800C\u4E0D\u662F\u83B7\u5F97\u4E4B\u524D\u7EBF\u7A0B\u7684\u5DE5\u4F5C\u5185\u5B58\uFF08\u7F13\u5B58\uFF09\u7684\u53D8\u91CF\u7684\u503C\u3002

                                                                      \u6307\u4EE4\u91CD\u6392\u5E8F\u4F18\u5316

                                                                      1. \u5728\u4E0D\u6539\u53D8\u7A0B\u5E8F\u7ED3\u679C\u7684\u524D\u63D0\u4E0B\uFF0C\u8FD9\u4E9B\u6307\u4EE4\u7684\u5404\u4E2A\u9636\u6BB5\u53EF\u4EE5\u901A\u8FC7\u91CD\u6392\u5E8F\u548C\u7EC4\u5408\u6765\u5B9E\u73B0\u6307\u4EE4\u7EA7\u5C42\u9762\u7684\u5E76\u884C\u3002
                                                                      2. CPU\u5728\u67D0\u4E00\u523B\u6267\u884C\u591A\u6761\u6307\u4EE4\u7684\u4E0D\u540C\u9636\u6BB5\uFF0C\u4E0D\u6539\u53D8\u7A0B\u5E8F\u7ED3\u679C\u3002
                                                                      3. \u5982\u679C\u4E0B\u4E00\u6761\u6307\u4EE4\u4F9D\u8D56\u4E0A\u4E00\u6761\u6307\u4EE4\u7684\u7ED3\u679C\uFF0C\u90A3\u4E48\u8FD9\u79CD\u60C5\u51B5\u5C31\u4E0D\u80FD\u91CD\u6392\u5E8F\u3002

                                                                      volatile\u539F\u7406

                                                                      1. volatile\u7684\u5E95\u5C42\u5B9E\u73B0\u539F\u7406\u662F\u5185\u5B58\u5C4F\u969C

                                                                      2. \u5BF9volatile\u53D8\u91CF\u7684\u5199\u6307\u4EE4\u540E\u4F1A\u52A0\u5165\u5199\u5C4F\u969C

                                                                        \u5BF9volatile\u53D8\u91CF\u7684\u8BFB\u6307\u4EE4\u524D\u4F1A\u52A0\u5165\u8BFB\u5C4F\u969C

                                                                      3. \u5199\u5C4F\u969C\u4FDD\u8BC1\u5728\u8BE5\u5C4F\u969C\u4E4B\u524D\u7684\uFF0C\u5BF9\u5171\u4EAB\u53D8\u91CF\u7684\u6539\u52A8\uFF0C\u90FD\u540C\u6B65\u5230\u4E3B\u5B58\u5F53\u4E2D

                                                                        \u8BFB\u5C4F\u969C\u4FDD\u8BC1\u5728\u8BE5\u5C4F\u969C\u4E4B\u540E\u7684\uFF0C\u5BF9\u5171\u4EAB\u53D8\u91CF\u7684\u8BFB\u53D6\uFF0C\u52A0\u8F7D\u7684\u662F\u4E3B\u5B58\u4E2D\u6700\u65B0\u6570\u636E

                                                                      4. \u5199\u5C4F\u969C\u4E4B\u524D\u7684\u4EE3\u7801\u53EF\u4EE5\u4FDD\u8BC1\u4E0D\u4F1A\u53D1\u751F\u6307\u4EE4\u91CD\u6392\uFF0C\u5C31\u662F\u5199\u5C4F\u969C\u4E4B\u524D\u7684\u4EE3\u7801\u4E0D\u4F1A\u51FA\u73B0\u5728\u5199\u5C4F\u969C\u540E\u3002

                                                                        \u8BFB\u5C4F\u969C\u4F1A\u4FDD\u8BC1\u8BFB\u5C4F\u969C\u4E4B\u540E\u7684\u6307\u4EE4\u4E0D\u4F1A\u56E0\u4E3A\u6307\u4EE4\u91CD\u6392\u5E8F\u51FA\u73B0\u5728\u8BFB\u5C4F\u969C\u524D\u3002

                                                                        \u5199\u5C4F\u969C\u548C\u8BFB\u5C4F\u969C\u90FD\u662F\u5BF9volatile\u4FEE\u9970\u7684\u53D8\u91CF\u8FDB\u884C\u4FEE\u6539\u548C\u8BFB\u53D6\u65F6\u9644\u5E26\u7684\u5C4F\u969C\u3002

                                                                      5. volatile\u4FDD\u8BC1\u4E86\u5171\u4EAB\u53D8\u91CF\u7684\u53EF\u89C1\u6027\u548C\u6709\u5E8F\u6027\uFF0C\u4F46\u662F\u4E0D\u80FD\u89E3\u51B3\u6307\u4EE4\u4EA4\u9519

                                                                        \u6709\u5E8F\u6027\u7684\u4FDD\u8BC1\u53EA\u662F\u4FDD\u8BC1\u4E86\u672C\u7EBF\u7A0B\u5185\u76F8\u5173\u4EE3\u7801\u4E0D\u88AB\u91CD\u6392\u5E8F\uFF0C\u901A\u8FC7\u5199\u5C4F\u969C\u548C\u8BFB\u5C4F\u969C\u3002

                                                                      6. \u997F\u6C49\u5F0F\u5355\u4F8B\u6A21\u5F0F\uFF0C\u7C7B\u52A0\u8F7D\u5C31\u4F1A\u5BFC\u81F4\u8BE5\u5355\u5B9E\u4F8B\u5BF9\u8C61\u88AB\u521B\u5EFA

                                                                        \u61D2\u6C49\u5F0F\uFF0C\u7C7B\u52A0\u8F7D\u4E0D\u4F1A\u5BFC\u81F4\u8BE5\u5355\u4F8B\u5BF9\u8C61\u88AB\u521B\u5EFA\uFF0C\u800C\u662F\u9996\u6B21\u4F7F\u7528\u8BE5\u5BF9\u8C61\u65F6\u624D\u4F1A\u521B\u5EFA\u3002

                                                                      \u5171\u4EAB\u6A21\u578B\u4E4B\u65E0\u9501\uFF08\u975E\u963B\u585E\uFF09

                                                                      1. \u7BA1\u7A0B\u4E5F\u53EBmonitor\u6216\u76D1\u89C6\u5668\u9501

                                                                        \u662F\u60B2\u89C2\u9501

                                                                      2. CAS\u4E0Evolatile\u7ED3\u5408\u5C31\u53EF\u4EE5\u5B9E\u73B0\u65E0\u9501\u5E76\u53D1\u3002

                                                                      3. CAS\u4E0Evolatile\u7ED3\u5408\u7684\u5DE5\u4F5C\u65B9\u5F0F

                                                                        image-20210908142615745

                                                                        compareAndSet\u6BD4\u8F83\u5E76\u8BBE\u7F6E\u503C\uFF0C\u5728CPU\u7684\u6307\u4EE4\u7EA7\u522B\u6216\u8005\u8BF4\u5B57\u8282\u7801\u6307\u4EE4\u7EA7\u522B\u53EF\u4EE5\u5B9E\u73B0\u5176\u539F\u5B50\u6027\u3002

                                                                      4. image-20210908143216090

                                                                        CAS\u53EF\u80FD\u4F1A\u5931\u8D25\uFF0C\u5C31\u662F\u5982\u679Ccas\u7684\u7B2C\u4E00\u4E2A\u53C2\u6570\u7684\u503C\u548C\u8C03\u7528cas\u65B9\u6CD5\u7684\u5BF9\u8C61\u7684\u5C5E\u6027\u7684\u6700\u65B0\u503C\u4E0D\u76F8\u540C\uFF08\u4E0D\u76F8\u540C\u662F\u56E0\u4E3A\uFF0C\u5728\u83B7\u53D6\u5230\u201C\u6700\u65B0\u503C\u201D\u4E4B\u540E\uFF0C\u6267\u884C\u4E4B\u540E\u7684\u903B\u8F91\u65F6\uFF0C\u6709\u5176\u4ED6\u7684\u7EBF\u7A0B\u8FDB\u6765\u64CD\u4F5C\u8FD9\u4E2A\u5171\u4EAB\u53D8\u91CF\uFF0C\u5BFC\u81F4\u4E4B\u524D\u83B7\u53D6\u7684\u6700\u65B0\u503C\u5DF2\u7ECF\u4E0D\u662F\u6700\u65B0\u4E86\uFF09\uFF0C\u5C31\u4F1A\u5931\u8D25\uFF0C\u5931\u8D25\u4E4B\u540E\u4F1A\u7EE7\u7EED\u4E0B\u4E00\u6B21\u5FAA\u73AF\uFF0C\u7EE7\u7EED\u83B7\u5F97\u6700\u65B0\u503C\uFF0C\u518D\u6267\u884C\u4E4B\u540E\u7684\u903B\u8F91\u3002

                                                                      5. cas\u9700\u8981volatile\u7684\u652F\u6301\uFF0Ccas\u5FC5\u987B\u501F\u52A9volatile\u624D\u80FD\u8BFB\u53D6\u5230\u5171\u4EAB\u53D8\u91CF\u7684\u6700\u65B0\u503C\u6765\u5B9E\u73B0\u6BD4\u8F83\u5E76\u4EA4\u6362\u7684\u6548\u679C\u3002

                                                                        volatile\u53EF\u4EE5\u4FDD\u8BC1\u5171\u4EAB\u53D8\u91CF\u7684\u53EF\u89C1\u6027\u548C\u76F8\u5173\u4EE3\u7801\u7684\u6709\u5E8F\u6027\uFF0C\u4F46\u662F\u5B83\u4E0D\u80FD\u89E3\u51B3\u6307\u4EE4\u4EA4\u9519\u7684\u95EE\u9898\uFF0C\u5B83\u4E0D\u80FD\u4FDD\u8BC1\u4EE3\u7801\u5757\u7684\u539F\u5B50\u6027\u3002\u800CCAS\u7684\u64CD\u4F5C\u5728\u5B57\u8282\u7801\u6307\u4EE4\u5C42\u9762\u662F\u539F\u5B50\u7684\uFF0C\u4E0D\u53EF\u88AB\u6253\u65AD\u3002\u6240\u4EE5CAS\u548Cvolatile\u7ED3\u5408\u8D77\u6765\u53EF\u4EE5\u5B9E\u73B0\u65E0\u9501\u5E76\u53D1\u3002

                                                                        synchronized\u5173\u952E\u5B57\u53EF\u4EE5\u4FDD\u8BC1\u4EE3\u7801\u5757\u7684\u539F\u5B50\u6027\u548C\u4EE3\u7801\u5757\u5185\u90E8\u5171\u4EAB\u53D8\u91CF\u7684\u53EF\u89C1\u6027\u3002

                                                                        • \u539F\u5B50\u6027 -- synchronized
                                                                        • \u53EF\u89C1\u6027--synchronized\uFF0Cvolatile
                                                                        • \u6709\u5E8F\u6027---volatile
                                                                      6. cas\u662F\u6BD4\u8F83\u548C\u8BBE\u7F6E\uFF0C\u6D89\u53CA\u5230\u6BD4\u8F83\uFF0C\u6307\u7684\u5C31\u662F\u5373\u4F7F\u5931\u8D25\uFF0C\u4E0B\u4E00\u6B21\u8FDB\u53BB\u5FAA\u73AF\uFF0C\u4ECD\u7136\u80FD\u591F\u83B7\u53D6\u5230\u6700\u65B0\u503C\uFF0C\u7528\u5F53\u524D\u6700\u65B0\u503C\u6765\u8FDB\u884C\u6BD4\u8F83\uFF0C\u5373\u4F7F\u8FD9\u4E2A\u8FC7\u7A0B\u4E2D\uFF0C\u6700\u65B0\u503C\u88AB\u53E6\u4E00\u4E2A\u7EBF\u7A0B\u6240\u4FEE\u6539\u800C\u4E0D\u662F\u6700\u65B0\u503C\uFF0C\u5728\u4E0B\u4E00\u6B21\u5FAA\u73AF\u4ECD\u7136\u80FD\u591F\u62FF\u5230\u6700\u65B0\u503C\u6BD4\u8F83\u3002\u90A3\u4E48\u8981\u4FDD\u8BC1\u6BCF\u6B21\u5FAA\u73AF\u90FD\u80FD\u62FF\u5230\u8FD9\u4E2A\u6700\u65B0\u503C\uFF0C\u5C31\u8981volatile\u7684\u914D\u5408\u3002

                                                                      7. \u65E0\u9501\u60C5\u51B5\u4E0B\uFF0C\u5373\u4F7F\u91CD\u8BD5\u5931\u8D25\uFF0C\u7EBF\u7A0B\u59CB\u7EC8\u5728\u9AD8\u901F\u8FD0\u884C\uFF0C\u6CA1\u6709\u505C\u6B47

                                                                        \u800Csynchronized\u4F1A\u8BA9\u7EBF\u7A0B\u5728\u6CA1\u6709\u83B7\u5F97\u9501\u7684\u65F6\u5019\uFF0C\u53D1\u751F\u4E0A\u4E0B\u6587\u5207\u6362\uFF0C\u8FDB\u5165\u963B\u585E\u3002

                                                                        image-20210908144636043

                                                                        \u65E0\u9501\u72B6\u6001\u4E5F\u53EF\u80FD\u4F1A\u6709\u4E0A\u4E0B\u6587\u5207\u6362\uFF0C\u53EA\u4E0D\u8FC7\u8FD9\u91CC\u4E0D\u662F\u8FDB\u5165\u963B\u585E\u72B6\u6001\uFF0C\u800C\u662F\u56E0\u4E3A\u6CA1\u6709\u5206\u5230\u65F6\u95F4\u7247\u4ECE\u8FD0\u884C\u6001\u8FDB\u5165\u5C31\u7EEA\u72B6\u6001\uFF08\u53EF\u8FD0\u884C\u72B6\u6001\uFF09\uFF0C\u8FD8\u662F\u4F1A\u5BFC\u81F4\u4E0A\u4E0B\u6587\u5207\u6362\u3002

                                                                      8. \u5728\u7EBF\u7A0B\u6570\u5C0F\u4E8ECPU\u6838\u5FC3\u6570\u7684\u65F6\u5019\uFF0C\u7528CAS\u662F\u975E\u5E38\u5408\u9002\u7684\u3002

                                                                      9. CAS\u662F\u57FA\u4E8E\u4E50\u89C2\u9501\u7684\u601D\u60F3\uFF0C\u4E0D\u6015\u522B\u7684\u7EBF\u7A0B\u6765\u4FEE\u6539\u5171\u4EAB\u53D8\u91CF\uFF0C\u800Csynchronized\u662F\u62FF\u5230\u9501\uFF0C\u7981\u6B62\u5176\u4ED6\u7EBF\u7A0B\u6765\u4FEE\u6539\u5171\u4EAB\u53D8\u91CF\uFF0C\u800CCAS+volatile\u662F\u4E0D\u6015\u522B\u7684\u7EBF\u7A0B\u4FEE\u6539\u5171\u4EAB\u53D8\u91CF\uFF0C\u5927\u4E0D\u4E86\u81EA\u5DF1\u518D\u91CD\u8BD5\u51E0\u6B21\uFF0C\u7ED3\u5408volatile\u6BCF\u6B21\u90FD\u53EF\u4EE5\u4ECE\u4E3B\u5B58\u62FF\u5230\u6700\u65B0\u4FEE\u6539\u7684\u503C\uFF0C\u6765\u91CD\u8BD5\u3002

                                                                        \u4E50\u89C2\u9501\u867D\u7136\u6709\u4E00\u4E2A\u201C\u9501\u201D\u5B57\uFF0C\u4F46\u662F\u5176\u5B9E\u6CA1\u6709\u4E0A\u9501

                                                                      10. synchronized\u662F\u57FA\u4E8E\u60B2\u89C2\u9501\u7684\u601D\u60F3\uFF0C\u7981\u6B62\u5176\u4ED6\u7EBF\u7A0B\u6765\u4FEE\u6539\u5171\u4EAB\u53D8\u91CF\uFF0C\u62FF\u5230\u9501\u7684\u7EBF\u7A0B\u89E3\u5F00\u9501\uFF0C\u522B\u7684\u7EBF\u7A0B\u624D\u53EF\u4EE5\u8FDB\u6765\u3002

                                                                      11. CAS\u4FDD\u8BC1\u4E86\u539F\u5B50\u6027\uFF0Cvolatile\u4FDD\u8BC1\u4E86\u5171\u4EAB\u53D8\u91CF\u7684\u53EF\u89C1\u6027\uFF0C\u90A3\u4E48\u901A\u8FC7\u4E0D\u65AD\u91CD\u8BD5\u603B\u80FD\u62FF\u5230\u6B63\u786E\u7684\u6700\u65B0\u503C\uFF0C\u4E0D\u6015\u522B\u7684\u7EBF\u7A0B\u5BF9\u5171\u4EAB\u53D8\u91CF\u8FDB\u884C\u4FEE\u6539\uFF0C\u6240\u4EE5\u8BF4\u8FD9\u662F\u4E50\u89C2\u9501\u3002

                                                                      12. CAS\u4F53\u73B0\u7684\u662F\u65E0\u9501\u5E76\u53D1\u3001\u65E0\u963B\u585E\u5E76\u53D1\u3002\uFF08\u5F53\u7EBF\u7A0B\u6570\u5927\u4E8ECPU\u6838\u5FC3\u6570\u7684\u65F6\u5019\uFF0C\u8FD8\u662F\u53EF\u80FD\u51FA\u73B0\u7EBF\u7A0B\u7684\u4E0A\u4E0B\u6587\u5207\u6362\uFF0C\u4F46\u662F\u4E0D\u4F1A\u6709\u963B\u585E\uFF0C\u8FD9\u91CC\u7684\u4E0A\u4E0B\u6587\u5207\u6362\u662F\u7EBF\u7A0B\u7531\u8FD0\u884C\u72B6\u6001\u5230\u53EF\u8FD0\u884C\u72B6\u6001\u5F15\u8D77\u7684\u3002\uFF09

                                                                        • \u6CA1\u6709\u4F7F\u7528synchronized\uFF0C\u7EBF\u7A0B\u4E0D\u4F1A\u9677\u5165\u963B\u585E\uFF0C\u8FD9\u662F\u6548\u7387\u63D0\u5347\u7684\u56E0\u7D20\u4E4B\u4E00

                                                                        • \u4F46\u662F\u5982\u679C\u7ADE\u4E89\u6FC0\u70C8\uFF0C\u91CD\u8BD5\u5FC5\u7136\u9891\u7E41\u53D1\u751F\uFF0C\u53CD\u800C\u6548\u7387\u4F1A\u53D7\u5F71\u54CD\u3002

                                                                      13. value.compareAndSet(int expect, int update)

                                                                        \u4F1A\u628A\u7B2C\u4E00\u4E2A\u53C2\u6570\u671F\u671B\u503C\u548Cvalue\u7684\u6700\u65B0\u503C\u505A\u5BF9\u6BD4\uFF0C\u5982\u679C\u4E00\u81F4\uFF0C\u90A3\u4E48\u53EF\u4EE5\u7528\u540E\u9762\u7684update\uFF0C\u66F4\u65B0value\uFF0C\u5982\u679C\u66F4\u65B0\u5931\u8D25\u5219\u8FD4\u56DEfalse

                                                                      14. ++i,i++\u8FD9\u79CD\u64CD\u4F5C\u5728\u5B57\u8282\u7801\u5C42\u9762\u4E0D\u662F\u539F\u5B50\u6027\u7684\uFF0C\u6240\u4EE5\u53EF\u80FD\u4F1A\u51FA\u73B0\u7EBF\u7A0B\u5B89\u5168\u95EE\u9898\uFF0C\u5728\u5B57\u8282\u7801\u5C42\u9762\uFF0C\u4F1A\u51FA\u73B0\u6307\u4EE4\u4EA4\u9519\uFF0C\u6BD4\u5982\u591A\u4E2A\u7EBF\u7A0B\u5BF9i\u8FD9\u4E2A\u5171\u4EAB\u53D8\u91CF\uFF0C\u8FDB\u884C\u8FD9\u7C7B\u64CD\u4F5C\u3002

                                                                      15. \u539F\u5B50\u6574\u578BAtomicInteger\u91CC\u4F1A\u7EF4\u62A4\u4E00\u4E2Avalue\u503C\uFF0C\u8FD9\u4E2Avalue\u503C\uFF0C\u5C31\u662F\u4F1A\u7528CAS\u6765\u4FDD\u8BC1\u5B83\u7684\u7EBF\u7A0B\u5B89\u5168\uFF0CCAS\u4FDD\u8BC1\u6307\u4EE4\u7684\u539F\u5B50\u6027\uFF0C\u4F46\u662F\u8FD9\u4E2Avalue\u503C\u662F\u7528\u4E86volatile\u6765\u4FEE\u9970\u4FDD\u8BC1\u4E86\u5B83\u7684\u53EF\u89C1\u6027\uFF0C\u5C31\u662F\u5B83\u6BCF\u4E00\u6B21\u4FEE\u6539\u4E4B\u540E\uFF0C\u90FD\u4FDD\u8BC1\u80FD\u5728\u4E3B\u5B58\u62FF\u5230\u6700\u65B0\u503C\u6765\u8FDB\u884C\u6BD4\u8F83\u548C\u8BBE\u7F6E\u3002

                                                                        image-20210908152216836

                                                                      16. CAS\u5E94\u7528\u5728\u7EBF\u7A0B\u6570\u6BD4\u8F83\u5C11\u7684\u65F6\u5019\uFF0C\u6700\u597D\u662F\u4E0D\u8981\u8D85\u8FC7CPU\u6838\u5FC3\u6570\u3002

                                                                      17. AtomixStampedReference\u53EF\u4EE5\u7ED9\u539F\u5B50\u5F15\u7528\u52A0\u4E0A\u7248\u672C\u53F7\uFF0C\u8FFD\u8E2A\u539F\u5B50\u5F15\u7528\u6574\u4E2A\u7684\u53D8\u5316\u8FC7\u7A0B\uFF0C\u53EF\u4EE5\u77E5\u9053\u5F15\u7528\u53D8\u91CF\u4E2D\u9014\u88AB\u66F4\u6539\u4E86\u51E0\u6B21

                                                                        \u5982\u679C\u53EA\u662F\u5355\u7EAF\u5173\u5FC3\u539F\u5B50\u5F15\u7528\u53D8\u91CF\u662F\u5426\u66F4\u6539\u8FC7\uFF0C\u5C31\u7528AtomicMarkableReference

                                                                      \u539F\u5B50\u7D2F\u52A0\u5668

                                                                      1. \u539F\u5B50\u7D2F\u52A0\u5668 LongAdder\u6027\u80FD\u63D0\u5347\u7684\u539F\u56E0\uFF1A

                                                                        \u5728\u6709\u7ADE\u4E89\u65F6\uFF0C\u8BBE\u7F6E\u591A\u4E2A\u7D2F\u52A0\u5355\u5143\uFF0C\u6700\u540E\u5C06\u7ED3\u679C\u6C47\u603B\uFF0C\u8FD9\u6837\u4ED6\u4EEC\u5728\u7D2F\u52A0\u65F6\u64CD\u4F5C\u7684\u4E0D\u540C\u7684cell\u53D8\u91CF\uFF0C\u56E0\u6B64\u51CF\u5C11\u4E86CAS\u91CD\u8BD5\u5931\u8D25\u3002\u4ECE\u800C\u63D0\u9AD8\u4E86\u6027\u80FD\u3002

                                                                      final\u539F\u7406

                                                                      1. final\u53D8\u91CF\u7684\u8D4B\u503C\u4E5F\u4F1A\u901A\u8FC7putfield\u6307\u4EE4\u6765\u5B8C\u6210\uFF0C\u540C\u6837\u5728\u8FD9\u6761\u6307\u4EE4\u540E\u4E5F\u4F1A\u52A0\u5165\u5199\u5C4F\u969C

                                                                        \u5199\u5C4F\u969C\u5C31\u662F\u4E4B\u524D\u7684\u6307\u4EE4\u4E0D\u4F1A\u5728\u5199\u5C4F\u969C\u4E4B\u540E\u6267\u884C\uFF0C\u5199\u5C4F\u969C\u4E4B\u524D\u5BF9\u53D8\u91CF\u7684\u4FEE\u6539\u4F1A\u540C\u6B65\u5230\u4E3B\u5B58\u4E2D

                                                                        \u52A0\u5165\u4E86\u5199\u5C4F\u969C\uFF0C\u4FDD\u8BC1\u5728\u5176\u4ED6\u7EBF\u7A0B\u8BFB\u5230\u5B83\u7684\u503C\u65F6\u4E0D\u4F1A\u51FA\u73B0\u4E3A0\u7684\u60C5\u51B5

                                                                      2. \u5982\u679C\u4E00\u4E2A\u6210\u5458\u53D8\u91CF\u4E0D\u52A0final\u4FEE\u9970\uFF0C\u90A3\u4E48\u76F8\u5F53\u4E8E\u662F\u7ED9\u4E00\u4E2A\u53D8\u91CF\u8D4B\u503C\u3002\u8FD9\u4E2A\u53D8\u91CF\u5148\u8981\u9ED8\u8BA4\u8D4B\u521D\u59CB\u503C0\uFF0C\u7136\u540E\u624D\u4F1A\u663E\u5F0F\u8D4B\u503C\u3002\u5176\u4ED6\u7EBF\u7A0B\u6709\u53EF\u80FD\u4F1A\u770B\u5230\u8FD9\u4E2A0\u4ECE\u800C\u5BFC\u81F4\u7EBF\u7A0B\u5B89\u5168\u95EE\u9898\u3002

                                                                        \u5728\u7C7B\u52A0\u8F7D\u8FC7\u7A0B\u4E2D\u7684\u94FE\u63A5\u9636\u6BB5\u7684\u51C6\u5907\u9636\u6BB5\uFF0C\u4F1A\u7ED9\u6210\u5458\u53D8\u91CF\u4E2D\u7684\u9759\u6001\u5C5E\u6027\u9ED8\u8BA4\u8D4B\u521D\u59CB\u503C\uFF0C\u7136\u540E\u5728\u521D\u59CB\u5316\u9636\u6BB5\u7ED9\u5176\u663E\u5F0F\u8D4B\u503C\u3002\u8FD9\u4E2A\u51C6\u5907\u9636\u6BB5\uFF0C\u4E0D\u4F1A\u7ED9\u6210\u5458\u53D8\u91CF\u4E2D\u7684\u975E\u9759\u6001\u5C5E\u6027\u8D4B\u503C\uFF0C\u56E0\u4E3A\u975E\u9759\u6001\u5C5E\u6027\u662F\u5C5E\u4E8E\u5BF9\u8C61\u7684\u53D8\u91CF\uFF0C\u9700\u8981\u968F\u7740\u5BF9\u8C61\u7684\u521B\u5EFA\u800C\u88AB\u5206\u914D\u5728\u5806\u7A7A\u95F4\u4E2D\uFF0C\u4E5F\u4E0D\u4F1A\u7ED9final\u4FEE\u9970\u7684\u9759\u6001\u5C5E\u6027\u8D4B\u503C\uFF0C\u56E0\u4E3Afinal\u4FEE\u9970\u7684\u9759\u6001\u5C5E\u6027\u65E9\u5728\u7F16\u8BD1\u9636\u6BB5\u5C31\u4F1A\u8FDB\u884C\u8D4B\u503C\u4E86\u3002

                                                                        \u7C7B\u52A0\u8F7D\u8FC7\u7A0B\u4E2D\u7684\u521D\u59CB\u5316\u9636\u6BB5\uFF0C<clinit>\uFF0C\u7ED9\u9759\u6001\u5C5E\u6027\u663E\u5F0F\u8D4B\u521D\u59CB\u503C\uFF0C\u6267\u884C\u9759\u6001\u4EE3\u7801\u5757\u5185\u7684\u5185\u5BB9\u3002

                                                                      \u81EA\u5B9A\u4E49\u7EBF\u7A0B\u6C60

                                                                      1. \u6211\u4EEC\u5E94\u8BE5\u5145\u5206\u5229\u7528\u5DF2\u6709\u7EBF\u7A0B\u7684\u6F5C\u529B\uFF0C\u4E0D\u5E94\u8BE5\u6BCF\u6B21\u4E00\u6709\u4EFB\u52A1\u90FD\u65B0\u5EFA\u65B0\u7684\u7EBF\u7A0B\uFF0C\u4E0D\u7136\u7EBF\u7A0B\u5F88\u591A\uFF0C\u4F1A\u9891\u7E41\u5730\u51FA\u73B0\u4E0A\u4E0B\u6587\u5207\u6362\uFF0C\u751A\u81F3\u662F\u6B7B\u9501\uFF0C\u8FD8\u6709\u7CFB\u7EDF\u8D44\u6E90\u9650\u5236\u7684\u95EE\u9898\uFF0C\u90FD\u8BF4\u660E\u4E86\u7EBF\u7A0B\u4E0D\u662F\u8D8A\u591A\u8D8A\u597D\uFF0C\u6240\u4EE5\u8981\u5145\u5206\u5229\u7528\u5DF2\u6709\u7EBF\u7A0B\u3002

                                                                      2. \u6BCF\u521B\u5EFA\u4E00\u4E2A\u7EBF\u7A0B\u90FD\u8981\u5360\u7528\u4E00\u5B9A\u5185\u5B58\uFF0C\u8981\u5206\u914D\u865A\u62DF\u673A\u6808\u7B49\u7EBF\u7A0B\u79C1\u6709\u7A7A\u95F4

                                                                        \u5982\u679C\u521B\u5EFA\u5F88\u591A\u7EBF\u7A0B

                                                                        • \u5BF9\u5185\u5B58\u7684\u5360\u7528\u5927\uFF0C\u4E5F\u5C31\u662F\u7CFB\u7EDF\u8D44\u6E90\u9650\u5236\u95EE\u9898
                                                                        • \u4E0A\u4E0B\u6587\u5207\u6362\u5BFC\u81F4\u6548\u7387\u4E0D\u9AD8
                                                                        • \u6B7B\u9501
                                                                      3. \u7EBF\u7A0B\u4E00\u5B9A\u4E0D\u662F\u521B\u5EFA\u5F97\u8D8A\u591A\u8D8A\u597D\u3002

                                                                      4. \u7EBF\u7A0B\u6C60\u5C31\u662F\u521B\u5EFA\u4E00\u4E9B\u7EBF\u7A0B\uFF0C\u8BA9\u7EBF\u7A0B\u80FD\u591F\u5F97\u5230\u91CD\u590D\u7684\u5229\u7528\uFF0C\u7EBF\u7A0B\u7528\u5B8C\u4E86\uFF0C\u4E0D\u9500\u6BC1\uFF0C\u653E\u8FDB\u7EBF\u7A0B\u6C60\u3002

                                                                      5. \u7EBF\u7A0B\u6C60

                                                                        • jdk\u63D0\u4F9B\u7684\u529F\u80FD\u5B8C\u5907\u7684\u7EBF\u7A0B\u6C60
                                                                        • \u81EA\u5B9A\u4E49\u7EBF\u7A0B\u6C60
                                                                      6. \u81EA\u5B9A\u4E49\u7EBF\u7A0B\u6C60\u5206\u6210\u4EE5\u4E0B\u7EC4\u4EF6

                                                                        • \u7EBF\u7A0B\u6C60\uFF0C\u91CC\u9762\u6709\u53EF\u91CD\u7528\u7684\u7EBF\u7A0B
                                                                        • \u963B\u585E\u961F\u5217\uFF0C\u5E73\u8861\u751F\u4EA7\u8005\u7EBF\u7A0B\u3001\u6D88\u8D39\u8005\u7EBF\u7A0B\u901F\u5EA6\u5DEE\u5F02\u7684\u7EC4\u4EF6
                                                                        • \u7EBF\u7A0B\u7684\u751F\u4EA7\u8005

                                                                        image-20210908183204652

                                                                      jdk\u5B9A\u4E49\u7684\u7EBF\u7A0B\u6C60

                                                                      \u7EBF\u7A0B\u6C60\u72B6\u6001

                                                                      1. image-20210908205551426

                                                                        ExecutorService\u662F\u7EBF\u7A0B\u6C60\u7684\u6700\u57FA\u672C\u7684\u63A5\u53E3\uFF0C\u63D0\u4F9B\u4E86\u63D0\u4EA4\u4EFB\u52A1\uFF0C\u5173\u95ED\u7EBF\u7A0B\u6C60\u7B49\u65B9\u6CD5\u3002

                                                                        ScheduledExecutorService\u65B0\u589E\u4E86\u8C03\u5EA6\u4EFB\u52A1\u7684\u529F\u80FD\uFF0C\u7528\u4E8E\u5B9A\u65F6\u6267\u884C\u4EFB\u52A1

                                                                        ThreadPoolExecutor\u662F\u6700\u57FA\u7840\u7684\u5B9E\u73B0

                                                                        ScheduledThreadPoolExecutor\u662F\u5E26\u6709\u4EFB\u52A1\u8C03\u5EA6\u529F\u80FD\u7684\u7EBF\u7A0B\u6C60\u5B9E\u73B0

                                                                      2. \u8BA9\u6709\u9650\u7684\u5DE5\u4F5C\u7EBF\u7A0B\uFF08Worker Thread\uFF09\u6765\u8F6E\u6D41\u5730\u5F02\u6B65\u5730\u5904\u7406\u65E0\u9650\u591A\u7684\u4EFB\u52A1\uFF0C\u7EBF\u7A0B\u6C60\u505A\u7684\u5C31\u662F\u8FD9\u4E2A\u4E8B\u60C5\u3002

                                                                      3. \u7EBF\u7A0B\u6C60\u72B6\u6001

                                                                        ThreadPoolExecutor\u4F7F\u7528int\u7684\u9AD83\u4F4D\u6765\u8868\u793A\u7EBF\u7A0B\u6C60\u72B6\u6001\uFF0C\u4F4E29\u4F4D\u8868\u793A\u7EBF\u7A0B\u6570\u91CF

                                                                        image-20210908205814692

                                                                        \u7EBF\u7A0B\u6C60\u72B6\u6001\u548C\u7EBF\u7A0B\u6570\u91CF\u5B58\u50A8\u5728\u4E00\u4E2A\u539F\u5B50\u53D8\u91CFctl\u4E2D\uFF0C\u76EE\u7684\u662F\u5C06\u7EBF\u7A0B\u6C60\u72B6\u6001\u4E0E\u7EBF\u7A0B\u4E2A\u6570\u5408\u4E8C\u4E3A\u4E00\uFF0C\u8FD9\u6837\u5C31\u53EF\u4EE5\u7528\u4E00\u6B21cas\u539F\u5B50\u64CD\u4F5C\u8FDB\u884C\u8D4B\u503C\u3002

                                                                      \u6784\u9020\u65B9\u6CD5

                                                                      1. \u7EBF\u7A0B\u6C60\u7684\u6784\u9020\u65B9\u6CD5

                                                                        image-20210908210307737

                                                                        \u963B\u585E\u961F\u5217\u6307\u7684\u662F\u4EFB\u52A1\u963B\u585E\u961F\u5217\u3002\u8981\u6E05\u695A\u4EFB\u52A1\u662F\u4EC0\u4E48\uFF0C\u770B\u6CDB\u578B\u5F88\u6E05\u695A\uFF0C\u91CC\u9762\u5199\u7684Runnable\uFF0CRunnable\u6216Callable\u63A5\u53E3\u7684\u5B9E\u73B0\u7C7B\u7684\u5BF9\u8C61\u5C31\u662F\u4EFB\u52A1\u5BF9\u8C61

                                                                      \u6838\u5FC3\u7EBF\u7A0B\u548C\u6551\u6025\u7EBF\u7A0B

                                                                      1. \u7EBF\u7A0B\u6C60\u4E2D\u7684\u7EBF\u7A0B\u5206\u4E3A\u4E24\u79CD

                                                                        • \u6838\u5FC3\u7EBF\u7A0B
                                                                        • \u6551\u6025\u7EBF\u7A0B

                                                                        \u6838\u5FC3\u7EBF\u7A0B\u6570 + \u6551\u6025\u7EBF\u7A0B\u6570 = \u6700\u5927\u7EBF\u7A0B\u6570

                                                                      2. \u6551\u6025\u7EBF\u7A0B\u7528\u4E8E\u4EFB\u52A1\u91CF\u7279\u522B\u5927\uFF0C\u4EFB\u52A1\u5982\u679C\u6CA1\u6709\u6838\u5FC3\u7EBF\u7A0B\u6765\u6267\u884C\uFF0C\u90A3\u4E48\u4F1A\u8FDB\u5165\u963B\u585E\u961F\u5217\uFF0C\u5F53\u963B\u585E\u961F\u5217\u90FD\u653E\u4E0D\u4E0B\u4E86\uFF0C\u6765\u7684\u4E0B\u4E00\u4E2A\u4EFB\u52A1\u4F1A\u4EA4\u7ED9\u6551\u6025\u7EBF\u7A0B\u53BB\u6267\u884C\u3002

                                                                        image-20210908211936243

                                                                      3. \u6551\u6025\u7EBF\u7A0B\u548C\u6838\u5FC3\u7EBF\u7A0B\u6700\u5927\u7684\u533A\u522B\u662F\uFF1A

                                                                        \u6551\u6025\u7EBF\u7A0B\u6709\u751F\u5B58\u65F6\u95F4\uFF0C\u4EFB\u52A1\u6267\u884C\u5B8C\u4E86\uFF0C\u6551\u6025\u7EBF\u7A0B\u4F1A\u9500\u6BC1\uFF0C\u4E0B\u4E00\u6B21\u9AD8\u5CF0\u671F\u6765\u4E86\uFF0C\u624D\u4F1A\u518D\u521B\u5EFA

                                                                        \u6838\u5FC3\u7EBF\u7A0B\u6CA1\u6709\u751F\u5B58\u65F6\u95F4\uFF0C\u6267\u884C\u5B8C\u4EFB\u52A1\uFF0C\u4ECD\u7136\u4F1A\u4FDD\u7559\u5728\u7EBF\u7A0B\u6C60\u4E2D\u3002

                                                                        • \u7EBF\u7A0B\u6C60\u4E2D\u521A\u5F00\u59CB\u6CA1\u6709\u7EBF\u7A0B\uFF0C\u5F53\u4E00\u4E2A\u4EFB\u52A1\u63D0\u4EA4\u7ED9\u7EBF\u7A0B\u6C60\u540E\uFF0C\u7EBF\u7A0B\u6C60\u4F1A\u521B\u5EFA\u4E00\u4E2A\u65B0\u7EBF\u7A0B\u6765\u6267\u884C\u4EFB\u52A1
                                                                        • \u5F53\u7EBF\u7A0B\u6570\u8FBE\u5230corePoolSize\u540E\uFF0C\u5E76\u6CA1\u6709\u7EBF\u7A0B\u7A7A\u95F2\uFF0C\u8FD9\u65F6\u518D\u52A0\u5165\u4EFB\u52A1\uFF0C\u65B0\u52A0\u7684\u4EFB\u52A1\u4F1A\u88AB\u52A0\u5165workQueue\u961F\u5217\u6392\u961F\uFF0C\u76F4\u5230\u6709\u7A7A\u95F2\u7684\u7EBF\u7A0B\u3002
                                                                      4. \u5982\u679C\u7EBF\u7A0B\u6570\u8FBE\u5230maximumPoolSize\uFF0C\u4ECD\u7136\u6709\u65B0\u4EFB\u52A1\u8FD9\u65F6\u4F1A\u6267\u884C\u62D2\u7EDD\u7B56\u7565\uFF0C\u62D2\u7EDD\u7B56\u7565jdk\u63D0\u4F9B\u4E864\u79CD\u5B9E\u73B0\uFF1A

                                                                        image-20210908212728493

                                                                        image-20210908212946761

                                                                      5. jdk\u63D0\u4F9B\u4E86Executors\u5DE5\u5177\u7C7B\uFF0C\u8FD9\u4E2A\u5DE5\u5177\u7C7B\u63D0\u4F9B\u4E86\u5F88\u591A\u5DE5\u5382\u65B9\u6CD5\u6765\u521B\u5EFA\u5404\u79CD\u7528\u9014\u7684\u7EBF\u7A0B\u6C60\uFF0C\u4F46\u662F\u5185\u90E8\u5C31\u662F\u8C03\u7528\u6784\u9020\u65B9\u6CD5\uFF0C\u4F20\u9012\u4E0D\u540C\u53C2\u6570\uFF0C\u521B\u5EFA\u7EBF\u7A0B\u6C60

                                                                      6. \u603B\u7ED3\uFF1A

                                                                        \u7EBF\u7A0B\u6570\u8FBE\u5230corePoolSize\uFF1A

                                                                        • \u65B0\u52A0\u7684\u4EFB\u52A1\u52A0\u5165\u4EFB\u52A1\u963B\u585E\u961F\u5217\u6392\u961F\uFF0C\u76F4\u5230\u6709\u7A7A\u95F2\u7684\u7EBF\u7A0B
                                                                        • \u82E5\u4EFB\u52A1\u963B\u585E\u961F\u5217\u5DF2\u6EE1\uFF08\u5373\u4EFB\u52A1\u963B\u585E\u961F\u5217\u5DF2\u7ECF\u653E\u4E0D\u4E0B\u65B0\u52A0\u7684\u4EFB\u52A1\uFF09\uFF1A
                                                                          • \u6551\u6025\u7EBF\u7A0B\u6765\u6267\u884C\u65B0\u52A0\u7684\u4EFB\u52A1
                                                                          • \u82E5\u6838\u5FC3\u7EBF\u7A0B\u6570 + \u6551\u6025\u7EBF\u7A0B\u6570 \u5373\u6700\u5927\u7EBF\u7A0B\u6570\u5DF2\u7ECF\u8FBE\u5230maximumPoolSize\uFF0C\u5982\u679C\u4ECD\u7136\u6709\u65B0\u4EFB\u52A1\uFF0C\u6267\u884C\u62D2\u7EDD\u7B56\u7565\uFF084\u79CD\uFF09

                                                                      \u51E0\u79CD\u7C7B\u578B\u7684\u7EBF\u7A0B\u6C60

                                                                      1. \u56FA\u5B9A\u5927\u5C0F\u7EBF\u7A0B\u6C60

                                                                        newFixedThreadPool

                                                                        image-20210908213524594

                                                                        \u7279\u70B9\uFF1A

                                                                        • \u6838\u5FC3\u7EBF\u7A0B\u6570 == \u6700\u5927\u7EBF\u7A0B\u6570\uFF08\u6CA1\u6709\u6551\u6025\u7EBF\u7A0B\u88AB\u521B\u5EFA\uFF09\uFF0C\u56E0\u6B64\u4E5F\u65E0\u9700\u8D85\u65F6\u65F6\u95F4

                                                                        • \u963B\u585E\u961F\u5217\u662F\u65E0\u754C\u7684\uFF0C\u53EF\u4EE5\u653E\u4EFB\u610F\u6570\u91CF\u7684\u4EFB\u52A1

                                                                          \u9002\u7528\u4E8E\u4EFB\u52A1\u91CF\u5DF2\u77E5\uFF0C\u76F8\u5BF9\u8017\u65F6\u7684\u4EFB\u52A1

                                                                      2. \u5E26\u7F13\u51B2\u7EBF\u7A0B\u6C60

                                                                        newCachedThreadPool

                                                                        image-20210908214251452

                                                                        \u7279\u70B9\uFF1A

                                                                        • \u6838\u5FC3\u7EBF\u7A0B\u6570\u662F0\uFF0C\u6700\u5927\u7EBF\u7A0B\u6570\u662FInteger.MAX_VALUE\uFF0C\u6551\u6025\u7EBF\u7A0B\u7684\u7A7A\u95F2\u751F\u5B58\u65F6\u95F4\u662F60s
                                                                        • \u5168\u90E8\u90FD\u662F\u6551\u6025\u7EBF\u7A0B\uFF0860s\u540E\u53EF\u4EE5\u56DE\u6536\uFF09
                                                                        • \u6551\u6025\u7EBF\u7A0B\u53EF\u4EE5\u65E0\u9650\u521B\u5EFA

                                                                        \u9002\u7528\u4E8E\u4EFB\u52A1\u5BC6\u96C6\uFF0C\u4F46\u662F\u6BCF\u4E2A\u4EFB\u52A1\u65F6\u95F4\u90FD\u5F88\u77ED\u7684\u60C5\u51B5

                                                                      3. \u5355\u7EBF\u7A0B\u7EBF\u7A0B\u6C60

                                                                        image-20210909140256403

                                                                        \u4F7F\u7528\u573A\u666F\uFF1A

                                                                        \u5E0C\u671B\u591A\u4E2A\u4EFB\u52A1\u6392\u961F\u6267\u884C\uFF0C\u7EBF\u7A0B\u6570\u56FA\u5B9A\u4E3A1\uFF0C\u4EFB\u52A1\u6570\u591A\u4E8E1\u65F6\uFF0C\u4F1A\u653E\u5165\u65E0\u754C\u961F\u5217\u6392\u961F

                                                                        \u4EFB\u52A1\u6267\u884C\u5B8C\u6BD5\uFF0C\u8FD9\u552F\u4E00\u7684\u7EBF\u7A0B\u4E5F\u4E0D\u4F1A\u91CA\u653E\u3002

                                                                        \u53EA\u6709\u4E00\u4E2A\u6838\u5FC3\u7EBF\u7A0B\uFF0C\u6CA1\u6709\u6551\u6025\u7EBF\u7A0B

                                                                        \u533A\u522B\uFF1A

                                                                        \u81EA\u5DF1\u521B\u5EFA\u4E00\u4E2A\u5355\u7EBF\u7A0B\u4E32\u884C\u6267\u884C\u4EFB\u52A1\uFF0C\u5982\u8FC7\u4EFB\u52A1\u6267\u884C\u5931\u8D25\u800C\u7EC8\u6B62\u6CA1\u6709\u4EFB\u4F55\u8865\u6551\u63AA\u65BD\uFF0C\u800C\u7EBF\u7A0B\u6C60\u8FD8\u4F1A\u65B0\u5EFA\u4E00\u4E2A\u7EBF\u7A0B\uFF0C\u4FDD\u8BC1\u7EBF\u7A0B\u6C60\u7684\u6B63\u5E38\u5DE5\u4F5C

                                                                        image-20210909141045584

                                                                        \u5355\u7EBF\u7A0B\u6267\u884C\u5668\u8FD4\u56DE\u7684\u662F\u5305\u88C5\u540E\u7684\u5BF9\u8C61\uFF0C\u6838\u5FC3\u7EBF\u7A0B\u6570\u5927\u5C0F\u4E0D\u80FD\u4FEE\u6539\u3002

                                                                      \u63D0\u4EA4\u4EFB\u52A1

                                                                      1. \u63D0\u4EA4\u4EFB\u52A1

                                                                        image-20210909141325138

                                                                        • submit

                                                                          Future\u7528\u7684\u5C31\u662F\u4FDD\u62A4\u6027\u6682\u505C\u6A21\u5F0F\u6765\u63A5\u6536\u53E6\u4E00\u4E2A\u7EBF\u7A0B\u8FD4\u56DE\u7684\u7ED3\u679C\u3002

                                                                        • invokeAll

                                                                          image-20210909142412154

                                                                          image-20210909142301150

                                                                          \u610F\u601D\u5C31\u662F\u8BF4\uFF0CinvokeAll()\u65B9\u6CD5\u4F20\u5165\u7684\u53C2\u6570\u662F\u4EFB\u52A1tasks\uFF0C\u4EFB\u52A1\u7684\u672C\u8D28\u4E5F\u662F\u5B9E\u73B0Callable\u63A5\u53E3\u7684\u7C7B\u7684\u5BF9\u8C61

                                                                          \u800C\u521B\u5EFA\u7EBF\u7A0B\u6C60\u65F6\u6307\u5B9A\u7684\u6700\u5927\u7EBF\u7A0B\u6570\u5373\u6838\u5FC3\u7EBF\u7A0B\u6570\uFF08\u56E0\u4E3A\u91C7\u7528\u7684\u662F\u56FA\u5B9A\u5927\u5C0F\u7EBF\u7A0B\u6C60\uFF0C\u6240\u4EE5\u6CA1\u6709\u6551\u6025\u7EBF\u7A0B\uFF09\u662F2\uFF0C\u6240\u4EE5\u524D\u4E24\u4E2A\u4EFB\u52A1\uFF0C\u4E5F\u5C31\u662F\u5B9E\u73B0Callable\u63A5\u53E3\u7684\u7C7B\u7684\u5BF9\u8C61\uFF0C\uFF08\u6211\u8BA4\u4E3A\u4EFB\u52A1\u7684\u672C\u8D28\u5C31\u662F\u5B9E\u73B0Runnable\u6216Callable\u63A5\u53E3\u7684\u7C7B\u7684\u5BF9\u8C61\uFF0C\u628A\u8FD9\u4E2A\u5BF9\u8C61\uFF0C\u4F5C\u4E3A\u54EA\u4E2A\u7EBF\u7A0B\u521B\u5EFA\u7684\u6784\u9020\u51FD\u6570\u7684\u53C2\u6570\u4F20\u5165\uFF0C\u5C31\u662F\u4EFB\u52A1\u4EA4\u7ED9\u54EA\u4E2A\u7EBF\u7A0B\u6267\u884C\u3002\uFF09

                                                                          \u524D\u4E24\u4E2A\u4EFB\u52A1\u88AB\u7EBF\u7A0B\u6267\u884C\u4E86\uFF0C\u7B2C\u4E09\u4E2A\u4EFB\u52A1\u8FDB\u5165\u963B\u585E\u961F\u5217\uFF0C\u524D\u4E24\u4E2A\u4EFB\u52A1\u6267\u884C\u5B8C\u540E\uFF0C\u7B2C\u4E8C\u4E2A\u7EBF\u7A0B\u5C06\u7B2C\u4E09\u4E2A\u4EFB\u52A1\u53D6\u51FA\u6267\u884C\u3002

                                                                          \u4EFB\u52A1\u5C31\u662F\u5B9E\u73B0Runnable\u63A5\u53E3\u6216Callable\u63A5\u53E3\u7684\u5B9E\u73B0\u7C7B\u7684\u5BF9\u8C61

                                                                          \u600E\u4E48\u628A\u4EFB\u52A1\u4EA4\u7ED9\u67D0\u4E2A\u7EBF\u7A0B\u6267\u884C\u5462\uFF1F\u6211\u4EEC\u4E4B\u524D\u8BF4\u628A\u4EFB\u52A1\u548C\u7EBF\u7A0B\u5206\u5F00\uFF0C\u5C31\u662F\u91C7\u7528\u7684\u5B9E\u73B0Runnable\u6216Callable\u63A5\u53E3\u7684\u65B9\u5F0F\uFF0C\u90A3\u4E48\u8FD9\u91CC\u540C\u6837\uFF0C\u628A\u4EFB\u52A1\u4EA4\u7ED9\u67D0\u4E2A\u7EBF\u7A0B\u6267\u884C\uFF0C\u5C31\u76F8\u5F53\u4E8E\u628A\u5B9E\u73B0Runnable\u6216Callable\u63A5\u53E3\u7684\u5BF9\u8C61\uFF0C\u4F5C\u4E3A\u521B\u5EFA\u7EBF\u7A0B\u7684\u6784\u9020\u51FD\u6570\u7684\u53C2\u6570\u4F20\u5165

                                                                        • invokeAny\uFF0C \u627E\u5230\u4E00\u4E2A\u6700\u5148\u6267\u884C\u7684\u4EFB\u52A1\uFF0C\u8FD4\u56DE\u7ED3\u679C\u4E4B\u540E\uFF0C\u5176\u4ED6\u4EFB\u52A1\u5C31\u4E0D\u6267\u884C\u4E86\u3002

                                                                          \u8FD4\u56DE\u7ED3\u679C\u7C7B\u578B\u662FObject\uFF0C\u4E5F\u5C31\u662F\u8BF4\u6700\u7EC8\u53EA\u5F97\u5230\u4E00\u4E2A\u4EFB\u52A1\u7684\u7ED3\u679C\u3002

                                                                      2. \u4EFB\u52A1\u5BF9\u8C61\uFF1A\u5B9E\u73B0Runnable\u63A5\u53E3\u6216\u5B9E\u73B0Callable\u63A5\u53E3\u7684\u5BF9\u8C61\u53EB\u505A\u4EFB\u52A1\u5BF9\u8C61\uFF0C\u4EA4\u7ED9\u7EBF\u7A0B\u6267\u884C\uFF0C\u5373\u4F5C\u4E3A\u7EBF\u7A0B\u521B\u5EFA\u7684\u6784\u9020\u51FD\u6570\u7684\u53C2\u6570\u4F20\u5165

                                                                      \u5173\u95ED\u7EBF\u7A0B\u6C60

                                                                      1. shutdown---\u4F7F\u7EBF\u7A0B\u6C60\u72B6\u6001\u4ECERUNNING\u53D8\u4E3ASHUTDOWN

                                                                        \u4E0D\u4F1A\u63A5\u6536\u65B0\u4EFB\u52A1

                                                                        \u4F46\u5DF2\u63D0\u4EA4\u7684\u4EFB\u52A1\u4F1A\u6267\u884C\u5B8C\uFF0C\u4F1A\u628A\u963B\u585E\u961F\u5217\u4E2D\u7B49\u5F85\u4EFB\u52A1\u5BF9\u8C61\u6267\u884C\u5B8C\u6BD5

                                                                        \u6B64\u65B9\u6CD5\u4E0D\u4F1A\u963B\u585E\u8C03\u7528\u7EBF\u7A0B\u7684\u6267\u884C\uFF0C\u6BD4\u5982\u4E3B\u7EBF\u7A0B\u8C03\u7528\u4E86shutdown\uFF0C\u4E3B\u7EBF\u7A0B\u5982\u679C\u8FD8\u6709\u5176\u4ED6\u4EE3\u7801\uFF0C\u4F1A\u7EE7\u7EED\u8FD0\u884C\u3002

                                                                      2. shutdownNow---\u4F7F\u7EBF\u7A0B\u6C60\u72B6\u6001\u4ECERUNNING\u53D8\u4E3ASTOP

                                                                        \u4E0D\u4F1A\u63A5\u6536\u65B0\u4EFB\u52A1

                                                                        \u4F1A\u629B\u5F03\u963B\u585E\u961F\u5217\u4E2D\u7684\u4EFB\u52A1\uFF08\u5176\u5B9E\u4E0D\u51C6\u786E\uFF0C\u963B\u585E\u961F\u5217\u4E2D\u6CA1\u6267\u884C\u7684\u4EFB\u52A1\u4F1A\u4F5C\u4E3A\u7ED3\u679C\u8FD4\u56DE\uFF09

                                                                        \u4F1A\u7528interrupt\u7684\u65B9\u5F0F\u4E2D\u65AD\u6B63\u5728\u6267\u884C\u7684\u4EFB\u52A1

                                                                        \u961F\u5217\u4E2D\u7684\u4EFB\u52A1\u4F1A\u4F5C\u4E3A\u8FD4\u56DE\u7ED3\u679C\uFF0C\u62FF\u5230\u8FD9\u4E2A\u8FD4\u56DE\u7ED3\u679C\u662F\u91CD\u65B0\u6267\u884C\uFF0C\u8FD8\u662F\u629B\u5F03\uFF0C\u7531\u4E1A\u52A1\u6765\u51B3\u5B9A\u3002

                                                                        image-20210909152652554

                                                                        \u8FD9\u91CC\u53C8\u8BC1\u660E\u4E86\uFF0CRunnable\uFF0CCallable\u63A5\u53E3\u5B9E\u73B0\u7C7B\u7684\u5BF9\u8C61\u5C31\u662F\u4EFB\u52A1\u5BF9\u8C61

                                                                      \u4EFB\u52A1\u8C03\u5EA6\u7EBF\u7A0B\u6C60

                                                                      1. \u6709\u7684\u65F6\u5019\u6211\u4EEC\u5E0C\u671B\u4EFB\u52A1\u5EF6\u65F6\u6267\u884C\uFF0C\u6216\u8005\u5E0C\u671B\u4EFB\u52A1\u6BCF\u9694\u51E0\u79D2\u5C31\u6267\u884C\u4E00\u6B21\uFF08\u5B9A\u65F6\uFF09\uFF0C\u8FD9\u79CD\u60C5\u51B5\u6211\u4EEC\u5C31\u8981\u7528\u5230\u4EFB\u52A1\u8C03\u5EA6\u7EBF\u7A0B\u6C60

                                                                        \u4EFB\u52A1\u8C03\u5EA6\u7EBF\u7A0B\u6C60\u662F\u5728jdk1.5\u52A0\u5165\u3002

                                                                      2. \u5728\u4EFB\u52A1\u8C03\u5EA6\u7EBF\u7A0B\u6C60\u52A0\u5165\u4E4B\u524D\uFF0C\u6709\u4E00\u79CDjava.util.Timer\u6765\u5B9E\u73B0\u5B9A\u65F6\u529F\u80FD\uFF0CTimer\u7684\u4F18\u70B9\u662F\u7B80\u5355\u6613\u7528\uFF0C\u4F46\u7531\u4E8E\u6240\u6709\u7684\u5EF6\u65F6\u6216\u5B9A\u65F6\u7684\u4EFB\u52A1\u90FD\u662F\u7531\u540C\u4E00\u4E2A\u7EBF\u7A0B\u6765\u8C03\u5EA6\u6267\u884C\uFF0C\u6240\u4EE5\u6240\u6709\u7684\u4EFB\u52A1\u90FD\u662F\u4E32\u884C\u3002

                                                                      3. Timer\u5DF2\u7ECF\u8FC7\u65F6\u4E86

                                                                        Timer\u7684\u8FD9\u4E2A\u7EBF\u7A0B\u5F88\u8106\u5F31\uFF0C\u524D\u4E00\u4E2A\u4EFB\u52A1\u51FA\u73B0\u4E86\u5F02\u5E38\uFF0C\u540E\u9762\u7684\u4EFB\u52A1\u5C31\u4E0D\u80FD\u6267\u884C\u4E86\u3002

                                                                        \u5E94\u8BE5\u7528\u5E26\u6709\u4EFB\u52A1\u8C03\u5EA6\u529F\u80FD\u7684\u7EBF\u7A0B\u6C60\uFF0C\u53EF\u4EE5\u8BBE\u7F6E\u7EBF\u7A0B\u6C60\u4E2D\u7EBF\u7A0B\u6570\u91CF\uFF0C\u5C31\u4E0D\u662F\u6240\u6709\u7684\u4EFB\u52A1\u90FD\u662F\u4E00\u4E2A\u7EBF\u7A0B\u6765\u6267\u884C\u4E86\u3002\uFF08\u591A\u7EBF\u7A0B\u89E3\u51B3\u4E32\u884C\uFF0C\u5B9E\u73B0\u5E76\u884C\uFF08CPU\u591A\u6838\u7684\u60C5\u51B5\u4E0B\uFF0C\u5355\u6838\u7684\u60C5\u51B5\u4E0B\u5FAE\u89C2\u4E0A\u4ECD\u662F\u4E32\u884C\uFF0C\u4E0A\u4E0B\u6587\u5207\u6362\uFF09\uFF09

                                                                      4. image-20210909163938947

                                                                        Executors\u662F\u5DE5\u5177\u7C7B\uFF0C\u521B\u5EFA\u5404\u79CD\u7EBF\u7A0B\u6C60\uFF0C\u672C\u8D28\u4E0A\u662F\u4FEE\u6539\u6784\u9020\u65B9\u6CD5\u7684\u90A3\u4E03\u79CD\u53C2\u6570

                                                                      5. \u6B63\u786E\u5904\u7406\u5F02\u5E38

                                                                        1. \u7B2C\u4E00\u79CD\u65B9\u5F0F\uFF0C\u81EA\u5DF1\u624B\u52A8\u5728Callable\u5B9E\u73B0\u7C7B\u590D\u5199call()\u65B9\u6CD5\u65F6\uFF0C\u6216\u5728\u5B9E\u73B0Runnable\u7C7B\u590D\u5199run()\u65F6\uFF0C\u7528try-catch\u5904\u7406
                                                                        2. \u7B2C\u4E8C\u79CD\uFF0C\u7528\u5B9E\u73B0Callable\u63A5\u53E3\u7ED3\u5408Future\u7684\u65B9\u5F0F\u66FF\u4EE3\u5B9E\u73B0Runnable\u63A5\u53E3\u7684\u65B9\u5F0F\uFF0C\u56E0\u4E3A\u5B9E\u73B0Callable\u63A5\u53E3\u7ED3\u5408Future\u7684\u65B9\u5F0F\uFF0C\u91CD\u5199call()\u65B9\u6CD5\uFF0Ccall()\u65B9\u6CD5\u6709\u8FD4\u56DE\u503C\uFF0C\u8FD9\u4E2A\u8FD4\u56DE\u503C\uFF0C\u901A\u8FC7Future\u5BF9\u8C61\u7684get()\u65B9\u6CD5\u62FF\u5230\uFF0C\u5982\u679C\u8BF4call()\u5185\u90E8\u6709\u5F02\u5E38\uFF0C\u90A3\u4E48\u5728\u901A\u8FC7Future\u5BF9\u8C61\u7684get()\u65B9\u6CD5\u62FF\u8FD4\u56DE\u7ED3\u679C\u65F6\uFF0C\u4F1A\u5C06\u5F02\u5E38\u4FE1\u606F\u6253\u5370\u51FA\u6765\u3002

                                                                      Fork/Join\u7EBF\u7A0B\u6C60\u5B9E\u73B0

                                                                      1. Fork/Join\u7EBF\u7A0B\u6C60\u662Fjdk1.7\u52A0\u5165\u7684\u65B0\u7684\u7EBF\u7A0B\u6C60\u5B9E\u73B0

                                                                        \u4F53\u73B0\u7684\u5206\u6CBB\u601D\u60F3

                                                                        \u9002\u7528\u4E8E\u80FD\u591F\u8FDB\u884C\u4EFB\u52A1\u62C6\u5206\u7684cpu\u5BC6\u96C6\u578B\u8FD0\u7B97

                                                                      2. \u6240\u8C13\u4EFB\u52A1\u62C6\u5206\uFF0C\u662F\u5C06\u4E00\u4E2A\u5927\u4EFB\u52A1\u62C6\u5206\u4E3A\u7B97\u6CD5\u4E0A\u76F8\u540C\u7684\u5C0F\u4EFB\u52A1

                                                                        \u8FD9\u4E9B\u5C0F\u4EFB\u52A1\u5C31\u53EF\u4EE5\u4EA4\u7ED9\u4E0D\u540C\u7684\u7EBF\u7A0B\u6765\u5B8C\u6210\uFF0C\u63D0\u5347\u8FD0\u884C\u6548\u7387

                                                                      3. Fork\\Join\u9ED8\u8BA4\u4F1A\u521B\u5EFA\u4E0ECPU\u6838\u5FC3\u6570\u5927\u5C0F\u76F8\u540C\u7684\u7EBF\u7A0B\u6C60\u3002\uFF08\u8981\u5145\u5206\u5229\u7528CPU\uFF09

                                                                      4. \u4F7F\u7528Fork\\Join\u7EBF\u7A0B\u6C60

                                                                        • \u521B\u5EFA\u4EFB\u52A1\u5BF9\u8C61\uFF0C\u4E0D\u80FD\u4F7F\u7528Runnable\u6216Callable\u4EFB\u52A1\u5BF9\u8C61
                                                                        • \u4F7F\u7528Fork\\Join\u7EBF\u7A0B\u6C60\u6267\u884C\u4EFB\u52A1\u5BF9\u8C61
                                                                      5. image-20210909175235649

                                                                        \u5982\u679C\u662F\u65E0\u53C2\u7684\uFF0C\u90A3\u4E48\u521B\u5EFA\u7684\u7EBF\u7A0B\u6570\u5C31\u7B49\u4E8ECPU\u6838\u5FC3\u6570

                                                                        \u54EA\u79CD\u7EBF\u7A0B\u6C60\u7528\u4EC0\u4E48\u65B9\u6CD5\u6765\u6267\u884C\u4EFB\u52A1\u8981\u641E\u6E05\u695A\u3002

                                                                        \u6BD4\u5982\u4EFB\u52A1\u8C03\u5EA6\u7EBF\u7A0B\u6C60\u7528\u7684schedule

                                                                        Fork\\Join\u7EBF\u7A0B\u6C60\u7528\u7684invoke

                                                                      6. Future\u662F\u4E00\u4E2A\u63A5\u53E3\uFF0CFutureTask\u662F\u5B9E\u73B0\u4E86RunnableFuture\u63A5\u53E3\u7684\u5B9E\u73B0\u7C7B\uFF0CRunnableFuture\u63A5\u53E3\u7EE7\u627F\u4E8EFuture\u63A5\u53E3\u548CRunnable\u63A5\u53E3

                                                                      \u5F02\u6B65\u6A21\u5F0F\u4E4B\u5DE5\u4F5C\u7EBF\u7A0B

                                                                      \u5B9A\u4E49

                                                                      1. \u8BA9\u6709\u9650\u7684\u8D44\u6E90\u5373\u5DE5\u4F5C\u7EBF\u7A0B\u5904\u7406\u65E0\u9650\u7684\u4EFB\u52A1\uFF0C\u5178\u578B\u5B9E\u73B0\u5C31\u662F\u7EBF\u7A0B\u6C60\u3002\u800C\u4E14\u4F7F\u7528\u7EBF\u7A0B\u6C60\u53EF\u4EE5\u505A\u5230\u5C06\u7EBF\u7A0B\u91CD\u590D\u4F7F\u7528\uFF0C\u4E5F\u4E0D\u7528\u6BCF\u6B21\u65B0\u5EFA\u7EBF\u7A0B\u6216\u9500\u6BC1\u7EBF\u7A0B\uFF0C\u63D0\u9AD8\u4E86\u6548\u7387\uFF0C\u8282\u7701\u4E86\u65F6\u95F4\u6210\u672C\u3002

                                                                        \u7EBF\u7A0B\u6C60\u53EF\u4EE5\u8BBE\u7F6E\u6700\u5927\u7EBF\u7A0B\u6570\u548C\u6838\u5FC3\u7EBF\u7A0B\u6570\uFF0C\u53EF\u4EE5\u901A\u8FC7\u6709\u9650\u7684\u7EBF\u7A0B\u5904\u7406\u65E0\u9650\u7684\u4EFB\u52A1\uFF0C\u4E00\u4E2A\u7EBF\u7A0B\u6267\u884C\u4E00\u4E2A\u4EFB\u52A1\u5BF9\u8C61\u5B8C\u6210\u4E4B\u540E\uFF0C\u5E76\u4E0D\u9500\u6BC1\uFF0C\u800C\u662F\u653E\u56DE\u5230\u7EBF\u7A0B\u6C60\u4E2D\uFF0C\u8FDB\u884C\u4E0B\u4E00\u4E2A\u4EFB\u52A1\u5BF9\u8C61\u7684\u6267\u884C\u3002

                                                                        \u4EFB\u52A1\u5BF9\u8C61\u9664\u4E86\u4E00\u8FDB\u6765\u5C31\u80FD\u591F\u88AB\u7EBF\u7A0B\u6267\u884C\u4EE5\u5916\uFF0C\u6CA1\u6709\u80FD\u88AB\u6267\u884C\u7684\u7EBF\u7A0B\u90FD\u653E\u8FDB\u7EBF\u7A0B\u963B\u585E\u961F\u5217\u4E2D\u3002

                                                                        \u4EFB\u52A1\u5BF9\u8C61\u51FA\u961F\u5217\uFF0C\u88AB\u7EBF\u7A0B\u6267\u884C\uFF0C\u662F\u8FD9\u79CD\u6D41\u7A0B\u3002

                                                                        \u81EA\u5B9A\u4E49\u7EBF\u7A0B\u6C60\u7684\u65F6\u5019\u5982\u679C\u5DF2\u6709\u7EBF\u7A0B\u6570\u5C0F\u4E8E\u6700\u5927\u7EBF\u7A0B\u6570\uFF0C\u90A3\u4E48\u5C31\u521B\u5EFA\u5DE5\u4F5C\u7EBF\u7A0B

                                                                      2. \u5BF9\u5E94\u4E8E\u4E00\u4E2A\u4E1A\u52A1\uFF0C\u4E5F\u53EF\u4EE5\u521B\u5EFA\u591A\u4E2A\u7EBF\u7A0B\u6C60\uFF0C\u4E0D\u662F\u53EA\u80FD\u6709\u4E00\u4E2A\u7EBF\u7A0B\u6C60\u3002

                                                                      \u9965\u997F\u73B0\u8C61

                                                                      1. \u7528\u56FA\u5B9A\u5927\u5C0F\u7684\u7EBF\u7A0B\u6C60\uFF0C\u4F1A\u6709\u9965\u997F\u73B0\u8C61\uFF0C\u7EBF\u7A0B\u6570\u4E0D\u8DB3\uFF0C\u5BFC\u81F4\u9965\u997F

                                                                        \u7528\u5E26\u7F13\u51B2\u7684\u7EBF\u7A0B\u6C60\uFF0C\u4E0D\u4F1A\u6709\u9965\u997F\u73B0\u8C61

                                                                        \u5355\u7EBF\u7A0B\u7EBF\u7A0B\u6C60\uFF0C\u4F1A\u6709\u9965\u997F\u73B0\u8C61\u3002

                                                                      2. \u5BF9\u4E8E\u4E0D\u540C\u7684\u5DE5\u4F5C\u4EFB\u52A1\uFF0C\u5E94\u8BE5\u4F7F\u7528\u4E0D\u540C\u7684\u7EBF\u7A0B\u6C60\uFF0C\u6765\u907F\u514D\u9965\u997F\u73B0\u8C61\u3002

                                                                        \u907F\u514D\u56E0\u4E3A\u591A\u4E2A\u7EBF\u7A0B\u90FD\u53BB\u6267\u884C\u4EFB\u52A1A\uFF0C\u800C\u6CA1\u6709\u7EBF\u7A0B\u53BB\u6267\u884C\u4EFB\u52A1B\uFF0C\u5982\u679C\u6309\u4EFB\u52A1\u6765\u5212\u5206\u4E86\u7EBF\u7A0B\u6C60\uFF0C\u90A3\u4E48\u5C31\u4E0D\u5B58\u5728\u6CA1\u6709\u7EBF\u7A0B\u53BB\u6267\u884C\u4EFB\u52A1B\u7684\u60C5\u51B5\u3002

                                                                        \u8FD9\u79CD\u65B9\u5F0F\u6BD4\u5355\u7EAF\u589E\u52A0\u7EBF\u7A0B\u6C60\u7684\u5BB9\u91CF\u66F4\u4E3A\u91CD\u8981

                                                                      3. \u7EBF\u7A0B\u6C60\u4E2D\u7684\u7EBF\u7A0B\u6570\u91CF\u8FC7\u5C0F\uFF0C\u53EF\u80FD\u4F1A\u5BFC\u81F4\u9965\u997F

                                                                        \u8FC7\u5927\u7684\u8BDD\u4F1A\u5BFC\u81F4\u66F4\u591A\u7684\u7EBF\u7A0B\u4EA7\u751F\u4E0A\u4E0B\u6587\u5207\u6362\uFF08\u4E0A\u4E0B\u6587\u5207\u6362\u5BF9\u4E8ECPU\u6765\u8BF4\u662F\u4E00\u79CD\u5F00\u9500\uFF09\uFF0C\u5E76\u4E14\u6D89\u53CA\u5230\u7CFB\u7EDF\u8D44\u6E90\u4E0D\u8DB3\u7684\u95EE\u9898\uFF0C\u7EBF\u7A0B\u8FC7\u591A\u4E5F\u53EF\u80FD\u4F1A\u53D1\u751FOOM

                                                                        • CPU\u5BC6\u96C6\u578B\u8FD0\u7B97

                                                                          \u901A\u5E38\u91C7\u7528cpu\u6838\u6570 + 1\uFF0C\u80FD\u591F\u5B9E\u73B0\u6700\u4F18\u7684CPU\u5229\u7528\u7387\u3002

                                                                          +1 \u4FDD\u8BC1\u5F53\u7EBF\u7A0B\u7531\u4E8E\u9875\u7F3A\u5931\u6545\u969C\u6216\u5176\u4ED6\u539F\u56E0\u5BFC\u81F4\u6682\u505C\u65F6\uFF0C\u989D\u5916\u7684\u8FD9\u4E2A\u7EBF\u7A0B\u80FD\u9876\u4E0A\u53BB\uFF0C\u4FDD\u8BC1CPU\u65F6\u949F\u5468\u671F\u4E0D\u88AB\u6D6A\u8D39\uFF0C\u4FDD\u8BC1CPU\u7684\u5229\u7528\u7387\u3002

                                                                        • IO\u5BC6\u96C6\u578B\u8FD0\u7B97

                                                                      JUC

                                                                      AQS\u539F\u7406

                                                                      1. \u5176\u4ED6\u7684\u5E76\u53D1\u5DE5\u5177\u90FD\u662F\u4F9D\u8D56\u4E8EAQS\u7684\uFF0C\u62BD\u8C61\u7684\u57FA\u4E8E\u961F\u5217\u7684\u540C\u6B65\u5668\u3002\u662F\u963B\u585E\u5F0F\u9501\u548C\u76F8\u5173\u7684\u540C\u6B65\u5668\u5DE5\u5177\u7684\u6846\u67B6

                                                                        Synchronized\u9501\u5C31\u662F\u963B\u585E\u5F0F\u7684\u9501\uFF0CCAS+volatile\u5C31\u662F\u5B9E\u73B0\u7684\u65E0\u9501\u5E76\u53D1\uFF0C\u662F\u4E50\u89C2\u9501\uFF0C\u7EBF\u7A0B\u4E0D\u963B\u585E\u3002

                                                                        \u4F46\u662FAQS\u5E76\u4E0D\u662FSynchronized\u7684\u539F\u7406\uFF0C\u800C\u662FReentrantLock\u7684\u5B9E\u73B0\u539F\u7406\uFF0CReentrantLock\u662F\u963B\u585E\u5F0F\u9501

                                                                        Synchronized\u7684\u5B9E\u73B0\u539F\u7406\u662FMonitor\uFF0C\u662FJVM\u5C42\u9762\u7684\uFF0C\u5E95\u5C42\u662F\u7528C++\u6765\u5B9E\u73B0\u7684\u3002

                                                                      2. AQS ---- AbstractQueuedSynchronizer\uFF0C\u662F\u4E00\u4E2A\u62BD\u8C61\u7C7B\uFF0C\u62BD\u8C61\u7684\u57FA\u4E8E\u961F\u5217\u7684\u540C\u6B65\u5668

                                                                      3. AQS\u7684\u4F7F\u7528\u65B9\u5F0F\u901A\u5E38\u90FD\u662F\u901A\u8FC7\u5185\u90E8\u7C7B\u7EE7\u627FAQS\u5B9E\u73B0\u540C\u6B65\u529F\u80FD\uFF0CAQS\u662F\u5F88\u591A\u540C\u6B65\u5668\u7684\u57FA\u7840\u6846\u67B6\uFF0C\u6211\u4EEC\u8FD8\u53EF\u4EE5\u57FA\u4E8EAQS\uFF0C\u5B9A\u5236\u51FA\u6211\u4EEC\u6240\u9700\u8981\u7684\u540C\u6B65\u5668

                                                                      4. \u5728AQS\u5185\u90E8\uFF0C\u901A\u8FC7\u7EF4\u62A4\u4E00\u4E2AFIFO\u961F\u5217\uFF0C\u6765\u7BA1\u7406\u591A\u7EBF\u7A0B\u7684\u6392\u961F\u5DE5\u4F5C\uFF0C\u5728\u516C\u5E73\u7ADE\u4E89\u7684\u60C5\u51B5\u4E0B\uFF0C\u65E0\u6CD5\u83B7\u53D6\u9501\u7684\u7EBF\u7A0B\u4F1A\u88AB\u5C01\u88C5\u6210\u4E00\u4E2A\u8282\u70B9\uFF0C\u7F6E\u4E8EAQS\u961F\u5217\u5C3E\u90E8\uFF0C\u5165\u961F\u7684\u7EBF\u7A0B\u901A\u8FC7\u81EA\u65CB\u7684\u65B9\u5F0F\u83B7\u53D6\u9501\uFF0C\u82E5\u5728\u6709\u9650\u6B21\u7684\u5C1D\u8BD5\u540E\uFF0C\u4ECD\u672A\u83B7\u53D6\u6210\u529F\uFF0C\u7EBF\u7A0B\u4F1A\u88AB\u963B\u585E\u4F4F\uFF0C\u540E\u9762\u6709\u5177\u4F53\u7684\u8FC7\u7A0B\u8BF4\u660E

                                                                      5. state\u5C5E\u6027\uFF0C\u8868\u793A\u8D44\u6E90\u7684\u72B6\u6001

                                                                        • \u72EC\u5360\u6A21\u5F0F---\u53EA\u6709\u4E00\u4E2A\u7EBF\u7A0B\u80FD\u591F\u8BBF\u95EE\u8D44\u6E90\uFF0C\u6BD4\u5982\u4E4B\u524D\u7684\u76D1\u89C6\u5668\u9501\u4F7F\u67D0\u4E00\u4E2A\u65F6\u95F4\u6BB5\u53EA\u6709\u4E00\u4E2A\u7EBF\u7A0B\u80FD\u591F\u8BBF\u95EE\u8D44\u6E90

                                                                        • \u5171\u4EAB\u6A21\u5F0F----\u5141\u8BB8\u591A\u4E2A\u7EBF\u7A0B\u8BBF\u95EE\u8D44\u6E90\uFF0C\u4F46\u662F\u6709\u4E0A\u9650

                                                                          \u5B50\u7C7B\u9700\u8981\u5B9A\u4E49\u5982\u4F55\u7EF4\u62A4\u8FD9\u4E2A\u72B6\u6001\uFF0C\u63A7\u5236\u5982\u4F55\u83B7\u53D6\u9501\u548C\u91CA\u653E\u9501

                                                                      image-20210909190349224

                                                                      \u200B \u7528cas\u4FEE\u6539state\u72B6\u6001\uFF0C\u4FDD\u8BC1\u4E86\u4FEE\u6539state\u72B6\u6001\u8FD9\u4E2A\u8FC7\u7A0B\u662F\u539F\u5B50\u6027\u7684\u3002

                                                                      1. \u63D0\u4F9B\u4E86\u57FA\u4E8EFIFO\u7684\u7B49\u5F85\u961F\u5217\uFF0C\u7C7B\u4F3C\u4E8EMonitor\u7684EntryList\uFF0CMonitor\u662F\u64CD\u4F5C\u7CFB\u7EDF\u5C42\u9762\u7684\uFF0C\u6216\u8005\u8BF4\u662FJVM\u5C42\u9762\u7684\uFF0CEntryList\u662F\u7528C++\u6765\u5B9E\u73B0\u7684\uFF0C\u800CAQS\u662F\u7EAFJava\u5B9E\u73B0\u7684\u3002

                                                                      2. ReentrantLock\u662FJava\u5C42\u9762\u7684\u9501

                                                                      3. \u6761\u4EF6\u53D8\u91CF\u6765\u5B9E\u73B0\u7B49\u5F85\u3001\u5524\u9192\u673A\u5236\uFF0C\u652F\u6301\u591A\u4E2A\u6761\u4EF6\u53D8\u91CF\uFF0C\u7C7B\u4F3C\u4E8EMonitor\u7684WaitSet

                                                                      4. Lock\u662F\u4E00\u4E2A\u63A5\u53E3\uFF0CReentrantLock\u662F\u4E00\u4E2ALock\u63A5\u53E3\u7684\u5B9E\u73B0\u7C7B\u3002

                                                                      5. \u5B50\u7C7B\uFF08\u7EE7\u627F\u4E8EAbstractQueuedSynchronizer\uFF09\u4E3B\u8981\u5B9E\u73B0\u8FD9\u6837\u4E00\u4E9B\u65B9\u6CD5\uFF08\u9ED8\u8BA4\u629B\u51FAUnsupportedOperationException\uFF09

                                                                        • tryAcquire
                                                                        • tryRelease
                                                                        • tryAcquireShared
                                                                        • tryRealeaseShared
                                                                        • isHeldExclusively

                                                                        image-20210909191200097

                                                                        image-20210909191210548

                                                                        \u81EA\u5B9A\u4E49\u9501\u6216ReentrantLock\u91CC\u5B9A\u4E49\u7684\u4E0A\u9501\u3001\u4E0A\u9501\u5E26\u8D85\u65F6\u3001\u4E0A\u9501\u53EF\u6253\u65AD\u3001\u5C1D\u8BD5\u4E0A\u9501\u3001\u89E3\u9501\u3001\u591A\u4E2A\u6761\u4EF6\u53D8\u91CF\u7B49\u65B9\u6CD5\u90FD\u662F\u901A\u8FC7\u8C03\u7528\u7EE7\u627F\u4E8EAQS\u7684\u5B50\u7C7B\u5B9A\u4E49\u7684\u65B9\u6CD5\u3002

                                                                      ReentrantLock\u539F\u7406

                                                                      1. image-20210909194450657
                                                                      2. ReentrantLock\u5B9E\u73B0\u4E86Lock\u63A5\u53E3\uFF0C\u5185\u90E8\u4E5F\u7EF4\u62A4\u4E86\u7EE7\u627F\u4E8EAQS\u7684\u540C\u6B65\u5668Sync\uFF0C\u4E0D\u8FC7\u8FD9\u4E2A\u540C\u6B65\u5668Sync\u662F\u62BD\u8C61\u7684\uFF0C\u8FD8\u6709\u4E24\u4E2A\u7EE7\u627F
                                                                        • NonfairSync -- \u975E\u516C\u5E73\u9501
                                                                        • FairSync -- \u516C\u5E73\u9501

                                                                      \u975E\u516C\u5E73\u9501\u5B9E\u73B0\u539F\u7406

                                                                      1. \u6784\u9020\u5668\uFF1A

                                                                        \u9ED8\u8BA4\u901A\u8FC7\u975E\u516C\u5E73\u9501\u6765\u5B9E\u73B0\u5185\u90E8\u7EF4\u62A4\u7684Sync\u62BD\u8C61\u7C7B

                                                                        image-20210909194836695

                                                                      2. NonfairSync\u8FD9\u4E2A\u7C7B\u7EE7\u627F\u4E8ESync\uFF08ReentrantLock\u5185\u90E8\u7684\u62BD\u8C61\u7C7B\uFF09

                                                                      3. \u539F\u7406\uFF1A

                                                                        1. \u6CA1\u6709\u7ADE\u4E89\u65F6\uFF0CThread-0\u6210\u4E3A\u975E\u516C\u5E73\u9501\u7684Owner

                                                                          image-20210909201243193

                                                                        2. \u7B2C\u4E00\u4E2A\u7ADE\u4E89\u51FA\u73B0\u65F6\uFF0C\u9996\u5148\u5C1D\u8BD5CAS\uFF0C\u60F3\u8981\u901A\u8FC7CAS\u5C06state\u7F6E\u4E3A1\uFF0C\u4F46\u662F\u76EE\u524Dstate\u5DF2\u662F1\uFF0C\u800C\u8FD9\u6B21\u8C03\u7528cas\u7684\u53C2\u6570\u662F\u671F\u671B\u503C\uFF1A0\uFF0C\u66F4\u65B0\u503C\uFF1A1.

                                                                          \u6240\u4EE5\u671F\u671B\u503C\u548C\u5F53\u524D\u5BF9\u8C61\u7684state\u5C5E\u6027\u4E0D\u4E00\u6837\uFF0C\u66F4\u65B0\u5931\u8D25\uFF0C\u8FDB\u5165accquire

                                                                          image-20210909201251908

                                                                          image-20210909203507236

                                                                        3. \u8FDB\u5165accquire\u65B9\u6CD5\u4E4B\u540E\uFF0C\u9996\u5148\u4F1A\u518D\u6B21\u5C1D\u8BD5\uFF0C\u4F1A\u8FDB\u884CtryAccquire\uFF0C\u8FD9\u65F6state\u5DF2\u662F1\uFF0C\u7ED3\u679C\u4ECD\u7136\u662Ffalse

                                                                          \u7136\u540E\u8FDB\u5165addWaiter\u903B\u8F91

                                                                          • \u5982\u679C\u662F\u975E\u516C\u5E73\u9501\uFF0C\u90A3\u4E48\u8FDB\u5165tryAccquire\uFF0C\u4F1A\u62A2\u5360\u9501\uFF0C\u62A2\u5360\u9501\u5931\u8D25\uFF0C\u624D\u4F1A\u5C01\u88C5\u6210\u8282\u70B9\u5165AQS\u961F\u5217
                                                                          • \u516C\u5E73\u9501\u7684tryAccquire\u6BD4\u975E\u516C\u5E73\u9501\u591A\u4E86\u4E00\u4E2A\u6761\u4EF6\uFF0C\u5373!hasQueuedPredecessors()\uFF0C\u68C0\u67E5AQS\u961F\u5217\u91CC\u662F\u5426\u6709\u7B49\u5F85\u65F6\u95F4\u66F4\u957F\u7684\u7EBF\u7A0B\u8282\u70B9
                                                                        4. \u8FDB\u5165addWaiter\u903B\u8F91\uFF0C\u6784\u9020Node\u961F\u5217

                                                                          image-20210909203742017

                                                                          \u7B2C\u4E00\u4E2ANode\u79F0\u4E3A\u54D1\u5143\u6216\u54E8\u5175\uFF0C\u7528\u6765\u7AD9\u4F4D\uFF0C\u5E76\u4E0D\u5173\u8054\u7EBF\u7A0B\u3002

                                                                          Node\u961F\u5217\u5E95\u5C42\u662F\u901A\u8FC7\u53CC\u5411\u94FE\u8868\u5B9E\u73B0

                                                                        5. AQS\u7EF4\u62A4\u7684\u7EBF\u7A0B\u8282\u70B9\u540C\u6B65\u7B49\u5F85\u961F\u5217\u4E2D\uFF0C\u5934\u8282\u70B9\u662F\u6210\u529F\u83B7\u53D6\u5230\u540C\u6B65\u72B6\u6001\u7684\u8282\u70B9\u3002

                                                                        6. \u53EA\u6709\u524D\u9A71\u8282\u70B9\u662F\u5934\u8282\u70B9\u7684\u7EBF\u7A0B\u8282\u70B9\u624D\u80FD\u591F\u5C1D\u8BD5\u83B7\u53D6\u540C\u6B65\u72B6\u6001\u3002

                                                                          \u5982\u679C\u975E\u9996\u8282\u70B9\u7EBF\u7A0B\u524D\u9A71\u8282\u70B9\u51FA\u961F\u6216\u8005\u88AB\u4E2D\u65AD\uFF0C\u5219\u68C0\u67E5\u81EA\u5DF1\u7684\u524D\u9A71\u8282\u70B9\u662F\u5426\u662F\u5934\u8282\u70B9\uFF0C\u5982\u679C\u662F\u5219\u5C1D\u8BD5\u83B7\u53D6\u540C\u6B65\u72B6\u6001\uFF0C\u5982\u679C\u4E0D\u662F\u5F53\u524D\u7EBF\u7A0B\u8282\u70B9\u5219\u963B\u585E\uFF08park\uFF09\u3002\u53EF\u4EE5\u8BF4\u662F\u963B\u585E\uFF0C\u4E5F\u53EF\u4EE5\u8BF4\u662F\u8FDB\u5165\u7B49\u5F85\u72B6\u6001\u3002

                                                                        7. \u7136\u540E\u8FDB\u5165acquireQueued\u903B\u8F91

                                                                          • acquireQueued\u4F1A\u5728\u4E00\u4E2A\u5FAA\u73AF\u4E2D\u4E0D\u65AD\u5C1D\u8BD5\u83B7\u5F97\u9501\uFF0C\u5931\u8D25\u540E\u8FDB\u5165park\u963B\u585E

                                                                          • \u5982\u679C\u5F53\u524DNode\u662F\u7B2C\u4E8C\u4F4D\uFF0C\u90A3\u4E48\u518D\u6B21tryAcquire\u5C1D\u8BD5\u83B7\u53D6\u9501\uFF0Cstate\u4ECD\u662F1\uFF0C\u5931\u8D25

                                                                          • \u8FDB\u5165shouldParkAfterFailedAcquire\u903B\u8F91\uFF0C\u5C06\u524D\u9A71node\u5373head\u7684waitStatus\u6539\u4E3A-1\uFF0C\u8FD9\u6B21\u8FD4\u56DEfalse

                                                                            image-20210909204148130

                                                                          • shouldParkAfterFailedAcquire\u6267\u884C\u5B8C\u6BD5\u540E\uFF0C\u56DE\u5230acquireQueued\uFF0C\u518D\u6B21tryAcquire\u5C1D\u8BD5\u83B7\u53D6\u9501\uFF0C\u5F53\u7136\u8FD9\u65F6state\u4ECD\u4E3A1\uFF0C\u5931\u8D25

                                                                          • \u5F53\u518D\u6B21\u8FDB\u5165shouldParkAfterFailedAcquire\u65F6\uFF0C\u8FD9\u65F6\u56E0\u4E3A\u524D\u9A71node\u7684waitStatus\u5DF2\u7ECF\u662F-1\uFF0C\u8FD9\u6B21\u8FD4\u56DEtrue

                                                                          • \u8FDB\u5165parkAndCheckInterrupt\uFF0C\u8FDB\u5165\u963B\u585E\u6001\u3002

                                                                            image-20210909204356085

                                                                            \u53EF\u4EE5\u53D1\u73B0\u9664\u4E86\u6700\u540E\u4E00\u4E2Anode\uFF0C\u524D\u9762\u7684node\u7684waitStatus\u90FD\u88AB\u6539\u6210\u4E86-1\uFF0C\u6BCF\u4E2Anode\u90FD\u5E94\u8BE5\u7531\u4E0A\u4E00\u4E2A\u8282\u70B9\u5524\u9192\u3002

                                                                            -1\u8868\u793A-1\u7684node\u6709\u8D23\u4EFB\u5524\u9192\u540E\u7EE7\u8282\u70B9

                                                                        8. Thread-0 \u91CA\u653E\u9501\uFF0C\u8FDB\u5165tryRelease\u6D41\u7A0B\uFF0C\u5982\u679C\u6210\u529F

                                                                          • \u8BBE\u7F6EexclusiveOwnerThread \u4E3Anull
                                                                          • state = 0
                                                                        9. \u5F53\u524DNode\u961F\u5217\u4E0D\u4E3Anull\uFF0C\u5E76\u4E14head\u7684waitStatus = -1\uFF0C\u8FDB\u5165unparkSuccessor\u6D41\u7A0B

                                                                          \u627E\u5230\u961F\u5217\u4E2D\u79BBhead\u6700\u8FD1\u7684\u4E00\u4E2ANode\uFF0Cunpark\u6062\u590D\u5176\u8FD0\u884C\uFF0C\u672C\u4F8B\u4E2D\u5373\u4E3AThread-1

                                                                          • head\u6307\u5411Thread-1\u6240\u5728Node
                                                                          • \u539F\u672C\u7684head Node\u4ECE\u94FE\u8868\u65AD\u5F00\uFF0C\u88AB\u5783\u573E\u56DE\u6536\u5668\u56DE\u6536
                                                                        10. \u8FD9\u65F6\u5019\u5982\u679C\u6709\u5176\u4ED6\u7EBF\u7A0B\u6765\u7ADE\u4E89\uFF08\u975E\u516C\u5E73\u7684\u4F53\u73B0\uFF09\uFF0C\u6BD4\u5982Thread-4

                                                                          \u8FD9\u4E2AThread-4\u53EF\u4EE5\u548CThread-1\u7ADE\u4E89\uFF0C\u53EF\u80FDThread-1\u7ADE\u4E89\u9501\u53C8\u5931\u8D25\u4E86\u3002

                                                                        11. \u975E\u516C\u5E73\u7684\u610F\u601D\u5C31\u662F\u8BF4\uFF0C\u5373\u4F7F\u6392\u5728Node\u961F\u5217\uFF08\u53CC\u5411\u94FE\u8868\uFF09\u7684\u5934\u4F4D\uFF0C\u4ECD\u7136\u6709\u53EF\u80FD\u4E0D\u4F1A\u83B7\u5F97\u9501

                                                                      \u53EF\u91CD\u5165\u539F\u7406

                                                                      1. \u5982\u679C\u9501\u91CD\u5165\uFF0C\u8BA9state++\uFF0C\u8BF4\u660E\u540C\u4E00\u7EBF\u7A0B\u83B7\u5F97\u4E86\u591A\u6B21\u9501
                                                                      2. \u91CA\u653E\u9501\u7684\u65F6\u5019\uFF0C\u4E5F\u8981\u8BA9state\u51CF1\uFF08\u81EA\u51CF\uFF09\uFF0C\u53EA\u6709state\u51CF\u4E3A0\uFF0C\u624D\u91CA\u653E\u6210\u529F\u3002

                                                                      \u53EF\u6253\u65AD\u539F\u7406

                                                                      1. ReentrantLock\u9ED8\u8BA4\u662F\u4E0D\u53EF\u6253\u65AD\u7684
                                                                      2. \u53EF\u6253\u65AD\uFF0C\u5728park\u8FC7\u7A0B\u4E2D\u5982\u679C\u88AB\u6253\u65AD\uFF0C\u91C7\u7528\u4E86\u629B\u51FA\u5F02\u5E38\u7684\u65B9\u5F0F\uFF0C\u4E0D\u4F1A\u518D\u6B21\u8FDB\u5165for(;;)\u53BB\u7ADE\u4E89\u9501

                                                                      \u516C\u5E73\u9501\u539F\u7406

                                                                      1. \u975E\u516C\u5E73\u9501\u53EA\u4F1A\u68C0\u67E5state\uFF0C\u4E0D\u4F1A\u68C0\u67E5AQS\u7B49\u5F85\u961F\u5217\uFF08\u5728\u6E90\u7801\u4E2D\u53EF\u4EE5\u53D1\u73B0\u53EA\u68C0\u67E5\u4E86state\uFF0C\u6CA1\u6709\u505AAQS\u961F\u5217\u7684\u5224\u65AD\uFF09\uFF0C\u4E0D\u4F1A\u7BA1\u662F\u5426\u6709\u7EBF\u7A0B\u5BF9\u5E94\u7684\u8282\u70B9\u5728AQS\u961F\u5217\u4E2D\u7B49\u5F85\uFF0C\u4E0D\u4F1A\u7BA1AQS\u7B49\u5F85\u961F\u5217\uFF0C\u76F4\u63A5\u5C31\u53BB\u7ADE\u4E89

                                                                        \u5373\u4F7F\u67D0\u4E2A\u7EBF\u7A0B\u5BF9\u5E94\u7684\u8282\u70B9\u5728AQS\u7B49\u5F85\u961F\u5217\u7684\u7D27\u63A5\u7740\u5360\u4F4D\u8282\u70B9\u7684\u4E0B\u4E00\u4E2A\u8282\u70B9\uFF0C\u4E5F\u4E0D\u4E00\u5B9A\u4F1A\u6210\u529F\u7ADE\u4E89\u5230\u9501

                                                                      2. \u800C\u516C\u5E73\u9501\u4F1A\u68C0\u67E5AQS\u961F\u5217\u4E2D\u662F\u5426\u6709\u524D\u9A71\u8282\u70B9\uFF0C\u6CA1\u6709\u524D\u9A71\u8282\u70B9\uFF0C\u624D\u53BB\u7ADE\u4E89\u3002

                                                                        \u5982\u679C\u6709\u524D\u9A71\u8282\u70B9\uFF0C\u8BE5\u7EBF\u7A0B\u90FD\u4E0D\u4F1A\u53BB\u6267\u884Ccas\uFF0C\u90FD\u4E0D\u4F1A\u53BB\u6BD4\u8F83state\u3002

                                                                      \u6761\u4EF6\u53D8\u91CF\u5B9E\u73B0\u539F\u7406

                                                                      1. \u6BCF\u4E2A\u6761\u4EF6\u53D8\u91CF\u5BF9\u5E94\u4E8E\u4E00\u4E2AConditionObject

                                                                        ConditionObject\u4E5F\u7EF4\u62A4\u4E86\u4E00\u4E2A\u53CC\u5411\u94FE\u8868\uFF0C\u4F5C\u4E3A\u90A3\u4E9B\u4E0D\u6EE1\u8DB3\u6761\u4EF6\uFF0C\u9700\u8981\u4F11\u606F\u7684\u7EBF\u7A0B

                                                                      2. await\u6D41\u7A0B

                                                                        1. \u8C03\u7528await\u4E4B\u524D\uFF0C\u5FC5\u987B\u62E5\u6709\u9501\u624D\u6709\u8D44\u683C\u8C03\u7528

                                                                          await\u65B9\u6CD5\u662FConditionObject\u7684\u65B9\u6CD5\u800C\u4E0D\u662FLock\u7684\u65B9\u6CD5

                                                                        2. \u5F00\u59CBThread-0\u6301\u6709\u9501\uFF0C\u6709\u8D44\u683C\u8C03\u7528await\uFF0C\u7136\u540E\u8C03\u7528await()\uFF0C\u8FDB\u5165ConditionObject\u7684addConditionWaiter\u6D41\u7A0B

                                                                          \u521B\u5EFA\u65B0\u7684Node\u72B6\u6001\u4E3A-2\u7684\u8282\u70B9\uFF0C\u5173\u8054Thread-0\uFF0C\u52A0\u5165\u7B49\u5F85\u961F\u5217\u5C3E\u90E8

                                                                          image-20210909220203679

                                                                        3. \u63A5\u4E0B\u6765\u8FDB\u5165AQS\u7684fullRelease()\u6D41\u7A0B\uFF0C\u91CA\u653E\u540C\u6B65\u76D1\u89C6\u5668\u4E0A\u7684\u9501

                                                                          image-20210909220242221

                                                                        4. unpark AQS\u961F\u5217\u4E2D\u7684\u4E0B\u4E00\u4E2A\u8282\u70B9\uFF0C\u7ADE\u4E89\u9501\uFF0C\u7D27\u63A5\u7740\u5360\u4F4D\u8282\u70B9\u4E4B\u540E\u7684\u90A3\u4E2A\u8282\u70B9\u5BF9\u5E94\u7684\u7EBF\u7A0B\u7ADE\u4E89\u6210\u529F\uFF08\u5982\u679C\u662F\u975E\u516C\u5E73\u9501\u7684\u673A\u5236\uFF0C\u4F46\u662F\u6CA1\u6709\u5176\u4ED6\u7EBF\u7A0B\u6765\u7ADE\u4E89\u7684\u60C5\u51B5\uFF0C\u6216\u8005\u662F\u516C\u5E73\u9501\u7684\u673A\u5236\uFF09

                                                                          image-20210909220502184

                                                                          Thread-1\u8282\u70B9\u7684\u524D\u4E00\u4E2A\u8282\u70B9\uFF08\u5360\u4F4D\u8282\u70B9\uFF09\u8981\u65AD\u5F00\uFF0C\u7136\u540Ehead\u8981\u6307\u5411\u65B0\u7684\u8282\u70B9\u5373\u539F\u5360\u4F4D\u8282\u70B9\u7684\u4E0B\u4E00\u4E2A\u8282\u70B9\u6210\u4E3A\u65B0\u7684\u5360\u4F4D\u8282\u70B9\uFF0C\u4E0B\u4E00\u4E2A\u7ADE\u4E89\u9501\u7684\u8282\u70B9\u5C31\u662F\u5F53\u524Dhead\u8282\u70B9\u7684\u4E0B\u4E00\u4E2A\u8282\u70B9\u3002\u5728\u56FE\u4E2D\u5373Thread-2

                                                                        5. \u5728ConditionObject\u7B49\u5F85\u961F\u5217\u7684\u7EBF\u7A0B\u8282\u70B9\u963B\u585E

                                                                          image-20210909220707854

                                                                      3. AQS\u961F\u5217\u548CConditionObject\u7B49\u5F85\u961F\u5217\u7684\u7EBF\u7A0B\u6700\u540E\u963B\u585E\uFF0C\u90FD\u662F\u901A\u8FC7\u8C03\u7528park()\u963B\u585E\u7684

                                                                      4. signal\u6D41\u7A0B

                                                                        1. \u5047\u8BBE\u73B0\u5728\u5360\u6709\u9501\u7684Thread-1\u8981\u6765\u5524\u9192ConditionObject\u7B49\u5F85\u961F\u5217\u4E2D\u7684\u7EBF\u7A0B\uFF0C\u90A3\u4E48Thread-1\u8981\u5524\u9192\u7B49\u5F85\u961F\u5217\u4E2D\u7684Thread-0

                                                                        2. \u8FDB\u5165ConditionObject\u7684doSignal\u6D41\u7A0B\uFF0C\u53D6\u5F97\u7B49\u5F85\u961F\u5217\u4E2D\u7B2C\u4E00\u4E2ANode\uFF0C\u5373Thread-0\u6240\u5728Node

                                                                          image-20210910125940213

                                                                        3. \u6267\u884CTransferForSignal\u6D41\u7A0B\uFF0C\u5C06\u7B49\u5F85\u961F\u5217\u4E2D\u53D6\u5F97\u7684Node\uFF0C\u52A0\u5165AQS\u961F\u5217\u5C3E\u90E8\uFF0C\u5C06Thread-0\u7684\u72B6\u6001\u7531-2\u6539\u4E3A0\uFF0C\u5C06AQS\u961F\u5217\u4E2D\uFF0CThread-0\u7684\u524D\u4E00\u4E2A\u7EBF\u7A0B\u8282\u70B9\u7684\u72B6\u6001\u6539\u4E3A-1\uFF0C\u8868\u793A\u524D\u4E00\u4E2A\u7EBF\u7A0B\u6709\u8D44\u683C\u5524\u9192Thread-0\u8FD9\u4E2A\u7EBF\u7A0B

                                                                          image-20210910125952369

                                                                        4. \u73B0\u5728\u5360\u6709\u9501\u7684Thread-1\u91CA\u653E\u9501\uFF0C\u8FDB\u5165unlock\u6D41\u7A0B

                                                                      \u516C\u5E73\u4E0E\u975E\u516C\u5E73

                                                                      1. \u516C\u5E73\u4E0E\u975E\u516C\u5E73\u6307\u7684\u662F\u7EBF\u7A0B\u83B7\u53D6\u9501\u7684\u65B9\u5F0F\u3002\u516C\u5E73\u6A21\u5F0F\u4E0B\uFF0C\u7EBF\u7A0B\u5728\u540C\u6B65\u961F\u5217\u4E2D\u901A\u8FC7 FIFO \u7684\u65B9\u5F0F\u83B7\u53D6\u9501\uFF0C\u6BCF\u4E2A\u7EBF\u7A0B\u6700\u7EC8\u90FD\u80FD\u83B7\u53D6\u9501\u3002\u5728\u975E\u516C\u5E73\u6A21\u5F0F\u4E0B\uFF0C\u7EBF\u7A0B\u4F1A\u901A\u8FC7\u201C\u63D2\u961F\u201D\u7684\u65B9\u5F0F\u53BB\u62A2\u5360\u9501\uFF08\u4E5F\u5C31\u662F\u961F\u5217\u5185\u7684\u7EBF\u7A0B\u5C01\u88C5\u6210\u7684\u8282\u70B9\uFF0C\u5C31\u53EF\u4EE5\u7406\u89E3\u4E3A\u7EBF\u7A0B\uFF0C\u662F\u6309\u7167\u961F\u5217FIFO\u987A\u5E8F\u83B7\u5F97\u9501\u7684\uFF0C\u4F46\u662F\u961F\u5217\u5916\u7684\u7EBF\u7A0B\uFF0C\u5C31\u770B\u5B83\u662F\u5426\u68C0\u67E5\u8FD9\u4E2AAQS\u961F\u5217\u4E86\uFF0C\u5982\u679C\u4E0D\u68C0\u67E5\uFF0C\u5C31\u662F\u975E\u516C\u5E73\u6A21\u5F0F\uFF0C\u961F\u5217\u5916\u7684\u7EBF\u7A0B\u5C31\u53EF\u4EE5\u63D2\u961F\u3002\uFF09\uFF0C\u62A2\u4E0D\u5230\u7684\u5219\u8FDB\u5165\u540C\u6B65\u961F\u5217\u8FDB\u884C\u6392\u961F\u3002\u9ED8\u8BA4\u60C5\u51B5\u4E0B\uFF0CReentrantLock \u4F7F\u7528\u7684\u662F\u975E\u516C\u5E73\u6A21\u5F0F\u83B7\u53D6\u9501\uFF0C\u800C\u4E0D\u662F\u516C\u5E73\u6A21\u5F0F\u3002\u4E0D\u8FC7\u6211\u4EEC\u4E5F\u53EF\u901A\u8FC7 ReentrantLock \u6784\u9020\u65B9\u6CD5ReentrantLock(boolean fair)\u8C03\u6574\u52A0\u9501\u7684\u6A21\u5F0F\u3002

                                                                      2. \u516C\u5E73\u4E0E\u975E\u516C\u5E73\u9501\u7684\u4F18\u7F3A\u70B9\uFF1A

                                                                        \u516C\u5E73\u6A21\u5F0F\u4E0B\uFF0C\u53EF\u4FDD\u8BC1\u6BCF\u4E2A\u7EBF\u7A0B\u6700\u7EC8\u90FD\u80FD\u83B7\u5F97\u9501\uFF0C\u4F46\u6548\u7387\u76F8\u5BF9\u6BD4\u8F83\u8F83\u4F4E\uFF0C\u53EF\u4EE5\u89E3\u51B3\u9965\u997F\u95EE\u9898\u3002

                                                                        \u975E\u516C\u5E73\u6A21\u5F0F\u4E0B\uFF0C\u6548\u7387\u6BD4\u8F83\u9AD8\uFF0C\u4F46\u53EF\u80FD\u4F1A\u5BFC\u81F4\u7EBF\u7A0B\u51FA\u73B0\u9965\u997F\u7684\u60C5\u51B5\u3002\u5373\u4F7F\u51FA\u73B0\u9965\u997F\uFF0C\u4E5F\u5F88\u5C11\u4F7F\u7528\u4FEE\u6539\u4E3A\u516C\u5E73\u9501\u7684\u65B9\u5F0F\u89E3\u51B3\uFF0C\u800C\u901A\u8FC7tryLock()\u7684\u65B9\u5F0F\u89E3\u51B3

                                                                      3. \u4E3A\u5565\u975E\u516C\u5E73\u6A21\u5F0F\u62A2\u4E86\u5176\u4ED6\u7EBF\u7A0B\u83B7\u53D6\u9501\u7684\u673A\u4F1A\uFF0C\u800C\u6574\u4E2A\u7A0B\u5E8F\u7684\u8FD0\u884C\u6548\u7387\u4F1A\u66F4\u9AD8\u5462\uFF1F

                                                                        \u5728\u6FC0\u70C8\u7ADE\u4E89\u7684\u60C5\u51B5\u4E0B\uFF0C\u975E\u516C\u5E73\u9501\u7684\u6027\u80FD\u9AD8\u4E8E\u516C\u5E73\u9501\u7684\u6027\u80FD\u7684\u4E00\u4E2A\u539F\u56E0\u662F\uFF1A\u5728\u6062\u590D\u4E00\u4E2A\u88AB\u6302\u8D77\u7684\u7EBF\u7A0B\u4E0E\u8BE5\u7EBF\u7A0B\u771F\u6B63\u5F00\u59CB\u8FD0\u884C\u4E4B\u95F4\u5B58\u5728\u7740\u4E25\u91CD\u7684\u5EF6\u8FDF\u3002\u4E0E\u6B64\u540C\u65F6\uFF0C\u5982\u679C C \u4E5F\u8BF7\u6C42\u8FD9\u4E2A\u9501\uFF0C\u90A3\u4E48 C \u5F88\u6709\u53EF\u80FD\u4F1A\u5728 B \u88AB\u5B8C\u5168\u5524\u9192\u524D\u83B7\u5F97\u3001\u4F7F\u7528\u4EE5\u53CA\u91CA\u653E\u8FD9\u4E2A\u9501\u3002\u8FD9\u6837\u7684\u60C5\u51B5\u65F6\u4E00\u79CD\u201C\u53CC\u8D62\u201D\u7684\u5C40\u9762\uFF1AB \u83B7\u5F97\u9501\u7684\u65F6\u523B\u5E76\u6CA1\u6709\u63A8\u8FDF\uFF0CC \u66F4\u65E9\u7684\u83B7\u5F97\u4E86\u9501\uFF0C\u5E76\u4E14\u541E\u5410\u91CF\u4E5F\u83B7\u5F97\u4E86\u63D0\u9AD8\u3002\uFF08\u541E\u5410\u91CF\u662F\u6307\u7528\u6237\u7EBF\u7A0B\u6267\u884C\u65F6\u95F4\u5360\u6BD4\uFF0C\u5176\u4ED6\u65F6\u95F4\u6709\u5783\u573E\u56DE\u6536\u65F6\u95F4\uFF0C\u7EBF\u7A0B\u4E0A\u4E0B\u6587\u5207\u6362\u6D88\u8017\u7B49\uFF09

                                                                        image-20210910183523679

                                                                      4. AQS \u7EF4\u62A4\u4E86\u4E00\u4E2A\u57FA\u4E8E\u53CC\u5411\u94FE\u8868\u7684\u540C\u6B65\u961F\u5217\uFF0C\u7EBF\u7A0B\u5728\u83B7\u53D6\u540C\u6B65\u72B6\u6001\u5931\u8D25\u7684\u60C5\u51B5\u4E0B\uFF0C\u90FD\u4F1A\u88AB\u5C01\u88C5\u6210\u8282\u70B9\uFF0C\u7136\u540E\u52A0\u5165\u961F\u5217\u4E2D\u3002\u52A0\u5165\u8FD9\u4E2A\u961F\u5217\u4E2D\uFF0C\u4E0D\u4EE3\u8868\u7EBF\u7A0B\u5C01\u88C5\u6210\u7684\u8282\u70B9\u963B\u585E\u4E86\uFF0C\u52A0\u5165\u8FD9\u4E2A\u961F\u5217\uFF0C\u8FD8\u4F1A\u901A\u8FC7\u81EA\u65CB\u7684\u65B9\u5F0F\u83B7\u5F97\u9501\uFF0C\u591A\u6B21\uFF08\u6709\u9650\u6B21\uFF09\u5C1D\u8BD5\u5931\u8D25\u540E\uFF0C\u624D\u4F1A\u901A\u8FC7park\u963B\u585E\uFF0C\u5E76\u4E0D\u662F\u8BF4\u5165\u961F\u5C31\u963B\u585E

                                                                        • **\u975E\u516C\u5E73\u9501\u7684 lock \u65B9\u6CD5\u4F1A\u9996\u5148\u5C1D\u8BD5\u53BB\u62A2\u5360\u8BBE\u7F6E\u540C\u6B65\u72B6\u6001\uFF08\u901A\u8FC7CAS\uFF09\uFF0C\u800C\u4E0D\u662F\u76F4\u63A5\u8C03\u7528 acquire()\u65B9\u6CD5 \u5C06\u7EBF\u7A0B\u653E\u5165\u540C\u6B65\u961F\u5217\u4E2D\u7B49\u5F85\u83B7\u53D6\u9501\u3002**\u5982\u679C\u8BBE\u7F6E\u540C\u6B65\u72B6\u6001state\u5931\u8D25\uFF0C\u5373CAS\u6BD4\u8F83\u4E0D\u6210\u529F\uFF0C\u90A3\u4E48\u624D\u8FDB\u5165acquire()

                                                                        • \u516C\u5E73\u9501\u7684lock()\u5219\u76F4\u63A5\u8C03\u7528acquire()

                                                                        • \u8FDB\u5165acquire()\u4E4B\u540E\uFF0C\u5148\u8FDB\u884CtryAcquire()

                                                                          • \u516C\u5E73\u9501\u7684tryAcquire \u591A\u51FA\u4E86\u4E00\u4E2A\u6761\u4EF6\uFF0C\u5373!hasQueuedPredecessors()\u3002\u8FD9\u4E2A\u65B9\u6CD5\u7684\u76EE\u7684\u662F\u5224\u65AD\u662F\u5426\u6709\u5176\u4ED6\u7EBF\u7A0B\u6BD4\u5F53\u524D\u7EBF\u7A0B\u5728\u540C\u6B65\u961F\u5217\u4E2D\u7B49\u5F85\u7684\u65F6\u95F4\u66F4\u957F\u3002
                                                                          • \u5982\u679C\u6211\u4EEC\u628A tryAcquire \u4E2D\u7684\u6761\u4EF6!hasQueuedPredecessors()\u53BB\u6389\uFF0C\u516C\u5E73\u9501\u5C06\u4E0D\u518D\u90A3\u4E48\u201C\u8C26\u8BA9\u201D\uFF0C\u5B83\u5C06\u4F1A\u50CF\u975E\u516C\u5E73\u9501\u90A3\u6837\u62A2\u5360\u83B7\u53D6\u9501\uFF0C\u62A2\u5360\u5931\u8D25\u624D\u4F1A\u5165\u961F\uFF0C\u5C31\u53D8\u6210\u4E86\u975E\u516C\u5E73\u9501\u3002

                                                                      ReentrantReadWriteLock

                                                                      1. ReentrantReadWriteLock\u548CStampedLock\u90FD\u662F\u8BFB\u5199\u9501

                                                                      2. ReentrantReadWriteLock\u652F\u6301\u91CD\u5165\uFF0C\u662F\u53EF\u91CD\u5165\u9501

                                                                      3. ReentrantReadWriteLock\u7684\u76EE\u7684\u662F\u63D0\u9AD8\u8BFB\u64CD\u4F5C\u7684\u6027\u80FD

                                                                        \u5F53\u8BFB\u64CD\u4F5C\u8FDC\u8FDC\u9AD8\u4E8E\u5199\u64CD\u4F5C\u65F6\uFF0C\u8FD9\u65F6\u5019\u4F7F\u7528\u8BFB\u5199\u9501\u8BA9\u8BFB-\u8BFB\u53EF\u4EE5\u5E76\u53D1\uFF0C\u63D0\u9AD8\u6027\u80FD\u3002

                                                                        \u8BFB\u8BFB\u53EF\u4EE5\u5E76\u53D1\uFF0C \u800C\u8BFB\u5199\u4E92\u65A5

                                                                      \u7EBF\u7A0B\u5B89\u5168\u96C6\u5408\u7C7B\u6982\u8FF0

                                                                        • \u9057\u7559\u7684\u7EBF\u7A0B\u5B89\u5168\u96C6\u5408\u5982Hashtable\uFF0CVector

                                                                          Hashtable\u662FMap\u63A5\u53E3\u7684\u5B9E\u73B0\u7C7B

                                                                          Vector\u662FList\u63A5\u53E3\u7684\u5B9E\u73B0\u7C7B

                                                                        • image-20210910130603196

                                                                        • JUC\u5B89\u5168\u96C6\u5408

                                                                          • BLOCKING\u7C7B\uFF0C\u5927\u90E8\u5206\u57FA\u4E8E\u9501\uFF0C\u5E76\u63D0\u4F9B\u7528\u6765\u963B\u585E\u7684\u65B9\u6CD5\u3002\uFF08\u8FD9\u79CD\u79F0\u4E3A\u60B2\u89C2\u9501\uFF0C\u4E50\u89C2\u9501\u5176\u5B9E\u6CA1\u6709\u9501\uFF0C\u662F\u5B9E\u73B0\u65E0\u9501\u5E76\u53D1\uFF0CCAS+volatile\u5B9E\u73B0\uFF09
                                                                          • CopyOnWrite\u7C7B\uFF0C\u9002\u7528\u4E8E\u8BFB\u591A\u5199\u5C11\u7684\u573A\u666F
                                                                          • Concurrent\u7C7B
                                                                      1. image-20210910130839000

                                                                      2. Concurrent\u7C7B\u578B\u7684\u5BB9\u5668

                                                                        • \u5927\u591A\u6027\u80FD\u90FD\u6BD4\u8F83\u9AD8

                                                                          \u5185\u90E8\u5F88\u591A\u64CD\u4F5C\u4F7F\u7528cas\u4F18\u5316\uFF0C\u4E00\u822C\u53EF\u4EE5\u63D0\u9AD8\u8F83\u9AD8\u541E\u5410\u91CF\uFF0C\u7528\u6237\u7EBF\u7A0B\u6267\u884C\u7684\u65F6\u95F4\u5360\u6BD4\u9AD8\u3002

                                                                          \u56E0\u4E3A\u7528cas+volatile\u5B9E\u73B0\u7684\u65E0\u9501\u5E76\u53D1\uFF0C\u5373\u4E50\u89C2\u9501

                                                                        • \u5F31\u4E00\u81F4\u6027

                                                                          \u5F53\u5229\u7528\u8FED\u4EE3\u5668\u904D\u5386\u65F6\uFF0C\u5982\u679C\u5BB9\u5668\u53D1\u751F\u4FEE\u6539\uFF0C\u8FED\u4EE3\u5668\u4ECD\u7136\u53EF\u4EE5\u7EE7\u7EED\u8FDB\u884C\u904D\u5386\uFF08\u56E0\u4E3A\u4E0D\u963B\u585E\uFF0C\u6CA1\u6709\u4E0A\u9501\uFF09\uFF0C\u8FD9\u65F6\u5185\u5BB9\u662F\u65E7\u7684

                                                                          \u6C42\u5927\u5C0F\uFF0C\u56E0\u4E3A\u5F31\u4E00\u81F4\u6027\uFF0C\u5E76\u4E0D\u4E00\u5B9A\u51C6\u786E

                                                                          \u5BF9\u4E8E\u975E\u5B89\u5168\u5BB9\u5668\u6765\u8BB2\uFF0C\u904D\u5386\u65F6\u5982\u679C\u53D1\u751F\u4E86\u4FEE\u6539\uFF0C\u4F7F\u7528fail-fast\u673A\u5236\u4E5F\u5C31\u662F\u8BA9\u904D\u5386\u7ACB\u523B\u5931\u8D25\uFF0C\u4E0D\u518D\u7EE7\u7EED\u904D\u5386

                                                                          Concurrent\u7C7B\u578B\u7684\u5BB9\u5668\u662F\u7EBF\u7A0B\u5B89\u5168\u7684

                                                                      ConcurrentHashMap

                                                                      1. \u5185\u90E8\u65B9\u6CD5\u8DDF\u666E\u901AHashMap\u65B9\u6CD5\u4E00\u6837\uFF0C\u90FD\u662F\u5B9E\u73B0\u4E86Map\u63A5\u53E3

                                                                      2. \u91CD\u8981\u65B9\u6CD5computeIfAbsent

                                                                        \u5148\u8981\u8FDB\u884C\u68C0\u67E5\uFF0C\u5982\u679C\u7F3A\u5C11key\uFF0C\u5219\u8BA1\u7B97\u751F\u6210\u4E00\u4E2A\u503C\uFF0C\u7136\u540E\u5C06key value\u653E\u5165map

                                                                      3. HashMap\u5728put\u8FC7\u7A0B\u4E2D\u7684\u539F\u7406

                                                                        \u5148\u8BA1\u7B97hashCode\uFF0C\u627E\u5230\u5E95\u5C42Entry[]\u6570\u7EC4\u7684\u4E00\u4E2A\u4F4D\u7F6E\u8FDB\u884C\u5B58\u653E\uFF0C\u4E0D\u540ChashCode\u4ECD\u7136\u53EF\u80FD\u653E\u5230\u4E00\u4E2A\u4F4D\u7F6E

                                                                        \u5982\u679C\u6B64\u4F4D\u7F6E\u4E0A\u7684\u6570\u636E\u4E0D\u4E3A\u7A7A\uFF08\u610F\u5473\u7740\u6B64\u4F4D\u7F6E\u4E0A\u5B58\u5728\u4E00\u4E2A\u6216\u591A\u4E2A\u6570\u636E\uFF08\u591A\u4E2A\u6570\u636E\u4EE5\u94FE\u8868\u5F62\u5F0F\u5B58\u5728\uFF09\uFF09\uFF0C\u6BD4\u8F83key1\u548C\u5DF2\u7ECF\u5B58\u5728\u7684\u4E00\u4E2A\u6216\u591A\u4E2A\u6570\u636E\u7684\u54C8\u5E0C\u503C\uFF1A

                                                                        • \u5982\u679Ckey1\u7684\u54C8\u5E0C\u503C\u4E0E\u5DF2\u7ECF\u5B58\u5728\u7684\u6570\u636E\u7684\u54C8\u5E0C\u503C\u90FD\u4E0D\u76F8\u540C\uFF0C\u6B64\u65F6key1-value1\u8FD9\u4E2AEntry\u6DFB\u52A0\u6210\u529F-----\u60C5\u51B52
                                                                        • \u5982\u679Ckey1\u7684\u54C8\u5E0C\u503C\u548C\u5DF2\u7ECF\u5B58\u5728\u7684\u67D0\u4E00\u4E2A\u6570\u636E\u7684\u54C8\u5E0C\u503C\u76F8\u540C\uFF0C\u90A3\u4E48\u7EE7\u7EED\u6BD4\u8F83\uFF0C\u8C03\u7528key1\u6240\u5728\u7C7B\u7684equals()\u65B9\u6CD5\uFF1A
                                                                          • \u5982\u679Cequals()\u8FD4\u56DEfalse\uFF1A\u6B64\u65F6key1-value1\u6DFB\u52A0\u6210\u529F------\u60C5\u51B53
                                                                          • \u5982\u679Cequals()\u8FD4\u56DEtrue\uFF1A\u4F7F\u7528value1\u66FF\u6362\u76F8\u540Ckey\u7684value\u503C\u3002
                                                                      4. \u8981\u6CE8\u610F\u5982\u679C\u5728\u5E95\u5C42Entry[]\u6570\u7EC4\uFF0C\u5143\u7D20\u88AB\u653E\u5728\u540C\u4E00\u4E2A\u4F4D\u7F6E\uFF0C\u4EE5\u94FE\u8868\u5F62\u5F0F\u5B58\u50A8\uFF0C\u5728JDK8\uFF0C\u65B0\u52A0\u5165\u7684\u5143\u7D20\u603B\u662F\u653E\u5728\u94FE\u8868\u7684\u5C3E\u90E8\uFF0C\u5728jdk7\uFF0C\u65B0\u52A0\u5165\u7684\u5143\u7D20\u603B\u662F\u653E\u5728\u94FE\u8868\u7684\u5934\u90E8\u3002

                                                                        \u5728jdk7\uFF0C\u65B0\u52A0\u5165\u7684\u5143\u7D20\u603B\u662F\u653E\u5728\u94FE\u8868\u7684\u5934\u90E8\uFF0C\u8FD9\u4E5F\u662F\u4EA7\u751F\u6B7B\u94FE\u7684\u91CD\u8981\u539F\u56E0\uFF0C\u6240\u4EE5\u5728jdk8\u8FDB\u884C\u4E86\u4FEE\u6539\u3002

                                                                        \u6B7B\u94FE\u662F\u53D1\u751F\u5728\u6269\u5BB9\u7684\u65F6\u5019

                                                                        \u6269\u5BB9\u662F\u5F80HashMap\u91CCput\u5143\u7D20\uFF0C\u5F53\u5143\u7D20\u8FBE\u5230\u4E00\u4E2A\u9608\u503C\u65F6\u8FDB\u884C\u6269\u5BB9\uFF0C\u8FD9\u4E2A\u9608\u503C\u662F\u6570\u7EC4\u957F\u5EA6 * \u52A0\u8F7D\u56E0\u5B50\uFF0C\u52A0\u8F7D\u56E0\u5B50\u9ED8\u8BA4\u662F0.75\uFF0C\u6269\u5BB9\u662F\u6269\u5BB9\u4E3A\u539F\u6765\u7684\u4E24\u500D\uFF0C\u5E95\u5C42Entry[]\u6570\u7EC4\u521D\u59CB\u5927\u5C0F\u662F16\uFF08\u6216\u8005\u8BF4HashMap\u5728\u5E95\u5C42\u521D\u59CB\u5927\u5C0F\u662F16\uFF0C\u90A3\u4E48\u9608\u503C\u662F12\uFF0C\u8D85\u8FC712\u65F6\uFF0C\u5C31\u8981\u5F00\u59CB\u6269\u5BB9\uFF09

                                                                        ArrayList\u5E95\u5C42\u662FObject[]\u6570\u7EC4\uFF0C\u521D\u59CB\u5927\u5C0F\u662F10\uFF0C\u5982\u679C\u4E0D\u8DB310\uFF0C\u7B2C\u4E00\u6B21\u6269\u5BB9\uFF0C\u6269\u5BB9\u4E3A10\uFF0C\u4E4B\u540E\u90FD\u6269\u5BB9\u4E3A\u539F\u6765\u5927\u5C0F\u76841.5\u500D

                                                                        \u800CStringBuffer\u548CStringBuilder\u6269\u5BB9\u90FD\u662F\u6269\u5BB9\u4E3A\u539F\u6765\u76842\u500D+2\uFF0C\u5E95\u5C42\u6570\u7EC4\u521D\u59CB\u5927\u5C0F\u662F16.

                                                                        \u53EA\u8981\u662F\u6570\u7EC4\u6269\u5BB9\uFF0C\u90FD\u662F\u4F1A\u9020\u4E00\u4E2A\u65B0\u7684\u6570\u7EC4\uFF0C\u56E0\u4E3A\u6570\u7EC4\u5728\u5E95\u5C42\u7684\u957F\u5EA6\u662F\u521B\u5EFA\u65F6\u5C31\u786E\u5B9A\u4E86\u7684\uFF0C\u65B0\u5EFA\u4E00\u4E2A\u6570\u7EC4\u4E4B\u540E\uFF0C\u5C06\u539F\u6765\u6570\u7EC4\u7684\u6570\u636E\u590D\u5236\u8FC7\u6765\u3002

                                                                        \u6269\u5BB9\u4E4B\u540E\uFF0C\u5143\u7D20\u5728\u65B0\u7684\u6570\u7EC4\u53C8\u4F1A\u5206\u5F97\u66F4\u52A0\u5747\u5300

                                                                      5. \u6269\u5BB9\u7684\u65F6\u5019\u4F1A\u904D\u5386\u539FEntry[]\u6570\u7EC4\u7684\u67D0\u4E2A\u4F4D\u7F6E\u4E0A\u7684\u94FE\u8868\uFF0C\u904D\u5386\u6BCF\u4E00\u4E2AEntry\uFF0C\u628A\u4ED6\u4EEC\u653E\u5230\u65B0\u7684\u6570\u7EC4\u53BB

                                                                      6. HashMap\u5728jdk7\u4EA7\u751F\u7684\u6B7B\u94FE\u95EE\u9898\uFF1A

                                                                        \u6BD4\u5982\u5728Entry[]\u6570\u7EC4\u7684\u67D0\u4E2A\u4E0B\u6807\u4F4D\u7F6E\uFF0C\u6709\u4E00\u4E2A\u94FE\u8868\u662F\u8282\u70B91-\u8282\u70B92-null\uFF0C\u5373\u5934\u8282\u70B9\u5143\u7D20\u4E3A\u8282\u70B91\uFF0C\u4E0B\u4E00\u4E2A\u8282\u70B9\u4E3A\u8282\u70B92\uFF0C\u518D\u4E0B\u4E00\u4E2A\u8282\u70B9\u4E3Anull

                                                                        \u6B64\u65F6\u7EBF\u7A0BThread-0\u5728\u6267\u884Cput\u64CD\u4F5C

                                                                        \u9996\u5148\u8981\u660E\u786E\u6B7B\u94FE\u662F\u53D1\u751F\u5728\u6269\u5BB9\u65F6\uFF0C\u867D\u7136JDK8\u6539\u53D8\u4E86\u65B0\u8282\u70B9\u52A0\u5165\u94FE\u8868\u7684\u5B58\u50A8\u65B9\u5F0F\uFF0C\u89E3\u51B3\u4E86\u6B7B\u94FE\uFF0C\u4F46\u662F\u8FD8\u6709\u5176\u4ED6\u95EE\u9898\uFF0C\u6BD4\u5982\u6269\u5BB9\u4E22\u6570\u636E\uFF0C\u6839\u672C\u539F\u56E0\u662F\u56E0\u4E3A\u5728\u591A\u7EBF\u7A0B\u73AF\u5883\u4E0B\u91C7\u7528\u4E86HashMap\u8FD9\u79CD\u4E0D\u5B89\u5168\u7684\u96C6\u5408

                                                                        \u90A3\u4E48\u6B64\u65F6\u5982\u679C\u53D1\u751F\u6269\u5BB9\uFF0C\u5E76\u4E14\u8FD9\u4E2A\u6269\u5BB9\u64CD\u4F5C\u7531\u53E6\u4E00\u4E2A\u7EBF\u7A0BThread-1\u6765\u6267\u884C\uFF0C\u5047\u8BBE\u6269\u5BB9\u540E\u8282\u70B91\u548C\u8282\u70B92\u8FD8\u5728\u65B0\u6570\u7EC4\uFF08\u6269\u5BB9\u90FD\u4F1A\u9020\u4E00\u4E2A\u65B0\u6570\u7EC4\uFF09\u7684\u540C\u4E00\u4E2A\u4E0B\u6807\u4F4D\u7F6E\u4E0A\uFF0C\u90A3\u4E48\u9996\u5148\u8282\u70B91\u4F1A\u5B58\u50A8\u5230\u8FD9\u4E2A\u4E0B\u6807\u4F4D\u7F6E\uFF0C\u7531\u4E8EJDK7\u4F1A\u5C06\u65B0\u52A0\u5165\u7684\u5143\u7D20\u653E\u5728\u94FE\u8868\u7684\u5934\u90E8\u800C\u4E0D\u662F\u5C3E\u90E8\uFF0C\u6240\u4EE5\u8282\u70B92\u4F1A\u52A0\u5165\u5230\u94FE\u8868\u7684\u5934\u90E8\uFF0C\u90A3\u4E48\u5728\u65B0\u6570\u7EC4\u7684\u8FD9\u4E2A\u4E0B\u6807\u4F4D\u7F6E\u4E0A\uFF0C\u94FE\u8868\u4E3A\u8282\u70B92-\u8282\u70B91-null

                                                                        \u4F46\u662FThread-0\u8BB0\u5F55\u4E86\u5F53\u524D\u7684e\u4E3A\u8282\u70B91\uFF0Cnext\u4E3A\u8282\u70B92

                                                                        \u6240\u4EE5\u5F53\u524D\u7684e\u662F\u8282\u70B91-null

                                                                        next\u662F\u8282\u70B92-\u8282\u70B91-null

                                                                        \u6240\u4EE5\u6B64\u65F6Thread\u8BA4\u4E3A\u8282\u70B91\u6307\u5411\u8282\u70B92\uFF0C\u4F46\u662F\u5B9E\u9645\u4E0A\u662F\u8282\u70B92\u6307\u5411\u8282\u70B91\uFF0C

                                                                        \u90A3\u4E48\u5728\u4E0B\u4E00\u6B21\u5FAA\u73AF\u4F1A\u53D1\u751F\u5C06\u8282\u70B91-null\u79FB\u5230\u65B0\u7684\u6570\u7EC4\u7684\u94FE\u8868\u5934

                                                                        e\u53D8\u4E3A\u8282\u70B92-\u8282\u70B91-null

                                                                        next\u53D8\u4E3A\u8282\u70B91-null

                                                                        \u518D\u4E0B\u4E00\u6B21\u5FAA\u73AF\u4F1A\u53D1\u751F\u5C06\u8282\u70B92-\u8282\u70B91-null\u79FB\u5230\u65B0\u7684\u6570\u7EC4\u7684\u94FE\u8868\u5934

                                                                        e\u53D8\u4E3A\u8282\u70B91-null

                                                                        next\u53D8\u4E3Anull\uFF0C\u5F62\u6210\u6B7B\u94FE

                                                                      7. \u603B\u7ED3\uFF1A

                                                                        jdk1.7HashMap\u5728\u5E76\u53D1\u73AF\u5883\u4E0B\uFF0C\u6267\u884Cput\u64CD\u4F5C\u65F6\uFF0C\u4F1A\u5F15\u8D77\u6B7B\u5FAA\u73AF\uFF0C\u56E0\u4E3A\u591A\u7EBF\u7A0B\u4F1A\u5BFC\u81F4HashMap\u7684Entry\u94FE\u8868\u5F62\u6210\u6B7B\u94FE\u5373\u73AF\u5F62\u6570\u636E\u7ED3\u6784\uFF0C\u4E00\u65E6\u5F62\u6210\u73AF\u5F62\u6570\u636E\u7ED3\u6784\uFF0CEntry\u7684next\u8282\u70B9\u6C38\u8FDC\u4E0D\u4E3A\u7A7A\uFF0C\u5C31\u4F1A\u4EA7\u751F\u6B7B\u5FAA\u73AF

                                                                      8. JDK8\u867D\u7136\u5C06\u6269\u5BB9\u7B97\u6CD5\u505A\u4E86\u8C03\u6574\uFF0C\u5728\u6269\u5BB9\u65F6\uFF0C\u8282\u70B9\u4FDD\u6301\u4E86\u548C\u4E4B\u524D\u4E00\u6837\u7684\u987A\u5E8F\uFF0C\u65B0\u7684\u8282\u70B9\u88AB\u52A0\u5165\u5230\u94FE\u8868\u7684\u5C3E\u90E8\uFF0C\u89E3\u51B3\u4E86\u6B7B\u94FE\u95EE\u9898\uFF08\u53EA\u6709jdk7\u6709\u6B7B\u94FE\u95EE\u9898\uFF0C\u5728\u6269\u5BB9\u65F6\u4F1A\u53D1\u751F\uFF09

                                                                        \u4F46JDK8\u4ECD\u4E0D\u610F\u5473\u7740\u5728\u591A\u7EBF\u7A0B\u73AF\u5883\u4E0B\u80FD\u591F\u5B89\u5168\u6269\u5BB9\uFF0C\u8FD8\u4F1A\u51FA\u73B0\u5176\u4ED6\u95EE\u9898\uFF0C\u5728jdk8\u4E0B\uFF0CHashMap\u4ECD\u7136\u662F\u7EBF\u7A0B\u4E0D\u5B89\u5168\u7684\u3002

                                                                      \u91CD\u8981\u5C5E\u6027\u548C\u5185\u90E8\u7C7B

                                                                      1. image-20210910144345408

                                                                        \u5185\u90E8\u7C7Bclass Node\u662F\u6307\u540C\u4E00\u4E2A\u4E0B\u6807\u4F4D\u7F6E\u4E0A\u7684\u94FE\u8868

                                                                        ForwardingNode\u4F5C\u4E3A\u65E7table\u7684\u5934\u8282\u70B9\uFF0C\u4EE3\u8868\u65E7Entry[]\u6570\u7EC4\u7684\u8FD9\u4E2A\u4F4D\u7F6E\u4E0A\u7684\u8282\u70B9\u662F\u5904\u7406\u8FC7\u7684\uFF01

                                                                        TreeBin\u6307\u7EA2\u9ED1\u6811\uFF0C\u662Fjdk8\u5BF9HashMap\u5E95\u5C42\u7684\u4F18\u5316\uFF0C\u5728hash\u8868\u7684\u957F\u5EA6\u5927\u4E8E64\u548C\u94FE\u8868\u7684\u957F\u5EA6\u5927\u4E8E8\u65F6\uFF0C\u4F1A\u91C7\u7528\u7EA2\u9ED1\u6811\u6765\u4EE3\u66FF\u94FE\u8868\uFF0C\u53EF\u4EE5\u63D0\u9AD8\u67E5\u8BE2\u6548\u7387\uFF0C\u5E76\u4E14\u53EF\u4EE5\u4E00\u5B9A\u7A0B\u5EA6\u4E0A\u9632\u6B62DOS\u653B\u51FB\uFF08\u6076\u610F\u9020\u5927\u91CFhashcode\u4E00\u6837\u7684\u5BF9\u8C61\u5F80hashmap\u586B\u5145\uFF09

                                                                        \u94FE\u8868\u7684\u957F\u5EA6\u5927\u4E8E8\u65F6\uFF0C\u4F1A\u5C1D\u8BD5\u628A\u94FE\u8868\u8F6C\u6362\u6210\u7EA2\u9ED1\u6811\uFF0C\u4F46\u662F\u5728\u8F6C\u6362\u4E4B\u524D\uFF0C\u4F1A\u5C1D\u8BD5\u6269\u5BB9\uFF0C\u5982\u679C\u54C8\u5E0C\u8868\u7684\u957F\u5EA6\u6CA1\u6709\u8FBE\u523064\u65F6\uFF0C\u5148\u4E0D\u4F1A\u628A\u94FE\u8868\u53D8\u4E3A\u7EA2\u9ED1\u6811\uFF0C\u5148\u4F1A\u6269\u5BB9\u3002\u5F53\u54C8\u5E0C\u8868\u7684\u5BB9\u91CF\u6269\u5BB9\u523064\u65F6\uFF0C\u90A3\u4E48\u624D\u4F1A\u5C06\u94FE\u8868\u8F6C\u6362\u6210\u7EA2\u9ED1\u6811\u3002

                                                                      \u6784\u9020\u5668

                                                                      1. image-20210910145407027

                                                                        initialCapacity\u662F\u6307\u521D\u59CB\u5BB9\u91CF

                                                                        • \u521D\u59CB\u5BB9\u91CF\u8FBE\u4E0D\u5230\u5E76\u53D1\u5EA6\u65F6\uFF0C\u4F1A\u8BA9\u521D\u59CB\u5BB9\u91CF = \u5E76\u53D1\u5EA6
                                                                        • \u8BBE\u7F6E\u7684\u521D\u59CB\u5BB9\u91CF\u4E0D\u4E00\u5B9A\u662F\u771F\u6B63\u7684\u521D\u59CB\u5BB9\u91CF\uFF0C\u56E0\u4E3AtableSizeFor\u8981\u4FDD\u8BC1\u5BB9\u91CF\u662F2\u7684n\u6B21\u65B9\uFF0C\u6700\u5C0F\u662F16\uFF0C\u5982\u679C\u5C06\u521D\u59CB\u5BB9\u91CF\u8BBE\u7F6E\u4E3A8\uFF0C\u4F1A\u901A\u8FC7\u8FD9\u79CD\u8BA1\u7B97\u65B9\u5F0F\u5C06\u521D\u59CB\u5BB9\u91CF\u8BBE\u7F6E\u4E3A16

                                                                        loadFactor\u662F\u8D1F\u8F7D\u56E0\u5B50\uFF0C\u9ED8\u8BA4\u4E3A0.75

                                                                        concurrencyLevel \u5E76\u53D1\u5EA6

                                                                      2. ConcurrentHashMap\u6709\u5728table\u4E0B\u6807\u51B2\u7A81\u7684\u65F6\u5019\u624D\u4F1A\u52A0\u9501\uFF0C\u9501\u7684\u4E0D\u662F\u6574\u4E2Atable\uFF0C\u9501\u7684\u662F\u8FD9\u4E2A\u94FE\u8868\u7684\u5934\u8282\u70B9

                                                                        \u8FD9\u4E2A\u5730\u65B9\u4FDD\u8BC1\u4E86\u7EBF\u7A0B\u5B89\u5168\u6027\u3002\u5E76\u4E14\u662F\u7EC6\u7C92\u5EA6\u7684\u9501\uFF0C\u4FDD\u8BC1\u4E86Entry[]\u6570\u7EC4\u5176\u4ED6\u5143\u7D20\u8FD8\u80FD\u88AB\u7EBF\u7A0B\u8BBF\u95EE\u5230\u3002

                                                                        \u800CHashMap\u5219\u6CA1\u6709\u8FD9\u4E2A\u64CD\u4F5C\u3002

                                                                        \u5728\u521B\u5EFAConcurrentHashMap\u7684\u65F6\u5019\u4E5F\u4FDD\u8BC1\u7EBF\u7A0B\u5B89\u5168\uFF0C\u53EA\u6709\u4E00\u4E2A\u7EBF\u7A0B\u80FD\u591F\u521B\u5EFA

                                                                      jdk7 ConcurrentHashMap

                                                                      1. \u7EF4\u62A4\u4E86\u4E00\u4E2Asegment\u6570\u7EC4\uFF0C\u6BCF\u4E2Asegment\u5BF9\u5E94\u4E00\u628A\u9501\uFF08\u5206\u6BB5\u9501\uFF09

                                                                        jdk7\u662F\u628A\u9501\u52A0\u5728\u6BCF\u4E2Asegment\u5BF9\u8C61\u4E0A\uFF0C\u800Cjdk8\u662F\u628A\u9501\u52A0\u5728\u94FE\u8868\u7684\u5934\u8282\u70B9

                                                                        \u7F3A\u70B9\uFF1A

                                                                        • \u4E0D\u662F\u61D2\u60F0\u521D\u59CB\u5316
                                                                        • Segment\u6570\u7EC4\u9ED8\u8BA4\u5927\u5C0F\u4E3A16\uFF0C\u5BB9\u91CF\u521D\u59CB\u5316\u6307\u5B9A\u540E\u5C31\u4E0D\u80FD\u6539\u53D8\u4E86\uFF0C\u4F46\u662FJDK8\u7684Hash\u8868\u662F\u6709\u6269\u5BB9\u673A\u5236\u7684\u3002
                                                                      2. \u6BCF\u4E2Asegment\u5BF9\u5E94\u4E8E\u4E00\u4E2A\u5C0F\u7684Hash\u8868\uFF08HashEntry[]\u6570\u7EC4\uFF09\uFF0C\u6BCF\u4E2AHash\u8868\u91CC\u9762\u53C8\u662F\u6570\u7EC4\u52A0\u94FE\u8868\u7684\u7ED3\u6784

                                                                        \u4E00\u4E2Asegment\u5BF9\u5E94\u4E8E\u4E00\u4E2A\u6570\u7EC4+\u94FE\u8868\u7ED3\u6784\u3002\u6570\u7EC4\u662FHashEntry[]\u6570\u7EC4\uFF0C\u6570\u7EC4\u91CC\u6BCF\u4E2A\u5143\u7D20\u662F\u4E00\u4E2A\u94FE\u8868\uFF0C\u94FE\u8868\u91CC\u6BCF\u4E00\u4E2A\u5143\u7D20\u662FHashEntry

                                                                      3. jdk7\u7684HashMap\u5728\u591A\u7EBF\u7A0B\u73AF\u5883\u4E0B\uFF0C\u8FDB\u884Cput\u64CD\u4F5C\uFF0C\u4F1A\u4EA7\u751F\u73AF\u5F62\u94FE\u8868\u95EE\u9898\uFF0C\u4F1A\u4EA7\u751F\u6B7B\u94FE\uFF0C\u9020\u6210\u6B7B\u5FAA\u73AF\uFF0Cjdk8\u867D\u7136\u6539\u53D8\u4E86\u8FD9\u79CDput\u65F6\uFF0C\u5C06\u8282\u70B9\u63D2\u5165\u5230\u94FE\u8868\u7684\u5934\u90E8\u6539\u4E3A\u4E86\u8282\u70B9\u63D2\u5165\u5230\u94FE\u8868\u7684\u5C3E\u90E8\uFF0C\u89E3\u51B3\u4E86\u6B7B\u94FE\u95EE\u9898\uFF0C\u4F46\u662F\u5E76\u4E0D\u610F\u5473\u7740jdk8\u4E0B\u7684HashMap\u80FD\u591F\u5728\u591A\u7EBF\u7A0B\u73AF\u5883\u4E0B\u5B89\u5168\u6269\u5BB9\uFF0C\u4ECD\u7136\u6709\u5176\u4ED6\u7EBF\u7A0B\u5B89\u5168\u95EE\u9898\u3002\u6839\u672C\u539F\u56E0\u662F\u56E0\u4E3AHashMap\u662F\u7EBF\u7A0B\u4E0D\u5B89\u5168\u7684

                                                                        \u6240\u4EE5\u60F3\u8981\u91C7\u7528\u7EBF\u7A0B\u5B89\u5168\u7684HashMap\uFF0C\u5E94\u8BE5\u91C7\u7528ConcurrentHashMap

                                                                        \u800CConcurrentHashMap\u5728jdk7\u548Cjdk8\u5B9E\u73B0\u7EBF\u7A0B\u5B89\u5168\u95EE\u9898\u7684\u65B9\u5F0F\u662F\u4E0D\u540C\u7684

                                                                      4. ConcurrentHashMap\u5728jdk7\u4E0B\u662F\u91C7\u7528segment\u5206\u6BB5\u9501\u7684\u65B9\u5F0F\u5B9E\u73B0\u7684\u7EBF\u7A0B\u5B89\u5168\uFF0C\u5728jdk8\u4E2D\u662F\u91C7\u7528\u7684CAS+Synchronized\u9501\u7684\u65B9\u5F0F\u5B9E\u73B0\u7684\u7EBF\u7A0B\u5B89\u5168\uFF0C\u8FD9\u91CC\u7684Synchronized\u53EA\u6709\u5728put\u7684\u65F6\u5019\uFF0C\u5BF9\u94FE\u8868\u7684\u5934\u90E8\u8282\u70B9\u8FDB\u884C\u4E0A\u9501\uFF0C\u5E76\u4E0D\u662F\u5BF9\u6574\u4E2AMap\u8FDB\u884C\u4E0A\u9501\uFF0C\u91C7\u7528\u7684\u662F\u7EC6\u7C92\u5EA6\u9501\uFF0C\u800C\u4E14\u5728jdk6\u4E2D\u5DF2\u7ECF\u6DFB\u52A0\u4E86Synchronized\u4ECE\u504F\u5411\u9501\u5230\u8F7B\u91CF\u7EA7\u9501\u5230Monitor\u91CD\u91CF\u7EA7\u9501\u7684\u5347\u7EA7\u65B9\u5F0F\uFF0C\u6240\u4EE5\u6548\u7387\u6709\u6240\u63D0\u5347

                                                                        segment\u626E\u6F14\u7684\u9501\u7684\u89D2\u8272\uFF0C\u5B9E\u9645\u662F\u7EE7\u627F\u7684ReentrantLock\u7684\u65B9\u5F0F

                                                                      5. \u4E3A\u4EC0\u4E48\u91C7\u7528ConcurrentHashMap\uFF0C\u800C\u4E0D\u91C7\u7528HashTable\uFF1F

                                                                        HashTable\u5BB9\u5668\u4F7F\u7528synchronized\u6765\u4FDD\u8BC1\u7EBF\u7A0B\u5B89\u5168\uFF0C\u4F46\u5728\u7EBF\u7A0B\u7ADE\u4E89\u6FC0\u70C8\u7684\u60C5\u51B5\u4E0BHashTable\u7684\u6548\u7387\u5F88\u4F4E\u4E0B\uFF0C\u56E0\u4E3A\u53EA\u6709\u4E00\u628A\u76D1\u89C6\u5668\u9501\uFF0C\u5F53\u7136\u91C7\u7528synchronized\u672C\u6765\u5C31\u5E94\u8BE5\u4FDD\u8BC1\u53EA\u6709\u4E00\u628A\u76D1\u89C6\u5668\u9501\uFF0C\u6240\u4EE5\u540E\u9762\u91C7\u7528\u7684\u5206\u6BB5\u9501\u7684\u65B9\u5F0F\u3002HashTable\u5BF9get\u64CD\u4F5C\u548Cput\u64CD\u4F5C\u90FD\u8981\u4E0A\u9501\uFF0C\u6548\u7387\u4F4E\u4E0B\u3002ConcurrentHashMap\u7684get\u64CD\u4F5C\u662F\u4E0D\u9700\u8981\u4E0A\u9501\u7684\uFF0C\u56E0\u4E3A\u91C7\u7528\u4E86volatile\u6765\u4FEE\u9970\u5171\u4EAB\u53D8\u91CF\uFF0C\u6240\u6709\u7EBF\u7A0B\u5728get\u8FD9\u4E2A\u8BFB\u64CD\u4F5C\u90FD\u80FD\u4ECE\u4E3B\u5B58\u4E2D\u83B7\u5F97\u5171\u4EAB\u53D8\u91CF\u7684\u6700\u65B0\u503C\uFF0C\u4E0D\u4F1A\u5BFC\u81F4\u8BFB\u53D6\u9519\u8BEF\u7684\u60C5\u51B5\uFF0C\u6D89\u53CA\u5230\u5185\u5B58\u5C4F\u969C\uFF0C\u6240\u4EE5get\u64CD\u4F5C\u4E0D\u9700\u8981\u4E0A\u9501\u3002

                                                                        \u53EA\u6709\u4E00\u628A\u76D1\u89C6\u5668\u9501\uFF0C\u5BFC\u81F4\u4E86\u5F53\u4E00\u4E2A\u7EBF\u7A0B\u8BBF\u95EEHashTable\u7684\u540C\u6B65\u65B9\u6CD5\u7684\u65F6\u5019\uFF0C\u5176\u4ED6\u7EBF\u7A0B\u4E5F\u8BBF\u95EEHashTable\u7684\u540C\u6B65\u65B9\u6CD5\u65F6\uFF0C\u4F1A\u8FDB\u5165\u963B\u585E\u6216\u8F6E\u8BE2\u72B6\u6001\uFF0C\u65E2\u4E0D\u80FDget\u4E5F\u4E0D\u80FDput\u3002\uFF08\u8FDEget()\u8FD9\u79CD\u8BFB\u64CD\u4F5C\u90FD\u4E0D\u53EF\u4EE5\uFF0C\u5E76\u4E14\u5BB9\u6613\u5F15\u8D77\u7EBF\u7A0B\u963B\u585E\uFF0C\u8FDB\u800C\u9020\u6210\u7EBF\u7A0B\u7684\u9891\u7E41\u4E0A\u4E0B\u6587\u5207\u6362\u5BFC\u81F4\u5F00\u9500\uFF09

                                                                      6. \u6240\u4EE5ConcurrentHashMap\u5728jdk7\u4E0B\u662F\u91C7\u7528segment\u5206\u6BB5\u9501\u7684\u65B9\u5F0F\u5B9E\u73B0\u7684\u7EBF\u7A0B\u5B89\u5168

                                                                        \u5206\u6BB5\u9501\uFF0C\u901A\u4FD7\u7406\u89E3\u4E3A\u6709\u591A\u4E2A\u6570\u636E\u6BB5\uFF0C\u6BCF\u4E2A\u6570\u636E\u6BB5\u5BF9\u5E94\u4E00\u628A\u9501\uFF0C\u62FF\u5230\u67D0\u4E00\u4E2A\u6570\u636E\u6BB5\u7684\u9501\uFF0C\u5C31\u53EF\u4EE5\u64CD\u4F5C\u8FD9\u4E2A\u6570\u636E\u6BB5\u7684\u5185\u5BB9\u3002

                                                                        \u5F53\u591A\u4E2A\u7EBF\u7A0B\u8BBF\u95EE\u5BB9\u5668\u91CC\u4E0D\u540C\u6570\u636E\u6BB5\u7684\u6570\u636E\u65F6\uFF0C\u7EBF\u7A0B\u95F4\u5C31\u4E0D\u4F1A\u4EA7\u751F\u9501\u7ADE\u4E89\uFF0C\u63D0\u9AD8\u6548\u7387

                                                                        \u9996\u5148\u5C06\u6570\u636E\u5206\u6210\u4E00\u6BB5\u4E00\u6BB5\u5730\u5B58\u50A8\uFF0C\u7136\u540E\u7ED9\u6BCF\u4E00\u6BB5\u6570\u636E\u914D\u4E00\u628A\u9501\uFF0C\u5F53\u4E00\u4E2A\u7EBF\u7A0B\u5360\u7528\u67D0\u4E00\u6BB5\u7684\u9501\u8BBF\u95EE\u5176\u4E2D\u4E00\u4E2A\u6BB5\u7684\u6570\u636E\u7684\u65F6\u5019\uFF0C\u5176\u4ED6\u6BB5\u7684\u6570\u636E\u4E5F\u80FD\u88AB\u5176\u4ED6\u7EBF\u7A0B\u8BBF\u95EE\u3002

                                                                      7. Segment\u662F\u4E00\u79CD\u53EF\u91CD\u5165\u9501---ReentrantLock\uFF0C\u5728ConcurrentHashMap\u91CC\u626E\u6F14\u9501\u7684\u89D2\u8272

                                                                      8. \u4E00\u4E2ASegment\u5305\u542B\u4E00\u4E2AHashEntry\u6570\u7EC4\uFF0C\u6BCF\u4E2AHashEntry\u662F\u4E00\u4E2A\u94FE\u8868\u7ED3\u6784\u7684\u5143\u7D20

                                                                        \u5C31\u76F8\u5F53\u4E8E\u4E00\u4E2ASegment\u5BF9\u5E94\u4E8E\u4E00\u4E2A\u5C0F\u7684Hash\u8868\uFF0C\u662F\u6570\u7EC4\u52A0\u94FE\u8868\u7684\u7ED3\u6784

                                                                        \u5F53\u5BF9HashEntry\u6570\u7EC4\u7684\u6570\u636E\u8FDB\u884C\u4FEE\u6539\u7684\u65F6\u5019\uFF0C\u5FC5\u987B\u9996\u5148\u83B7\u5F97\u4E0E\u5B83\u5BF9\u5E94\u7684segment\u9501

                                                                        image-20210910170942805

                                                                      9. segment\u5C31\u53EF\u4EE5\u76F4\u63A5\u7406\u89E3\u4E3A\u9501\uFF0C\u5206\u6BB5\u9501\uFF0Csegment\u5C31\u662F\u9501

                                                                      10. \u65E2\u7136ConcurrentHashMap\u4F7F\u7528\u5206\u6BB5\u9501segment\u6765\u4FDD\u62A4\u4E0D\u540C\u6BB5\u7684\u6570\u636E\uFF0C\u90A3\u4E48\u5FC5\u987B\u901A\u8FC7\u6563\u5217\u7B97\u6CD5\u5B9A\u4F4D\u5230Segment

                                                                        \u8FD9\u91CC\u7684\u901A\u8FC7\u6563\u5217\u7B97\u6CD5\u5B9A\u4F4D\uFF0C\u4E0D\u662F\u7528hashCode\u901A\u8FC7\u6563\u5217\u7B97\u6CD5\u5B9A\u4F4D\uFF0C\u662F\u5C06hashCode\u518D\u6563\u5217\u4E00\u6B21\u540E\u5F97\u5230\u65B0\u7684hash\u503C\uFF0C\u518D\u901A\u8FC7\u6563\u5217\u7B97\u6CD5\u6216\u8005\u8BF4\u6620\u5C04\u7B97\u6CD5\u5B9A\u4F4D\u3002

                                                                        ConcurrentHashMap\u4F1A\u9996\u5148\u4F7F\u7528Wang/Jenkins hash\u7684\u53D8\u79CD\u7B97\u6CD5\u5BF9\u5143\u7D20\u7684hashCode\u8FDB\u884C\u518D\u6563\u5217

                                                                      11. \u8FDB\u884C\u518D\u6563\u5217\u7684\u539F\u56E0\uFF1A

                                                                        \u51CF\u5C11\u6563\u5217\u51B2\u7A81\uFF0C\u4F7F\u5143\u7D20\u80FD\u591F\u5747\u5300\u5730\u5206\u5E03\u5728\u4E0D\u540C\u7684Segment\u4E0A\uFF0C\u52A0\u5165\u6563\u5217\u7684\u8D28\u91CF\u5DEE\u5230\u6781\u70B9\uFF0C\u90A3\u4E48\u6240\u6709\u7684\u5143\u7D20\u90FD\u5728\u4E00\u4E2Asegment\u4E2D\uFF0C\u8FD9\u6837\u4E5F\u5931\u53BB\u4E86\u5206\u6BB5\u9501\u7684\u610F\u4E49\u3002

                                                                        \u518D\u6563\u5217\u4E0D\u662F\u6307\u7684\u5B9A\u4F4D\u7684\u8FC7\u7A0B\uFF0C\u662F\u6307\u5BF9hashCode\u518D\u6563\u5217\u7684\u8FC7\u7A0B\uFF0C\u6BD4\u5982int hash = hash(key.hashCode())

                                                                        \u901A\u8FC7\u518D\u6563\u5217\u4E4B\u540E\u7684hash\u503C\uFF0C\u53BB\u5B9A\u4F4D\u3002\u5B9A\u4F4D\u662F\u901A\u8FC7\u6563\u5217\u7B97\u6CD5\u6216\u6620\u5C04\u7B97\u6CD5\u53BB\u5B9A\u4F4D

                                                                        • \u5F97\u5230hashCode\u503C
                                                                        • \u518D\u6563\u5217\u5F97\u5230\u65B0\u7684hash\u503C
                                                                        • \u901A\u8FC7\u65B0\u7684hash\u503C\uFF0C\u901A\u8FC7\u6563\u5217\u51FD\u6570\u6216\u8005\u6620\u5C04\u7B97\u6CD5\u53BB\u5B9A\u4F4D\u5230segment
                                                                      12. get()\u64CD\u4F5C

                                                                        • \u5F97\u5230hashCode\u503C
                                                                        • \u518D\u6563\u5217\u5F97\u5230\u65B0\u7684hash\u503C
                                                                        • \u901A\u8FC7\u65B0\u7684hash\u503C\uFF0C\u901A\u8FC7\u6563\u5217\u7B97\u6CD5\u5B9A\u4F4D\u5230segment
                                                                          • \u5B9A\u4F4Dsegment\u4F7F\u7528\u7684\u662FhashCode\u901A\u8FC7\u518D\u6563\u5217\u540E\u5F97\u5230\u7684\u503C\u5373\u7B2C\u4E8C\u6B65\u7684\u65B0\u7684hash\u503C\u7684\u9AD8\u4F4D\u53BB\u901A\u8FC7\u6563\u5217\u7B97\u6CD5\u8FDB\u884C\u5B9A\u4F4D
                                                                        • \u518D\u901A\u8FC7\u6563\u5217\u7B97\u6CD5\u5B9A\u4F4D\u5230\u5143\u7D20
                                                                          • \u5B9A\u4F4DHashEntry\uFF0C\u4F7F\u7528\u7684\u662F\u7B2C\u4E8C\u6B65\u7684hash\u503C\u53BB\u901A\u8FC7\u6563\u5217\u7B97\u6CD5\u53BB\u5B9A\u4F4D\u3002

                                                                        HashTable\u5BB9\u5668\u7684get\u65B9\u6CD5\u662F\u9700\u8981\u52A0\u9501\u7684\uFF0CConcurrentHashMap\u7684get\u64CD\u4F5C\u4E0D\u9700\u8981\u52A0\u9501\uFF0C\u5171\u4EAB\u53D8\u91CF\u90FD\u5B9A\u4E49\u6210volatile\u7C7B\u578B\uFF0C\u80FD\u591F\u5728\u7EBF\u7A0B\u4E4B\u95F4\u4FDD\u6301\u53EF\u89C1\u6027\uFF0C\u80FD\u591F\u88AB\u591A\u7EBF\u7A0B\u540C\u65F6\u8BFB\uFF0C\u5E76\u4E14\u4FDD\u8BC1\u4E0D\u4F1A\u8BFB\u5230\u8FC7\u671F\u7684\u503C\u3002\u8FD9\u91CC\u7684\u539F\u7406\u662F\u5185\u5B58\u5C4F\u969C\uFF0C\u9762\u8BD5\u7684\u65F6\u5019\u53EF\u4EE5\u591A\u8BF4\u4E00\u8BF4

                                                                      13. put()\u65B9\u6CD5

                                                                        • \u9996\u5148\u5B9A\u4F4D\u5230segment\uFF0C\u548C\u4E4B\u524Dget()\u65B9\u6CD5\u7684\u5B9A\u4F4D\u65B9\u5F0F\u76F8\u540C
                                                                        • get()\u53EF\u4EE5\u4E0D\u52A0\u9501\uFF0C\u4F46\u662Fput()\u5FC5\u987B\u52A0\u9501\uFF0C\u662F\u7531\u4E8Eput\u65B9\u6CD5\u662F\u5BF9\u5171\u4EAB\u53D8\u91CF\u8FDB\u884C\u5199\u5165\u64CD\u4F5C
                                                                        • \u5B9A\u4F4D\u5230segment\u4E4B\u540E\uFF0C\u9996\u5148\u4F1A\u5C1D\u8BD5\u83B7\u53D6\u9501\uFF0C\u5982\u679C\u83B7\u53D6\u5931\u8D25\u80AF\u5B9A\u6709\u5176\u4ED6\u7EBF\u7A0B\u7ADE\u4E89
                                                                        • \u7136\u540E\u5C1D\u8BD5\u81EA\u65CB\u83B7\u53D6\u9501
                                                                          • \u5982\u679C\u91CD\u8BD5\u7684\u6B21\u6570\u8FBE\u5230\u4E86MAX_SCAN_RETRIES\uFF0C\u5219\u6539\u4E3A\u963B\u585E\u9501\u83B7\u53D6\uFF0C\u4FDD\u8BC1\u80FD\u83B7\u53D6\u6210\u529F
                                                                        • \u5BF9\u5B9A\u4F4D\u5230\u7684segment\u7684HashEntry\u5224\u65AD\u662F\u5426\u9700\u8981\u8FDB\u884C\u6269\u5BB9\u3002\uFF08\u4E00\u4E2Asegment\u5BF9\u5E94\u4E8E\u4E00\u4E2AHashEntry\u6570\u7EC4\uFF0C\u6570\u7EC4\u7684\u6BCF\u4E2A\u5143\u7D20\u662F\u94FE\u8868\u7ED3\u6784\u7684\u5143\u7D20\uFF0C\u94FE\u8868\u7684\u6BCF\u4E2A\u5143\u7D20\u4E3AHashEntry\uFF09

                                                                        ConcurrentHashMap\u53EA\u5BF9\u67D0\u4E2ASegment\u8FDB\u884C\u6269\u5BB9\u800C\u4E0D\u4F1A\u5BF9\u6574\u4E2AMap\u8FDB\u884C\u6269\u5BB9\u3002

                                                                      14. size()\u65B9\u6CD5

                                                                        ConcurrentHashMap\u7684\u505A\u6CD5\u662F\u5148\u5C1D\u8BD52\u6B21\u901A\u8FC7\u4E0D\u9501\u4F4FSegment\u7684\u65B9\u5F0F\u6765\u7EDF\u8BA1\u5404\u4E2Asegment\u7684\u5927\u5C0F\uFF0C\u5982\u679C\u5BB9\u5668\u7684count\u53D1\u751F\u4E86\u53D8\u5316\uFF0C\u5219\u518D\u91C7\u7528\u52A0\u9501\u7684\u65B9\u5F0F\u6765\u7EDF\u8BA1\u6240\u6709segment\u7684\u5927\u5C0F

                                                                      15. \u7528 volatile \u4FEE\u9970\u4E86 HashEntry \u7684\u6570\u636E value \u548C \u4E0B\u4E00\u4E2A\u8282\u70B9 next\uFF0C\u4FDD\u8BC1\u4E86\u591A\u7EBF\u7A0B\u73AF\u5883\u4E0B\u6570\u636E\u83B7\u53D6\u65F6\u7684\u53EF\u89C1\u6027\uFF01

                                                                        \u6240\u4EE5get\u64CD\u4F5C\u4E0D\u9700\u8981\u52A0\u9501\uFF0C\u4F46\u662Fput\u64CD\u4F5C\u662F\u5199\u64CD\u4F5C\uFF0C\u9700\u8981\u52A0\u9501\uFF0Csegment\u5C31\u662F\u9501\uFF0C\u9700\u8981\u5148\u83B7\u5F97segment\uFF0C\u624D\u80FD\u5BF9segment\u4E0B\u7684HashEntry\u8FDB\u884C\u4E0B\u4E00\u6B65\u64CD\u4F5C\u3002

                                                                        image-20210910171404634

                                                                      jdk8 ConcurrentHashMap

                                                                      1. \u5728\u6570\u636E\u7ED3\u6784\u4E0A\uFF0C JDK1.8 \u4E2D\u7684ConcurrentHashMap \u9009\u62E9\u4E86\u4E0E HashMap \u76F8\u540C\u7684Node\u6570\u7EC4+\u94FE\u8868+\u7EA2\u9ED1\u6811\u7ED3\u6784\uFF1B\u5728\u9501\u7684\u5B9E\u73B0\u4E0A\uFF0C\u629B\u5F03\u4E86\u539F\u6709\u7684 Segment \u5206\u6BB5\u9501\uFF0C\u91C7\u7528 CAS + synchronized\u5B9E\u73B0\u66F4\u52A0\u7EC6\u7C92\u5EA6\u7684\u9501\u3002

                                                                        jdk7\u662F\u628A\u9501\u52A0\u5728\u6BCF\u4E2Asegment\u5BF9\u8C61\u4E0A\uFF0C\u800Cjdk8\u662F\u628A\u9501\u52A0\u5728\u94FE\u8868\u7684\u5934\u8282\u70B9

                                                                        jdk8\u5C06\u9501\u7684\u7EA7\u522B\u63A7\u5236\u5728\u4E86\u66F4\u52A0\u7EC6\u7C92\u5EA6\u7684\u5143\u7D20\u7EA7\u522B\uFF0C\u53EA\u9700\u8981\u9501\u4F4F\u94FE\u8868\u5934\u8282\u70B9\uFF08\u5982\u679C\u662F\u7EA2\u9ED1\u6811\uFF0C\u90A3\u4E48\u9501\u4F4F\u7EA2\u9ED1\u6811\u7684\u6839\u8282\u70B9\uFF09\uFF0C\u5C31\u4E0D\u4F1A\u5F71\u54CD\u5176\u4ED6\u6570\u7EC4\u5143\u7D20\u7684\u8BFB\u5199\uFF0C\u5927\u5927\u63D0\u9AD8\u4E86\u5E76\u53D1\u5EA6\u3002

                                                                      2. put()

                                                                        1. \u6839\u636E key \u8BA1\u7B97\u51FA hash \u503C\uFF1B
                                                                        2. \u5224\u65AD\u662F\u5426\u9700\u8981\u8FDB\u884C\u521D\u59CB\u5316\uFF1B
                                                                        3. \u5B9A\u4F4D\u5230 Node\uFF0C\u62FF\u5230\u9996\u8282\u70B9 f\uFF0C\u5224\u65AD\u9996\u8282\u70B9 f\uFF1A
                                                                          • \u5982\u679C\u4E3A null \uFF0C\u5219\u901A\u8FC7 CAS \u7684\u65B9\u5F0F\u5C1D\u8BD5\u6DFB\u52A0\uFF1B
                                                                          • \u5982\u679C\u4E3A f.hash = MOVED = -1 \uFF0C\u8BF4\u660E\u5176\u4ED6\u7EBF\u7A0B\u5728\u6269\u5BB9\uFF0C\u53C2\u4E0E\u4E00\u8D77\u6269\u5BB9\uFF1B
                                                                          • \u5982\u679C\u90FD\u4E0D\u6EE1\u8DB3 \uFF0Csynchronized \u9501\u4F4F f \u8282\u70B9(\u8FD9\u4E2A\u5730\u65B9\u7684\u7EA7\u522B\u662F\u5BF9\u94FE\u8868\u7684\u5934\u8282\u70B9\u8FDB\u884C\u52A0\u9501\uFF0C\u5E76\u4E0D\u5F71\u54CDEntry[]\u6570\u7EC4\u7684\u5176\u4ED6\u5143\u7D20\uFF0C\u5927\u5927\u63D0\u9AD8\u4E86\u6548\u7387)\uFF0C\u5224\u65AD\u662F\u94FE\u8868\u8FD8\u662F\u7EA2\u9ED1\u6811\uFF0C\u904D\u5386\u63D2\u5165\uFF1B
                                                                        4. \u5F53\u5728\u94FE\u8868\u957F\u5EA6\u8FBE\u5230 8 \u7684\u65F6\u5019\uFF0C\u6570\u7EC4\u6269\u5BB9\u6216\u8005\u5C06\u94FE\u8868\u8F6C\u6362\u4E3A\u7EA2\u9ED1\u6811\uFF08\u6269\u5BB9\u8FD8\u662F\u8F6C\u6362\u4E3A\u7EA2\u9ED1\u6811\uFF0C\u5C31\u770B\u5F53\u524D\u6570\u7EC4\u7684\u957F\u5EA6\u662F\u5426\u662F\u5927\u4E8E64\uFF0C\u5982\u679C\u6CA1\u6709\u5927\u4E8E64\uFF0C\u90A3\u4E48\u6269\u5BB9\uFF0C\u5927\u4E8E64\uFF0C\u4FBF\u8F6C\u6362\u4E3A\u7EA2\u9ED1\u6811\uFF09\u3002
                                                                      3. get()

                                                                        1. \u6839\u636E key \u8BA1\u7B97\u51FA hash \u503C\uFF0C\u5224\u65AD\u6570\u7EC4\u662F\u5426\u4E3A\u7A7A\uFF1B
                                                                        2. \u5982\u679C\u662F\u9996\u8282\u70B9\uFF0C\u5C31\u76F4\u63A5\u8FD4\u56DE\uFF1B
                                                                        3. \u5982\u679C\u662F\u7EA2\u9ED1\u6811\u7ED3\u6784\uFF0C\u5C31\u4ECE\u7EA2\u9ED1\u6811\u91CC\u9762\u67E5\u8BE2\uFF1B
                                                                        4. \u5982\u679C\u662F\u94FE\u8868\u7ED3\u6784\uFF0C\u5FAA\u73AF\u904D\u5386\u5224\u65AD\u3002

                                                                        get \u65B9\u6CD5\u548Cjdk1.7\u4E00\u6837\uFF0C\u540C\u6837\u4E0D\u9700\u8981\u52A0\u9501\u3002\u56E0\u4E3A Node \u7684\u5143\u7D20 value \u548C\u6307\u9488 next \u662F\u7528 volatile \u4FEE\u9970\u7684\uFF0C\u4FDD\u8BC1\u4E86\u5171\u4EAB\u53D8\u91CF\u7684\u53EF\u89C1\u6027\uFF0C\u5728\u591A\u7EBF\u7A0B\u73AF\u5883\u4E0B\u7EBF\u7A0BA\u4FEE\u6539\u8282\u70B9\u7684 value \u6216\u8005\u65B0\u589E\u8282\u70B9\u7684\u65F6\u5019\u662F\u5BF9\u7EBF\u7A0BB\u53EF\u89C1\u7684\u3002

                                                                        \u8FD9\u4E5F\u662F\u5B83\u6BD4\u5176\u4ED6\u5E76\u53D1\u96C6\u5408\u6BD4\u5982 Hashtable\u3001\u7528 Collections.synchronizedMap()\u5305\u88C5\u7684 HashMap \u6548\u7387\u9AD8\u7684\u539F\u56E0\u4E4B\u4E00\u3002

                                                                      4. \u603B\u7ED3\uFF1A

                                                                        jdk1.7\u548Cjdk1.8\u7684ConcurrentHashMap\u7684put()\u64CD\u4F5C\u90FD\u662F\u8981\u52A0\u9501\u7684\uFF0C\u5206\u522B\u662F\u5206\u6BB5\u9501\uFF08segment---ReentrantLock\uFF09\u548C\u5BF9\u94FE\u8868\u5934\u8282\u70B9\u8FDB\u884C\u52A0\u9501\u3002

                                                                        jdk1.7\u5728put\u7684\u65F6\u5019\u4F1A\u901A\u8FC7\u81EA\u65CB\u83B7\u5F97\u9501\uFF0C\u8FBE\u5230\u4E00\u5B9A\u6B21\u6570\u540E\uFF0C\u4E00\u5B9A\u80FD\u83B7\u5F97\u9501

                                                                        jdk1.8\u5728put\u7684\u65F6\u5019\u662F\u5BF9\u94FE\u8868\u5934\u90E8\u8282\u70B9\u52A0\u9501\uFF0C\u5E76\u4E0D\u5F71\u54CDEntry[]\u6570\u7EC4\u7684\u5176\u4ED6\u5143\u7D20

                                                                        \u800Cget\u65B9\u6CD5\uFF0C\u5728jdk1.7\u548C1.8\u90FD\u4E0D\u9700\u8981\u52A0\u9501\uFF0C\u539F\u56E0\u5C31\u662F\u4E0A\u9762\u7B2C\u56DB\u70B9\u8BF4\u7684\u539F\u56E0

                                                                      5. JDK1.8 \u4E2D\u4E3A\u4EC0\u4E48\u4F7F\u7528\u5185\u7F6E\u9501 synchronized\u66FF\u6362 ReentrantLock\uFF1F\u2605\u2605\u2605\u2605\u2605

                                                                        • \u5728 JDK1.6 \u4E2D\uFF0C\u5BF9 synchronized \u9501\u7684\u5B9E\u73B0\u5F15\u5165\u4E86\u5927\u91CF\u7684\u4F18\u5316\uFF0C\u5E76\u4E14 synchronized \u6709\u591A\u79CD\u9501\u72B6\u6001\uFF0C\u4F1A\u4ECE\u65E0\u9501 -> \u504F\u5411\u9501 -> \u8F7B\u91CF\u7EA7\u9501 -> \u91CD\u91CF\u7EA7\u9501\u4E00\u6B65\u6B65\u8F6C\u6362\u3002
                                                                        • \u51CF\u5C11\u5185\u5B58\u5F00\u9500 \u3002\u5047\u8BBE\u4F7F\u7528ReentrantLock\u6765\u83B7\u5F97\u540C\u6B65\u652F\u6301\uFF08ReentrantLock\u5B9E\u73B0\u539F\u7406\u662FAQS\u62BD\u8C61\u961F\u5217\u540C\u6B65\u673A\u5236\uFF09\uFF0C\u90A3\u4E48\u6BCF\u4E2A\u8282\u70B9\u90FD\u9700\u8981\u901A\u8FC7\u7EE7\u627F AQS \u6765\u83B7\u5F97\u540C\u6B65\u652F\u6301\u3002\u4F46\u5E76\u4E0D\u662F\u6BCF\u4E2A\u8282\u70B9\u90FD\u9700\u8981\u83B7\u5F97\u540C\u6B65\u652F\u6301\u7684\uFF0C\u53EA\u6709\u94FE\u8868\u7684\u5934\u8282\u70B9\uFF08\u7EA2\u9ED1\u6811\u7684\u6839\u8282\u70B9\uFF09\u9700\u8981\u540C\u6B65\uFF0C\u8FD9\u65E0\u7591\u5E26\u6765\u4E86\u5DE8\u5927\u5185\u5B58\u6D6A\u8D39\u3002
                                                                      6. ConcurrentHashMap \u4E0D\u652F\u6301 key \u6216\u8005 value \u4E3A null \u7684\u539F\u56E0\uFF1F\u2605\u2605\u2605

                                                                        \u6211\u4EEC\u5148\u6765\u8BF4value \u4E3A\u4EC0\u4E48\u4E0D\u80FD\u4E3A null\u3002\u56E0\u4E3A ConcurrentHashMap \u662F\u7528\u4E8E\u591A\u7EBF\u7A0B\u7684 \uFF0C\u5982\u679CConcurrentHashMap.get(key)\u5F97\u5230\u4E86 null \uFF0C\u8FD9\u5C31\u65E0\u6CD5\u5224\u65AD\uFF0C\u662F\u6620\u5C04\u7684value\u662F null \uFF0C\u8FD8\u662F\u6CA1\u6709\u627E\u5230\u5BF9\u5E94\u7684key\u800C\u4E3A null \uFF0C\u5C31\u6709\u4E86\u4E8C\u4E49\u6027\u3002

                                                                        \u800C\u7528\u4E8E\u5355\u7EBF\u7A0B\u72B6\u6001\u7684 HashMap \u5374\u53EF\u4EE5\u7528containsKey(key) \u53BB\u5224\u65AD\u5230\u5E95\u662F\u5426\u5305\u542B\u4E86\u8FD9\u4E2A null \u3002

                                                                      7. ConcurrentHashMap \u7684\u5E76\u53D1\u5EA6\u662F\u4EC0\u4E48\uFF1F\u2605\u2605

                                                                        \u5E76\u53D1\u5EA6\u53EF\u4EE5\u7406\u89E3\u4E3A\u7A0B\u5E8F\u8FD0\u884C\u65F6\u80FD\u591F\u540C\u65F6\u66F4\u65B0 ConccurentHashMap\u4E14\u4E0D\u4EA7\u751F\u9501\u7ADE\u4E89\u7684\u6700\u5927\u7EBF\u7A0B\u6570\u3002\u5728JDK1.7\u4E2D\uFF0C\u5B9E\u9645\u4E0A\u5C31\u662FConcurrentHashMap\u4E2D\u7684\u5206\u6BB5\u9501\u4E2A\u6570\uFF0C\u5373Segment[]\u7684\u6570\u7EC4\u957F\u5EA6\uFF0C\u9ED8\u8BA4\u662F16\uFF0C\u8FD9\u4E2A\u503C\u53EF\u4EE5\u5728\u6784\u9020\u51FD\u6570\u4E2D\u8BBE\u7F6E\u3002

                                                                        \u5982\u679C\u81EA\u5DF1\u8BBE\u7F6E\u4E86\u5E76\u53D1\u5EA6\uFF0CConcurrentHashMap \u4F1A\u4F7F\u7528\u5927\u4E8E\u7B49\u4E8E\u8BE5\u503C\u7684\u6700\u5C0F\u76842\u7684\u5E42\u6307\u6570\u4F5C\u4E3A\u5B9E\u9645\u5E76\u53D1\u5EA6\uFF0C\u4E5F\u5C31\u662F\u6BD4\u5982\u4F60\u8BBE\u7F6E\u7684\u503C\u662F17\uFF0C\u90A3\u4E48\u5B9E\u9645\u5E76\u53D1\u5EA6\u662F32\u3002\u5982\u679C\u5C0F\u4E8E16\uFF0C\u90A3\u4E48\u5B9E\u9645\u5E76\u53D1\u5EA6\u662F16.

                                                                      8. ConcurrentHashMap \u8FED\u4EE3\u5668\u662F\u5F3A\u4E00\u81F4\u6027\u8FD8\u662F\u5F31\u4E00\u81F4\u6027\uFF1F\u2605\u2605

                                                                        \u4E0E HashMap \u8FED\u4EE3\u5668\u662F\u5F3A\u4E00\u81F4\u6027\u4E0D\u540C\uFF0CConcurrentHashMap \u8FED\u4EE3\u5668\u662F\u5F31\u4E00\u81F4\u6027\u3002

                                                                        ConcurrentHashMap \u7684\u8FED\u4EE3\u5668\u521B\u5EFA\u540E\uFF0C\u5C31\u4F1A\u6309\u7167\u54C8\u5E0C\u8868\u7ED3\u6784\u904D\u5386\u6BCF\u4E2A\u5143\u7D20\uFF0C\u4F46\u5728\u904D\u5386\u8FC7\u7A0B\u4E2D\uFF0C\u5185\u90E8\u5143\u7D20\u53EF\u80FD\u4F1A\u53D1\u751F\u53D8\u5316\uFF0C\u5982\u679C\u53D8\u5316\u53D1\u751F\u5728\u5DF2\u904D\u5386\u8FC7\u7684\u90E8\u5206\uFF0C\u8FED\u4EE3\u5668\u5C31\u4E0D\u4F1A\u53CD\u6620\u51FA\u6765\uFF0C\u800C\u5982\u679C\u53D8\u5316\u53D1\u751F\u5728\u672A\u904D\u5386\u8FC7\u7684\u90E8\u5206\uFF0C\u8FED\u4EE3\u5668\u5C31\u4F1A\u53D1\u73B0\u5E76\u53CD\u6620\u51FA\u6765\uFF0C\u8FD9\u5C31\u662F\u5F31\u4E00\u81F4\u6027\u3002

                                                                      9. \u4E3A\u4EC0\u4E48\u8BF4JDK1.8 \u91C7\u7528CAS+synchronized \u4FDD\u8BC1\u7EBF\u7A0B\u5B89\u5168\uFF1F

                                                                        1. ConcurrentHashMap \u5728put\u65F6\uFF0C\u5B9A\u4F4D\u5230Node\uFF0C\u5982\u679C\u8282\u70B9\u4E3Anull\uFF0C\u91C7\u7528CAS\u7684\u65B9\u5F0F\u5C1D\u8BD5\u6DFB\u52A0
                                                                        2. put\u65F6\uFF0C\u5B9A\u4F4D\u5230Node\uFF0C\u5982\u679CNode\u4E0D\u4E3Anull\uFF0C\u4F1A\u9501\u4F4F\u94FE\u8868\u7684\u5934\u8282\u70B9
                                                                        3. \u5B9A\u4F4D\u5230Node\uFF0C\u9996\u5148\u9700\u8981\u6839\u636Ekey\u8BA1\u7B97\u51FAhash\u503C
                                                                      10. JDK1.7 \u4E0E JDK1.8 \u4E2DConcurrentHashMap \u7684\u533A\u522B\uFF1F\u2605\u2605\u2605\u2605\u2605

                                                                        • \u6570\u636E\u7ED3\u6784\uFF1A\u53D6\u6D88\u4E86 Segment \u5206\u6BB5\u9501\u7684\u6570\u636E\u7ED3\u6784\uFF0C\u53D6\u800C\u4EE3\u4E4B\u7684\u662F\u6570\u7EC4+\u94FE\u8868+\u7EA2\u9ED1\u6811\u7684\u7ED3\u6784\uFF0C\u5C31\u6CA1\u6709segment\u5206\u6BB5\u8FD9\u79CD\u8BF4\u6CD5\u4E86\u3002

                                                                        • \u4FDD\u8BC1\u7EBF\u7A0B\u5B89\u5168\u673A\u5236\uFF1AJDK1.7\u91C7\u7528 Segment \u7684\u5206\u6BB5\u9501\u673A\u5236\u5B9E\u73B0\u7EBF\u7A0B\u5B89\u5168\uFF0C\u5176\u4E2D Segment \u7EE7\u627F\u81EA ReentrantLock \u3002JDK1.8 \u91C7\u7528CAS+synchronized \u4FDD\u8BC1\u7EBF\u7A0B\u5B89\u5168\u3002

                                                                        • \u9501\u7684\u7C92\u5EA6\uFF1AJDK1.7 \u662F\u5BF9\u9700\u8981\u8FDB\u884C\u6570\u636E\u64CD\u4F5C\u7684 Segment \u52A0\u9501\uFF0CJDK1.8 \u8C03\u6574\u4E3A\u5BF9\u6BCF\u4E2A\u6570\u7EC4\u5143\u7D20\u52A0\u9501\uFF08Node\uFF09\u3002

                                                                        • \u94FE\u8868\u8F6C\u5316\u4E3A\u7EA2\u9ED1\u6811\uFF1A\u5B9A\u4F4D\u8282\u70B9\u7684 hash \u7B97\u6CD5\u7B80\u5316\u4F1A\u5E26\u6765\u5F0A\u7AEF\uFF0Chash \u51B2\u7A81\u52A0\u5267\uFF0C\u56E0\u6B64\u5728\u94FE\u8868\u8282\u70B9\u6570\u91CF\u5927\u4E8E 8\uFF08\u4E14\u6570\u636E\u603B\u91CF\u5927\u4E8E\u7B49\u4E8E 64\uFF09\u65F6\uFF0C\u4F1A\u5C06\u94FE\u8868\u8F6C\u5316\u4E3A\u7EA2\u9ED1\u6811\u8FDB\u884C\u5B58\u50A8\u3002

                                                                          • \u5C06\u94FE\u8868\u8F6C\u6362\u4E3A\u7EA2\u9ED1\u6811\u4E4B\u524D\uFF0C\u8981\u5224\u65AD\u80FD\u5426\u8FDB\u884C\u6269\u5BB9\uFF0C\u5982\u679C\u80FD\u8FDB\u884C\u6269\u5BB9\uFF0C\u90A3\u4E48\u8981\u5148\u8FDB\u884C\u6269\u5BB9\uFF0C\u6269\u5BB9\u5230\u6570\u7EC4\u7684\u5BB9\u91CF\u662F64\u4E4B\u540E\uFF0C\u8FD9\u65F6\u5982\u679C\u94FE\u8868\u957F\u5EA6\u5927\u4E8E8\uFF0C\u90A3\u4E48\u5C31\u5C06\u94FE\u8868\u8F6C\u6362\u4E3A\u7EA2\u9ED1\u6811\u3002

                                                                            \u5982\u679C\u54C8\u5E0C\u8868\u7684\u957F\u5EA6\u6CA1\u6709\u8FBE\u523064\u65F6\uFF0C\u5148\u4E0D\u4F1A\u628A\u94FE\u8868\u53D8\u4E3A\u7EA2\u9ED1\u6811\uFF0C\u5148\u4F1A\u6269\u5BB9\uFF0C\u6269\u5BB9\u4E4B\u540E\uFF0C\u4F1A\u5C06\u539FEntry[]\u6570\u7EC4\u7684\u6570\u636E\u8FC1\u79FB\uFF0C\u8FD9\u4E2A\u65F6\u5019\u4F1A\u6839\u636E\u65B0\u7684\u5BB9\u91CF\u91CD\u65B0\u8FDB\u884C\u6563\u5217\u5B58\u50A8\u3002\u6240\u4EE5\u5C31\u4E0D\u4E00\u5B9A\u94FE\u8868\u957F\u5EA6\u8D85\u8FC78\uFF0C\u5728\u8FD9\u4E4B\u540E\uFF0C\u8D85\u8FC78\uFF0C\u90A3\u4E48\u8F6C\u6362\u4E3A\u7EA2\u9ED1\u6811

                                                                        • \u67E5\u8BE2\u65F6\u95F4\u590D\u6742\u5EA6\uFF1A\u4ECE JDK1.7\u7684\u904D\u5386\u94FE\u8868O(n)\uFF0C JDK1.8 \u53D8\u6210\u904D\u5386\u7EA2\u9ED1\u6811O(logN)\u3002

                                                                      happens-before\u7684\u51E0\u79CD\u89C4\u5219

                                                                      1. \u7A0B\u5E8F\u987A\u5E8F\u89C4\u5219

                                                                      2. \u76D1\u89C6\u5668\u9501\u89C4\u5219---\u5BF9\u4E00\u4E2A\u9501\u7684\u89E3\u9501\uFF0Chappens-before\u4E8E\u968F\u540E\u5BF9\u8FD9\u4E2A\u9501\u7684\u52A0\u9501

                                                                      3. volatile\u53D8\u91CF\u89C4\u5219---\u5BF9\u4E00\u4E2Avolatile\u53D8\u91CF\u7684\u5199\uFF0Chappens-before\u4E8E\u4EFB\u610F\u540E\u7EED\u5BF9\u8FD9\u4E2Avolatile\u53D8\u91CF\u7684\u8BFB\uFF0C\u6D89\u53CA\u5230\u5185\u5B58\u5C4F\u969C

                                                                      4. \u4F20\u9012\u6027\uFF1A\u5982\u679CA happens-before B, \u4E14B happens-before C\uFF0C \u90A3\u4E48A happens-before C

                                                                      ',141);function _i(fi,Ai){return Ci}var Mi=i(ki,[["render",_i],["__file","\u5E76\u53D1\u7F16\u7A0B.html.vue"]]);export{Mi as default}; diff --git "a/assets/\345\271\266\345\217\221\347\274\226\347\250\213.html.c68aed4d.js" "b/assets/\345\271\266\345\217\221\347\274\226\347\250\213.html.dfa7ceab.js" similarity index 99% rename from "assets/\345\271\266\345\217\221\347\274\226\347\250\213.html.c68aed4d.js" rename to "assets/\345\271\266\345\217\221\347\274\226\347\250\213.html.dfa7ceab.js" index 5922e76a..2b7d3435 100644 --- "a/assets/\345\271\266\345\217\221\347\274\226\347\250\213.html.c68aed4d.js" +++ "b/assets/\345\271\266\345\217\221\347\274\226\347\250\213.html.dfa7ceab.js" @@ -1 +1 @@ -const l={key:"v-0013e773",path:"/java/%E5%B9%B6%E5%8F%91%E7%BC%96%E7%A8%8B/%E5%B9%B6%E5%8F%91%E7%BC%96%E7%A8%8B%E7%AC%94%E8%AE%B0/%E5%B9%B6%E5%8F%91%E7%BC%96%E7%A8%8B.html",title:"\u5E76\u53D1\u7F16\u7A0B",lang:"zh-CN",frontmatter:{},excerpt:"",headers:[{level:2,title:"\u8FDB\u7A0B\u4E0E\u7EBF\u7A0B",slug:"\u8FDB\u7A0B\u4E0E\u7EBF\u7A0B",children:[{level:3,title:"\u8FDB\u7A0B",slug:"\u8FDB\u7A0B",children:[]},{level:3,title:"\u7EBF\u7A0B",slug:"\u7EBF\u7A0B",children:[]},{level:3,title:"\u4E8C\u8005\u5BF9\u6BD4",slug:"\u4E8C\u8005\u5BF9\u6BD4",children:[]}]},{level:2,title:"\u5E76\u884C\u4E0E\u5E76\u53D1",slug:"\u5E76\u884C\u4E0E\u5E76\u53D1",children:[]},{level:2,title:"Java\u7EBF\u7A0B",slug:"java\u7EBF\u7A0B",children:[{level:3,title:"\u521B\u5EFA\u7EBF\u7A0B",slug:"\u521B\u5EFA\u7EBF\u7A0B",children:[]},{level:3,title:"\u7EBF\u7A0B\u8FD0\u884C\u7684\u539F\u7406",slug:"\u7EBF\u7A0B\u8FD0\u884C\u7684\u539F\u7406",children:[]},{level:3,title:"\u7EBF\u7A0B\u7684\u4E0A\u4E0B\u6587\u5207\u6362",slug:"\u7EBF\u7A0B\u7684\u4E0A\u4E0B\u6587\u5207\u6362",children:[]},{level:3,title:"start()\u4E0Erun()",slug:"start-\u4E0Erun",children:[]},{level:3,title:"sleep()\u4E0Eyield()",slug:"sleep-\u4E0Eyield",children:[]},{level:3,title:"\u7EBF\u7A0B\u4F18\u5148\u7EA7",slug:"\u7EBF\u7A0B\u4F18\u5148\u7EA7",children:[]},{level:3,title:"interrupt\u65B9\u6CD5",slug:"interrupt\u65B9\u6CD5",children:[]},{level:3,title:"\u4E3B\u7EBF\u7A0B\u548C\u5B88\u62A4\u7EBF\u7A0B",slug:"\u4E3B\u7EBF\u7A0B\u548C\u5B88\u62A4\u7EBF\u7A0B",children:[]},{level:3,title:"\u516D\u79CD\u72B6\u6001",slug:"\u516D\u79CD\u72B6\u6001",children:[]}]},{level:2,title:"\u5171\u4EAB\u6A21\u578B\u4E4B\u7BA1\u7A0B",slug:"\u5171\u4EAB\u6A21\u578B\u4E4B\u7BA1\u7A0B",children:[{level:3,title:"synchronized\u89E3\u51B3\u65B9\u6848",slug:"synchronized\u89E3\u51B3\u65B9\u6848",children:[]},{level:3,title:"\u53D8\u91CF\u7684\u7EBF\u7A0B\u5B89\u5168\u5206\u6790",slug:"\u53D8\u91CF\u7684\u7EBF\u7A0B\u5B89\u5168\u5206\u6790",children:[]},{level:3,title:"Monitor\u6982\u5FF5",slug:"monitor\u6982\u5FF5",children:[]}]},{level:2,title:"synchronized\u8FDB\u9636\u539F\u7406",slug:"synchronized\u8FDB\u9636\u539F\u7406",children:[{level:3,title:"\u8F7B\u91CF\u7EA7\u9501",slug:"\u8F7B\u91CF\u7EA7\u9501",children:[]},{level:3,title:"\u9501\u81A8\u80C0",slug:"\u9501\u81A8\u80C0",children:[]},{level:3,title:"\u81EA\u65CB\u4F18\u5316",slug:"\u81EA\u65CB\u4F18\u5316",children:[]},{level:3,title:"\u504F\u5411\u9501",slug:"\u504F\u5411\u9501",children:[]},{level:3,title:"\u9501\u6D88\u9664",slug:"\u9501\u6D88\u9664",children:[]}]},{level:2,title:"wait-notify",slug:"wait-notify",children:[]},{level:2,title:"\u540C\u6B65\u6A21\u5F0F\u4E4B\u4FDD\u62A4\u6027\u6682\u505C",slug:"\u540C\u6B65\u6A21\u5F0F\u4E4B\u4FDD\u62A4\u6027\u6682\u505C",children:[{level:3,title:"join\u539F\u7406",slug:"join\u539F\u7406",children:[]}]},{level:2,title:"\u5F02\u6B65\u6A21\u5F0F\u4E4B\u751F\u4EA7\u8005\u6D88\u8D39\u8005\u6A21\u5F0F",slug:"\u5F02\u6B65\u6A21\u5F0F\u4E4B\u751F\u4EA7\u8005\u6D88\u8D39\u8005\u6A21\u5F0F",children:[]},{level:2,title:"park\u548Cunpark",slug:"park\u548Cunpark",children:[]},{level:2,title:"\u7EBF\u7A0B\u72B6\u6001\u8F6C\u6362",slug:"\u7EBF\u7A0B\u72B6\u6001\u8F6C\u6362",children:[]},{level:2,title:"ReentrantLock",slug:"reentrantlock",children:[{level:3,title:"\u672C\u7AE0\u5C0F\u7ED3",slug:"\u672C\u7AE0\u5C0F\u7ED3",children:[]}]},{level:2,title:"\u5E76\u53D1\u4E4B\u5171\u4EAB\u6A21\u578B",slug:"\u5E76\u53D1\u4E4B\u5171\u4EAB\u6A21\u578B",children:[]},{level:2,title:"\u6307\u4EE4\u91CD\u6392\u5E8F\u4F18\u5316",slug:"\u6307\u4EE4\u91CD\u6392\u5E8F\u4F18\u5316",children:[]},{level:2,title:"volatile\u539F\u7406",slug:"volatile\u539F\u7406",children:[]},{level:2,title:"\u5171\u4EAB\u6A21\u578B\u4E4B\u65E0\u9501\uFF08\u975E\u963B\u585E\uFF09",slug:"\u5171\u4EAB\u6A21\u578B\u4E4B\u65E0\u9501-\u975E\u963B\u585E",children:[{level:3,title:"\u539F\u5B50\u7D2F\u52A0\u5668",slug:"\u539F\u5B50\u7D2F\u52A0\u5668",children:[]}]},{level:2,title:"final\u539F\u7406",slug:"final\u539F\u7406",children:[]},{level:2,title:"\u81EA\u5B9A\u4E49\u7EBF\u7A0B\u6C60",slug:"\u81EA\u5B9A\u4E49\u7EBF\u7A0B\u6C60",children:[]},{level:2,title:"jdk\u5B9A\u4E49\u7684\u7EBF\u7A0B\u6C60",slug:"jdk\u5B9A\u4E49\u7684\u7EBF\u7A0B\u6C60",children:[{level:3,title:"\u7EBF\u7A0B\u6C60\u72B6\u6001",slug:"\u7EBF\u7A0B\u6C60\u72B6\u6001",children:[]},{level:3,title:"\u6784\u9020\u65B9\u6CD5",slug:"\u6784\u9020\u65B9\u6CD5",children:[]},{level:3,title:"\u6838\u5FC3\u7EBF\u7A0B\u548C\u6551\u6025\u7EBF\u7A0B",slug:"\u6838\u5FC3\u7EBF\u7A0B\u548C\u6551\u6025\u7EBF\u7A0B",children:[]},{level:3,title:"\u51E0\u79CD\u7C7B\u578B\u7684\u7EBF\u7A0B\u6C60",slug:"\u51E0\u79CD\u7C7B\u578B\u7684\u7EBF\u7A0B\u6C60",children:[]},{level:3,title:"\u63D0\u4EA4\u4EFB\u52A1",slug:"\u63D0\u4EA4\u4EFB\u52A1",children:[]},{level:3,title:"\u5173\u95ED\u7EBF\u7A0B\u6C60",slug:"\u5173\u95ED\u7EBF\u7A0B\u6C60",children:[]},{level:3,title:"\u4EFB\u52A1\u8C03\u5EA6\u7EBF\u7A0B\u6C60",slug:"\u4EFB\u52A1\u8C03\u5EA6\u7EBF\u7A0B\u6C60",children:[]}]},{level:2,title:"Fork/Join\u7EBF\u7A0B\u6C60\u5B9E\u73B0",slug:"fork-join\u7EBF\u7A0B\u6C60\u5B9E\u73B0",children:[]},{level:2,title:"\u5F02\u6B65\u6A21\u5F0F\u4E4B\u5DE5\u4F5C\u7EBF\u7A0B",slug:"\u5F02\u6B65\u6A21\u5F0F\u4E4B\u5DE5\u4F5C\u7EBF\u7A0B",children:[{level:3,title:"\u5B9A\u4E49",slug:"\u5B9A\u4E49",children:[]},{level:3,title:"\u9965\u997F\u73B0\u8C61",slug:"\u9965\u997F\u73B0\u8C61",children:[]}]},{level:2,title:"JUC",slug:"juc",children:[{level:3,title:"AQS\u539F\u7406",slug:"aqs\u539F\u7406",children:[]},{level:3,title:"ReentrantLock\u539F\u7406",slug:"reentrantlock\u539F\u7406",children:[{level:4,title:"\u975E\u516C\u5E73\u9501\u5B9E\u73B0\u539F\u7406",slug:"\u975E\u516C\u5E73\u9501\u5B9E\u73B0\u539F\u7406",children:[]},{level:4,title:"\u53EF\u91CD\u5165\u539F\u7406",slug:"\u53EF\u91CD\u5165\u539F\u7406",children:[]},{level:4,title:"\u53EF\u6253\u65AD\u539F\u7406",slug:"\u53EF\u6253\u65AD\u539F\u7406",children:[]},{level:4,title:"\u516C\u5E73\u9501\u539F\u7406",slug:"\u516C\u5E73\u9501\u539F\u7406",children:[]},{level:4,title:"\u6761\u4EF6\u53D8\u91CF\u5B9E\u73B0\u539F\u7406",slug:"\u6761\u4EF6\u53D8\u91CF\u5B9E\u73B0\u539F\u7406",children:[]},{level:4,title:"\u516C\u5E73\u4E0E\u975E\u516C\u5E73",slug:"\u516C\u5E73\u4E0E\u975E\u516C\u5E73",children:[]}]},{level:3,title:"ReentrantReadWriteLock",slug:"reentrantreadwritelock",children:[]},{level:3,title:"\u7EBF\u7A0B\u5B89\u5168\u96C6\u5408\u7C7B\u6982\u8FF0",slug:"\u7EBF\u7A0B\u5B89\u5168\u96C6\u5408\u7C7B\u6982\u8FF0",children:[]},{level:3,title:"ConcurrentHashMap",slug:"concurrenthashmap",children:[{level:4,title:"\u91CD\u8981\u5C5E\u6027\u548C\u5185\u90E8\u7C7B",slug:"\u91CD\u8981\u5C5E\u6027\u548C\u5185\u90E8\u7C7B",children:[]},{level:4,title:"\u6784\u9020\u5668",slug:"\u6784\u9020\u5668",children:[]},{level:4,title:"jdk7 ConcurrentHashMap",slug:"jdk7-concurrenthashmap",children:[]},{level:4,title:"jdk8 ConcurrentHashMap",slug:"jdk8-concurrenthashmap",children:[]},{level:4,title:"JDK1.7 \u4E0E JDK1.8 \u4E2DConcurrentHashMap \u7684\u533A\u522B\uFF1F\u2605\u2605\u2605\u2605\u2605",slug:"jdk1-7-\u4E0E-jdk1-8-\u4E2Dconcurrenthashmap-\u7684\u533A\u522B-\u2605\u2605\u2605\u2605\u2605",children:[]}]}]},{level:2,title:"happens-before\u7684\u51E0\u79CD\u89C4\u5219",slug:"happens-before\u7684\u51E0\u79CD\u89C4\u5219",children:[]}],git:{updatedTime:1710173765e3,contributors:[{name:"shailene",email:"64005626+shaileneF@users.noreply.github.com",commits:1}]},filePathRelative:"java/\u5E76\u53D1\u7F16\u7A0B/\u5E76\u53D1\u7F16\u7A0B\u7B14\u8BB0/\u5E76\u53D1\u7F16\u7A0B.md"};export{l as data}; +const l={key:"v-0013e773",path:"/java/%E5%B9%B6%E5%8F%91%E7%BC%96%E7%A8%8B/%E5%B9%B6%E5%8F%91%E7%BC%96%E7%A8%8B%E7%AC%94%E8%AE%B0/%E5%B9%B6%E5%8F%91%E7%BC%96%E7%A8%8B.html",title:"\u5E76\u53D1\u7F16\u7A0B",lang:"zh-CN",frontmatter:{},excerpt:"",headers:[{level:2,title:"\u8FDB\u7A0B\u4E0E\u7EBF\u7A0B",slug:"\u8FDB\u7A0B\u4E0E\u7EBF\u7A0B",children:[{level:3,title:"\u8FDB\u7A0B",slug:"\u8FDB\u7A0B",children:[]},{level:3,title:"\u7EBF\u7A0B",slug:"\u7EBF\u7A0B",children:[]},{level:3,title:"\u4E8C\u8005\u5BF9\u6BD4",slug:"\u4E8C\u8005\u5BF9\u6BD4",children:[]}]},{level:2,title:"\u5E76\u884C\u4E0E\u5E76\u53D1",slug:"\u5E76\u884C\u4E0E\u5E76\u53D1",children:[]},{level:2,title:"Java\u7EBF\u7A0B",slug:"java\u7EBF\u7A0B",children:[{level:3,title:"\u521B\u5EFA\u7EBF\u7A0B",slug:"\u521B\u5EFA\u7EBF\u7A0B",children:[]},{level:3,title:"\u7EBF\u7A0B\u8FD0\u884C\u7684\u539F\u7406",slug:"\u7EBF\u7A0B\u8FD0\u884C\u7684\u539F\u7406",children:[]},{level:3,title:"\u7EBF\u7A0B\u7684\u4E0A\u4E0B\u6587\u5207\u6362",slug:"\u7EBF\u7A0B\u7684\u4E0A\u4E0B\u6587\u5207\u6362",children:[]},{level:3,title:"start()\u4E0Erun()",slug:"start-\u4E0Erun",children:[]},{level:3,title:"sleep()\u4E0Eyield()",slug:"sleep-\u4E0Eyield",children:[]},{level:3,title:"\u7EBF\u7A0B\u4F18\u5148\u7EA7",slug:"\u7EBF\u7A0B\u4F18\u5148\u7EA7",children:[]},{level:3,title:"interrupt\u65B9\u6CD5",slug:"interrupt\u65B9\u6CD5",children:[]},{level:3,title:"\u4E3B\u7EBF\u7A0B\u548C\u5B88\u62A4\u7EBF\u7A0B",slug:"\u4E3B\u7EBF\u7A0B\u548C\u5B88\u62A4\u7EBF\u7A0B",children:[]},{level:3,title:"\u516D\u79CD\u72B6\u6001",slug:"\u516D\u79CD\u72B6\u6001",children:[]}]},{level:2,title:"\u5171\u4EAB\u6A21\u578B\u4E4B\u7BA1\u7A0B",slug:"\u5171\u4EAB\u6A21\u578B\u4E4B\u7BA1\u7A0B",children:[{level:3,title:"synchronized\u89E3\u51B3\u65B9\u6848",slug:"synchronized\u89E3\u51B3\u65B9\u6848",children:[]},{level:3,title:"\u53D8\u91CF\u7684\u7EBF\u7A0B\u5B89\u5168\u5206\u6790",slug:"\u53D8\u91CF\u7684\u7EBF\u7A0B\u5B89\u5168\u5206\u6790",children:[]},{level:3,title:"Monitor\u6982\u5FF5",slug:"monitor\u6982\u5FF5",children:[]}]},{level:2,title:"synchronized\u8FDB\u9636\u539F\u7406",slug:"synchronized\u8FDB\u9636\u539F\u7406",children:[{level:3,title:"\u8F7B\u91CF\u7EA7\u9501",slug:"\u8F7B\u91CF\u7EA7\u9501",children:[]},{level:3,title:"\u9501\u81A8\u80C0",slug:"\u9501\u81A8\u80C0",children:[]},{level:3,title:"\u81EA\u65CB\u4F18\u5316",slug:"\u81EA\u65CB\u4F18\u5316",children:[]},{level:3,title:"\u504F\u5411\u9501",slug:"\u504F\u5411\u9501",children:[]},{level:3,title:"\u9501\u6D88\u9664",slug:"\u9501\u6D88\u9664",children:[]}]},{level:2,title:"wait-notify",slug:"wait-notify",children:[]},{level:2,title:"\u540C\u6B65\u6A21\u5F0F\u4E4B\u4FDD\u62A4\u6027\u6682\u505C",slug:"\u540C\u6B65\u6A21\u5F0F\u4E4B\u4FDD\u62A4\u6027\u6682\u505C",children:[{level:3,title:"join\u539F\u7406",slug:"join\u539F\u7406",children:[]}]},{level:2,title:"\u5F02\u6B65\u6A21\u5F0F\u4E4B\u751F\u4EA7\u8005\u6D88\u8D39\u8005\u6A21\u5F0F",slug:"\u5F02\u6B65\u6A21\u5F0F\u4E4B\u751F\u4EA7\u8005\u6D88\u8D39\u8005\u6A21\u5F0F",children:[]},{level:2,title:"park\u548Cunpark",slug:"park\u548Cunpark",children:[]},{level:2,title:"\u7EBF\u7A0B\u72B6\u6001\u8F6C\u6362",slug:"\u7EBF\u7A0B\u72B6\u6001\u8F6C\u6362",children:[]},{level:2,title:"ReentrantLock",slug:"reentrantlock",children:[{level:3,title:"\u672C\u7AE0\u5C0F\u7ED3",slug:"\u672C\u7AE0\u5C0F\u7ED3",children:[]}]},{level:2,title:"\u5E76\u53D1\u4E4B\u5171\u4EAB\u6A21\u578B",slug:"\u5E76\u53D1\u4E4B\u5171\u4EAB\u6A21\u578B",children:[]},{level:2,title:"\u6307\u4EE4\u91CD\u6392\u5E8F\u4F18\u5316",slug:"\u6307\u4EE4\u91CD\u6392\u5E8F\u4F18\u5316",children:[]},{level:2,title:"volatile\u539F\u7406",slug:"volatile\u539F\u7406",children:[]},{level:2,title:"\u5171\u4EAB\u6A21\u578B\u4E4B\u65E0\u9501\uFF08\u975E\u963B\u585E\uFF09",slug:"\u5171\u4EAB\u6A21\u578B\u4E4B\u65E0\u9501-\u975E\u963B\u585E",children:[{level:3,title:"\u539F\u5B50\u7D2F\u52A0\u5668",slug:"\u539F\u5B50\u7D2F\u52A0\u5668",children:[]}]},{level:2,title:"final\u539F\u7406",slug:"final\u539F\u7406",children:[]},{level:2,title:"\u81EA\u5B9A\u4E49\u7EBF\u7A0B\u6C60",slug:"\u81EA\u5B9A\u4E49\u7EBF\u7A0B\u6C60",children:[]},{level:2,title:"jdk\u5B9A\u4E49\u7684\u7EBF\u7A0B\u6C60",slug:"jdk\u5B9A\u4E49\u7684\u7EBF\u7A0B\u6C60",children:[{level:3,title:"\u7EBF\u7A0B\u6C60\u72B6\u6001",slug:"\u7EBF\u7A0B\u6C60\u72B6\u6001",children:[]},{level:3,title:"\u6784\u9020\u65B9\u6CD5",slug:"\u6784\u9020\u65B9\u6CD5",children:[]},{level:3,title:"\u6838\u5FC3\u7EBF\u7A0B\u548C\u6551\u6025\u7EBF\u7A0B",slug:"\u6838\u5FC3\u7EBF\u7A0B\u548C\u6551\u6025\u7EBF\u7A0B",children:[]},{level:3,title:"\u51E0\u79CD\u7C7B\u578B\u7684\u7EBF\u7A0B\u6C60",slug:"\u51E0\u79CD\u7C7B\u578B\u7684\u7EBF\u7A0B\u6C60",children:[]},{level:3,title:"\u63D0\u4EA4\u4EFB\u52A1",slug:"\u63D0\u4EA4\u4EFB\u52A1",children:[]},{level:3,title:"\u5173\u95ED\u7EBF\u7A0B\u6C60",slug:"\u5173\u95ED\u7EBF\u7A0B\u6C60",children:[]},{level:3,title:"\u4EFB\u52A1\u8C03\u5EA6\u7EBF\u7A0B\u6C60",slug:"\u4EFB\u52A1\u8C03\u5EA6\u7EBF\u7A0B\u6C60",children:[]}]},{level:2,title:"Fork/Join\u7EBF\u7A0B\u6C60\u5B9E\u73B0",slug:"fork-join\u7EBF\u7A0B\u6C60\u5B9E\u73B0",children:[]},{level:2,title:"\u5F02\u6B65\u6A21\u5F0F\u4E4B\u5DE5\u4F5C\u7EBF\u7A0B",slug:"\u5F02\u6B65\u6A21\u5F0F\u4E4B\u5DE5\u4F5C\u7EBF\u7A0B",children:[{level:3,title:"\u5B9A\u4E49",slug:"\u5B9A\u4E49",children:[]},{level:3,title:"\u9965\u997F\u73B0\u8C61",slug:"\u9965\u997F\u73B0\u8C61",children:[]}]},{level:2,title:"JUC",slug:"juc",children:[{level:3,title:"AQS\u539F\u7406",slug:"aqs\u539F\u7406",children:[]},{level:3,title:"ReentrantLock\u539F\u7406",slug:"reentrantlock\u539F\u7406",children:[{level:4,title:"\u975E\u516C\u5E73\u9501\u5B9E\u73B0\u539F\u7406",slug:"\u975E\u516C\u5E73\u9501\u5B9E\u73B0\u539F\u7406",children:[]},{level:4,title:"\u53EF\u91CD\u5165\u539F\u7406",slug:"\u53EF\u91CD\u5165\u539F\u7406",children:[]},{level:4,title:"\u53EF\u6253\u65AD\u539F\u7406",slug:"\u53EF\u6253\u65AD\u539F\u7406",children:[]},{level:4,title:"\u516C\u5E73\u9501\u539F\u7406",slug:"\u516C\u5E73\u9501\u539F\u7406",children:[]},{level:4,title:"\u6761\u4EF6\u53D8\u91CF\u5B9E\u73B0\u539F\u7406",slug:"\u6761\u4EF6\u53D8\u91CF\u5B9E\u73B0\u539F\u7406",children:[]},{level:4,title:"\u516C\u5E73\u4E0E\u975E\u516C\u5E73",slug:"\u516C\u5E73\u4E0E\u975E\u516C\u5E73",children:[]}]},{level:3,title:"ReentrantReadWriteLock",slug:"reentrantreadwritelock",children:[]},{level:3,title:"\u7EBF\u7A0B\u5B89\u5168\u96C6\u5408\u7C7B\u6982\u8FF0",slug:"\u7EBF\u7A0B\u5B89\u5168\u96C6\u5408\u7C7B\u6982\u8FF0",children:[]},{level:3,title:"ConcurrentHashMap",slug:"concurrenthashmap",children:[{level:4,title:"\u91CD\u8981\u5C5E\u6027\u548C\u5185\u90E8\u7C7B",slug:"\u91CD\u8981\u5C5E\u6027\u548C\u5185\u90E8\u7C7B",children:[]},{level:4,title:"\u6784\u9020\u5668",slug:"\u6784\u9020\u5668",children:[]},{level:4,title:"jdk7 ConcurrentHashMap",slug:"jdk7-concurrenthashmap",children:[]},{level:4,title:"jdk8 ConcurrentHashMap",slug:"jdk8-concurrenthashmap",children:[]},{level:4,title:"JDK1.7 \u4E0E JDK1.8 \u4E2DConcurrentHashMap \u7684\u533A\u522B\uFF1F\u2605\u2605\u2605\u2605\u2605",slug:"jdk1-7-\u4E0E-jdk1-8-\u4E2Dconcurrenthashmap-\u7684\u533A\u522B-\u2605\u2605\u2605\u2605\u2605",children:[]}]}]},{level:2,title:"happens-before\u7684\u51E0\u79CD\u89C4\u5219",slug:"happens-before\u7684\u51E0\u79CD\u89C4\u5219",children:[]}],git:{updatedTime:1710173784e3,contributors:[{name:"shailene",email:"64005626+shaileneF@users.noreply.github.com",commits:1}]},filePathRelative:"java/\u5E76\u53D1\u7F16\u7A0B/\u5E76\u53D1\u7F16\u7A0B\u7B14\u8BB0/\u5E76\u53D1\u7F16\u7A0B.md"};export{l as data}; diff --git "a/assets/\346\223\215\344\275\234\347\263\273\347\273\237.html.30ef5701.js" "b/assets/\346\223\215\344\275\234\347\263\273\347\273\237.html.7291dadc.js" similarity index 99% rename from "assets/\346\223\215\344\275\234\347\263\273\347\273\237.html.30ef5701.js" rename to "assets/\346\223\215\344\275\234\347\263\273\347\273\237.html.7291dadc.js" index bf926f6c..a4fc9531 100644 --- "a/assets/\346\223\215\344\275\234\347\263\273\347\273\237.html.30ef5701.js" +++ "b/assets/\346\223\215\344\275\234\347\263\273\347\273\237.html.7291dadc.js" @@ -1 +1 @@ -import{_ as p,e as i}from"./app.0d029894.js";var a="/study/assets/image-20211014183700023.4efb13a6.png",l="/study/assets/image-20211215161802637.7b5bc03c.png",r="/study/assets/image-20211029171246758.f68d1488.png",s="/study/assets/image-20211029171359873.9494cbf9.png",t="/study/assets/image-20211215180652752.65913121.png",e="/study/assets/image-20211029181727331.9869c6f9.png",n="/study/assets/image-20211029181850429.314094bd.png",g="/study/assets/image-20211029182506414.7323c9a9.png",o="/study/assets/image-20211215204419631.e91c517f.png",d="/study/assets/image-20211031173518958.988c29b3.png",h="/study/assets/image-20211215205340442.ef194827.png",m="/study/assets/image-20211031180947464.888e2f2b.png",c="/study/assets/image-20211031181418067.5a481bec.png",u="/study/assets/image-20211215211612977.f3cb5031.png",_="/study/assets/image-20211215211627172.d00c80da.png",P="/study/assets/image-20211215211657088.0409777d.png",C="/study/assets/image-20211215211713943.33acc316.png",b="/study/assets/image-20211215211752899.4cbb24af.png",f="/study/assets/image-20211031192224702.3b36d805.png",U="/study/assets/image-20211031192325361.53fd4544.png",v="/study/assets/image-20211031215805004.8d0b092e.png",x="/study/assets/image-20211215214453318.6e3e232d.png",y="/study/assets/image-20211031220400682.266353ab.png",B="/study/assets/image-20211031220438631.62f1566d.png",I="/study/assets/image-20211031220738705.bd7c0b7f.png",O="/study/assets/image-20211215215539484.38057c74.png",J="/study/assets/image-20211215221112255.a5b6c596.png",S="/study/assets/image-20211215221415179.b796c345.png",V="/study/assets/image-20211215222440380.2496d5e4.png",T="/study/assets/image-20211215222506062.02ebf46b.png",M="/study/assets/image-20211216150358099.5ddfed10.png",k="/study/assets/image-20211216150733591.04d9ba5c.png",q="/study/assets/image-20211216150812905.81a73c96.png",w="/study/assets/image-20211216153719194.83e97c30.png",D="/study/assets/image-20211216154057426.f1008fb7.png",F="/study/assets/image-20211216155307167.8c37033c.png",L="/study/assets/image-20211216155950660.ac79009c.png",R="/study/assets/image-20211216160414267.51749244.png",E="/study/assets/image-20211216161206697.38f8245b.png",N="/study/assets/image-20211216161225780.0fa92fb5.png",W="/study/assets/image-20211216161549508.a5e9150e.png",A="/study/assets/image-20211216161628062.00af5f0e.png",Q="/study/assets/image-20211216171359712.f4475b6b.png",j="/study/assets/image-20211216171817705.36ecf8c4.png",G="/study/assets/image-20211216170454485.9480dd2f.png",K="/study/assets/image-20211216170707557.ccfb73d8.png",z="/study/assets/image-20211216172035502.96a88e5b.png",H="/study/assets/image-20211216191425419.73b3b749.png",X="/study/assets/image-20211216193636875.1164bc66.png",Y="/study/assets/image-20211216203142509.a3a0c411.png",Z="/study/assets/image-20211216210038328.0df66e98.png",$="/study/assets/image-20211216210353349.2d9091c6.png",pp="/study/assets/image-20211216210743381.1bf8043b.png",ip="/study/assets/image-20211216222006381.3a92ee1b.png",ap="/study/assets/image-20211216222809386.4cc064fa.png",lp="/study/assets/image-20211217163414696.8be533d0.png",rp="/study/assets/image-20211217172238888.864894f2.png",sp="/study/assets/image-20211217173250040.824b41f1.png",tp="/study/assets/image-20211217173913631.bd2f40b1.png",ep="/study/assets/image-20211217182011808.4a522b35.png",np="/study/assets/image-20211217200059209.637fece5.png",gp="/study/assets/image-20211217204429202.bc807014.png",op="/study/assets/image-20211217204620460.9c5c1d50.png",dp="/study/assets/image-20211217204757093.11d17e6c.png",hp="/study/assets/image-20211217213054745.44b0afa6.png",mp="/study/assets/image-20211217222113746.356787c2.png",cp="/study/assets/image-20211220143402386-16399820431281.bb8b8b5a.png",up="/study/assets/image-20211220145412455.980d1cf5.png",_p="/study/assets/image-20211220153145382.4cb9da0f.png",Pp="/study/assets/image-20211220153203225.f9ff2a9a.png",Cp="/study/assets/image-20211220154132962.cf8693cb.png",bp="/study/assets/image-20211220175427142.6fa88c90.png",fp="/study/assets/image-20211220183023318.d83c970e.png",Up="/study/assets/image-20211220184619310.68faa667.png",vp="/study/assets/image-20211220184944890.e5ca0876.png",xp="/study/assets/image-20211220185327397.4b11e813.png",yp="/study/assets/image-20211220210600944.fba9935f.png",Bp="/study/assets/image-20211220212626340.372aa006.png",Ip="/study/assets/image-20211220212723931.388963a1.png",Op="/study/assets/image-20211220212746790.e9845ed3.png",Jp="/study/assets/image-20211220213646069.ad87e728.png",Sp="/study/assets/image-20211221154032346.0422b5f4.png",Vp="/study/assets/image-20211221154907782.a8b09f6c.png",Tp="/study/assets/image-20211221163750995.10710194.png",Mp="/study/assets/image-20211221173752429.5d7bd5d3.png",kp="/study/assets/image-20211221174313529.de30f980.png",qp="/study/assets/image-20211221185055893.80412a2c.png",wp="/study/assets/image-20211221185458329.5423e18e.png",Dp="/study/assets/image-20211221185505869.43460ded.png",Fp="/study/assets/image-20211221185940035.3f33933d.png",Lp="/study/assets/image-20211221190423652.4d2ccad0.png",Rp="/study/assets/image-20211221190938925.1c163916.png",Ep="/study/assets/image-20211221205210092.6800319f.png",Np="/study/assets/image-20211221210739713.960e2f1b.png",Wp="/study/assets/image-20211221211043210.ebdfd355.png";const Ap={},Qp=i('

                                                                      \u64CD\u4F5C\u7CFB\u7EDF

                                                                      \u7B2C\u4E00\u7AE0

                                                                      \u64CD\u4F5C\u7CFB\u7EDF\u7684\u6982\u5FF5\u3001\u529F\u80FD\u548C\u76EE\u6807

                                                                      1. \u64CD\u4F5C\u7CFB\u7EDF\u7684\u6982\u5FF5\uFF1A

                                                                        image-20211014183700023

                                                                        \u64CD\u4F5C\u7CFB\u7EDF\u662F\u6307\u63A7\u5236\u548C\u7BA1\u7406\u6574\u4E2A\u8BA1\u7B97\u673A\u7CFB\u7EDF\u7684\u786C\u4EF6\u548C\u8F6F\u4EF6\u8D44\u6E90\uFF0C\u5E76\u5408\u7406\u5730\u7EC4\u7EC7\u8C03\u5EA6\u8BA1\u7B97\u673A\u7684\u5DE5\u4F5C\u548C\u8D44\u6E90\u7684\u5206\u914D\u3002\uFF08\u8981\u6CE8\u610F\u64CD\u4F5C\u7CFB\u7EDF\u4E5F\u8981\u7BA1\u7406\u786C\u4EF6\u8D44\u6E90\uFF0C\u4E0D\u53EA\u662F\u7BA1\u7406\u8F6F\u4EF6\u8D44\u6E90\uFF0C\u6BD4\u5982\u64CD\u4F5C\u7CFB\u7EDF\u8981\u7BA1\u7406\u8F6F\u4EF6\u5373\u5E94\u7528\u7A0B\u5E8F\u5360\u7528CPU\u7B49\uFF0C\u76F8\u5F53\u4E8E\u662F\u8981\u7BA1\u7406CPU\uFF0C\u64CD\u4F5C\u7CFB\u7EDF\u80FD\u591F\u7BA1\u7406\u786C\u4EF6\uFF0C\u80FD\u591F\u7BA1\u7406\u5E94\u7528\u7A0B\u5E8F\u8FD9\u79CD\u8F6F\u4EF6\uFF01\uFF01\uFF09

                                                                        image-20211215161802637

                                                                        \u5E76\u4E14\u64CD\u4F5C\u7CFB\u7EDF\u7ED9\u4E0A\u5C42\u7528\u6237\u548C\u5176\u4ED6\u5E94\u7528\u8F6F\u4EF6\u63D0\u4F9B\u65B9\u4FBF\u7684\u63A5\u53E3\u548C\u73AF\u5883\uFF0C\u64CD\u4F5C\u7CFB\u7EDF\u662F\u8BA1\u7B97\u673A\u7CFB\u7EDF\u4E2D\u6700\u57FA\u672C\u7684\u7CFB\u7EDF\u8F6F\u4EF6\u3002

                                                                        \u64CD\u4F5C\u7CFB\u7EDF\u8D1F\u8D23\u7BA1\u7406\u548C\u534F\u8C03\u786C\u4EF6\u8F6F\u4EF6\u8D44\u6E90\u3002

                                                                      2. \u8FDB\u7A0B\u662F\u4E00\u4E2A\u7A0B\u5E8F\u7684\u6267\u884C\u8FC7\u7A0B\uFF0C\u6267\u884C\u524D\u9700\u8981\u5C06\u8BE5\u7A0B\u5E8F\u653E\u5230\u5185\u5B58\u4E2D\uFF0C\u624D\u80FD\u88ABCPU\u5904\u7406

                                                                        \u653E\u5230\u5185\u5B58\u4E2D\u7684\u7A0B\u5E8F\uFF0C\u53EF\u4EE5\u7406\u89E3\u4E3A\u8FDB\u7A0B\u3002\u7A0B\u5E8F\u662F\u9759\u6001\u7684\uFF0C\u5C31\u662F\u5B58\u653E\u5728\u786C\u76D8\u4E0A\u7684\u9759\u6001\u4EE3\u7801\uFF0C\u5C31\u53EB\u505A\u7A0B\u5E8F\uFF0C\u8981\u8BA9\u7A0B\u5E8F\u8DD1\u8D77\u6765\uFF0C\u9700\u8981\u901A\u8FC7CPU\uFF0C\u6216\u8005\u8BF4\uFF0C\u9700\u8981CPU\u6765\u5BF9\u8FD9\u4E2A\u7A0B\u5E8F\u8FDB\u884C\u5904\u7406\uFF0C\u5373\u901A\u8FC7CPU\u8BA9\u8FD9\u6BB5\u7A0B\u5E8F\u8DD1\u8D77\u6765\uFF0C\u90A3\u4E48\u8FD9\u4E2A\u7A0B\u5E8F\u4F1A\u653E\u5230\u5185\u5B58\u4E2D\uFF0C\u624D\u80FD\u88ABCPU\u8FDB\u884C\u5904\u7406\uFF0C\u4E5F\u5C31\u662F\u201C\u8DD1\u8D77\u6765\u201D\u3002

                                                                      3. \u64CD\u4F5C\u7CFB\u7EDF\u7684\u529F\u80FD\u548C\u76EE\u6807\uFF1A

                                                                        • \u64CD\u4F5C\u7CFB\u7EDF\u4F5C\u4E3A**\u7CFB\u7EDF\u8D44\u6E90\uFF08\u786C\u4EF6\u8D44\u6E90\u548C\u8F6F\u4EF6\u8D44\u6E90\uFF09**\u7684\u7BA1\u7406\u8005\uFF1A

                                                                          • \u5904\u7406\u673A\u7BA1\u7406

                                                                            \u8FDB\u7A0B\u9700\u8981\u7B49\u5F85CPU\u8D44\u6E90\u7684\u5206\u914D

                                                                          • \u6587\u4EF6\u7BA1\u7406

                                                                          • \u8BBE\u5907\u7BA1\u7406

                                                                          • \u5B58\u50A8\u5668\u7BA1\u7406

                                                                        • \u64CD\u4F5C\u7CFB\u7EDF\u4F5C\u4E3A\u7528\u6237\u548C\u8BA1\u7B97\u673A\u786C\u4EF6\u4E4B\u95F4\u7684\u63A5\u53E3\uFF1A

                                                                          • \u547D\u4EE4\u63A5\u53E3

                                                                            \u5141\u8BB8\u7528\u6237\u76F4\u63A5\u4F7F\u7528

                                                                            • \u8054\u673A\u547D\u4EE4\u63A5\u53E3
                                                                            • \u8131\u673A\u547D\u4EE4\u63A5\u53E3
                                                                          • \u7A0B\u5E8F\u63A5\u53E3

                                                                            \u5141\u8BB8\u7528\u6237\u901A\u8FC7\u7A0B\u5E8F\u95F4\u63A5\u4F7F\u7528

                                                                            \u7CFB\u7EDF\u8C03\u7528

                                                                          • GUI---\u56FE\u5F62\u7528\u6237\u754C\u9762

                                                                            \u73B0\u4EE3\u64CD\u4F5C\u7CFB\u7EDF\u4E2D\u6700\u6D41\u884C\u7684\u56FE\u5F62\u7CFB\u7EDF\u3002

                                                                        • \u64CD\u4F5C\u7CFB\u7EDF\u4F5C\u4E3A\u6700\u63A5\u8FD1\u786C\u4EF6\u7684\u5C42\u6B21\uFF0C\u9700\u8981\u5728\u7EAF\u786C\u4EF6\u7684\u57FA\u7840\u4E0A\u5B9E\u73B0\u4EC0\u4E48\u529F\u80FD\uFF1A

                                                                          \u5B9E\u73B0\u5BF9\u786C\u4EF6\u673A\u5668\u7684\u62D3\u5C55

                                                                          \u64CD\u4F5C\u7CFB\u7EDF\u662F\u8F6F\u4EF6\uFF0C\u662F\u7CFB\u7EDF\u8F6F\u4EF6\u3002

                                                                      4. \u64CD\u4F5C\u7CFB\u7EDF\u4F5C\u4E3A\u7528\u6237\u548C\u8BA1\u7B97\u673A\u786C\u4EF6\u4E4B\u95F4\u7684\u63A5\u53E3

                                                                        \u7528\u6237\u63A5\u53E3

                                                                        • \u547D\u4EE4\u63A5\u53E3

                                                                          • \u8054\u673A\u547D\u4EE4\u63A5\u53E3

                                                                            \u7528\u6237\u8BF4\u4E00\u53E5\uFF0C\u7CFB\u7EDF\u505A\u4E00\u53E5

                                                                            \u8054\u673A\u547D\u4EE4\u63A5\u53E3 = \u4EA4\u4E92\u5F0F\u547D\u4EE4\u63A5\u53E3\uFF0C\u4F8B\u5982windows\u7CFB\u7EDF\u4E2D\u7684\u547D\u4EE4\u884C\u3002

                                                                          • \u8131\u673A\u547D\u4EE4\u63A5\u53E3

                                                                            \u7528\u6237\u8BF4\u4E00\u5806\uFF0C\u7CFB\u7EDF\u505A\u4E00\u5806

                                                                            \u76F8\u5F53\u4E8E\u662F\u6279\u5904\u7406\u547D\u4EE4\u63A5\u53E3\u3002

                                                                        • \u7A0B\u5E8F\u63A5\u53E3

                                                                          \u7531\u4E00\u7EC4\u7CFB\u7EDF\u8C03\u7528\u7EC4\u6210\uFF0C\u53EA\u80FD\u901A\u8FC7\u7528\u6237\u7A0B\u5E8F\u95F4\u63A5\u4F7F\u7528\u3002

                                                                          \u5728\u5927\u591A\u6570\u60C5\u51B5\u4E0B\uFF0C\u7A0B\u5E8F\u63A5\u53E3\u548C\u7CFB\u7EDF\u8C03\u7528\u4E24\u4E2A\u540D\u8BCD\u662F\u76F8\u7B49\u7684\u3002

                                                                      \u64CD\u4F5C\u7CFB\u7EDF\u7684\u56DB\u4E2A\u7279\u5F81

                                                                      1. \u64CD\u4F5C\u7CFB\u7EDF\u6709\u5E76\u53D1\u3001\u5171\u4EAB\u3001\u865A\u62DF\u3001\u5F02\u6B65\u8FD9\u56DB\u4E2A\u7279\u5F81\u3002

                                                                        \u5176\u4E2D\u5E76\u53D1\u548C\u5171\u4EAB\u662F\u4E24\u4E2A\u6700\u57FA\u672C\u7684\u7279\u5F81\uFF0C\u4E8C\u8005\u4E92\u4E3A\u5B58\u5728\u6761\u4EF6\u3002

                                                                      \u5E76\u53D1

                                                                      1. \u6307\u4E24\u4E2A\u6216\u591A\u4E2A\u4E8B\u4EF6\u5728\u540C\u4E00\u65F6\u95F4\u95F4\u9694\u5185\u53D1\u751F\uFF0C\u8FD9\u4E9B\u4E8B\u4EF6\u5B8F\u89C2\u4E0A\u662F\u540C\u65F6\u53D1\u751F\u7684\uFF0C\u4F46\u5FAE\u89C2\u4E0A\u662F\u4EA4\u66FF\u53D1\u751F\u7684

                                                                        \u5E76\u884C\uFF1A

                                                                        \u6307\u4E24\u4E2A\u6216\u591A\u4E2A\u4E8B\u4EF6\u5728\u540C\u4E00\u65F6\u523B\u540C\u65F6\u53D1\u751F\u3002

                                                                      2. \u4E00\u4E2A\u5355\u6838\u5904\u7406\u5668\uFF08CPU\uFF09\u5728\u540C\u4E00\u65F6\u523B\u53EA\u80FD\u6267\u884C\u4E00\u4E2A\u7A0B\u5E8F\uFF0C\u56E0\u6B64\u64CD\u4F5C\u7CFB\u7EDF\u4F1A\u8D1F\u8D23\u534F\u8C03\u591A\u4E2A\u7A0B\u5E8F\u4EA4\u66FF\u6267\u884C\uFF0C\u8FD9\u4E9B\u7A0B\u5E8F\u5FAE\u89C2\u4E0A\u662F\u4EA4\u66FF\u6267\u884C\u7684\uFF0C\u4F46\u662F\u5728\u5B8F\u89C2\u4E0A\u770B\u8D77\u6765\u50CF\u662F\u540C\u65F6\u6267\u884C\uFF08\u5E76\u884C\uFF09\u3002

                                                                        \u8FD9\u5C31\u662F\u5E76\u53D1\uFF0C\u5FAE\u89C2\u4E0A\u662F\u4EA4\u66FF\u6267\u884C\uFF0C\u5B8F\u89C2\u4E0A\u662F\u5E76\u884C\u6267\u884C\uFF0C\u5E76\u884C\u5373\u540C\u65F6\u3002

                                                                        \u6240\u4EE5\u5E76\u4E0D\u662F\u91C7\u7528\u591A\u7EBF\u7A0B\u7684\u65B9\u5F0F\u5C31\u4E00\u5B9A\u6267\u884C\u6548\u7387\u66F4\u9AD8\uFF0C\u6267\u884C\u66F4\u5FEB\uFF0C\u56E0\u4E3A\u5982\u679C\u662F\u5355\u6838CPU\uFF0C\u90A3\u4E48\u5728\u5FAE\u89C2\u4E0A\u4ECD\u7136\u662F\u5E76\u53D1\u6267\u884C\uFF0C\u4EA4\u66FF\u6267\u884C\u7684\uFF0C\u5E76\u4E0D\u662F\u771F\u6B63\u610F\u4E49\u4E0A\u7684\u5E76\u884C\u6267\u884C\uFF0C\u5982\u679C\u5355\u6838CPU\u91C7\u7528\u591A\u7EBF\u7A0B\u6267\u884C\u4EFB\u52A1\u7684\u65B9\u5F0F\uFF0C\u8FD8\u5B58\u5728\u7EBF\u7A0B\u7684\u4E0A\u4E0B\u6587\u5207\u6362\uFF0C\u7CFB\u7EDF\u7684\u8D44\u6E90\u9650\u5236\u548C\u6B7B\u9501\u7B49\u95EE\u9898\uFF0C\u9020\u6210\u591A\u7EBF\u7A0B\u53CD\u800C\u6BD4\u5355\u7EBF\u7A0B\u66F4\u6162\u3002

                                                                        \u5982\u679C\u662F\u591A\u6838CPU\u90A3\u4E48\uFF0C \u591A\u7EBF\u7A0B\u5728\u5FAE\u89C2\u4E0A\u624D\u662F\u771F\u6B63\u610F\u4E49\u4E0A\u7684\u5E76\u884C\u6267\u884C\u3002

                                                                        CPU\u5BC6\u96C6\u578B\uFF0C\u90A3\u4E48\u5E76\u4E0D\u662F\u7EBF\u7A0B\u8D8A\u591A\u8D8A\u597D\uFF0C\u56E0\u4E3A\u76F8\u5F53\u4E8E\u5E76\u4E0D\u5B58\u5728CPU\u4F1A\u7A7A\u95F2\u7684\u72B6\u51B5\uFF0C\u6240\u4EE5\u7EBF\u7A0B\u6570\u7B49\u4E8ECPU\u6838\u5FC3\u6570\u5C31\u53EF\u4EE5\uFF0C\u5982\u679C\u662FIO\u5BC6\u96C6\u578B\uFF0C\u90A3\u4E48\u5C31\u4F1A\u51FA\u73B0\u5927\u91CFCPU\u7A7A\u95F2\u7684\u65F6\u95F4\uFF0C\u4E3A\u4E86\u63D0\u9AD8CPU\u7684\u6267\u884C\u6548\u7387\uFF0C\u53EF\u4EE5\u91C7\u7528\u66F4\u591A\u7684\u7EBF\u7A0B\u6570\uFF08CPU\u6838\u5FC3\u6570\u7684\u4E24\u500D\uFF09\u3002

                                                                      3. \u5373\u4F7F\u6709\u591A\u6838CPU\uFF0C\u4F46\u662F\u64CD\u4F5C\u7CFB\u7EDF\u7684\u5E76\u53D1\u6027\u4F9D\u7136\u5FC5\u4E0D\u53EF\u5C11\uFF01\uFF01\u9664\u975E\u6709\u591A\u5C11\u6838\u5FC3\uFF0C\u5C31\u53EA\u6709\u591A\u5C11\u4EFB\u52A1\u6570\uFF0C\u90A3\u4E48\u5C31\u53EA\u9700\u8981\u591A\u5C11\u4E2A\u7EBF\u7A0B\u5C31\u80FD\u5904\u7406\u4E86\uFF0C\u8FBE\u5230\u771F\u6B63\u7684\u5E76\u884C\uFF0C\u4F46\u662F\u4EFB\u52A1\u6570\u6216\u8005\u7EBF\u7A0B\u6570\u6BD4\u6838\u5FC3\u591A\u662F\u5F88\u5E38\u89C1\u7684\u60C5\u51B5\u3002\uFF08\u5728\u8FD9\u79CD\u573A\u666F\u4E0B\uFF0C\u5C06\u7EBF\u7A0B\u548C\u4EFB\u52A1\u8BA4\u4E3A\u662F\u4E00\u4E2A\u4E1C\u897F\u662F\u6CA1\u6709\u95EE\u9898\u7684\uFF0C\u5728Java\u7EBF\u7A0B\u6C60\u7684\u90E8\u5206\uFF0C\u7EBF\u7A0B\u548C\u4EFB\u52A1\u4E0D\u8981\u8BA4\u4E3A\u662F\u4E00\u4E2A\u4E1C\u897F\uFF0C\u4EFB\u52A1\u672C\u8D28\u662F\u5B9E\u73B0\u4E86Runnable\u6216\u8005\u8BF4Callable\u63A5\u53E3\u7684\u5B9E\u73B0\u7C7B\u5BF9\u8C61\uFF0C\u4EFB\u52A1\u662F\u8981\u4EA4\u7ED9\u7EBF\u7A0B\u6765\u6267\u884C\u7684\uFF0C\u5982\u679C\u7EBF\u7A0B\u8FBE\u5230\u6838\u5FC3\u7EBF\u7A0B\u6570\u91CF\u7684\u6700\u5927\u503C\uFF0C\u90A3\u4E48\u4F1A\u53BB\u68C0\u67E5\u4EFB\u52A1\u963B\u585E\u961F\u5217\u662F\u5426\u6EE1\uFF0C\u5982\u679C\u672A\u6EE1\uFF0C\u5219\u65B0\u4EFB\u52A1\u4F1A\u6DFB\u52A0\u8FDB\u963B\u585E\u961F\u5217\uFF0C\u5982\u679C\u5DF2\u6EE1\uFF0C\u518D\u68C0\u67E5\u6B64\u7EBF\u7A0B\u6C60\u7684\u6700\u5927\u7EBF\u7A0B\u6570\uFF0C\u5982\u679C\u672A\u8FBE\u5230\u6700\u5927\u7EBF\u7A0B\u6570\uFF0C\u5C06\u6B64\u4EFB\u52A1\u4EA4\u7ED9\u975E\u6838\u5FC3\u7EBF\u7A0B\u6267\u884C\uFF0C\u975E\u6838\u5FC3\u7EBF\u7A0B\u662F\u6709\u5B58\u6D3B\u65F6\u95F4\u7684\uFF0C\u5982\u679C\u5DF2\u8FBE\u5230\u6700\u5927\u7EBF\u7A0B\u6570\uFF0C\u8BF4\u660E\u6CA1\u6709\u591A\u7684\u7EBF\u7A0B\u80FD\u591F\u6267\u884C\u6B64\u4EFB\u52A1\uFF0C\u90A3\u4E48\u4F1A\u6267\u884C\u62D2\u7EDD\u7B56\u7565\u3002\uFF09

                                                                      4. CPU\u67094\u4E2A\u6838\u5FC3\uFF0C\u610F\u5473\u7740\u53EF\u4EE5\u5E76\u884C\u5730\u6267\u884C4\u4E2A\u4EFB\u52A1\uFF0C\u4F46\u662F\u8BA1\u7B97\u673A\u540C\u65F6\u8FD0\u884C\u8D85\u8FC74\u4E2A\u4EFB\u52A1\u7684\u60C5\u51B5\u662F\u5B58\u5728\u7684\u3002\u6240\u4EE5\u5E76\u53D1\u5FC5\u4E0D\u53EF\u5C11\uFF0C\u4E5F\u5C31\u662F\u5FAE\u89C2\u4E0A\u7684\u5E76\u53D1\u6267\u884C\uFF0C\u4EFB\u52A1\u5E76\u53D1\u5730\u5360\u7528CPU\u8D44\u6E90\u8FD9\u79CD\u60C5\u51B5\u5FC5\u4E0D\u53EF\u5C11\u3002

                                                                      \u5171\u4EAB

                                                                      1. \u5171\u4EAB\u5373\u8D44\u6E90\u5171\u4EAB\uFF0C\u5206\u4E3A\u540C\u65F6\u5171\u4EAB\u548C\u4E92\u65A5\u5171\u4EAB\u3002

                                                                        \u5171\u4EAB\u662F\u6307\u7CFB\u7EDF\u4E2D\u7684\u8D44\u6E90\u53EF\u4F9B\u5185\u5B58\u4E2D\u591A\u4E2A\u5E76\u53D1\u6267\u884C\u7684\u8FDB\u7A0B\u5171\u540C\u4F7F\u7528\u3002

                                                                      2. \u4E92\u65A5\u5171\u4EAB\uFF1A

                                                                        \u7CFB\u7EDF\u4E2D\u7684\u67D0\u4E9B\u8D44\u6E90\uFF0C\u867D\u7136\u53EF\u4EE5\u63D0\u4F9B\u7ED9\u591A\u4E2A\u8FDB\u7A0B\u4F7F\u7528\uFF0C\u4F46\u4E00\u4E2A\u65F6\u95F4\u6BB5\u5185\u53EA\u5141\u8BB8\u4E00\u4E2A\u8FDB\u7A0B\u8BBF\u95EE\u8BE5\u8D44\u6E90\u3002

                                                                        \u4F7F\u7528QQ\u548C\u5FAE\u4FE1\u89C6\u9891\uFF0C\u540C\u4E00\u65F6\u95F4\u6BB5\u5185\u6444\u50CF\u5934\u53EA\u80FD\u5206\u914D\u7ED9\u5176\u4E2D\u4E00\u4E2A\u8FDB\u7A0B\u3002

                                                                        \u540C\u65F6\u5171\u4EAB\uFF1A

                                                                        \u7CFB\u7EDF\u4E2D\u7684\u67D0\u4E9B\u8D44\u6E90\uFF0C\u5141\u8BB8\u4E00\u4E2A\u65F6\u95F4\u6BB5\u5185\u591A\u4E2A\u8FDB\u7A0B\u201C\u540C\u65F6\u201D\u5BF9\u4ED6\u4EEC\u8FDB\u884C\u8BBF\u95EE\uFF08\u5B8F\u89C2\u4E0A\u662F\u540C\u65F6\u7684\uFF09

                                                                        \u6240\u8C13\u7684\u540C\u65F6\u5F80\u5F80\u662F\u5B8F\u89C2\u4E0A\u7684\uFF0C\u800C\u5728\u5FAE\u89C2\u4E0A\uFF0C\u8FD9\u4E9B\u8FDB\u7A0B\u53EF\u80FD\u662F\u4EA4\u66FF\u5730\u5BF9\u8BE5\u8D44\u6E90\u8FDB\u884C\u8BBF\u95EE\u7684\u3002\u5FAE\u89C2\u4E0A\u4EA4\u66FF\u5C31\u662F\u5E76\u53D1\u3002\uFF08\u540C\u65F6\u5171\u4EAB\uFF0C\u5FAE\u89C2\u4E0A\u591A\u4E2A\u8FDB\u7A0B\u53EF\u80FD\u662F\u771F\u7684\u540C\u65F6\u8BBF\u95EE\u8D44\u6E90\uFF09

                                                                      3. \u5E76\u53D1\u6027\u662F\u6307\u8BA1\u7B97\u673A\u7CFB\u7EDF\u4E2D\u540C\u65F6\u5B58\u5728\u7740\u591A\u4E2A\u8FD0\u884C\u7740\u7684\u7A0B\u5E8F\uFF0C\u8FD9\u4E9B\u7A0B\u5E8F\u5728\u5FAE\u89C2\u4E0A\u662F\u7531CPU\u4EA4\u66FF\u6267\u884C\u7684\uFF08\u6BD4\u5982\u5355\u6838cpu\uFF0C\u4F46\u662F\u91C7\u7528\u591A\u7EBF\u7A0B\u7684\u65B9\u5F0F\u6267\u884C\u4EFB\u52A1\uFF0C\u90A3\u4E48\u5C31\u4F1A\u51FA\u73B0\u5FAE\u89C2\u4E0A\u5E76\u53D1\uFF0C\u5B8F\u89C2\u4E0A\u5E76\u884C\uFF09

                                                                        \u5171\u4EAB\u6027\u662F\u6307\u8FDB\u7A0B\u53EF\u4EE5\u540C\u65F6\u8BBF\u95EE\u7CFB\u7EDF\u8D44\u6E90\uFF0C\u53EF\u4EE5\u662F\u4E00\u6BB5\u65F6\u95F4\u6BB5\u5185\u53EA\u6709\u4E00\u4E2A\u8FDB\u7A0B\u80FD\u591F\u8BBF\u95EE\uFF0C\u8FD9\u53EB\u4E92\u65A5\u5171\u4EAB\uFF0C\u53EF\u4EE5\u662F\u4E00\u6BB5\u65F6\u95F4\u7AEF\u5185\u591A\u4E2A\u8FDB\u7A0B\u540C\u65F6\u8BBF\u95EE\uFF0C\u8FD9\u662F\u540C\u65F6\u5171\u4EAB\u3002

                                                                        \u5982\u679C\u5931\u53BB\u5E76\u53D1\u6027\uFF0C\u5219\u7CFB\u7EDF\u4E2D\u53EA\u6709\u4E00\u4E2A\u7A0B\u5E8F\u6B63\u5728\u8FD0\u884C\uFF0C\u5219\u5171\u4EAB\u6027\u5931\u53BB\u5B58\u5728\u7684\u610F\u4E49

                                                                        \u5982\u679C\u5931\u53BB\u5171\u4EAB\u6027\uFF0C\u5219\u591A\u4E2A\u8FDB\u7A0B\u4E0D\u80FD\u540C\u65F6\u8BBF\u95EE\u786C\u76D8\u8D44\u6E90\uFF0C\u5C31\u65E0\u6CD5\u5B9E\u73B0\u540C\u65F6\u53D1\u9001\u6587\u4EF6\uFF0C\u4E5F\u5C31\u65E0\u6CD5\u5E76\u53D1\u3002

                                                                        \u6240\u4EE5\u5171\u4EAB\u6027\u548C\u5E76\u53D1\u6027\u662F\u76F8\u4E92\u4F9D\u5B58\u7684\u3002

                                                                      \u865A\u62DF

                                                                      1. \u865A\u62DF\u662F\u6307\u628A\u4E00\u4E2A\u7269\u7406\u4E0A\u7684\u5B9E\u4F53\u53D8\u4E3A\u82E5\u5E72\u4E2A\u903B\u8F91\u4E0A\u7684\u5BF9\u5E94\u7269\uFF0C\u7269\u7406\u5B9E\u4F53\u662F\u5B9E\u9645\u5B58\u5728\u7684\uFF0C\u800C\u903B\u8F91\u4E0A\u5BF9\u5E94\u7269\u662F\u7528\u6237\u611F\u53D7\u5230\u7684\u3002

                                                                        \u865A\u62DF\u6280\u672F\u4E2D\u7684\u7A7A\u5206\u590D\u7528\u6280\u672F---\u865A\u62DF\u5B58\u50A8\u5668\u6280\u672F

                                                                        image-20211029171246758

                                                                      2. \u865A\u62DF\u6280\u672F\u7684\u65F6\u5206\u590D\u7528\u6280\u672F---\u865A\u62DF\u5904\u7406\u5668\u6280\u672F

                                                                        image-20211029171359873

                                                                        \u5904\u7406\u5668\u628A\u5927\u7684\u65F6\u95F4\u6BB5\u5206\u4E3A\u5404\u4E2A\u5F88\u5C0F\u7684\u65F6\u95F4\u7247\uFF0C\u901A\u8FC7\u65F6\u95F4\u7247\u8F6E\u8F6C\u7684\u673A\u5236\uFF0C\u4EA4\u66FF\u4E3A\u5404\u4E2A\u8FDB\u7A0B\u670D\u52A1\uFF0C\u8FD9\u662F\u65F6\u5206\u590D\u7528\u6280\u672F\uFF0C\u4E5F\u5C31\u662F\u865A\u62DF\u5904\u7406\u5668\u6280\u672F\uFF0C\u800C\u7A7A\u5206\u590D\u7528\u6280\u672F\u662F\u865A\u62DF\u5B58\u50A8\u5668\u6280\u672F\u3002

                                                                      3. \u663E\u7136\uFF0C\u5982\u679C\u5931\u53BB\u4E86\u5E76\u53D1\u6027\uFF0C\u5219\u4E00\u4E2A\u65F6\u95F4\u6BB5\u5185\u7CFB\u7EDF\u53EA\u9700\u8FD0\u884C\u4E00\u9053\u7A0B\u5E8F\uFF0C\u90A3\u4E48\u5C31\u5931\u53BB\u4E86\u5B9E\u73B0\u865A\u62DF\u6027\u7684\u610F\u4E49\u4E86\uFF0C\u56E0\u6B64\u6CA1\u6709\u5E76\u53D1\u6027\u5C31\u8C08\u4E0D\u4E0A\u865A\u62DF\u6027\u3002

                                                                      \u5F02\u6B65

                                                                      1. \u5F02\u6B65\u662F\u6307\uFF0C\u5728\u591A\u9053\u7A0B\u5E8F\u73AF\u5883\u4E0B\uFF0C\u5141\u8BB8\u591A\u4E2A\u7A0B\u5E8F\u5E76\u53D1\u6267\u884C\uFF0C\u4F46\u7531\u4E8E\u7CFB\u7EDF\u8D44\u6E90\u6709\u9650\uFF0C\u8FDB\u7A0B\u7684\u6267\u884C\u4E0D\u662F\u4E00\u8D2F\u5230\u5E95\u7684\uFF0C\u800C\u662F\u8D70\u8D70\u505C\u505C\uFF0C\u4EE5\u4E0D\u53EF\u9884\u77E5\u7684\u901F\u5EA6\u5411\u524D\u63A8\u8FDB\uFF0C\u8FD9\u5C31\u662F\u8FDB\u7A0B\u7684\u5F02\u6B65\u6027\u3002

                                                                        \u56E0\u4E3A\u5E76\u53D1\uFF0C\u56E0\u4E3A\u5171\u4EAB\uFF0C\u591A\u4E2A\u8FDB\u7A0B\u540C\u65F6\u8BBF\u95EE\u67D0\u4E2A\u7CFB\u7EDF\u8D44\u6E90\uFF0C\u6240\u4EE5\u5F02\u6B65\uFF0C\u4E0D\u53EF\u9884\u77E5\u7684\u901F\u5EA6\u63A8\u8FDB\uFF0C\u5982\u679C\u540C\u6B65\uFF0C\u90A3\u4E48\u4E00\u4E2A\u8FDB\u7A0B\u8BBF\u95EE\u5B8C\u6B64\u7CFB\u7EDF\u8D44\u6E90\u4E4B\u540E\uFF0C\u624D\u80FD\u53E6\u4E00\u4E2A\u8FDB\u7A0B\u8BBF\u95EE\u8FD9\u4E2A\u7CFB\u7EDF\u8D44\u6E90\uFF0C\u63A5\u7740\u4E0B\u4E00\u4E2A\u8FDB\u7A0B\uFF0C\u8FD9\u5C31\u662F\u540C\u6B65\uFF0C\u901F\u5EA6\u662F\u53EF\u9884\u77E5\u7684\uFF0C\u6CA1\u6709\u5171\u4EAB\u6027\uFF0C\u6CA1\u6709\u5E76\u53D1\uFF0C\u4E00\u4E2A\u6267\u884C\u5B8C\u4E4B\u540E\u4E0B\u4E00\u4E2A\u624D\u6267\u884C\u3002\uFF08\u8FD9\u91CC\u7684\u7CFB\u7EDF\u8D44\u6E90\u53EF\u4EE5\u7406\u89E3\u4E3ACPU\u65F6\u95F4\u7247\u3002\uFF09

                                                                        \u663E\u7136\uFF0C\u5982\u679C\u5931\u53BB\u4E86\u5E76\u53D1\u6027\uFF0C\u90A3\u4E48\u7CFB\u7EDF\u53EA\u80FD\u4E32\u884C\u5730\u5904\u7406\u5404\u4E2A\u8FDB\u7A0B\uFF0C\u867D\u7136\u56E0\u4E3A\u5E76\u53D1\uFF0C\u8FDB\u7A0B\u5728\u5FAE\u89C2\u4E0A\u4ECD\u7136\u662F\u88ABCPU\u4E32\u884C\u5904\u7406\u7684\uFF0C\u4F46\u662F\u6709\u4E0A\u4E0B\u6587\u5207\u6362\uFF0C\u6709\u7A0B\u5E8F\u8BA1\u6570\u5668\u4FDD\u5B58\u4E0B\u4E00\u6761\u5B57\u8282\u7801\u6307\u4EE4\u7684\u6267\u884C\u5730\u5740\uFF0C\u5E76\u4E0D\u662F\u4E00\u4E2A\u8FDB\u7A0B\u5B8C\u5168\u6267\u884C\u5B8C\u4E4B\u540E\u624D\u4F1A\u6267\u884C\u53E6\u4E00\u4E2A\u8FDB\u7A0B\uFF0C\u8FD9\u6D89\u53CA\u5230CPU\u5BF9\u591A\u7EBF\u7A0B\u7684\u6267\u884C\u7B56\u7565\uFF0C\u6BD4\u5982\u65F6\u95F4\u7247\u8F6E\u8F6C\u673A\u5236\u3002\u4F46\u662F\u4E32\u884C\u5C31\u6307\u7684\u662F\u4E00\u4E2A\u8FDB\u7A0B\u6267\u884C\u5B8C\u4E4B\u540E\u518D\u6267\u884C\u53E6\u4E00\u4E2A\u8FDB\u7A0B\u3002

                                                                        \u53EA\u6709\u7CFB\u7EDF\u62E5\u6709\u5E76\u53D1\u6027\uFF0C\u90A3\u4E48\u865A\u62DF\uFF0C\u5171\u4EAB\uFF0C\u5F02\u6B65\u624D\u6709\u610F\u4E49\u3002\u56E0\u4E3A\u6B63\u662F\u56E0\u4E3A\u5E76\u53D1\u6027\uFF0C\u4F7F\u5F97\u5171\u4EAB\u6027\u6709\u610F\u4E49\uFF0C\u5BF9\u7CFB\u7EDF\u8D44\u6E90\u7684\u5171\u4EAB\uFF08\u6BD4\u5982CPU\u65F6\u95F4\u7247\uFF09\uFF0C\u540C\u65F6\u7531\u4E8E\u7CFB\u7EDF\u8D44\u6E90\u7684\u9650\u5236\uFF0C\u5BFC\u81F4\u591A\u4E2A\u8FDB\u7A0B\u662F\u8D70\u8D70\u505C\u505C\uFF08\u5FAE\u89C2\u4E0A\u4ECD\u662F\u4E32\u884C\uFF0C\u4F46\u662F\u662F\u901A\u8FC7\u4E0A\u4E0B\u6587\u5207\u6362\uFF09\uFF0C\u4EE5\u4E0D\u53EF\u9884\u77E5\u7684\u901F\u5EA6\u5411\u524D\u63A8\u8FDB\uFF0C\u5BFC\u81F4\u4E86\u5F02\u6B65\u6027\u3002

                                                                        \u5982\u679C\u6CA1\u6709\u5E76\u53D1\u6027\uFF0C\u90A3\u4E48\u5C31\u662F\u67D0\u4E2A\u8FDB\u7A0B\u5B8C\u5168\u6267\u884C\u5B8C\u4E4B\u540E\uFF08\u56E0\u4E3A\u6CA1\u6709\u5E76\u53D1\u6027\uFF01\uFF01\uFF09\uFF0C\u6267\u884C\u4E0B\u4E00\u4E2A\u8FDB\u7A0B\uFF0C\u8FD9\u5C31\u662F\u540C\u6B65\u7684\uFF0C\u4E0D\u53EF\u80FD\u4F1A\u5BFC\u81F4\u5F02\u6B65\u6027\u3002\u4E00\u4E2A\u8FDB\u7A0B\u7684\u6267\u884C\u5FC5\u987B\u5B8C\u5168\u7B49\u4E0A\u4E00\u4E2A\u8FDB\u7A0B\u5B8C\u5168\u6267\u884C\u5B8C\u4E4B\u540E\u624D\u53EF\u4EE5\u6267\u884C\uFF0C\u56E0\u4E3A\u6CA1\u6709\u5E76\u53D1\uFF0C\u610F\u5473\u7740\u6CA1\u6709\u5B8F\u89C2\u4E0A\u7684\u5E76\u884C\u6267\u884C\uFF0C\u5FC5\u987B\u4E00\u4E2A\u63A5\u4E00\u4E2A\u3002

                                                                      2. \u5982\u679C\u8FDB\u7A0B\u7531\u4E8E\u6CA1\u6709\u83B7\u5F97\u67D0\u4E2A\u9700\u8981\u7684\u7CFB\u7EDF\u8D44\u6E90\uFF0C\u5BFC\u81F4\u8FDB\u7A0B\u65E0\u6CD5\u6267\u884C\uFF0C\u5219\u8FDB\u7A0B\u4F1A\u963B\u585E\uFF0C\u76F4\u5230\u83B7\u5F97\u7CFB\u7EDF\u8D44\u6E90\uFF0C\u8FDB\u7A0B\u88AB\u5524\u9192\uFF0C\u8FDB\u5165\u5C31\u7EEA\u72B6\u6001\uFF0C\u83B7\u5F97CPU\u65F6\u95F4\u7247\u4E4B\u540E\uFF0C\u8FDB\u7A0B\u7EE7\u7EED\u6267\u884C\u3002

                                                                      3. \u6CA1\u6709\u5E76\u53D1\u548C\u5171\u4EAB\uFF0C\u5C31\u8C08\u4E0D\u4E0A\u865A\u62DF\u548C\u5F02\u6B65\uFF0C\u56E0\u6B64\u5E76\u53D1\u548C\u5171\u4EAB\u662F\u64CD\u4F5C\u7CFB\u7EDF\u4E24\u4E2A\u6700\u57FA\u672C\u7684\u7279\u5F81\u3002

                                                                      \u64CD\u4F5C\u7CFB\u7EDF\u7684\u53D1\u5C55\u548C\u5206\u7C7B

                                                                      1. \u8BA1\u7B97\u673A\u53EF\u4EE5\u8BC6\u522B\u7684\u662F\u4E8C\u8FDB\u5236\u7684\u673A\u5668\u7801\uFF0C\u8BA1\u7B97\u673A\u53EA\u80FD\u4E4B\u522B0\u548C1\u4E8C\u8FDB\u5236\u6570\u3002

                                                                      2. OS\u7684\u53D1\u5C55\u548C\u5206\u7C7B

                                                                        image-20211215180652752

                                                                      3. \u624B\u5DE5\u64CD\u4F5C\u9636\u6BB5

                                                                        \u4E3B\u8981\u7F3A\u70B9\uFF1A\u7528\u6237\u72EC\u5360\u5168\u673A\uFF0C\u4EBA\u673A\u901F\u5EA6\u77DB\u76FE\u5BFC\u81F4\u8D44\u6E90\u5229\u7528\u7387\u4F4E\u3002

                                                                      4. \u5355\u9053\u6279\u5904\u7406\u7CFB\u7EDF

                                                                        \u5F15\u5165\u8131\u673A\u8F93\u5165\u3001\u8F93\u51FA\u6280\u672F\uFF08\u7528\u78C1\u5E26\u5B8C\u6210\uFF09\uFF0C\u5E76\u76D1\u7763\u7A0B\u5E8F\u8D1F\u8D23\u63A7\u5236\u4F5C\u4E1A\u7684\u8F93\u5165\u3001\u8F93\u51FA\u3002

                                                                        \u4E3B\u8981\u7F3A\u70B9\uFF1A\u5185\u5B58\u4E2D\u4EC5\u80FD\u6709\u4E00\u9053\u7A0B\u5E8F\u8FD0\u884C\uFF0C\u53EA\u6709\u8BE5\u7A0B\u5E8F\u8FD0\u884C\u7ED3\u675F\u4E4B\u540E\uFF0C\u624D\u80FD\u8C03\u5165\u4E0B\u4E00\u9053\u7A0B\u5E8F\uFF0CCPU\u6709\u5927\u91CF\u7684\u65F6\u95F4\u662F\u5728\u7A7A\u95F2\u7B49\u5F85IO\u5B8C\u6210\uFF0C\u8D44\u6E90\u5229\u7528\u7387\u4F9D\u65E7\u5F88\u4F4E\u3002\u4ECE\u8FD9\u91CC\u53EF\u4EE5\u770B\u51FA\uFF0C\u5355\u9053\u6279\u5904\u7406\u7CFB\u7EDF\u7684\u7F3A\u70B9\u5C31\u662F\u4E0D\u91C7\u7528\u591A\u7EBF\u7A0B\u7684\u7F3A\u70B9\u6216\u8005\u8BF4\u662F\u7CFB\u7EDF\u4E0D\u80FD\u5E76\u53D1\u6267\u884C\u8FDB\u7A0B\uFF0C\u53EA\u80FD\u4E32\u884C\u6267\u884C\u8FDB\u7A0B\u7684\u7F3A\u70B9\uFF0C\u5BFC\u81F4CPU\u5927\u91CF\u65F6\u95F4\u5904\u4E8E\u7A7A\u95F2\u72B6\u6001\uFF0C\u56E0\u4E3A\u7EBF\u7A0B\u6216\u8005\u8BF4\u8FDB\u7A0B\u6B63\u5728\u6267\u884CIO\u64CD\u4F5C\uFF0C\u90A3\u4E48\u4F1A\u963B\u585E\uFF0C\u6B64\u65F6CPU\u5904\u4E8E\u7A7A\u95F2\u72B6\u6001\uFF0C\u56E0\u4E3A\u8FDB\u7A0B\u6216\u8005\u7EBF\u7A0B\u963B\u585E\u4E86\uFF0CCPU\u4E0D\u80FD\u53BB\u6267\u884C\u522B\u7684\u7EBF\u7A0B\u6216\u8005\u8FDB\u7A0B\u6216\u8005\u4EFB\u52A1\uFF0C\u56E0\u4E3A\uFF0C\u4E32\u884C\u6267\u884C\uFF01\uFF01\u6240\u4EE5\u8981\u91C7\u7528\u591A\u7EBF\u7A0B\uFF0C\u6216\u8005\u8BF4\u8981\u591A\u7EBF\u7A0B\u7684\u597D\u5904\u3001\u5E76\u53D1\u6267\u884C\u7A0B\u5E8F\u7684\u597D\u5904\uFF0C\u5C31\u662F\u8BA9\u63D0\u9AD8CPU\u7684\u5229\u7528\u7387\uFF0C\u4EE5\u514D\u5F53\u67D0\u4E2A\u8FDB\u7A0BIO\u963B\u585E\u7684\u65F6\u5019\uFF0CCPU\u80FD\u591F\u6267\u884C\u53E6\u4E00\u4E2A\u8FDB\u7A0B\u6216\u7EBF\u7A0B\u800C\u4E0D\u662F\u5904\u4E8E\u7A7A\u95F2\u72B6\u6001\uFF0C\u63D0\u9AD8\u4E86\u5229\u7528\u7387\uFF0C\u63D0\u9AD8\u4E86\u7CFB\u7EDF\u7684\u541E\u5410\u91CF\u3002

                                                                      5. \u591A\u9053\u6279\u5904\u7406\u7CFB\u7EDF

                                                                        \u4E3B\u8981\u4F18\u70B9\uFF1A\u591A\u9053\u7A0B\u5E8F\u5E76\u53D1\u6267\u884C\uFF0C\u5171\u4EAB\u8BA1\u7B97\u673A\u8D44\u6E90\uFF0C\u8D44\u6E90\u5229\u7528\u7387\u5927\u5E45\u63D0\u5347\uFF0CCPU\u548C\u5176\u4ED6\u8D44\u6E90\u4FDD\u6301\u5FD9\u788C\u72B6\u6001\uFF0C\u63D0\u9AD8\u4E86CPU\u6267\u884C\u6548\u7387\uFF0C\u7CFB\u7EDF\u541E\u5410\u91CF\u589E\u5927\u3002\u8FD9\u5C31\u548C\u524D\u9762\u8BF4\u7684\u5355\u7EBF\u7A0B\u7684\u7F3A\u70B9\u76F8\u5BF9\u5E94\uFF0C\u5982\u679C\u662F\u5355\u7EBF\u7A0B\u6267\u884C\u4EFB\u52A1\uFF0C\u5982\u679C\u6267\u884C\u4E86IO\u5E76\u963B\u585E\uFF0C\u90A3\u4E48\u7EBF\u7A0B\u963B\u585E\uFF0CCPU\u4E5F\u53EA\u6709\u8DDF\u7740\u7B49\u5F85\uFF0C\u5982\u679C\u662F\u591A\u7EBF\u7A0B\uFF0CCPU\u53EF\u4EE5\u628A\u65F6\u95F4\u7247\u5206\u7ED9\u522B\u7684\u7EBF\u7A0B\uFF0C\u53BB\u6267\u884C\u522B\u7684\u4EFB\u52A1\uFF0C\u63D0\u9AD8CPU\u7684\u6267\u884C\u6548\u7387\uFF0C\u4E0D\u8BA9CPU\u7A7A\u95F2\u7B49\u5F85\uFF0C\u589E\u5927\u4E86\u7CFB\u7EDF\u541E\u5410\u91CF\u3002

                                                                        Redis\u662F\u91C7\u7528\u5355\u7EBF\u7A0B\uFF0C\u5C31\u662F\u56E0\u4E3Aredis\u6240\u6709\u64CD\u4F5C\u90FD\u5728\u5185\u5B58\u8303\u56F4\u5185\uFF0C\u4E0D\u6D89\u53CA\u5185\u5B58\u548C\u78C1\u76D8\u4E4B\u95F4\u7684IO\uFF0C\u6240\u4EE5\u4E0D\u5B58\u5728\u7EBF\u7A0B\u4F1A\u7531\u4E8EIO\u800C\u963B\u585E\u7684\u60C5\u51B5\uFF0CCPU\u4E5F\u4E0D\u4F1A\u56E0\u4E3A\u7EBF\u7A0B\u963B\u585E\u800C\u7B49\u5F85\uFF0C\u4E5F\u4E0D\u9700\u8981\u591A\u7EBF\u7A0B\u6765\u63D0\u9AD8\u7CFB\u7EDF\u7684\u541E\u5410\u91CF\u3002

                                                                      6. \u5355\u9053\u6279\u5904\u7406\u6280\u672F

                                                                        image-20211029181727331

                                                                        \u591A\u4E2A\u7A0B\u5E8F\u4E32\u884C\u6267\u884C\uFF0C\u4E32\u884C\u5DE5\u4F5C\u3002

                                                                        \u591A\u9053\u6279\u5904\u7406\u6280\u672F\u662F\u591A\u9053\u7A0B\u5E8F\u5E76\u53D1\u6267\u884C\u3002\uFF08\u4F46\u662F\u5E76\u4E0D\u662F\u65F6\u95F4\u7247\u8F6E\u8F6C\uFF0C\u800C\u662F\u4E00\u4E2A\u8FDB\u7A0B\u7684\u67D0\u9879\u4EFB\u52A1\u6267\u884C\u5B8C\u4E4B\u540E\uFF0CCPU\u518D\u53BB\u6267\u884C\u53E6\u4E00\u4E2A\u8FDB\u7A0B\u3002\uFF09

                                                                        image-20211029181850429

                                                                        \u4F7F\u7CFB\u7EDF\u8D44\u6E90\u5229\u7528\u7387\u5927\u5E45\u5EA6\u63D0\u5347

                                                                        \u4E0D\u540C\u8FDB\u7A0B\u5728\u5404\u81EA\u7684\u67D0\u4E9B\u9636\u6BB5\uFF0C\u80FD\u591F\u8FDB\u884C\u5E76\u884C\u7684\u5DE5\u4F5C\uFF0C\u6240\u4EE5\u63D0\u9AD8\u4E86\u7CFB\u7EDF\u8D44\u6E90\u5229\u7528\u7387\u3002

                                                                      7. \u5206\u65F6\uFF08\u65F6\u95F4\u7247\uFF09\u64CD\u4F5C\u7CFB\u7EDF\uFF1A

                                                                        \u8BA1\u7B97\u673A\u4EE5\u65F6\u95F4\u7247\u4E3A\u5355\u4F4D\u8F6E\u6D41\u4E3A\u5404\u4E2A\u7528\u6237/\u4F5C\u4E1A\u670D\u52A1\uFF0C\u5404\u4E2A\u7528\u6237\u53EF\u901A\u8FC7\u7EC8\u7AEF\u4E0E\u8BA1\u7B97\u673A\u8FDB\u884C\u4EA4\u4E92

                                                                        \u4E3B\u8981\u7F3A\u70B9\uFF1A

                                                                        \u4E0D\u80FD\u4F18\u5148\u5904\u7406\u4E00\u4E9B\u7D27\u6025\u4EFB\u52A1\uFF0C\u64CD\u4F5C\u7CFB\u7EDF\u5BF9\u5404\u4E2A\u7528\u6237/\u4F5C\u4E1A\u662F\u5B8C\u5168\u516C\u5E73\u7684\uFF0C\u5FAA\u73AF\u5730\u4F4D\u6BCF\u4E2A\u7528\u6237/\u4F5C\u4E1A\u670D\u52A1\u4E00\u4E2A\u65F6\u95F4\u7247\uFF0C\u4E0D\u533A\u5206\u4EFB\u52A1\u7684\u7D27\u6025\u6027\u3002\uFF08\u5728\u8FD9\u79CD\u573A\u666F\u4E0B\uFF0C\u4EFB\u52A1\u548C\u7EBF\u7A0B\u53EF\u4EE5\u7406\u89E3\u4E3A\u540C\u6837\u7684\u3002\uFF09

                                                                      8. \u5B9E\u65F6\u64CD\u4F5C\u7CFB\u7EDF\uFF1A

                                                                        \u4F18\u70B9\uFF1A\u80FD\u591F\u4F18\u5148\u54CD\u5E94\u4E00\u4E9B\u7D27\u6025\u4EFB\u52A1\uFF0C\u67D0\u4E9B\u7D27\u6025\u4EFB\u52A1\u4E0D\u9700\u65F6\u95F4\u7247\u6392\u961F\u3002

                                                                        \u5728\u5B9E\u65F6\u64CD\u4F5C\u7CFB\u7EDF\u7684\u63A7\u5236\u4E0B\uFF0C\u8BA1\u7B97\u673A\u7CFB\u7EDF\u63A5\u6536\u5230\u5916\u90E8\u4FE1\u53F7\u540E\u53CA\u65F6\u8FDB\u884C\u5904\u7406\uFF0C\u5E76\u4E14\u8981\u5728\u4E25\u683C\u7684\u65F6\u9650\u5185\u5904\u7406\u5B8C\u4E8B\u4EF6\u3002\u5B9E\u65F6\u64CD\u4F5C\u7CFB\u7EDF\u7684\u4E3B\u8981\u7279\u70B9\u662F\u53CA\u65F6\u6027\u548C\u53EF\u9760\u6027\u3002

                                                                        \u786C\u5B9E\u65F6\u7CFB\u7EDF\uFF1A\u5FC5\u987B\u5728\u7EDD\u5BF9\u4E25\u683C\u7684\u89C4\u5B9A\u65F6\u95F4\u5185\u5B8C\u6210\u5904\u7406

                                                                        \u8F6F\u5B9E\u65F6\u7CFB\u7EDF\uFF1A\u80FD\u63A5\u6536\u5076\u5C14\u8FDD\u53CD\u65F6\u95F4\u89C4\u5B9A\u3002

                                                                      9. image-20211029182506414

                                                                      \u64CD\u4F5C\u7CFB\u7EDF\u7684\u8FD0\u884C\u673A\u5236\u548C\u4F53\u7CFB\u7ED3\u6784

                                                                      \u8FD0\u884C\u673A\u5236

                                                                      1. \u6307\u4EE4\uFF1A

                                                                        \u7279\u6743\u6307\u4EE4\uFF1A\u5982\u5185\u5B58\u6E05\u96F6\u6307\u4EE4\uFF0C\u4E0D\u5141\u8BB8\u7528\u6237\u7A0B\u5E8F\u4F7F\u7528

                                                                        \u975E\u7279\u6743\u6307\u4EE4\uFF1A\u5982\u52A0\u51CF\u4E58\u9664\u6307\u4EE4

                                                                        \u95EE\u9898\uFF1ACPU\u5982\u4F55\u5224\u65AD\u5F53\u524D\u662F\u5426\u662F\u53EF\u4EE5\u6267\u884C\u7279\u6743\u6307\u4EE4\uFF1F

                                                                        \u5C31\u662F\u901A\u8FC7CPU\u7684\u72B6\u6001\uFF0CCPU\u6709\u4E24\u79CD\u72B6\u6001\uFF0C\u7528\u6237\u6001\u548C\u6838\u5FC3\u6001\u3002

                                                                      2. \u9AD8\u7EA7\u8BED\u8A00\u4EE3\u7801\u9700\u8981\u7ECF\u8FC7\u201C\u7FFB\u8BD1\u201D\u5F97\u5230\u673A\u5668\u8BED\u8A00\u6307\u4EE4\u6216\u8005\u8BF4\u673A\u5668\u7801\uFF0C\u8FD9\u662F\u8BA1\u7B97\u673A\u80FD\u591F\u8BC6\u522B\u7684\u4E8C\u8FDB\u5236\u7801\u3002\u8FD9\u4E2A\u8FC7\u7A0B\u5728Java\u4E2D\u662F\u7F16\u8BD1\uFF0C\u4F46\u662F\u4E0D\u5B8C\u5168\u7B49\u540C\uFF0C\u56E0\u4E3AJava\u662F\u5728JVM\u57FA\u7840\u4E0A\u8FD0\u884C\uFF0CJava\u8FD9\u79CD\u9AD8\u7EA7\u8BED\u8A00\u9996\u5148\u9700\u8981\u7ECF\u8FC7\u7F16\u8BD1\u5F97\u5230\u5B57\u8282\u7801\u6587\u4EF6\uFF0C\u5B57\u8282\u7801\u4E5F\u662F\u4E8C\u8FDB\u5236\u7801\uFF0C\u4F46\u662F\u4E0D\u7B49\u540C\u4E8E\u673A\u5668\u7801\u3002

                                                                        \u5B57\u8282\u7801\u867D\u7136\u662F\u4E8C\u8FDB\u5236\u7684\uFF0C\u5B57\u8282\u7801\u6587\u4EF6\u662F\u4E8C\u8FDB\u5236\u6587\u4EF6\uFF0C\u4F46\u662F\u5B57\u8282\u7801\u5E76\u4E0D\u80FD\u591F\u76F4\u63A5\u8FD0\u884C\u5728\u64CD\u4F5C\u7CFB\u7EDF\u4E4B\u4E0A\uFF0C\u56E0\u4E3A\u5B57\u8282\u7801\u6307\u4EE4\u5E76\u975E\u7B49\u4EF7\u4E8E\u80FD\u591F\u88ABCPU\u6240\u8BC6\u522B\u7684\u673A\u5668\u6307\u4EE4\uFF08\u673A\u5668\u7801\uFF09\uFF0C\u5B57\u8282\u7801\u6587\u4EF6\u5185\u90E8\u5305\u542B\u7684\u4EC5\u4EC5\u662F\u4E00\u4E9B\u80FD\u591F\u88ABJVM\u8BC6\u522B\u7684\u5B57\u8282\u7801\u6307\u4EE4\u3001\u7B26\u53F7\u8868\uFF0C\u4EE5\u53CA\u5176\u4ED6\u8F85\u52A9\u4FE1\u606F

                                                                        \u90A3\u4E48\uFF0C\u60F3\u8BA9\u4E00\u4E2AJava\u7A0B\u5E8F\u8FD0\u884C\u8D77\u6765\uFF0CJVM\u4E2D\u6267\u884C\u5F15\u64CE\u7684\u4EFB\u52A1\u5C31\u662F\u5C06\u5B57\u8282\u7801\u6307\u4EE4\u89E3\u91CA\u3001\u7F16\u8BD1\u6210\u4E3A\u5BF9\u5E94\u5E73\u53F0\u4E0A\u7684\u672C\u5730\u673A\u5668\u6307\u4EE4\u624D\u53EF\u4EE5\uFF0C\u7B80\u5355\u6765\u8BF4\uFF0CJVM\u4E2D\u7684\u6267\u884C\u5F15\u64CE\u5145\u5F53\u4E86\u5C06\u9AD8\u7EA7\u8BED\u8A00\u7FFB\u8BD1\u4E3A\u673A\u5668\u8BED\u8A00\u7684\u8BD1\u8005

                                                                        \u6267\u884C\u5F15\u64CE\u90E8\u5206\u6709JIT\u5373\u65F6\u7F16\u8BD1\u5668\uFF0C\u8FD8\u6709\u89E3\u91CA\u5668\uFF0C\u8FD8\u6709\u5783\u573E\u56DE\u6536\u5668\uFF0C\u5176\u4E2D\u89E3\u91CA\u5668\u5C31\u662F\u89E3\u91CA\u5B57\u8282\u7801\u6307\u4EE4\u5E76\u6267\u884C\uFF0CJIT\u5373\u65F6\u7F16\u8BD1\u5668\u5C31\u662F\u5C06\u5B57\u8282\u7801\u6307\u4EE4\u518D\u7FFB\u8BD1\u6210\u673A\u5668\u6307\u4EE4\u6216\u8005\u8BF4\u673A\u5668\u7801\uFF0C\u8FD9\u4E2A\u673A\u5668\u6307\u4EE4\u662F\u80FD\u591F\u88AB\u8BA1\u7B97\u673A\u3001CPU\u3001\u6216\u8005\u8BF4\u64CD\u4F5C\u7CFB\u7EDF\u8BC6\u522B\u7684\u4E8C\u8FDB\u5236\u7801\uFF08\u867D\u7136\u5B57\u8282\u7801\u662F\u4E8C\u8FDB\u5236\u7801\uFF0C\u4F46\u662F\u4E0D\u80FD\u88AB\u64CD\u4F5C\u7CFB\u7EDF\u8BC6\u522B\uFF0C\u662F\u80FD\u591F\u88ABJVM\u8BC6\u522B\uFF0C\u8FD9\u662FJava\u7F16\u7A0B\u8BED\u8A00\u7684\u7279\u6027\uFF09\uFF0CJIT\u5373\u65F6\u7F16\u8BD1\u5668\u7684\u4F5C\u7528\u5C31\u662F\u5C06\u5B57\u8282\u7801\u7FFB\u8BD1\u6210\u673A\u5668\u7801\uFF0C\u8FD9\u662F\u4E00\u4E2A\u4E8C\u6B21\u7F16\u8BD1\u7684\u8FC7\u7A0B\uFF0C\u4E5F\u5C31\u662F\u8BF4\u7B2C\u4E00\u6B21\u7F16\u8BD1\u662F\u4ECEJava\u9AD8\u7EA7\u8BED\u8A00\u5230\u5B57\u8282\u7801\u6587\u4EF6\uFF0C\u7B2C\u4E8C\u6B21\u7F16\u8BD1\u662F\u5728JVM\u7684\u6267\u884C\u5F15\u64CE\uFF0C\u5C06\u5B57\u8282\u7801\u7FFB\u8BD1\u6210\u673A\u5668\u7801\u3002

                                                                      3. \u4E00\u6761\u9AD8\u7EA7\u8BED\u8A00\u7684\u4EE3\u7801\u7FFB\u8BD1\u8FC7\u6765\u53EF\u80FD\u56DE\u5BF9\u5E94\u591A\u6761\u6307\u4EE4

                                                                        image-20211215204419631

                                                                        \u7B80\u5355\u6765\u8BF4\uFF0C\u201C\u6307\u4EE4\u201D\u5C31\u662F\u5904\u7406\u5668\uFF08CPU\uFF09\u6216\u8005\u5E7F\u4E49\u4E0A\u8BF4\u64CD\u4F5C\u7CFB\u7EDF\u80FD\u8BC6\u522B\u3001\u6267\u884C\u7684\u6700\u57FA\u672C\u6307\u4EE4\u3002

                                                                        \u6BD4\u5982\uFF1A\u52A0\u6CD5\u6307\u4EE4\u5C31\u662F\u8BA9CPU\u8FDB\u884C\u52A0\u6CD5\u8FD0\u7B97

                                                                      4. \u4E24\u79CD\u5904\u7406\u5668\u72B6\u6001\uFF1A

                                                                        \u7528\u6237\u6001\uFF08\u76EE\u6001\uFF09\uFF1A\u6B64\u65F6CPU\u53EA\u80FD\u6267\u884C\u975E\u7279\u6743\u6307\u4EE4

                                                                        \u6838\u5FC3\u6001\uFF08\u7BA1\u6001\uFF09\uFF1A\u6B64\u65F6CPU\u53EF\u4EE5\u6267\u884C\u7279\u6743\u6307\u4EE4\u548C\u975E\u7279\u6743\u6307\u4EE4

                                                                        \u7528\u7A0B\u5E8F\u72B6\u6001\u5B57\u5BC4\u5B58\u5668PSW\u4E2D\u67D0\u6807\u5FD7\u4F4D\u6765\u6807\u8BC6\u5F53\u524D\u5904\u7406\u5668\u5904\u4E8E\u4EC0\u4E48\u72B6\u6001\uFF0C\u59820\u4E3A\u7528\u6237\u6001\uFF0C1\u4E3A\u6838\u5FC3\u6001\u3002

                                                                        \u6709\u7684\u7A0B\u5E8F\u9700\u8981\u4F7F\u7528\u7279\u6743\u6307\u4EE4\uFF0C\u6709\u7684\u7A0B\u5E8F\u53EA\u80FD\u4F7F\u7528\u975E\u7279\u6743\u6307\u4EE4\u3002

                                                                      5. \u4E24\u79CD\u7A0B\u5E8F\uFF1A

                                                                        \u5185\u6838\u7A0B\u5E8F\uFF1A\u64CD\u4F5C\u7CFB\u7EDF\u7684\u5185\u6838\u7A0B\u5E8F\u662F\u7CFB\u7EDF\u7684\u7BA1\u7406\u8005\uFF0C\u65E2\u53EF\u4EE5\u6267\u884C\u7279\u6743\u6307\u4EE4\uFF0C\u4E5F\u53EF\u4EE5\u6267\u884C\u975E\u7279\u6743\u6307\u4EE4\uFF0C\u8FD0\u884C\u5728\u6838\u5FC3\u6001\u3002

                                                                        \u5E94\u7528\u7A0B\u5E8F\uFF1A\u4E3A\u4E86\u4FDD\u8BC1\u7CFB\u7EDF\u80FD\u5B89\u5168\u8FD0\u884C\uFF0C\u666E\u901A\u5E94\u7528\u7A0B\u5E8F\u53EA\u80FD\u6267\u884C\u975E\u7279\u6743\u6307\u4EE4\uFF0C\u8FD0\u884C\u5728\u7528\u6237\u6001\u3002

                                                                      \u64CD\u4F5C\u7CFB\u7EDF\u5185\u6838

                                                                      1. image-20211031173518958

                                                                        \u7279\u6743\u6307\u4EE4\u9700\u8981\u5728\u6838\u5FC3\u6001\u6267\u884C

                                                                        \u975E\u7279\u6743\u6307\u4EE4\u65E2\u53EF\u4EE5\u5728\u6838\u5FC3\u6001\u6267\u884C\uFF0C\u4E5F\u53EF\u4EE5\u5728\u7528\u6237\u6001\u6267\u884C

                                                                        \u9700\u8981\u4F7F\u7528\u7279\u6743\u6307\u4EE4\u7684\u7A0B\u5E8F\u79F0\u4E3A\u5185\u6838\u7A0B\u5E8F

                                                                        \u53EA\u80FD\u4F7F\u7528\u975E\u7279\u6743\u6307\u4EE4\u7684\u7A0B\u5E8F\u79F0\u4E3A\u5E94\u7528\u7A0B\u5E8F

                                                                      2. \u64CD\u4F5C\u7CFB\u7EDF\u6700\u63A5\u8FD1\u786C\u4EF6\u7684\u5C42\u6B21\u662F\u64CD\u4F5C\u7CFB\u7EDF\u5185\u6838

                                                                        \u53E6\u4E00\u90E8\u5206\u662F\u975E\u5185\u6838\u529F\u80FD\uFF0C\u6240\u4EE5\u53EF\u4EE5\u628A\u64CD\u4F5C\u7CFB\u7EDF\u5206\u4E3A\u5185\u6838\u529F\u80FD\u548C\u975E\u5185\u6838\u529F\u80FD

                                                                        image-20211215205340442

                                                                        \u539F\u8BED\u662F\u4E00\u79CD\u7279\u6B8A\u7684\u7A0B\u5E8F\uFF0C\u662F\u6700\u63A5\u8FD1\u786C\u4EF6\u7684\u90E8\u5206\uFF0C\u8FD9\u79CD\u7A0B\u5E8F\u7684\u8FD0\u884C\u5177\u6709\u539F\u5B50\u6027\u3002

                                                                      3. \u5185\u6838\u662F\u8BA1\u7B97\u673A\u4E0A\u914D\u7F6E\u7684\u5E95\u5C42\u8F6F\u4EF6\uFF08\u64CD\u4F5C\u7CFB\u7EDF\u672C\u8EAB\u662F\u7CFB\u7EDF\u8F6F\u4EF6\uFF0C\u53C8\u5206\u4E3A\u5185\u6838\u548C\u975E\u5185\u6838\u4E24\u90E8\u5206\uFF09\uFF0C\u662F\u64CD\u4F5C\u7CFB\u7EDF\u6700\u57FA\u672C\u6700\u6838\u5FC3\u7684\u90E8\u5206\uFF0C\u800C\u5B9E\u73B0\u64CD\u4F5C\u7CFB\u7EDF\u5185\u6838\u529F\u80FD\u7684\u7A0B\u5E8F\u5C31\u662F\u5185\u6838\u7A0B\u5E8F\u3002

                                                                        image-20211031180947464

                                                                      \u64CD\u4F5C\u7CFB\u7EDF\u4F53\u7CFB\u7ED3\u6784

                                                                      1. \u6709\u7684\u64CD\u4F5C\u7CFB\u7EDF\u5E76\u4E0D\u628A\u5BF9\u7CFB\u7EDF\u8D44\u6E90\u8FDB\u884C\u7BA1\u7406\u7684\u529F\u80FD\u5212\u5206\u4E3A\u5185\u6838\u529F\u80FD

                                                                        \u5982\u679C\u628A\u5BF9\u7CFB\u7EDF\u8D44\u6E90\u8FDB\u884C\u7BA1\u7406\uFF08\u5904\u7406\u5668\u7BA1\u7406\u3001\u5B58\u50A8\u5668\u7BA1\u7406\u3001\u8BBE\u5907\u7BA1\u7406\u3001\u6587\u4EF6\u7BA1\u7406\uFF09\u7684\u529F\u80FD\u4E5F\u5212\u5206\u4E3A\u5185\u6838\u529F\u80FD\uFF0C\u5219\u79F0\u8FD9\u4E2A\u5185\u6838\u662F\u5927\u5185\u6838

                                                                        \u5982\u679C\u4E0D\u628A\u7CFB\u7EDF\u8D44\u6E90\u7BA1\u7406\u529F\u80FD\u5212\u5206\u4E3A\u5185\u6838\u529F\u80FD\uFF0C\u5219\u79F0\u5185\u6838\u662F\u5FAE\u5185\u6838\u3002

                                                                      2. image-20211031181418067

                                                                        \u5927\u5185\u6838\u7684\u4F18\u70B9\u5C31\u662F\u6027\u80FD\u9AD8\uFF0C\u4E3B\u8981\u529F\u80FD\u6A21\u5757\u90FD\u8FD0\u884C\u5728\u6838\u5FC3\u6001\uFF0C\u51CF\u5C11\u4E86\u5904\u7406\u5668\u5728\u6838\u5FC3\u6001\u548C\u7528\u6237\u6001\u4E4B\u95F4\u7684\u5207\u6362\uFF01

                                                                        \u5FAE\u5185\u6838\uFF1A\u6838\u5FC3\u6001\u53EA\u8D1F\u8D23\u6700\u6838\u5FC3\u7684\u4E00\u4E9B\u5DE5\u4F5C\uFF0C\u4F18\u70B9\u662F\u7EC4\u7EC7\u7ED3\u6784\u6E05\u6670\uFF0C\u65B9\u4FBF\u7EF4\u62A4\uFF0C\u7F3A\u70B9\u662F\u6548\u7387\u4F4E\uFF0C\u56E0\u4E3A\u5FAE\u5185\u6838\uFF0C\u5E76\u4E0D\u662F\u8BB8\u591A\u4E3B\u8981\u529F\u80FD\u6A21\u5757\u90FD\u5728\u6838\u5FC3\u6001\uFF0C\u6240\u4EE5\u9700\u8981\u7ECF\u5E38\u8FDB\u884C\u6838\u5FC3\u6001\u548C\u7528\u6237\u6001\u4E4B\u95F4\u7684\u5207\u6362\uFF0C\u5BFC\u81F4\u6548\u7387\u4F4E\u3002

                                                                      3. \u64CD\u4F5C\u7CFB\u7EDF\u5185\u6838\u529F\u80FD\u6216\u8005\u8BF4\u5185\u6838\u7A0B\u5E8F\u4E00\u5B9A\u662F\u8FD0\u884C\u5728\u6838\u5FC3\u6001\u3002

                                                                      4. \u7279\u6743\u6307\u4EE4\u53EA\u80FD\u5728\u6838\u5FC3\u6001\u4E0B\u6267\u884C

                                                                        \u5185\u6838\u7A0B\u5E8F\u53EA\u80FD\u5728\u6838\u5FC3\u6001\u4E0B\u6267\u884C

                                                                      \u4E2D\u65AD\u548C\u5F02\u5E38

                                                                      \u4E2D\u65AD\u673A\u5236\u7684\u8BDE\u751F

                                                                      1. \u65E9\u671F\u7684\u8BA1\u7B97\u673A\u4E2D\uFF0C\u5404\u4E2A\u7A0B\u5E8F\u53EA\u80FD\u4E32\u884C\u6267\u884C\uFF0C\u5C31\u662F\u5355\u9053\u6279\u5904\u7406\u7CFB\u7EDF\uFF0C\u540C\u4E00\u65F6\u523B\uFF0C\u5904\u7406\u5668\u53EA\u80FD\u5904\u7406\u4E00\u9053\u7A0B\u5E8F\uFF0C\u7CFB\u7EDF\u8D44\u6E90\u5229\u7528\u7387\u4F4E

                                                                        \u5F15\u5165\u4E2D\u65AD\u673A\u5236\uFF0C\u5B9E\u73B0\u4E86\u591A\u9053\u7A0B\u5E8F\u5E76\u53D1\u6267\u884C

                                                                        \u672C\u8D28\uFF1A\u53D1\u751F\u4E2D\u65AD\u5C31\u610F\u5473\u7740\u9700\u8981\u64CD\u4F5C\u7CFB\u7EDF\u4ECB\u5165\uFF0C\u5F00\u5C55\u7BA1\u7406\u5DE5\u4F5C

                                                                      2. CPU\u5207\u6362\u4E3A\u6838\u5FC3\u6001\uFF0C\u5BF9\u4E2D\u65AD\u4FE1\u53F7\u8FDB\u884C\u5904\u7406

                                                                        \u5904\u7406\u5B8C\u540E\uFF0C\u518D\u5207\u6362\u4E3A\u7528\u6237\u6001\uFF0C\u6267\u884C\u8FDB\u7A0B

                                                                      3. CPU\u53EF\u80FD\u4F1A\u6536\u5230\u8BA1\u65F6\u90E8\u4EF6\u53D1\u9001\u7684\u4E2D\u65AD\u4FE1\u53F7\uFF0C\u901A\u77E5CPU\u73B0\u5728\u5DF2\u7ECF\u8FC7\u4E86\u4E00\u4E2A\u65F6\u95F4\u7247\u4E86\uFF0C\u5F53CPU\u6536\u5230\u4E2D\u65AD\u4FE1\u53F7\uFF0C\u90A3\u4E48CPU\u4F1A\u7ACB\u5373\u5207\u6362\u5230\u6838\u5FC3\u6001\uFF08\u7528\u6237\u6001\u548C\u6838\u5FC3\u6001\u662F\u8BF4\u7684CPU\u72B6\u6001\uFF09\uFF0C\u7136\u540E\u628ACPU\u7684\u4F7F\u7528\u6743\u9650\u4EA4\u7ED9\u64CD\u4F5C\u7CFB\u7EDF\uFF0C\u64CD\u4F5C\u7CFB\u7EDF\u7684\u5185\u6838\u5C31\u4F1A\u5F00\u59CB\u5BF9\u4E2D\u65AD\u4FE1\u53F7\u8FDB\u884C\u5904\u7406\uFF0C\u64CD\u4F5C\u7CFB\u7EDF\u5185\u6838\u53D1\u73B0\u521A\u624D\u7684\u4E2D\u65AD\u4FE1\u53F7\u662F\u544A\u8BC9CPU\u65F6\u95F4\u7247\u5DF2\u5230\uFF0C\u90A3\u4E48\u64CD\u4F5C\u7CFB\u7EDF\u4F1A\u8FDB\u884C\u8FDB\u7A0B1\u548C\u8FDB\u7A0B2\u4E4B\u95F4\u7684\u5207\u6362\uFF0C\u8FDB\u7A0B1\u7684\u65F6\u95F4\u7247\u7528\u5B8C\uFF0C\u6362\u8FDB\u7A0B2\u6267\u884C\uFF0C\u5728\u5B8C\u6210\u8FD9\u4E00\u7CFB\u5217\u7684\u7BA1\u7406\u5DE5\u4F5C\u540E\uFF0C\u64CD\u4F5C\u7CFB\u7EDF\u4F1A\u628ACPU\u7684\u4F7F\u7528\u6743\u4EA4\u7ED9\u7528\u6237\u8FDB\u7A0B\uFF0C\u63A5\u4E0B\u6765\u8FDB\u7A0B2\u5C31\u4F1A\u83B7\u5F97CPU\u65F6\u95F4\u7247\uFF0CCPU\u4E5F\u7531\u6838\u5FC3\u6001\u5207\u6362\u56DE\u4E86\u7528\u6237\u6001\uFF0C\u8FDB\u7A0B2\u5728\u7528\u6237\u6001\u4E0B\u8FDB\u884C\u6267\u884C\u3002

                                                                        image-20211215211612977

                                                                        image-20211215211627172

                                                                        image-20211215211657088

                                                                        image-20211215211713943

                                                                        image-20211215211752899

                                                                        \u200B \u8FDB\u7A0B2\u5728\u7528\u6237\u6001\u4E0B\u6267\u884C

                                                                      \u4E2D\u65AD\u7684\u6982\u5FF5\u548C\u4F5C\u7528

                                                                      1. \u5F53\u4E2D\u65AD\u53D1\u751F\u65F6\uFF0CCPU\u4F1A\u7ACB\u5373\u8FDB\u5165\u6838\u5FC3\u6001

                                                                        \u5F53\u4E2D\u65AD\u53D1\u751F\u540E\uFF0C\u5F53\u524D\u8FD0\u884C\u7684\u8FDB\u7A0B\u6682\u505C\u8FD0\u884C\uFF0C\u5E76\u7531\u64CD\u4F5C\u7CFB\u7EDF\u7684\u5185\u6838\u5BF9\u4E2D\u65AD\u4FE1\u53F7\u8FDB\u884C\u5904\u7406

                                                                        \u5BF9\u4E8E\u4E0D\u540C\u7684\u4E2D\u65AD\u4FE1\u53F7\uFF0C\u4F1A\u8FDB\u884C\u4E0D\u540C\u7684\u5904\u7406

                                                                        \u53D1\u751F\u4E2D\u65AD\uFF0C\u7531\u4E8E\u64CD\u4F5C\u7CFB\u7EDF\u7684\u7BA1\u7406\u5DE5\u4F5C\uFF08\u6BD4\u5982\u8FDB\u7A0B\u5207\u6362\u3001\u5206\u914DIO\u8BBE\u5907\u7B49\uFF09\u9700\u8981\u4F7F\u7528\u7279\u6743\u6307\u4EE4\uFF0C\u56E0\u6B64CPU\u8981\u4ECE\u7528\u6237\u6001\u8F6C\u4E3A\u6838\u5FC3\u6001\u3002

                                                                        \u4E2D\u65AD\u53EF\u4EE5\u4F7FCPU\u4ECE\u7528\u6237\u6001\u5207\u6362\u4E3A\u6838\u5FC3\u6001\uFF0C\u4F7F\u64CD\u4F5C\u7CFB\u7EDF\u83B7\u53D6\u8BA1\u7B97\u673A\u7684\u63A7\u5236\u6743\uFF0C\u6709\u4E86\u4E2D\u65AD\uFF0C\u624D\u80FD\u5B9E\u73B0\u591A\u9053\u7A0B\u5E8F\u5E76\u53D1\u6267\u884C\u3002

                                                                      2. CPU\u7528\u6237\u6001--\u6838\u5FC3\u6001\u662F\u901A\u8FC7\u4E2D\u65AD\u5B9E\u73B0\u7684\uFF0C \u5E76\u4E14\u4E2D\u65AD\u662F\u552F\u4E00\u9014\u5F84

                                                                        \u6838\u5FC3\u6001\u5230\u7528\u6237\u6001\u7684\u5207\u6362\uFF0C\u662F\u901A\u8FC7\u6267\u884C\u4E00\u4E2A\u7279\u6743\u6307\u4EE4\uFF08\u56E0\u4E3A\u6838\u5FC3\u6001\u4E0B\u672C\u6765\u5C31\u53EF\u4EE5\u6267\u884C\u7279\u6743\u6307\u4EE4\uFF09\uFF0C\u5C06\u7A0B\u5E8F\u72B6\u6001\u5B57\u7684\u6807\u5FD7\u4F4D\u8BBE\u7F6E\u4E3A\u7528\u6237\u6001

                                                                      \u4E2D\u65AD\u7684\u5206\u7C7B

                                                                      1. \u5185\u4E2D\u65AD\uFF08\u5F02\u5E38\u3001\u4F8B\u5916\u3001\u9677\u5165\uFF09

                                                                      2. \u5916\u4E2D\u65AD\uFF0C\u4E5F\u53EF\u4EE5\u7B80\u5355\u5730\u79F0\u4E4B\u4E3A\u4E2D\u65AD

                                                                      3. \u5185\u4E2D\u65AD\u548C\u5916\u4E2D\u65AD\u7684\u672C\u8D28\u533A\u522B\u5728\u4E8E\u4E2D\u65AD\u4FE1\u53F7\u7684\u6765\u6E90\u662FCPU\u7684\u5185\u90E8\u8FD8\u662F\u5916\u90E8

                                                                        \u5185\u4E2D\u65AD\u7684\u53D1\u751F\u548C\u5F53\u524DCPU\u6267\u884C\u6307\u4EE4\u662F\u6709\u5173\u7CFB\u7684\uFF0C\u5916\u4E2D\u65AD\u7684\u53D1\u751F\u548C\u5F53\u524DCPU\u6267\u884C\u6307\u4EE4\u662F\u6CA1\u6709\u5173\u7CFB\u7684\uFF08\u6BD4\u5982\u8BF4\u6253\u5370\u673A\u5728\u5B8C\u6210\u8F93\u51FA\u5DE5\u4F5C\u4E4B\u540E\uFF0C\u5411CPU\u53D1\u9001\u7684\u5916\u90E8\u4E2D\u65AD\u4FE1\u53F7\uFF09\u3002

                                                                      4. image-20211031192224702

                                                                      5. \u53E6\u4E00\u79CD\u5206\u7C7B\u65B9\u5F0F

                                                                        image-20211031192325361

                                                                      \u5916\u4E2D\u65AD\u7684\u5904\u7406\u8FC7\u7A0B

                                                                      1. \u6267\u884C\u5B8C\u6BCF\u4E2A\u6307\u4EE4\u4E4B\u540E\uFF0CCPU\u90FD\u8981\u68C0\u67E5\u5F53\u524D\u662F\u5426\u6709\u5916\u90E8\u4E2D\u65AD\u4FE1\u53F7
                                                                      2. \u5982\u679C\u68C0\u6D4B\u5230\u5916\u90E8\u4E2D\u65AD\u4FE1\u53F7\uFF0C\u5219\u9700\u8981\u4FDD\u62A4\u88AB\u4E2D\u65AD\u8FDB\u7A0B\u7684CPU\u73AF\u5883\uFF08\u5982\u7A0B\u5E8F\u72B6\u6001\u5B57PSW\uFF0C\u7A0B\u5E8F\u8BA1\u6570\u5668PC\u3001\u5404\u79CD\u901A\u7528\u5BC4\u5B58\u5668\uFF09\uFF0C\u53EF\u4EE5\u5927\u81F4\u7406\u89E3\u4E3A\u8981\u4FDD\u5B58\u8FDB\u7A0B\u5F53\u524D\u7684\u4E00\u4E9B\u4E2D\u95F4\u7ED3\u679C\uFF0C\u4EE5\u4FBF\u6062\u590D\u4E4B\u540E\uFF0C\u8FD8\u53EF\u4EE5\u4ECE\u5F53\u524D\u72B6\u6001\u7EE7\u7EED\u5F80\u4E0B\u6267\u884C\uFF0C\u53EF\u4EE5\u7406\u89E3\u4E3A\u591A\u7EBF\u7A0B\u73AF\u5883\u4E0B\u7EBF\u7A0B\u4E4B\u95F4\u7684\u4E0A\u4E0B\u6587\u5207\u6362\uFF0C\u7A0B\u5E8F\u8BA1\u6570\u5668\u7684\u4F5C\u7528\u5C31\u662F\u4FDD\u5B58\u4E0B\u4E00\u6761\u8981\u6267\u884C\u7684\u5B57\u8282\u7801\u6307\u4EE4\u7684\u5730\u5740\uFF0C\u6240\u4EE5\u7A0B\u5E8F\u8BA1\u6570\u5668\u9700\u8981\u4FDD\u5B58\u8FD9\u4E2A\u5730\u5740\uFF0C\u7528\u4E8E\u4E0A\u4E0B\u6587\u5207\u6362\u3002
                                                                      3. \u6839\u636E\u4E2D\u65AD\u4FE1\u53F7\u7C7B\u578B\u8F6C\u5165\u76F8\u5E94\u7684\u4E2D\u65AD\u5904\u7406\u7A0B\u5E8F\uFF08\u5185\u6838\u7A0B\u5E8F\uFF0C\u8FD0\u884C\u5728CPU\u6838\u5FC3\u6001\uFF0C\u8FD9\u662F\u80AF\u5B9A\u7684\uFF0C\u56E0\u4E3A\u4E2D\u65AD\u53D1\u751F\u65F6\uFF0CCPU\u4F1A\u7ACB\u5373\u8FDB\u5165\u6838\u5FC3\u6001\uFF09
                                                                      4. \u6062\u590D\u539F\u8FDB\u7A0B\u7684CPU\u73AF\u5883\u5E76\u6267\u884C\u7279\u6743\u6307\u4EE4\u9000\u51FA\u4E2D\u65AD\uFF08\u8BBE\u7F6E\u7A0B\u5E8F\u72B6\u6001\u5B57PSW\u7684\u6807\u5FD7\u4F4D\uFF09\uFF0C\u8FD4\u56DE\u539F\u8FDB\u7A0B\u7EE7\u7EED\u5F80\u4E0B\u6267\u884C\u3002

                                                                      \u7CFB\u7EDF\u8C03\u7528

                                                                      \u6982\u8FF0

                                                                      1. \u64CD\u4F5C\u7CFB\u7EDF\u4F5C\u4E3A\u7CFB\u7EDF\u8F6F\u4EF6\uFF0C\u7BA1\u7406\u7CFB\u7EDF\u8D44\u6E90\uFF0C\u9762\u5411\u4E0A\u5C42\uFF0C\u5BF9\u7528\u6237\u63D0\u4F9B\u547D\u4EE4\u63A5\u53E3\uFF0C\u5BF9\u7A0B\u5E8F\u63D0\u4F9B\u7A0B\u5E8F\u63A5\u53E3\uFF08\u5176\u5B9E\u4E5F\u53EF\u4EE5\u7406\u89E3\u4E3A\u5BF9\u7528\u6237\uFF09\uFF0C\u7A0B\u5E8F\u63A5\u53E3\u5C31\u662F\u4E00\u7EC4\u7CFB\u7EDF\u8C03\u7528\u7EC4\u6210

                                                                        \u53EF\u4EE5\u628A\u7CFB\u7EDF\u8C03\u7528\u7406\u89E3\u4E3A\u64CD\u4F5C\u7CFB\u7EDF\u63D0\u4F9B\u7ED9\u5E94\u7528\u7A0B\u5E8F\uFF08\u7A0B\u5E8F\u5458\u6216\u7F16\u7A0B\u4EBA\u5458\uFF09\u4F7F\u7528\u7684\u63A5\u53E3\uFF0C\u53EF\u4EE5\u7406\u89E3\u4E3A\u4E00\u79CD\u53EF\u4F9B\u5E94\u7528\u7A0B\u5E8F\u8C03\u7528\u7684\u7279\u6B8A\u51FD\u6570\uFF0C\u5E94\u7528\u7A0B\u5E8F\u53EF\u4EE5\u53D1\u51FA\u7CFB\u7EDF\u8C03\u7528\u8BF7\u6C42\u6765\u83B7\u5F97\u64CD\u4F5C\u7CFB\u7EDF\u7684\u670D\u52A1\u3002

                                                                      2. \u64CD\u4F5C\u7CFB\u7EDF\u4E3A\u4EC0\u4E48\u8981\u63D0\u4F9B\u7CFB\u7EDF\u8C03\u7528\u529F\u80FD\uFF1F

                                                                        \u5982\u679C\u7528\u6237\u8FDB\u7A0B\u60F3\u8981\u4F7F\u7528\u7CFB\u7EDF\u8D44\u6E90\uFF0C\u90A3\u4E48\u901A\u8FC7\u64CD\u4F5C\u7CFB\u7EDF\u63D0\u4F9B\u7684\u7CFB\u7EDF\u8C03\u7528\uFF0C\u6BD4\u5982\u7528\u6237\u7EE7\u627F\u60F3\u8981\u4F7F\u7528\u6253\u5370\u673A\u8FD9\u79CD\u5171\u4EAB\u8D44\u6E90\uFF0C\u53EA\u80FD\u901A\u8FC7\u7CFB\u7EDF\u8C03\u7528\u5BF9\u64CD\u4F5C\u7CFB\u7EDF\u53D1\u51FA\u8BF7\u6C42\uFF0C\u64CD\u4F5C\u7CFB\u7EDF\u4F1A\u5BF9\u5404\u4E2A\u8BF7\u6C42\u8FDB\u884C\u534F\u8C03\u7BA1\u7406

                                                                        \u7CFB\u7EDF\u8C03\u7528\u5C31\u662F\u7A0B\u5E8F\u63A5\u53E3\uFF0C\u7528\u6237\u8FDB\u7A0B\u901A\u8FC7\u4E00\u7EC4\u7CFB\u7EDF\u8C03\u7528\u5373\u7A0B\u5E8F\u63A5\u53E3\uFF0C\u4F7F\u7528\u67D0\u4E2A\u7CFB\u7EDF\u8D44\u6E90\uFF0C\u56E0\u4E3A\u662F\u7CFB\u7EDF\u8D44\u6E90\uFF0C\u6240\u4EE5\u7CFB\u7EDF\u8C03\u7528\u540E\uFF0CCPU\u8FDB\u5165\u6838\u5FC3\u6001\uFF0C\u628A\u63A7\u5236\u6743\u4EA4\u7ED9\u64CD\u4F5C\u7CFB\u7EDF\uFF0C\u64CD\u4F5C\u7CFB\u7EDF\u5BF9\u8BF7\u6C42\u8FDB\u884C\u534F\u8C03\u7BA1\u7406

                                                                        \u7CFB\u7EDF\u8C03\u7528\u540E\uFF0CCPU\u4F1A\u8FDB\u5165\u6838\u5FC3\u6001\uFF0C\u8FD9\u662F\u81EA\u613F\u4E2D\u65AD\uFF0C\u4E5F\u5C31\u662F\u5185\u4E2D\u65AD\uFF0C\u4E0ECPU\u5F53\u524D\u6267\u884C\u7684\u6307\u4EE4\u6709\u5173\uFF0C\u662F\u7CFB\u7EDF\u8C03\u7528\u4F7F\u7528\u7684\u8BBF\u7BA1\u6307\u4EE4\u6216\u8005\u9677\u5165\u6307\u4EE4\u3002

                                                                      3. \u4EC0\u4E48\u662F\u7CFB\u7EDF\u8C03\u7528\uFF1F

                                                                        \u5E94\u7528\u7A0B\u5E8F\u901A\u8FC7\u7CFB\u7EDF\u8C03\u7528\u8BF7\u6C42\u64CD\u4F5C\u7CFB\u7EDF\u7684\u670D\u52A1\uFF0C\u7CFB\u7EDF\u4E2D\u7684\u5404\u79CD\u5171\u4EAB\u8D44\u6E90\u90FD\u7531\u64CD\u4F5C\u7CFB\u7EDF\u540C\u4E00\u638C\u7BA1\uFF0C\u56E0\u6B64\u5728\u7528\u6237\u7A0B\u5E8F\u4E2D\uFF0C\u51E1\u662F\u4E0E\u8D44\u6E90\u6709\u5173\u7684\u64CD\u4F5C\uFF08\u5982\u5B58\u50A8\u5206\u914D\u3001IO\u3001\u6587\u4EF6\u7BA1\u7406\u7B49\uFF09\uFF0C\u90FD\u5FC5\u987B\u901A\u8FC7\u7CFB\u7EDF\u8C03\u7528\u7684\u65B9\u5F0F\u5411\u64CD\u4F5C\u7CFB\u7EDF\u63D0\u51FA\u670D\u52A1\u8BF7\u6C42\uFF0C\u7531\u64CD\u4F5C\u7CFB\u7EDF\u4EE3\u4E3A\u5B8C\u6210\uFF08\u7CFB\u7EDF\u8C03\u7528\u540E\uFF0CCPU\u4F1A\u8FDB\u5165\u6838\u5FC3\u6001\uFF0C\u7CFB\u7EDF\u8C03\u7528\u4F1A\u4F7F\u7528\u8BBF\u7BA1\u6307\u4EE4\u6216\u8005\u8BF4\u9677\u5165\u6307\u4EE4\uFF09\uFF0C\u56E0\u4E3A\u64CD\u4F5C\u7CFB\u7EDF\u5C31\u662F\u7BA1\u7406\u7CFB\u7EDF\u8D44\u6E90\u7684\uFF0C\u5305\u62EC\u786C\u4EF6\u8D44\u6E90\u548C\u8F6F\u4EF6\u8D44\u6E90\uFF0C\u8FD9\u6837\u53EF\u4EE5\u4FDD\u8BC1\u7CFB\u7EDF\u7684\u7A33\u5B9A\u6027\u548C\u5B89\u5168\u6027\u3002

                                                                      \u7CFB\u7EDF\u8C03\u7528\u5206\u7C7B

                                                                      1. image-20211031215805004

                                                                        \u7CFB\u7EDF\u8C03\u7528\u76F8\u5173\u5904\u7406\u6D89\u53CA\u5230\u5BF9\u7CFB\u7EDF\u8D44\u6E90\u7684\u7BA1\u7406\uFF0C\u5BF9\u8FDB\u7A0B\u7684\u63A7\u5236\uFF0C\u8FD9\u4E9B\u529F\u80FD\u9700\u8981\u6267\u884C\u4E00\u4E9B\u7279\u6743\u6307\u4EE4\uFF0C\u56E0\u6B64\u7CFB\u7EDF\u8C03\u7528\u76F8\u5173\u5904\u7406\u9700\u8981\u5728\u6838\u5FC3\u6001\u4E0B\u8FDB\u884C\u3002

                                                                      \u7CFB\u7EDF\u8C03\u7528\u4E0E\u5E93\u51FD\u6570\u7684\u533A\u522B

                                                                      1. \u5E93\u51FD\u6570\u7684\u5E95\u5C42\u5C01\u88C5\u4E00\u4E9B\u7CFB\u7EDF\u8C03\u7528\u529F\u80FD

                                                                        image-20211215214453318

                                                                        image-20211031220400682

                                                                        image-20211031220438631

                                                                      \u7CFB\u7EDF\u8C03\u7528\u80CC\u540E\u7684\u8FC7\u7A0B

                                                                      1. image-20211031220738705

                                                                        write\u8FD9\u4E2A\u5E93\u51FD\u6570\uFF0C\u5C31\u6D89\u53CA\u5230\u4E86\u7CFB\u7EDF\u8C03\u7528\u3002

                                                                        \u5F53\u6267\u884C\u9677\u5165\u6307\u4EE4\u4E4B\u540E\uFF0CCPU\u7684\u63A7\u5236\u6743\u4F1A\u4EA4\u7ED9\u64CD\u4F5C\u7CFB\u7EDF\uFF0C\u9677\u5165\u6307\u4EE4\u5C31\u662F\u8BBF\u7BA1\u6307\u4EE4\uFF0C\u6838\u5FC3\u6001\u5C31\u662F\u7BA1\u6001\u3002\u8FD9\u5C5E\u4E8E\u7CFB\u7EDF\u8C03\u7528\uFF0C\u6267\u884C\u9677\u5165\u6307\u4EE4\uFF0C\u662F\u5185\u4E2D\u65AD\u3002

                                                                        \u5F88\u597D\u7406\u89E3\uFF0C\u7CFB\u7EDF\u8C03\u7528\uFF0C\u5C31\u662F\u4F1A\u901A\u8FC7\u64CD\u4F5C\u7CFB\u7EDF\u6765\u6267\u884C\u4E00\u4E9B\u529F\u80FD\uFF0C\u5FC5\u5B9A\u4F1A\u8FDB\u5165\u6838\u5FC3\u6001\uFF0C\u800C\u7528\u6237\u6001\u5230\u6838\u5FC3\u6001\u53EA\u6709\u4E00\u79CD\u65B9\u5F0F\uFF0C\u5C31\u662F\u4E2D\u65AD\uFF0C\u7CFB\u7EDF\u8C03\u7528\u4F1A\u901A\u8FC7\u8BBF\u7BA1\u6307\u4EE4\uFF0C\u5B9E\u73B0\u5185\u4E2D\u65AD\u3002

                                                                        \u5185\u4E2D\u65AD\u5206\u4E3A\u81EA\u613F\u4E2D\u65AD\uFF08\u4E5F\u53EB\u505A\u6307\u4EE4\u4E2D\u65AD\uFF0C\u4E5F\u5C31\u662F\u7CFB\u7EDF\u8C03\u7528\u65F6\u4F7F\u7528\u7684\u8BBF\u7BA1\u6307\u4EE4\uFF09\u3001\u786C\u4EF6\u6545\u969C\uFF08\u7F3A\u9875\uFF09\u3001\u8F6F\u4EF6\u4E2D\u65AD

                                                                        \u5185\u7EC8\u7AEF\u53C8\u5206\u4E3A\u9677\u5165\u3001\u6545\u969C\u548C\u7EC8\u6B62\u3002

                                                                        \u81EA\u613F\u4E2D\u65AD\uFF08\u8BBF\u7BA1\u6307\u4EE4\u5F15\u8D77\u7684\u6307\u4EE4\u4E2D\u65AD\uFF09\u5C5E\u4E8E\u9677\u5165\uFF0C\u7F3A\u9875\u5C5E\u4E8E\u6545\u969C\uFF0C\u8F6F\u4EF6\u4E2D\u65AD\u6BD4\u5982\u6574\u6570\u96640\u5C5E\u4E8E\u7EC8\u6B62\u3002

                                                                      2. int\u6307\u4EE4\u7684\u53C2\u6570x\u6307\u660E\u4E86\u7CFB\u7EDF\u7684\u8C03\u7528\u53F7\uFF0C\u6B64\u5904\u7684int\u4E0D\u662F\u6574\u6570\u7684\u610F\u601D\uFF0C\u5176\u5B9E\u662Finterrupt\u7684\u7F29\u5199

                                                                        image-20211215215539484

                                                                        \u4F20\u9012\u7CFB\u7EDF\u8C03\u7528\u53C2\u6570 ----> \u6267\u884C\u9677\u5165\u6307\u4EE4\uFF08\u7528\u6237\u6001\uFF09------> \u6267\u884C\u7CFB\u7EDF\u8C03\u7528\u76F8\u5E94\u670D\u52A1\u7A0B\u5E8F\uFF08\u6838\u5FC3\u6001\uFF09-----> \u8FD4\u56DE\u7528\u6237\u7A0B\u5E8F

                                                                        \u7CFB\u7EDF\u8C03\u7528\u4F1A\u4F7F\u7528\u8BBF\u7BA1\u6307\u4EE4\uFF08\u9677\u5165\u6307\u4EE4\uFF09\uFF0C\u4ECE\u800C\u4F7FCPU\u5207\u6362\u5230\u6838\u5FC3\u6001

                                                                      3. \u6CE8\u610F\uFF1A

                                                                        • \u9677\u5165\u6307\u4EE4\u662F\u5728\u7528\u6237\u6001\u6267\u884C\u7684\uFF0C\u6267\u884C\u9677\u5165\u6307\u4EE4\u4E4B\u540E\uFF0C\u7ACB\u5373\u5F15\u53D1\u4E00\u4E2A\u5185\u4E2D\u65AD\uFF0C\u8FD9\u5C5E\u4E8E\u81EA\u613F\u4E2D\u65AD\uFF0C\u4ECE\u800CCPU\u8FDB\u5165\u6838\u5FC3\u6001
                                                                        • \u53D1\u51FA\u7CFB\u7EDF\u8C03\u7528\u8BF7\u6C42\u662F\u5728\u7528\u6237\u6001\uFF0C\u800C\u5BF9\u7CFB\u7EDF\u8C03\u7528\u7684\u76F8\u5E94\u5904\u7406\uFF0C\u662F\u5728\u6838\u5FC3\u6001\u4E0B\u8FDB\u884C\u3002
                                                                        • \u9677\u5165\u6307\u4EE4\u662F\u552F\u4E00\u4E00\u4E2A\u53EA\u80FD\u5728\u7528\u6237\u6001\u6267\u884C\uFF0C\u800C\u4E0D\u53EF\u518D\u6838\u5FC3\u6001\u6267\u884C\u7684\u6307\u4EE4\u3002\u56E0\u4E3A\u9677\u5165\u6307\u4EE4\u5373\u8BBF\u7BA1\u6307\u4EE4\u7684\u76EE\u7684\u5C31\u662F\u8FDB\u5165\u6838\u5FC3\u6001\u3002
                                                                        • \u51E1\u662F\u4E0E\u8D44\u6E90\uFF08\u7CFB\u7EDF\u8D44\u6E90\u3001\u5171\u4EAB\u8D44\u6E90\uFF09\u6709\u5173\u7684\u64CD\u4F5C\u3001\u4F1A\u76F4\u63A5\u5F71\u54CD\u5230\u5176\u4ED6\u8FDB\u7A0B\u7684\u64CD\u4F5C\uFF0C\u4E00\u5B9A\u9700\u8981\u64CD\u4F5C\u7CFB\u7EDF\u4ECB\u5165\uFF08\u9700\u8981\u64CD\u4F5C\u7CFB\u7EDF\u6765\u8C03\u5EA6\uFF0C\u6765\u5BF9\u8BF7\u6C42\u534F\u8C03\u7BA1\u7406\uFF09\uFF0C\u5373\u9700\u8981\u901A\u8FC7\u7CFB\u7EDF\u8C03\u7528\u6765\u5B9E\u73B0\u3002

                                                                      \u7B2C\u4E8C\u7AE0

                                                                      \u8FDB\u7A0B

                                                                      \u8FDB\u7A0B\u7684\u5B9A\u4E49

                                                                      1. \u7A0B\u5E8F\uFF1A\u5C31\u662F\u4E00\u4E2A\u6307\u4EE4\u5E8F\u5217

                                                                        \u65E9\u671F\u7684\u8BA1\u7B97\u673A\uFF08\u53EA\u652F\u6301\u5355\u9053\u7A0B\u5E8F\uFF09\uFF0C\u56E0\u6B64\u5728\u8BA1\u7B97\u673A\u4E2D\uFF0C\u540C\u4E00\u65F6\u95F4\u6BB5\u5185\u53EA\u80FD\u6709\u4E00\u9053\u7A0B\u5E8F\uFF0C\u5728\u8FD9\u6BB5\u65F6\u95F4\u6BB5\u5185\uFF0CCPU\u53EA\u4E3A\u8FD9\u9053\u7A0B\u5E8F\u670D\u52A1

                                                                        \u5185\u5B58\u4E2D\u540C\u4E00\u4E2A\u65F6\u95F4\u6BB5\u5185\u53EA\u5B58\u5728\u4E00\u4E2A\u7A0B\u5E8F\u76F8\u5173\u7684\u6570\u636E\uFF0C\u5305\u62EC\u7A0B\u5E8F\u6BB5\u548C\u6570\u636E\u6BB5\u4E24\u4E2A\u90E8\u5206\uFF0C\u7A0B\u5E8F\u6BB5\u4FDD\u5B58\u7684\u662F\u4EE3\u7801\u672C\u8EAB\uFF0C\u6570\u636E\u6BB5\u5B58\u653E\u7684\u662F\u7A0B\u5E8F\u8FD0\u884C\u8FC7\u7A0B\u4E2D\u7684\u4E2D\u95F4\u6570\u636E

                                                                        image-20211215221112255

                                                                      2. \u5F15\u5165\u591A\u9053\u7A0B\u5E8F\u6280\u672F\u4E4B\u540E

                                                                        image-20211215221415179

                                                                        \u4E3A\u4E86\u65B9\u4FBF\u64CD\u4F5C\u7CFB\u7EDF\u7BA1\u7406\uFF0C\u5B8C\u6210\u5404\u7A0B\u5E8F\u5E76\u53D1\u6267\u884C\uFF0C\u5F15\u5165\u4E86\u8FDB\u7A0B\u3001\u8FDB\u7A0B\u5B9E\u4F53\u7684\u6982\u5FF5

                                                                        \u64CD\u4F5C\u7CFB\u7EDF\u4E3A\u6BCF\u4E2A\u8FD0\u884C\u7684\u7A0B\u5E8F\uFF08\u8FDB\u7A0B\uFF09\u914D\u7F6E\u4E00\u4E2A\u6570\u636E\u7ED3\u6784\uFF0C\u79F0\u4E3A\u8FDB\u7A0B\u63A7\u5236\u5757\uFF08PCB\uFF09\uFF0C\u7528\u6765\u63CF\u8FF0\u8FDB\u7A0B\u7684\u5404\u79CD\u4FE1\u606F\uFF08\u5982\u7A0B\u5E8F\u4EE3\u7801\u5B58\u653E\u4F4D\u7F6E\u3001\u8FDB\u7A0B\u7684\u72B6\u6001\uFF09

                                                                        PCB\u3001\u7A0B\u5E8F\u6BB5\u3001\u6570\u636E\u6BB5\u4E09\u90E8\u5206\u6784\u6210\u4E86\u8FDB\u7A0B\u5B9E\u4F53\uFF08\u8FDB\u7A0B\u6620\u50CF\uFF09

                                                                      3. \u4E00\u822C\u60C5\u51B5\u4E0B\uFF0C\u6211\u4EEC\u628A\u8FDB\u7A0B\u5B9E\u4F53\u5C31\u7B80\u79F0\u4E3A\u8FDB\u7A0B\uFF0C\u4F8B\u5982\uFF0C\u6240\u8C13\u521B\u5EFA\u8FDB\u7A0B\uFF0C\u5B9E\u8D28\u4E0A\u662F\u521B\u5EFA\u8FDB\u7A0B\u5B9E\u4F53\u4E2D\u7684PCB\uFF0C\u800C\u64A4\u9500\u8FDB\u7A0B\uFF0C\u5B9E\u8D28\u4E0A\u662F\u64A4\u9500\u8FDB\u7A0B\u5B9E\u4F53\u4E2D\u7684PCB

                                                                        \u6CE8\u610F\uFF1APCB\u662F\u8FDB\u7A0B\u5B58\u5728\u7684\u552F\u4E00\u6807\u5FD7\u3002

                                                                      4. \u4ECE\u4E0D\u540C\u7684\u89D2\u5EA6\uFF0C\u8FDB\u7A0B\u53EF\u4EE5\u6709\u4E0D\u540C\u7684\u5B9A\u4E49\uFF0C\u6BD4\u8F83\u4F20\u7EDF\u5178\u578B\u7684\u5B9A\u4E49\u6709\uFF1A

                                                                        • \u8FDB\u7A0B\u662F\u7A0B\u5E8F\u7684\u4E00\u6B21\u6267\u884C\u8FC7\u7A0B
                                                                        • \u8FDB\u7A0B\u662F\u4E00\u4E2A\u7A0B\u5E8F\u53CA\u5176\u6570\u636E\u5728\u5904\u7406\u5668\u4E0A\u987A\u5E8F\u6267\u884C\u65F6\u6240\u53D1\u751F\u7684\u6D3B\u52A8
                                                                        • \u8FDB\u7A0B\u662F\u5177\u6709\u72EC\u7ACB\u529F\u80FD\u7684\u7A0B\u5E8F\u5728\u6570\u636E\u96C6\u5408\u4E0A\u8FD0\u884C\u7684\u8FC7\u7A0B\uFF0C\u5B83\u662F\u7CFB\u7EDF\u8FDB\u884C\u8D44\u6E90\u5206\u914D\u548C\u8C03\u5EA6\u7684\u4E00\u4E2A\u72EC\u7ACB\u5355\u4F4D\u3002

                                                                        \u6240\u6709\u7684\u5B9A\u4E49\u90FD\u5F3A\u8C03\u8FDB\u7A0B\u662F\u4E00\u4E2A\u52A8\u6001\u7684\u8FC7\u7A0B

                                                                      5. \u5F15\u5165\u8FDB\u7A0B\u5B9E\u4F53\u7684\u6982\u5FF5\u540E\uFF0C\u53EF\u628A\u8FDB\u7A0B\u5B9A\u4E49\u4E3A\uFF1A

                                                                        \u8FDB\u7A0B\u662F\u8FDB\u7A0B\u5B9E\u4F53\uFF08\u6216\u8005\u8BF4\u9759\u6001\u7A0B\u5E8F\uFF09\u7684\u8FD0\u884C\u8FC7\u7A0B\uFF0C\u662F\u7CFB\u7EDF\u8FDB\u884C\u8D44\u6E90\u5206\u914D\u548C\u8C03\u5EA6\u7684\u4E00\u4E2A\u72EC\u7ACB\u5355\u4F4D\u3002

                                                                        \u6CE8\u610F\uFF1A\u4E25\u683C\u6765\u8BF4\uFF0C\u8FDB\u7A0B\u5B9E\u4F53\u548C\u8FDB\u7A0B\u5E76\u4E0D\u4E00\u6837\uFF0C\u8FDB\u7A0B\u5B9E\u4F53\u662F\u9759\u6001\u7684\uFF0C\u8FDB\u7A0B\u5219\u662F\u52A8\u6001\u7684

                                                                      \u8FDB\u7A0B\u7684\u7EC4\u6210

                                                                      1. \u8FDB\u7A0B\uFF08\u8FDB\u7A0B\u5B9E\u4F53\uFF09\u7531\u7A0B\u5E8F\u6BB5\u3001\u6570\u636E\u6BB5\u3001PCB\u4E09\u90E8\u5206\u7EC4\u6210

                                                                        image-20211215222440380

                                                                      2. PCB\u7684\u7EC4\u6210

                                                                        image-20211215222506062

                                                                        \u5F53\u8FDB\u7A0B\u88AB\u521B\u5EFA\u65F6\uFF0C\u64CD\u4F5C\u7CFB\u7EDF\u4F1A\u4E3A\u8BE5\u8FDB\u7A0B\u5206\u914D\u4E00\u4E2A\u552F\u4E00\u7684\u3001\u4E0D\u91CD\u590D\u7684ID\uFF0C\u7528\u4E8E\u533A\u5206\u4E0D\u540C\u7684\u8FDB\u7A0B\u3002

                                                                        \u5F53\u8FDB\u7A0B\u5207\u6362\u65F6\uFF0C\u9700\u8981\u628A\u8FDB\u7A0B\u5F53\u524D\u7684\u8FD0\u884C\u60C5\u51B5\u8BB0\u5F55\u4E0B\u6765\uFF0C\u4FDD\u5B58\u5728PCB\u4E2D\uFF0C\u5982\u7A0B\u5E8F\u8BA1\u6570\u5668\u7684\u503C\u8868\u793A\u4E86\u5F53\u524D\u7A0B\u5E8F\u6267\u884C\u5230\u54EA\u4E00\u53E5\u3002\uFF08\u5728jvm\u4E2D\uFF0C\u7A0B\u5E8F\u8BA1\u6570\u5668\u4FDD\u5B58\u4E86\u4E0B\u4E00\u6761\u9700\u8981\u6267\u884C\u7684\u5B57\u8282\u7801\u6307\u4EE4\u5BF9\u5E94\u7684\u5730\u5740\uFF01\uFF01\uFF09

                                                                        \u8FDB\u7A0B\u7684\u7BA1\u7406\u8005\uFF08\u64CD\u4F5C\u7CFB\u7EDF\uFF09\u6240\u9700\u7684\u6570\u636E\u90FD\u5728PCB\u4E2D\uFF01\uFF01

                                                                        \u7A0B\u5E8F\u6BB5\u548C\u6570\u636E\u6BB5\u5B58\u653E\u7684\u662F\u7A0B\u5E8F\u672C\u8EAB\u7684\u8FD0\u884C\u6240\u9700\u7684\u6570\u636E

                                                                      \u8FDB\u7A0B\u7684\u7EC4\u7EC7\u65B9\u5F0F

                                                                      1. \u5728\u4E00\u4E2A\u7CFB\u7EDF\u4E2D\uFF0C\u901A\u5E38\u6709\u6570\u5341\u3001\u6570\u767E\u4E43\u81F3\u6570\u5343\u4E2APCB\uFF08\u8FDB\u7A0B\u63A7\u5236\u5757\uFF0C\u63CF\u8FF0\u8FDB\u7A0B\u7684\u5404\u79CD\u4FE1\u606F\uFF09\uFF0C\u4E3A\u4E86\u80FD\u5BF9\u4ED6\u4EEC\u52A0\u4EE5\u6709\u6548\u7684\u7BA1\u7406\uFF0C\u5E94\u8BE5\u7528\u9002\u5F53\u7684\u65B9\u5F0F\u628A\u8FD9\u4E9BPCB\u7EC4\u7EC7\u8D77\u6765

                                                                        \u8FDB\u7A0B\u7684\u7EC4\u6210\u8BA8\u8BBA\u7684\u662F\u4E00\u4E2A\u8FDB\u7A0B\u5185\u90E8\u7531\u54EA\u4E9B\u90E8\u5206\u6784\u6210\u7684\u95EE\u9898\uFF0C\u800C\u8FDB\u7A0B\u7684\u7EC4\u7EC7\u8BA8\u8BBA\u7684\u662F\u591A\u4E2A\u8FDB\u7A0B\u4E4B\u95F4\u7684\u7EC4\u7EC7\u65B9\u5F0F\u7684\u95EE\u9898\u3002

                                                                      2. image-20211216150358099

                                                                      3. \u8FDB\u7A0B\u7684\u7EC4\u7EC7---\u94FE\u63A5\u65B9\u5F0F\uFF08\u64CD\u4F5C\u7CFB\u7EDF\u6301\u6709\u6307\u9488\uFF0C\u6307\u5411\u4E0D\u540C\u961F\u5217\uFF09

                                                                        \u6267\u884C\u6307\u9488\u6307\u5411\u5F53\u524D\u5904\u4E8E\u8FD0\u884C\u6001\uFF08\u6267\u884C\u6001\uFF09\u7684\u8FDB\u7A0B

                                                                        \u5C31\u7EEA\u961F\u5217\u6307\u9488\uFF0C\u6307\u5411\u5F53\u524D\u5904\u4E8E\u5C31\u7EEA\u6001\u7684\u8FDB\u7A0B

                                                                        \u963B\u585E\u961F\u5217\u6307\u9488\uFF0C\u6307\u5411\u5F53\u524D\u5904\u4E8E\u963B\u585E\u6001\u7684\u8FDB\u7A0B\uFF0C\u5F88\u591A\u64CD\u4F5C\u7CFB\u7EDF\u8FD8\u4F1A\u6839\u636E\u963B\u585E\u539F\u56E0\u4E0D\u540C\uFF0C\u518D\u5206\u4E3A\u591A\u4E2A\u963B\u585E\u961F\u5217

                                                                        image-20211216150733591

                                                                      4. \u8FDB\u7A0B\u7684\u7EC4\u7EC7---\u7D22\u5F15\u65B9\u5F0F\uFF08\u64CD\u4F5C\u7CFB\u7EDF\u6301\u6709\u6307\u9488\uFF0C\u6307\u5411\u7D22\u5F15\u8868\uFF0C\u800C\u4E0D\u662F\u961F\u5217\uFF09

                                                                        image-20211216150812905

                                                                        \u6CE8\u610F\uFF1A\u94FE\u63A5\u65B9\u5F0F\uFF0C\u662F\u6307\u9488\u6307\u5411\u961F\u5217\uFF0C\u7D22\u5F15\u65B9\u5F0F\uFF0C\u662F\u6307\u9488\u6307\u5411\u7D22\u5F15\u8868

                                                                      \u8FDB\u7A0B\u7684\u7279\u5F81

                                                                      1. \u8FDB\u7A0B\u548C\u7A0B\u5E8F\u662F\u4E24\u4E2A\u622A\u7136\u4E0D\u540C\u7684\u6982\u5FF5\uFF0C\u76F8\u6BD4\u4E8E\u7A0B\u5E8F\uFF0C\u8FDB\u7A0B\u62E5\u6709\u4EE5\u4E0B\u7279\u5F81\uFF1A

                                                                        • \u52A8\u6001\u6027\uFF1A\u8FDB\u7A0B\u662F\u7A0B\u5E8F\u7684\u4E00\u6B21\u6267\u884C\u8FC7\u7A0B\uFF0C\u662F\u52A8\u6001\u5730\u4EA7\u751F\u3001\u53D8\u5316\u3001\u6D88\u4EA1\u7684\u3002\uFF08\u52A8\u6001\u6027\u4E5F\u662F\u8FDB\u7A0B\u6700\u57FA\u672C\u7684\u7279\u5F81\uFF09

                                                                        • \u5E76\u53D1\u6027\uFF1A\u5185\u5B58\u4E2D\u6709\u591A\u4E2A\u8FDB\u7A0B\u5B9E\u4F53\uFF08\u6620\u50CF\uFF09\uFF0C\u5404\u8FDB\u7A0B\u53EF\u5E76\u53D1\u6267\u884C\uFF08\u5E76\u53D1\u5C31\u662F\u5B8F\u89C2\u4E0A\u5E76\u884C\uFF0C\u5FAE\u89C2\u4E0A\u4E32\u884C\uFF0C\u8F6E\u6D41\u88ABCPU\u6267\u884C\uFF0C\u4F46\u662F\u5728\u5B8F\u89C2\u4E0A\uFF0C\u5404\u8FDB\u7A0B\u597D\u50CF\u662F\u5E76\u884C\u6267\u884C\u7684\u3002 \uFF09

                                                                        • \u72EC\u7ACB\u6027\uFF1A\u8FDB\u7A0B\u662F\u80FD\u72EC\u7ACB\u8FD0\u884C\u3001\u72EC\u7ACB\u83B7\u5F97\u8D44\u6E90\uFF0C\u72EC\u7ACB\u63A5\u53D7\u8C03\u5EA6\u7684\u57FA\u672C\u5355\u4F4D

                                                                        • \u5F02\u6B65\u6027\uFF1A\u5404\u8FDB\u7A0B\u6309\u5404\u81EA\u72EC\u7ACB\u7684\u3001\u4E0D\u53EF\u9884\u77E5\u7684\u901F\u5EA6\u5411\u524D\u63A8\u8FDB\uFF08\u56E0\u4E3A\u5E76\u53D1\u6027\uFF0C\u4E0D\u662F\u88ABCPU\u5B8C\u5168\u4E32\u884C\u6267\u884C\u7684\uFF0C\u6240\u4EE5\u63A8\u8FDB\u7684\u901F\u5EA6\u662F\u672A\u77E5\u7684\uFF09\uFF0C\u64CD\u4F5C\u7CFB\u7EDF\u8981\u63D0\u4F9B\u201C\u8FDB\u7A0B\u540C\u6B65\u673A\u5236\u201D\u6765\u89E3\u51B3\u5F02\u6B65\u95EE\u9898\u3002

                                                                          \u5F02\u6B65\u6027\u6709\u53EF\u80FD\u5BFC\u81F4\u8FD0\u7B97\u7ED3\u679C\u7684\u4E0D\u786E\u5B9A\u6027\uFF0C\u6240\u4EE5\u9700\u8981\u4F9D\u9760\u540C\u6B65\u673A\u5236\u3002

                                                                        • \u7ED3\u6784\u578B\uFF1A\u6BCF\u4E2A\u8FDB\u7A0B\uFF08\u8FDB\u7A0B\u5B9E\u4F53\uFF09\u4F1A\u914D\u7F6E\u4E00\u4E2APCB\uFF0C\u7ED3\u6784\u4E0A\u770B\uFF0C\u8FDB\u7A0B\u7531\u7A0B\u5E8F\u6BB5\u3001\u6570\u636E\u6BB5\u3001PCB\u7EC4\u6210

                                                                      2. \u5728Java\u4E2D\uFF0C\u8FDB\u7A0B\u662F\u4F5C\u4E3A\u8D44\u6E90\u5206\u914D\u7684\u6700\u5C0F\u5355\u4F4D\uFF0C\u7EBF\u7A0B\u624D\u662F\u63A5\u53D7\u8C03\u5EA6\u7684\u6700\u5C0F\u5355\u4F4D\u3002

                                                                        \u5BF9\u4E8E\u64CD\u4F5C\u7CFB\u7EDF\u6765\u8BF4\uFF0C\u8FDB\u7A0B\u662F\u8D44\u6E90\u5206\u914D\u548C\u64CD\u4F5C\u7CFB\u7EDF\u8C03\u5EA6\u7684\u4E00\u4E2A\u72EC\u7ACB\u5355\u4F4D

                                                                      3. PCB\u662F\u64CD\u4F5C\u7CFB\u7EDF\u4E3A\u4E86\u7BA1\u7406\u8FDB\u7A0B\u6240\u521B\u5EFA\u7684\u6570\u636E\u7ED3\u6784\uFF0CPCB\u5B58\u653E\u7684\u6570\u636E\u662F\u5BF9\u8FDB\u7A0B\u7684\u7BA1\u7406\u6570\u636E

                                                                      \u8FDB\u7A0B\u7684\u72B6\u6001\u548C\u8F6C\u6362

                                                                      \u8FDB\u7A0B\u7684\u72B6\u6001
                                                                      1. \u8FDB\u7A0B\u662F\u7A0B\u5E8F\u7684\u4E00\u6B21\u6267\u884C\uFF0C\u5728\u8FD9\u4E2A\u6267\u884C\u8FC7\u7A0B\u4E2D\uFF0C\u6709\u65F6\u8FDB\u7A0B\u6B63\u5728\u88ABCPU\u5904\u7406\uFF0C\u6709\u65F6\u53C8\u9700\u8981\u7B49\u5F85CPU\u670D\u52A1\uFF0C\u53EF\u89C1\uFF0C\u8FDB\u7A0B\u7684\u72B6\u6001\u662F\u4F1A\u6709\u5404\u79CD\u53D8\u5316\uFF0C\u4E3A\u4E86\u65B9\u4FBF\u5BF9\u5404\u4E2A\u8FDB\u7A0B\u7684\u7BA1\u7406\uFF0C\u64CD\u4F5C\u7CFB\u7EDF\u9700\u8981\u5C06\u8FDB\u7A0B\u5408\u7406\u5730\u5212\u5206\u4E3A\u51E0\u79CD\u72B6\u6001\u3002

                                                                      2. \u4E09\u79CD\u57FA\u672C\u72B6\u6001

                                                                        • \u8FD0\u884C\u6001---\u5360\u6709CPU\uFF0C\u5E76\u5728CPU\u4E0A\u8FD0\u884C\u3002\u6CE8\u610F\uFF1A\u5355\u6838\u5904\u7406\u673A\u73AF\u5883\u4E0B\uFF0C\u6BCF\u4E00\u4E2A\u65F6\u523B\u6700\u591A\u53EA\u6709\u4E00\u4E2A\u8FDB\u7A0B\u5904\u4E8E\u8FD0\u884C\u6001\uFF08\u53CC\u6838\u73AF\u5883\u4E0B\uFF0C\u53EF\u4EE5\u540C\u65F6\u6709\u4E24\u4E2A\u8FDB\u7A0B\u5904\u4E8E\u8FD0\u884C\u6001\u5373\u5728\u5FAE\u89C2\u4E0A\u4E5F\u662F\u5E76\u884C\u7684\uFF0C\u5355\u6838\u7684\u8BDD\uFF0C\u5982\u679C\u6709\u591A\u4E2A\u8FDB\u7A0B\uFF0C\u90A3\u4E48\u5728\u5FAE\u89C2\u4E0A\u5C31\u662F\u4E32\u884C\u6267\u884C\u7684\uFF0C\u5728\u5B8F\u89C2\u4E0A\u662F\u5E76\u884C\u7684\u3002\uFF09

                                                                        • \u5C31\u7EEA\u6001---\u5DF2\u7ECF\u5177\u5907\u8FD0\u884C\u6761\u4EF6\uFF0C\u4F46\u662F\u7531\u4E8E\u6CA1\u6709\u7A7A\u95F2CPU\uFF0C\u800C\u6682\u65F6\u4E0D\u80FD\u8FD0\u884C\u3002\u5904\u4E8E\u5C31\u7EEA\u6001\u7684\u8FDB\u7A0B\uFF0C\u5DF2\u7ECF\u62E5\u6709\u4E86\u9664\u5904\u7406\u5668\u4E4B\u5916\u6240\u6709\u9700\u8981\u7684\u8D44\u6E90\uFF0C\u4E00\u65E6\u83B7\u5F97\u5904\u7406\u5668\uFF0C\u5373\u53EF\u7ACB\u5373\u8FDB\u5165\u8FD0\u884C\u6001\u5F00\u59CB\u8FD0\u884C\uFF0C\u5373\u4E07\u4E8B\u5177\u5907\uFF0C\u53EA\u6B20CPU

                                                                        • \u963B\u585E\u6001---\u56E0\u7B49\u5F85\u67D0\u4E00\u4E8B\u4EF6\uFF0C\u800C\u6682\u65F6\u4E0D\u80FD\u8FD0\u884C\uFF08\u4E0D\u662F\u5728\u7B49\u5F85CPU\uFF0C\u800C\u662F\u7B49\u5F85\u9664\u4E86CPU\u4E4B\u5916\u7684\u5176\u4ED6\u4E8B\u4EF6\uFF0C\u5982\u679C\u53EA\u662F\u7B49\u5F85CPU\uFF0C\u90A3\u4E48\u662F\u5C31\u7EEA\u6001\uFF09\u3002\u5982\u7B49\u5F85\u64CD\u4F5C\u7CFB\u7EDF\u5206\u914D\u6253\u5370\u673A\u3001\u7B49\u5F85\u8BFB\u78C1\u76D8\u64CD\u4F5C\u7684\u7ED3\u679C\u7B49\uFF0C\u8FD9\u4E9BIO\u64CD\u4F5C\u4F7F\u5F97\u6B64\u8FDB\u7A0B\u963B\u585E\uFF0C\u6B64\u8FDB\u7A0B\u5FC5\u987B\u7B49\u5F85IO\u64CD\u4F5C\u5B8C\u6210\uFF0C\u6B64\u65F6CPU\u5904\u4E8E\u7A7A\u95F2\u72B6\u6001\uFF08\u8FD9\u4E5F\u662F\u591A\u7EBF\u7A0B\u6216\u8005\u8BF4\u591A\u4EFB\u52A1\u7684\u610F\u4E49\uFF0C\u5728\u67D0\u4E2A\u7EBF\u7A0B\u56E0\u4E3AIO\u64CD\u4F5C\u800C\u963B\u585E\u7684\u9002\u5408\uFF0C\u4E0D\u81F3\u4E8E\u8BA9CPU\u5904\u4E8E\u7A7A\u95F2\u72B6\u6001\u800C\u5BFC\u81F4CPU\u5229\u7528\u7387\u5F88\u4F4E\u548C\u7CFB\u7EDF\u541E\u5410\u91CF\u5F88\u4F4E\uFF0C\u5982\u679C\u91C7\u7528\u591A\u7EBF\u7A0B\uFF0C\u8FD9\u79CD\u60C5\u51B5\u4E0B\uFF0CCPU\u53EF\u4EE5\u5728\u67D0\u4E2A\u7EBF\u7A0B\u56E0\u4E3AIO\u64CD\u4F5C\u800C\u963B\u585E\u7684\u65F6\u5019\uFF0C\u4E0D\u5904\u4E8E\u7A7A\u95F2\u72B6\u6001\uFF0C\u800C\u53BB\u6267\u884C\u5176\u4ED6\u7EBF\u7A0B\uFF0C\u63D0\u9AD8\u7CFB\u7EDF\u541E\u5410\u91CF\uFF09\u3002

                                                                          CPU\u662F\u8BA1\u7B97\u673A\u4E2D\u6700\u6602\u8D35\u7684\u90E8\u4EF6\uFF0C\u4E3A\u4E86\u63D0\u9AD8CPU\u7684\u5229\u7528\u7387\uFF0C\u9700\u8981\u5148\u5C06\u8FDB\u7A0B\u9700\u8981\u7684\u5176\u4ED6\u8D44\u6E90\u5206\u914D\u5230\u4F4D\uFF0C\u624D\u80FD\u5F97\u5230CPU\u7684\u670D\u52A1\uFF0C\u4E5F\u5C31\u662F\u8BF4\uFF0C\u5904\u4E8E\u963B\u585E\u6001\u7684\u8FDB\u7A0B\uFF0C\u662F\u8FD8\u6CA1\u6709\u83B7\u5F97\u9664\u4E86CPU\u4E4B\u5916\u7684\u5176\u4ED6\u8D44\u6E90\u3002\u5982\u679C\u83B7\u5F97\u4E86\u9664\u4E86CPU\u4EE5\u5916\u7684\u5176\u4ED6\u8D44\u6E90\uFF0C\u53EA\u5DEECPU\uFF0C\u90A3\u4E48\u8FD9\u4E2A\u8FDB\u7A0B\u4F1A\u5904\u4E8E\u5C31\u7EEA\u6001\u3002

                                                                          \u83B7\u5F97\u4E86CPU\u4EE5\u5916\u7684\u5176\u4ED6\u6240\u6709\u9700\u8981\u7684\u8D44\u6E90\uFF0C\u4F1A\u4ECE\u963B\u585E\u6001\u5230\u5C31\u7EEA\u6001\uFF0C\u76F8\u5F53\u4E8EJava\u4E2D\u88AB\u5524\u9192\uFF01\uFF01

                                                                      3. \u8FDB\u7A0B\u7684\u53E6\u5916\u4E24\u79CD\u72B6\u6001

                                                                        • \u521B\u5EFA\u6001\uFF08NEW\uFF0C\u65B0\u5EFA\u6001\uFF09\uFF1A\u8FDB\u7A0B\u6B63\u5728\u88AB\u521B\u5EFA\uFF0C\u64CD\u4F5C\u7CFB\u7EDF\u4E3A\u8FDB\u7A0B\u5206\u914D\u5185\u5B58\u7A7A\u95F4\u7B49\u7CFB\u7EDF\u8D44\u6E90\uFF0C\u521D\u59CB\u5316PCB
                                                                        • \u7EC8\u6B62\u6001\uFF08TERMINATED\uFF09\uFF1A\u8FDB\u7A0B\u6B63\u5728\u4ECE\u7CFB\u7EDF\u4E2D\u64A4\u9500\uFF0C\u64CD\u4F5C\u7CFB\u7EDF\u4F1A\u56DE\u6536\u8FDB\u7A0B\u6240\u62E5\u6709\u7684\u8D44\u6E90\u3001\u64A4\u9500PCB
                                                                      \u8FDB\u7A0B\u72B6\u6001\u7684\u8F6C\u6362
                                                                      1. image-20211216153719194

                                                                        \u6CE8\u610F\uFF1A\u4E0D\u80FD\u7531\u963B\u585E\u6001\u76F4\u63A5\u8F6C\u6362\u4E3A\u8FD0\u884C\u6001\uFF08\u5FC5\u987B\u5148\u8F6C\u6362\u4E3A\u5C31\u7EEA\u6001\uFF09\uFF0C\u4E5F\u4E0D\u80FD\u7531\u5C31\u7EEA\u6001\u76F4\u63A5\u8F6C\u6362\u4E3A\u963B\u585E\u6001\uFF08\u56E0\u4E3A\u8FDB\u7A0B\u8FDB\u5165\u963B\u585E\u6001\u662F\u8FDB\u7A0B\u4E3B\u52A8\u8BF7\u6C42\u7684\uFF0C\u5FC5\u7136\u9700\u8981\u8FDB\u7A0B\u5728\u8FD0\u884C\u65F6\u624D\u80FD\u53D1\u51FA\u8FD9\u79CD\u8BF7\u6C42\u3002\uFF09

                                                                      2. image-20211216154057426

                                                                      \u8FDB\u7A0B\u63A7\u5236

                                                                      \u57FA\u672C\u6982\u5FF5

                                                                      1. \u8FDB\u7A0B\u63A7\u5236\u7684\u4E3B\u8981\u529F\u80FD\u662F\u5BF9\u7CFB\u7EDF\u4E2D\u7684\u6240\u6709\u8FDB\u7A0B\u5B9E\u65BD\u6709\u6548\u7684\u7BA1\u7406\uFF0C\u5B83\u5177\u6709\u521B\u5EFA\u65B0\u8FDB\u7A0B\u3001\u64A4\u9500\u5DF2\u6709\u8FDB\u7A0B\u3001\u5B9E\u73B0\u8FDB\u7A0B\u72B6\u6001\u8F6C\u6362\u6BD4\u5982\u963B\u585E\u3001\u5524\u9192\u7B49\u529F\u80FD\u3002

                                                                        \u7B80\u5316\u7406\u89E3\uFF1A\u53CD\u6B63\u8FDB\u7A0B\u63A7\u5236\u5C31\u662F\u8981\u5B9E\u73B0\u8FDB\u7A0B\u72B6\u6001\u8F6C\u6362

                                                                        image-20211216155307167

                                                                      2. \u5982\u4F55\u5B9E\u73B0\u8FDB\u7A0B\u63A7\u5236\uFF1F

                                                                        image-20211216155950660

                                                                      3. PCB\u6240\u5904\u7684\u961F\u5217\u548CPCB\u91CC\u7684\u72B6\u6001\u6807\u5FD7\u4E00\u5B9A\u8981\u662F\u5BF9\u5E94\u7684\uFF0C\u4E00\u81F4\u7684\uFF0C\u4E0D\u7136\u4F1A\u4EA7\u751F\u7CFB\u7EDF\u9519\u8BEF\uFF0C\u4E8E\u662F\u91C7\u7528\u539F\u8BED\u6765\u5B9E\u73B0\u8FDB\u7A0B\u63A7\u5236\uFF0C\u5B9E\u73B0\u8FDB\u7A0B\u72B6\u6001\u7684\u8F6C\u6362\uFF0C\u539F\u8BED\u53EF\u4EE5\u7406\u89E3\u4E3A\u4E00\u6C14\u5475\u6210\u3002

                                                                      \u8FDB\u7A0B\u63A7\u5236\u76F8\u5173\u7684\u539F\u8BED

                                                                      1. \u7528\u539F\u8BED\u5B9E\u73B0\u8FDB\u7A0B\u63A7\u5236\uFF0C\u539F\u8BED\u7684\u7279\u70B9\u662F\u6267\u884C\u671F\u95F4\u4E0D\u5141\u8BB8\u4E2D\u65AD\uFF0C\u53EA\u80FD\u4E00\u6C14\u5475\u6210

                                                                        \u8FD9\u79CD\u4E0D\u53EF\u88AB\u4E2D\u65AD\u7684\u64CD\u4F5C\u5373\u539F\u5B50\u64CD\u4F5C

                                                                        \u539F\u8BED\u91C7\u7528\u201C\u5173\u4E2D\u65AD\u6307\u4EE4\u201D\u548C\u201C\u5F00\u4E2D\u65AD\u6307\u4EE4\u201D\u5B9E\u73B0

                                                                        image-20211216160414267

                                                                        \u663E\u7136\uFF0C\u5173\u3001\u5F00\u4E2D\u65AD\u6307\u4EE4\u7684\u6743\u9650\u975E\u5E38\u5927\uFF0C\u5FC5\u7136\u662F\u53EA\u5141\u8BB8\u5728\u6838\u5FC3\u6001\u4E0B\u6267\u884C\u7684\u7279\u6743\u6307\u4EE4

                                                                        \u539F\u8BED\u4E5F\u662F\u53EA\u80FD\u8FD0\u884C\u5728\u6838\u5FC3\u6001\u7684\u3002

                                                                      2. \u8FDB\u7A0B\u63A7\u5236\u4F1A\u5BFC\u81F4\u8FDB\u7A0B\u72B6\u6001\u7684\u8F6C\u6362

                                                                        \u65E0\u8BBA\u54EA\u4E2A\u539F\u8BED\uFF0C\u8981\u505A\u7684\u65E0\u975E\u662F\u4E09\u7C7B\u4E8B\u60C5\uFF1A

                                                                        • \u66F4\u65B0PCB\u4E2D\u7684\u4FE1\u606F\uFF08\u5982\u4FEE\u6539PCB\u4E2D\u7684\u8FDB\u7A0B\u72B6\u6001\u6807\u5FD7\uFF0C\u5C06\u8FD0\u884C\u73AF\u5883\u4FDD\u5B58\u5230PCB\uFF0C\u4ECEPCB\u6062\u590D\u8FDB\u7A0B\u8FD0\u884C\u73AF\u5883\uFF09
                                                                          • \u6240\u6709\u7684\u8FDB\u7A0B\u63A7\u5236\u539F\u8BED\u4E00\u5B9A\u90FD\u4F1A\u4FEE\u6539\u8FDB\u7A0B\u72B6\u6001\u6807\u5FD7
                                                                          • \u5265\u593A\u5F53\u524D\u8FD0\u884C\u8FDB\u7A0B\u7684CPU\u4F7F\u7528\u6743\u5FC5\u987B\u9700\u8981\u4FDD\u5B58\u5176\u8FD0\u884C\u73AF\u5883\uFF0C\u4EE5\u8FDB\u884C\u4E0A\u4E0B\u6587\u5207\u6362
                                                                          • \u67D0\u8FDB\u7A0B\u5F00\u59CB\u8FD0\u884C\u524D\u5FC5\u7136\u8981\u6062\u590D\u5176\u8FD0\u884C\u73AF\u5883\u5373\u4E0A\u4E0B\u6587\u5207\u6362
                                                                        • \u5C06PCB\u63D2\u5165\u5408\u9002\u7684\u961F\u5217\uFF0C\u6240\u63D2\u5165\u7684\u961F\u5217\u8981\u4E0EPCB\u91CC\u7684\u4FE1\u606F\u4FDD\u6301\u4E00\u81F4\uFF0C\u6240\u4EE5\u8981\u901A\u8FC7\u539F\u8BED\u6765\u5B9E\u73B0\u8FDB\u7A0B\u63A7\u5236
                                                                        • \u5206\u914D\u3001\u56DE\u6536\u8D44\u6E90\uFF0C\u6BD4\u5982\u8FDB\u7A0BTERMINATED\u4E4B\u540E\uFF0C\u9700\u8981\u56DE\u6536\u5185\u5B58\u8FD9\u79CD\u7CFB\u7EDF\u8D44\u6E90\uFF01\uFF01 \u5F53\u7136\u53EF\u80FD\u8FD8\u6709\u8FD9\u4E2A\u8FDB\u7A0B\u6267\u884C\u6240\u9700\u8981\u7684\u5176\u4ED6\u8D44\u6E90
                                                                      3. image-20211216161206697

                                                                        image-20211216161225780

                                                                        image-20211216161549508

                                                                        image-20211216161628062

                                                                        \u6CE8\u610F\uFF1A\u4E00\u5B9A\u8981\u6CE8\u610F\uFF0C\u8FDB\u7A0B\u8F6C\u6362\u5230\u8FD0\u884C\u6001\uFF0C\u4E00\u5B9A\u8981\u6062\u590D\u8FDB\u7A0B\u8FD0\u884C\u73AF\u5883\uFF0C\u5982\u679C\u8FDB\u7A0B\u4ECE\u8FD0\u884C\u6001\u8F6C\u6362\u5230\u963B\u585E\u6001\uFF0C\u90A3\u4E48\u8981\u4FDD\u62A4\u8FDB\u7A0B\u8FD0\u884C\u73AF\u5883\uFF0C\u8FDB\u7A0B\u8FD0\u884C\u73AF\u5883\u4FDD\u5B58\u5230PCB\u3002

                                                                        \u8FDB\u7A0B\u8F6C\u6362\u5230\u963B\u585E\u6001\uFF0C\u662F\u4E3B\u52A8\u52A8\u4F5C\uFF0C\u6240\u4EE5\u4E00\u5B9A\u662F\u8FD0\u884C\u6001---\u963B\u585E\u6001\uFF0C\u56E0\u4E3A\u662F\u8FDB\u7A0B\u4E3B\u52A8\u7533\u8BF7\u7684\uFF0C\u4ECE\u963B\u585E\u6001\u662F\u8F6C\u6362\u5230\u5C31\u7EEA\u6001\uFF0C\u8FD9\u4E2A\u8FC7\u7A0B\u65E0\u9700\u6062\u590D\u8FDB\u7A0B\u8FD0\u884C\u73AF\u5883\uFF0C\u5F53\u8FDB\u7A0B\u4ECE\u5C31\u7EEA\u6001\u8F6C\u6362\u5230\u8FD0\u884C\u6001\u65F6\uFF0C\u9700\u4ECEPCB\u6062\u590D\u8FDB\u7A0B\u8FD0\u884C\u73AF\u5883\u3002

                                                                      \u8FDB\u7A0B\u901A\u4FE1

                                                                      \u6982\u5FF5

                                                                      1. \u8FDB\u7A0B\u901A\u4FE1\u6307\u7684\u5C31\u662F\u8FDB\u7A0B\u4E4B\u95F4\u7684\u4FE1\u606F\u4EA4\u6362

                                                                        \u8FDB\u7A0B\u662F\u8D44\u6E90\u5206\u914D\u7684\u57FA\u672C\u5355\u4F4D\uFF08\u5305\u62EC\u5185\u5B58\u5730\u5740\u7A7A\u95F4\uFF09\uFF0C\u56E0\u6B64\u5404\u8FDB\u7A0B\u62E5\u6709\u7684\u5185\u5B58\u5730\u5740\u7A7A\u95F4\u76F8\u4E92\u72EC\u7ACB

                                                                        \u4E3A\u4E86\u4FDD\u8BC1\u5B89\u5168\uFF0C\u4E00\u4E2A\u8FDB\u7A0B\u4E0D\u80FD\u76F4\u63A5\u8BBF\u95EE\u53E6\u4E00\u4E2A\u8FDB\u7A0B\u7684\u5730\u5740\u7A7A\u95F4

                                                                        \u4F46\u662F\u8FDB\u7A0B\u4E4B\u95F4\u7684\u4FE1\u606F\u4EA4\u6362\u53C8\u662F\u5FC5\u987B\u5B9E\u73B0\u7684\uFF0C\u6BD4\u5982\u8BF4\u4F7F\u7528\u5E94\u7528\u7A0B\u5E8F\u7684\u65F6\u5019\u7684\u5206\u4EAB\u529F\u80FD\uFF0C\u5C06\u4E00\u4E2A\u8FDB\u7A0B\u7684\u6570\u636E\u4FE1\u606F\u548C\u53E6\u4E00\u4E2A\u8FDB\u7A0B\u8FDB\u884C\u901A\u4FE1\uFF0C\u6240\u4EE5\u9700\u8981\u8FDB\u7A0B\u4E4B\u95F4\u7684\u901A\u4FE1

                                                                        \u4E3A\u4E86\u4FDD\u8BC1\u8FDB\u7A0B\u95F4\u7684\u5B89\u5168\u901A\u4FE1\uFF0C\u64CD\u4F5C\u7CFB\u7EDF\u63D0\u4F9B\u4E86\u4E00\u4E9B\u65B9\u6CD5---\u5171\u4EAB\u5B58\u50A8\u3001\u6D88\u606F\u4F20\u9012\u548C\u7BA1\u9053\u901A\u4FE1

                                                                      \u5171\u4EAB\u5B58\u50A8

                                                                      1. \u4E24\u4E2A\u8FDB\u7A0B\u4E0D\u80FD\u76F4\u63A5\u8BBF\u95EE\u5BF9\u65B9\u7684\u5730\u5740\u7A7A\u95F4\uFF0C\u6240\u4EE5\u64CD\u4F5C\u7CFB\u7EDF\u4F1A\u4E3A\u4E24\u4E2A\u8FDB\u7A0B\u5206\u914D\u4E00\u4E2A\u5171\u4EAB\u7A7A\u95F4\uFF0C\u4E24\u4E2A\u8FDB\u7A0B\u4E4B\u95F4\u7684\u901A\u4FE1\u5C31\u901A\u8FC7\u8FD9\u4E2A\u5171\u4EAB\u7A7A\u95F4\u6765\u5B8C\u6210\u3002

                                                                        \u4F46\u662F\u8FD9\u4E24\u4E2A\u8FDB\u7A0B\u5BF9\u5171\u4EAB\u7A7A\u95F4\u7684\u8BBF\u95EE\u5FC5\u987B\u662F\u4E92\u65A5\u7684\uFF0C\u8FD9\u5C31\u662F\u524D\u9762\u63D0\u5230\u7684\u4E92\u65A5\u5171\u4EAB

                                                                        \u4E92\u65A5\u5171\u4EAB\u5C31\u662F\u7CFB\u7EDF\u4E2D\u7684\u67D0\u4E9B\u8D44\u6E90\uFF0C\u867D\u7136\u53EF\u4EE5\u63D0\u4F9B\u7ED9\u591A\u4E2A\u8FDB\u7A0B\u4F7F\u7528\uFF0C\u4F46\u4E00\u4E2A\u65F6\u95F4\u6BB5\u5185\u53EA\u5141\u8BB8\u4E00\u4E2A\u8FDB\u7A0B\u8BBF\u95EE\u8BE5\u8D44\u6E90\u3002

                                                                      2. \u4E92\u65A5\u8BBF\u95EE\uFF0C\u4E00\u822C\u662F\u901A\u8FC7\u64CD\u4F5C\u7CFB\u7EDF\u63D0\u4F9B\u7684\u5DE5\u5177\u5B9E\u73B0\u7684\uFF0C\u64CD\u4F5C\u7CFB\u7EDF\u53EA\u8D1F\u8D23\u63D0\u4F9B\u5171\u4EAB\u7A7A\u95F4\u548C\u540C\u6B65\u4E92\u65A5\u5DE5\u5177\uFF08\u5982P\u3001V\u64CD\u4F5C\uFF09

                                                                      3. \u5171\u4EAB\u5B58\u50A8\uFF08\u5171\u4EAB\u7A7A\u95F4\uFF09\u5206\u4E3A\u4E24\u79CD

                                                                        • \u57FA\u4E8E\u6570\u636E\u7ED3\u6784\u7684\u5171\u4EAB

                                                                          \u5171\u4EAB\u7A7A\u95F4\u4E2D\u53EA\u80FD\u5B58\u653E\u4E00\u79CD\u56FA\u5B9A\u7684\u6570\u636E\u7ED3\u6784\uFF0C\u6BD4\u5982\u5171\u4EAB\u7A7A\u95F4\u91CC\u53EA\u80FD\u653E\u4E00\u4E2A\u957F\u5EA6\u4E3A10\u7684\u6570\u7EC4\uFF0C\u90A3\u4E48\u4E24\u4E2A\u8FDB\u7A0B\u4E4B\u95F4\u7684\u901A\u4FE1\uFF0C\u6BCF\u4E00\u6B21\u53EA\u80FD\u901A\u8FC7\u8FD9\u4E2A\u957F\u5EA6\u4E3A10\u7684\u6570\u7EC4\uFF0C\u8FD9\u79CD\u5171\u4EAB\u65B9\u5F0F\u901F\u5EA6\u6162\u3001\u9650\u5236\u591A\uFF0C\u662F\u4E00\u79CD\u4F4E\u7EA7\u901A\u4FE1\u65B9\u5F0F\u3002

                                                                        • \u57FA\u4E8E\u5B58\u50A8\u533A\u7684\u5171\u4EAB

                                                                          \u64CD\u4F5C\u7CFB\u7EDF\u53EA\u8D1F\u8D23\u4E3A\u901A\u4FE1\u7684\u8FDB\u7A0B\u63D0\u4F9B\u5B58\u50A8\u7A7A\u95F4\uFF0C\u5728\u5185\u5B58\u4E2D\u753B\u51FA\u4E00\u5757\u5171\u4EAB\u5B58\u50A8\u533A\uFF0C\u4F46\u662F\u5728\u8FD9\u4E2A\u5171\u4EAB\u7A7A\u95F4\u4E2D\uFF0C\u4E24\u4E2A\u8FDB\u7A0B\u4EA4\u6362\u7684\u6570\u636E\u662F\u4EC0\u4E48\u5F62\u5F0F\uFF0C\u5B58\u653E\u7684\u4F4D\u7F6E\u90FD\u662F\u7531\u8FDB\u7A0B\u63A7\u5236\uFF0C\u800C\u4E0D\u662F\u64CD\u4F5C\u7CFB\u7EDF\uFF0C\u76F8\u6BD4\u4E4B\u4E0B\uFF0C\u8FD9\u79CD\u5171\u4EAB\u65B9\u5F0F\u901F\u5EA6\u66F4\u5FEB\uFF0C\u662F\u4E00\u79CD\u9AD8\u7EA7\u901A\u4FE1\u65B9\u5F0F\uFF08\u76F8\u5F53\u4E8E\u662F\u8BF4\u4E0D\u4F1A\u6536\u5230\u90A3\u4E48\u591A\u9650\u5236\uFF09\u3002

                                                                      \u6D88\u606F\u4F20\u9012

                                                                      1. \u8FDB\u7A0B\u95F4\u7684\u6570\u636E\u4EA4\u6362\u4EE5\u683C\u5F0F\u5316\u7684\u6D88\u606F\u4E3A\u5355\u4F4D\uFF0C\u8FDB\u7A0B\u901A\u8FC7\u64CD\u4F5C\u7CFB\u7EDF\u63D0\u4F9B\u7684\u201C\u53D1\u9001\u6D88\u606F/\u63A5\u6536\u6D88\u606F\u201D\u4E24\u4E2A\u539F\u8BED\u8FDB\u884C\u6570\u636E\u4EA4\u6362\u3002

                                                                        \u4E00\u4E2A\u683C\u5F0F\u5316\u7684\u6D88\u606F\u4F1A\u5305\u542B\u6D88\u606F\u5934\u548C\u6D88\u606F\u4F53\u4E24\u4E2A\u90E8\u5206

                                                                        \u6D88\u606F\u5934\u5305\u62EC\uFF1A\u53D1\u9001\u8FDB\u7A0BID\uFF0C\u63A5\u6536\u8FDB\u7A0BID\uFF0C\u6D88\u606F\u7C7B\u578B\uFF0C\u6D88\u606F\u957F\u5EA6\u7B49\u683C\u5F0F\u5316\u7684\u4FE1\u606F\uFF08\u8BA1\u7B97\u673A\u7F51\u7EDC\u4E2D\u53D1\u9001\u7684\u201C\u62A5\u6587\u201D\u5176\u5B9E\u5C31\u662F\u4E00\u79CD\u683C\u5F0F\u5316\u7684\u6D88\u606F\uFF09

                                                                        image-20211216171359712

                                                                      2. \u6D88\u606F\u4F20\u9012\u5206\u4E3A\u4E24\u79CD

                                                                        • \u76F4\u63A5\u901A\u4FE1\u65B9\u5F0F

                                                                          \u628A\u6D88\u606F\u76F4\u63A5\u6302\u5230\u63A5\u6536\u8FDB\u7A0B\u7684\u6D88\u606F\u7F13\u51B2\u961F\u5217\u4E0A\uFF0C\u6BCF\u4E00\u4E2A\u8FDB\u7A0B\u4F1A\u6709\u4E00\u4E2A\u6D88\u606F\u7F13\u51B2\u961F\u5217\uFF0C\u5982\u679C\u6709\u53E6\u5916\u4E00\u4E2A\u8FDB\u7A0B\u60F3\u7ED9\u8FD9\u4E2A\u8FDB\u7A0B\u53D1\u9001\u6D88\u606F\u7684\u65F6\u5019\uFF0C\u53D1\u9001\u8FDB\u7A0B\u9996\u5148\u4F1A\u521B\u5EFA\u597D\u6D88\u606F\u5934\u548C\u6D88\u606F\u4F53\uFF0C\u901A\u8FC7\u53D1\u9001\u539F\u8BED\u53D1\u9001\u7ED9\u76EE\u6807\u8FDB\u7A0B\uFF0C\u6D88\u606F\u5C31\u4F1A\u6302\u5230\u76EE\u6807\u8FDB\u7A0B\u7684\u6D88\u606F\u7F13\u51B2\u961F\u5217\u7684\u961F\u5C3E\u3002

                                                                          \u76EE\u6807\u8FDB\u7A0B\u901A\u8FC7\u63A5\u6536\u539F\u8BED\uFF0C\u4F9D\u6B21\u628A\u6D88\u606F\u7F13\u51B2\u961F\u5217\u7684\u6D88\u606F\u53D6\u8D70

                                                                        • \u95F4\u63A5\u901A\u4FE1\u65B9\u5F0F

                                                                          \u6D88\u606F\u8981\u5148\u53D1\u9001\u5230\u4E2D\u95F4\u5B9E\u4F53\uFF08\u4FE1\u7BB1\uFF09\u4E2D\uFF0C\u56E0\u6B64\u4E5F\u79F0\u4E3A\u201C\u4FE1\u7BB1\u901A\u4FE1\u65B9\u5F0F\u201D

                                                                          image-20211216171817705

                                                                          \u4FE1\u7BB1\u4E2D\u7684\u6D88\u606F\u7531\u54EA\u4E2A\u8FDB\u7A0B\u53D1\u9001\u7684\uFF0C\u7531\u54EA\u4E2A\u8FDB\u7A0B\u63A5\u6536\uFF0C\u90FD\u5728\u6D88\u606F\u5934\u4E2D

                                                                          \u901A\u8FC7\u53D1\u9001\u539F\u8BED\uFF0C\u53D1\u9001\u8FDB\u7A0B\u53D1\u9001\u6D88\u606F\u5230\u4FE1\u7BB1\u4E2D

                                                                          \u540C\u6837\uFF0C\u63A5\u6536\u8FDB\u7A0B\u901A\u8FC7\u63A5\u6536\u539F\u8BED\uFF0C\u4ECE\u4FE1\u7BB1\u4E2D\u53D6\u6D88\u606F

                                                                      \u7BA1\u9053\u901A\u4FE1

                                                                      1. \u6240\u8C13\u7684\u7BA1\u9053\u5176\u5B9E\u662F\u4E00\u79CD\u7279\u6B8A\u7684\u5171\u4EAB\u6587\u4EF6\u3002

                                                                        \u201C\u7BA1\u9053\u201D\u662F\u6307\u7528\u4E8E\u8FDE\u63A5\u8BFB\u5199\u8FDB\u7A0B\u7684\u4E00\u4E2A\u5171\u4EAB\u6587\u4EF6\uFF0C\u53C8\u540Dpipe\u6587\u4EF6

                                                                        \u5176\u5B9E\u5C31\u662F\u5728\u5185\u5B58\u4E2D\u5F00\u8F9F\u4E00\u4E2A\u5927\u5C0F\u56FA\u5B9A\u7684\u7F13\u51B2\u533A

                                                                        \u8FD9\u4E2A\u7F13\u51B2\u533A\u7684\u5927\u5C0F\u4E00\u822C\u548C\u5185\u5B58\u9875\u9762\u662F\u4E00\u6837\u7684

                                                                        image-20211216170454485

                                                                      2. \u4E00\u4E2A\u7BA1\u9053\u53EA\u80FD\u91C7\u7528\u534A\u53CC\u5DE5\u901A\u4FE1\uFF0C\u67D0\u4E00\u65F6\u95F4\u6BB5\u53EA\u80FD\u5B9E\u73B0\u5355\u5411\u7684\u4F20\u8F93\uFF0C\u5982\u679C\u8981\u5B9E\u73B0\u53CC\u5411\u540C\u65F6\u901A\u4FE1\uFF0C\u5219\u9700\u8981\u8BBE\u7F6E\u4E24\u4E2A\u7BA1\u9053\u3002

                                                                        image-20211216170707557

                                                                      3. \u5404\u4E2A\u8FDB\u7A0B\u5BF9\u7BA1\u9053\u7684\u8BBF\u95EE\uFF0C\u9700\u8981\u4E92\u65A5\u7684\u8FDB\u884C\uFF0C\u4E5F\u662F\u524D\u9762\u63D0\u5230\u7684\u4E92\u65A5\u5171\u4EAB\u3002

                                                                      4. \u6570\u636E\u4EE5\u5B57\u7B26\u6D41\u7684\u5F62\u5F0F\u5199\u5165\u7BA1\u9053\uFF0C\u5F53\u7BA1\u9053\u5199\u6EE1\u65F6\uFF0C\u5199\u8FDB\u7A0B\u7684write()\u7CFB\u7EDF\u8C03\u7528\u5C06\u5BFC\u81F4\u5199\u8FDB\u7A0B\u88AB\u963B\u585E\uFF0C\u7B49\u5F85\u8BFB\u8FDB\u7A0B\u5C06\u6570\u636E\u53D6\u8D70\u3002

                                                                        \u5F53\u8BFB\u8FDB\u7A0B\u5C06\u6570\u636E\u5168\u90E8\u53D6\u8D70\u540E\uFF0C\u7BA1\u9053\u53D8\u7A7A\uFF0C\u6B64\u65F6\u8BFB\u8FDB\u7A0B\u7684read()\u7CFB\u7EDF\u8C03\u7528\u5C06\u5BFC\u81F4\u8BFB\u8FDB\u7A0B\u963B\u585E

                                                                      5. \u5982\u679C\u6CA1\u5199\u6EE1\uFF0C\u5C31\u4E0D\u5141\u8BB8\u8BFB\uFF0C\u5982\u679C\u6CA1\u8BFB\u7A7A\uFF0C\u5C31\u4E0D\u5141\u8BB8\u5199\u3002

                                                                      6. \u6570\u636E\u4E00\u65E6\u88AB\u8BFB\u51FA\uFF0C\u5C31\u4ECE\u7BA1\u9053\u4E2D\u629B\u5F03\uFF0C\u8FD9\u5C31\u610F\u5473\u7740\u8BFB\u8FDB\u7A0B\u6700\u591A\u53EA\u80FD\u6709\u4E00\u4E2A\uFF0C\u5426\u5219\u53EF\u80FD\u4F1A\u6709\u8BFB\u9519\u6570\u636E\u7684\u60C5\u51B5

                                                                      image-20211216172035502

                                                                      \u7EBF\u7A0B\u548C\u591A\u7EBF\u7A0B\u6A21\u578B

                                                                      \u6982\u5FF5

                                                                      1. \u5728\u6CA1\u6709\u5F15\u5165\u8FDB\u7A0B\u4E4B\u524D\uFF0C\u7CFB\u7EDF\u4E2D\u5404\u4E2A\u7A0B\u5E8F\u53EA\u80FD\u4E32\u884C\u6267\u884C\u3002

                                                                      2. \u6709\u7684\u8FDB\u7A0B\uFF0C\u53EF\u80FD\u9700\u8981\u540C\u65F6\u505A\u5F88\u591A\u4E8B\uFF0C\u800C\u4F20\u7EDF\u7684\u8FDB\u7A0B\u53EA\u80FD\u4E32\u884C\u5730\u6267\u884C\u4E00\u7CFB\u5217\u7A0B\u5E8F\uFF08\u591A\u4E2A\u8FDB\u7A0B\u4E4B\u95F4\u662F\u5E76\u53D1\u7684\uFF0C\u4F46\u662F\u4E00\u4E2A\u8FDB\u7A0B\u5185\u90E8\u7684\u7A0B\u5E8F\u662F\u4E32\u884C\u6267\u884C\u7684\u3002\uFF09\uFF0C\u4E3A\u6B64\uFF0C\u5F15\u5165\u4E86\u201C\u7EBF\u7A0B\u201D\uFF0C\u6765\u589E\u52A0\u5E76\u53D1\u5EA6\u3002

                                                                        image-20211216191425419

                                                                        \u540C\u4E00\u4E2A\u8FDB\u7A0B\u4E2D\u88AB\u5206\u4E3A\u4E86\u591A\u4E2A\u7EBF\u7A0B\u3002

                                                                        \u591A\u4E2A\u7EBF\u7A0B\u4E4B\u95F4\uFF0C\u53EF\u4EE5\u5E76\u53D1\u5730\u6267\u884C\uFF01\uFF01\u4E4B\u524D\u4E00\u76F4\u8BF4\u7684\u90FD\u662F\u8FDB\u7A0B\u4E4B\u95F4\u7684\u5E76\u53D1\uFF0C\u4F46\u662F\u5F15\u5165\u4E86\u7EBF\u7A0B\u4E4B\u540E\uFF0C\u591A\u4E2A\u7EBF\u7A0B\u4E4B\u95F4\uFF0C\u80FD\u591F\u5E76\u53D1\u6267\u884C\uFF0C\u4E5F\u5C31\u662F\u5728\u5B8F\u89C2\u4E0A\u591A\u4E2A\u7EBF\u7A0B\u662F\u5E76\u884C\u6267\u884C\u7684\uFF0C\u5728\u5FAE\u89C2\u4E0A\uFF0C\u662FCPU\u4EA4\u66FF\u6267\u884C\u8FD9\u591A\u4E2A\u7EBF\u7A0B\uFF0C\u4E5F\u5C31\u662F\u5FAE\u89C2\u4E0A\u662F\u5E76\u53D1\u7684\uFF0C\u4F46\u662F\u5982\u679CCPU\u662F\u591A\u6838\u7684\uFF0C\u5FAE\u89C2\u4E0A\u4E5F\u80FD\u591F\u5B9E\u73B0\u771F\u6B63\u610F\u4E49\u4E0A\u7684\u5E76\u884C\u3002

                                                                      3. \u5F15\u5165\u4E86\u7EBF\u7A0B\u4E4B\u540E\uFF0C\u7EBF\u7A0B\u6210\u4E3A\u4E86\u7A0B\u5E8F\u6267\u884C\u6D41\u7684\u6700\u5C0F\u5355\u4F4D\u3002\u8FDB\u7A0B\u662F\u8D44\u6E90\u5206\u914D\u7684\u6700\u5C0F\u5355\u4F4D\uFF0C\u591A\u4E2A\u7EBF\u7A0B\u4F1A\u5171\u7528\u8FDB\u7A0B\u7684\u8D44\u6E90\uFF0C\u4F46\u662F\u7EBF\u7A0B\u662F\u8C03\u5EA6\u7684\u6700\u5C0F\u5355\u4F4D\u3002

                                                                        \u5F15\u5165\u4E86\u7EBF\u7A0B\u4E4B\u540E\uFF0C\u662F\u591A\u4E2A\u7EBF\u7A0B\u5E76\u53D1\u5730\u88ABCPU\u5904\u7406\u3002

                                                                      4. \u7EBF\u7A0B\u53EF\u4EE5\u7406\u89E3\u4E3A\u662F\u8F7B\u91CF\u7EA7\u7684\u8FDB\u7A0B\u3002

                                                                        \u7EBF\u7A0B\u662F\u4E00\u4E2A\u57FA\u672C\u7684CPU\u6267\u884C\u5355\u5143\uFF0C\u4E5F\u662F\u7A0B\u5E8F\u6267\u884C\u6D41\u7684\u6700\u5C0F\u5355\u4F4D\u3002\u5F15\u5165\u7EBF\u7A0B\u4E4B\u540E\uFF0C\u4E0D\u4EC5\u662F\u8FDB\u7A0B\u4E4B\u95F4\u53EF\u4EE5\u5E76\u53D1\uFF0C\u8FDB\u7A0B\u5185\u7684\u5404\u7EBF\u7A0B\u4E4B\u95F4\u4E5F\u53EF\u4EE5\u5E76\u53D1\uFF0C\u4ECE\u800C\u8FDB\u4E00\u6B65\u63D0\u5347\u4E86\u7CFB\u7EDF\u7684\u5E76\u53D1\u5EA6\uFF0C\u4F7F\u5F97\u4E00\u4E2A\u8FDB\u7A0B\u5185\u4E5F\u53EF\u4EE5\u5E76\u53D1\u5904\u7406\u5404\u79CD\u4EFB\u52A1\u3002

                                                                        \u5F15\u5165\u7EBF\u7A0B\u540E\uFF0C\u8FDB\u7A0B\u53EA\u4F5C\u4E3A\u9664CPU\u4E4B\u5916\u7684\u7CFB\u7EDF\u8D44\u6E90\u7684\u5206\u914D\u5355\u5143\uFF08\u5982\u6253\u5370\u673A\u3001\u5185\u5B58\u5730\u5740\u7A7A\u95F4\u7B49\u90FD\u662F\u5206\u914D\u7ED9\u8FDB\u7A0B\u7684\uFF0C\u8FDB\u7A0B\u662F\u8D44\u6E90\u5206\u914D\u7684\u6700\u5C0F\u5355\u4F4D\uFF09

                                                                        CPU\u4E5F\u7B97\u662F\u7CFB\u7EDF\u8D44\u6E90\uFF0C\u5206\u914D\u7684\u6700\u5C0F\u5355\u4F4D\u662F\u7EBF\u7A0B\uFF01\uFF01\u7EBF\u7A0B\u4E5F\u9700\u8981\u5F97\u5230CPU\u670D\u52A1\u4E4B\u540E\uFF0C\u624D\u80FD\u6267\u884C\u3002\u7EBF\u7A0B\u4E4B\u95F4\u4E5F\u5B58\u5728\u4E0A\u4E0B\u6587\u5207\u6362\uFF0C\u7EBF\u7A0B\u7684\u72B6\u6001\u8F6C\u6362\u662F\u7531\u4E8ECPU\u7684\u8F6E\u8F6C\u673A\u5236\u6216\u8005\u5176\u4ED6\u673A\u5236\u800C\u5BFC\u81F4CPU\u4E0D\u7EE7\u7EED\u670D\u52A1\u5F53\u524D\u7EBF\u7A0B\uFF0C\u4E8E\u662F\u51FA\u73B0\u7EBF\u7A0B\u7684\u72B6\u6001\u8F6C\u6362\uFF0C\u4E5F\u5B58\u5728\u8981\u4FDD\u5B58\u7EBF\u7A0B\u7684\u8FD0\u884C\u73AF\u5883\uFF0C\u6062\u590D\u8FD0\u884C\u73AF\u5883\u8FD9\u79CD\u4E0A\u4E0B\u6587\u5207\u6362\uFF0C\u548C\u524D\u9762\u8BF4\u7684\u8FDB\u7A0B\u5F88\u7C7B\u4F3C\u3002

                                                                      \u5F15\u5165\u7EBF\u7A0B\u673A\u5236\u540E\u7684\u53D8\u5316

                                                                      1. image-20211216193636875

                                                                      \u7EBF\u7A0B\u6709\u54EA\u4E9B\u5C5E\u6027

                                                                      1. \u7EBF\u7A0B\u662F\u5904\u7406\u5668\u8C03\u5EA6\u7684\u5355\u4F4D
                                                                      2. \u591A\u6838CPU\u73AF\u5883\u4E0B\uFF0C\u5404\u4E2A\u7EBF\u7A0B\u53EF\u5360\u7528\u4E0D\u540C\u7684CPU
                                                                      3. \u6BCF\u4E2A\u7EBF\u7A0B\u90FD\u6709\u4E00\u4E2A\u7EBF\u7A0BID\uFF0C\u7EBF\u7A0B\u63A7\u5236\u5757\uFF08TCB\uFF09
                                                                      4. \u7EBF\u7A0B\u4E5F\u6709\u5C31\u7EEA\u3001\u963B\u585E\u3001\u8FD0\u884C\u4E09\u79CD\u57FA\u672C\u72B6\u6001
                                                                      5. \u7EBF\u7A0B\u51E0\u4E4E\u4E0D\u62E5\u6709\u7CFB\u7EDF\u8D44\u6E90
                                                                      6. \u540C\u4E00\u8FDB\u7A0B\u7684\u4E0D\u540C\u7EBF\u7A0B\u95F4\u5171\u4EAB\u8FDB\u7A0B\u7684\u8D44\u6E90
                                                                      7. \u7531\u4E8E\u5171\u4EAB\u5185\u5B58\u5730\u5740\u7A7A\u95F4\uFF0C\u540C\u4E00\u8FDB\u7A0B\u7684\u7EBF\u7A0B\u95F4\u901A\u4FE1\u751A\u81F3\u65E0\u9700\u64CD\u4F5C\u7CFB\u7EDF\u5E72\u6270\uFF08\u56E0\u4E3A\u540C\u4E00\u8FDB\u7A0B\u4E2D\u7684\u7EBF\u7A0B\u5171\u4EAB\u5185\u5B58\u5730\u5740\u7A7A\u95F4\uFF09
                                                                      8. \u540C\u4E00\u8FDB\u7A0B\u4E2D\u7684\u7EBF\u7A0B\u5207\u6362\uFF0C\u4E0D\u4F1A\u5F15\u8D77\u8FDB\u7A0B\u5207\u6362
                                                                      9. \u4E0D\u540C\u8FDB\u7A0B\u4E2D\u7684\u7EBF\u7A0B\u5207\u6362\uFF0C\u4F1A\u5F15\u8D77\u8FDB\u7A0B\u5207\u6362
                                                                      10. \u5207\u6362\u540C\u8FDB\u7A0B\u5185\u7684\u7EBF\u7A0B\uFF0C\u7CFB\u7EDF\u5F00\u9500\u5F88\u5C0F
                                                                      11. \u5207\u6362\u8FDB\u7A0B\uFF0C\u7CFB\u7EDF\u5F00\u9500\u8F83\u5927\u3002\uFF08\u56E0\u4E3A\u5207\u6362\u8FDB\u7A0B\u8FD8\u8981\u5207\u6362\u9875\u8868\uFF0C\u9875\u8868\u662F\u865A\u62DF\u5730\u5740\u5230\u7269\u7406\u5730\u5740\u7684\u6620\u5C04\uFF0C\u7EBF\u7A0B\u4E0D\u6D89\u53CA\u5230\u9875\u8868\u7684\u5207\u6362\uFF09

                                                                      \u7EBF\u7A0B\u7684\u5B9E\u73B0\u65B9\u5F0F

                                                                      1. \u7528\u6237\u7EA7\u7EBF\u7A0B

                                                                        \u7528\u6237\u7EA7\u7EBF\u7A0B\u7531\u5E94\u7528\u7A0B\u5E8F\u901A\u8FC7\u7EBF\u7A0B\u5E93\u5B9E\u73B0\uFF0C\u6240\u6709\u7684\u7EBF\u7A0B\u7BA1\u7406\u5DE5\u4F5C\u90FD\u7531\u5E94\u7528\u7A0B\u5E8F\u8D1F\u8D23\uFF08\u5305\u62EC\u7EBF\u7A0B\u5207\u6362\uFF09

                                                                        \u7528\u6237\u7EA7\u7EBF\u7A0B\u4E2D\uFF0C\u7EBF\u7A0B\u5207\u6362\u53EF\u4EE5\u5728\u7528\u6237\u6001\u4E0B\u8FDB\u884C\uFF0C\u65E0\u9700\u64CD\u4F5C\u7CFB\u7EDF\u5E72\u9884

                                                                        \u5728\u7528\u6237\u770B\u6765\uFF0C\u662F\u6709\u591A\u4E2A\u7EBF\u7A0B\uFF0C\u4F46\u662F\u5728\u64CD\u4F5C\u7CFB\u7EDF\u5185\u6838\u770B\u6765\uFF0C\u610F\u8BC6\u4E0D\u5230\u7EBF\u7A0B\u7684\u5B58\u5728\uFF0C\u7528\u6237\u7EA7\u7EBF\u7A0B\u5BF9\u7528\u6237\u4E0D\u900F\u660E\uFF0C\u5BF9\u64CD\u4F5C\u7CFB\u7EDF\u900F\u660E\u3002

                                                                        \u7528\u6237\u7EA7\u7EBF\u7A0B\u5C31\u662F\u4ECE\u7528\u6237\u7684\u89C6\u89D2\u53EF\u4EE5\u770B\u5230\u7684\u7EBF\u7A0B

                                                                      2. \u5185\u6838\u7EA7\u7EBF\u7A0B

                                                                        \u5185\u6838\u7EA7\u7EBF\u7A0B\u7684\u7BA1\u7406\u5DE5\u4F5C\u662F\u7531\u64CD\u4F5C\u7CFB\u7EDF\u5185\u6838\u5B8C\u6210\uFF0C\u7EBF\u7A0B\u8C03\u5EA6\u3001\u5207\u6362\u7B49\u5DE5\u4F5C\u90FD\u7531\u5185\u6838\u8D1F\u8D23\uFF0C\u56E0\u6B64\u5185\u6838\u7EA7\u7EBF\u7A0B\u7684\u5207\u6362\u5FC5\u7136\u9700\u8981\u5728\u6838\u5FC3\u6001\u4E0B\u5B8C\u6210\u3002

                                                                        \u5185\u6838\u7EA7\u7EBF\u7A0B\u5C31\u662F\u4ECE\u64CD\u4F5C\u7CFB\u7EDF\u5185\u6838\u89C6\u89D2\u80FD\u591F\u770B\u5230\u7684\u7EBF\u7A0B

                                                                      3. \u5728\u540C\u65F6\u652F\u6301\u7528\u6237\u7EA7\u7EBF\u7A0B\u548C\u5185\u6838\u7EA7\u7EBF\u7A0B\u7684\u7CFB\u7EDF\u4E2D\uFF0C\u53EF\u91C7\u7528\u4E8C\u8005\u7EC4\u5408\u7684\u65B9\u5F0F\uFF0C\u5C06n\u4E2A\u7528\u6237\u7EA7\u7EBF\u7A0B\uFF0C\u6620\u5C04\u5230m\u4E2A\u5185\u6838\u7EA7\u7EBF\u7A0B\u4E0A

                                                                        \u91CD\u70B9\uFF1A\u64CD\u4F5C\u7CFB\u7EDF\u53EA\u770B\u5F97\u89C1\u5185\u6838\u7EA7\u7EBF\u7A0B\uFF0C\u56E0\u6B64\u53EA\u6709\u5185\u6838\u7EA7\u7EBF\u7A0B\u624D\u662F\u5904\u7406\u5668\u5206\u914D\u7684\u5355\u4F4D\u3002

                                                                        image-20211216203142509

                                                                      \u591A\u7EBF\u7A0B\u6A21\u578B

                                                                      1. \u5728\u540C\u65F6\u652F\u6301\u7528\u6237\u7EA7\u7EBF\u7A0B\u548C\u5185\u6838\u7EA7\u7EBF\u7A0B\u7684\u7CFB\u7EDF\u4E2D\uFF0C\u7531\u51E0\u4E2A\u7528\u6237\u7EA7\u7EBF\u7A0B\u6620\u5C04\u5230\u51E0\u4E2A\u5185\u6838\u7EA7\u7EBF\u7A0B\u7684\u95EE\u9898\u5F15\u51FA\u4E86\u201C\u591A\u7EBF\u7A0B\u6A21\u578B\u201D\u95EE\u9898

                                                                      2. \u591A\u5BF9\u4E00\u6A21\u578B

                                                                        image-20211216210038328

                                                                        \u591A\u4E2A\u7528\u6237\u7EA7\u7EBF\u7A0B\u6620\u5C04\u5230\u4E00\u4E2A\u5185\u6838\u7EA7\u7EBF\u7A0B\u3002\u6BCF\u4E2A\u7528\u6237\u8FDB\u7A0B\u53EA\u5BF9\u5E94\u4E00\u4E2A\u5185\u6838\u7EA7\u7EBF\u7A0B\uFF0C\u5185\u6838\u7EA7\u7EBF\u7A0B\u624D\u662F\u4F5C\u4E3A\u8C03\u5EA6\u7684\u57FA\u672C\u5355\u4F4D

                                                                        \u4F18\u70B9\uFF1A\u7528\u6237\u7EA7\u7EBF\u7A0B\u7684\u5207\u6362\u5728\u7528\u6237\u7A7A\u95F4\u5373\u53EF\u5B8C\u6210\uFF0C\u4E0D\u9700\u8981\u5207\u6362\u5230\u6838\u5FC3\u6001\uFF0C\u7EBF\u7A0B\u7BA1\u7406\u7684\u7CFB\u7EDF\u5F00\u9500\u5C0F\uFF0C\u6548\u7387\u9AD8

                                                                        \u7F3A\u70B9\uFF1A\u5F53\u4E00\u4E2A\u7528\u6237\u7EA7\u7EBF\u7A0B\u88AB\u963B\u585E\u540E\uFF0C\u4F1A\u5BFC\u81F4\u5185\u6838\u7EA7\u7EBF\u7A0B\u963B\u585E\uFF0C\u5176\u4ED6\u7528\u6237\u7EA7\u7EBF\u7A0B\u4E5F\u4E0D\u80FD\u6267\u884C\u4E86\uFF0C \u6574\u4E2A\u8FDB\u7A0B\u4F1A\u88AB\u963B\u585E\uFF0C\u5E76\u53D1\u5EA6\u4E0D\u9AD8\u3002\u591A\u4E2A\u7EBF\u7A0B\u4E0D\u53EF\u4EE5\u5728\u591A\u6838\u5904\u7406\u5668\u4E0A\u5E76\u884C\u8FD0\u884C\u3002\u56E0\u4E3A\u5185\u6838\u7EA7\u7EBF\u7A0B\u624D\u662F\u5904\u7406\u5668\u8C03\u5EA6\u7684\u57FA\u672C\u5355\u4F4D\u3002\uFF08\u64CD\u4F5C\u7CFB\u7EDF\u53EA\u770B\u5F97\u89C1\u5185\u6838\u7EA7\u7EBF\u7A0B\uFF09

                                                                      3. \u4E00\u5BF9\u4E00\u6A21\u578B

                                                                        image-20211216210353349

                                                                        \u4E00\u4E2A\u7528\u6237\u7EA7\u7EBF\u7A0B\u6620\u5C04\u5230\u4E00\u4E2A\u5185\u6838\u7EA7\u7EBF\u7A0B\uFF0C\u6BCF\u4E2A\u7528\u6237\u8FDB\u7A0B\u6709\u4E0E\u7528\u6237\u7EA7\u7EBF\u7A0B\u540C\u6570\u91CF\u7684\u5185\u6838\u7EA7\u7EBF\u7A0B

                                                                        \u4F18\u70B9\uFF1A\u5F53\u4E00\u4E2A\u7EBF\u7A0B\u88AB\u963B\u585E\u540E\uFF0C\u522B\u7684\u7EBF\u7A0B\u8FD8\u53EF\u4EE5\u7EE7\u7EED\u6267\u884C\uFF0C\u5E76\u53D1\u80FD\u529B\u5F3A\uFF0C\u591A\u7EBF\u7A0B\u53EF\u4EE5\u5728\u591A\u6838\u5904\u7406\u5668\u4E0A\u5E76\u884C\u6267\u884C\u3002

                                                                        \u7F3A\u70B9\uFF1A\u4E00\u4E2A\u7528\u6237\u8FDB\u7A0B\u4F1A\u5360\u7528\u591A\u4E2A\u5185\u6838\u7EA7\u7EBF\u7A0B\uFF0C\u7EBF\u7A0B\u5207\u6362\u662F\u7531\u64CD\u4F5C\u7CFB\u7EDF\u5185\u6838\u5B8C\u6210\uFF0C\u9700\u8981\u5207\u6362\u5230\u6838\u5FC3\u6001\uFF0C\u56E0\u6B64\u7EBF\u7A0B\u7BA1\u7406\u7684\u6210\u672C\u9AD8\uFF0C\u5F00\u9500\u5927\u3002

                                                                      4. \u591A\u5BF9\u591A\u6A21\u578B

                                                                        image-20211216210743381

                                                                        n\u4E2A\u7528\u6237\u7EA7\u7EBF\u7A0B\u6620\u5C04\u5230m\u4E2A\u5185\u6838\u7EA7\u7EBF\u7A0B\uFF0C\u6BCF\u4E2A\u7528\u6237\u8FDB\u7A0B\u5BF9\u5E94m\u4E2A\u5185\u6838\u7EA7\u7EBF\u7A0B

                                                                        \u514B\u670D\u4E86\u591A\u5BF9\u4E00\u6A21\u578B\u5E76\u53D1\u5EA6\u4E0D\u9AD8\u7684\u7F3A\u70B9\uFF0C\u53C8\u514B\u670D\u4E86\u4E00\u5BF9\u4E00\u6A21\u578B\u4E2D\u4E00\u4E2A\u7528\u6237\u8FDB\u7A0B\u5360\u7528\u592A\u591A\u5185\u6838\u7EA7\u7EBF\u7A0B\uFF0C\u5F00\u9500\u592A\u5927\u7684\u7F3A\u70B9\u3002

                                                                      \u5904\u7406\u673A\u8C03\u5EA6

                                                                      \u57FA\u672C\u6982\u5FF5

                                                                      1. \u7EBF\u7A0B\u662F\u8C03\u5EA6\u7684\u6700\u5C0F\u5355\u4F4D\uFF08\u5185\u6838\u7EA7\u7EBF\u7A0B\uFF09

                                                                      2. \u8C03\u5EA6\uFF1A

                                                                        \u5F53\u6709\u4E00\u5806\u4EFB\u52A1\u8981\u5904\u7406\uFF0C\u4F46\u7531\u4E8E\u8D44\u6E90\u6709\u9650\uFF0C\u8FD9\u4E9B\u4E8B\u60C5\u6CA1\u6CD5\u540C\u65F6\u5904\u7406\uFF0C\u8FD9\u5C31\u9700\u8981\u786E\u5B9A\u67D0\u79CD\u89C4\u5219\u6765\u51B3\u5B9A\u5904\u7406\u8FD9\u4E9B\u4EFB\u52A1\u7684\u987A\u5E8F\uFF0C\u8FD9\u5C31\u662F\u201C\u8C03\u5EA6\u201D\u7814\u7A76\u7684\u95EE\u9898

                                                                        \u8FD9\u79CD\u8BF4\u6CD5\u4E0B\u7684\u4EFB\u52A1\u4E5F\u53EF\u4EE5\u7406\u89E3\u4E3A\u7EBF\u7A0B\u3002

                                                                      3. \u5728\u591A\u9053\u7A0B\u5E8F\u7CFB\u7EDF\u4E2D\uFF0C\u8FDB\u7A0B\u7684\u6570\u91CF\uFF08\u7EBF\u7A0B\u7684\u6570\u91CF\uFF09\u5F80\u5F80\u662F\u591A\u4E8E\u5904\u7406\u5668\u7684\u6838\u5FC3\u4E2A\u6570\u7684\uFF0C\u8FD9\u6837\u4E0D\u53EF\u80FD\u540C\u65F6\u5E76\u884C\u5730\u5904\u7406\u5404\u4E2A\u8FDB\u7A0B\uFF0C\u5982\u679C\u7EBF\u7A0B\u6570\u91CF\u548C\u5904\u7406\u5668\u6838\u5FC3\u6570\u76F8\u540C\uFF0C\u90A3\u4E48\u5728\u5FAE\u89C2\u4E0A\u662F\u80FD\u505A\u5230\u771F\u6B63\u7684\u5E76\u884C\u5904\u7406\u7EBF\u7A0B\u7684\u3002

                                                                        \u5728\u8FD9\u53E5\u8BDD\u4E2D\uFF0C\u5C31\u662F\u7528\u8FDB\u7A0B\u6216\u7EBF\u7A0B\u7684\u63CF\u8FF0\u6765\u4F5C\u4E3A\u5904\u7406\u5668\u5904\u7406\u7684\u5BF9\u8C61\u3002

                                                                        \u5728\u7B2C\u4E8C\u70B9\uFF0C\u662F\u8BF4\u7684\u4EFB\u52A1\u4F5C\u4E3A\u5904\u7406\u5668\u5904\u7406\u7684\u5BF9\u8C61\uFF0C\u6240\u4EE5\uFF0C\u53EF\u4EE5\u5C06\u8FDB\u7A0B\u548C\u4EFB\u52A1\u7406\u89E3\u4E3A\u76F8\u540C\u7684\u4E8B\u7269\u3002

                                                                      4. \u5904\u7406\u673A\u8C03\u5EA6\uFF0C\u5C31\u662F\u4ECE\u5C31\u7EEA\u8FDB\u7A0B\u961F\u5217\u4E2D\u6309\u7167\u4E00\u5B9A\u7684\u7B97\u6CD5\u9009\u62E9\u4E00\u4E2A\u8FDB\u7A0B\u5E76\u5C06\u5904\u7406\u673A\u5206\u914D\u7ED9\u5B83\u8FD0\u884C\uFF0C\u4EE5\u5B9E\u73B0\u8FDB\u7A0B\u7684\u5E76\u53D1\u6267\u884C\uFF08\u5FAE\u89C2\u4E0A\u4E32\u884C\uFF0C\u5B8F\u89C2\u4E0A\u5E76\u884C\uFF0C\u5C31\u662F\u5E76\u53D1\uFF09\u3002

                                                                      \u4E09\u4E2A\u5C42\u6B21

                                                                      \u9AD8\u7EA7\u8C03\u5EA6
                                                                      1. \u9AD8\u7EA7\u8C03\u5EA6\uFF08\u4F5C\u4E1A\u8C03\u5EA6\uFF09\uFF0C\u6309\u4E00\u5B9A\u7684\u539F\u5219\u4ECE\u5916\u5B58\u4E0A\u5904\u4E8E\u540E\u5907\u961F\u5217\u7684\u4F5C\u4E1A\u4E2D\u6311\u9009\u4E00\u4E2A\u6216\u591A\u4E2A\u4F5C\u4E1A\uFF0C\u7ED9\u4ED6\u4EEC\u5206\u914D\u5185\u5B58\u7B49\u5FC5\u8981\u8D44\u6E90\uFF0C\u5E76\u5EFA\u7ACB\u76F8\u5E94\u7684\u8FDB\u7A0B\uFF08\u5EFA\u7ACBPCB\uFF08\u8FDB\u7A0B\u63A7\u5236\u5757\uFF09\uFF0CPCB\u3001\u6570\u636E\u6BB5\u3001\u7A0B\u5E8F\u6BB5\u7EC4\u6210\u4E00\u4E2A\u8FDB\u7A0B\u5B9E\u4F53\uFF09\uFF0C\u4EE5\u4F7F\u5B83\uFF08\u4EEC\uFF09\u83B7\u5F97\u7ADE\u4E89\u5904\u7406\u673A\u7684\u6743\u5229\u3002\u80FD\u591F\u7ADE\u4E89CPU\uFF0C\u8BF4\u660E\u5904\u4E8E\u5C31\u7EEA\u961F\u5217\uFF0C\u8BF4\u660E\u5DF2\u7ECF\u83B7\u5F97\u4E86\u9664CPU\u4EE5\u5916\u5176\u4ED6\u9700\u8981\u7684\u8D44\u6E90\uFF0C\u5F53\u7136\u5305\u62EC\u5185\u5B58\u3002

                                                                      2. \u9AD8\u7EA7\u8C03\u5EA6\u662F\u5916\u5B58\u548C\u5185\u5B58\u4E4B\u95F4\u7684\u8C03\u5EA6\u3002

                                                                        \u4F5C\u4E1A\u8C03\u5165\u65F6\u4F1A\u5EFA\u7ACB\u76F8\u5E94\u7684PCB\uFF0C\u4F5C\u4E1A\u8C03\u51FA\u65F6\u624D\u64A4\u9500PCB\uFF0C\u9AD8\u7EA7\u8C03\u5EA6\u4E3B\u8981\u662F\u6307\u8C03\u5165\u7684\u95EE\u9898\u3002\u56E0\u4E3A\u53EA\u6709\u8C03\u5165\u7684\u65F6\u673A\u9700\u8981\u64CD\u4F5C\u7CFB\u7EDF\u6765\u786E\u5B9A\uFF0C\u4F46\u8C03\u51FA\u7684\u65F6\u673A\u5FC5\u7136\u662F\u4F5C\u4E1A\u8FD0\u884C\u7ED3\u675F\u624D\u8C03\u51FA\u3002

                                                                      \u4E2D\u7EA7\u8C03\u5EA6
                                                                      1. \u5F15\u5165\u4E86\u865A\u62DF\u5B58\u50A8\u6280\u672F\u4E4B\u540E\uFF0C\u53EF\u5C06\u6682\u65F6\u4E0D\u80FD\u8FD0\u884C\u7684\u8FDB\u7A0B\u8C03\u81F3\u5916\u5B58\u7B49\u5F85\uFF0C\u7B49\u5B83\u91CD\u65B0\u5177\u5907\u4E86\u8FD0\u884C\u6761\u4EF6\u4E14\u5185\u5B58\u53C8\u7A0D\u6709\u7A7A\u95F2\u65F6\uFF0C\u518D\u91CD\u65B0\u8C03\u5165\u5185\u5B58\u3002

                                                                        \u8FD9\u4E48\u505A\u7684\u76EE\u7684\u65F6\u4E3A\u4E86\u63D0\u9AD8\u5185\u5B58\u5229\u7528\u7387\u548C\u7CFB\u7EDF\u541E\u5410\u91CF\u3002

                                                                        \u6682\u65F6\u8C03\u5230\u5916\u5B58\u7B49\u5F85\u7684\u8FDB\u7A0B\u79F0\u4E3A\u6302\u8D77\u72B6\u6001\uFF0C\u503C\u5F97\u6CE8\u610F\u7684\u662F\uFF0C\u8FDB\u7A0B\u63A7\u5236\u5757PCB\u4E0D\u4F1A\u4E00\u8D77\u8C03\u5230\u5916\u5B58\uFF0C\u800C\u662F\u4F1A\u5E38\u9A7B\u5185\u5B58\uFF0CPCB\u4E2D\u4F1A\u8BB0\u5F55\u8FDB\u7A0B\u6570\u636E\u5728\u5916\u5B58\u4E2D\u7684\u5B58\u653E\u4F4D\u7F6E\uFF0C\u8FDB\u7A0B\u72B6\u6001\u7B49\u4FE1\u606F\uFF0C\u64CD\u4F5C\u7CFB\u7EDF\u901A\u8FC7\u5185\u5B58\u4E2D\u7684PCB\u6765\u4FDD\u6301\u5BF9\u5404\u4E2A\u8FDB\u7A0B\u7684\u76D1\u63A7\u3001\u7BA1\u7406\u3002\u88AB\u6302\u8D77\u7684\u8FDB\u7A0BPCB\u4F1A\u88AB\u653E\u5230\u6302\u8D77\u961F\u5217\u4E2D\uFF08\u64CD\u4F5C\u7CFB\u7EDF\u4F1A\u4E3A\u5904\u4E8E\u6302\u8D77\u6001\u7684\u8FDB\u7A0B\u5EFA\u7ACB\u4E00\u4E2A\u6302\u8D77\u961F\u5217\uFF0C\u628A\u8FD9\u4E9B\u8FDB\u7A0B\u7684PCB\u7528\u4E00\u4E2A\u961F\u5217\u7684\u65B9\u5F0F\u7EC4\u7EC7\u8D77\u6765\uFF09\u3002

                                                                        \u5728\u5185\u5B58\u4E2D\u624D\u53EB\u8FDB\u7A0B\uFF0C\u56E0\u4E3A\u8FD9\u91CC\u8BF4\u7684\u5185\u5B58\u662F\u8FD0\u884C\u65F6\u5185\u5B58\uFF0C\u800C\u5916\u5B58\u662F\u78C1\u76D8\uFF0C\u53EF\u4EE5\u7406\u89E3\u4E3A\u9759\u6001\u7684\uFF0C\u4F46\u662F\u4E3A\u4EC0\u4E48\u53C8\u80FD\u5B58\u653E\u5230\u5916\u5B58\u5462\uFF0C\u5C31\u662F\u865A\u62DF\u5B58\u50A8\u6280\u672F\uFF0C\u4E5F\u5C31\u662F\u865A\u62DF\u6280\u672F\u4E2D\u7684\u7A7A\u5206\u590D\u7528\u6280\u672F

                                                                        \u5C31\u7EEA\u961F\u5217\u3001\u963B\u585E\u961F\u5217\u5B58\u653E\u7684\u4E5F\u662FPCB

                                                                      2. \u4E2D\u7EA7\u8C03\u5EA6\uFF08\u5185\u5B58\u8C03\u5EA6\uFF09\uFF0C\u5C31\u662F\u8981\u51B3\u5B9A\u5C06\u54EA\u4E2A\u5904\u4E8E\u6302\u8D77\u72B6\u6001\u7684\u8FDB\u7A0B\u91CD\u65B0\u8C03\u5165\u5185\u5B58

                                                                        \u4E00\u4E2A\u8FDB\u7A0B\u53EF\u80FD\u4F1A\u88AB\u591A\u6B21\u8C03\u51FA\u3001\u8C03\u5165\u5185\u5B58\uFF0C\u56E0\u6B64\u4E2D\u7EA7\u8C03\u5EA6\u7684\u53D1\u751F\u9891\u7387\u8981\u6BD4\u9AD8\u7EA7\u8C03\u5EA6\u66F4\u9AD8\u3002

                                                                      3. \u6682\u65F6\u8C03\u5230\u5916\u5B58\u7B49\u5F85\u7684\u8FDB\u7A0B\u72B6\u6001\u4E3A\u6302\u8D77\u72B6\u6001

                                                                        \u6302\u8D77\u6001\u53C8\u53EF\u4EE5\u5206\u4E3A\u5C31\u7EEA\u6302\u8D77\u3001\u963B\u585E\u6302\u8D77\u4E24\u79CD\u72B6\u6001

                                                                        \u5C31\u7EEA\u6001\u7684\u8FDB\u7A0B\u53EF\u80FD\u4F1A\u7531\u4E8E\u5185\u5B58\u7A7A\u95F4\u4E0D\u8DB3\uFF0C\u800C\u88AB\u79FB\u5230\u5916\u5B58\u6302\u8D77\uFF0C\u8FD9\u53EB\u5C31\u7EEA\u6302\u8D77

                                                                        \u963B\u585E\u6001\u7684\u8FDB\u7A0B\u540C\u6837\u53EF\u80FD\u4F1A\u7531\u4E8E\u5185\u5B58\u7A7A\u95F4\u4E0D\u8DB3\uFF0C\u88AB\u79FB\u5230\u5916\u5B58\u6302\u8D77\uFF0C\u53EB\u963B\u585E\u6302\u8D77

                                                                        image-20211216222006381

                                                                      4. \u6CE8\u610F\uFF1A

                                                                        \u6302\u8D77\u548C\u963B\u585E\u7684\u533A\u522B\uFF0C\u4E24\u79CD\u72B6\u6001\u90FD\u662F\u6682\u65F6\u4E0D\u80FD\u83B7\u5F97CPU\u7684\u670D\u52A1\uFF0C\u4F46\u662F\u6302\u8D77\u6001\u662F\u5C06\u8FDB\u7A0B\u5B9E\u4F53\uFF08\u6620\u50CF\uFF09\u8C03\u5230\u5916\u5B58\u4E2D\u53BB\u4E86\uFF0C\u800C\u963B\u585E\u6001\u4E0B\u7684\u8FDB\u7A0B\u6620\u50CF\u8FD8\u5728\u5185\u5B58\u4E2D\u3002

                                                                        \u6709\u7684\u64CD\u4F5C\u7CFB\u7EDF\u4F1A\u628A\u5C31\u7EEA\u6302\u8D77\uFF0C\u963B\u585E\u6302\u8D77\u5206\u4E3A\u4E24\u4E2A\u6302\u8D77\u961F\u5217\uFF0C\u751A\u81F3\u4F1A\u6839\u636E\u963B\u585E\u539F\u56E0\u4E0D\u540C\u518D\u628A\u963B\u585E\u6302\u8D77\u8FDB\u7A0B\u8FDB\u4E00\u6B65\u7EC6\u5206\u4E3A\u591A\u4E2A\u961F\u5217\u3002

                                                                      \u4F4E\u7EA7\u8C03\u5EA6
                                                                      1. \u4F4E\u7EA7\u8C03\u5EA6\uFF08\u8FDB\u7A0B\u8C03\u5EA6\uFF09\uFF0C\u5176\u4E3B\u8981\u4EFB\u52A1\u662F\u6309\u7167\u67D0\u79CD\u65B9\u6CD5\u548C\u7B56\u7565\u4ECE\u5C31\u7EEA\u961F\u5217\u4E2D\u9009\u53D6\u4E00\u4E2A\u8FDB\u7A0B\uFF0C\u5C06\u5904\u7406\u5668\u5206\u914D\u7ED9\u5B83

                                                                      2. \u8FDB\u7A0B\u8C03\u5EA6\u662F\u64CD\u4F5C\u7CFB\u7EDF\u4E2D\u6700\u57FA\u672C\u7684\u4E00\u79CD\u8C03\u5EA6\uFF0C\u5728\u4E00\u822C\u7684\u64CD\u4F5C\u7CFB\u7EDF\u4E2D\u90FD\u5FC5\u987B\u914D\u7F6E\u8FDB\u7A0B\u8C03\u5EA6\u3002

                                                                        \u8FDB\u7A0B\u8C03\u5EA6\u7684\u9891\u7387\u5F88\u9AD8\uFF0C\u4E00\u822C\u51E0\u5341\u6BEB\u79D2\u4E00\u6B21\uFF0C\u53EA\u6709\u8FD9\u6837\uFF0C\u624D\u80FD\u5728\u5B8F\u89C2\u4E0A\u770B\u8D77\u6765\u662F\u5E76\u884C\u6267\u884C\u7684\uFF0C\u5B9E\u9645\u4E0A\u5FAE\u89C2\u4E0A\u662F\u8FD9\u4E9B\u8FDB\u7A0B\u4E4B\u95F4\u4EA4\u66FF\u6267\u884C\u3002

                                                                      \u8054\u7CFB

                                                                      1. image-20211216222809386

                                                                      \u8FDB\u7A0B\u8C03\u5EA6

                                                                      \u8FDB\u7A0B\u8C03\u5EA6\u7684\u65F6\u673A

                                                                      1. \u8FDB\u7A0B\u8C03\u5EA6\u5C31\u662F\u4F4E\u7EA7\u8C03\u5EA6\uFF0C\u5C31\u662F\u6309\u7167\u67D0\u79CD\u7B97\u6CD5\u4ECE\u5C31\u7EEA\u961F\u5217\u4E2D\u9009\u62E9\u4E00\u4E2A\u8FDB\u7A0B\u4E3A\u5176\u5206\u914D\u5904\u7406\u673A\u3002

                                                                      2. \u4EC0\u4E48\u65F6\u5019\u9700\u8981\u8FDB\u884C\u8FDB\u7A0B\u8C03\u5EA6\u548C\u5207\u6362\uFF1F

                                                                        • \u5F53\u524D\u8FD0\u884C\u7684\u8FDB\u7A0B\u4E3B\u52A8\u653E\u5F03\u5904\u7406\u673A
                                                                          • \u8FDB\u7A0B\u6B63\u5E38\u7EC8\u6B62
                                                                          • \u8FD0\u884C\u8FC7\u7A0B\u4E2D\u53D1\u751F\u5F02\u5E38\u800C\u7EC8\u6B62
                                                                          • \u8FDB\u7A0B\u4E3B\u52A8\u8BF7\u6C42\u963B\u585E\uFF0C\u901A\u8FC7\u7CFB\u7EDF\u8C03\u7528\uFF0C\u7CFB\u7EDF\u8C03\u7528\u65F6\u4F1A\u6267\u884C\u9677\u5165\u6307\u4EE4\u6216\u8005\u8BF4\u8BBF\u7BA1\u6307\u4EE4\uFF0C\u4ECE\u800C\u8FDB\u5165\u6838\u5FC3\u6001\uFF0C\u8FD9\u662F\u5185\u4E2D\u65AD\u4E2D\u7684\u81EA\u613F\u4E2D\u65AD\uFF0C\u8FDB\u7A0B\u7531\u8FD0\u884C\u6001\u5230\u963B\u585E\u6001\u662F\u4E3B\u52A8\u884C\u4E3A\u3002
                                                                        • \u5F53\u524D\u8FD0\u884C\u7684\u8FDB\u7A0B\u88AB\u52A8\u653E\u5F03\u5904\u7406\u673A
                                                                          • \u5206\u7ED9\u8FDB\u7A0B\u7684\u65F6\u95F4\u7247\u7528\u5B8C
                                                                          • \u6709\u66F4\u7D27\u6025\u7684\u4E8B\u9700\u8981\u5904\u7406\uFF08\u5982IO\u4E2D\u65AD\uFF09
                                                                          • \u6709\u66F4\u9AD8\u4F18\u5148\u7EA7\u7684\u8FDB\u7A0B\u8FDB\u5165\u5C31\u7EEA\u961F\u5217
                                                                      3. \u4E0D\u80FD\u8FDB\u884C\u8FDB\u7A0B\u8C03\u5EA6\u548C\u5207\u6362\u7684\u60C5\u51B5

                                                                        • \u5728\u5904\u7406\u4E2D\u65AD\u7684\u8FC7\u7A0B\u4E2D\uFF0C\u4E2D\u65AD\u5904\u7406\u8FC7\u7A0B\u590D\u6742\uFF0C\u4E0E\u786C\u4EF6\u5BC6\u5207\u76F8\u5173\uFF0C\u5F88\u96BE\u505A\u5230\u5728\u4E2D\u65AD\u5904\u7406\u8FC7\u7A0B\u4E2D\u8FDB\u884C\u8FDB\u7A0B\u5207\u6362
                                                                        • \u8FDB\u7A0B\u5728\u64CD\u4F5C\u7CFB\u7EDF\u5185\u6838\u7A0B\u5E8F\u4E34\u754C\u533A\u4E2D\uFF08\u4F46\u662F\u8FDB\u7A0B\u5728\u666E\u901A\u4E34\u754C\u533A\u4E2D\u662F\u53EF\u4EE5\u8FDB\u884C\u8C03\u5EA6\u3001\u5207\u6362\u7684\uFF09
                                                                        • \u5728\u539F\u5B50\u64CD\u4F5C\u8FC7\u7A0B\u4E2D\uFF08\u539F\u8BED\uFF09\uFF0C\u539F\u5B50\u64CD\u4F5C\u4E0D\u53EF\u4E2D\u65AD\uFF0C\u8981\u4E00\u6C14\u5475\u6210\uFF08\u539F\u5B50\u64CD\u4F5C\u662F\u901A\u8FC7\u4E2D\u65AD\u6765\u5B8C\u6210\u7684\uFF0C\u6240\u4EE5\u4E00\u5B9A\u662F\u5728\u6838\u5FC3\u6001\u8FDB\u884C\u3002\uFF09
                                                                      4. \u4E34\u754C\u8D44\u6E90\uFF1A\u4E00\u4E2A\u65F6\u95F4\u6BB5\u5185\u53EA\u5141\u8BB8\u4E00\u4E2A\u8FDB\u7A0B\u4F7F\u7528\u7684\u8D44\u6E90\uFF0C\u5404\u8FDB\u7A0B\u9700\u8981\u4E92\u65A5\u5730\u8BBF\u95EE\u4E34\u754C\u8D44\u6E90

                                                                        \u4E34\u754C\u533A\uFF1A\u8BBF\u95EE\u4E34\u754C\u8D44\u6E90\u90A3\u6BB5\u4EE3\u7801

                                                                      5. \u5185\u6838\u7A0B\u5E8F\u4E34\u754C\u533A\u8BBF\u95EE\u7684\u4E34\u754C\u8D44\u6E90\uFF0C\u5982\u679C\u4E0D\u5C3D\u5FEB\u91CA\u653E\u7684\u8BDD\uFF0C\u6781\u6709\u53EF\u80FD\u6620\u50CF\u5230\u64CD\u4F5C\u7CFB\u7EDF\u5185\u6838\u7684\u5176\u4ED6\u7BA1\u7406\u5DE5\u4F5C\uFF0C\u56E0\u6B64\u5728\u8BBF\u95EE\u5185\u6838\u7A0B\u5E8F\u4E34\u754C\u533A\u671F\u95F4\u4E0D\u80FD\u8FDB\u884C\u8C03\u5EA6\u4E0E\u5207\u6362

                                                                        \u666E\u901A\u4E34\u754C\u533A\u8BBF\u95EE\u7684\u4E34\u754C\u8D44\u6E90\u4E0D\u4F1A\u76F4\u63A5\u5F71\u54CD\u64CD\u4F5C\u7CFB\u7EDF\u5185\u6838\u7684\u7BA1\u7406\u5DE5\u4F5C\uFF0C\u56E0\u6B64\u5728\u8BBF\u95EE\u666E\u901A\u4E34\u754C\u533A\u65F6\u53EF\u4EE5\u8FDB\u884C\u8C03\u5EA6\u548C\u5207\u6362\uFF0C\u800C\u4E14\u662F\u5F88\u6709\u5FC5\u8981\u8FDB\u884C\u8FDB\u7A0B\u7684\u8C03\u5EA6\u548C\u5207\u6362\u6765\u63D0\u9AD8CPU\u7684\u5229\u7528\u7387\u548C\u7CFB\u7EDF\u541E\u5410\u91CF\u3002

                                                                      \u8FDB\u7A0B\u8C03\u5EA6\u7684\u65B9\u5F0F

                                                                      1. \u975E\u5265\u593A\u8C03\u5EA6\u65B9\u5F0F\uFF0C\u53C8\u79F0\u4E3A\u975E\u62A2\u5360\u65B9\u5F0F\uFF0C\u5373\u53EA\u5141\u8BB8\u8FDB\u7A0B\u4E3B\u52A8\u653E\u5F03\u5904\u7406\u673A\uFF0C\u5728\u8FD0\u884C\u8FC7\u7A0B\u4E2D\u5373\u4FBF\u6709\u66F4\u7D27\u8FEB\u7684\u4EFB\u52A1\u5230\u8FBE\uFF0C\u5F53\u524D\u8FDB\u7A0B\u4F9D\u7136\u4F1A\u7EE7\u7EED\u4F7F\u7528\u5904\u7406\u673A\uFF0C\u76F4\u5230\u8BE5\u8FDB\u7A0B\u7EC8\u6B62\u6216\u4E3B\u52A8\u8981\u6C42\u8FDB\u5165\u963B\u585E\u6001\u3002
                                                                      2. \u5265\u593A\u8C03\u5EA6\u65B9\u5F0F\uFF0C\u53C8\u79F0\u62A2\u5360\u65B9\u5F0F\uFF0C\u5F53\u4E00\u4E2A\u8FDB\u7A0B\u6B63\u5728\u5904\u7406\u673A\u4E0A\u6267\u884C\u65F6\uFF0C\u5982\u679C\u6709\u4E00\u4E2A\u66F4\u91CD\u8981\u6216\u66F4\u7D27\u8FEB\u7684\u8FDB\u7A0B\u9700\u8981\u4F7F\u7528\u5904\u7406\u673A\uFF0C\u5219\u7ACB\u523B\u6682\u505C\u5F53\u524D\u6B63\u5728\u6267\u884C\u7684\u8FDB\u7A0B\uFF0C\u5C06\u5904\u7406\u673A\u5206\u914D\u7ED9\u66F4\u91CD\u8981\u7D27\u8FEB\u7684\u8FDB\u7A0B\u3002

                                                                      \u8FDB\u7A0B\u7684\u5207\u6362\u548C\u8FC7\u7A0B

                                                                      1. \u72ED\u4E49\u7684\u8FDB\u7A0B\u8C03\u5EA6\u6307\u7684\u662F\u4ECE\u5C31\u7EEA\u961F\u5217\u4E2D\u9009\u4E2D\u4E00\u4E2A\u8981\u8FD0\u884C\u7684\u8FDB\u7A0B

                                                                        \u8FDB\u7A0B\u5207\u6362\u662F\u6307\u4E00\u4E2A\u8FDB\u7A0B\u8BA9\u51FA\u5904\u7406\u673A\uFF0C\u7531\u53E6\u4E00\u4E2A\u8FDB\u7A0B\u5360\u7528\u5904\u7406\u673A\u7684\u8FC7\u7A0B\u3002

                                                                        \u5E7F\u4E49\u7684\u8FDB\u7A0B\u8C03\u5EA6\u5305\u542B\u4E86\u9009\u62E9\u4E00\u4E2A\u8FDB\u7A0B\u548C\u8FDB\u7A0B\u5207\u6362\u4E24\u4E2A\u6B65\u9AA4

                                                                      2. \u8FDB\u7A0B\u5207\u6362\u7684\u8FC7\u7A0B\u4E3B\u8981\u5B8C\u6210\u4E86\uFF1A

                                                                        • \u5BF9\u539F\u6765\u8FD0\u884C\u8FDB\u7A0B\u5404\u79CD\u6570\u636E\u7684\u4FDD\u5B58\uFF0C\u4FDD\u5B58\u5230PCB\u4E2D

                                                                        • \u5BF9\u65B0\u7684\u8FDB\u7A0B\u7684\u5404\u79CD\u6570\u636E\u7684\u6062\u590D

                                                                          \u8FD9\u4E9B\u8FDB\u7A0B\u7684\u4FE1\u606F\uFF0C\u8FD0\u884C\u73AF\u5883\u7684\u4FE1\u606F\u4E00\u822C\u4FDD\u5B58\u5728\u8FDB\u7A0B\u63A7\u5236\u5757PCB\u4E2D\u3002

                                                                      3. \u4E0D\u80FD\u7B80\u5355\u5730\u8BA4\u4E3A\u8FDB\u7A0B\u5207\u6362\u8D8A\u9891\u7E41\uFF0C\u5E76\u53D1\u5EA6\u5C31\u8D8A\u9AD8

                                                                        \u8FDB\u7A0B\u5207\u6362\u662F\u6709\u4EE3\u4EF7\u7684\uFF0C\u56E0\u6B64\u5982\u679C\u8FC7\u4E8E\u9891\u7E41\u5730\u8FDB\u884C\u8FDB\u7A0B\u8C03\u5EA6\u3001\u5207\u6362\uFF0C\u5FC5\u7136\u4F1A\u4F7F\u6574\u4E2A\u7CFB\u7EDF\u7684\u6548\u7387\u964D\u4F4E\uFF0C\u4F7F\u7CFB\u7EDF\u5927\u90E8\u5206\u65F6\u95F4\u90FD\u82B1\u5728\u4E86\u8FDB\u7A0B\u5207\u6362\u4E0A\u3002

                                                                      \u8FDB\u7A0B\u540C\u6B65\u3001\u4E92\u65A5

                                                                      \u6982\u5FF5

                                                                      1. \u8FDB\u7A0B\u5177\u6709\u5F02\u6B65\u6027\u7684\u7279\u5F81\uFF0C\u5F02\u6B65\u6027\u662F\u6307\uFF0C\u5404\u5E76\u53D1\u6267\u884C\u7684\u8FDB\u7A0B\u5404\u81EA\u4EE5\u72EC\u7ACB\u7684\u3001\u4E0D\u53EF\u9884\u77E5\u7684\u901F\u5EA6\u5411\u524D\u63A8\u8FDB

                                                                      2. \u8FDB\u7A0B\u540C\u6B65\uFF1A

                                                                        \u5E76\u53D1\u6027\u5E26\u6765\u4E86\u5F02\u6B65\u6027\uFF0C\u6709\u65F6\u9700\u8981\u901A\u8FC7\u8FDB\u7A0B\u540C\u6B65\u89E3\u51B3\u8FD9\u79CD\u5F02\u6B65\u95EE\u9898

                                                                        \u6709\u7684\u8FDB\u7A0B\u4E4B\u95F4\u9700\u8981\u76F8\u4E92\u914D\u5408\u5730\u5B8C\u6210\u5DE5\u4F5C\uFF0C\u5404\u8FDB\u7A0B\u7684\u5DE5\u4F5C\u63A8\u8FDB\u9700\u8981\u9075\u5FAA\u4E00\u5B9A\u7684\u5148\u540E\u987A\u5E8F\uFF0C\u5C31\u662F\u901A\u8FC7\u540C\u6B65\uFF0C\u540C\u6B65\u9501\u7684\u5B9E\u73B0\u901A\u8FC7\u540C\u6B65\u4EE3\u7801\u5757\u548C\u540C\u6B65\u65B9\u6CD5\uFF0C \u4E5F\u6B63\u662F\u8FD9\u4E2A\u610F\u601D\u3002

                                                                      3. \u6211\u4EEC\u628A\u4E00\u4E2A\u65F6\u95F4\u6BB5\u5185\u53EA\u5141\u8BB8\u4E00\u4E2A\u8FDB\u7A0B\u4F7F\u7528\u7684\u8D44\u6E90\u79F0\u4E3A\u4E34\u754C\u8D44\u6E90\uFF0C\u5BF9\u4E34\u754C\u8D44\u6E90\u7684\u8BBF\u95EE\uFF0C\u5FC5\u987B\u4E92\u65A5\u5730\u8FDB\u884C\u3002

                                                                      4. image-20211217163414696

                                                                        \u6CE8\u610F\uFF1A

                                                                        \u4E34\u754C\u533A\u662F\u8FDB\u7A0B\u4E2D\u8BBF\u95EE\u4E34\u754C\u8D44\u6E90\u7684\u4EE3\u7801\u6BB5

                                                                        \u8FDB\u5165\u533A\u548C\u9000\u51FA\u533A\u662F\u8D1F\u8D23\u5B9E\u73B0\u4E92\u65A5\u7684\u4EE3\u7801\u6BB5

                                                                      5. \u4E3A\u4E86\u5B9E\u73B0\u5BF9\u4E34\u754C\u8D44\u6E90\u7684\u4E92\u65A5\u8BBF\u95EE\uFF0C\u540C\u65F6\u4FDD\u8BC1\u7CFB\u7EDF\u6574\u4F53\u6027\u80FD\uFF0C\u9700\u8981\u9075\u5FAA\u4EE5\u4E0B\u539F\u5219\uFF1A

                                                                        • \u7A7A\u95F2\u8BA9\u8FDB\u3002\u4E34\u754C\u533A\u7A7A\u95F2\u65F6\uFF0C\u53EF\u4EE5\u5141\u8BB8\u4E00\u4E2A\u8BF7\u6C42\u8FDB\u5165\u4E34\u754C\u533A\u7684\u8FDB\u7A0B\u7ACB\u5373\u8FDB\u5165\u4E34\u754C\u533A
                                                                        • \u5FD9\u5219\u7B49\u5F85\u3002\u5F53\u5DF2\u6709\u8FDB\u7A0B\u8FDB\u5165\u4E34\u754C\u533A\u65F6\uFF0C\u5176\u4ED6\u8BD5\u56FE\u8FDB\u5165\u4E34\u754C\u533A\u7684\u8FDB\u7A0B\u5FC5\u987B\u7B49\u5F85\u3002
                                                                        • \u6709\u9650\u7B49\u5F85\uFF08\u4FDD\u8BC1\u4E0D\u4F1A\u9965\u997F\uFF09\u3002\u5BF9\u8BF7\u6C42\u8BBF\u95EE\u7684\u8FDB\u7A0B\uFF0C\u5E94\u4FDD\u8BC1\u80FD\u5728\u6709\u9650\u65F6\u95F4\u5185\u8FDB\u5165\u4E34\u754C\u533A\uFF08\u4FDD\u8BC1\u4E0D\u4F1A\u9965\u997F\uFF09
                                                                        • \u8BA9\u6743\u7B49\u5F85\u3002\u5F53\u8FDB\u7A0B\u4E0D\u80FD\u8FDB\u5165\u4E34\u754C\u533A\u65F6\uFF0C\u5E94\u7ACB\u5373\u91CA\u653E\u5904\u7406\u673A\uFF0C\u9632\u6B62\u8FDB\u7A0B\u5FD9\u7B49\u5F85\u3002

                                                                      \u4FE1\u53F7\u91CF\u673A\u5236

                                                                      1. \u7528\u6237\u8FDB\u7A0B\u53EF\u4EE5\u901A\u8FC7\u4F7F\u7528\u64CD\u4F5C\u7CFB\u7EDF\u63D0\u4F9B\u7684\u4E00\u5BF9\u539F\u8BED\u6765\u5BF9\u4FE1\u53F7\u91CF\u8FDB\u884C\u64CD\u4F5C\uFF0C\u4ECE\u800C\u5F88\u65B9\u4FBF\u5730\u5B9E\u73B0\u4E86\u8FDB\u7A0B\u4E92\u65A5\u3001\u8FDB\u7A0B\u540C\u6B65\u3002

                                                                        \u4FE1\u53F7\u91CF\u5176\u5B9E\u5C31\u662F\u4E00\u4E2A\u53D8\u91CF\uFF08\u53EF\u4EE5\u662F\u4E00\u4E2A\u6574\u6570\uFF0C\u4E5F\u53EF\u4EE5\u662F\u66F4\u590D\u6742\u7684\u8BB0\u5F55\u578B\u53D8\u91CF\uFF09\uFF0C\u53EF\u4EE5\u7528\u4E00\u4E2A\u4FE1\u53F7\u91CF\u6765\u8868\u793A\u7CFB\u7EDF\u4E2D\u67D0\u79CD\u8D44\u6E90\u7684\u6570\u91CF\u3002

                                                                        image-20211217172238888

                                                                      2. \u6574\u578B\u4FE1\u53F7\u91CF

                                                                        \u4E0E\u666E\u901A\u6574\u6570\u53D8\u91CF\u7684\u533A\u522B\uFF1A\u5BF9\u4FE1\u53F7\u91CF\u7684\u64CD\u4F5C\u53EA\u6709\u4E09\u79CD\uFF0C\u5373\u521D\u59CB\u5316\uFF0CP\u64CD\u4F5C\u3001V\u64CD\u4F5C

                                                                        image-20211217173250040

                                                                        \u4E5F\u5C31\u662F\u8BF4\uFF0C\u5728\u8FDB\u5165\u533A\u548C\u9000\u51FA\u533A\u8FD9\u4E24\u4E2A\u4EE3\u7801\u533A\uFF0C\u5206\u522B\u4F7F\u7528P\u64CD\u4F5C\u548CV\u64CD\u4F5C\u8FD9\u4E24\u4E2A\u539F\u8BED\u64CD\u4F5C\u6765\u4E0A\u9501\u548C\u89E3\u9501\u3002

                                                                        \u68C0\u67E5\u548C\u4E0A\u9501\u4E00\u6C14\u5475\u6210\uFF0C\u907F\u514D\u4E86\u5E76\u53D1\u3001\u5F02\u6B65\u5BFC\u81F4\u7684\u95EE\u9898\u3002

                                                                        \u5B58\u5728\u7684\u95EE\u9898\uFF1A\u4E0D\u6EE1\u8DB3\u8BA9\u6743\u7B49\u5F85\u7684\u539F\u5219\uFF0C\u4F1A\u53D1\u751F\u5FD9\u7B49\u3002

                                                                      3. \u8BB0\u5F55\u578B\u4FE1\u53F7\u91CF

                                                                        image-20211217173913631

                                                                        wait(S)\u548Csignal(S)\u53EF\u7528\u4E8E\u5B9E\u73B0\u5BF9\u7CFB\u7EDF\u8D44\u6E90\u7684\u7533\u8BF7\u548C\u91CA\u653E

                                                                        S.value\u7684\u521D\u503C\u8868\u793A\u7CFB\u7EDF\u4E2D\u67D0\u79CD\u8D44\u6E90\u7684\u6570\u76EE

                                                                        \u5BF9\u4FE1\u53F7\u91CFS\u7684\u4E00\u6B21P\u64CD\u4F5C\u610F\u5473\u7740\u8FDB\u7A0B\u8BF7\u6C42\u4E00\u4E2A\u5355\u4F4D\u7684\u8BE5\u8D44\u6E90\uFF0C\u56E0\u6B64\u9700\u8981\u6267\u884CS.value--\uFF0C\u8868\u793A\u8BE5\u8D44\u6E90\u6570\u51CF1\uFF0C\u5F53S.value<0\u65F6\uFF0C\u8868\u793A\u8BE5\u7C7B\u8D44\u6E90\u5DF2\u5206\u914D\u5B8C\u6BD5\uFF0C\u56E0\u6B64\u8FDB\u7A0B\u5E94\u8C03\u7528block\u539F\u8BED\u8FDB\u884C\u81EA\u6211\u963B\u585E\uFF0C\u5F53\u524D\u8FD0\u884C\u7684\u8FDB\u7A0B\u4ECE\u8FD0\u884C\u6001\u5230\u963B\u585E\u6001\uFF0C\u4E3B\u52A8\u653E\u5F03\u5904\u7406\u673A\uFF0C\u5E76\u63D2\u5165\u8BE5\u7C7B\u8D44\u6E90\u7684\u7B49\u5F85\u961F\u5217\uFF0C\u53EF\u89C1\uFF0C\u8BE5\u673A\u5236\u9075\u5FAA\u4E86\u8BA9\u6743\u7B49\u5F85\u7684\u539F\u5219\uFF0C\u4E0D\u4F1A\u51FA\u73B0\u5FD9\u7B49\u73B0\u8C61\uFF0C\u53EA\u8981\u53D1\u73B0\u8D44\u6E90\u5206\u914D\u5B8C\u6BD5\uFF0C\u90A3\u4E48\u4E3B\u52A8\u8FDB\u5165\u963B\u585E\u6001\uFF0C\u76F8\u5F53\u4E8E\u662F\u7B49\u5F85IO\uFF0C\u8FDB\u7A0B\u8FDB\u5165\u963B\u585E\u6001\uFF0C\u90FD\u662F\u4E3B\u52A8\u7684\uFF0C\u662F\u8FD0\u884C\u6001\u4E3B\u52A8\u5230\u963B\u585E\u6001\uFF0C\u901A\u8FC7\u7CFB\u7EDF\u8C03\u7528\u7684\u8BBF\u7BA1\u6307\u4EE4\u6216\u9677\u5165\u6307\u4EE4\uFF0C\u6267\u884C\u4E2D\u65AD\uFF0C\u4E8E\u662F\u963B\u585E\uFF0C\u64CD\u4F5C\u6743\u9650\u4EA4\u7ED9\u64CD\u4F5C\u7CFB\u7EDF\u3002

                                                                        \u5BF9\u4FE1\u53F7\u91CFS\u7684\u4E00\u6B21V\u64CD\u4F5C\uFF0C\u610F\u5473\u7740\u8FDB\u7A0B\u91CA\u653E\u4E00\u4E2A\u5355\u4F4D\u7684\u8BE5\u7C7B\u8D44\u6E90\uFF0C\u56E0\u6B64\u9700\u8981\u6267\u884CS.value++\uFF0C\u8868\u793A\u8D44\u6E90\u6570+1\uFF0C\u82E5\u52A01\u540E\u4ECD\u7136\u662F\u5C0F\u4E8E\u7B49\u4E8E0\uFF0C\u8BF4\u660E\u4ECD\u7136\u6709\u8FDB\u7A0B\u56E0\u4E3A\u7B49\u5F85\u8BE5\u8D44\u6E90\u800C\u5904\u4E8E\u963B\u585E\u6001\uFF0C\u56E0\u6B64\u5E94\u8C03\u7528wakeup\u539F\u8BED\u5524\u9192\u7B49\u5F85\u961F\u5217\u4E2D\u7684\u7B2C\u4E00\u4E2A\u8FDB\u7A0B\uFF08\u88AB\u5524\u9192\u8FDB\u7A0B\u4ECE\u963B\u585E\u6001\u5230\u5C31\u7EEA\u6001\uFF0C\u7B49\u5F85CPU\u65F6\u95F4\u7247\uFF0C\u5373\u53EF\u88ABCPU\u6267\u884C\u3002\uFF09

                                                                      4. \u7528\u4FE1\u53F7\u91CF\u673A\u5236\u5B9E\u73B0\u8FDB\u7A0B\u4E92\u65A5

                                                                        • \u5206\u6790\u5E76\u53D1\u8FDB\u7A0B\u7684\u5173\u952E\u6D3B\u52A8\uFF0C\u5212\u5B9A\u4E34\u754C\u533A\uFF08\u5982\uFF1A\u5BF9\u4E34\u754C\u8D44\u6E90\u6253\u5370\u673A\u7684\u8BBF\u95EE\u5C31\u5E94\u8BE5\u653E\u5728\u4E34\u754C\u533A\uFF0C\u4E34\u754C\u533A\u662F\u4EE3\u7801\uFF09
                                                                        • \u8BBE\u7F6E\u4E92\u65A5\u4FE1\u53F7\u91CFmutex\uFF0C\u521D\u503C\u4E3A1\uFF0C\u4E34\u754C\u533A\u53EF\u4EE5\u7406\u89E3\u4E3A\u662F\u4E00\u79CD\u7279\u6B8A\u7684\u7CFB\u7EDF\u8D44\u6E90\uFF0C\u56E0\u4E3A\u8981\u5B9E\u73B0\u4E92\u65A5\uFF0C\u6240\u4EE5\u8BBE\u7F6E\u8FD9\u79CD\u201C\u7CFB\u7EDF\u8D44\u6E90\u201D\u7684\u6570\u91CF\u521D\u503C\u4E3A1\uFF0C\u76F8\u5F53\u4E8E\u662F\u4E0A\u9501
                                                                        • \u5728\u4E34\u754C\u533A\u4E4B\u524D\u6267\u884CP(mutex)
                                                                        • \u5728\u4E34\u754C\u533A\u4E4B\u540E\u6267\u884CV(mutex)

                                                                        \u6CE8\u610F\uFF1A\u5BF9\u4E0D\u540C\u7684\u4E34\u754C\u8D44\u6E90\u9700\u8981\u8BBE\u7F6E\u4E0D\u540C\u7684\u4E92\u65A5\u4FE1\u53F7\u91CF\uFF0C\u53EF\u4EE5\u4ECEJava\u591A\u7EBF\u7A0B\u7684\u89D2\u5EA6\u6765\u7406\u89E3\uFF0C\u540C\u6B65\u9501\u5BF9\u8C61\u4E00\u5B9A\u8981\u662F\u540C\u4E00\u4E2A\uFF0C\u591A\u4E2A\u7EBF\u7A0B\u8981\u83B7\u5F97\u7684\u662F\u540C\u4E00\u628A\u9501\uFF0C\u8FD9\u6837\u624D\u6709\u4E0A\u9501\u7684\u610F\u4E49

                                                                        PV\u64CD\u4F5C\u5FC5\u987B\u6210\u5BF9\u51FA\u73B0\uFF08\u4E0A\u9501\u548C\u89E3\u9501\u5FC5\u987B\u6210\u5BF9\u51FA\u73B0\uFF09\uFF0C\u7F3A\u5C11P\u5C31\u4E0D\u80FD\u4FDD\u8BC1\u4E34\u754C\u8D44\u6E90\u7684\u4E92\u65A5\u8BBF\u95EE\uFF0C\u56E0\u4E3AP\u64CD\u4F5C\u76F8\u5F53\u4E8E\u662F\u4E0A\u9501\uFF0C\u7F3A\u5C11V\u4F1A\u5BFC\u81F4\u8D44\u6E90\u6C38\u4E0D\u88AB\u91CA\u653E\uFF0CV\u64CD\u4F5C\u76F8\u5F53\u4E8E\u662F\u89E3\u9501

                                                                      5. \u7528\u4FE1\u53F7\u91CF\u5B9E\u73B0\u8FDB\u7A0B\u540C\u6B65\uFF1A

                                                                        • \u5206\u6790\u4EC0\u4E48\u5730\u65B9\u9700\u8981\u5B9E\u73B0\u540C\u6B65\u5173\u7CFB\uFF0C\u627E\u5230\u9700\u8981\u6267\u884C\u540C\u6B65\u5173\u7CFB\u7684\u4EE3\u7801
                                                                        • \u8BBE\u7F6E\u540C\u6B65\u4FE1\u53F7\u91CFS\uFF0C\u521D\u59CB\u503C\u8BBE\u7F6E\u4E3A0
                                                                        • \u5728\u201C\u524D\u64CD\u4F5C\u201D\u4E4B\u540E\u6267\u884CV\uFF08S\uFF09
                                                                        • \u5728\u201C\u540E\u64CD\u4F5C\u201D\u4E4B\u524D\u6267\u884CP\uFF08S\uFF09

                                                                        image-20211217182011808

                                                                      \u7BA1\u7A0B

                                                                      \u6982\u5FF5

                                                                      1. \u7BA1\u7A0B\u662F\u4E00\u79CD\u9AD8\u7EA7\u540C\u6B65\u673A\u5236\uFF0C\u548C\u4E4B\u524D\u5B66\u8FC7\u7684PV\u64CD\u4F5C\u4E00\u6837\uFF0C\u4E5F\u662F\u7528\u6765\u5B9E\u73B0\u8FDB\u7A0B\u7684\u4E92\u65A5\u548C\u540C\u6B65\u7684
                                                                      2. \u5F15\u5165\u7BA1\u7A0B\u7684\u76EE\u7684\u662F\u4E3A\u4E86\u66F4\u65B9\u4FBF\u5730\u5B9E\u73B0\u8FDB\u7A0B\u4E92\u65A5\u548C\u540C\u6B65

                                                                      \u6B7B\u9501

                                                                      \u6982\u5FF5

                                                                      1. \u6B7B\u9501\uFF1A\u5728\u5E76\u53D1\u73AF\u5883\u4E0B\uFF0C**\u5404\u8FDB\u7A0B\uFF08\u53D1\u751F\u6B7B\u9501\u4E00\u5B9A\u662F\u4E24\u4E2A\u6216\u4EE5\u4E0A\uFF09**\u56E0\u7ADE\u4E89\u8D44\u6E90\u800C\u9020\u6210\u7684\u4E00\u79CD\u4E92\u76F8\u7B49\u5F85\u5BF9\u65B9\u624B\u91CC\u7684\u8D44\u6E90\uFF0C\u5BFC\u81F4\u5404\u8FDB\u7A0B\u90FD\u963B\u585E\uFF0C\u90FD\u65E0\u6CD5\u5411\u524D\u63A8\u8FDB\u7684\u73B0\u8C61\uFF0C\u5C31\u662F\u201C\u6B7B\u9501\u201D\u3002\u53D1\u751F\u6B7B\u9501\u540E\u82E5\u65E0\u5916\u529B\u5E72\u6D89\uFF0C\u8FD9\u4E9B\u8FDB\u7A0B\u90FD\u5C06\u65E0\u6CD5\u5411\u524D\u63A8\u8FDB\u3002

                                                                      \u8FDB\u7A0B\u6B7B\u9501\u3001\u9965\u997F\u3001\u6B7B\u5FAA\u73AF\u7684\u533A\u522B

                                                                      1. \u6B7B\u9501\uFF1A\u5404\u8FDB\u7A0B\u4E92\u76F8\u7B49\u5F85\u5BF9\u65B9\u624B\u91CC\u7684\u8D44\u6E90\uFF0C\u5BFC\u81F4\u5404\u8FDB\u7A0B\u90FD\u963B\u585E\uFF0C\u65E0\u6CD5\u5411\u524D\u63A8\u8FDB\u7684\u73B0\u8C61\u3002
                                                                      2. \u9965\u997F\uFF1A\u7531\u4E8E\u957F\u671F\u5F97\u4E0D\u5230\u60F3\u8981\u7684\u8D44\u6E90\uFF0C\u67D0\u8FDB\u7A0B\u65E0\u6CD5\u5411\u524D\u63A8\u8FDB\u7684\u73B0\u8C61\uFF0C\u6BD4\u5982\uFF1A\u5728\u77ED\u8FDB\u7A0B\u4F18\u5148\u7B97\u6CD5\u4E2D\uFF0C\u82E5\u6709\u6E90\u6E90\u4E0D\u65AD\u7684\u77ED\u8FDB\u7A0B\u5230\u6765\uFF0C\u5219\u957F\u8FDB\u7A0B\u5C06\u4E00\u76F4\u5F97\u4E0D\u5230\u5904\u7406\u673A\uFF0C\u4ECE\u800C\u53D1\u751F\u957F\u8FDB\u7A0B\u9965\u997F\u73B0\u8C61
                                                                      3. \u6B7B\u5FAA\u73AF\uFF1A\u67D0\u8FDB\u7A0B\u6267\u884C\u8FC7\u7A0B\u4E2D\u4E00\u76F4\u8DF3\u4E0D\u51FA\u67D0\u4E2A\u5FAA\u73AF\u7684\u73B0\u8C61\u3002

                                                                      image-20211217200059209

                                                                      \u6B7B\u9501\u4EA7\u751F\u7684\u5FC5\u8981\u6761\u4EF6

                                                                      1. \u4E92\u65A5\u6761\u4EF6\uFF1A\u53EA\u6709\u5BF9\u5FC5\u987B\u4E92\u65A5\u4F7F\u7528\u7684\u8D44\u6E90\u7684\u4E89\u62A2\u624D\u4F1A\u5BFC\u81F4\u6B7B\u9501\uFF08\u6BD4\u5982IO\u8BBE\u5907\uFF09\uFF0C\u50CF\u5185\u5B58\u3001\u626C\u58F0\u5668\u8FD9\u6837\u53EF\u4EE5\u540C\u65F6\u8BA9\u591A\u4E2A\u8FDB\u7A0B\u4F7F\u7528\u7684\u8D44\u6E90\u662F\u4E0D\u4F1A\u5BFC\u81F4\u6B7B\u9501\u7684\uFF08\u56E0\u4E3A\u8FDB\u7A0B\u4E0D\u7528\u963B\u585E\u7B49\u5F85\u8FD9\u79CD\u8D44\u6E90\uFF09

                                                                      2. \u4E0D\u53EF\u5265\u593A\u6761\u4EF6\uFF1A\u8FDB\u7A0B\u6240\u83B7\u5F97\u7684\u8D44\u6E90\u5728\u672A\u4F7F\u7528\u5B8C\u4E4B\u524D\uFF0C\u4E0D\u80FD\u7531\u5176\u4ED6\u8FDB\u7A0B\u5F3A\u884C\u593A\u8D70\uFF0C\u53EA\u80FD\u4E3B\u52A8\u91CA\u653E\u3002

                                                                      3. \u8BF7\u6C42\u4FDD\u6301\u6761\u4EF6\uFF1A\u8FDB\u7A0B\u5DF2\u7ECF\u4FDD\u6301\u4E86\u81F3\u5C11\u4E00\u4E2A\u8D44\u6E90\uFF0C\u4F46\u53C8\u63D0\u51FA\u4E86\u65B0\u7684\u8D44\u6E90\u8BF7\u6C42\uFF0C\u800C\u8BE5\u8D44\u6E90\u53C8\u88AB\u5176\u4ED6\u8FDB\u7A0B\u5360\u6709\uFF0C\u6B64\u65F6\u8BF7\u6C42\u8FDB\u7A0B\u88AB\u963B\u585E\uFF0C\u4F46\u53C8\u5BF9\u81EA\u5DF1\u5DF2\u6709\u7684\u8D44\u6E90\u4FDD\u6301\u4E0D\u653E\u3002

                                                                      4. \u5FAA\u73AF\u7B49\u5F85\u6761\u4EF6\uFF1A\u5B58\u5728\u4E00\u79CD\u8FDB\u7A0B\u8D44\u6E90\u7684\u5FAA\u73AF\u7B49\u5F85\u94FE\uFF0C\u94FE\u4E2D\u7684\u6BCF\u4E00\u4E2A\u8FDB\u7A0B\u5DF2\u83B7\u5F97\u7684\u8D44\u6E90\u540C\u65F6\u88AB\u4E0B\u4E00\u4E2A\u8FDB\u7A0B\u6240\u8BF7\u6C42\u3002

                                                                        \u6CE8\u610F\uFF1A\u53D1\u751F\u6B7B\u9501\u65F6\uFF0C\u4E00\u5B9A\u6709\u5FAA\u73AF\u7B49\u5F85\uFF0C\u4F46\u662F\u53D1\u751F\u5FAA\u73AF\u7B49\u5F85\u65F6\u672A\u5FC5\u6B7B\u9501

                                                                        \u5982\u679C\u540C\u7C7B\u8D44\u6E90\u6570\u5927\u4E8E1\uFF0C\u5219\u5373\u4F7F\u6709\u5FAA\u73AF\u7B49\u5F85\uFF0C\u4E5F\u672A\u5FC5\u53D1\u751F\u6B7B\u9501\uFF0C\u4F46\u5982\u679C\u7CFB\u7EDF\u4E2D\u6BCF\u7C7B\u8D44\u6E90\u90FD\u53EA\u67091\u4E2A\uFF0C\u90A3\u5FAA\u73AF\u7B49\u5F85\u5C31\u662F\u6B7B\u9501\u7684\u5145\u5206\u5FC5\u8981\u6761\u4EF6\u4E86\u3002

                                                                      \u4EC0\u4E48\u65F6\u5019\u4F1A\u53D1\u751F\u6B7B\u9501

                                                                      1. \u5BF9\u4E0D\u53EF\u5265\u593A\u7684\u8D44\u6E90\u7684\u4E0D\u5408\u7406\u5206\u914D\uFF0C\u53EF\u80FD\u5BFC\u81F4\u6B7B\u9501\u3002

                                                                      \u6B7B\u9501\u7684\u5904\u7406\u7B56\u7565

                                                                      1. \u9884\u9632\u6B7B\u9501\u3002\u7834\u574F\u6B7B\u9501\u4EA7\u751F\u7684\u56DB\u4E2A\u5FC5\u8981\u6761\u4EF6\u4E2D\u7684\u4E00\u4E2A\u6216\u51E0\u4E2A
                                                                      2. \u907F\u514D\u6B7B\u9501\u3002\u7528\u67D0\u79CD\u65B9\u6CD5\u9632\u6B62\u7CFB\u7EDF\u8FDB\u5165\u4E0D\u5B89\u5168\u72B6\u6001\uFF0C\u4ECE\u800C\u907F\u514D\u6B7B\u9501\uFF08\u94F6\u884C\u5BB6\u7B97\u6CD5\uFF09
                                                                      3. \u6B7B\u9501\u7684\u68C0\u6D4B\u548C\u89E3\u9664\u3002\u5141\u8BB8\u6B7B\u9501\u7684\u53D1\u751F\uFF0C\u4E0D\u8FC7\u64CD\u4F5C\u7CFB\u7EDF\u4F1A\u8D1F\u8D23\u68C0\u6D4B\u51FA\u6B7B\u9501\u7684\u53D1\u751F\uFF0C\u7136\u540E\u91C7\u53D6\u67D0\u79CD\u63AA\u65BD\u89E3\u9664\u6B7B\u9501\u3002

                                                                      \u6B7B\u9501\u7684\u5904\u7406

                                                                      \u4E0D\u5141\u8BB8\u6B7B\u9501\u53D1\u751F

                                                                      \u9759\u6001\u7B56\u7565\uFF1A\u9884\u9632\u6B7B\u9501
                                                                      1. \u6B7B\u9501\u7684\u4EA7\u751F\u5FC5\u987B\u6EE1\u8DB3\u56DB\u4E2A\u5FC5\u8981\u6761\u4EF6\uFF0C\u53EA\u8981\u5176\u4E2D\u4E00\u4E2A\u6216\u51E0\u4E2A\u6761\u4EF6\u4E0D\u6210\u7ACB\uFF0C\u6B7B\u9501\u5C31\u4E0D\u4F1A\u53D1\u751F

                                                                      2. \u7834\u574F\u4E92\u65A5\u6761\u4EF6

                                                                        \u4E92\u65A5\u6761\u4EF6\uFF1A\u53EA\u6709\u5BF9\u5FC5\u987B\u4E92\u65A5\u4F7F\u7528\u7684\u8D44\u6E90\uFF08\u4E92\u65A5\u5171\u4EAB\uFF09\u7684\u4E89\u62A2\uFF0C\u624D\u4F1A\u5BFC\u81F4\u6B7B\u9501

                                                                        \u5982\u679C\u628A\u53EA\u80FD\u4E92\u65A5\u4F7F\u7528\u7684\u8D44\u6E90\u6539\u9020\u4E3A\u5141\u8BB8\u5171\u4EAB\u4F7F\u7528\uFF08\u540C\u65F6\u5171\u4EAB\uFF0C\u5B8F\u89C2\u4E0A\u5E76\u884C\uFF0C\u5FAE\u89C2\u4E0A\u4ECD\u7136\u662F\u4E32\u884C\u7684\uFF0C\u662F\u5E76\u53D1\u3002\uFF09\uFF0C\u5219\u7CFB\u7EDF\u4E0D\u4F1A\u8FDB\u5165\u6B7B\u9501\u72B6\u6001\uFF0C\u6BD4\u5982\uFF1ASPOOLing\u6280\u672F\u3002\u64CD\u4F5C\u7CFB\u7EDF\u53EF\u4EE5\u91C7\u7528SPOOLing\u6280\u672F\u5C06\u72EC\u5360\u8BBE\u5907\u5728\u903B\u8F91\u4E0A\u6539\u4E3A\u5171\u4EAB\u8BBE\u5907\u3002

                                                                        \u7F3A\u70B9\uFF1A\u5E76\u4E0D\u662F\u6240\u6709\u7684\u8D44\u6E90\u90FD\u53EF\u4EE5\u6539\u9020\u6210\u53EF\u5171\u4EAB\u4F7F\u7528\u7684\u8D44\u6E90\uFF0C\u5E76\u4E14\u4E3A\u4E86\u7CFB\u7EDF\u5B89\u5168\uFF0C\u5F88\u591A\u5730\u65B9\u5FC5\u987B\u4FDD\u6301\u8FD9\u79CD\u4E92\u65A5\u6027\u3002\u56E0\u6B64\uFF0C\u5F88\u591A\u65F6\u5019\u90FD\u65E0\u6CD5\u7834\u574F\u4E92\u65A5\u6761\u4EF6\u3002

                                                                      3. \u7834\u574F\u4E0D\u5265\u593A\u6761\u4EF6

                                                                        \u65B9\u6848\u4E00\uFF1A\u5F53\u67D0\u4E2A\u8FDB\u7A0B\u8BF7\u6C42\u65B0\u7684\u8D44\u6E90\u5F97\u4E0D\u5230\u6EE1\u8DB3\u65F6\uFF0C\u5B83\u5FC5\u987B\u7ACB\u5373\u91CA\u653E\u4FDD\u6301\u7684\u6240\u6709\u8D44\u6E90\uFF0C\u5F85\u4EE5\u540E\u9700\u8981\u65F6\u518D\u91CD\u65B0\u7533\u8BF7\u3002

                                                                        \u65B9\u6848\u4E8C\uFF1A\u5F53\u67D0\u4E2A\u8FDB\u7A0B\u9700\u8981\u7684\u8D44\u6E90\u88AB\u5176\u4ED6\u8FDB\u7A0B\u6240\u5360\u6709\u7684\u65F6\u5019\uFF0C\u53EF\u4EE5\u7531\u64CD\u4F5C\u7CFB\u7EDF\u534F\u52A9\uFF0C\u5C06\u60F3\u8981\u7684\u8D44\u6E90\u5F3A\u884C\u5265\u593A\uFF0C\u8FD9\u79CD\u65B9\u5F0F\u4E00\u822C\u8003\u8651\u5404\u8FDB\u7A0B\u7684\u4F18\u5148\u7EA7\uFF08\u6BD4\u5982\u5265\u593A\u8C03\u5EA6\u65B9\u5F0F\u5C31\u662F\u5C06\u5904\u7406\u673A\u8D44\u6E90\u5F3A\u884C\u5265\u593A\u7ED9\u4F18\u5148\u7EA7\u66F4\u9AD8\u7684\u8FDB\u7A0B\u4F7F\u7528\uFF09

                                                                        \u4E00\u79CD\u662F\u81EA\u613F\u653E\u5F03\uFF0C\u5BFC\u81F4\u4E0D\u7528\u5265\u593A\uFF0C\u4E00\u79CD\u662F\u5F3A\u884C\u5265\u593A\u3002

                                                                      4. \u7834\u574F\u8BF7\u6C42\u548C\u4FDD\u6301\u6761\u4EF6

                                                                        \u53EF\u4EE5\u91C7\u7528\u9759\u6001\u5206\u914D\u65B9\u6CD5\uFF0C\u5373\u8FDB\u7A0B\u5728\u8FD0\u884C\u524D\u4E00\u6B21\u6027\u7533\u8BF7\u5B8C\u5B83\u6240\u9700\u8981\u7684\u5168\u90E8\u8D44\u6E90\uFF0C\u5728\u5B83\u7684\u8D44\u6E90\u672A\u6EE1\u8DB3\u524D\uFF0C\u4E0D\u8BA9\u5B83\u6295\u5165\u8FD0\u884C\uFF0C\u4E00\u65E6\u6295\u5165\u8FD0\u884C\u540E\uFF0C\u8FD9\u4E9B\u8D44\u6E90\u5C31\u4E00\u76F4\u5F52\u5B83\u6240\u6709\uFF0C\u8BE5\u8FDB\u7A0B\u5C31\u4E0D\u4F1A\u518D\u8BF7\u6C42\u522B\u7684\u8D44\u6E90\u4E86\u3002

                                                                        \u7F3A\u70B9\uFF1A\u6709\u4E9B\u8D44\u6E90\u53EF\u80FD\u53EA\u9700\u8981\u7528\u5F88\u77ED\u7684\u65F6\u95F4\uFF0C\u56E0\u6B64\u5982\u679C\u8FDB\u7A0B\u7684\u6574\u4E2A\u8FD0\u884C\u671F\u95F4\u90FD\u4E00\u76F4\u4FDD\u6301\u7740\u6240\u6709\u8D44\u6E90\uFF0C\u5C31\u4F1A\u9020\u6210\u4E25\u91CD\u7684\u8D44\u6E90\u6D6A\u8D39\uFF0C\u8D44\u6E90\u5229\u7528\u7387\u6781\u4F4E\u3002\u53E6\u5916\uFF0C\u8BE5\u7B56\u7565\u4E5F\u6709\u53EF\u80FD\u5BFC\u81F4\u67D0\u4E9B\u8FDB\u7A0B\u9965\u997F\u3002

                                                                      5. \u7834\u574F\u5FAA\u73AF\u7B49\u5F85\u6761\u4EF6

                                                                        image-20211217204429202

                                                                        image-20211217204620460

                                                                      6. image-20211217204757093

                                                                      \u52A8\u6001\u7B56\u7565\uFF1A\u907F\u514D\u6B7B\u9501
                                                                      1. \u5B89\u5168\u5E8F\u5217\uFF0C\u5C31\u662F\u6307\u5982\u679C\u7CFB\u7EDF\u6309\u7167\u8FD9\u79CD\u5E8F\u5217\u5206\u914D\u8D44\u6E90\uFF0C\u5219\u6BCF\u4E2A\u8FDB\u7A0B\u90FD\u80FD\u987A\u5229\u5B8C\u6210\uFF0C\u53EA\u8981\u80FD\u627E\u51FA\u4E00\u4E2A\u5B89\u5168\u5E8F\u5217\uFF0C\u7CFB\u7EDF\u5C31\u662F\u5B89\u5168\u72B6\u6001\uFF0C\u5F53\u7136\u5B89\u5168\u5E8F\u5217\u53EF\u80FD\u6709\u591A\u4E2A\u3002

                                                                      2. \u5982\u679C\u7CFB\u7EDF\u5904\u4E8E\u5B89\u5168\u72B6\u6001\uFF0C\u5C31\u4E00\u5B9A\u4E0D\u4F1A\u53D1\u751F\u6B7B\u9501\uFF0C\u5982\u679C\u7CFB\u7EDF\u8FDB\u5165\u4E0D\u5B89\u5168\u72B6\u6001\uFF0C\u5C31\u53EF\u80FD\u53D1\u751F\u6B7B\u9501\uFF08\u5904\u4E8E\u4E0D\u5B89\u5168\u72B6\u6001\u672A\u5FC5\u662F\u53D1\u751F\u4E86\u6B7B\u9501\uFF0C\u4F46\u53D1\u751F\u6B7B\u9501\u65F6\uFF0C\u4E00\u5B9A\u662F\u5728\u4E0D\u5B89\u5168\u72B6\u6001\uFF09

                                                                        \u56E0\u6B64\u53EF\u4EE5\u5728\u8D44\u6E90\u5206\u914D\u4E4B\u524D\u9884\u5148\u5224\u65AD\u8FD9\u6B21\u5206\u914D\u662F\u5426\u4F1A\u5BFC\u81F4\u7CFB\u7EDF\u8FDB\u5165\u4E0D\u5B89\u5168\u72B6\u6001\uFF08\u80FD\u5426\u627E\u5230\u4E00\u4E2A\u5B89\u5168\u5E8F\u5217\uFF09\uFF0C\u4EE5\u6B64\u51B3\u5B9A\u662F\u5426\u7B54\u5E94\u8D44\u6E90\u5206\u914D\u8BF7\u6C42\u3002\u8FD9\u662F\u94F6\u884C\u5BB6\u7B97\u6CD5\u7684\u6838\u5FC3\u601D\u60F3\u3002

                                                                      \u5141\u8BB8\u6B7B\u9501\u53D1\u751F

                                                                      1. \u5982\u679C\u7CFB\u7EDF\u4E2D\u65E2\u4E0D\u91C7\u53D6\u9884\u9632\u6B7B\u9501\u7684\u63AA\u65BD\uFF0C\u4E5F\u4E0D\u91C7\u53D6\u907F\u514D\u6B7B\u9501\u7684\u63AA\u65BD\uFF0C\u7CFB\u7EDF\u5C31\u5F88\u53EF\u80FD\u53D1\u751F\u6B7B\u9501\uFF0C\u5728\u8FD9\u79CD\u60C5\u51B5\u4E0B\uFF0C\u7CFB\u7EDF\u5E94\u5F53\u63D0\u4F9B\u4E24\u4E2A\u7B97\u6CD5\uFF1A

                                                                        • \u6B7B\u9501\u68C0\u6D4B\u7B97\u6CD5\uFF1A\u7528\u4E8E\u68C0\u6D4B\u7CFB\u7EDF\u72B6\u6001\uFF0C\u4EE5\u786E\u5B9A\u7CFB\u7EDF\u4E2D\u662F\u5426\u53D1\u751F\u4E86\u6B7B\u9501
                                                                        • \u6B7B\u9501\u89E3\u9664\u7B97\u6CD5\uFF1A\u5F53\u8BA4\u5B9A\u7CFB\u7EDF\u4E2D\u5DF2\u7ECF\u53D1\u751F\u4E86\u6B7B\u9501\uFF0C\u5229\u7528\u8BE5\u7B97\u6CD5\u53EF\u5C06\u7CFB\u7EDF\u4ECE\u6B7B\u9501\u72B6\u6001\u4E2D\u89E3\u8131\u51FA\u6765\u3002
                                                                      2. \u6B7B\u9501\u7684\u68C0\u6D4B

                                                                        \u6B7B\u9501\u5B9A\u7406\uFF1A\u5982\u679C\u67D0\u65F6\u523B\u7CFB\u7EDF\u7684\u8D44\u6E90\u5206\u914D\u56FE\u662F\u4E0D\u53EF\u5B8C\u5168\u7B80\u5316\u7684\uFF0C\u90A3\u4E48\u6B64\u65F6\u7CFB\u7EDF\u6B7B\u9501

                                                                      3. \u6B7B\u9501\u7684\u89E3\u9664

                                                                        \u5E76\u4E0D\u662F\u7CFB\u7EDF\u4E2D\u6240\u6709\u7684\u8FDB\u7A0B\u90FD\u662F\u6B7B\u9501\u72B6\u6001\uFF0C\u7528\u6B7B\u9501\u68C0\u6D4B\u7B97\u6CD5\u5316\u7B80\u8D44\u6E90\u5206\u914D\u56FE\u540E\uFF0C\u8FD8\u8FDE\u7740\u8FB9\u7684\u90A3\u4E9B\u8FDB\u7A0B\u5C31\u662F\u6B7B\u9501\u8FDB\u7A0B

                                                                        \u89E3\u9664\u6B7B\u9501\u7684\u4E3B\u8981\u65B9\u6CD5\u6709\uFF1A

                                                                        • \u8D44\u6E90\u5265\u593A\u6CD5\uFF1A\u6302\u8D77\uFF08\u6682\u65F6\u653E\u5230\u5916\u5B58\u4E0A\uFF09\u67D0\u4E9B\u6B7B\u9501\u8FDB\u7A0B\uFF0C\u5E76\u62A2\u5360\u5B83\u7684\u8D44\u6E90\uFF0C\u5C06\u8FD9\u4E9B\u8D44\u6E90\u5206\u914D\u7ED9\u5176\u4ED6\u7684\u6B7B\u9501\u8FDB\u7A0B\u3002\u4F46\u662F\u5E94\u9632\u6B62\u88AB\u6302\u8D77\u7684\u8FDB\u7A0B\u957F\u65F6\u95F4\u5F97\u4E0D\u5230\u8D44\u6E90\u800C\u9965\u997F\u3002
                                                                        • \u64A4\u9500\u8FDB\u7A0B\u6CD5\uFF08\u7EC8\u6B62\u8FDB\u7A0B\u6CD5\uFF09\uFF1A\u5F3A\u5236\u64A4\u9500\u90E8\u5206\u751A\u81F3\u5168\u90E8\u6B7B\u9501\u8FDB\u7A0B\uFF0C\u5E76\u5265\u593A\u8FD9\u4E9B\u8FDB\u7A0B\u7684\u8D44\u6E90\u3002
                                                                        • \u8FDB\u7A0B\u56DE\u9000\u6CD5\u3002\u8BA9\u4E00\u4E2A\u6216\u591A\u4E2A\u6B7B\u9501\u8FDB\u7A0B\u56DE\u9000\u5230\u8DB3\u4EE5\u907F\u514D\u6B7B\u9501\u7684\u5730\u6B65\u3002

                                                                        \u5982\u4F55\u51B3\u5B9A\u5BF9\u54EA\u4E2A\u8FDB\u7A0B\u8FDB\u884C\u8D44\u6E90\u5265\u593A\u6216\u64A4\u9500\u6216\u56DE\u9000\uFF1A

                                                                        • \u8FDB\u7A0B\u4F18\u5148\u7EA7
                                                                        • \u5DF2\u6267\u884C\u591A\u957F\u65F6\u95F4
                                                                        • \u8FD8\u6709\u591A\u4E45\u80FD\u5B8C\u6210
                                                                        • \u8FDB\u7A0B\u5DF2\u7ECF\u4F7F\u7528\u4E86\u591A\u5C11\u8D44\u6E90
                                                                        • \u8FDB\u7A0B\u662F\u4EA4\u4E92\u5F0F\u7684\u8FD8\u662F\u6279\u5904\u7406\u5F0F\u7684
                                                                      4. image-20211217213054745

                                                                      \u7B2C\u4E09\u7AE0

                                                                      \u5185\u5B58

                                                                      \u6982\u5FF5

                                                                      1. \u5185\u5B58\u662F\u7528\u4E8E\u5B58\u653E\u6570\u636E\u7684\u786C\u4EF6\uFF0C\u7A0B\u5E8F\u6267\u884C\u524D\u9700\u8981\u5148\u653E\u5230\u5185\u5B58\u4E2D\u624D\u80FD\u88ABCPU\u5904\u7406
                                                                      2. \u5916\u5B58\u5C31\u662F\u786C\u76D8\u6216\u8005\u53EB\u8F85\u5B58
                                                                      3. \u786C\u76D8\u662F\u6162\u901F\u7684\u8BBE\u5907\uFF0C\u800CCPU\u662F\u8D85\u5FEB\u901F\u7684\u8BBE\u5907\uFF0C\u6240\u4EE5CPU\u8981\u5904\u7406\u7684\u6570\u636E\u76F4\u63A5\u4ECE\u5916\u5B58\u4E2D\u8BFB\u53D6\uFF0CCPU\u9700\u8981\u5927\u91CF\u65F6\u95F4\u90FD\u5728\u7B49\u5F85\uFF0CCPU\u76F4\u63A5\u548C\u5916\u5B58\u7684\u6570\u636E\u8FDB\u884C\u4EA4\u4E92\uFF0C\u4F1A\u4EA7\u751F\u901F\u5EA6\u4E0A\u7684\u77DB\u76FE
                                                                      4. \u5185\u5B58\u53EF\u4EE5\u7406\u89E3\u4E3A\u662F\u4E00\u79CD\u66F4\u5FEB\u901F\u5730\u5B58\u653E\u6570\u636E\u7684\u786C\u4EF6\u3002
                                                                      5. \u5185\u5B58\u5730\u5740\u4ECE0\u5F00\u59CB\uFF0C\u6BCF\u4E2A\u5730\u5740\u5BF9\u5E94\u4E00\u4E2A\u5B58\u50A8\u5355\u5143\u3002

                                                                      \u8FDB\u7A0B\u7684\u8FD0\u884C\u539F\u7406---\u6307\u4EE4

                                                                      1. \u6211\u4EEC\u5199\u7684\u4EE3\u7801\u8981\u7FFB\u8BD1\u6210CPU\u80FD\u8BC6\u522B\u7684\u6307\u4EE4\uFF0C\u8FD9\u4E9B\u6307\u4EE4\u4F1A\u544A\u8BC9CPU\u5E94\u8BE5\u53BB\u5185\u5B58\u7684\u54EA\u4E2A\u5730\u5740\u5B58\u3001\u53D6\u6570\u636E\uFF0C\u8FD9\u4E2A\u6570\u636E\u5E94\u8BE5\u505A\u4EC0\u4E48\u6837\u7684\u5904\u7406\u3002\u4F46\u662F\u5BF9\u4E8EJava\u6765\u8BF4\uFF0C\u6211\u4EEC\u5199\u7684Java\u4EE3\u7801\u4F1A\u7F16\u8BD1\u6210\u5B57\u8282\u7801\u6587\u4EF6\uFF0C\u5B57\u8282\u7801\u4E5F\u662F\u4E8C\u8FDB\u5236\u7801\uFF0C\u4F46\u662F\u5374\u4E0D\u662FCPU\u80FD\u591F\u76F4\u63A5\u8BC6\u522B\u7684\u4E8C\u8FDB\u5236\u673A\u5668\u7801\uFF0C\u5B57\u8282\u7801\u5BF9\u5E94\u4E8E\u5B57\u8282\u7801\u6307\u4EE4\uFF0C\u6240\u4EE5\u5728JVM\u4E2D\u7684\u6267\u884C\u5F15\u64CE\u90E8\u5206\uFF0C\u89E3\u91CA\u5668\u4F1A\u89E3\u91CA\u5B57\u8282\u7801\u6307\u4EE4\u5E76\u6267\u884C\uFF0C\u540C\u65F6JIT\u5373\u65F6\u7F16\u8BD1\u5668\u4F1A\u5C06\u5B57\u8282\u7801\u518D\u6B21\u7F16\u8BD1\u6210CPU\u80FD\u76F4\u63A5\u8BC6\u522B\u7684\u673A\u5668\u7801\uFF0C\u8FD9\u662F\u4E8C\u6B21\u7F16\u8BD1\uFF0C\u6240\u4EE5\u8BF4Java\u662F\u534A\u89E3\u91CA\u534A\u7F16\u8BD1\u7684\u8BED\u8A00\uFF0C\u89E3\u91CA\u5668\u5B58\u5728\u7684\u539F\u56E0\u662F\u4E3A\u4E86\u4FDD\u8BC1\u54CD\u5E94\u901F\u5EA6\uFF0C\u56E0\u4E3A\u7F16\u8BD1\u662F\u9700\u8981\u65F6\u95F4\u7684\uFF0C\u5728JIT\u5373\u65F6\u7F16\u8BD1\u5668\u7F16\u8BD1\u70ED\u70B9\u4EE3\u7801\u7684\u65F6\u5019\uFF0C\u89E3\u91CA\u5668\u5C31\u80FD\u591F\u76F4\u63A5\u89E3\u91CA\u5B57\u8282\u7801\u6307\u4EE4\u5E76\u6267\u884C\u4E86\uFF0C\u4FDD\u8BC1\u4E86\u54CD\u5E94\u901F\u5EA6\u3002

                                                                      2. \u5B9E\u9645\u4E0A\uFF0C\u7F16\u8BD1\u65F6\uFF0C\u6307\u4EE4\u4E2D\u7ED9\u51FA\u7684\u5730\u5740\u53C2\u6570\u90FD\u662F\u903B\u8F91\u5730\u5740\uFF0C\u6216\u8005\u8BF4\u76F8\u5BF9\u5730\u5740\u3002

                                                                        \u7EDD\u5BF9\u5730\u5740\u53C8\u79F0\u7269\u7406\u5730\u5740

                                                                        \u7F16\u8BD1\uFF1A\u7531\u7F16\u8BD1\u7A0B\u5E8F\u5C06\u7528\u6237\u6E90\u4EE3\u7801\u7F16\u8BD1\u6210\u82E5\u5E72\u4E2A\u76EE\u6807\u6A21\u5757\uFF08\u7F16\u8BD1\u5C31\u662F\u628A\u9AD8\u7EA7\u8BED\u8A00\u7FFB\u8BD1\u6210\u673A\u5668\u8BED\u8A00\uFF09

                                                                        \u94FE\u63A5\uFF1A\u7531\u94FE\u63A5\u7A0B\u5E8F\u5C06\u7F16\u8BD1\u540E\u5F62\u6210\u7684\u4E00\u7EC4\u76EE\u6807\u6A21\u5757\uFF0C\u4EE5\u53CA\u6240\u9700\u5E93\u51FD\u6570\u94FE\u63A5\u5728\u4E00\u8D77\uFF0C\u5F62\u6210\u4E00\u4E2A\u5B8C\u6574\u7684\u88C5\u5165\u6A21\u5757

                                                                        \u88C5\u5165\uFF1A\u7531\u88C5\u5165\u7A0B\u5E8F\u5C06\u88C5\u5165\u6A21\u5757\u88C5\u5165\u5185\u5B58\u8FD0\u884C\u3002

                                                                      3. \u88C5\u5165\u7684\u4E09\u79CD\u65B9\u5F0F

                                                                        • \u7EDD\u5BF9\u88C5\u5165

                                                                          \u5728\u7F16\u8BD1\u65F6\uFF0C\u5982\u679C\u76F4\u5230\u7A0B\u5E8F\u5C06\u653E\u5230\u5185\u5B58\u4E2D\u7684\u54EA\u4E2A\u4F4D\u7F6E\uFF0C\u7F16\u8BD1\u7A0B\u5E8F\u5C06\u4EA7\u751F\u7EDD\u5BF9\u5730\u5740\u7684\u76EE\u6807\u4EE3\u7801\uFF0C\u88C5\u5165\u7A0B\u5E8F\u6309\u7167\u88C5\u5165\u6A21\u5757\u4E2D\u7684\u5730\u5740\uFF0C\u5C06\u7A0B\u5E8F\u548C\u6570\u636E\u88C5\u5165\u5185\u5B58

                                                                          \u7EDD\u5BF9\u88C5\u5165\u53EA\u9002\u7528\u4E8E\u5355\u9053\u7A0B\u5E8F\u73AF\u5883

                                                                        • \u9759\u6001\u91CD\u5B9A\u4F4D

                                                                          \u7531\u88C5\u5165\u7A0B\u5E8F\u628A\u903B\u8F91\u5730\u5740\u8F6C\u6362\u4E3A\u7269\u7406\u5730\u5740\u3002

                                                                          \u9759\u6001\u91CD\u5B9A\u4F4D\u7684\u7279\u70B9\u662F\u5728\u4E00\u4E2A\u4F5C\u4E1A\u88C5\u5165\u5185\u5B58\u65F6\uFF0C\u5FC5\u987B\u5206\u914D\u5176\u8981\u6C42\u7684\u5168\u90E8\u5185\u5B58\u7A7A\u95F4\uFF0C\u5982\u679C\u6CA1\u6709\u8DB3\u591F\u7684\u5185\u5B58\uFF0C\u5C31\u4E0D\u80FD\u88C5\u5165\u8BE5\u4F5C\u4E1A\u3002\u4F5C\u4E1A\u4E00\u65E6\u8FDB\u5165\u5185\u5B58\u540E\uFF0C\u5728\u8FD0\u884C\u671F\u95F4\u5C31\u4E0D\u80FD\u518D\u79FB\u52A8\uFF0C\u4E5F\u4E0D\u80FD\u518D\u7533\u8BF7\u5185\u5B58\u7A7A\u95F4\u3002

                                                                        • \u52A8\u6001\u91CD\u5B9A\u4F4D

                                                                          \u53C8\u79F0\u52A8\u6001\u8FD0\u884C\u65F6\u88C5\u5165\u3002\u8FD9\u79CD\u65B9\u5F0F\u9700\u8981\u4E00\u4E2A\u91CD\u5B9A\u4F4D\u5BC4\u5B58\u5668\u652F\u6301

                                                                          \u91CD\u5B9A\u4F4D\u5BC4\u5B58\u5668\uFF1A\u5B58\u653E\u88C5\u5165\u6A21\u5757\u5B58\u653E\u7684\u8D77\u59CB\u4F4D\u7F6E\u3002

                                                                          \u5141\u8BB8\u7A0B\u5E8F\u5728\u5185\u5B58\u4E2D\u53D1\u751F\u79FB\u52A8\u3002

                                                                          \u5E76\u4E14\u53EF\u5C06\u7A0B\u5E8F\u5206\u914D\u5230\u4E0D\u8FDE\u7EED\u7684\u5B58\u50A8\u533A\u4E2D\uFF1A\u5728\u7A0B\u5E8F\u8FD0\u884C\u524D\uFF0C\u53EA\u9700\u88C5\u5165\u5B83\u7684\u90E8\u5206\u4EE3\u7801\u5373\u53EF\u6295\u5165\u8FD0\u884C\uFF0C\u7136\u540E\u5728\u7A0B\u5E8F\u8FD0\u884C\u671F\u95F4\uFF0C\u6839\u636E\u9700\u8981\u52A8\u6001\u7533\u8BF7\u5206\u914D\u5185\u5B58

                                                                      4. \u94FE\u63A5\u7684\u4E09\u79CD\u65B9\u5F0F

                                                                        image-20211217222113746

                                                                      \u5185\u5B58\u7BA1\u7406

                                                                      \u6982\u5FF5

                                                                      1. \u64CD\u4F5C\u7CFB\u7EDF\u4F5C\u4E3A\u7CFB\u7EDF\u8D44\u6E90\u7684\u7BA1\u7406\u8005\uFF0C\u5F53\u7136\u4E5F\u9700\u8981\u5BF9\u5185\u5B58\u8FDB\u884C\u7BA1\u7406

                                                                      2. \u5404\u79CD\u8FDB\u7A0B\u60F3\u8981\u8FD0\u884C\u7684\u65F6\u5019\uFF0C\u8FDB\u7A0B\u76F8\u5173\u7684\u6570\u636E\u90FD\u8981\u653E\u5165\u5185\u5B58\u5F53\u4E2D\uFF0C\u6216\u8005\u8BF4\u8FDB\u7A0B\u5B9E\u4F53\u8981\u653E\u5165\u5185\u5B58\u4E2D\uFF0C\u8FDB\u7A0B\u5B9E\u4F53\u662F\u7531PCB\u3001\u7A0B\u5E8F\u6BB5\u548C\u6570\u636E\u6BB5\u7EC4\u6210\u3002

                                                                      3. \u64CD\u4F5C\u7CFB\u7EDF\u5728\u5185\u5B58\u7BA1\u7406\u7684\u4F5C\u7528\uFF1A

                                                                        • \u64CD\u4F5C\u7CFB\u7EDF\u9700\u8981\u8D1F\u8D23\u5185\u5B58\u7A7A\u95F4\u7684\u5206\u914D\u548C\u56DE\u6536

                                                                        • \u64CD\u4F5C\u7CFB\u7EDF\u9700\u8981\u63D0\u4F9B\u67D0\u79CD\u6280\u672F\uFF08\u865A\u62DF\u6280\u672F\u6216\u8005\u8BF4\u7A7A\u5206\u590D\u7528\u6280\u672F\uFF09\u4ECE\u903B\u8F91\u4E0A\u5BF9\u5185\u5B58\u7A7A\u95F4\u8FDB\u884C\u6269\u5145

                                                                          image-20211220143402386

                                                                        • \u64CD\u4F5C\u7CFB\u7EDF\u9700\u8981\u63D0\u4F9B\u5730\u5740\u8F6C\u6362\u529F\u80FD\uFF0C\u8D1F\u8D23\u7A0B\u5E8F\u7684\u903B\u8F91\u5730\u5740\u548C\u7269\u7406\u5730\u5740\u7684\u8F6C\u6362\u3002

                                                                        • \u64CD\u4F5C\u7CFB\u7EDF\u9700\u8981\u63D0\u4F9B\u5185\u5B58\u4FDD\u62A4\u529F\u80FD\uFF0C\u4FDD\u8BC1\u5404\u8FDB\u7A0B\u5728\u5404\u81EA\u5B58\u50A8\u7A7A\u95F4\u5185\u7684\u8FD0\u884C\uFF0C\u4E92\u4E0D\u5E72\u6270\u3002

                                                                      4. \u903B\u8F91\u5730\u5740\u5230\u7269\u7406\u5730\u5740\u7684\u8F6C\u6362\uFF0C\u5C31\u662F\u524D\u9762\u63D0\u5230\u7684\u88C5\u5165\u7684\u4E09\u79CD\u65B9\u5F0F\u3002

                                                                      5. \u5185\u5B58\u4FDD\u62A4\u53EF\u91C7\u53D6\u4E24\u79CD\u65B9\u6CD5\uFF1A

                                                                        • \u5728CPU\u4E2D\u8BBE\u7F6E\u4E00\u5BF9\u4E0A\u4E0B\u9650\u5BC4\u5B58\u5668\uFF0C\u5B58\u653E\u8FDB\u7A0B\u7684\u4E0A\u4E0B\u9650\u5730\u5740\uFF0C\u8FDB\u7A0B\u7684\u6307\u4EE4\u8981\u8BBF\u95EE\u67D0\u4E2A\u5730\u5740\u65F6\uFF0CCPU\u68C0\u67E5\u662F\u5426\u8D8A\u754C\u3002
                                                                        • \u91C7\u7528\u91CD\u5B9A\u4F4D\u5BC4\u5B58\u5668\uFF08\u53C8\u79F0\u57FA\u5740\u5BC4\u5B58\u5668\uFF09\u548C\u754C\u5730\u5740\u5BC4\u5B58\u5668\uFF08\u53C8\u79F0\u9650\u957F\u5BC4\u5B58\u5668\uFF09\u8FDB\u884C\u8D8A\u754C\u68C0\u67E5\uFF0C\u91CD\u5B9A\u4F4D\u5BC4\u5B58\u5668\u4E2D\u5B58\u653E\u7684\u662F\u8FDB\u7A0B\u7684\u8D77\u59CB\u7269\u7406\u5730\u5740\uFF0C\u754C\u5730\u5740\u5BC4\u5B58\u5668\u4E2D\u5B58\u653E\u7684\u662F\u8FDB\u7A0B\u7684\u6700\u5927\u903B\u8F91\u5730\u5740\u3002\u8FDB\u7A0B\u7684\u6307\u4EE4\u8981\u8BBF\u95EE\u67D0\u4E2A\u5730\u5740\u65F6\uFF0CCPU\u68C0\u67E5\u662F\u5426\u8D8A\u754C\u3002

                                                                      \u8986\u76D6\u548C\u4EA4\u6362

                                                                      1. \u8986\u76D6\u6280\u672F\uFF0C\u7528\u6765\u89E3\u51B3\u201C\u7A0B\u5E8F\u5927\u5C0F\u8D85\u8FC7\u7269\u7406\u5185\u5B58\u603B\u548C\u201D\u7684\u95EE\u9898

                                                                        \u8986\u76D6\u6280\u672F\u7684\u601D\u60F3\uFF1A\u5C06\u7A0B\u5E8F\u5206\u4E3A\u591A\u4E2A\u6BB5\uFF08\u591A\u4E2A\u6A21\u5757\uFF09\uFF0C\u5E38\u7528\u7684\u6BB5\u5E38\u9A7B\u5185\u5B58\uFF0C\u4E0D\u5E38\u7528\u7684\u6BB5\u5728\u9700\u8981\u65F6\u8C03\u5165\u5185\u5B58\u3002

                                                                      2. \u7A0B\u5E8F\u4E00\u5B9A\u8981\u8C03\u5165\u5185\u5B58\u624D\u80FD\u591F\u88AB\u8FD0\u884C\uFF0C\u8FDB\u7A0B\u5C31\u662F\u4E00\u4E2A\u7A0B\u5E8F\u7684\u8FD0\u884C\u671F\uFF0C\u7A0B\u5E8F\u53EF\u4EE5\u7406\u89E3\u4E3A\u9759\u6001\u7684\uFF0C\u5FC5\u987B\u8C03\u5165\u5185\u5B58\u624D\u80FD\u591F\u88ABCPU\u6240\u6267\u884C\uFF0C\u56E0\u4E3ACPU\u662F\u9AD8\u901F\u8BA1\u7B97\u8BBE\u5907\uFF0C\u800C\u786C\u76D8\u7684IO\u901F\u5EA6\u5F88\u6162\uFF0C\u8FD9\u4E2D\u95F4\u5B58\u5728\u77DB\u76FE\uFF0C\u6240\u4EE5\u4E00\u4E2A\u7A0B\u5E8F\u5728\u8FD0\u884C\u524D\u5FC5\u987B\u88AB\u8C03\u5165\u5185\u5B58\u624D\u80FD\u591F\u88ABCPU\u6267\u884C\uFF0C\u8C03\u5165\u5185\u5B58\u7684\u7A0B\u5E8F\u53EF\u4EE5\u8BF4\u662F\u7A0B\u5E8F\u7684\u8FD0\u884C\u6001\uFF0C\u4E5F\u5C31\u662F\u8FDB\u7A0B\u3002

                                                                      3. \u5185\u5B58\u4E2D\u5206\u4E3A\u4E00\u4E2A\u56FA\u5B9A\u533A\u548C\u82E5\u5E72\u4E2A\u8986\u76D6\u533A

                                                                        \u9700\u8981\u5E38\u9A7B\u5185\u5B58\u7684\u6BB5\u653E\u5728\u56FA\u5B9A\u533A\u4E2D\uFF0C\u8C03\u5165\u540E\u5C31\u4E0D\u518D\u8C03\u51FA

                                                                        \u4E0D\u5E38\u7528\u7684\u6BB5\u653E\u5728\u8986\u76D6\u533A\uFF0C\u9700\u8981\u7528\u5230\u65F6\u8C03\u5165\u5185\u5B58\uFF0C\u7528\u4E0D\u5230\u65F6\u8C03\u51FA\u5185\u5B58

                                                                        \u6309\u7167\u81EA\u8EAB\u903B\u8F91\u7ED3\u6784\uFF0C\u8BA9\u90A3\u4E9B\u4E0D\u53EF\u80FD\u540C\u65F6\u88AB\u8BBF\u95EE\u7684\u7A0B\u5E8F\u6BB5\u5171\u4EAB\u540C\u4E00\u4E2A\u8986\u76D6\u533A

                                                                        image-20211220145412455

                                                                        \u8986\u76D6\u6280\u672F\u53EA\u7528\u4E8E\u65E9\u671F\u7684\u64CD\u4F5C\u7CFB\u7EDF\u4E2D\uFF0C\u73B0\u5728\u5DF2\u7ECF\u6210\u4E3A\u5386\u53F2\uFF01\uFF01\uFF01

                                                                      4. \u4EA4\u6362\u6280\u672F

                                                                        \u5F53\u5185\u5B58\u7A7A\u95F4\u7D27\u5F20\u65F6\uFF0C\u7CFB\u7EDF\u5C06\u5185\u5B58\u4E2D\u67D0\u4E9B\u8FDB\u7A0B\u6682\u65F6\u6362\u51FA\u5916\u5B58\uFF0C\u628A\u5916\u5B58\u4E2D\u67D0\u4E9B\u5DF2\u5177\u5907\u8FD0\u884C\u6761\u4EF6\u7684\u8FDB\u7A0B\u6362\u5165\u5185\u5B58\uFF08\u8FDB\u7A0B\u5728\u5185\u5B58\u4E0E\u78C1\u76D8\u95F4\u52A8\u6001\u8C03\u5EA6\u3002\uFF09

                                                                        \u5904\u7406\u673A\u8C03\u5EA6\u4E2D\u7684\u4E2D\u7EA7\u8C03\u5EA6\u5C31\u662F\u4E3A\u4E86\u5B9E\u73B0\u4EA4\u6362\u6280\u672F\u7684\u8C03\u5EA6\u7B56\u7565\u3002

                                                                        \u8FDB\u7A0B\u7684PCB\u4F1A\u4FDD\u7559\u5728\u5185\u5B58\u4E2D\uFF0C\u63D2\u5165\u5230\u6302\u8D77\u961F\u5217

                                                                        PCB\u4E00\u5B9A\u662F\u4FDD\u7559\u5728\u5185\u5B58\u4E2D\uFF0C\u56E0\u4E3A\u6302\u8D77\u7684\u8FDB\u7A0B\u5728\u78C1\u76D8\u7684\u4EC0\u4E48\u4F4D\u7F6E\u5728PCB\u6709\u8BB0\u5F55\u3002

                                                                      5. \u5177\u6709\u5BF9\u6362\u529F\u80FD\u7684\u64CD\u4F5C\u7CFB\u7EDF\u4E2D\uFF0C\u901A\u5E38\u628A\u78C1\u76D8\u7A7A\u95F4\u5206\u4E3A\u5BF9\u6362\u533A\u548C\u6587\u4EF6\u533A\u4E24\u90E8\u5206\u3002\u6587\u4EF6\u533A\u4E3B\u8981\u7528\u4E8E\u5B58\u653E\u6587\u4EF6\uFF0C\u4E3B\u8981\u8FFD\u6C42\u5B58\u50A8\u7A7A\u95F4\u7684\u5229\u7528\u7387\uFF0C\u56E0\u6B64\u5BF9\u6587\u4EF6\u533A\u7A7A\u95F4\u7684\u7BA1\u7406\u91C7\u7528\u79BB\u6563\u5206\u914D\u65B9\u5F0F

                                                                        \u5BF9\u6362\u533A\u7A7A\u95F4\u53EA\u5360\u78C1\u76D8\u7684\u5C0F\u90E8\u5206\uFF0C\u88AB\u6362\u51FA\u7684\u8FDB\u7A0B\u6570\u636E\u5C31\u5B58\u653E\u5728\u5BF9\u6362\u533A\uFF0C\u4E3B\u8981\u8FFD\u6C42\u6362\u5165\u6362\u51FA\u901F\u5EA6\uFF0C\u91C7\u7528\u8FDE\u7EED\u5206\u914D\u65B9\u5F0F\u3002

                                                                        \u5BF9\u6362\u533A\u7684IO\u901F\u5EA6\u6BD4\u6587\u4EF6\u533A\u7684\u66F4\u5FEB

                                                                      6. \u4EC0\u4E48\u65F6\u5019\u5E94\u8BE5\u4EA4\u6362\u5185\u5B58\u4E2D\u7684\u8FDB\u7A0B\u5230\u5916\u5B58\u4E2D\uFF0C\u628A\u5916\u5B58\u4E2D\u5177\u5907\u8FD0\u884C\u6761\u4EF6\u7684\u8FDB\u7A0B\u4EA4\u6362\u8FDB\u5185\u5B58\u4E2D\uFF1F

                                                                        \u4EA4\u6362\u901A\u5E38\u5728\u8BB8\u591A\u8FDB\u7A0B\u8FD0\u884C\u4E14\u5185\u5B58\u5403\u7D27\u65F6\u8FDB\u884C\uFF0C\u4F8B\u5982\uFF1A\u5728\u53D1\u73B0\u8BB8\u591A\u8FDB\u7A0B\u8FD0\u884C\u65F6\u7ECF\u5E38\u53D1\u751F\u7F3A\u9875\u65F6\uFF0C\u8BF4\u660E\u5185\u5B58\u7D27\u5F20\uFF0C\u6B64\u65F6\u53EF\u4EE5\u6362\u51FA\u4E00\u4E9B\u8FDB\u7A0B\uFF0C\u5982\u679C\u7F3A\u9875\u7387\u660E\u663E\u4E0B\u964D\uFF0C\u5C31\u53EF\u4EE5\u6682\u505C\u6362\u51FA\u3002

                                                                      7. \u53EF\u4F18\u5148\u6362\u51FA\u963B\u585E\u8FDB\u7A0B\uFF0C\u53EF\u6362\u51FA\u4F18\u5148\u7EA7\u4F4E\u7684\u8FDB\u7A0B\uFF0C\u4E3A\u4E86\u9632\u6B62\u4F18\u5148\u7EA7\u4F4E\u7684\u8FDB\u7A0B\u5728\u88AB\u8C03\u5165\u5185\u5B58\u540E\u5F88\u5FEB\u53C8\u88AB\u6362\u51FA\uFF0C\u6709\u7684\u7CFB\u7EDF\u8FD8\u4F1A\u8003\u8651\u8FDB\u7A0B\u5728\u5185\u5B58\u4E2D\u7684\u9A7B\u7559\u65F6\u95F4\u3002

                                                                        PCB\u4F1A\u5E38\u9A7B\u5185\u5B58\uFF0C\u4E0D\u4F1A\u88AB\u6362\u51FA\u5916\u5B58

                                                                      8. \u8986\u76D6\u548C\u4EA4\u6362\u7684\u533A\u522B\uFF1A

                                                                        • \u8986\u76D6\u662F\u5728\u540C\u4E00\u4E2A\u7A0B\u5E8F\u6216\u8FDB\u7A0B\u4E2D\u7684
                                                                        • \u4EA4\u6362\u662F\u5728\u4E0D\u540C\u8FDB\u7A0B\u6216\u4F5C\u4E1A\u4E4B\u95F4\u7684\u3002

                                                                      \u8FDE\u7EED\u5206\u914D\u7BA1\u7406\u65B9\u5F0F

                                                                      1. \u5355\u4E00\u8FDE\u7EED\u5206\u914D

                                                                        \u5728\u5355\u4E00\u8FDE\u7EED\u5206\u914D\u65B9\u5F0F\u4E2D\uFF0C\u5185\u5B58\u88AB\u5206\u4E3A\u7CFB\u7EDF\u533A\u548C\u7528\u6237\u533A\u3002

                                                                        \u7CFB\u7EDF\u533A\u901A\u5E38\u4F4D\u4E8E\u5185\u5B58\u7684\u4F4E\u5730\u5740\u90E8\u5206\uFF0C\u7528\u4E8E\u5B58\u653E\u64CD\u4F5C\u7CFB\u7EDF\u7684\u76F8\u5173\u6570\u636E\u3002

                                                                        \u7528\u6237\u533A\u7528\u4E8E\u5B58\u653E\u7528\u6237\u8FDB\u7A0B\u76F8\u5173\u6570\u636E

                                                                        \u5185\u5B58\u4E2D\u53EA\u80FD\u6709\u4E00\u9053\u7528\u6237\u7A0B\u5E8F\uFF0C\u7528\u6237\u7A0B\u5E8F\u72EC\u5360\u6574\u4E2A\u7528\u6237\u533A\u7A7A\u95F4\u3002

                                                                        \u4E0D\u652F\u6301\u591A\u4E2A\u8FDB\u7A0B\u5E76\u53D1\u8FD0\u884C\u3002

                                                                        \u6CA1\u6709\u5916\u90E8\u788E\u7247\uFF0C\u6709\u5185\u90E8\u788E\u7247

                                                                      2. \u56FA\u5B9A\u5206\u533A\u5206\u914D

                                                                        \u5C06\u6574\u4E2A\u7528\u6237\u7A7A\u95F4\u5212\u5206\u4E3A\u82E5\u5E72\u4E2A\u56FA\u5B9A\u5927\u5C0F\u7684\u5206\u533A\uFF0C\u5728\u6BCF\u4E2A\u5206\u533A\u4E2D\u53EA\u88C5\u5165\u4E00\u9053\u4F5C\u4E1A

                                                                        \u6CA1\u6709\u5916\u90E8\u788E\u7247\uFF0C\u6709\u5185\u90E8\u788E\u7247

                                                                        • \u5206\u533A\u5927\u5C0F\u76F8\u7B49

                                                                          image-20211220153145382

                                                                        • \u5206\u533A\u5927\u5C0F\u4E0D\u7B49

                                                                          image-20211220153203225

                                                                      3. \u52A8\u6001\u5206\u533A\u5206\u914D

                                                                        \u53C8\u79F0\u53EF\u53D8\u5206\u533A\u5206\u914D\uFF0C\u8FD9\u79CD\u5206\u914D\u65B9\u5F0F\u4E0D\u4F1A\u9884\u5148\u5212\u5206\u5185\u5B58\u5206\u533A\uFF0C\u800C\u662F\u5728\u8FDB\u7A0B\u88C5\u5165\u5185\u5B58\u65F6\uFF0C\u6839\u636E\u8FDB\u7A0B\u7684\u5927\u5C0F\u52A8\u6001\u5730\u5EFA\u7ACB\u5206\u533A\uFF0C\u5E76\u4F7F\u5206\u533A\u7684\u5927\u5C0F\u6B63\u597D\u9002\u5408\u8FDB\u7A0B\u7684\u9700\u8981\u3002\u56E0\u6B64\u7CFB\u7EDF\u5206\u533A\u7684\u5927\u5C0F\u548C\u6570\u76EE\u662F\u53EF\u53D8\u7684

                                                                        • \u7CFB\u7EDF\u7528\u4EC0\u4E48\u6837\u7684\u6570\u636E\u7ED3\u6784\u8BB0\u5F55\u5185\u5B58\u7684\u4F7F\u7528\u60C5\u51B5

                                                                          image-20211220154132962

                                                                        • \u628A\u4E00\u4E2A\u65B0\u4F5C\u4E1A\u653E\u5165\u5185\u5B58\u65F6\uFF0C\u5FC5\u987B\u6309\u7167\u4E00\u5B9A\u7684\u52A8\u6001\u5206\u533A\u5206\u914D\u7B97\u6CD5\uFF0C\u4ECE\u7A7A\u95F2\u5206\u533A\u8868\uFF08\u6216\u7A7A\u95F2\u5206\u533A\u94FE\uFF09\u4E2D\u9009\u51FA\u4E00\u4E2A\u5206\u533A\u5206\u914D\u7ED9\u8BE5\u4F5C\u4E1A

                                                                      4. \u52A8\u6001\u5206\u533A\u5206\u914D\u6CA1\u6709\u5185\u90E8\u788E\u7247\uFF0C\u4F46\u662F\u6709\u5916\u90E8\u788E\u7247

                                                                        \u5185\u90E8\u788E\u7247\uFF0C\u5206\u914D\u7ED9\u67D0\u8FDB\u7A0B\u7684\u5185\u5B58\u533A\u57DF\u4E2D\uFF0C\u5982\u679C\u6709\u4E9B\u90E8\u5206\u6CA1\u6709\u7528\u4E0A

                                                                        \u5916\u90E8\u788E\u7247\uFF0C\u662F\u6307\u5185\u5B58\u4E2D\u7684\u67D0\u4E9B\u7A7A\u95F2\u5206\u533A\u7531\u4E8E\u592A\u5C0F\u800C\u96BE\u4EE5\u5229\u7528\uFF0C\u5373\u6CA1\u6709\u5206\u914D\u7ED9\u8FDB\u7A0B\u7684\u5185\u5B58\u7A7A\u95F4

                                                                        \u5982\u679C\u5185\u5B58\u4E2D\u7A7A\u95F2\u7A7A\u95F4\u7684\u7EFC\u5408\u672C\u6765\u53EF\u4EE5\u6EE1\u8DB3\u67D0\u8FDB\u7A0B\u7684\u8981\u6C42\uFF0C\u4F46\u7531\u4E8E\u8FDB\u7A0B\u9700\u8981\u7684\u662F\u4E00\u6574\u5757\u8FDE\u7EED\u7684\u5185\u5B58\u7A7A\u95F4\uFF0C\u56E0\u6B64\u8FD9\u4E9B\u788E\u7247\u4E0D\u80FD\u6EE1\u8DB3\u8FDB\u7A0B\u7684\u9700\u6C42

                                                                        \u53EF\u4EE5\u901A\u8FC7\u7D27\u51D1\u6280\u672F\u6765\u89E3\u51B3\u5916\u90E8\u788E\u7247

                                                                      \u52A8\u6001\u5206\u533A\u5206\u914D\u7B97\u6CD5

                                                                      1. \u9996\u6B21\u9002\u5E94\u7B97\u6CD5

                                                                        \u6BCF\u6B21\u90FD\u4ECE\u4F4E\u5730\u5740\u5F00\u59CB\u67E5\u627E\uFF0C\u627E\u5230\u7B2C\u4E00\u4E2A\u80FD\u6EE1\u8DB3\u5927\u5C0F\u7684\u7A7A\u95F2\u5206\u533A

                                                                        \u5982\u4F55\u5B9E\u73B0\uFF1A\u7A7A\u95F2\u5206\u533A\u4EE5\u5730\u5740\u9012\u589E\u7684\u6B21\u5E8F\u6392\u5E8F\uFF0C\u6BCF\u6B21\u5206\u914D\u5185\u5B58\u65F6\u4ECE\u5934\uFF08\u4ECE\u4F4E\u5730\u5740\uFF09\u987A\u5E8F\u67E5\u627E\u7A7A\u95F2\u5206\u533A\u94FE\uFF08\u6216\u7A7A\u95F2\u5206\u533A\u8868\uFF09\uFF0C\u627E\u5230\u5927\u5C0F\u80FD\u6EE1\u8DB3\u8981\u6C42\u7684\u7B2C\u4E00\u4E2A\u7A7A\u95F2\u5206\u533A\u3002

                                                                      2. \u6700\u4F73\u9002\u5E94\u7B97\u6CD5

                                                                        \u4E3A\u5404\u8FDB\u7A0B\u5206\u914D\u7684\u7A7A\u95F4\u5FC5\u987B\u662F\u8FDE\u7EED\u7684\u4E00\u6574\u7247\u533A\u57DF\uFF0C\u56E0\u6B64\u4E3A\u4E86\u4FDD\u8BC1\u5F53\u5927\u8FDB\u7A0B\u5230\u6765\u65F6\u80FD\u6709\u8FDE\u7EED\u7684\u5927\u7247\u7A7A\u95F4\uFF0C\u53EF\u4EE5\u5C3D\u53EF\u80FD\u591A\u5730\u7559\u4E0B\u5927\u7247\u7684\u7A7A\u95F2\u533A\uFF0C\u5373\uFF0C\u4F18\u5148\u4F7F\u7528\u66F4\u5C0F\u7684\u7A7A\u95F2\u533A

                                                                        \u5982\u4F55\u5B9E\u73B0\uFF1A\u7A7A\u95F2\u5206\u533A\u6309\u5BB9\u91CF\u9012\u589E\u6B21\u5E8F\u94FE\u63A5\uFF0C\u6BCF\u6B21\u5206\u914D\u5185\u5B58\u65F6\u987A\u5E8F\u67E5\u627E\u7A7A\u95F2\u5206\u533A\u94FE\uFF08\u6216\u7A7A\u95F2\u5206\u533A\u8868\uFF09\uFF0C\u627E\u5230\u5927\u5C0F\u80FD\u6EE1\u8DB3\u8981\u6C42\u7684\u7B2C\u4E00\u4E2A\u7A7A\u95F2\u5206\u533A\u3002

                                                                        \u66F4\u5C0F\u7684\u7A7A\u95F2\u5206\u533A\u4F1A\u79FB\u5230\u94FE\u5934\u7684\u4F4D\u7F6E\u3002

                                                                        \u7F3A\u70B9\uFF1A\u6BCF\u6B21\u90FD\u9009\u6700\u5C0F\u7684\u5206\u533A\u8FDB\u884C\u5206\u914D\uFF0C\u4F1A\u7559\u4E0B\u8D8A\u6765\u8D8A\u591A\u7684\u3001\u5F88\u5C0F\u7684\u3001\u96BE\u4EE5\u5229\u7528\u7684\u5185\u5B58\u5757\uFF0C\u56E0\u6B64\u8FD9\u79CD\u65B9\u6CD5\u4F1A\u4EA7\u751F\u5F88\u591A\u7684\u5916\u90E8\u788E\u7247

                                                                      3. \u6700\u574F\u9002\u5E94\u7B97\u6CD5

                                                                        \u548C\u6700\u4F73\u9002\u5E94\u7B97\u6CD5\u76F8\u53CD

                                                                        \u7B97\u6CD5\u601D\u60F3\uFF1A\u4F18\u5148\u4F7F\u7528\u6700\u5927\u7684\u8FDE\u7EED\u7A7A\u95F2\u533A\uFF0C\u8FD9\u6837\u5206\u914D\u540E\u5269\u4F59\u7684\u7A7A\u95F2\u533A\u5C31\u4E0D\u4F1A\u592A\u5C0F\uFF0C\u66F4\u65B9\u4FBF\u4F7F\u7528

                                                                        \u5982\u4F55\u5B9E\u73B0\uFF1A\u7A7A\u95F2\u5206\u533A\u6309\u5BB9\u91CF\u9012\u51CF\u6B21\u5E8F\u94FE\u63A5\uFF0C\u6BCF\u6B21\u5206\u914D\u5185\u5B58\u65F6\u987A\u5E8F\u67E5\u627E\u7A7A\u95F2\u5206\u533A\u94FE\uFF08\u6216\u7A7A\u95F2\u5206\u533A\u8868\uFF09\uFF0C\u627E\u5230\u5927\u5C0F\u80FD\u6EE1\u8DB3\u8981\u6C42\u7684\u7B2C\u4E00\u4E2A\u7A7A\u95F2\u5206\u533A\u3002

                                                                        \u7F3A\u70B9\uFF1A\u8FD9\u79CD\u65B9\u5F0F\u4F1A\u5BFC\u81F4\u8F83\u5927\u7684\u8FDE\u7EED\u7A7A\u95F2\u533A\u88AB\u8FC5\u901F\u7528\u5B8C\uFF0C\u5982\u679C\u4E4B\u540E\u6709\u5927\u8FDB\u7A0B\u5230\u8FBE\uFF0C\u5C31\u6CA1\u6709\u5185\u5B58\u5206\u533A\u53EF\u7528\u4E86\u3002

                                                                      4. \u90BB\u8FD1\u9002\u5E94\u7B97\u6CD5

                                                                        \u7B97\u6CD5\u601D\u60F3\uFF1A\u9996\u6B21\u9002\u5E94\u7B97\u6CD5\u6BCF\u6B21\u90FD\u4ECE\u94FE\u5934\u5F00\u59CB\u67E5\u627E\u7684\uFF0C\u8FD9\u53EF\u80FD\u4F1A\u5BFC\u81F4\u4F4E\u5730\u5740\u90E8\u5206\u51FA\u73B0\u5F88\u591A\u5C0F\u7684\u7A7A\u95F2\u5206\u533A\uFF08\u96BE\u4EE5\u5229\u7528\u7684\u5206\u533A\uFF09\uFF0C\u800C\u6BCF\u6B21\u5206\u914D\u67E5\u627E\u65F6\uFF0C\u90FD\u8981\u7ECF\u8FC7\u8FD9\u4E9B\u5206\u533A\uFF0C\u56E0\u6B64\u4E5F\u589E\u52A0\u4E86\u67E5\u627E\u7684\u5F00\u9500\uFF0C\u5982\u679C\u6BCF\u6B21\u90FD\u4ECE\u4E0A\u6B21\u67E5\u627E\u7ED3\u675F\u7684\u4F4D\u7F6E\u5F00\u59CB\u68C0\u7D22\uFF0C\u5C31\u80FD\u89E3\u51B3\u4E0A\u8FF0\u95EE\u9898\u3002

                                                                      \u57FA\u672C\u5206\u9875\u5B58\u50A8\u7BA1\u7406

                                                                      \u4ECB\u7ECD
                                                                      1. \u8FDE\u7EED\u5206\u914D\u65B9\u5F0F\u7684\u7F3A\u70B9\uFF1A

                                                                        \u56FA\u5B9A\u5206\u533A\u5206\u914D\uFF0C\u4F1A\u4EA7\u751F\u5927\u91CF\u7684\u5185\u90E8\u788E\u7247\uFF0C\u5185\u5B58\u7684\u5229\u7528\u7387\u5F88\u4F4E

                                                                        \u52A8\u6001\u5206\u533A\u5206\u914D\uFF0C\u4F1A\u4EA7\u751F\u5F88\u591A\u5916\u90E8\u788E\u7247

                                                                        \u5982\u679C\u5141\u8BB8\u5C06\u4E00\u4E2A\u8FDB\u7A0B\u5206\u6563\u5730\u88C5\u5165\u5230\u8BB8\u591A\u4E0D\u76F8\u90BB\u7684\u5206\u533A\u4E2D\uFF0C\u4FBF\u53EF\u5145\u5206\u5730\u5229\u7528\u5185\u5B58\uFF0C\u800C\u65E0\u9700\u518D\u8FDB\u884C\u201C\u7D27\u51D1\u201D\uFF08\u5185\u5B58\u6574\u7406\uFF09

                                                                      2. \u975E\u8FDE\u7EED\u5206\u914D\u7BA1\u7406\u65B9\u5F0F

                                                                        • \u57FA\u672C\u5206\u9875\u5B58\u50A8\u7BA1\u7406
                                                                        • \u57FA\u672C\u5206\u6BB5\u5B58\u50A8\u7BA1\u7406
                                                                        • \u6BB5\u9875\u5F0F\u5B58\u50A8\u7BA1\u7406
                                                                      3. \u57FA\u672C\u5206\u9875\u5B58\u50A8\u7BA1\u7406\u7684\u601D\u60F3\uFF1A

                                                                        \u628A\u5185\u5B58\u5206\u4E3A\u4E00\u4E2A\u4E2A\u76F8\u7B49\u7684\u5C0F\u5206\u533A\uFF0C\u518D\u6309\u7167\u5206\u533A\u5927\u5C0F\u628A\u8FDB\u7A0B\u62C6\u5206\u6210\u4E00\u4E2A\u4E2A\u5C0F\u90E8\u5206

                                                                      4. \u5C06\u5185\u5B58\u7A7A\u95F4\u5206\u4E3A\u4E00\u4E2A\u4E2A\u5927\u5C0F\u76F8\u7B49\u7684\u5206\u533A\uFF0C\u6BCF\u4E2A\u5206\u533A\u5C31\u662F\u4E00\u4E2A\u201C\u9875\u6846\u201D\u6216\u9875\u5E27\u3002

                                                                        \u6BCF\u4E2A\u9875\u6846\u6709\u4E00\u4E2A\u7F16\u53F7\uFF0C\u5373\u9875\u6846\u53F7\u3002\u9875\u6846\u53F7\u4ECE0\u5F00\u59CB\u3002

                                                                        \u628A\u7528\u6237\u8FDB\u7A0B\u7684\u5730\u5740\u7A7A\u95F4\u4E5F\u5206\u4E3A\u4E0E\u9875\u6846\u5927\u5C0F\u76F8\u7B49\u7684\u4E00\u4E2A\u4E2A\u533A\u57DF\uFF0C\u79F0\u4E3A\u9875\u6216\u9875\u9762\uFF0C\u6BCF\u4E2A\u9875\u9762\u4E5F\u6709\u4E00\u4E2A\u7F16\u53F7\uFF0C\u5373\u201C\u9875\u53F7\u201D\uFF0C\u9875\u53F7\u4E5F\u662F\u4ECE0\u5F00\u59CB

                                                                        \u4E5F\u5C31\u662F\u9875\u6216\u9875\u9762\u662F\u8FDB\u7A0B\u5206\u7684\uFF0C\u9875\u6846\u6216\u8005\u8BF4\u9875\u5E27\u662F\u5185\u5B58\u5206\u7684\u3002

                                                                        \u6CE8\uFF1A\u8FDB\u7A0B\u7684\u6700\u540E\u4E00\u4E2A\u9875\u9762\u53EF\u80FD\u6CA1\u6709\u4E00\u4E2A\u9875\u6846\u90A3\u4E48\u5927\uFF0C\u56E0\u6B64\uFF0C\u9875\u6846\u4E0D\u80FD\u592A\u5927\uFF0C\u5426\u5219\u53EF\u80FD\u4EA7\u751F\u8FC7\u5927\u7684\u5185\u90E8\u788E\u7247

                                                                        \u64CD\u4F5C\u7CFB\u7EDF\u4EE5\u9875\u6846\u4E3A\u5355\u4F4D\uFF0C\u4E3A\u5404\u4E2A\u8FDB\u7A0B\u5206\u914D\u5185\u5B58\u7A7A\u95F4\uFF0C\u8FDB\u7A0B\u7684\u6BCF\u4E2A\u9875\u9762\u5206\u522B\u653E\u5165\u4E00\u4E2A\u9875\u6846\u4E2D\uFF0C\u4E5F\u5C31\u662F\u8BF4\uFF0C\u8FDB\u7A0B\u7684\u9875\u9762\u4E0E\u5185\u5B58\u7684\u9875\u6846\u6709\u4E00\u4E00\u5BF9\u5E94\u7684\u5173\u7CFB\u3002

                                                                        \u8FDB\u7A0B\u7684\u5404\u4E2A\u9875\u9762\u4E0D\u5FC5\u8FDE\u7EED\u5B58\u653E\uFF0C\u4E5F\u4E0D\u5FC5\u6309\u7167\u5148\u540E\u987A\u5E8F\u6765\uFF0C\u53EF\u4EE5\u653E\u5230\u4E0D\u76F8\u90BB\u7684\u5404\u4E2A\u9875\u6846\u4E2D\u3002

                                                                      5. \u5982\u4F55\u5B9E\u73B0\u903B\u8F91\u5730\u5740\u5230\u7269\u7406\u5730\u5740\u7684\u8F6C\u6362\uFF1F

                                                                        • \u8981\u7B97\u51FA\u903B\u8F91\u5730\u5740\u5BF9\u5E94\u7684\u9875\u53F7----\u903B\u8F91\u5730\u5740 / \u9875\u9762\u5927\u5C0F
                                                                        • \u8981\u77E5\u9053\u8BE5\u9875\u53F7\u5BF9\u5E94\u9875\u9762\u518D\u5185\u5B58\u4E2D\u7684\u8D77\u59CB\u5730\u5740----\u5F97\u5230\u9875\u53F7\u4E4B\u540E\uFF0C\u6839\u636E\u9875\u8868\u7684\u8868\u9879\uFF0C\u627E\u5230\u5757\u53F7\uFF0C\u5757\u53F7 * \u5185\u5B58\u5757\u5927\u5C0F\uFF0C\u5F97\u5230\u5BF9\u5E94\u9875\u9762\u5728\u5185\u5B58\u4E2D\u7684\u8D77\u59CB\u5730\u5740\u3002
                                                                        • \u8981\u7B97\u51FA\u903B\u8F91\u5730\u5740\u5728\u201C\u9875\u9762\u5185\u201D\u7684\u504F\u79FB\u91CF----\u903B\u8F91\u5730\u5740 % \u9875\u9762\u5927\u5C0F
                                                                        • \u7269\u7406\u5730\u5740 = \u9875\u9762\u5730\u5740 + \u9875\u5185\u504F\u79FB\u91CF
                                                                      6. \u4E3A\u4E86\u80FD\u76F4\u5230\u8FDB\u7A0B\u7684\u6BCF\u4E2A\u9875\u9762\u5728\u5185\u5B58\u4E2D\u5B58\u653E\u7684\u8D77\u59CB\u4F4D\u7F6E\uFF0C\u64CD\u4F5C\u7CFB\u7EDF\u8981\u4E3A\u6BCF\u4E2A\u8FDB\u7A0B\u5EFA\u7ACB\u4E00\u5F20\u9875\u8868\u3002

                                                                        \u9875\u9762\u5185\u7684\u5730\u5740\u662F\u8FDE\u7EED\u7684\uFF0C\u5404\u9875\u9762\u4E4B\u95F4\u662F\u79BB\u6563\u7684\u3002

                                                                        \u4E00\u4E2A\u8FDB\u7A0B\u5BF9\u5E94\u4E00\u5F20\u9875\u8868

                                                                        \u4E00\u4E2A\u8FDB\u7A0B\u7684\u6BCF\u4E00\u4E2A\u9875\u9762\uFF0C\u5BF9\u5E94\u4E00\u4E2A\u9875\u8868\u9879

                                                                        \u6BCF\u4E2A\u9875\u8868\u9879\u7531\u9875\u53F7\u548C\u5757\u53F7\u7EC4\u6210

                                                                        \u9875\u8868\u8BB0\u5F55\u8FDB\u7A0B\u9875\u9762\u548C**\u5B9E\u9645\u5B58\u653E\u7684\u5185\u5B58\u5757\uFF08\u5757\u53F7\uFF09**\u4E4B\u95F4\u7684\u5BF9\u5E94\u5173\u7CFB\uFF01\uFF01

                                                                        image-20211220175427142

                                                                        M\u53F7\u5185\u5B58\u5757\u7684\u8D77\u59CB\u5730\u5740\u5C31\u662FM * \u5185\u5B58\u5757\u5927\u5C0F

                                                                        \u5404\u5757\u4E4B\u95F4\u662F\u79BB\u6563\u7684\uFF0C\u4F46\u662F\u6BCF\u4E00\u5757\u5185\u662F\u8FDE\u7EED\u7684\u3002

                                                                      \u57FA\u672C\u5730\u5740\u53D8\u6362\u673A\u6784
                                                                      1. \u57FA\u672C\u5730\u5740\u53D8\u6362\u673A\u6784---\u7528\u4E8E\u5B9E\u73B0\u903B\u8F91\u5730\u5740\u5230\u7269\u7406\u5730\u5740\u8F6C\u6362\u7684\u4E00\u7EC4\u786C\u4EF6\u673A\u6784\u3002

                                                                        \u9875\u8868\u5BC4\u5B58\u5668\u7684\u4F5C\u7528\uFF1A

                                                                        • \u5B58\u653E\u9875\u8868\u8D77\u59CB\u5730\u5740
                                                                        • \u5B58\u653E\u9875\u8868\u957F\u5EA6
                                                                      2. image-20211220183023318

                                                                      \u5177\u6709\u5FEB\u8868\u7684\u5730\u5740\u53D8\u6362\u673A\u6784
                                                                      1. \u65F6\u95F4\u5C40\u90E8\u6027\uFF1A

                                                                        \u5982\u679C\u6267\u884C\u4E86\u7A0B\u5E8F\u4E2D\u7684\u67D0\u6761\u6307\u4EE4\uFF0C\u90A3\u4E48\u4E0D\u4E45\u540E\u8FD9\u6761\u6307\u4EE4\u5F88\u53EF\u80FD\u518D\u6B21\u6267\u884C\uFF1B\u5982\u679C\u67D0\u4E2A\u6570\u636E\u88AB\u8BBF\u95EE\u8FC7\uFF0C\u4E0D\u4E45\u4E4B\u540E\u8BE5\u6570\u636E\u5F88\u53EF\u80FD\u518D\u6B21\u88AB\u8BBF\u95EE

                                                                        \u7A7A\u95F4\u5C40\u90E8\u6027\uFF1A

                                                                        \u4E00\u65E6\u7A0B\u5E8F\u8BBF\u95EE\u4E86\u67D0\u4E2A\u5B58\u50A8\u5355\u5143\uFF0C\u5728\u4E0D\u4E45\u4E4B\u540E\uFF0C\u5176\u9644\u8FD1\u7684\u5B58\u50A8\u5355\u5143\u4E5F\u5F88\u6709\u53EF\u80FD\u88AB\u8BBF\u95EE\uFF08\u56E0\u4E3A\u5F88\u591A\u6570\u636E\u5728\u5185\u5B58\u4E2D\u90FD\u662F\u8FDE\u7EED\u5B58\u653E\u7684\u3002 \uFF09

                                                                      2. \u6BCF\u6B21\u8981\u8BBF\u95EE\u4E00\u4E2A\u903B\u8F91\u5730\u5740\uFF0C\u90FD\u9700\u8981\u67E5\u8BE2\u5185\u5B58\u4E2D\u7684\u9875\u8868\uFF08\u6839\u636E\u903B\u8F91\u5730\u5740\u53EF\u4EE5\u5F97\u5230\u9875\u53F7\u548C\u9875\u5185\u504F\u79FB\u91CF\uFF0C\u6839\u636E\u9875\u53F7\u3001\u9875\u8868\u8D77\u59CB\u5730\u5740\u548C\u9875\u8868\u9879\u957F\u5EA6\uFF0C\u53EF\u4EE5\u5F97\u5230\u9875\u53F7\u5BF9\u5E94\u7684\u9875\u8868\u9879\u5730\u5740\uFF0C\u5F97\u5230\u9875\u53F7\u5BF9\u5E94\u7684\u5185\u5B58\u5757\u53F7\uFF0C\u6839\u636E\u5185\u5B58\u5757\u53F7\u548C\u9875\u9762\u5927\u5C0F\u5373\u6BCF\u4E00\u4E2A\u5185\u5B58\u5757\u7684\u5927\u5C0F\uFF0C\u53EF\u4EE5\u5F97\u5230\u8BE5\u5185\u5B58\u5757\u5728\u5185\u5B58\u4E2D\u7684\u8D77\u59CB\u5730\u5740\uFF0C\u6839\u636E\u8D77\u59CB\u5730\u5740\u548C\u504F\u79FB\u91CF\u4FBF\u53EF\u4EE5\u5F97\u5230\u7269\u7406\u5730\u5740\uFF09\u3002

                                                                        \u7531\u4E8E\u5C40\u90E8\u6027\u539F\u7406\uFF0C\u53EF\u80FD\u8FDE\u7EED\u5F88\u591A\u6B21\u67E5\u5230\u7684\u90FD\u662F\u540C\u4E00\u4E2A\u9875\u8868\u9879\u5730\u5740\u3002\u65E2\u7136\u5982\u6B64\uFF0C\u80FD\u5426\u5229\u7528\u8FD9\u4E2A\u7279\u6027\u51CF\u5C11\u8BBF\u95EE\u9875\u8868\u7684\u6B21\u6570\u5462\uFF1F

                                                                      3. \u5FEB\u8868\uFF0C\u53C8\u79F0TLB\u5373\u8054\u60F3\u5BC4\u5B58\u5668\uFF0C\u662F\u4E00\u79CD\u8BBF\u95EE\u901F\u5EA6\u6BD4\u5185\u5B58\u5FEB\u5F88\u591A\u7684\u9AD8\u901F\u7F13\u51B2\u5B58\u50A8\u5668\uFF0C\u7528\u6765\u5B58\u653E\u5F53\u524D\u8BBF\u95EE\u7684\u82E5\u5E72\u9875\u8868\u9879\uFF0C\u4EE5\u52A0\u901F\u5730\u5740\u53D8\u6362\u7684\u8FC7\u7A0B\uFF0C\u4E0E\u6B64\u5BF9\u5E94\uFF0C\u5185\u5B58\u4E2D\u7684\u9875\u8868\u5E38\u79F0\u4E3A\u6162\u8868\u3002

                                                                        \u9875\u53F7\u3001\u9875\u8868\u8D77\u59CB\u5730\u5740\u548C\u9875\u8868\u9879\u5927\u5C0F\u53EF\u4EE5\u5F97\u5230\u9875\u53F7P\u5BF9\u5E94\u7684\u9875\u8868\u9879\u5730\u5740\uFF01

                                                                      4. \u5728\u67E5\u8BE2\u6162\u8868\u5373\u5185\u5B58\u4E2D\u7684\u9875\u8868\u4E4B\u524D\uFF0C\u4F1A\u5148\u67E5\u8BE2\u5FEB\u8868\uFF0C\u7406\u89E3\u4E3A\u7F13\u5B58

                                                                        image-20211220184619310

                                                                        \u82E5\u5FEB\u8868\u547D\u4E2D\uFF0C\u5C31\u4E0D\u9700\u8981\u518D\u8BBF\u95EE\u5185\u5B58\u4E86\uFF0C\u67E5\u8BE2\u5FEB\u8868\u6BD4\u5185\u5B58\u5FEB

                                                                      5. \u5F15\u5165\u5FEB\u8868\u540E\uFF0C\u5730\u5740\u7684\u53D8\u6362\u8FC7\u7A0B

                                                                        image-20211220184944890

                                                                      6. \u7531\u4E8E\u67E5\u8BE2\u5FEB\u8868\u7684\u901F\u5EA6\u6BD4\u67E5\u8BE2\u9875\u8868\uFF08\u6162\u8868\uFF09\u7684\u901F\u5EA6\u5FEB\u5F88\u591A\uFF0C\u56E0\u6B64\u53EA\u8981\u5FEB\u8868\u547D\u4E2D\uFF0C\u5C31\u53EF\u4EE5\u8282\u7701\u5F88\u591A\u65F6\u95F4\uFF0C\u7531\u4E8E\u5C40\u90E8\u6027\u539F\u7406\uFF0C\u4E00\u822C\u6765\u8BF4\u5FEB\u8868\u7684\u547D\u4E2D\u7387\u53EF\u4EE5\u8FBE\u523090%\u4EE5\u4E0A\u3002

                                                                      7. \u5BF9\u6BD4

                                                                        image-20211220185327397

                                                                      \u4E24\u7EA7\u9875\u8868
                                                                      1. \u5355\u7EA7\u9875\u8868\u5B58\u5728\u7684\u95EE\u9898

                                                                        • \u95EE\u98981\uFF1A\u9875\u8868\u5FC5\u987B\u8FDE\u7EED\u5B58\u653E\uFF0C\u56E0\u6B64\u5F53\u9875\u8868\u5F88\u5927\u65F6\uFF0C\u9700\u8981\u5360\u7528\u5F88\u591A\u4E2A\u8FDE\u7EED\u7684\u9875\u6846---\u91C7\u7528\u4E24\u7EA7\u9875\u8868\u89E3\u51B3
                                                                        • \u95EE\u98982\uFF1A\u6CA1\u6709\u5FC5\u8981\u8BA9\u6574\u4E2A\u9875\u8868\u5E38\u9A7B\u5185\u5B58\uFF0C\u56E0\u4E3A\u8FDB\u7A0B\u5728\u4E00\u6BB5\u65F6\u95F4\u5185\u53EF\u80FD\u53EA\u9700\u8BBF\u95EE\u67D0\u51E0\u4E2A\u7279\u5B9A\u7684\u9875\u9762\u3002

                                                                        \u6211\u4EEC\u662F\u5982\u4F55\u89E3\u51B3\u8FDB\u7A0B\u5728\u5185\u5B58\u4E2D\u5FC5\u987B\u8FDE\u7EED\u5B58\u50A8\u7684\u95EE\u9898\u7684\uFF1F

                                                                        \u5C06\u4E00\u4E2A\u8FDB\u7A0B\u5206\u6563\u5730\u88C5\u5165\u5230\u8BB8\u591A\u4E0D\u76F8\u90BB\u7684\u5206\u533A\u4E2D\uFF0C\u4FBF\u53EF\u5145\u5206\u5730\u5229\u7528\u5185\u5B58

                                                                        \u540C\u6837\uFF0C\u6211\u4EEC\u53EF\u4EE5\u5C06\u5F88\u957F\u7684\u9875\u8868\u5206\u7EC4\uFF0C\u4F7F\u6BCF\u4E00\u4E2A\u5185\u5B58\u5757\u521A\u597D\u53EF\u4EE5\u653E\u5165\u4E00\u4E2A\u5206\u7EC4\uFF0C\u4E4B\u524D\u662F\u5C06\u8FDB\u7A0B\u5206\u6210\u5F88\u591A\u4E2A\u9875\u9762\uFF0C\u76F8\u5F53\u4E8E\u5C06\u8FDB\u7A0B\u5206\u7EC4\uFF0C\u73B0\u5728\u9875\u8868\u592A\u957F\u4E86\uFF0C\u90A3\u4E48\u5C31\u5C06\u9875\u8868\u5206\u7EC4\u3002

                                                                        \u53E6\u5916\uFF0C\u8981\u4E3A\u79BB\u6563\u5206\u914D\u7684\u9875\u8868\u518D\u5EFA\u7ACB\u4E00\u5F20\u9875\u8868\uFF0C\u79F0\u4E3A\u9875\u76EE\u5F55\u8868\uFF0C\u6216\u79F0\u5916\u5C42\u9875\u8868\uFF0C\u6216\u79F0\u9876\u5C42\u9875\u8868\u3002

                                                                        \u901A\u8FC7\u9875\u76EE\u5F55\u8868\u548C\u9875\u53F7\uFF0C\u627E\u5230\u5185\u5B58\u5757\u53F7\uFF0C\u901A\u8FC7\u6B64\u5185\u5B58\u5757\u53F7\u5F97\u5230\u6B64\u5185\u5B58\u5757\u5BF9\u5E94\u7684\u4E8C\u7EA7\u9875\u8868\u7684\u8D77\u59CB\u5730\u5740

                                                                      2. \u6162\u8868\u4E5F\u5C31\u662F\u5185\u5B58\u4E2D\u7684\u9875\u8868\uFF0C\u5F53\u7136\u662F\u5B58\u50A8\u5728\u5185\u5B58\u4E2D\u7684\uFF0C\u9875\u8868\u8D77\u59CB\u5730\u5740\u548C\u9875\u8868\u957F\u5EA6\u5B58\u5728\u9875\u8868\u5BC4\u5B58\u5668\u4E2D\uFF0C\u8FDB\u7A0B\u8FD0\u884C\u7684\u65F6\u5019\u5B58\u50A8\u5728\u9875\u8868\u5BC4\u5B58\u5668\u4E2D\uFF0C\u6CA1\u6709\u88ABCPU\u6267\u884C\u7684\u65F6\u5019\uFF0C\u5B58\u50A8\u5728PCB\u4E2D\uFF0C\u6240\u4EE5\u9875\u8868\u5B58\u50A8\u5728\u5185\u5B58\u4E2D\uFF0C\u5F53\u7136\u6D89\u53CA\u5230\u8D77\u59CB\u5730\u5740\uFF0C\u8FD9\u4E2A\u5730\u5740\u5B58\u50A8\u5728\u9875\u8868\u5BC4\u5B58\u5668\u3002

                                                                        \u5FEB\u8868\u4E0D\u662F\u5B58\u50A8\u5728\u5185\u5B58\u4E2D\u7684\uFF0C\u8BBF\u95EE\u5FEB\u8868\u7684\u901F\u5EA6\u6BD4\u5185\u5B58\u5FEB\u5F88\u591A\uFF0C\u662F\u9AD8\u901F\u7F13\u51B2\u5B58\u50A8\u5668\u3002

                                                                      3. \u95EE\u98982\u7684\u89E3\u51B3\uFF1A

                                                                        \u53EF\u4EE5\u5728\u9700\u8981\u8BBF\u95EE\u9875\u9762\u65F6\u624D\u628A\u9875\u9762\u8C03\u5165\u5185\u5B58\uFF08\u865A\u62DF\u5B58\u50A8\u6280\u672F\uFF0C\u9875\u9762\u662F\u7531\u8FDB\u7A0B\u5206\u5272\u800C\u6765\u7684\uFF0C\u628A\u8FDB\u7A0B\u5206\u6210\u5F88\u591A\u4E2A\u90E8\u5206\uFF09\uFF0C\u76F8\u5F53\u4E8E\u9700\u8981\u8FDB\u7A0B\u67D0\u4E2A\u90E8\u5206\u65F6\uFF0C\u624D\u628A\u8FD9\u90E8\u5206\u8C03\u5165\u5185\u5B58\uFF0C\u8FDB\u7A0B\u5206\u7684\u90E8\u5206\u5C31\u53EB\u9875\u9762\uFF0C\u5185\u5B58\u5206\u7684\u90E8\u5206\u5C31\u53EB\u9875\u6846\uFF0C\u53EF\u4EE5\u5728\u9875\u8868\u9879\u4E2D\u589E\u52A0\u4E00\u4E2A\u6807\u5FD7\u4F4D\uFF0C\u7528\u4E8E\u8868\u793A\u8BE5\u9875\u9762\u662F\u5426\u5DF2\u7ECF\u8C03\u5165\u5185\u5B58\u3002

                                                                        \u82E5\u60F3\u8BBF\u95EE\u7684\u9875\u9762\u4E0D\u5728\u5185\u5B58\u4E2D\uFF0C\u5219\u4EA7\u751F\u7F3A\u9875\u4E2D\u65AD\uFF08\u5185\u4E2D\u65AD\uFF0C\u5185\u4E2D\u65AD\u5206\u4E3A\u81EA\u613F\u4E2D\u65AD\u3001\u786C\u4EF6\u6545\u969C\u3001\u8F6F\u4EF6\u4E2D\u65AD\uFF09\uFF0C\u7136\u540E\u5C06\u76EE\u6807\u9875\u9762\u4ECE\u5916\u5B58\u8C03\u5165\u5185\u5B58\u3002

                                                                      4. \u4E24\u7EA7\u9875\u8868\u7684\u8BBF\u5B58\u6B21\u6570\u5206\u6790\uFF1A\uFF08\u5047\u8BBE\u6CA1\u6709\u5FEB\u8868\u673A\u6784\uFF09

                                                                        • \u7B2C\u4E00\u6B21\u8BBF\u5B58\uFF1A\u8BBF\u95EE\u5185\u5B58\u4E2D\u7684\u9875\u76EE\u5F55\u8868
                                                                        • \u7B2C\u4E8C\u6B21\u8BBF\u5B58\uFF1A\u8BBF\u95EE\u5185\u5B58\u4E2D\u7684\u4E8C\u7EA7\u9875\u8868
                                                                        • \u7B2C\u4E09\u6B21\u8BBF\u5B58\uFF1A\u8BBF\u95EE\u76EE\u6807\u5185\u5B58\u5355\u5143
                                                                      5. \u5982\u4F55\u5B9E\u73B0\u5730\u5740\u53D8\u6362

                                                                        • \u6309\u7167\u5730\u5740\u7ED3\u6784\u5C06\u903B\u8F91\u5730\u5740\u5206\u4E3A\u4E09\u90E8\u5206
                                                                        • \u4ECEPCB\u4E2D\u8BFB\u51FA\u9875\u76EE\u5F55\u8868\u8D77\u59CB\u5730\u5740\uFF08\u9875\u76EE\u5F55\u8868\u4E5F\u662F\u5728\u5185\u5B58\u4E2D\u7684\uFF0C\u5F53\u7136\u6709\u8D77\u59CB\u5730\u5740\uFF09\uFF0C\u6839\u636E\u4E00\u7EA7\u9875\u53F7\u67E5\u627E\u5230\u5757\u53F7\uFF0C\u6839\u636E\u5185\u5B58\u5757\u53F7\u627E\u5230\u4E0B\u4E00\u7EA7\u9875\u8868\u5728\u5185\u5B58\u4E2D\u7684\u5B58\u653E\u4F4D\u7F6E\uFF08\u8D77\u59CB\u5730\u5740\uFF09
                                                                        • \u6839\u636E\u4E8C\u7EA7\u9875\u53F7\u67E5\u8868\uFF0C\u627E\u5230\u6700\u7EC8\u60F3\u8BBF\u95EE\u7684\u5185\u5B58\u5757\u53F7
                                                                        • \u7ED3\u5408\u9875\u5185\u504F\u79FB\u91CF\u5F97\u5230\u7269\u7406\u5730\u5740\u3002

                                                                      \u57FA\u672C\u5206\u6BB5\u5B58\u50A8\u7BA1\u7406

                                                                      \u4ECB\u7ECD
                                                                      1. \u5206\u6BB5\uFF1A

                                                                        \u8FDB\u7A0B\u7684\u5730\u5740\u7A7A\u95F4\uFF0C\u6309\u7167\u7A0B\u5E8F\u81EA\u8EAB\u7684\u903B\u8F91\u5173\u7CFB\u5212\u5206\u4E3A\u82E5\u5E72\u4E2A\u6BB5\uFF0C\u6BCF\u4E2A\u6BB5\u90FD\u6709\u4E00\u4E2A\u6BB5\u540D

                                                                      2. \u5185\u5B58\u5206\u914D\u89C4\u5219\uFF1A\u4EE5\u6BB5\u4E3A\u5355\u4F4D\u8FDB\u884C\u5206\u914D\uFF0C\u6BCF\u4E2A\u6BB5\u5728\u5185\u5B58\u4E2D\u5360\u636E\u8FDE\u7EED\u7A7A\u95F4\uFF0C\u4F46\u5404\u6BB5\u4E4B\u95F4\u53EF\u4EE5\u4E0D\u76F8\u90BB

                                                                      3. \u5206\u6BB5\u7CFB\u7EDF\u7684\u903B\u8F91\u5730\u5740\u7ED3\u6784\u7531\u6BB5\u53F7\uFF08\u6BB5\u540D\uFF09\u548C\u6BB5\u5185\u5730\u5740\uFF08\u6BB5\u5185\u504F\u79FB\u91CF\uFF09\u7EC4\u6210

                                                                        \u6BB5\u53F7\u7684\u4F4D\u6570\u51B3\u5B9A\u4E86\u6BCF\u4E2A\u8FDB\u7A0B\u6700\u591A\u53EF\u4EE5\u5206\u4E3A\u51E0\u4E2A\u6BB5

                                                                        \u6BB5\u5185\u5730\u5740\u4F4D\u6570\u51B3\u5B9A\u4E86\u6BCF\u4E2A\u6BB5\u7684\u6700\u5927\u957F\u5EA6\u662F\u591A\u5C11

                                                                      4. \u64CD\u4F5C\u7CFB\u7EDF\u9700\u8981\u4E3A\u6BCF\u4E2A\u8FDB\u7A0B\u5EFA\u7ACB\u4E00\u5F20\u6BB5\u6620\u5C04\u8868\uFF0C\u7B80\u79F0\u6BB5\u8868

                                                                      5. \u5728\u5206\u9875\u5B58\u50A8\u7BA1\u7406\u5F53\u4E2D\uFF0C\u6BCF\u4E2A\u9875\u9762\u7684\u957F\u5EA6\u90FD\u662F\u4E00\u6837\u7684\uFF0C\u4F46\u662F\u5206\u6BB5\u5B58\u50A8\u7BA1\u7406\u4E2D\uFF0C\u6BCF\u4E2A\u6BB5\u7684\u957F\u5EA6\u662F\u4E0D\u4E00\u6837\u7684\uFF0C\u6240\u4EE5\u6BB5\u8868\u9879\u6BD4\u9875\u8868\u9879\u591A\u4E86\u4E00\u4E2A\u6BB5\u957F

                                                                      6. \u6BCF\u4E2A\u6BB5\u5BF9\u5E94\u4E00\u4E2A\u6BB5\u8868\u9879\uFF0C\u5C31\u50CF\u4E00\u4E2A\u8FDB\u7A0B\u5BF9\u5E94\u4E8E\u4E00\u4E2A\u9875\u8868\uFF0C\u8FDB\u7A0B\u7684\u6BCF\u4E00\u9875\u5BF9\u5E94\u4E8E\u4E00\u4E2A\u9875\u8868\u9879\uFF01\uFF01

                                                                        \u4E00\u4E2A\u6BB5\u8868\u9879\uFF0C\u8BB0\u5F55\u4E86\u8BE5\u6BB5\u5728\u5185\u5B58\u4E2D\u7684\u8D77\u59CB\u4F4D\u7F6E\uFF08\u57FA\u5740\uFF09\u548C\u6BB5\u7684\u957F\u5EA6

                                                                      7. \u5404\u4E2A\u6BB5\u8868\u9879\u548C\u5404\u4E2A\u9875\u8868\u9879\u7684\u957F\u5EA6\u662F\u76F8\u540C\u7684\u3002

                                                                        \u56E0\u6B64\u6BB5\u53F7\u548C\u9875\u53F7\u53EF\u4EE5\u662F\u9690\u542B\u7684\uFF0C\u4E0D\u5360\u5B58\u50A8\u7A7A\u95F4\u3002

                                                                      8. \u5730\u5740\u53D8\u6362\u7684\u8FC7\u7A0B\uFF1A

                                                                        image-20211220210600944

                                                                      9. \u5206\u9875\u7684\u4E3B\u8981\u76EE\u7684\u662F\u4E3A\u4E86\u5B9E\u73B0\u79BB\u6563\u5206\u914D\uFF0C\u63D0\u9AD8\u5185\u5B58\u5229\u7528\u7387\uFF0C\u5206\u9875\u4EC5\u4EC5\u662F\u7CFB\u7EDF\u7BA1\u7406\u4E0A\u7684\u9700\u8981\uFF0C\u5B8C\u5168\u662F\u7CFB\u7EDF\u884C\u4E3A\uFF0C\u5BF9\u7528\u6237\u662F\u4E0D\u53EF\u89C1\u7684\u3002

                                                                        \u5206\u6BB5\u7684\u4E3B\u8981\u76EE\u7684\u662F\u4E3A\u4E86\u66F4\u597D\u5730\u6EE1\u8DB3\u7528\u6237\u9700\u6C42\uFF0C\u4E00\u4E2A\u6BB5\u901A\u5E38\u5305\u542B\u7740\u4E00\u7EC4\u5C5E\u4E8E\u4E00\u4E2A\u903B\u8F91\u6A21\u5757\u7684\u4FE1\u606F\uFF0C\u5206\u6BB5\u5BF9\u7528\u6237\u662F\u53EF\u89C1\u7684\uFF0C\u7528\u6237\u7F16\u7A0B\u65F6\u9700\u8981\u663E\u5F0F\u5730\u7ED9\u51FA\u6BB5\u540D\u3002

                                                                        \u9875\u7684\u5927\u5C0F\u56FA\u5B9A\uFF0C\u6BB5\u7684\u957F\u5EA6\u4E0D\u56FA\u5B9A\uFF0C\u51B3\u5B9A\u4E8E\u7528\u6237\u7F16\u5199\u7684\u7A0B\u5E8F\u3002

                                                                      10. \u4E0D\u80FD\u88AB\u4FEE\u6539\u7684\u4EE3\u7801\u79F0\u4E3A\u7EAF\u4EE3\u7801\u6216\u53EF\u91CD\u5165\u4EE3\u7801\uFF0C\u4E0D\u5C5E\u4E8E\u4E34\u754C\u8D44\u6E90\uFF0C\u8FD9\u6837\u7684\u4EE3\u7801\u662F\u53EF\u4EE5\u5171\u4EAB\u7684\uFF0C\u76F8\u5F53\u4E8E\u53EA\u8BFB\u3002

                                                                        \u53EF\u4FEE\u6539\u7684\u4EE3\u7801\u662F\u4E0D\u80FD\u5171\u4EAB\u7684

                                                                        \u5206\u6BB5\u6BD4\u5206\u9875\u66F4\u5BB9\u6613\u5B9E\u73B0\u4FE1\u606F\u7684\u5171\u4EAB\u548C\u4FDD\u62A4\u3002

                                                                      11. \u4E0E\u5206\u9875\u7CFB\u7EDF\u7C7B\u4F3C\uFF0C\u5206\u6BB5\u7CFB\u7EDF\u4E2D\u9875\u53EF\u4EE5\u5F15\u5165\u5FEB\u8868\u673A\u6784\uFF0C\u5C06\u8FD1\u671F\u8BBF\u95EE\u8FC7\u7684\u6BB5\u8868\u9879\u653E\u5230\u5FEB\u8868\u4E2D

                                                                      \u6BB5\u9875\u5F0F\u7BA1\u7406\u65B9\u5F0F

                                                                      1. \u5206\u9875\u3001\u5206\u6BB5\u7684\u4F18\u7F3A\u70B9\u5206\u6790

                                                                        \u7F3A\u70B9\u4F18\u70B9
                                                                        \u5206\u9875\u7BA1\u7406\u4E0D\u65B9\u4FBF\u6309\u7167\u903B\u8F91\u6A21\u5757\u5B9E\u73B0\u4FE1\u606F\u7684\u5171\u4EAB\u548C\u4FDD\u62A4\u5185\u5B58\u7A7A\u95F4\u5229\u7528\u7387\u9AD8\uFF0C\u4E0D\u4F1A\u4EA7\u751F\u5916\u90E8\u788E\u7247\uFF0C\u53EA\u6709\u5C11\u91CF\u7684\u5185\u90E8\u788E\u7247
                                                                        \u5206\u6BB5\u7BA1\u7406\u5982\u679C\u6BB5\u957F\u8FC7\u5927\uFF0C\u4E3A\u5176\u5206\u914D\u5F88\u5927\u7684\u8FDE\u7EED\u7A7A\u95F4\u4F1A\u5F88\u4E0D\u65B9\u4FBF\uFF0C\u53E6\u5916\uFF0C\u6BB5\u5F0F\u7BA1\u7406\u4F1A\u4EA7\u751F\u5916\u90E8\u788E\u7247\u5F88\u65B9\u4FBF\u6309\u7167\u903B\u8F91\u6A21\u5757\u5B9E\u73B0\u4FE1\u606F\u7684\u5171\u4EAB\u548C\u4FDD\u62A4
                                                                      2. image-20211220212626340

                                                                      3. \u5206\u6BB5\u7CFB\u7EDF\u7684\u903B\u8F91\u5730\u5740\u7ED3\u6784\u7531\u6BB5\u53F7\u548C\u6BB5\u5185\u5730\u5740\uFF08\u6BB5\u5185\u504F\u79FB\u91CF\uFF09\u7EC4\u6210

                                                                        image-20211220212723931

                                                                        \u6BB5\u9875\u5F0F\u7CFB\u7EDF\u7684\u903B\u8F91\u5730\u5740\u7ED3\u6784\u7531\u6BB5\u53F7\u3001\u9875\u53F7\u3001\u9875\u5185\u5730\u5740\uFF08\u9875\u5185\u504F\u79FB\u91CF\uFF09\u7EC4\u6210

                                                                        image-20211220212746790

                                                                        \u6BB5\u53F7\u7684\u4F4D\u6570\u51B3\u5B9A\u4E86\u6BCF\u4E2A\u8FDB\u7A0B\u6700\u591A\u53EF\u4EE5\u5206\u51E0\u4E2A\u6BB5

                                                                        \u9875\u53F7\u4F4D\u6570\u51B3\u5B9A\u4E86\u6BCF\u4E2A\u6BB5\u6700\u5927\u6709\u591A\u5C11\u9875

                                                                      4. \u903B\u8F91\u5730\u5740\u5230\u7269\u7406\u5730\u5740\u7684\u8F6C\u6362

                                                                        image-20211220213646069

                                                                      \u865A\u62DF\u5185\u5B58

                                                                      \u6982\u5FF5

                                                                      1. \u5185\u5B58\u7A7A\u95F4\u7684\u6269\u5145\uFF1A

                                                                        • \u8986\u76D6\u6280\u672F

                                                                        • \u4EA4\u6362\u6280\u672F\uFF08\u901A\u8FC7\u5904\u7406\u673A\u8C03\u5EA6\u7684\u4E2D\u7EA7\u8C03\u5EA6\u5B9E\u73B0\uFF09

                                                                        • \u865A\u62DF\u5B58\u50A8\u6280\u672F\uFF08\u7528\u5230\u8FDB\u7A0B\u7684\u67D0\u4E00\u90E8\u5206\uFF0C\u624D\u8C03\u5165\u5185\u5B58\uFF0C\u6309\u9875\u8C03\u5165\u5185\u5B58\uFF09

                                                                          \u53EF\u4EE5\u5728\u9700\u8981\u8BBF\u95EE\u9875\u9762\u65F6\uFF0C\u624D\u628A\u9875\u9762\u8C03\u5165\u5185\u5B58\u3002

                                                                      2. \u4F20\u7EDF\u5B58\u50A8\u7BA1\u7406\u65B9\u5F0F

                                                                        image-20211221154032346

                                                                        \u7279\u5F81\uFF1A

                                                                        • \u4E00\u6B21\u6027\uFF1A\u4F5C\u4E1A\u5FC5\u987B\u4E00\u6B21\u6027\u5168\u90E8\u88C5\u5165\u5185\u5B58\u540E\u624D\u80FD\u5F00\u59CB\u8FD0\u884C

                                                                          \u4F5C\u4E1A\u5F88\u5927\u65F6\uFF0C\u4E0D\u80FD\u5168\u90E8\u88C5\u5165\u5185\u5B58\uFF0C\u5BFC\u81F4\u5927\u4F5C\u4E1A\u65E0\u6CD5\u8FD0\u884C\uFF1B

                                                                          \u5F53\u5927\u91CF\u4F5C\u4E1A\u8981\u6C42\u8FD0\u884C\u65F6\uFF0C\u7531\u4E8E\u5185\u5B58\u65E0\u6CD5\u5BB9\u7EB3\u6240\u6709\u4F5C\u4E1A\uFF0C\u56E0\u6B64\u53EA\u6709\u5C11\u91CF\u4F5C\u4E1A\u80FD\u8FD0\u884C\uFF0C\u5BFC\u81F4\u591A\u9053\u7A0B\u5E8F\u5E76\u53D1\u5EA6\u4E0B\u964D\u3002

                                                                        • **\u9A7B\u7559\u6027\uFF1A\u4E00\u65E6\u4F5C\u4E1A\u88AB\u88C5\u5165\u5185\u5B58\uFF0C\u5C31\u4F1A\u4E00\u76F4\u9A7B\u7559\u5728\u5185\u5B58\u4E2D\uFF0C\u76F4\u81F3\u4F5C\u4E1A\u8FD0\u884C\u7ED3\u675F\u3002**\u4E8B\u5B9E\u4E0A\uFF0C\u5728\u4E00\u4E2A\u65F6\u95F4\u6BB5\u5185\uFF0C\u53EA\u9700\u8981\u8BBF\u95EE\u4F5C\u4E1A\u7684\u4E00\u5C0F\u90E8\u5206\u6570\u636E\u5373\u53EF\u6B63\u5E38\u8FD0\u884C\uFF0C\u8FD9\u5C31\u5BFC\u81F4\u4E86\u5185\u5B58\u4E2D\u4F1A\u9A7B\u7559\u5927\u91CF\u7684\u3001\u6682\u65F6\u7528\u4E0D\u5230\u7684\u6570\u636E\u3002

                                                                      3. \u9AD8\u901F\u7F13\u51B2\u6280\u672F\u7684\u601D\u60F3\uFF1A

                                                                        \u5C06\u8FD1\u671F\u4F1A\u9891\u7E41\u8BBF\u95EE\u5230\u7684\u6570\u636E\u653E\u5230\u66F4\u9AD8\u901F\u7684\u5B58\u50A8\u5668\u4E2D\uFF0C\u6682\u65F6\u7528\u4E0D\u5230\u7684\u6570\u636E\u653E\u5728\u66F4\u4F4E\u901F\u5B58\u50A8\u5668\u4E2D

                                                                        image-20211221154907782

                                                                        \u5FEB\u8868\u673A\u6784\u5C31\u662F\u5C06\u8FD1\u671F\u5E38\u8BBF\u95EE\u7684\u9875\u8868\u9879\u526F\u672C\u653E\u5230\u66F4\u9AD8\u901F\u7684\u9AD8\u901F\u7F13\u51B2\u5BC4\u5B58\u5668\u4E2D

                                                                      4. \u57FA\u4E8E\u5C40\u90E8\u6027\u539F\u7406\uFF0C\u5728\u7A0B\u5E8F\u88C5\u5165\u65F6\uFF0C\u53EF\u4EE5\u5C06\u7A0B\u5E8F\u4E2D\u5F88\u5FEB\u4F1A\u7528\u5230\u7684\u90E8\u5206\u88C5\u5165\u5185\u5B58\uFF0C\u6682\u65F6\u7528\u4E0D\u5230\u7684\u90E8\u5206\u7559\u5728\u5916\u5B58\uFF0C\u5C31\u53EF\u4EE5\u8BA9\u7A0B\u5E8F\u5F00\u59CB\u6267\u884C\u3002

                                                                        \u5728\u7A0B\u5E8F\u6267\u884C\u8FC7\u7A0B\u4E2D\uFF0C\u5F53\u6240\u8BBF\u95EE\u7684\u4FE1\u606F\u4E0D\u5728\u5185\u5B58\u65F6\uFF0C\u7531\u64CD\u4F5C\u7CFB\u7EDF\u8D1F\u8D23\u5C06\u6240\u9700\u4FE1\u606F\u4ECE\u5916\u5B58\u8C03\u5165\u5185\u5B58\uFF0C\u7136\u540E\u7EE7\u7EED\u6267\u884C\u7A0B\u5E8F\u3002\uFF08\u5F53\u6240\u8BBF\u95EE\u7684\u4FE1\u606F\u4E0D\u5728\u5185\u5B58\u65F6\uFF0C\u8BF4\u660E\u7F3A\u9875\uFF0C\u5C31\u662F\u7F3A\u5C11\u8FDB\u7A0B\u7684\u67D0\u4E00\u90E8\u5206\uFF0C\u8FDB\u7A0B\u5206\u5272\u4E3A\u9875\u9762\uFF0C\u7F3A\u5C11\u5C31\u65F6\u7F3A\u9875\uFF0C\u90A3\u4E48\u4F1A\u53D1\u751F\u7F3A\u9875\u4E2D\u65AD\uFF0C\u8FD9\u662F\u5185\u4E2D\u65AD\uFF0C\u5C5E\u4E8E\u786C\u4EF6\u4E2D\u65AD\uFF0C\u4E2D\u65AD\u4E4B\u540E\uFF0C\u4F1A\u4F7FCPU\u7ACB\u5373\u8FDB\u5165\u5185\u6838\u6001\uFF0C\u5C06\u6267\u884C\u6743\u7531\u7528\u6237\u8FDB\u7A0B\u4EA4\u7ED9\u64CD\u4F5C\u7CFB\u7EDF\uFF0C\u64CD\u4F5C\u7CFB\u7EDF\u628A\u9700\u8981\u7684\u9875\u9762\u5373\u8FDB\u7A0B\u7684\u67D0\u4E00\u90E8\u5206\u8C03\u5165\u5185\u5B58\uFF0C\u8FD9\u5C31\u662F\u4E2D\u65AD\uFF0C\u4E2D\u65AD\u5C31\u662F\u5C06\u6267\u884C\u6743\u4EA4\u7ED9\u64CD\u4F5C\u7CFB\u7EDF\uFF0C\u64CD\u4F5C\u7CFB\u7EDF\u6267\u884C\u76F8\u5E94\u7684\u8FC7\u7A0B\u6765\u6EE1\u8DB3\u7A0B\u5E8F\u8FD0\u884C\u3002\u50CF\u8FDB\u7A0B\u8FD0\u884C\u65F6\u6267\u884C\u9677\u5165\u6307\u4EE4\u53D1\u751F\u81EA\u613F\u4E2D\u65AD\uFF0C\u56E0\u4E3A\u6D89\u53CA\u5230\u7CFB\u7EDF\u8C03\u7528\uFF0C\u9700\u8981\u64CD\u4F5C\u7CFB\u7EDF\u6765\u5B8C\u6210\u67D0\u4E9B\u4E8B\u60C5\uFF0C\u4E5F\u662F\u540C\u7406\u3002\u539F\u8BED\u662F\u901A\u8FC7\u5173\u4E2D\u65AD\u548C\u5F00\u4E2D\u65AD\u6765\u5B8C\u6210\uFF0C\u7EA7\u522B\u5F88\u9AD8\uFF0C\u5FC5\u987B\u5728\u5185\u6838\u6001\u8FDB\u884C\u3002\uFF09

                                                                        \u82E5\u5185\u5B58\u7A7A\u95F4\u4E0D\u591F\uFF0C\u7531\u64CD\u4F5C\u7CFB\u7EDF\u8D1F\u8D23\u5C06\u5185\u5B58\u4E2D\u6682\u65F6\u7528\u4E0D\u5230\u7684\u4FE1\u606F\u6362\u51FA\u5230\u5916\u5B58\u3002\u5C31\u662F\u6302\u8D77\uFF0C\u4E4B\u524D\u8BB2\u7684\u4E2D\u7EA7\u8C03\u5EA6\uFF0C\u5C31\u662F\u5B8C\u6210\u4EA4\u6362\u3002\u4EA4\u6362\u51FA\u7684\u8FDB\u7A0B\u4F1A\u653E\u5230\u78C1\u76D8\u7684\u4EA4\u6362\u533A\u800C\u4E0D\u662F\u6587\u4EF6\u533A\u3002\u5185\u5B58\u53C8\u5206\u4E3A\u7CFB\u7EDF\u533A\u548C\u7528\u6237\u533A\u3002\u4F46\u662F\u4EA4\u6362\u6280\u672F\uFF0C\u8BB2\u7684\u662F\u8FDB\u7A0B\u4E4B\u95F4\uFF0C\u4EA4\u6362\u7684\u662F\u8FDB\u7A0B\uFF0C\u8FD9\u91CC\u7684\u8BB2\u5185\u5B58\u4E2D\u6682\u65F6\u7528\u4E0D\u5230\u7684\u4FE1\u606F\u6362\u51FA\uFF0C\u6307\u7684\u662F\u8FDB\u7A0B\u5185\u90E8\u7684\u9875\u9762\uFF0C\u662F\u5C5E\u4E8E\u8FDB\u7A0B\u5185\u800C\u4E0D\u662F\u8FDB\u7A0B\u95F4\u3002

                                                                        \u5728\u64CD\u4F5C\u7CFB\u7EDF\u7684\u7BA1\u7406\u4E0B\uFF0C\u5728\u7528\u6237\u770B\u6765\u4F3C\u4E4E\u6709\u4E00\u4E2A\u6BD4\u5B9E\u9645\u5185\u5B58\u5927\u5F97\u591A\u7684\u5185\u5B58\uFF0C\u8FD9\u5C31\u662F\u865A\u62DF\u5185\u5B58\u3002

                                                                        \u64CD\u4F5C\u7CFB\u7EDF\u865A\u62DF\u6027\uFF0C\u5C31\u662F\u5B9E\u9645\u7684\u7269\u7406\u5185\u5B58\u5927\u5C0F\u6CA1\u6709\u53D8\uFF0C\u53EA\u662F\u5728\u903B\u8F91\u4E0A\u8FDB\u884C\u4E86\u6269\u5145\u3002

                                                                        \u4E5F\u5C31\u662F\u5185\u5B58\u4E2D\u7684\u8FDB\u7A0B\u53EA\u662F\u8FD9\u4E2A\u8FDB\u7A0B\u7684\u67D0\u4E00\u4E9B\u9875\u9762\uFF0C\u800C\u4E0D\u662F\u4E00\u4E2A\u5B8C\u6574\u7684\u8FDB\u7A0B\uFF0C\u901A\u8FC7\u8C03\u5165\u8C03\u51FA\u9875\u9762\u6765\u5B8C\u6210\u6574\u4E2A\u8FDB\u7A0B\u7684\u6267\u884C\u3002

                                                                      5. \u865A\u62DF\u5185\u5B58\u7684\u7279\u5F81\uFF1A

                                                                        • \u591A\u6B21\u6027\uFF1A\u65E0\u9700\u5728\u4F5C\u4E1A\u8FD0\u884C\u65F6\uFF0C\u4E00\u6B21\u6027\u5168\u90E8\u88C5\u5165\u5185\u5B58\uFF0C\u800C\u662F\u5141\u8BB8\u88AB\u5206\u6210\u591A\u6B21\u8C03\u5165\u5185\u5B58
                                                                        • \u5BF9\u6362\u6027\uFF1A\u5728\u4F5C\u4E1A\u8FD0\u884C\u65F6\u65E0\u9700\u4E00\u76F4\u5E38\u9A7B\u5185\u5B58\uFF0C\u800C\u662F\u5141\u8BB8\u5728\u4F5C\u4E1A\uFF08\u8FDB\u7A0B\uFF09\u8FD0\u884C\u8FC7\u7A0B\u4E2D\uFF0C\u5C06\u4F5C\u4E1A\uFF08\u8FDB\u7A0B\u7684\u67D0\u4E9B\u6682\u65F6\u7528\u4E0D\u5230\u7684\u9875\u9762\uFF09\u6362\u5165\u3001\u6362\u51FA\u3002
                                                                        • \u865A\u62DF\u6027\uFF1A\u4ECE\u903B\u8F91\u4E0A\u6269\u5145\u5185\u5B58\u7684\u5BB9\u91CF\uFF0C\u4F7F\u7528\u6237\u770B\u5230\u7684\u5185\u5B58\u5BB9\u91CF\u8FDC\u5927\u4E8E\u5B9E\u9645\u7684\u5BB9\u91CF\u3002
                                                                      6. \u865A\u62DF\u5185\u5B58\u6280\u672F\uFF0C\u5141\u8BB8\u4E00\u4E2A\u4F5C\u4E1A\u5206\u591A\u6B21\u8C03\u5165\u5185\u5B58\uFF0C\u5982\u679C\u91C7\u7528\u8FDE\u7EED\u5206\u914D\u65B9\u5F0F\uFF0C\u4F1A\u4E0D\u65B9\u4FBF\u5B9E\u73B0\uFF0C\u56E0\u6B64\uFF0C\u865A\u62DF\u5185\u5B58\u7684\u5B9E\u73B0\u9700\u8981\u5EFA\u7ACB\u5728\u79BB\u6563\u5206\u914D\u7684\u5185\u5B58\u7BA1\u7406\u65B9\u5F0F\u57FA\u7840\u4E0A\u3002

                                                                      7. \u64CD\u4F5C\u7CFB\u7EDF\u9700\u8981\u63D0\u4F9B\u8BF7\u6C42\u8C03\u9875\uFF08\u8BF7\u6C42\u8C03\u6BB5\uFF09\u529F\u80FD

                                                                        \u64CD\u4F5C\u7CFB\u7EDF\u9700\u8981\u63D0\u4F9B\u9875\u9762\u7F6E\u6362\uFF08\u6216\u6BB5\u7F6E\u6362\uFF09\u529F\u80FD

                                                                      \u8BF7\u6C42\u5206\u9875\u5B58\u50A8\u7BA1\u7406\u65B9\u5F0F

                                                                      1. \u8BF7\u6C42\u5206\u9875\u5B58\u50A8\u7BA1\u7406\u4E0E\u57FA\u672C\u5206\u9875\u5B58\u50A8\u7BA1\u7406\u7684\u4E3B\u8981\u533A\u522B\uFF1A

                                                                        \u5728\u7A0B\u5E8F\u6267\u884C\u8FC7\u7A0B\u4E2D\uFF0C\u5F53\u6240\u8BBF\u95EE\u7684\u4FE1\u606F\u4E0D\u5728\u5185\u5B58\u65F6\uFF0C\u7531\u64CD\u4F5C\u7CFB\u7EDF\u8D1F\u8D23\u5C06\u6240\u9700\u4FE1\u606F\uFF08\u8FDB\u7A0B\u7684\u9875\u9762\uFF09\u4ECE\u5916\u5B58\u8C03\u5165\u5185\u5B58\uFF0C\u7136\u540E\u7EE7\u7EED\u6267\u884C\u7A0B\u5E8F\u3002

                                                                        \u82E5\u5185\u5B58\u7A7A\u95F4\u4E0D\u591F\uFF0C\u7531\u64CD\u4F5C\u7CFB\u7EDF\u8D1F\u8D23\u5C06\u5185\u5B58\u4E2D\u6682\u65F6\u7528\u4E0D\u5230\u7684\u4FE1\u606F\u6362\u51FA\u5230\u5916\u5B58\u3002

                                                                      2. \u9875\u8868\u673A\u5236\uFF1A

                                                                        \u4E0E\u57FA\u672C\u5206\u9875\u7BA1\u7406\u76F8\u6BD4\uFF0C\u8BF7\u6C42\u5206\u9875\u7BA1\u7406\u4E2D\uFF0C\u4E3A\u4E86\u5B9E\u73B0\u201C\u8BF7\u6C42\u8C03\u9875\u201D\uFF0C\u64CD\u4F5C\u7CFB\u7EDF\u9700\u8981\u77E5\u9053\u6BCF\u4E2A\u9875\u9762\u662F\u5426\u5DF2\u7ECF\u8C03\u5165\u5185\u5B58\uFF1B\u5982\u679C\u8FD8\u6CA1\u8C03\u5165\uFF0C\u90A3\u4E48\u4E5F\u9700\u8981\u77E5\u9053\u8BE5\u9875\u9762\u5728\u5916\u5B58\u4E2D\u5B58\u653E\u7684\u4F4D\u7F6E\u3002

                                                                        \u5F53\u5185\u5B58\u7A7A\u95F4\u4E0D\u591F\u65F6\uFF0C\u8981\u5B9E\u73B0\u9875\u9762\u7F6E\u6362\uFF0C\u64CD\u4F5C\u7CFB\u7EDF\u8981\u901A\u8FC7**\u67D0\u4E9B\u6307\u6807\uFF08\u9875\u9762\u7F6E\u6362\u7B97\u6CD5\uFF09**\u77E5\u9053\u8BE5\u6362\u51FA\u54EA\u4E2A\u9875\u9762\uFF0C\u6709\u7684\u9875\u9762\u6CA1\u6709\u88AB\u4FEE\u6539\u8FC7\uFF0C\u5C31\u4E0D\u9700\u8981\u6D6A\u8D39\u65F6\u95F4\u518D\u5199\u56DE\u5916\u5B58\uFF0C\u6709\u7684\u9875\u9762\u4FEE\u6539\u8FC7\uFF0C\u5C31\u9700\u8981\u5C06\u5916\u5B58\u4E2D\u7684\u65E7\u6570\u636E\u8986\u76D6\uFF0C\u56E0\u6B64\u64CD\u4F5C\u7CFB\u7EDF\u4E5F\u9700\u8981\u8BB0\u5F55\u5404\u4E2A\u9875\u9762\u662F\u5426\u88AB\u4FEE\u6539\u7684\u4FE1\u606F\u3002

                                                                        image-20211221163750995

                                                                        \u8BF7\u6C42\u9875\u8868\u9879\u589E\u52A0\u4E86\u56DB\u4E2A\u5B57\u6BB5

                                                                      3. \u7F3A\u9875\u4E2D\u65AD\u673A\u6784

                                                                        \u5728\u8BF7\u6C42\u5206\u9875\u7CFB\u7EDF\u4E2D\uFF0C\u6BCF\u5F53\u8981\u8BBF\u95EE\u7684\u9875\u9762\u4E0D\u5728\u5185\u5B58\u65F6\uFF0C\u4FBF\u4EA7\u751F\u4E00\u4E2A\u7F3A\u9875\u4E2D\u65AD\uFF0C\u7136\u540E\u7531\u64CD\u4F5C\u7CFB\u7EDF\u7684\u7F3A\u9875\u4E2D\u65AD\u5904\u7406\u7A0B\u5E8F\u5904\u7406\u4E2D\u65AD\u3002\u6B64\u65F6\u662F\u53D1\u751FIO\u64CD\u4F5C\uFF0C\u56E0\u4E3A\u8981\u5C06\u9875\u9762\u4ECE\u5916\u5B58\u8C03\u5165\u5185\u5B58\u3002

                                                                        \u6B64\u65F6\u7F3A\u9875\u7684\u8FDB\u7A0B\u963B\u585E\uFF0C\u653E\u5165\u963B\u585E\u961F\u5217\uFF0C\u8C03\u9875\u5B8C\u6210\u540E\uFF0C\u518D\u5C06\u5176\u5524\u9192\uFF0C\u653E\u56DE\u5C31\u7EEA\u961F\u5217\u3002\u8FD9\u91CC\u8BF4\u7684\u63D2\u5165\u5230\u961F\u5217\u91CC\u7684\u90FD\u662FPCB

                                                                        \u5982\u679C\u5185\u5B58\u4E2D\u6709\u7A7A\u95F2\u5757\uFF0C\u5219\u4E3A\u8FDB\u7A0B\u5206\u914D\u4E00\u4E2A\u7A7A\u95F2\u5757\uFF0C\u5C06\u6240\u7F3A\u9875\u9762\u88C5\u5165\u8BE5\u5757\uFF0C\u5E76\u4FEE\u6539\u9875\u8868\u4E2D\u76F8\u5E94\u7684\u9875\u8868\u9879\u3002

                                                                        \u5982\u679C\u5185\u5B58\u4E2D\u6CA1\u6709\u7A7A\u95F2\u5757\uFF0C\u5219\u7531\u9875\u9762\u7F6E\u6362\u7B97\u6CD5\u9009\u62E9\u4E00\u4E2A\u9875\u9762\u6DD8\u6C70\uFF08\u4ECE\u5185\u5B58\u8C03\u5230\u5916\u5B58\uFF09\uFF0C\u82E5\u8BE5\u9875\u9762\u5728\u5185\u5B58\u671F\u95F4\u88AB\u4FEE\u6539\u8FC7\uFF0C\u5219\u8981\u5C06\u5176\u5199\u56DE\u5916\u5B58\uFF0C\u5728\u5185\u5B58\u671F\u95F4\u672A\u4FEE\u6539\u8FC7\u7684\u9875\u9762\u4E0D\u7528\u5199\u56DE\u5916\u5B58\u3002

                                                                      4. \u7F3A\u9875\u4E2D\u65AD\u662F\u56E0\u4E3A\u5F53\u524D\u6267\u884C\u7684\u6307\u4EE4\u60F3\u8981\u8BBF\u95EE\u7684\u76EE\u6807\u9875\u9762\u672A\u8C03\u5165\u5185\u5B58\u800C\u4EA7\u751F\u7684\uFF0C\u56E0\u6B64\u5C5E\u4E8E\u5185\u4E2D\u65AD\u3002

                                                                        \u4E00\u6761\u6307\u4EE4\u5728\u6267\u884C\u671F\u95F4\uFF0C\u53EF\u80FD\u4EA7\u751F\u591A\u6B21\u7F3A\u9875\u4E2D\u65AD\u3002

                                                                        image-20211221173752429

                                                                      5. image-20211221174313529

                                                                        • \u53EA\u6709\u5199\u6307\u4EE4\u624D\u9700\u8981\u4FEE\u6539\u4FEE\u6539\u4F4D\uFF0C\u5E76\u4E14\uFF0C\u4E00\u822C\u6765\u8BF4\u53EA\u9700\u4FEE\u6539\u5FEB\u8868\u4E2D\u7684\u6570\u636E\uFF0C\u53EA\u6709\u8981\u5C06\u5FEB\u8868\u9879\u5220\u9664\u65F6\u624D\u9700\u8981\u5199\u56DE\u5185\u5B58\u4E2D\u7684\u6162\u8868\uFF0C\u8FD9\u6837\u53EF\u4EE5\u51CF\u5C11\u8BBF\u5B58\u6B21\u6570
                                                                        • \u548C\u666E\u901A\u7684\u4E2D\u65AD\u5904\u7406\u4E00\u6837\uFF0C\u7F3A\u9875\u4E2D\u65AD\u5904\u7406\u4F9D\u7136\u9700\u8981\u4FDD\u7559CPU\u73B0\u573A
                                                                        • \u9700\u8981\u7528\u67D0\u79CD\u9875\u9762\u7F6E\u6362\u7B97\u6CD5\uFF0C\u6765\u51B3\u5B9A\u6362\u51FA\u54EA\u4E2A\u9875\u9762
                                                                        • \u6362\u51FA\u3001\u6362\u5165\u90FD\u9700\u8981\u542F\u52A8\u6162\u901F\u7684IO\u64CD\u4F5C\u3002
                                                                        • \u9875\u9762\u8C03\u5165\u5185\u5B58\u540E\uFF0C\u9700\u8981\u4FEE\u6539\u6162\u8868\u7684\u76F8\u5E94\u9875\u8868\u9879\uFF0C\u540C\u65F6\uFF0C\u9700\u8981\u5C06\u8868\u9879\u590D\u5236\u5230\u5FEB\u8868\u4E2D\u3002

                                                                        \u8BF7\u6C42\u8C03\u9875\u65F6\u901A\u8FC7\u7F3A\u9875\u4E2D\u65AD\u8FDB\u884C\uFF01\uFF01\u7F3A\u9875\u4E2D\u65AD\u7684\u76EE\u7684\u5C31\u662F\u8BF7\u6C42\u64CD\u4F5C\u7CFB\u7EDF\u8C03\u9875\u3002

                                                                      \u9875\u9762\u7F6E\u6362\u7B97\u6CD5

                                                                      1. \u7528\u9875\u9762\u7F6E\u6362\u7B97\u6CD5\u51B3\u5B9A\u5E94\u8BE5\u6362\u51FA\u54EA\u4E2A\u9875\u9762

                                                                      2. \u9875\u9762\u6362\u5165\u6362\u51FA\u9700\u8981\u78C1\u76D8IO\uFF0C\u4F1A\u6709\u8F83\u5927\u7684\u5F00\u9500\uFF0C\u56E0\u6B64\u597D\u7684\u9875\u9762\u7F6E\u6362\u7B97\u6CD5\u5E94\u8BE5\u8FFD\u6C42\u66F4\u5C11\u7684\u7F3A\u9875\u7387

                                                                      3. \u9875\u9762\u7F6E\u6362\u7B97\u6CD5

                                                                        • \u6700\u4F73\u7F6E\u6362\u7B97\u6CD5
                                                                        • \u5148\u8FDB\u5148\u51FA\u7F6E\u6362\u7B97\u6CD5
                                                                        • \u6700\u8FD1\u6700\u4E45\u672A\u4F7F\u7528\u7F6E\u6362\u7B97\u6CD5
                                                                        • \u65F6\u949F\u7F6E\u6362\u7B97\u6CD5
                                                                        • \u6539\u8FDB\u578B\u7684\u65F6\u949F\u7F6E\u6362\u7B97\u6CD5
                                                                      4. \u6700\u4F73\u7F6E\u6362\u7B97\u6CD5OPT

                                                                        \u6BCF\u6B21\u9009\u62E9\u6DD8\u6C70\u7684\u9875\u9762\u5C06\u662F\u4EE5\u540E\u6C38\u4E0D\u4F7F\u7528\uFF0C\u6216\u8005\u5728\u6700\u957F\u65F6\u95F4\u5185\u4E0D\u518D\u88AB\u8BBF\u95EE\u7684\u9875\u9762\uFF0C\u8FD9\u6837\u53EF\u4EE5\u4FDD\u8BC1\u6700\u4F4E\u7684\u7F3A\u9875\u7387\u3002

                                                                        \u6CE8\u610F\uFF1A\u53D1\u751F\u4E86\u7F3A\u9875\u4E2D\u65AD\uFF0C\u672A\u5FC5\u4F1A\u53D1\u751F\u9875\u9762\u7F6E\u6362\uFF0C\u82E5\u8FD8\u6709\u53EF\u7528\u7684\u7A7A\u95F2\u5185\u5B58\u5757\uFF0C\u5C31\u4E0D\u7528\u8FDB\u884C\u9875\u9762\u7F6E\u6362\u3002\u53EA\u6709\u5185\u5B58\u4E0D\u591F\u7528\u4E86\u624D\u9700\u8981\u8FDB\u884C\u9875\u9762\u7F6E\u6362

                                                                        \u5B9E\u9645\uFF1A\u64CD\u4F5C\u7CFB\u7EDF\u65E0\u6CD5\u63D0\u524D\u9884\u5224\u9875\u9762\u8BBF\u95EE\u5E8F\u5217\uFF0C\u56E0\u6B64\uFF0C\u6700\u4F73\u7F6E\u6362\u7B97\u6CD5\u662F\u65E0\u6CD5\u5B9E\u73B0\u7684\u3002 \u8FD9\u662F\u7406\u60F3\u5316\u7684\u7B97\u6CD5\u3002

                                                                      5. \u5148\u8FDB\u5148\u51FA\u7F6E\u6362\u7B97\u6CD5FIFO

                                                                        \u6BCF\u6B21\u9009\u62E9\u6DD8\u6C70\u7684\u9875\u9762\u662F\u6700\u65E9\u8FDB\u5165\u5185\u5B58\u7684\u9875\u9762

                                                                        \u5B9E\u73B0\u65B9\u6CD5\uFF1A\u628A\u8C03\u5165\u5185\u5B58\u7684\u9875\u9762\u6839\u636E\u8C03\u5165\u7684\u5148\u540E\u987A\u5E8F\u6392\u6210\u4E00\u4E2A\u961F\u5217\uFF0C\u9700\u8981\u6362\u51FA\u9875\u9762\u65F6\uFF0C\u9009\u62E9\u5BF9\u5934\u7684\u9875\u9762\u5373\u53EF\u3002

                                                                        \u8D1D\u62C9\u8FEA\u5F02\u5E38\uFF1A\u5F53\u4E3A\u8FDB\u7A0B\u5206\u914D\u7684\u7269\u7406\u5757\u6570\u589E\u5927\u65F6\uFF0C\u7F3A\u9875\u6B21\u6570\u4E0D\u51CF\u53CD\u589E\u7684\u5F02\u5E38\u73B0\u8C61\u3002

                                                                        \u53EA\u6709FIFO\u7B97\u6CD5\u4F1A\u4EA7\u751F\u8D1D\u62C9\u8FEA\u5F02\u5E38\uFF0C\u53E6\u5916\uFF0CFIFO\u7B97\u6CD5\u867D\u7136\u5B9E\u73B0\u7B80\u5355\uFF0C\u4F46\u662F\u8BE5\u7B97\u6CD5\u4E0E\u8FDB\u7A0B\u5B9E\u9645\u8FD0\u884C\u65F6\u7684\u89C4\u5F8B\u4E0D\u9002\u5E94\uFF0C\u56E0\u4E3A\u5148\u8FDB\u5165\u7684\u9875\u9762\u4E5F\u6709\u53EF\u80FD\u6700\u7ECF\u5E38\u88AB\u8BBF\u95EE\uFF0C\u56E0\u6B64\u7B97\u6CD5\u6027\u80FD\u5DEE\u3002

                                                                      6. \u6700\u8FD1\u6700\u4E45\u672A\u4F7F\u7528\u7F6E\u6362\u7B97\u6CD5LRU

                                                                        \u6BCF\u6B21\u6DD8\u6C70\u7684\u9875\u9762\u662F\u6700\u8FD1\u6700\u4E45\u672A\u4F7F\u7528\u7684\u9875\u9762

                                                                        \u5B9E\u73B0\u65B9\u6CD5\uFF1A\u6B64\u8FDB\u7A0B\u5BF9\u5E94\u7684\u9875\u8868\u7684\u9875\u8868\u9879\u4E2D\uFF0C\u7528\u8BBF\u95EE\u5B57\u6BB5\u8BB0\u5F55\u8BE5\u9875\u9762\u81EA\u4E0A\u6B21\u88AB\u8BBF\u95EE\u4EE5\u6765\u6240\u7ECF\u5386\u7684\u65F6\u95F4t

                                                                        \u5F53\u9700\u8981\u6DD8\u6C70\u4E00\u4E2A\u9875\u9762\u65F6\uFF0C\u9009\u62E9\u73B0\u6709\u9875\u9762\u4E2Dt\u503C\u6700\u5927\u7684\uFF0C\u5373\u6700\u8FD1\u6700\u4E45\u672A\u4F7F\u7528\u7684\u9875\u9762\u3002

                                                                        image-20211221185055893

                                                                        \u6B64\u7B97\u6CD5\u6027\u80FD\u6700\u63A5\u8FD1\u6700\u4F73\u7F6E\u6362\u7B97\u6CD5

                                                                        \u9700\u8981\u4E13\u95E8\u7684\u786C\u4EF6\u652F\u6301\uFF0C\u7B97\u6CD5\u5F00\u9500\u5927

                                                                      7. \u65F6\u949F\u7F6E\u6362\u7B97\u6CD5CLOCK

                                                                        LRU\u7B97\u6CD5\u662F\u6700\u63A5\u8FD1OPT\u7B97\u6CD5\u6027\u80FD\u7684\uFF0C\u4F46\u662F\u9700\u8981\u4E13\u95E8\u7684\u786C\u4EF6\u652F\u6301\uFF0C\u7B97\u6CD5\u5F00\u9500\u5927

                                                                        \u65F6\u949F\u7F6E\u6362\u7B97\u6CD5\u662F\u4E00\u79CD\u6027\u80FD\u548C\u5F00\u9500\u6BD4\u8F83\u5747\u8861\u7684\u7B97\u6CD5

                                                                        image-20211221185458329

                                                                        image-20211221185505869

                                                                      8. \u6539\u8FDB\u578B\u7684\u65F6\u949F\u7F6E\u6362\u7B97\u6CD5

                                                                        \u7B80\u5355\u7684\u65F6\u949F\u7F6E\u6362\u7B97\u6CD5\u4EC5\u8003\u8651\u5230\u4E00\u4E2A\u9875\u9762\u6700\u8FD1\u662F\u5426\u88AB\u8BBF\u95EE\u8FC7\uFF0C\u4E8B\u5B9E\u4E0A\uFF0C\u5982\u679C\u88AB\u6DD8\u6C70\u7684\u9875\u9762\u6CA1\u6709\u88AB\u4FEE\u6539\u8FC7\uFF0C\u5C31\u4E0D\u9700\u8981\u6267\u884CIO\u64CD\u4F5C\u5199\u56DE\u5916\u5B58\uFF0C\u53EA\u6709\u88AB\u6DD8\u6C70\u7684\u9875\u9762\u88AB\u4FEE\u6539\u8FC7\u65F6\uFF0C\u624D\u9700\u8981\u5199\u56DE\u5916\u5B58\u3002

                                                                        \u56E0\u6B64\uFF0C\u9664\u4E86\u8003\u8651\u4E00\u4E2A\u9875\u9762\u6700\u8FD1\u6709\u6CA1\u6709\u88AB\u8BBF\u95EE\u8FC7\u4E4B\u5916\uFF0C\u64CD\u4F5C\u7CFB\u7EDF\u8FD8\u5E94\u8003\u8651\u9875\u9762\u6709\u6CA1\u6709\u88AB\u4FEE\u6539\u8FC7\uFF0C\u5728\u5176\u4ED6\u6761\u4EF6\u90FD\u76F8\u540C\u65F6\uFF0C\u5E94\u4F18\u5148\u6DD8\u6C70\u6CA1\u6709\u88AB\u4FEE\u6539\u8FC7\u7684\u9875\u9762\uFF0C\u907F\u514DIO\u64CD\u4F5C\u3002\u8FD9\u5C31\u662F\u6539\u8FDB\u578B\u7684\u65F6\u949F\u7F6E\u6362\u7B97\u6CD5\u7684\u601D\u60F3\u3002

                                                                        image-20211221185940035

                                                                        image-20211221190423652

                                                                        \u6BCF\u4E00\u8F6E\u5206\u522B\u4EE3\u8868\u4E00\u4E2A\u4F18\u5148\u7EA7

                                                                        \u7B2C\u4E00\u4F18\u5148\u7EA7\uFF1A\u6700\u8FD1\u6CA1\u8BBF\u95EE\uFF0C\u4E14\u6CA1\u4FEE\u6539\u8FC7\u7684\u9875\u9762

                                                                        \u7B2C\u4E8C\u4F18\u5148\u7EA7\uFF1A\u6700\u8FD1\u6CA1\u8BBF\u95EE\uFF0C\u4F46\u662F\u4FEE\u6539\u8FC7\u7684\u9875\u9762

                                                                        \u7B2C\u4E09\u4F18\u5148\u7EA7\uFF1A\u6700\u8FD1\u8BBF\u95EE\u8FC7\uFF0C\u6CA1\u4FEE\u6539\u8FC7\u7684\u9875\u9762

                                                                        \u7B2C\u56DB\u4F18\u5148\u7EA7\uFF1A\u6700\u8FD1\u8BBF\u95EE\u8FC7\uFF0C\u4E14\u4FEE\u6539\u8FC7\u7684\u9875\u9762\u3002

                                                                      9. image-20211221190938925

                                                                      \u9875\u9762\u5206\u914D\u7B56\u7565

                                                                      1. \u9A7B\u7559\u96C6\uFF1A\u8BF7\u6C42\u5206\u9875\u5B58\u50A8\u7BA1\u7406\u4E2D\uFF0C\u7ED9\u8FDB\u7A0B\u5206\u914D\u7684\u5185\u5B58\u5757\uFF08\u9875\u6846\uFF09\u7684\u96C6\u5408

                                                                        \u5728\u91C7\u7528\u4E86\u865A\u62DF\u5B58\u50A8\u6280\u672F\u7684\u7CFB\u7EDF\u4E2D\uFF0C\u9A7B\u7559\u96C6\u7684\u5927\u5C0F\u4E00\u822C\u5C0F\u4E8E\u8FDB\u7A0B\u7684\u603B\u5927\u5C0F\u3002

                                                                      2. \u9A7B\u7559\u96C6\u5927\u5C0F

                                                                        \u56FA\u5B9A\u5206\u914D\uFF1A\u64CD\u4F5C\u7CFB\u7EDF\u4E3A\u6BCF\u4E2A\u8FDB\u7A0B\u5206\u914D\u4E00\u7EC4\u56FA\u5B9A\u6570\u76EE\u7684\u5185\u5B58\u5757\uFF0C\u5728\u8FDB\u7A0B\u8FD0\u884C\u671F\u95F4\u4E0D\u518D\u6539\u53D8

                                                                        \u53EF\u53D8\u5206\u914D\uFF1A\u5148\u4E3A\u6BCF\u4E2A\u8FDB\u7A0B\u5206\u914D\u4E00\u5B9A\u6570\u76EE\u7684\u7269\u7406\u5757\uFF0C\u5728\u8FDB\u7A0B\u8FD0\u884C\u671F\u95F4\uFF0C\u53EF\u6839\u636E\u60C5\u51B5\u505A\u9002\u5F53\u7684\u589E\u52A0\u6216\u51CF\u5C11\u3002

                                                                      3. \u5C40\u90E8\u7F6E\u6362\uFF1A\u53D1\u751F\u7F3A\u9875\u65F6\u53EA\u80FD\u9009\u8FDB\u7A0B\u81EA\u5DF1\u7684\u7269\u7406\u5757\u8FDB\u7A0B\u7F6E\u6362

                                                                        \u5168\u5C40\u7F6E\u6362\uFF1A\u53EF\u4EE5\u5C06\u64CD\u4F5C\u7CFB\u7EDF\u4FDD\u7559\u7684\u7A7A\u95F2\u7269\u7406\u5757\u5206\u914D\u7ED9\u7F3A\u9875\u8FDB\u7A0B\uFF0C\u4E5F\u53EF\u4EE5\u5C06\u522B\u7684\u8FDB\u7A0B\u6301\u6709\u7684\u7269\u7406\u5757\u7F6E\u6362\u5230\u5916\u5B58\uFF0C\u518D\u5206\u914D\u7ED9\u7F3A\u9875\u8FDB\u7A0B\u3002

                                                                        image-20211221205210092

                                                                      4. \u56FA\u5B9A\u5206\u914D\u5C40\u90E8\u7F6E\u6362\uFF1A

                                                                        \u7CFB\u7EDF\u4E3A\u6BCF\u4E2A\u8FDB\u7A0B\u5206\u914D\u4E00\u5B9A\u6570\u91CF\u7684\u7269\u7406\u5757\uFF0C\u5728\u6574\u4E2A\u8FD0\u884C\u671F\u95F4\u90FD\u4E0D\u6539\u53D8\uFF0C\u82E5\u8FDB\u7A0B\u5728\u8FD0\u884C\u4E2D\u53D1\u751F\u7F3A\u9875\uFF0C\u5219\u53EA\u80FD\u4ECE\u8BE5\u8FDB\u7A0B\u5728\u5185\u5B58\u4E2D\u7684\u9875\u9762\u4E2D\u9009\u51FA\u4E00\u9875\u6362\u51FA\uFF0C\u7136\u540E\u518D\u8C03\u5165\u9700\u8981\u7684\u9875\u9762\u3002

                                                                        \u8FD9\u79CD\u7B56\u7565\u7684\u7F3A\u70B9\u662F\uFF1A\u5F88\u96BE\u5728\u521A\u5F00\u59CB\u5C31\u786E\u5B9A\u5E94\u4E3A\u6BCF\u4E2A\u8FDB\u7A0B\u5206\u914D\u591A\u5C11\u4E2A\u7269\u7406\u5757\u624D\u7B97\u5408\u7406

                                                                      5. \u53EF\u53D8\u5206\u914D\u5168\u5C40\u7F6E\u6362\uFF1A

                                                                        \u521A\u5F00\u59CB\u4F1A\u4E3A\u6BCF\u4E2A\u8FDB\u7A0B\u5206\u914D\u4E00\u5B9A\u6570\u91CF\u7684\u7269\u7406\u5757\u3002\u64CD\u4F5C\u7CFB\u7EDF\u4F1A\u4FDD\u6301\u4E00\u4E2A\u7A7A\u95F2\u7269\u7406\u5757\u961F\u5217\u3002\u5F53\u67D0\u8FDB\u7A0B\u53D1\u751F\u7F3A\u9875\u65F6\uFF0C\u4ECE\u7A7A\u95F2\u7269\u7406\u5757\u4E2D\u53D6\u51FA\u4E00\u5757\u5206\u914D\u7ED9\u8BE5\u8FDB\u7A0B\uFF1B\u82E5\u5DF2\u65E0\u7A7A\u95F2\u7269\u7406\u5757\uFF0C\u5219\u53EF\u9009\u62E9\u4E00\u4E2A\u672A\u9501\u5B9A\u7684\u9875\u9762\u6362\u51FA\uFF0C\u518D\u5C06\u8BE5\u7269\u7406\u5757\u5206\u914D\u7ED9\u7F3A\u9875\u7684\u8FDB\u7A0B\u3002

                                                                        \u91C7\u7528\u8FD9\u79CD\u7B56\u7565\u65F6\uFF0C\u53EA\u8981\u67D0\u8FDB\u7A0B\u53D1\u751F\u7F3A\u9875\uFF0C\u90FD\u5C06\u83B7\u5F97\u65B0\u7684\u7269\u7406\u5757\uFF0C\u4EC5\u5F53\u7269\u7406\u5757\u7528\u5B8C\u65F6\uFF0C\u7CFB\u7EDF\u624D\u9009\u62E9\u4E00\u4E2A\u672A\u9501\u5B9A\u7684\u9875\u9762\u6362\u51FA\uFF0C\u88AB\u9009\u62E9\u8C03\u51FA\u7684\u9875\u53EF\u80FD\u65F6\u7CFB\u7EDF\u4E2D\u4EFB\u4F55\u4E00\u4E2A\u8FDB\u7A0B\u7684\u9875\uFF0C\u56E0\u6B64\u8FD9\u4E2A\u88AB\u9009\u4E2D\u7684\u8FDB\u7A0B\u62E5\u6709\u7684\u7269\u7406\u5757\u4F1A\u51CF\u5C11\uFF0C\u7F3A\u9875\u7387\u4F1A\u589E\u52A0\u3002

                                                                      6. \u53EF\u53D8\u5206\u914D\u5C40\u90E8\u7F6E\u6362\uFF1A

                                                                        \u521A\u5F00\u59CB\u4F1A\u4E3A\u6BCF\u4E2A\u8FDB\u7A0B\u5206\u914D\u4E00\u5B9A\u6570\u91CF\u7684\u7269\u7406\u5757\uFF0C\u5F53\u67D0\u8FDB\u7A0B\u53D1\u751F\u7F3A\u9875\u7684\u65F6\u5019\uFF0C\u53EA\u5141\u8BB8\u4ECE\u8BE5\u8FDB\u7A0B\u81EA\u5DF1\u7684\u7269\u7406\u5757\u4E2D\u9009\u51FA\u4E00\u4E2A\u8FDB\u884C\u6362\u51FA\u3002\u5982\u679C\u8FDB\u7A0B\u5728\u8FD0\u884C\u4E2D\u9891\u7E41\u5730\u7F3A\u9875\uFF0C\u7CFB\u7EDF\u4F1A\u4E3A\u8BE5\u8FDB\u7A0B\u591A\u5206\u914D\u51E0\u4E2A\u7269\u7406\u5757\uFF0C\u76F4\u81F3\u8BE5\u8FDB\u7A0B\u7F3A\u9875\u7387\u8D8B\u4E8E\u9002\u5F53\u7A0B\u5EA6\uFF0C\u53CD\u4E4B\uFF0C\u5982\u679C\u8BE5\u8FDB\u7A0B\u7F3A\u9875\u7387\u5F88\u4F4E\uFF0C\u5219\u4F1A\u51CF\u5C11\u5206\u914D\u7ED9\u8BE5\u8FDB\u7A0B\u7684\u7269\u7406\u5757\u3002

                                                                      7. \u4F55\u65F6\u8C03\u5165\u9875\u9762

                                                                        image-20211221210739713

                                                                      8. \u4ECE\u4F55\u5904\u8C03\u5165\u9875\u9762

                                                                        image-20211221211043210

                                                                      9. \u6296\u52A8\u73B0\u8C61\uFF1A

                                                                        \u521A\u521A\u6362\u51FA\u7684\u9875\u9762\u9A6C\u4E0A\u53C8\u8981\u6362\u5165\u5185\u5B58\uFF0C\u521A\u521A\u6362\u5165\u7684\u9875\u9762\u9A6C\u4E0A\u53C8\u8981\u6362\u51FA\u5185\u5B58\uFF0C\u8FD9\u79CD\u9891\u7E41\u7684\u9875\u9762\u8C03\u5EA6\u884C\u4E3A\u79F0\u4E3A\u6296\u52A8\u3002

                                                                        \u4EA7\u751F\u6296\u52A8\u7684\u4E3B\u8981\u539F\u56E0\u662F\u8FDB\u7A0B\u9891\u7E41\u8BBF\u95EE\u7684\u9875\u9762\u6570\u76EE\u9AD8\u4E8E\u53EF\u7528\u7684\u7269\u7406\u5757\u6570\u3002

                                                                      10. \u5DE5\u4F5C\u96C6\uFF1A

                                                                        \u6307\u5728\u67D0\u6BB5\u65F6\u95F4\u95F4\u9694\u5185\uFF0C\u8FDB\u7A0B\u5B9E\u9645\u8BBF\u95EE\u9875\u9762\u7684\u96C6\u5408\u3002

                                                                        \u4E00\u822C\u6765\u8BF4\uFF0C\u9A7B\u7559\u96C6\u7684\u5927\u5C0F\u4E0D\u80FD\u5C0F\u4E8E\u5DE5\u4F5C\u96C6\u7684\u5927\u5C0F\uFF0C\u5426\u5219\u8FDB\u7A0B\u8FD0\u884C\u8FC7\u7A0B\u4E2D\u5C06\u9891\u7E41\u7F3A\u9875\uFF08\u6296\u52A8\uFF09

                                                                      ',167);function jp(Gp,Kp){return Qp}var Hp=p(Ap,[["render",jp],["__file","\u64CD\u4F5C\u7CFB\u7EDF.html.vue"]]);export{Hp as default}; +import{_ as p,e as i}from"./app.f8791b52.js";var a="/study/assets/image-20211014183700023.4efb13a6.png",l="/study/assets/image-20211215161802637.7b5bc03c.png",r="/study/assets/image-20211029171246758.f68d1488.png",s="/study/assets/image-20211029171359873.9494cbf9.png",t="/study/assets/image-20211215180652752.65913121.png",e="/study/assets/image-20211029181727331.9869c6f9.png",n="/study/assets/image-20211029181850429.314094bd.png",g="/study/assets/image-20211029182506414.7323c9a9.png",o="/study/assets/image-20211215204419631.e91c517f.png",d="/study/assets/image-20211031173518958.988c29b3.png",h="/study/assets/image-20211215205340442.ef194827.png",m="/study/assets/image-20211031180947464.888e2f2b.png",c="/study/assets/image-20211031181418067.5a481bec.png",u="/study/assets/image-20211215211612977.f3cb5031.png",_="/study/assets/image-20211215211627172.d00c80da.png",P="/study/assets/image-20211215211657088.0409777d.png",C="/study/assets/image-20211215211713943.33acc316.png",b="/study/assets/image-20211215211752899.4cbb24af.png",f="/study/assets/image-20211031192224702.3b36d805.png",U="/study/assets/image-20211031192325361.53fd4544.png",v="/study/assets/image-20211031215805004.8d0b092e.png",x="/study/assets/image-20211215214453318.6e3e232d.png",y="/study/assets/image-20211031220400682.266353ab.png",B="/study/assets/image-20211031220438631.62f1566d.png",I="/study/assets/image-20211031220738705.bd7c0b7f.png",O="/study/assets/image-20211215215539484.38057c74.png",J="/study/assets/image-20211215221112255.a5b6c596.png",S="/study/assets/image-20211215221415179.b796c345.png",V="/study/assets/image-20211215222440380.2496d5e4.png",T="/study/assets/image-20211215222506062.02ebf46b.png",M="/study/assets/image-20211216150358099.5ddfed10.png",k="/study/assets/image-20211216150733591.04d9ba5c.png",q="/study/assets/image-20211216150812905.81a73c96.png",w="/study/assets/image-20211216153719194.83e97c30.png",D="/study/assets/image-20211216154057426.f1008fb7.png",F="/study/assets/image-20211216155307167.8c37033c.png",L="/study/assets/image-20211216155950660.ac79009c.png",R="/study/assets/image-20211216160414267.51749244.png",E="/study/assets/image-20211216161206697.38f8245b.png",N="/study/assets/image-20211216161225780.0fa92fb5.png",W="/study/assets/image-20211216161549508.a5e9150e.png",A="/study/assets/image-20211216161628062.00af5f0e.png",Q="/study/assets/image-20211216171359712.f4475b6b.png",j="/study/assets/image-20211216171817705.36ecf8c4.png",G="/study/assets/image-20211216170454485.9480dd2f.png",K="/study/assets/image-20211216170707557.ccfb73d8.png",z="/study/assets/image-20211216172035502.96a88e5b.png",H="/study/assets/image-20211216191425419.73b3b749.png",X="/study/assets/image-20211216193636875.1164bc66.png",Y="/study/assets/image-20211216203142509.a3a0c411.png",Z="/study/assets/image-20211216210038328.0df66e98.png",$="/study/assets/image-20211216210353349.2d9091c6.png",pp="/study/assets/image-20211216210743381.1bf8043b.png",ip="/study/assets/image-20211216222006381.3a92ee1b.png",ap="/study/assets/image-20211216222809386.4cc064fa.png",lp="/study/assets/image-20211217163414696.8be533d0.png",rp="/study/assets/image-20211217172238888.864894f2.png",sp="/study/assets/image-20211217173250040.824b41f1.png",tp="/study/assets/image-20211217173913631.bd2f40b1.png",ep="/study/assets/image-20211217182011808.4a522b35.png",np="/study/assets/image-20211217200059209.637fece5.png",gp="/study/assets/image-20211217204429202.bc807014.png",op="/study/assets/image-20211217204620460.9c5c1d50.png",dp="/study/assets/image-20211217204757093.11d17e6c.png",hp="/study/assets/image-20211217213054745.44b0afa6.png",mp="/study/assets/image-20211217222113746.356787c2.png",cp="/study/assets/image-20211220143402386-16399820431281.bb8b8b5a.png",up="/study/assets/image-20211220145412455.980d1cf5.png",_p="/study/assets/image-20211220153145382.4cb9da0f.png",Pp="/study/assets/image-20211220153203225.f9ff2a9a.png",Cp="/study/assets/image-20211220154132962.cf8693cb.png",bp="/study/assets/image-20211220175427142.6fa88c90.png",fp="/study/assets/image-20211220183023318.d83c970e.png",Up="/study/assets/image-20211220184619310.68faa667.png",vp="/study/assets/image-20211220184944890.e5ca0876.png",xp="/study/assets/image-20211220185327397.4b11e813.png",yp="/study/assets/image-20211220210600944.fba9935f.png",Bp="/study/assets/image-20211220212626340.372aa006.png",Ip="/study/assets/image-20211220212723931.388963a1.png",Op="/study/assets/image-20211220212746790.e9845ed3.png",Jp="/study/assets/image-20211220213646069.ad87e728.png",Sp="/study/assets/image-20211221154032346.0422b5f4.png",Vp="/study/assets/image-20211221154907782.a8b09f6c.png",Tp="/study/assets/image-20211221163750995.10710194.png",Mp="/study/assets/image-20211221173752429.5d7bd5d3.png",kp="/study/assets/image-20211221174313529.de30f980.png",qp="/study/assets/image-20211221185055893.80412a2c.png",wp="/study/assets/image-20211221185458329.5423e18e.png",Dp="/study/assets/image-20211221185505869.43460ded.png",Fp="/study/assets/image-20211221185940035.3f33933d.png",Lp="/study/assets/image-20211221190423652.4d2ccad0.png",Rp="/study/assets/image-20211221190938925.1c163916.png",Ep="/study/assets/image-20211221205210092.6800319f.png",Np="/study/assets/image-20211221210739713.960e2f1b.png",Wp="/study/assets/image-20211221211043210.ebdfd355.png";const Ap={},Qp=i('

                                                                      \u64CD\u4F5C\u7CFB\u7EDF

                                                                      \u7B2C\u4E00\u7AE0

                                                                      \u64CD\u4F5C\u7CFB\u7EDF\u7684\u6982\u5FF5\u3001\u529F\u80FD\u548C\u76EE\u6807

                                                                      1. \u64CD\u4F5C\u7CFB\u7EDF\u7684\u6982\u5FF5\uFF1A

                                                                        image-20211014183700023

                                                                        \u64CD\u4F5C\u7CFB\u7EDF\u662F\u6307\u63A7\u5236\u548C\u7BA1\u7406\u6574\u4E2A\u8BA1\u7B97\u673A\u7CFB\u7EDF\u7684\u786C\u4EF6\u548C\u8F6F\u4EF6\u8D44\u6E90\uFF0C\u5E76\u5408\u7406\u5730\u7EC4\u7EC7\u8C03\u5EA6\u8BA1\u7B97\u673A\u7684\u5DE5\u4F5C\u548C\u8D44\u6E90\u7684\u5206\u914D\u3002\uFF08\u8981\u6CE8\u610F\u64CD\u4F5C\u7CFB\u7EDF\u4E5F\u8981\u7BA1\u7406\u786C\u4EF6\u8D44\u6E90\uFF0C\u4E0D\u53EA\u662F\u7BA1\u7406\u8F6F\u4EF6\u8D44\u6E90\uFF0C\u6BD4\u5982\u64CD\u4F5C\u7CFB\u7EDF\u8981\u7BA1\u7406\u8F6F\u4EF6\u5373\u5E94\u7528\u7A0B\u5E8F\u5360\u7528CPU\u7B49\uFF0C\u76F8\u5F53\u4E8E\u662F\u8981\u7BA1\u7406CPU\uFF0C\u64CD\u4F5C\u7CFB\u7EDF\u80FD\u591F\u7BA1\u7406\u786C\u4EF6\uFF0C\u80FD\u591F\u7BA1\u7406\u5E94\u7528\u7A0B\u5E8F\u8FD9\u79CD\u8F6F\u4EF6\uFF01\uFF01\uFF09

                                                                        image-20211215161802637

                                                                        \u5E76\u4E14\u64CD\u4F5C\u7CFB\u7EDF\u7ED9\u4E0A\u5C42\u7528\u6237\u548C\u5176\u4ED6\u5E94\u7528\u8F6F\u4EF6\u63D0\u4F9B\u65B9\u4FBF\u7684\u63A5\u53E3\u548C\u73AF\u5883\uFF0C\u64CD\u4F5C\u7CFB\u7EDF\u662F\u8BA1\u7B97\u673A\u7CFB\u7EDF\u4E2D\u6700\u57FA\u672C\u7684\u7CFB\u7EDF\u8F6F\u4EF6\u3002

                                                                        \u64CD\u4F5C\u7CFB\u7EDF\u8D1F\u8D23\u7BA1\u7406\u548C\u534F\u8C03\u786C\u4EF6\u8F6F\u4EF6\u8D44\u6E90\u3002

                                                                      2. \u8FDB\u7A0B\u662F\u4E00\u4E2A\u7A0B\u5E8F\u7684\u6267\u884C\u8FC7\u7A0B\uFF0C\u6267\u884C\u524D\u9700\u8981\u5C06\u8BE5\u7A0B\u5E8F\u653E\u5230\u5185\u5B58\u4E2D\uFF0C\u624D\u80FD\u88ABCPU\u5904\u7406

                                                                        \u653E\u5230\u5185\u5B58\u4E2D\u7684\u7A0B\u5E8F\uFF0C\u53EF\u4EE5\u7406\u89E3\u4E3A\u8FDB\u7A0B\u3002\u7A0B\u5E8F\u662F\u9759\u6001\u7684\uFF0C\u5C31\u662F\u5B58\u653E\u5728\u786C\u76D8\u4E0A\u7684\u9759\u6001\u4EE3\u7801\uFF0C\u5C31\u53EB\u505A\u7A0B\u5E8F\uFF0C\u8981\u8BA9\u7A0B\u5E8F\u8DD1\u8D77\u6765\uFF0C\u9700\u8981\u901A\u8FC7CPU\uFF0C\u6216\u8005\u8BF4\uFF0C\u9700\u8981CPU\u6765\u5BF9\u8FD9\u4E2A\u7A0B\u5E8F\u8FDB\u884C\u5904\u7406\uFF0C\u5373\u901A\u8FC7CPU\u8BA9\u8FD9\u6BB5\u7A0B\u5E8F\u8DD1\u8D77\u6765\uFF0C\u90A3\u4E48\u8FD9\u4E2A\u7A0B\u5E8F\u4F1A\u653E\u5230\u5185\u5B58\u4E2D\uFF0C\u624D\u80FD\u88ABCPU\u8FDB\u884C\u5904\u7406\uFF0C\u4E5F\u5C31\u662F\u201C\u8DD1\u8D77\u6765\u201D\u3002

                                                                      3. \u64CD\u4F5C\u7CFB\u7EDF\u7684\u529F\u80FD\u548C\u76EE\u6807\uFF1A

                                                                        • \u64CD\u4F5C\u7CFB\u7EDF\u4F5C\u4E3A**\u7CFB\u7EDF\u8D44\u6E90\uFF08\u786C\u4EF6\u8D44\u6E90\u548C\u8F6F\u4EF6\u8D44\u6E90\uFF09**\u7684\u7BA1\u7406\u8005\uFF1A

                                                                          • \u5904\u7406\u673A\u7BA1\u7406

                                                                            \u8FDB\u7A0B\u9700\u8981\u7B49\u5F85CPU\u8D44\u6E90\u7684\u5206\u914D

                                                                          • \u6587\u4EF6\u7BA1\u7406

                                                                          • \u8BBE\u5907\u7BA1\u7406

                                                                          • \u5B58\u50A8\u5668\u7BA1\u7406

                                                                        • \u64CD\u4F5C\u7CFB\u7EDF\u4F5C\u4E3A\u7528\u6237\u548C\u8BA1\u7B97\u673A\u786C\u4EF6\u4E4B\u95F4\u7684\u63A5\u53E3\uFF1A

                                                                          • \u547D\u4EE4\u63A5\u53E3

                                                                            \u5141\u8BB8\u7528\u6237\u76F4\u63A5\u4F7F\u7528

                                                                            • \u8054\u673A\u547D\u4EE4\u63A5\u53E3
                                                                            • \u8131\u673A\u547D\u4EE4\u63A5\u53E3
                                                                          • \u7A0B\u5E8F\u63A5\u53E3

                                                                            \u5141\u8BB8\u7528\u6237\u901A\u8FC7\u7A0B\u5E8F\u95F4\u63A5\u4F7F\u7528

                                                                            \u7CFB\u7EDF\u8C03\u7528

                                                                          • GUI---\u56FE\u5F62\u7528\u6237\u754C\u9762

                                                                            \u73B0\u4EE3\u64CD\u4F5C\u7CFB\u7EDF\u4E2D\u6700\u6D41\u884C\u7684\u56FE\u5F62\u7CFB\u7EDF\u3002

                                                                        • \u64CD\u4F5C\u7CFB\u7EDF\u4F5C\u4E3A\u6700\u63A5\u8FD1\u786C\u4EF6\u7684\u5C42\u6B21\uFF0C\u9700\u8981\u5728\u7EAF\u786C\u4EF6\u7684\u57FA\u7840\u4E0A\u5B9E\u73B0\u4EC0\u4E48\u529F\u80FD\uFF1A

                                                                          \u5B9E\u73B0\u5BF9\u786C\u4EF6\u673A\u5668\u7684\u62D3\u5C55

                                                                          \u64CD\u4F5C\u7CFB\u7EDF\u662F\u8F6F\u4EF6\uFF0C\u662F\u7CFB\u7EDF\u8F6F\u4EF6\u3002

                                                                      4. \u64CD\u4F5C\u7CFB\u7EDF\u4F5C\u4E3A\u7528\u6237\u548C\u8BA1\u7B97\u673A\u786C\u4EF6\u4E4B\u95F4\u7684\u63A5\u53E3

                                                                        \u7528\u6237\u63A5\u53E3

                                                                        • \u547D\u4EE4\u63A5\u53E3

                                                                          • \u8054\u673A\u547D\u4EE4\u63A5\u53E3

                                                                            \u7528\u6237\u8BF4\u4E00\u53E5\uFF0C\u7CFB\u7EDF\u505A\u4E00\u53E5

                                                                            \u8054\u673A\u547D\u4EE4\u63A5\u53E3 = \u4EA4\u4E92\u5F0F\u547D\u4EE4\u63A5\u53E3\uFF0C\u4F8B\u5982windows\u7CFB\u7EDF\u4E2D\u7684\u547D\u4EE4\u884C\u3002

                                                                          • \u8131\u673A\u547D\u4EE4\u63A5\u53E3

                                                                            \u7528\u6237\u8BF4\u4E00\u5806\uFF0C\u7CFB\u7EDF\u505A\u4E00\u5806

                                                                            \u76F8\u5F53\u4E8E\u662F\u6279\u5904\u7406\u547D\u4EE4\u63A5\u53E3\u3002

                                                                        • \u7A0B\u5E8F\u63A5\u53E3

                                                                          \u7531\u4E00\u7EC4\u7CFB\u7EDF\u8C03\u7528\u7EC4\u6210\uFF0C\u53EA\u80FD\u901A\u8FC7\u7528\u6237\u7A0B\u5E8F\u95F4\u63A5\u4F7F\u7528\u3002

                                                                          \u5728\u5927\u591A\u6570\u60C5\u51B5\u4E0B\uFF0C\u7A0B\u5E8F\u63A5\u53E3\u548C\u7CFB\u7EDF\u8C03\u7528\u4E24\u4E2A\u540D\u8BCD\u662F\u76F8\u7B49\u7684\u3002

                                                                      \u64CD\u4F5C\u7CFB\u7EDF\u7684\u56DB\u4E2A\u7279\u5F81

                                                                      1. \u64CD\u4F5C\u7CFB\u7EDF\u6709\u5E76\u53D1\u3001\u5171\u4EAB\u3001\u865A\u62DF\u3001\u5F02\u6B65\u8FD9\u56DB\u4E2A\u7279\u5F81\u3002

                                                                        \u5176\u4E2D\u5E76\u53D1\u548C\u5171\u4EAB\u662F\u4E24\u4E2A\u6700\u57FA\u672C\u7684\u7279\u5F81\uFF0C\u4E8C\u8005\u4E92\u4E3A\u5B58\u5728\u6761\u4EF6\u3002

                                                                      \u5E76\u53D1

                                                                      1. \u6307\u4E24\u4E2A\u6216\u591A\u4E2A\u4E8B\u4EF6\u5728\u540C\u4E00\u65F6\u95F4\u95F4\u9694\u5185\u53D1\u751F\uFF0C\u8FD9\u4E9B\u4E8B\u4EF6\u5B8F\u89C2\u4E0A\u662F\u540C\u65F6\u53D1\u751F\u7684\uFF0C\u4F46\u5FAE\u89C2\u4E0A\u662F\u4EA4\u66FF\u53D1\u751F\u7684

                                                                        \u5E76\u884C\uFF1A

                                                                        \u6307\u4E24\u4E2A\u6216\u591A\u4E2A\u4E8B\u4EF6\u5728\u540C\u4E00\u65F6\u523B\u540C\u65F6\u53D1\u751F\u3002

                                                                      2. \u4E00\u4E2A\u5355\u6838\u5904\u7406\u5668\uFF08CPU\uFF09\u5728\u540C\u4E00\u65F6\u523B\u53EA\u80FD\u6267\u884C\u4E00\u4E2A\u7A0B\u5E8F\uFF0C\u56E0\u6B64\u64CD\u4F5C\u7CFB\u7EDF\u4F1A\u8D1F\u8D23\u534F\u8C03\u591A\u4E2A\u7A0B\u5E8F\u4EA4\u66FF\u6267\u884C\uFF0C\u8FD9\u4E9B\u7A0B\u5E8F\u5FAE\u89C2\u4E0A\u662F\u4EA4\u66FF\u6267\u884C\u7684\uFF0C\u4F46\u662F\u5728\u5B8F\u89C2\u4E0A\u770B\u8D77\u6765\u50CF\u662F\u540C\u65F6\u6267\u884C\uFF08\u5E76\u884C\uFF09\u3002

                                                                        \u8FD9\u5C31\u662F\u5E76\u53D1\uFF0C\u5FAE\u89C2\u4E0A\u662F\u4EA4\u66FF\u6267\u884C\uFF0C\u5B8F\u89C2\u4E0A\u662F\u5E76\u884C\u6267\u884C\uFF0C\u5E76\u884C\u5373\u540C\u65F6\u3002

                                                                        \u6240\u4EE5\u5E76\u4E0D\u662F\u91C7\u7528\u591A\u7EBF\u7A0B\u7684\u65B9\u5F0F\u5C31\u4E00\u5B9A\u6267\u884C\u6548\u7387\u66F4\u9AD8\uFF0C\u6267\u884C\u66F4\u5FEB\uFF0C\u56E0\u4E3A\u5982\u679C\u662F\u5355\u6838CPU\uFF0C\u90A3\u4E48\u5728\u5FAE\u89C2\u4E0A\u4ECD\u7136\u662F\u5E76\u53D1\u6267\u884C\uFF0C\u4EA4\u66FF\u6267\u884C\u7684\uFF0C\u5E76\u4E0D\u662F\u771F\u6B63\u610F\u4E49\u4E0A\u7684\u5E76\u884C\u6267\u884C\uFF0C\u5982\u679C\u5355\u6838CPU\u91C7\u7528\u591A\u7EBF\u7A0B\u6267\u884C\u4EFB\u52A1\u7684\u65B9\u5F0F\uFF0C\u8FD8\u5B58\u5728\u7EBF\u7A0B\u7684\u4E0A\u4E0B\u6587\u5207\u6362\uFF0C\u7CFB\u7EDF\u7684\u8D44\u6E90\u9650\u5236\u548C\u6B7B\u9501\u7B49\u95EE\u9898\uFF0C\u9020\u6210\u591A\u7EBF\u7A0B\u53CD\u800C\u6BD4\u5355\u7EBF\u7A0B\u66F4\u6162\u3002

                                                                        \u5982\u679C\u662F\u591A\u6838CPU\u90A3\u4E48\uFF0C \u591A\u7EBF\u7A0B\u5728\u5FAE\u89C2\u4E0A\u624D\u662F\u771F\u6B63\u610F\u4E49\u4E0A\u7684\u5E76\u884C\u6267\u884C\u3002

                                                                        CPU\u5BC6\u96C6\u578B\uFF0C\u90A3\u4E48\u5E76\u4E0D\u662F\u7EBF\u7A0B\u8D8A\u591A\u8D8A\u597D\uFF0C\u56E0\u4E3A\u76F8\u5F53\u4E8E\u5E76\u4E0D\u5B58\u5728CPU\u4F1A\u7A7A\u95F2\u7684\u72B6\u51B5\uFF0C\u6240\u4EE5\u7EBF\u7A0B\u6570\u7B49\u4E8ECPU\u6838\u5FC3\u6570\u5C31\u53EF\u4EE5\uFF0C\u5982\u679C\u662FIO\u5BC6\u96C6\u578B\uFF0C\u90A3\u4E48\u5C31\u4F1A\u51FA\u73B0\u5927\u91CFCPU\u7A7A\u95F2\u7684\u65F6\u95F4\uFF0C\u4E3A\u4E86\u63D0\u9AD8CPU\u7684\u6267\u884C\u6548\u7387\uFF0C\u53EF\u4EE5\u91C7\u7528\u66F4\u591A\u7684\u7EBF\u7A0B\u6570\uFF08CPU\u6838\u5FC3\u6570\u7684\u4E24\u500D\uFF09\u3002

                                                                      3. \u5373\u4F7F\u6709\u591A\u6838CPU\uFF0C\u4F46\u662F\u64CD\u4F5C\u7CFB\u7EDF\u7684\u5E76\u53D1\u6027\u4F9D\u7136\u5FC5\u4E0D\u53EF\u5C11\uFF01\uFF01\u9664\u975E\u6709\u591A\u5C11\u6838\u5FC3\uFF0C\u5C31\u53EA\u6709\u591A\u5C11\u4EFB\u52A1\u6570\uFF0C\u90A3\u4E48\u5C31\u53EA\u9700\u8981\u591A\u5C11\u4E2A\u7EBF\u7A0B\u5C31\u80FD\u5904\u7406\u4E86\uFF0C\u8FBE\u5230\u771F\u6B63\u7684\u5E76\u884C\uFF0C\u4F46\u662F\u4EFB\u52A1\u6570\u6216\u8005\u7EBF\u7A0B\u6570\u6BD4\u6838\u5FC3\u591A\u662F\u5F88\u5E38\u89C1\u7684\u60C5\u51B5\u3002\uFF08\u5728\u8FD9\u79CD\u573A\u666F\u4E0B\uFF0C\u5C06\u7EBF\u7A0B\u548C\u4EFB\u52A1\u8BA4\u4E3A\u662F\u4E00\u4E2A\u4E1C\u897F\u662F\u6CA1\u6709\u95EE\u9898\u7684\uFF0C\u5728Java\u7EBF\u7A0B\u6C60\u7684\u90E8\u5206\uFF0C\u7EBF\u7A0B\u548C\u4EFB\u52A1\u4E0D\u8981\u8BA4\u4E3A\u662F\u4E00\u4E2A\u4E1C\u897F\uFF0C\u4EFB\u52A1\u672C\u8D28\u662F\u5B9E\u73B0\u4E86Runnable\u6216\u8005\u8BF4Callable\u63A5\u53E3\u7684\u5B9E\u73B0\u7C7B\u5BF9\u8C61\uFF0C\u4EFB\u52A1\u662F\u8981\u4EA4\u7ED9\u7EBF\u7A0B\u6765\u6267\u884C\u7684\uFF0C\u5982\u679C\u7EBF\u7A0B\u8FBE\u5230\u6838\u5FC3\u7EBF\u7A0B\u6570\u91CF\u7684\u6700\u5927\u503C\uFF0C\u90A3\u4E48\u4F1A\u53BB\u68C0\u67E5\u4EFB\u52A1\u963B\u585E\u961F\u5217\u662F\u5426\u6EE1\uFF0C\u5982\u679C\u672A\u6EE1\uFF0C\u5219\u65B0\u4EFB\u52A1\u4F1A\u6DFB\u52A0\u8FDB\u963B\u585E\u961F\u5217\uFF0C\u5982\u679C\u5DF2\u6EE1\uFF0C\u518D\u68C0\u67E5\u6B64\u7EBF\u7A0B\u6C60\u7684\u6700\u5927\u7EBF\u7A0B\u6570\uFF0C\u5982\u679C\u672A\u8FBE\u5230\u6700\u5927\u7EBF\u7A0B\u6570\uFF0C\u5C06\u6B64\u4EFB\u52A1\u4EA4\u7ED9\u975E\u6838\u5FC3\u7EBF\u7A0B\u6267\u884C\uFF0C\u975E\u6838\u5FC3\u7EBF\u7A0B\u662F\u6709\u5B58\u6D3B\u65F6\u95F4\u7684\uFF0C\u5982\u679C\u5DF2\u8FBE\u5230\u6700\u5927\u7EBF\u7A0B\u6570\uFF0C\u8BF4\u660E\u6CA1\u6709\u591A\u7684\u7EBF\u7A0B\u80FD\u591F\u6267\u884C\u6B64\u4EFB\u52A1\uFF0C\u90A3\u4E48\u4F1A\u6267\u884C\u62D2\u7EDD\u7B56\u7565\u3002\uFF09

                                                                      4. CPU\u67094\u4E2A\u6838\u5FC3\uFF0C\u610F\u5473\u7740\u53EF\u4EE5\u5E76\u884C\u5730\u6267\u884C4\u4E2A\u4EFB\u52A1\uFF0C\u4F46\u662F\u8BA1\u7B97\u673A\u540C\u65F6\u8FD0\u884C\u8D85\u8FC74\u4E2A\u4EFB\u52A1\u7684\u60C5\u51B5\u662F\u5B58\u5728\u7684\u3002\u6240\u4EE5\u5E76\u53D1\u5FC5\u4E0D\u53EF\u5C11\uFF0C\u4E5F\u5C31\u662F\u5FAE\u89C2\u4E0A\u7684\u5E76\u53D1\u6267\u884C\uFF0C\u4EFB\u52A1\u5E76\u53D1\u5730\u5360\u7528CPU\u8D44\u6E90\u8FD9\u79CD\u60C5\u51B5\u5FC5\u4E0D\u53EF\u5C11\u3002

                                                                      \u5171\u4EAB

                                                                      1. \u5171\u4EAB\u5373\u8D44\u6E90\u5171\u4EAB\uFF0C\u5206\u4E3A\u540C\u65F6\u5171\u4EAB\u548C\u4E92\u65A5\u5171\u4EAB\u3002

                                                                        \u5171\u4EAB\u662F\u6307\u7CFB\u7EDF\u4E2D\u7684\u8D44\u6E90\u53EF\u4F9B\u5185\u5B58\u4E2D\u591A\u4E2A\u5E76\u53D1\u6267\u884C\u7684\u8FDB\u7A0B\u5171\u540C\u4F7F\u7528\u3002

                                                                      2. \u4E92\u65A5\u5171\u4EAB\uFF1A

                                                                        \u7CFB\u7EDF\u4E2D\u7684\u67D0\u4E9B\u8D44\u6E90\uFF0C\u867D\u7136\u53EF\u4EE5\u63D0\u4F9B\u7ED9\u591A\u4E2A\u8FDB\u7A0B\u4F7F\u7528\uFF0C\u4F46\u4E00\u4E2A\u65F6\u95F4\u6BB5\u5185\u53EA\u5141\u8BB8\u4E00\u4E2A\u8FDB\u7A0B\u8BBF\u95EE\u8BE5\u8D44\u6E90\u3002

                                                                        \u4F7F\u7528QQ\u548C\u5FAE\u4FE1\u89C6\u9891\uFF0C\u540C\u4E00\u65F6\u95F4\u6BB5\u5185\u6444\u50CF\u5934\u53EA\u80FD\u5206\u914D\u7ED9\u5176\u4E2D\u4E00\u4E2A\u8FDB\u7A0B\u3002

                                                                        \u540C\u65F6\u5171\u4EAB\uFF1A

                                                                        \u7CFB\u7EDF\u4E2D\u7684\u67D0\u4E9B\u8D44\u6E90\uFF0C\u5141\u8BB8\u4E00\u4E2A\u65F6\u95F4\u6BB5\u5185\u591A\u4E2A\u8FDB\u7A0B\u201C\u540C\u65F6\u201D\u5BF9\u4ED6\u4EEC\u8FDB\u884C\u8BBF\u95EE\uFF08\u5B8F\u89C2\u4E0A\u662F\u540C\u65F6\u7684\uFF09

                                                                        \u6240\u8C13\u7684\u540C\u65F6\u5F80\u5F80\u662F\u5B8F\u89C2\u4E0A\u7684\uFF0C\u800C\u5728\u5FAE\u89C2\u4E0A\uFF0C\u8FD9\u4E9B\u8FDB\u7A0B\u53EF\u80FD\u662F\u4EA4\u66FF\u5730\u5BF9\u8BE5\u8D44\u6E90\u8FDB\u884C\u8BBF\u95EE\u7684\u3002\u5FAE\u89C2\u4E0A\u4EA4\u66FF\u5C31\u662F\u5E76\u53D1\u3002\uFF08\u540C\u65F6\u5171\u4EAB\uFF0C\u5FAE\u89C2\u4E0A\u591A\u4E2A\u8FDB\u7A0B\u53EF\u80FD\u662F\u771F\u7684\u540C\u65F6\u8BBF\u95EE\u8D44\u6E90\uFF09

                                                                      3. \u5E76\u53D1\u6027\u662F\u6307\u8BA1\u7B97\u673A\u7CFB\u7EDF\u4E2D\u540C\u65F6\u5B58\u5728\u7740\u591A\u4E2A\u8FD0\u884C\u7740\u7684\u7A0B\u5E8F\uFF0C\u8FD9\u4E9B\u7A0B\u5E8F\u5728\u5FAE\u89C2\u4E0A\u662F\u7531CPU\u4EA4\u66FF\u6267\u884C\u7684\uFF08\u6BD4\u5982\u5355\u6838cpu\uFF0C\u4F46\u662F\u91C7\u7528\u591A\u7EBF\u7A0B\u7684\u65B9\u5F0F\u6267\u884C\u4EFB\u52A1\uFF0C\u90A3\u4E48\u5C31\u4F1A\u51FA\u73B0\u5FAE\u89C2\u4E0A\u5E76\u53D1\uFF0C\u5B8F\u89C2\u4E0A\u5E76\u884C\uFF09

                                                                        \u5171\u4EAB\u6027\u662F\u6307\u8FDB\u7A0B\u53EF\u4EE5\u540C\u65F6\u8BBF\u95EE\u7CFB\u7EDF\u8D44\u6E90\uFF0C\u53EF\u4EE5\u662F\u4E00\u6BB5\u65F6\u95F4\u6BB5\u5185\u53EA\u6709\u4E00\u4E2A\u8FDB\u7A0B\u80FD\u591F\u8BBF\u95EE\uFF0C\u8FD9\u53EB\u4E92\u65A5\u5171\u4EAB\uFF0C\u53EF\u4EE5\u662F\u4E00\u6BB5\u65F6\u95F4\u7AEF\u5185\u591A\u4E2A\u8FDB\u7A0B\u540C\u65F6\u8BBF\u95EE\uFF0C\u8FD9\u662F\u540C\u65F6\u5171\u4EAB\u3002

                                                                        \u5982\u679C\u5931\u53BB\u5E76\u53D1\u6027\uFF0C\u5219\u7CFB\u7EDF\u4E2D\u53EA\u6709\u4E00\u4E2A\u7A0B\u5E8F\u6B63\u5728\u8FD0\u884C\uFF0C\u5219\u5171\u4EAB\u6027\u5931\u53BB\u5B58\u5728\u7684\u610F\u4E49

                                                                        \u5982\u679C\u5931\u53BB\u5171\u4EAB\u6027\uFF0C\u5219\u591A\u4E2A\u8FDB\u7A0B\u4E0D\u80FD\u540C\u65F6\u8BBF\u95EE\u786C\u76D8\u8D44\u6E90\uFF0C\u5C31\u65E0\u6CD5\u5B9E\u73B0\u540C\u65F6\u53D1\u9001\u6587\u4EF6\uFF0C\u4E5F\u5C31\u65E0\u6CD5\u5E76\u53D1\u3002

                                                                        \u6240\u4EE5\u5171\u4EAB\u6027\u548C\u5E76\u53D1\u6027\u662F\u76F8\u4E92\u4F9D\u5B58\u7684\u3002

                                                                      \u865A\u62DF

                                                                      1. \u865A\u62DF\u662F\u6307\u628A\u4E00\u4E2A\u7269\u7406\u4E0A\u7684\u5B9E\u4F53\u53D8\u4E3A\u82E5\u5E72\u4E2A\u903B\u8F91\u4E0A\u7684\u5BF9\u5E94\u7269\uFF0C\u7269\u7406\u5B9E\u4F53\u662F\u5B9E\u9645\u5B58\u5728\u7684\uFF0C\u800C\u903B\u8F91\u4E0A\u5BF9\u5E94\u7269\u662F\u7528\u6237\u611F\u53D7\u5230\u7684\u3002

                                                                        \u865A\u62DF\u6280\u672F\u4E2D\u7684\u7A7A\u5206\u590D\u7528\u6280\u672F---\u865A\u62DF\u5B58\u50A8\u5668\u6280\u672F

                                                                        image-20211029171246758

                                                                      2. \u865A\u62DF\u6280\u672F\u7684\u65F6\u5206\u590D\u7528\u6280\u672F---\u865A\u62DF\u5904\u7406\u5668\u6280\u672F

                                                                        image-20211029171359873

                                                                        \u5904\u7406\u5668\u628A\u5927\u7684\u65F6\u95F4\u6BB5\u5206\u4E3A\u5404\u4E2A\u5F88\u5C0F\u7684\u65F6\u95F4\u7247\uFF0C\u901A\u8FC7\u65F6\u95F4\u7247\u8F6E\u8F6C\u7684\u673A\u5236\uFF0C\u4EA4\u66FF\u4E3A\u5404\u4E2A\u8FDB\u7A0B\u670D\u52A1\uFF0C\u8FD9\u662F\u65F6\u5206\u590D\u7528\u6280\u672F\uFF0C\u4E5F\u5C31\u662F\u865A\u62DF\u5904\u7406\u5668\u6280\u672F\uFF0C\u800C\u7A7A\u5206\u590D\u7528\u6280\u672F\u662F\u865A\u62DF\u5B58\u50A8\u5668\u6280\u672F\u3002

                                                                      3. \u663E\u7136\uFF0C\u5982\u679C\u5931\u53BB\u4E86\u5E76\u53D1\u6027\uFF0C\u5219\u4E00\u4E2A\u65F6\u95F4\u6BB5\u5185\u7CFB\u7EDF\u53EA\u9700\u8FD0\u884C\u4E00\u9053\u7A0B\u5E8F\uFF0C\u90A3\u4E48\u5C31\u5931\u53BB\u4E86\u5B9E\u73B0\u865A\u62DF\u6027\u7684\u610F\u4E49\u4E86\uFF0C\u56E0\u6B64\u6CA1\u6709\u5E76\u53D1\u6027\u5C31\u8C08\u4E0D\u4E0A\u865A\u62DF\u6027\u3002

                                                                      \u5F02\u6B65

                                                                      1. \u5F02\u6B65\u662F\u6307\uFF0C\u5728\u591A\u9053\u7A0B\u5E8F\u73AF\u5883\u4E0B\uFF0C\u5141\u8BB8\u591A\u4E2A\u7A0B\u5E8F\u5E76\u53D1\u6267\u884C\uFF0C\u4F46\u7531\u4E8E\u7CFB\u7EDF\u8D44\u6E90\u6709\u9650\uFF0C\u8FDB\u7A0B\u7684\u6267\u884C\u4E0D\u662F\u4E00\u8D2F\u5230\u5E95\u7684\uFF0C\u800C\u662F\u8D70\u8D70\u505C\u505C\uFF0C\u4EE5\u4E0D\u53EF\u9884\u77E5\u7684\u901F\u5EA6\u5411\u524D\u63A8\u8FDB\uFF0C\u8FD9\u5C31\u662F\u8FDB\u7A0B\u7684\u5F02\u6B65\u6027\u3002

                                                                        \u56E0\u4E3A\u5E76\u53D1\uFF0C\u56E0\u4E3A\u5171\u4EAB\uFF0C\u591A\u4E2A\u8FDB\u7A0B\u540C\u65F6\u8BBF\u95EE\u67D0\u4E2A\u7CFB\u7EDF\u8D44\u6E90\uFF0C\u6240\u4EE5\u5F02\u6B65\uFF0C\u4E0D\u53EF\u9884\u77E5\u7684\u901F\u5EA6\u63A8\u8FDB\uFF0C\u5982\u679C\u540C\u6B65\uFF0C\u90A3\u4E48\u4E00\u4E2A\u8FDB\u7A0B\u8BBF\u95EE\u5B8C\u6B64\u7CFB\u7EDF\u8D44\u6E90\u4E4B\u540E\uFF0C\u624D\u80FD\u53E6\u4E00\u4E2A\u8FDB\u7A0B\u8BBF\u95EE\u8FD9\u4E2A\u7CFB\u7EDF\u8D44\u6E90\uFF0C\u63A5\u7740\u4E0B\u4E00\u4E2A\u8FDB\u7A0B\uFF0C\u8FD9\u5C31\u662F\u540C\u6B65\uFF0C\u901F\u5EA6\u662F\u53EF\u9884\u77E5\u7684\uFF0C\u6CA1\u6709\u5171\u4EAB\u6027\uFF0C\u6CA1\u6709\u5E76\u53D1\uFF0C\u4E00\u4E2A\u6267\u884C\u5B8C\u4E4B\u540E\u4E0B\u4E00\u4E2A\u624D\u6267\u884C\u3002\uFF08\u8FD9\u91CC\u7684\u7CFB\u7EDF\u8D44\u6E90\u53EF\u4EE5\u7406\u89E3\u4E3ACPU\u65F6\u95F4\u7247\u3002\uFF09

                                                                        \u663E\u7136\uFF0C\u5982\u679C\u5931\u53BB\u4E86\u5E76\u53D1\u6027\uFF0C\u90A3\u4E48\u7CFB\u7EDF\u53EA\u80FD\u4E32\u884C\u5730\u5904\u7406\u5404\u4E2A\u8FDB\u7A0B\uFF0C\u867D\u7136\u56E0\u4E3A\u5E76\u53D1\uFF0C\u8FDB\u7A0B\u5728\u5FAE\u89C2\u4E0A\u4ECD\u7136\u662F\u88ABCPU\u4E32\u884C\u5904\u7406\u7684\uFF0C\u4F46\u662F\u6709\u4E0A\u4E0B\u6587\u5207\u6362\uFF0C\u6709\u7A0B\u5E8F\u8BA1\u6570\u5668\u4FDD\u5B58\u4E0B\u4E00\u6761\u5B57\u8282\u7801\u6307\u4EE4\u7684\u6267\u884C\u5730\u5740\uFF0C\u5E76\u4E0D\u662F\u4E00\u4E2A\u8FDB\u7A0B\u5B8C\u5168\u6267\u884C\u5B8C\u4E4B\u540E\u624D\u4F1A\u6267\u884C\u53E6\u4E00\u4E2A\u8FDB\u7A0B\uFF0C\u8FD9\u6D89\u53CA\u5230CPU\u5BF9\u591A\u7EBF\u7A0B\u7684\u6267\u884C\u7B56\u7565\uFF0C\u6BD4\u5982\u65F6\u95F4\u7247\u8F6E\u8F6C\u673A\u5236\u3002\u4F46\u662F\u4E32\u884C\u5C31\u6307\u7684\u662F\u4E00\u4E2A\u8FDB\u7A0B\u6267\u884C\u5B8C\u4E4B\u540E\u518D\u6267\u884C\u53E6\u4E00\u4E2A\u8FDB\u7A0B\u3002

                                                                        \u53EA\u6709\u7CFB\u7EDF\u62E5\u6709\u5E76\u53D1\u6027\uFF0C\u90A3\u4E48\u865A\u62DF\uFF0C\u5171\u4EAB\uFF0C\u5F02\u6B65\u624D\u6709\u610F\u4E49\u3002\u56E0\u4E3A\u6B63\u662F\u56E0\u4E3A\u5E76\u53D1\u6027\uFF0C\u4F7F\u5F97\u5171\u4EAB\u6027\u6709\u610F\u4E49\uFF0C\u5BF9\u7CFB\u7EDF\u8D44\u6E90\u7684\u5171\u4EAB\uFF08\u6BD4\u5982CPU\u65F6\u95F4\u7247\uFF09\uFF0C\u540C\u65F6\u7531\u4E8E\u7CFB\u7EDF\u8D44\u6E90\u7684\u9650\u5236\uFF0C\u5BFC\u81F4\u591A\u4E2A\u8FDB\u7A0B\u662F\u8D70\u8D70\u505C\u505C\uFF08\u5FAE\u89C2\u4E0A\u4ECD\u662F\u4E32\u884C\uFF0C\u4F46\u662F\u662F\u901A\u8FC7\u4E0A\u4E0B\u6587\u5207\u6362\uFF09\uFF0C\u4EE5\u4E0D\u53EF\u9884\u77E5\u7684\u901F\u5EA6\u5411\u524D\u63A8\u8FDB\uFF0C\u5BFC\u81F4\u4E86\u5F02\u6B65\u6027\u3002

                                                                        \u5982\u679C\u6CA1\u6709\u5E76\u53D1\u6027\uFF0C\u90A3\u4E48\u5C31\u662F\u67D0\u4E2A\u8FDB\u7A0B\u5B8C\u5168\u6267\u884C\u5B8C\u4E4B\u540E\uFF08\u56E0\u4E3A\u6CA1\u6709\u5E76\u53D1\u6027\uFF01\uFF01\uFF09\uFF0C\u6267\u884C\u4E0B\u4E00\u4E2A\u8FDB\u7A0B\uFF0C\u8FD9\u5C31\u662F\u540C\u6B65\u7684\uFF0C\u4E0D\u53EF\u80FD\u4F1A\u5BFC\u81F4\u5F02\u6B65\u6027\u3002\u4E00\u4E2A\u8FDB\u7A0B\u7684\u6267\u884C\u5FC5\u987B\u5B8C\u5168\u7B49\u4E0A\u4E00\u4E2A\u8FDB\u7A0B\u5B8C\u5168\u6267\u884C\u5B8C\u4E4B\u540E\u624D\u53EF\u4EE5\u6267\u884C\uFF0C\u56E0\u4E3A\u6CA1\u6709\u5E76\u53D1\uFF0C\u610F\u5473\u7740\u6CA1\u6709\u5B8F\u89C2\u4E0A\u7684\u5E76\u884C\u6267\u884C\uFF0C\u5FC5\u987B\u4E00\u4E2A\u63A5\u4E00\u4E2A\u3002

                                                                      2. \u5982\u679C\u8FDB\u7A0B\u7531\u4E8E\u6CA1\u6709\u83B7\u5F97\u67D0\u4E2A\u9700\u8981\u7684\u7CFB\u7EDF\u8D44\u6E90\uFF0C\u5BFC\u81F4\u8FDB\u7A0B\u65E0\u6CD5\u6267\u884C\uFF0C\u5219\u8FDB\u7A0B\u4F1A\u963B\u585E\uFF0C\u76F4\u5230\u83B7\u5F97\u7CFB\u7EDF\u8D44\u6E90\uFF0C\u8FDB\u7A0B\u88AB\u5524\u9192\uFF0C\u8FDB\u5165\u5C31\u7EEA\u72B6\u6001\uFF0C\u83B7\u5F97CPU\u65F6\u95F4\u7247\u4E4B\u540E\uFF0C\u8FDB\u7A0B\u7EE7\u7EED\u6267\u884C\u3002

                                                                      3. \u6CA1\u6709\u5E76\u53D1\u548C\u5171\u4EAB\uFF0C\u5C31\u8C08\u4E0D\u4E0A\u865A\u62DF\u548C\u5F02\u6B65\uFF0C\u56E0\u6B64\u5E76\u53D1\u548C\u5171\u4EAB\u662F\u64CD\u4F5C\u7CFB\u7EDF\u4E24\u4E2A\u6700\u57FA\u672C\u7684\u7279\u5F81\u3002

                                                                      \u64CD\u4F5C\u7CFB\u7EDF\u7684\u53D1\u5C55\u548C\u5206\u7C7B

                                                                      1. \u8BA1\u7B97\u673A\u53EF\u4EE5\u8BC6\u522B\u7684\u662F\u4E8C\u8FDB\u5236\u7684\u673A\u5668\u7801\uFF0C\u8BA1\u7B97\u673A\u53EA\u80FD\u4E4B\u522B0\u548C1\u4E8C\u8FDB\u5236\u6570\u3002

                                                                      2. OS\u7684\u53D1\u5C55\u548C\u5206\u7C7B

                                                                        image-20211215180652752

                                                                      3. \u624B\u5DE5\u64CD\u4F5C\u9636\u6BB5

                                                                        \u4E3B\u8981\u7F3A\u70B9\uFF1A\u7528\u6237\u72EC\u5360\u5168\u673A\uFF0C\u4EBA\u673A\u901F\u5EA6\u77DB\u76FE\u5BFC\u81F4\u8D44\u6E90\u5229\u7528\u7387\u4F4E\u3002

                                                                      4. \u5355\u9053\u6279\u5904\u7406\u7CFB\u7EDF

                                                                        \u5F15\u5165\u8131\u673A\u8F93\u5165\u3001\u8F93\u51FA\u6280\u672F\uFF08\u7528\u78C1\u5E26\u5B8C\u6210\uFF09\uFF0C\u5E76\u76D1\u7763\u7A0B\u5E8F\u8D1F\u8D23\u63A7\u5236\u4F5C\u4E1A\u7684\u8F93\u5165\u3001\u8F93\u51FA\u3002

                                                                        \u4E3B\u8981\u7F3A\u70B9\uFF1A\u5185\u5B58\u4E2D\u4EC5\u80FD\u6709\u4E00\u9053\u7A0B\u5E8F\u8FD0\u884C\uFF0C\u53EA\u6709\u8BE5\u7A0B\u5E8F\u8FD0\u884C\u7ED3\u675F\u4E4B\u540E\uFF0C\u624D\u80FD\u8C03\u5165\u4E0B\u4E00\u9053\u7A0B\u5E8F\uFF0CCPU\u6709\u5927\u91CF\u7684\u65F6\u95F4\u662F\u5728\u7A7A\u95F2\u7B49\u5F85IO\u5B8C\u6210\uFF0C\u8D44\u6E90\u5229\u7528\u7387\u4F9D\u65E7\u5F88\u4F4E\u3002\u4ECE\u8FD9\u91CC\u53EF\u4EE5\u770B\u51FA\uFF0C\u5355\u9053\u6279\u5904\u7406\u7CFB\u7EDF\u7684\u7F3A\u70B9\u5C31\u662F\u4E0D\u91C7\u7528\u591A\u7EBF\u7A0B\u7684\u7F3A\u70B9\u6216\u8005\u8BF4\u662F\u7CFB\u7EDF\u4E0D\u80FD\u5E76\u53D1\u6267\u884C\u8FDB\u7A0B\uFF0C\u53EA\u80FD\u4E32\u884C\u6267\u884C\u8FDB\u7A0B\u7684\u7F3A\u70B9\uFF0C\u5BFC\u81F4CPU\u5927\u91CF\u65F6\u95F4\u5904\u4E8E\u7A7A\u95F2\u72B6\u6001\uFF0C\u56E0\u4E3A\u7EBF\u7A0B\u6216\u8005\u8BF4\u8FDB\u7A0B\u6B63\u5728\u6267\u884CIO\u64CD\u4F5C\uFF0C\u90A3\u4E48\u4F1A\u963B\u585E\uFF0C\u6B64\u65F6CPU\u5904\u4E8E\u7A7A\u95F2\u72B6\u6001\uFF0C\u56E0\u4E3A\u8FDB\u7A0B\u6216\u8005\u7EBF\u7A0B\u963B\u585E\u4E86\uFF0CCPU\u4E0D\u80FD\u53BB\u6267\u884C\u522B\u7684\u7EBF\u7A0B\u6216\u8005\u8FDB\u7A0B\u6216\u8005\u4EFB\u52A1\uFF0C\u56E0\u4E3A\uFF0C\u4E32\u884C\u6267\u884C\uFF01\uFF01\u6240\u4EE5\u8981\u91C7\u7528\u591A\u7EBF\u7A0B\uFF0C\u6216\u8005\u8BF4\u8981\u591A\u7EBF\u7A0B\u7684\u597D\u5904\u3001\u5E76\u53D1\u6267\u884C\u7A0B\u5E8F\u7684\u597D\u5904\uFF0C\u5C31\u662F\u8BA9\u63D0\u9AD8CPU\u7684\u5229\u7528\u7387\uFF0C\u4EE5\u514D\u5F53\u67D0\u4E2A\u8FDB\u7A0BIO\u963B\u585E\u7684\u65F6\u5019\uFF0CCPU\u80FD\u591F\u6267\u884C\u53E6\u4E00\u4E2A\u8FDB\u7A0B\u6216\u7EBF\u7A0B\u800C\u4E0D\u662F\u5904\u4E8E\u7A7A\u95F2\u72B6\u6001\uFF0C\u63D0\u9AD8\u4E86\u5229\u7528\u7387\uFF0C\u63D0\u9AD8\u4E86\u7CFB\u7EDF\u7684\u541E\u5410\u91CF\u3002

                                                                      5. \u591A\u9053\u6279\u5904\u7406\u7CFB\u7EDF

                                                                        \u4E3B\u8981\u4F18\u70B9\uFF1A\u591A\u9053\u7A0B\u5E8F\u5E76\u53D1\u6267\u884C\uFF0C\u5171\u4EAB\u8BA1\u7B97\u673A\u8D44\u6E90\uFF0C\u8D44\u6E90\u5229\u7528\u7387\u5927\u5E45\u63D0\u5347\uFF0CCPU\u548C\u5176\u4ED6\u8D44\u6E90\u4FDD\u6301\u5FD9\u788C\u72B6\u6001\uFF0C\u63D0\u9AD8\u4E86CPU\u6267\u884C\u6548\u7387\uFF0C\u7CFB\u7EDF\u541E\u5410\u91CF\u589E\u5927\u3002\u8FD9\u5C31\u548C\u524D\u9762\u8BF4\u7684\u5355\u7EBF\u7A0B\u7684\u7F3A\u70B9\u76F8\u5BF9\u5E94\uFF0C\u5982\u679C\u662F\u5355\u7EBF\u7A0B\u6267\u884C\u4EFB\u52A1\uFF0C\u5982\u679C\u6267\u884C\u4E86IO\u5E76\u963B\u585E\uFF0C\u90A3\u4E48\u7EBF\u7A0B\u963B\u585E\uFF0CCPU\u4E5F\u53EA\u6709\u8DDF\u7740\u7B49\u5F85\uFF0C\u5982\u679C\u662F\u591A\u7EBF\u7A0B\uFF0CCPU\u53EF\u4EE5\u628A\u65F6\u95F4\u7247\u5206\u7ED9\u522B\u7684\u7EBF\u7A0B\uFF0C\u53BB\u6267\u884C\u522B\u7684\u4EFB\u52A1\uFF0C\u63D0\u9AD8CPU\u7684\u6267\u884C\u6548\u7387\uFF0C\u4E0D\u8BA9CPU\u7A7A\u95F2\u7B49\u5F85\uFF0C\u589E\u5927\u4E86\u7CFB\u7EDF\u541E\u5410\u91CF\u3002

                                                                        Redis\u662F\u91C7\u7528\u5355\u7EBF\u7A0B\uFF0C\u5C31\u662F\u56E0\u4E3Aredis\u6240\u6709\u64CD\u4F5C\u90FD\u5728\u5185\u5B58\u8303\u56F4\u5185\uFF0C\u4E0D\u6D89\u53CA\u5185\u5B58\u548C\u78C1\u76D8\u4E4B\u95F4\u7684IO\uFF0C\u6240\u4EE5\u4E0D\u5B58\u5728\u7EBF\u7A0B\u4F1A\u7531\u4E8EIO\u800C\u963B\u585E\u7684\u60C5\u51B5\uFF0CCPU\u4E5F\u4E0D\u4F1A\u56E0\u4E3A\u7EBF\u7A0B\u963B\u585E\u800C\u7B49\u5F85\uFF0C\u4E5F\u4E0D\u9700\u8981\u591A\u7EBF\u7A0B\u6765\u63D0\u9AD8\u7CFB\u7EDF\u7684\u541E\u5410\u91CF\u3002

                                                                      6. \u5355\u9053\u6279\u5904\u7406\u6280\u672F

                                                                        image-20211029181727331

                                                                        \u591A\u4E2A\u7A0B\u5E8F\u4E32\u884C\u6267\u884C\uFF0C\u4E32\u884C\u5DE5\u4F5C\u3002

                                                                        \u591A\u9053\u6279\u5904\u7406\u6280\u672F\u662F\u591A\u9053\u7A0B\u5E8F\u5E76\u53D1\u6267\u884C\u3002\uFF08\u4F46\u662F\u5E76\u4E0D\u662F\u65F6\u95F4\u7247\u8F6E\u8F6C\uFF0C\u800C\u662F\u4E00\u4E2A\u8FDB\u7A0B\u7684\u67D0\u9879\u4EFB\u52A1\u6267\u884C\u5B8C\u4E4B\u540E\uFF0CCPU\u518D\u53BB\u6267\u884C\u53E6\u4E00\u4E2A\u8FDB\u7A0B\u3002\uFF09

                                                                        image-20211029181850429

                                                                        \u4F7F\u7CFB\u7EDF\u8D44\u6E90\u5229\u7528\u7387\u5927\u5E45\u5EA6\u63D0\u5347

                                                                        \u4E0D\u540C\u8FDB\u7A0B\u5728\u5404\u81EA\u7684\u67D0\u4E9B\u9636\u6BB5\uFF0C\u80FD\u591F\u8FDB\u884C\u5E76\u884C\u7684\u5DE5\u4F5C\uFF0C\u6240\u4EE5\u63D0\u9AD8\u4E86\u7CFB\u7EDF\u8D44\u6E90\u5229\u7528\u7387\u3002

                                                                      7. \u5206\u65F6\uFF08\u65F6\u95F4\u7247\uFF09\u64CD\u4F5C\u7CFB\u7EDF\uFF1A

                                                                        \u8BA1\u7B97\u673A\u4EE5\u65F6\u95F4\u7247\u4E3A\u5355\u4F4D\u8F6E\u6D41\u4E3A\u5404\u4E2A\u7528\u6237/\u4F5C\u4E1A\u670D\u52A1\uFF0C\u5404\u4E2A\u7528\u6237\u53EF\u901A\u8FC7\u7EC8\u7AEF\u4E0E\u8BA1\u7B97\u673A\u8FDB\u884C\u4EA4\u4E92

                                                                        \u4E3B\u8981\u7F3A\u70B9\uFF1A

                                                                        \u4E0D\u80FD\u4F18\u5148\u5904\u7406\u4E00\u4E9B\u7D27\u6025\u4EFB\u52A1\uFF0C\u64CD\u4F5C\u7CFB\u7EDF\u5BF9\u5404\u4E2A\u7528\u6237/\u4F5C\u4E1A\u662F\u5B8C\u5168\u516C\u5E73\u7684\uFF0C\u5FAA\u73AF\u5730\u4F4D\u6BCF\u4E2A\u7528\u6237/\u4F5C\u4E1A\u670D\u52A1\u4E00\u4E2A\u65F6\u95F4\u7247\uFF0C\u4E0D\u533A\u5206\u4EFB\u52A1\u7684\u7D27\u6025\u6027\u3002\uFF08\u5728\u8FD9\u79CD\u573A\u666F\u4E0B\uFF0C\u4EFB\u52A1\u548C\u7EBF\u7A0B\u53EF\u4EE5\u7406\u89E3\u4E3A\u540C\u6837\u7684\u3002\uFF09

                                                                      8. \u5B9E\u65F6\u64CD\u4F5C\u7CFB\u7EDF\uFF1A

                                                                        \u4F18\u70B9\uFF1A\u80FD\u591F\u4F18\u5148\u54CD\u5E94\u4E00\u4E9B\u7D27\u6025\u4EFB\u52A1\uFF0C\u67D0\u4E9B\u7D27\u6025\u4EFB\u52A1\u4E0D\u9700\u65F6\u95F4\u7247\u6392\u961F\u3002

                                                                        \u5728\u5B9E\u65F6\u64CD\u4F5C\u7CFB\u7EDF\u7684\u63A7\u5236\u4E0B\uFF0C\u8BA1\u7B97\u673A\u7CFB\u7EDF\u63A5\u6536\u5230\u5916\u90E8\u4FE1\u53F7\u540E\u53CA\u65F6\u8FDB\u884C\u5904\u7406\uFF0C\u5E76\u4E14\u8981\u5728\u4E25\u683C\u7684\u65F6\u9650\u5185\u5904\u7406\u5B8C\u4E8B\u4EF6\u3002\u5B9E\u65F6\u64CD\u4F5C\u7CFB\u7EDF\u7684\u4E3B\u8981\u7279\u70B9\u662F\u53CA\u65F6\u6027\u548C\u53EF\u9760\u6027\u3002

                                                                        \u786C\u5B9E\u65F6\u7CFB\u7EDF\uFF1A\u5FC5\u987B\u5728\u7EDD\u5BF9\u4E25\u683C\u7684\u89C4\u5B9A\u65F6\u95F4\u5185\u5B8C\u6210\u5904\u7406

                                                                        \u8F6F\u5B9E\u65F6\u7CFB\u7EDF\uFF1A\u80FD\u63A5\u6536\u5076\u5C14\u8FDD\u53CD\u65F6\u95F4\u89C4\u5B9A\u3002

                                                                      9. image-20211029182506414

                                                                      \u64CD\u4F5C\u7CFB\u7EDF\u7684\u8FD0\u884C\u673A\u5236\u548C\u4F53\u7CFB\u7ED3\u6784

                                                                      \u8FD0\u884C\u673A\u5236

                                                                      1. \u6307\u4EE4\uFF1A

                                                                        \u7279\u6743\u6307\u4EE4\uFF1A\u5982\u5185\u5B58\u6E05\u96F6\u6307\u4EE4\uFF0C\u4E0D\u5141\u8BB8\u7528\u6237\u7A0B\u5E8F\u4F7F\u7528

                                                                        \u975E\u7279\u6743\u6307\u4EE4\uFF1A\u5982\u52A0\u51CF\u4E58\u9664\u6307\u4EE4

                                                                        \u95EE\u9898\uFF1ACPU\u5982\u4F55\u5224\u65AD\u5F53\u524D\u662F\u5426\u662F\u53EF\u4EE5\u6267\u884C\u7279\u6743\u6307\u4EE4\uFF1F

                                                                        \u5C31\u662F\u901A\u8FC7CPU\u7684\u72B6\u6001\uFF0CCPU\u6709\u4E24\u79CD\u72B6\u6001\uFF0C\u7528\u6237\u6001\u548C\u6838\u5FC3\u6001\u3002

                                                                      2. \u9AD8\u7EA7\u8BED\u8A00\u4EE3\u7801\u9700\u8981\u7ECF\u8FC7\u201C\u7FFB\u8BD1\u201D\u5F97\u5230\u673A\u5668\u8BED\u8A00\u6307\u4EE4\u6216\u8005\u8BF4\u673A\u5668\u7801\uFF0C\u8FD9\u662F\u8BA1\u7B97\u673A\u80FD\u591F\u8BC6\u522B\u7684\u4E8C\u8FDB\u5236\u7801\u3002\u8FD9\u4E2A\u8FC7\u7A0B\u5728Java\u4E2D\u662F\u7F16\u8BD1\uFF0C\u4F46\u662F\u4E0D\u5B8C\u5168\u7B49\u540C\uFF0C\u56E0\u4E3AJava\u662F\u5728JVM\u57FA\u7840\u4E0A\u8FD0\u884C\uFF0CJava\u8FD9\u79CD\u9AD8\u7EA7\u8BED\u8A00\u9996\u5148\u9700\u8981\u7ECF\u8FC7\u7F16\u8BD1\u5F97\u5230\u5B57\u8282\u7801\u6587\u4EF6\uFF0C\u5B57\u8282\u7801\u4E5F\u662F\u4E8C\u8FDB\u5236\u7801\uFF0C\u4F46\u662F\u4E0D\u7B49\u540C\u4E8E\u673A\u5668\u7801\u3002

                                                                        \u5B57\u8282\u7801\u867D\u7136\u662F\u4E8C\u8FDB\u5236\u7684\uFF0C\u5B57\u8282\u7801\u6587\u4EF6\u662F\u4E8C\u8FDB\u5236\u6587\u4EF6\uFF0C\u4F46\u662F\u5B57\u8282\u7801\u5E76\u4E0D\u80FD\u591F\u76F4\u63A5\u8FD0\u884C\u5728\u64CD\u4F5C\u7CFB\u7EDF\u4E4B\u4E0A\uFF0C\u56E0\u4E3A\u5B57\u8282\u7801\u6307\u4EE4\u5E76\u975E\u7B49\u4EF7\u4E8E\u80FD\u591F\u88ABCPU\u6240\u8BC6\u522B\u7684\u673A\u5668\u6307\u4EE4\uFF08\u673A\u5668\u7801\uFF09\uFF0C\u5B57\u8282\u7801\u6587\u4EF6\u5185\u90E8\u5305\u542B\u7684\u4EC5\u4EC5\u662F\u4E00\u4E9B\u80FD\u591F\u88ABJVM\u8BC6\u522B\u7684\u5B57\u8282\u7801\u6307\u4EE4\u3001\u7B26\u53F7\u8868\uFF0C\u4EE5\u53CA\u5176\u4ED6\u8F85\u52A9\u4FE1\u606F

                                                                        \u90A3\u4E48\uFF0C\u60F3\u8BA9\u4E00\u4E2AJava\u7A0B\u5E8F\u8FD0\u884C\u8D77\u6765\uFF0CJVM\u4E2D\u6267\u884C\u5F15\u64CE\u7684\u4EFB\u52A1\u5C31\u662F\u5C06\u5B57\u8282\u7801\u6307\u4EE4\u89E3\u91CA\u3001\u7F16\u8BD1\u6210\u4E3A\u5BF9\u5E94\u5E73\u53F0\u4E0A\u7684\u672C\u5730\u673A\u5668\u6307\u4EE4\u624D\u53EF\u4EE5\uFF0C\u7B80\u5355\u6765\u8BF4\uFF0CJVM\u4E2D\u7684\u6267\u884C\u5F15\u64CE\u5145\u5F53\u4E86\u5C06\u9AD8\u7EA7\u8BED\u8A00\u7FFB\u8BD1\u4E3A\u673A\u5668\u8BED\u8A00\u7684\u8BD1\u8005

                                                                        \u6267\u884C\u5F15\u64CE\u90E8\u5206\u6709JIT\u5373\u65F6\u7F16\u8BD1\u5668\uFF0C\u8FD8\u6709\u89E3\u91CA\u5668\uFF0C\u8FD8\u6709\u5783\u573E\u56DE\u6536\u5668\uFF0C\u5176\u4E2D\u89E3\u91CA\u5668\u5C31\u662F\u89E3\u91CA\u5B57\u8282\u7801\u6307\u4EE4\u5E76\u6267\u884C\uFF0CJIT\u5373\u65F6\u7F16\u8BD1\u5668\u5C31\u662F\u5C06\u5B57\u8282\u7801\u6307\u4EE4\u518D\u7FFB\u8BD1\u6210\u673A\u5668\u6307\u4EE4\u6216\u8005\u8BF4\u673A\u5668\u7801\uFF0C\u8FD9\u4E2A\u673A\u5668\u6307\u4EE4\u662F\u80FD\u591F\u88AB\u8BA1\u7B97\u673A\u3001CPU\u3001\u6216\u8005\u8BF4\u64CD\u4F5C\u7CFB\u7EDF\u8BC6\u522B\u7684\u4E8C\u8FDB\u5236\u7801\uFF08\u867D\u7136\u5B57\u8282\u7801\u662F\u4E8C\u8FDB\u5236\u7801\uFF0C\u4F46\u662F\u4E0D\u80FD\u88AB\u64CD\u4F5C\u7CFB\u7EDF\u8BC6\u522B\uFF0C\u662F\u80FD\u591F\u88ABJVM\u8BC6\u522B\uFF0C\u8FD9\u662FJava\u7F16\u7A0B\u8BED\u8A00\u7684\u7279\u6027\uFF09\uFF0CJIT\u5373\u65F6\u7F16\u8BD1\u5668\u7684\u4F5C\u7528\u5C31\u662F\u5C06\u5B57\u8282\u7801\u7FFB\u8BD1\u6210\u673A\u5668\u7801\uFF0C\u8FD9\u662F\u4E00\u4E2A\u4E8C\u6B21\u7F16\u8BD1\u7684\u8FC7\u7A0B\uFF0C\u4E5F\u5C31\u662F\u8BF4\u7B2C\u4E00\u6B21\u7F16\u8BD1\u662F\u4ECEJava\u9AD8\u7EA7\u8BED\u8A00\u5230\u5B57\u8282\u7801\u6587\u4EF6\uFF0C\u7B2C\u4E8C\u6B21\u7F16\u8BD1\u662F\u5728JVM\u7684\u6267\u884C\u5F15\u64CE\uFF0C\u5C06\u5B57\u8282\u7801\u7FFB\u8BD1\u6210\u673A\u5668\u7801\u3002

                                                                      3. \u4E00\u6761\u9AD8\u7EA7\u8BED\u8A00\u7684\u4EE3\u7801\u7FFB\u8BD1\u8FC7\u6765\u53EF\u80FD\u56DE\u5BF9\u5E94\u591A\u6761\u6307\u4EE4

                                                                        image-20211215204419631

                                                                        \u7B80\u5355\u6765\u8BF4\uFF0C\u201C\u6307\u4EE4\u201D\u5C31\u662F\u5904\u7406\u5668\uFF08CPU\uFF09\u6216\u8005\u5E7F\u4E49\u4E0A\u8BF4\u64CD\u4F5C\u7CFB\u7EDF\u80FD\u8BC6\u522B\u3001\u6267\u884C\u7684\u6700\u57FA\u672C\u6307\u4EE4\u3002

                                                                        \u6BD4\u5982\uFF1A\u52A0\u6CD5\u6307\u4EE4\u5C31\u662F\u8BA9CPU\u8FDB\u884C\u52A0\u6CD5\u8FD0\u7B97

                                                                      4. \u4E24\u79CD\u5904\u7406\u5668\u72B6\u6001\uFF1A

                                                                        \u7528\u6237\u6001\uFF08\u76EE\u6001\uFF09\uFF1A\u6B64\u65F6CPU\u53EA\u80FD\u6267\u884C\u975E\u7279\u6743\u6307\u4EE4

                                                                        \u6838\u5FC3\u6001\uFF08\u7BA1\u6001\uFF09\uFF1A\u6B64\u65F6CPU\u53EF\u4EE5\u6267\u884C\u7279\u6743\u6307\u4EE4\u548C\u975E\u7279\u6743\u6307\u4EE4

                                                                        \u7528\u7A0B\u5E8F\u72B6\u6001\u5B57\u5BC4\u5B58\u5668PSW\u4E2D\u67D0\u6807\u5FD7\u4F4D\u6765\u6807\u8BC6\u5F53\u524D\u5904\u7406\u5668\u5904\u4E8E\u4EC0\u4E48\u72B6\u6001\uFF0C\u59820\u4E3A\u7528\u6237\u6001\uFF0C1\u4E3A\u6838\u5FC3\u6001\u3002

                                                                        \u6709\u7684\u7A0B\u5E8F\u9700\u8981\u4F7F\u7528\u7279\u6743\u6307\u4EE4\uFF0C\u6709\u7684\u7A0B\u5E8F\u53EA\u80FD\u4F7F\u7528\u975E\u7279\u6743\u6307\u4EE4\u3002

                                                                      5. \u4E24\u79CD\u7A0B\u5E8F\uFF1A

                                                                        \u5185\u6838\u7A0B\u5E8F\uFF1A\u64CD\u4F5C\u7CFB\u7EDF\u7684\u5185\u6838\u7A0B\u5E8F\u662F\u7CFB\u7EDF\u7684\u7BA1\u7406\u8005\uFF0C\u65E2\u53EF\u4EE5\u6267\u884C\u7279\u6743\u6307\u4EE4\uFF0C\u4E5F\u53EF\u4EE5\u6267\u884C\u975E\u7279\u6743\u6307\u4EE4\uFF0C\u8FD0\u884C\u5728\u6838\u5FC3\u6001\u3002

                                                                        \u5E94\u7528\u7A0B\u5E8F\uFF1A\u4E3A\u4E86\u4FDD\u8BC1\u7CFB\u7EDF\u80FD\u5B89\u5168\u8FD0\u884C\uFF0C\u666E\u901A\u5E94\u7528\u7A0B\u5E8F\u53EA\u80FD\u6267\u884C\u975E\u7279\u6743\u6307\u4EE4\uFF0C\u8FD0\u884C\u5728\u7528\u6237\u6001\u3002

                                                                      \u64CD\u4F5C\u7CFB\u7EDF\u5185\u6838

                                                                      1. image-20211031173518958

                                                                        \u7279\u6743\u6307\u4EE4\u9700\u8981\u5728\u6838\u5FC3\u6001\u6267\u884C

                                                                        \u975E\u7279\u6743\u6307\u4EE4\u65E2\u53EF\u4EE5\u5728\u6838\u5FC3\u6001\u6267\u884C\uFF0C\u4E5F\u53EF\u4EE5\u5728\u7528\u6237\u6001\u6267\u884C

                                                                        \u9700\u8981\u4F7F\u7528\u7279\u6743\u6307\u4EE4\u7684\u7A0B\u5E8F\u79F0\u4E3A\u5185\u6838\u7A0B\u5E8F

                                                                        \u53EA\u80FD\u4F7F\u7528\u975E\u7279\u6743\u6307\u4EE4\u7684\u7A0B\u5E8F\u79F0\u4E3A\u5E94\u7528\u7A0B\u5E8F

                                                                      2. \u64CD\u4F5C\u7CFB\u7EDF\u6700\u63A5\u8FD1\u786C\u4EF6\u7684\u5C42\u6B21\u662F\u64CD\u4F5C\u7CFB\u7EDF\u5185\u6838

                                                                        \u53E6\u4E00\u90E8\u5206\u662F\u975E\u5185\u6838\u529F\u80FD\uFF0C\u6240\u4EE5\u53EF\u4EE5\u628A\u64CD\u4F5C\u7CFB\u7EDF\u5206\u4E3A\u5185\u6838\u529F\u80FD\u548C\u975E\u5185\u6838\u529F\u80FD

                                                                        image-20211215205340442

                                                                        \u539F\u8BED\u662F\u4E00\u79CD\u7279\u6B8A\u7684\u7A0B\u5E8F\uFF0C\u662F\u6700\u63A5\u8FD1\u786C\u4EF6\u7684\u90E8\u5206\uFF0C\u8FD9\u79CD\u7A0B\u5E8F\u7684\u8FD0\u884C\u5177\u6709\u539F\u5B50\u6027\u3002

                                                                      3. \u5185\u6838\u662F\u8BA1\u7B97\u673A\u4E0A\u914D\u7F6E\u7684\u5E95\u5C42\u8F6F\u4EF6\uFF08\u64CD\u4F5C\u7CFB\u7EDF\u672C\u8EAB\u662F\u7CFB\u7EDF\u8F6F\u4EF6\uFF0C\u53C8\u5206\u4E3A\u5185\u6838\u548C\u975E\u5185\u6838\u4E24\u90E8\u5206\uFF09\uFF0C\u662F\u64CD\u4F5C\u7CFB\u7EDF\u6700\u57FA\u672C\u6700\u6838\u5FC3\u7684\u90E8\u5206\uFF0C\u800C\u5B9E\u73B0\u64CD\u4F5C\u7CFB\u7EDF\u5185\u6838\u529F\u80FD\u7684\u7A0B\u5E8F\u5C31\u662F\u5185\u6838\u7A0B\u5E8F\u3002

                                                                        image-20211031180947464

                                                                      \u64CD\u4F5C\u7CFB\u7EDF\u4F53\u7CFB\u7ED3\u6784

                                                                      1. \u6709\u7684\u64CD\u4F5C\u7CFB\u7EDF\u5E76\u4E0D\u628A\u5BF9\u7CFB\u7EDF\u8D44\u6E90\u8FDB\u884C\u7BA1\u7406\u7684\u529F\u80FD\u5212\u5206\u4E3A\u5185\u6838\u529F\u80FD

                                                                        \u5982\u679C\u628A\u5BF9\u7CFB\u7EDF\u8D44\u6E90\u8FDB\u884C\u7BA1\u7406\uFF08\u5904\u7406\u5668\u7BA1\u7406\u3001\u5B58\u50A8\u5668\u7BA1\u7406\u3001\u8BBE\u5907\u7BA1\u7406\u3001\u6587\u4EF6\u7BA1\u7406\uFF09\u7684\u529F\u80FD\u4E5F\u5212\u5206\u4E3A\u5185\u6838\u529F\u80FD\uFF0C\u5219\u79F0\u8FD9\u4E2A\u5185\u6838\u662F\u5927\u5185\u6838

                                                                        \u5982\u679C\u4E0D\u628A\u7CFB\u7EDF\u8D44\u6E90\u7BA1\u7406\u529F\u80FD\u5212\u5206\u4E3A\u5185\u6838\u529F\u80FD\uFF0C\u5219\u79F0\u5185\u6838\u662F\u5FAE\u5185\u6838\u3002

                                                                      2. image-20211031181418067

                                                                        \u5927\u5185\u6838\u7684\u4F18\u70B9\u5C31\u662F\u6027\u80FD\u9AD8\uFF0C\u4E3B\u8981\u529F\u80FD\u6A21\u5757\u90FD\u8FD0\u884C\u5728\u6838\u5FC3\u6001\uFF0C\u51CF\u5C11\u4E86\u5904\u7406\u5668\u5728\u6838\u5FC3\u6001\u548C\u7528\u6237\u6001\u4E4B\u95F4\u7684\u5207\u6362\uFF01

                                                                        \u5FAE\u5185\u6838\uFF1A\u6838\u5FC3\u6001\u53EA\u8D1F\u8D23\u6700\u6838\u5FC3\u7684\u4E00\u4E9B\u5DE5\u4F5C\uFF0C\u4F18\u70B9\u662F\u7EC4\u7EC7\u7ED3\u6784\u6E05\u6670\uFF0C\u65B9\u4FBF\u7EF4\u62A4\uFF0C\u7F3A\u70B9\u662F\u6548\u7387\u4F4E\uFF0C\u56E0\u4E3A\u5FAE\u5185\u6838\uFF0C\u5E76\u4E0D\u662F\u8BB8\u591A\u4E3B\u8981\u529F\u80FD\u6A21\u5757\u90FD\u5728\u6838\u5FC3\u6001\uFF0C\u6240\u4EE5\u9700\u8981\u7ECF\u5E38\u8FDB\u884C\u6838\u5FC3\u6001\u548C\u7528\u6237\u6001\u4E4B\u95F4\u7684\u5207\u6362\uFF0C\u5BFC\u81F4\u6548\u7387\u4F4E\u3002

                                                                      3. \u64CD\u4F5C\u7CFB\u7EDF\u5185\u6838\u529F\u80FD\u6216\u8005\u8BF4\u5185\u6838\u7A0B\u5E8F\u4E00\u5B9A\u662F\u8FD0\u884C\u5728\u6838\u5FC3\u6001\u3002

                                                                      4. \u7279\u6743\u6307\u4EE4\u53EA\u80FD\u5728\u6838\u5FC3\u6001\u4E0B\u6267\u884C

                                                                        \u5185\u6838\u7A0B\u5E8F\u53EA\u80FD\u5728\u6838\u5FC3\u6001\u4E0B\u6267\u884C

                                                                      \u4E2D\u65AD\u548C\u5F02\u5E38

                                                                      \u4E2D\u65AD\u673A\u5236\u7684\u8BDE\u751F

                                                                      1. \u65E9\u671F\u7684\u8BA1\u7B97\u673A\u4E2D\uFF0C\u5404\u4E2A\u7A0B\u5E8F\u53EA\u80FD\u4E32\u884C\u6267\u884C\uFF0C\u5C31\u662F\u5355\u9053\u6279\u5904\u7406\u7CFB\u7EDF\uFF0C\u540C\u4E00\u65F6\u523B\uFF0C\u5904\u7406\u5668\u53EA\u80FD\u5904\u7406\u4E00\u9053\u7A0B\u5E8F\uFF0C\u7CFB\u7EDF\u8D44\u6E90\u5229\u7528\u7387\u4F4E

                                                                        \u5F15\u5165\u4E2D\u65AD\u673A\u5236\uFF0C\u5B9E\u73B0\u4E86\u591A\u9053\u7A0B\u5E8F\u5E76\u53D1\u6267\u884C

                                                                        \u672C\u8D28\uFF1A\u53D1\u751F\u4E2D\u65AD\u5C31\u610F\u5473\u7740\u9700\u8981\u64CD\u4F5C\u7CFB\u7EDF\u4ECB\u5165\uFF0C\u5F00\u5C55\u7BA1\u7406\u5DE5\u4F5C

                                                                      2. CPU\u5207\u6362\u4E3A\u6838\u5FC3\u6001\uFF0C\u5BF9\u4E2D\u65AD\u4FE1\u53F7\u8FDB\u884C\u5904\u7406

                                                                        \u5904\u7406\u5B8C\u540E\uFF0C\u518D\u5207\u6362\u4E3A\u7528\u6237\u6001\uFF0C\u6267\u884C\u8FDB\u7A0B

                                                                      3. CPU\u53EF\u80FD\u4F1A\u6536\u5230\u8BA1\u65F6\u90E8\u4EF6\u53D1\u9001\u7684\u4E2D\u65AD\u4FE1\u53F7\uFF0C\u901A\u77E5CPU\u73B0\u5728\u5DF2\u7ECF\u8FC7\u4E86\u4E00\u4E2A\u65F6\u95F4\u7247\u4E86\uFF0C\u5F53CPU\u6536\u5230\u4E2D\u65AD\u4FE1\u53F7\uFF0C\u90A3\u4E48CPU\u4F1A\u7ACB\u5373\u5207\u6362\u5230\u6838\u5FC3\u6001\uFF08\u7528\u6237\u6001\u548C\u6838\u5FC3\u6001\u662F\u8BF4\u7684CPU\u72B6\u6001\uFF09\uFF0C\u7136\u540E\u628ACPU\u7684\u4F7F\u7528\u6743\u9650\u4EA4\u7ED9\u64CD\u4F5C\u7CFB\u7EDF\uFF0C\u64CD\u4F5C\u7CFB\u7EDF\u7684\u5185\u6838\u5C31\u4F1A\u5F00\u59CB\u5BF9\u4E2D\u65AD\u4FE1\u53F7\u8FDB\u884C\u5904\u7406\uFF0C\u64CD\u4F5C\u7CFB\u7EDF\u5185\u6838\u53D1\u73B0\u521A\u624D\u7684\u4E2D\u65AD\u4FE1\u53F7\u662F\u544A\u8BC9CPU\u65F6\u95F4\u7247\u5DF2\u5230\uFF0C\u90A3\u4E48\u64CD\u4F5C\u7CFB\u7EDF\u4F1A\u8FDB\u884C\u8FDB\u7A0B1\u548C\u8FDB\u7A0B2\u4E4B\u95F4\u7684\u5207\u6362\uFF0C\u8FDB\u7A0B1\u7684\u65F6\u95F4\u7247\u7528\u5B8C\uFF0C\u6362\u8FDB\u7A0B2\u6267\u884C\uFF0C\u5728\u5B8C\u6210\u8FD9\u4E00\u7CFB\u5217\u7684\u7BA1\u7406\u5DE5\u4F5C\u540E\uFF0C\u64CD\u4F5C\u7CFB\u7EDF\u4F1A\u628ACPU\u7684\u4F7F\u7528\u6743\u4EA4\u7ED9\u7528\u6237\u8FDB\u7A0B\uFF0C\u63A5\u4E0B\u6765\u8FDB\u7A0B2\u5C31\u4F1A\u83B7\u5F97CPU\u65F6\u95F4\u7247\uFF0CCPU\u4E5F\u7531\u6838\u5FC3\u6001\u5207\u6362\u56DE\u4E86\u7528\u6237\u6001\uFF0C\u8FDB\u7A0B2\u5728\u7528\u6237\u6001\u4E0B\u8FDB\u884C\u6267\u884C\u3002

                                                                        image-20211215211612977

                                                                        image-20211215211627172

                                                                        image-20211215211657088

                                                                        image-20211215211713943

                                                                        image-20211215211752899

                                                                        \u200B \u8FDB\u7A0B2\u5728\u7528\u6237\u6001\u4E0B\u6267\u884C

                                                                      \u4E2D\u65AD\u7684\u6982\u5FF5\u548C\u4F5C\u7528

                                                                      1. \u5F53\u4E2D\u65AD\u53D1\u751F\u65F6\uFF0CCPU\u4F1A\u7ACB\u5373\u8FDB\u5165\u6838\u5FC3\u6001

                                                                        \u5F53\u4E2D\u65AD\u53D1\u751F\u540E\uFF0C\u5F53\u524D\u8FD0\u884C\u7684\u8FDB\u7A0B\u6682\u505C\u8FD0\u884C\uFF0C\u5E76\u7531\u64CD\u4F5C\u7CFB\u7EDF\u7684\u5185\u6838\u5BF9\u4E2D\u65AD\u4FE1\u53F7\u8FDB\u884C\u5904\u7406

                                                                        \u5BF9\u4E8E\u4E0D\u540C\u7684\u4E2D\u65AD\u4FE1\u53F7\uFF0C\u4F1A\u8FDB\u884C\u4E0D\u540C\u7684\u5904\u7406

                                                                        \u53D1\u751F\u4E2D\u65AD\uFF0C\u7531\u4E8E\u64CD\u4F5C\u7CFB\u7EDF\u7684\u7BA1\u7406\u5DE5\u4F5C\uFF08\u6BD4\u5982\u8FDB\u7A0B\u5207\u6362\u3001\u5206\u914DIO\u8BBE\u5907\u7B49\uFF09\u9700\u8981\u4F7F\u7528\u7279\u6743\u6307\u4EE4\uFF0C\u56E0\u6B64CPU\u8981\u4ECE\u7528\u6237\u6001\u8F6C\u4E3A\u6838\u5FC3\u6001\u3002

                                                                        \u4E2D\u65AD\u53EF\u4EE5\u4F7FCPU\u4ECE\u7528\u6237\u6001\u5207\u6362\u4E3A\u6838\u5FC3\u6001\uFF0C\u4F7F\u64CD\u4F5C\u7CFB\u7EDF\u83B7\u53D6\u8BA1\u7B97\u673A\u7684\u63A7\u5236\u6743\uFF0C\u6709\u4E86\u4E2D\u65AD\uFF0C\u624D\u80FD\u5B9E\u73B0\u591A\u9053\u7A0B\u5E8F\u5E76\u53D1\u6267\u884C\u3002

                                                                      2. CPU\u7528\u6237\u6001--\u6838\u5FC3\u6001\u662F\u901A\u8FC7\u4E2D\u65AD\u5B9E\u73B0\u7684\uFF0C \u5E76\u4E14\u4E2D\u65AD\u662F\u552F\u4E00\u9014\u5F84

                                                                        \u6838\u5FC3\u6001\u5230\u7528\u6237\u6001\u7684\u5207\u6362\uFF0C\u662F\u901A\u8FC7\u6267\u884C\u4E00\u4E2A\u7279\u6743\u6307\u4EE4\uFF08\u56E0\u4E3A\u6838\u5FC3\u6001\u4E0B\u672C\u6765\u5C31\u53EF\u4EE5\u6267\u884C\u7279\u6743\u6307\u4EE4\uFF09\uFF0C\u5C06\u7A0B\u5E8F\u72B6\u6001\u5B57\u7684\u6807\u5FD7\u4F4D\u8BBE\u7F6E\u4E3A\u7528\u6237\u6001

                                                                      \u4E2D\u65AD\u7684\u5206\u7C7B

                                                                      1. \u5185\u4E2D\u65AD\uFF08\u5F02\u5E38\u3001\u4F8B\u5916\u3001\u9677\u5165\uFF09

                                                                      2. \u5916\u4E2D\u65AD\uFF0C\u4E5F\u53EF\u4EE5\u7B80\u5355\u5730\u79F0\u4E4B\u4E3A\u4E2D\u65AD

                                                                      3. \u5185\u4E2D\u65AD\u548C\u5916\u4E2D\u65AD\u7684\u672C\u8D28\u533A\u522B\u5728\u4E8E\u4E2D\u65AD\u4FE1\u53F7\u7684\u6765\u6E90\u662FCPU\u7684\u5185\u90E8\u8FD8\u662F\u5916\u90E8

                                                                        \u5185\u4E2D\u65AD\u7684\u53D1\u751F\u548C\u5F53\u524DCPU\u6267\u884C\u6307\u4EE4\u662F\u6709\u5173\u7CFB\u7684\uFF0C\u5916\u4E2D\u65AD\u7684\u53D1\u751F\u548C\u5F53\u524DCPU\u6267\u884C\u6307\u4EE4\u662F\u6CA1\u6709\u5173\u7CFB\u7684\uFF08\u6BD4\u5982\u8BF4\u6253\u5370\u673A\u5728\u5B8C\u6210\u8F93\u51FA\u5DE5\u4F5C\u4E4B\u540E\uFF0C\u5411CPU\u53D1\u9001\u7684\u5916\u90E8\u4E2D\u65AD\u4FE1\u53F7\uFF09\u3002

                                                                      4. image-20211031192224702

                                                                      5. \u53E6\u4E00\u79CD\u5206\u7C7B\u65B9\u5F0F

                                                                        image-20211031192325361

                                                                      \u5916\u4E2D\u65AD\u7684\u5904\u7406\u8FC7\u7A0B

                                                                      1. \u6267\u884C\u5B8C\u6BCF\u4E2A\u6307\u4EE4\u4E4B\u540E\uFF0CCPU\u90FD\u8981\u68C0\u67E5\u5F53\u524D\u662F\u5426\u6709\u5916\u90E8\u4E2D\u65AD\u4FE1\u53F7
                                                                      2. \u5982\u679C\u68C0\u6D4B\u5230\u5916\u90E8\u4E2D\u65AD\u4FE1\u53F7\uFF0C\u5219\u9700\u8981\u4FDD\u62A4\u88AB\u4E2D\u65AD\u8FDB\u7A0B\u7684CPU\u73AF\u5883\uFF08\u5982\u7A0B\u5E8F\u72B6\u6001\u5B57PSW\uFF0C\u7A0B\u5E8F\u8BA1\u6570\u5668PC\u3001\u5404\u79CD\u901A\u7528\u5BC4\u5B58\u5668\uFF09\uFF0C\u53EF\u4EE5\u5927\u81F4\u7406\u89E3\u4E3A\u8981\u4FDD\u5B58\u8FDB\u7A0B\u5F53\u524D\u7684\u4E00\u4E9B\u4E2D\u95F4\u7ED3\u679C\uFF0C\u4EE5\u4FBF\u6062\u590D\u4E4B\u540E\uFF0C\u8FD8\u53EF\u4EE5\u4ECE\u5F53\u524D\u72B6\u6001\u7EE7\u7EED\u5F80\u4E0B\u6267\u884C\uFF0C\u53EF\u4EE5\u7406\u89E3\u4E3A\u591A\u7EBF\u7A0B\u73AF\u5883\u4E0B\u7EBF\u7A0B\u4E4B\u95F4\u7684\u4E0A\u4E0B\u6587\u5207\u6362\uFF0C\u7A0B\u5E8F\u8BA1\u6570\u5668\u7684\u4F5C\u7528\u5C31\u662F\u4FDD\u5B58\u4E0B\u4E00\u6761\u8981\u6267\u884C\u7684\u5B57\u8282\u7801\u6307\u4EE4\u7684\u5730\u5740\uFF0C\u6240\u4EE5\u7A0B\u5E8F\u8BA1\u6570\u5668\u9700\u8981\u4FDD\u5B58\u8FD9\u4E2A\u5730\u5740\uFF0C\u7528\u4E8E\u4E0A\u4E0B\u6587\u5207\u6362\u3002
                                                                      3. \u6839\u636E\u4E2D\u65AD\u4FE1\u53F7\u7C7B\u578B\u8F6C\u5165\u76F8\u5E94\u7684\u4E2D\u65AD\u5904\u7406\u7A0B\u5E8F\uFF08\u5185\u6838\u7A0B\u5E8F\uFF0C\u8FD0\u884C\u5728CPU\u6838\u5FC3\u6001\uFF0C\u8FD9\u662F\u80AF\u5B9A\u7684\uFF0C\u56E0\u4E3A\u4E2D\u65AD\u53D1\u751F\u65F6\uFF0CCPU\u4F1A\u7ACB\u5373\u8FDB\u5165\u6838\u5FC3\u6001\uFF09
                                                                      4. \u6062\u590D\u539F\u8FDB\u7A0B\u7684CPU\u73AF\u5883\u5E76\u6267\u884C\u7279\u6743\u6307\u4EE4\u9000\u51FA\u4E2D\u65AD\uFF08\u8BBE\u7F6E\u7A0B\u5E8F\u72B6\u6001\u5B57PSW\u7684\u6807\u5FD7\u4F4D\uFF09\uFF0C\u8FD4\u56DE\u539F\u8FDB\u7A0B\u7EE7\u7EED\u5F80\u4E0B\u6267\u884C\u3002

                                                                      \u7CFB\u7EDF\u8C03\u7528

                                                                      \u6982\u8FF0

                                                                      1. \u64CD\u4F5C\u7CFB\u7EDF\u4F5C\u4E3A\u7CFB\u7EDF\u8F6F\u4EF6\uFF0C\u7BA1\u7406\u7CFB\u7EDF\u8D44\u6E90\uFF0C\u9762\u5411\u4E0A\u5C42\uFF0C\u5BF9\u7528\u6237\u63D0\u4F9B\u547D\u4EE4\u63A5\u53E3\uFF0C\u5BF9\u7A0B\u5E8F\u63D0\u4F9B\u7A0B\u5E8F\u63A5\u53E3\uFF08\u5176\u5B9E\u4E5F\u53EF\u4EE5\u7406\u89E3\u4E3A\u5BF9\u7528\u6237\uFF09\uFF0C\u7A0B\u5E8F\u63A5\u53E3\u5C31\u662F\u4E00\u7EC4\u7CFB\u7EDF\u8C03\u7528\u7EC4\u6210

                                                                        \u53EF\u4EE5\u628A\u7CFB\u7EDF\u8C03\u7528\u7406\u89E3\u4E3A\u64CD\u4F5C\u7CFB\u7EDF\u63D0\u4F9B\u7ED9\u5E94\u7528\u7A0B\u5E8F\uFF08\u7A0B\u5E8F\u5458\u6216\u7F16\u7A0B\u4EBA\u5458\uFF09\u4F7F\u7528\u7684\u63A5\u53E3\uFF0C\u53EF\u4EE5\u7406\u89E3\u4E3A\u4E00\u79CD\u53EF\u4F9B\u5E94\u7528\u7A0B\u5E8F\u8C03\u7528\u7684\u7279\u6B8A\u51FD\u6570\uFF0C\u5E94\u7528\u7A0B\u5E8F\u53EF\u4EE5\u53D1\u51FA\u7CFB\u7EDF\u8C03\u7528\u8BF7\u6C42\u6765\u83B7\u5F97\u64CD\u4F5C\u7CFB\u7EDF\u7684\u670D\u52A1\u3002

                                                                      2. \u64CD\u4F5C\u7CFB\u7EDF\u4E3A\u4EC0\u4E48\u8981\u63D0\u4F9B\u7CFB\u7EDF\u8C03\u7528\u529F\u80FD\uFF1F

                                                                        \u5982\u679C\u7528\u6237\u8FDB\u7A0B\u60F3\u8981\u4F7F\u7528\u7CFB\u7EDF\u8D44\u6E90\uFF0C\u90A3\u4E48\u901A\u8FC7\u64CD\u4F5C\u7CFB\u7EDF\u63D0\u4F9B\u7684\u7CFB\u7EDF\u8C03\u7528\uFF0C\u6BD4\u5982\u7528\u6237\u7EE7\u627F\u60F3\u8981\u4F7F\u7528\u6253\u5370\u673A\u8FD9\u79CD\u5171\u4EAB\u8D44\u6E90\uFF0C\u53EA\u80FD\u901A\u8FC7\u7CFB\u7EDF\u8C03\u7528\u5BF9\u64CD\u4F5C\u7CFB\u7EDF\u53D1\u51FA\u8BF7\u6C42\uFF0C\u64CD\u4F5C\u7CFB\u7EDF\u4F1A\u5BF9\u5404\u4E2A\u8BF7\u6C42\u8FDB\u884C\u534F\u8C03\u7BA1\u7406

                                                                        \u7CFB\u7EDF\u8C03\u7528\u5C31\u662F\u7A0B\u5E8F\u63A5\u53E3\uFF0C\u7528\u6237\u8FDB\u7A0B\u901A\u8FC7\u4E00\u7EC4\u7CFB\u7EDF\u8C03\u7528\u5373\u7A0B\u5E8F\u63A5\u53E3\uFF0C\u4F7F\u7528\u67D0\u4E2A\u7CFB\u7EDF\u8D44\u6E90\uFF0C\u56E0\u4E3A\u662F\u7CFB\u7EDF\u8D44\u6E90\uFF0C\u6240\u4EE5\u7CFB\u7EDF\u8C03\u7528\u540E\uFF0CCPU\u8FDB\u5165\u6838\u5FC3\u6001\uFF0C\u628A\u63A7\u5236\u6743\u4EA4\u7ED9\u64CD\u4F5C\u7CFB\u7EDF\uFF0C\u64CD\u4F5C\u7CFB\u7EDF\u5BF9\u8BF7\u6C42\u8FDB\u884C\u534F\u8C03\u7BA1\u7406

                                                                        \u7CFB\u7EDF\u8C03\u7528\u540E\uFF0CCPU\u4F1A\u8FDB\u5165\u6838\u5FC3\u6001\uFF0C\u8FD9\u662F\u81EA\u613F\u4E2D\u65AD\uFF0C\u4E5F\u5C31\u662F\u5185\u4E2D\u65AD\uFF0C\u4E0ECPU\u5F53\u524D\u6267\u884C\u7684\u6307\u4EE4\u6709\u5173\uFF0C\u662F\u7CFB\u7EDF\u8C03\u7528\u4F7F\u7528\u7684\u8BBF\u7BA1\u6307\u4EE4\u6216\u8005\u9677\u5165\u6307\u4EE4\u3002

                                                                      3. \u4EC0\u4E48\u662F\u7CFB\u7EDF\u8C03\u7528\uFF1F

                                                                        \u5E94\u7528\u7A0B\u5E8F\u901A\u8FC7\u7CFB\u7EDF\u8C03\u7528\u8BF7\u6C42\u64CD\u4F5C\u7CFB\u7EDF\u7684\u670D\u52A1\uFF0C\u7CFB\u7EDF\u4E2D\u7684\u5404\u79CD\u5171\u4EAB\u8D44\u6E90\u90FD\u7531\u64CD\u4F5C\u7CFB\u7EDF\u540C\u4E00\u638C\u7BA1\uFF0C\u56E0\u6B64\u5728\u7528\u6237\u7A0B\u5E8F\u4E2D\uFF0C\u51E1\u662F\u4E0E\u8D44\u6E90\u6709\u5173\u7684\u64CD\u4F5C\uFF08\u5982\u5B58\u50A8\u5206\u914D\u3001IO\u3001\u6587\u4EF6\u7BA1\u7406\u7B49\uFF09\uFF0C\u90FD\u5FC5\u987B\u901A\u8FC7\u7CFB\u7EDF\u8C03\u7528\u7684\u65B9\u5F0F\u5411\u64CD\u4F5C\u7CFB\u7EDF\u63D0\u51FA\u670D\u52A1\u8BF7\u6C42\uFF0C\u7531\u64CD\u4F5C\u7CFB\u7EDF\u4EE3\u4E3A\u5B8C\u6210\uFF08\u7CFB\u7EDF\u8C03\u7528\u540E\uFF0CCPU\u4F1A\u8FDB\u5165\u6838\u5FC3\u6001\uFF0C\u7CFB\u7EDF\u8C03\u7528\u4F1A\u4F7F\u7528\u8BBF\u7BA1\u6307\u4EE4\u6216\u8005\u8BF4\u9677\u5165\u6307\u4EE4\uFF09\uFF0C\u56E0\u4E3A\u64CD\u4F5C\u7CFB\u7EDF\u5C31\u662F\u7BA1\u7406\u7CFB\u7EDF\u8D44\u6E90\u7684\uFF0C\u5305\u62EC\u786C\u4EF6\u8D44\u6E90\u548C\u8F6F\u4EF6\u8D44\u6E90\uFF0C\u8FD9\u6837\u53EF\u4EE5\u4FDD\u8BC1\u7CFB\u7EDF\u7684\u7A33\u5B9A\u6027\u548C\u5B89\u5168\u6027\u3002

                                                                      \u7CFB\u7EDF\u8C03\u7528\u5206\u7C7B

                                                                      1. image-20211031215805004

                                                                        \u7CFB\u7EDF\u8C03\u7528\u76F8\u5173\u5904\u7406\u6D89\u53CA\u5230\u5BF9\u7CFB\u7EDF\u8D44\u6E90\u7684\u7BA1\u7406\uFF0C\u5BF9\u8FDB\u7A0B\u7684\u63A7\u5236\uFF0C\u8FD9\u4E9B\u529F\u80FD\u9700\u8981\u6267\u884C\u4E00\u4E9B\u7279\u6743\u6307\u4EE4\uFF0C\u56E0\u6B64\u7CFB\u7EDF\u8C03\u7528\u76F8\u5173\u5904\u7406\u9700\u8981\u5728\u6838\u5FC3\u6001\u4E0B\u8FDB\u884C\u3002

                                                                      \u7CFB\u7EDF\u8C03\u7528\u4E0E\u5E93\u51FD\u6570\u7684\u533A\u522B

                                                                      1. \u5E93\u51FD\u6570\u7684\u5E95\u5C42\u5C01\u88C5\u4E00\u4E9B\u7CFB\u7EDF\u8C03\u7528\u529F\u80FD

                                                                        image-20211215214453318

                                                                        image-20211031220400682

                                                                        image-20211031220438631

                                                                      \u7CFB\u7EDF\u8C03\u7528\u80CC\u540E\u7684\u8FC7\u7A0B

                                                                      1. image-20211031220738705

                                                                        write\u8FD9\u4E2A\u5E93\u51FD\u6570\uFF0C\u5C31\u6D89\u53CA\u5230\u4E86\u7CFB\u7EDF\u8C03\u7528\u3002

                                                                        \u5F53\u6267\u884C\u9677\u5165\u6307\u4EE4\u4E4B\u540E\uFF0CCPU\u7684\u63A7\u5236\u6743\u4F1A\u4EA4\u7ED9\u64CD\u4F5C\u7CFB\u7EDF\uFF0C\u9677\u5165\u6307\u4EE4\u5C31\u662F\u8BBF\u7BA1\u6307\u4EE4\uFF0C\u6838\u5FC3\u6001\u5C31\u662F\u7BA1\u6001\u3002\u8FD9\u5C5E\u4E8E\u7CFB\u7EDF\u8C03\u7528\uFF0C\u6267\u884C\u9677\u5165\u6307\u4EE4\uFF0C\u662F\u5185\u4E2D\u65AD\u3002

                                                                        \u5F88\u597D\u7406\u89E3\uFF0C\u7CFB\u7EDF\u8C03\u7528\uFF0C\u5C31\u662F\u4F1A\u901A\u8FC7\u64CD\u4F5C\u7CFB\u7EDF\u6765\u6267\u884C\u4E00\u4E9B\u529F\u80FD\uFF0C\u5FC5\u5B9A\u4F1A\u8FDB\u5165\u6838\u5FC3\u6001\uFF0C\u800C\u7528\u6237\u6001\u5230\u6838\u5FC3\u6001\u53EA\u6709\u4E00\u79CD\u65B9\u5F0F\uFF0C\u5C31\u662F\u4E2D\u65AD\uFF0C\u7CFB\u7EDF\u8C03\u7528\u4F1A\u901A\u8FC7\u8BBF\u7BA1\u6307\u4EE4\uFF0C\u5B9E\u73B0\u5185\u4E2D\u65AD\u3002

                                                                        \u5185\u4E2D\u65AD\u5206\u4E3A\u81EA\u613F\u4E2D\u65AD\uFF08\u4E5F\u53EB\u505A\u6307\u4EE4\u4E2D\u65AD\uFF0C\u4E5F\u5C31\u662F\u7CFB\u7EDF\u8C03\u7528\u65F6\u4F7F\u7528\u7684\u8BBF\u7BA1\u6307\u4EE4\uFF09\u3001\u786C\u4EF6\u6545\u969C\uFF08\u7F3A\u9875\uFF09\u3001\u8F6F\u4EF6\u4E2D\u65AD

                                                                        \u5185\u7EC8\u7AEF\u53C8\u5206\u4E3A\u9677\u5165\u3001\u6545\u969C\u548C\u7EC8\u6B62\u3002

                                                                        \u81EA\u613F\u4E2D\u65AD\uFF08\u8BBF\u7BA1\u6307\u4EE4\u5F15\u8D77\u7684\u6307\u4EE4\u4E2D\u65AD\uFF09\u5C5E\u4E8E\u9677\u5165\uFF0C\u7F3A\u9875\u5C5E\u4E8E\u6545\u969C\uFF0C\u8F6F\u4EF6\u4E2D\u65AD\u6BD4\u5982\u6574\u6570\u96640\u5C5E\u4E8E\u7EC8\u6B62\u3002

                                                                      2. int\u6307\u4EE4\u7684\u53C2\u6570x\u6307\u660E\u4E86\u7CFB\u7EDF\u7684\u8C03\u7528\u53F7\uFF0C\u6B64\u5904\u7684int\u4E0D\u662F\u6574\u6570\u7684\u610F\u601D\uFF0C\u5176\u5B9E\u662Finterrupt\u7684\u7F29\u5199

                                                                        image-20211215215539484

                                                                        \u4F20\u9012\u7CFB\u7EDF\u8C03\u7528\u53C2\u6570 ----> \u6267\u884C\u9677\u5165\u6307\u4EE4\uFF08\u7528\u6237\u6001\uFF09------> \u6267\u884C\u7CFB\u7EDF\u8C03\u7528\u76F8\u5E94\u670D\u52A1\u7A0B\u5E8F\uFF08\u6838\u5FC3\u6001\uFF09-----> \u8FD4\u56DE\u7528\u6237\u7A0B\u5E8F

                                                                        \u7CFB\u7EDF\u8C03\u7528\u4F1A\u4F7F\u7528\u8BBF\u7BA1\u6307\u4EE4\uFF08\u9677\u5165\u6307\u4EE4\uFF09\uFF0C\u4ECE\u800C\u4F7FCPU\u5207\u6362\u5230\u6838\u5FC3\u6001

                                                                      3. \u6CE8\u610F\uFF1A

                                                                        • \u9677\u5165\u6307\u4EE4\u662F\u5728\u7528\u6237\u6001\u6267\u884C\u7684\uFF0C\u6267\u884C\u9677\u5165\u6307\u4EE4\u4E4B\u540E\uFF0C\u7ACB\u5373\u5F15\u53D1\u4E00\u4E2A\u5185\u4E2D\u65AD\uFF0C\u8FD9\u5C5E\u4E8E\u81EA\u613F\u4E2D\u65AD\uFF0C\u4ECE\u800CCPU\u8FDB\u5165\u6838\u5FC3\u6001
                                                                        • \u53D1\u51FA\u7CFB\u7EDF\u8C03\u7528\u8BF7\u6C42\u662F\u5728\u7528\u6237\u6001\uFF0C\u800C\u5BF9\u7CFB\u7EDF\u8C03\u7528\u7684\u76F8\u5E94\u5904\u7406\uFF0C\u662F\u5728\u6838\u5FC3\u6001\u4E0B\u8FDB\u884C\u3002
                                                                        • \u9677\u5165\u6307\u4EE4\u662F\u552F\u4E00\u4E00\u4E2A\u53EA\u80FD\u5728\u7528\u6237\u6001\u6267\u884C\uFF0C\u800C\u4E0D\u53EF\u518D\u6838\u5FC3\u6001\u6267\u884C\u7684\u6307\u4EE4\u3002\u56E0\u4E3A\u9677\u5165\u6307\u4EE4\u5373\u8BBF\u7BA1\u6307\u4EE4\u7684\u76EE\u7684\u5C31\u662F\u8FDB\u5165\u6838\u5FC3\u6001\u3002
                                                                        • \u51E1\u662F\u4E0E\u8D44\u6E90\uFF08\u7CFB\u7EDF\u8D44\u6E90\u3001\u5171\u4EAB\u8D44\u6E90\uFF09\u6709\u5173\u7684\u64CD\u4F5C\u3001\u4F1A\u76F4\u63A5\u5F71\u54CD\u5230\u5176\u4ED6\u8FDB\u7A0B\u7684\u64CD\u4F5C\uFF0C\u4E00\u5B9A\u9700\u8981\u64CD\u4F5C\u7CFB\u7EDF\u4ECB\u5165\uFF08\u9700\u8981\u64CD\u4F5C\u7CFB\u7EDF\u6765\u8C03\u5EA6\uFF0C\u6765\u5BF9\u8BF7\u6C42\u534F\u8C03\u7BA1\u7406\uFF09\uFF0C\u5373\u9700\u8981\u901A\u8FC7\u7CFB\u7EDF\u8C03\u7528\u6765\u5B9E\u73B0\u3002

                                                                      \u7B2C\u4E8C\u7AE0

                                                                      \u8FDB\u7A0B

                                                                      \u8FDB\u7A0B\u7684\u5B9A\u4E49

                                                                      1. \u7A0B\u5E8F\uFF1A\u5C31\u662F\u4E00\u4E2A\u6307\u4EE4\u5E8F\u5217

                                                                        \u65E9\u671F\u7684\u8BA1\u7B97\u673A\uFF08\u53EA\u652F\u6301\u5355\u9053\u7A0B\u5E8F\uFF09\uFF0C\u56E0\u6B64\u5728\u8BA1\u7B97\u673A\u4E2D\uFF0C\u540C\u4E00\u65F6\u95F4\u6BB5\u5185\u53EA\u80FD\u6709\u4E00\u9053\u7A0B\u5E8F\uFF0C\u5728\u8FD9\u6BB5\u65F6\u95F4\u6BB5\u5185\uFF0CCPU\u53EA\u4E3A\u8FD9\u9053\u7A0B\u5E8F\u670D\u52A1

                                                                        \u5185\u5B58\u4E2D\u540C\u4E00\u4E2A\u65F6\u95F4\u6BB5\u5185\u53EA\u5B58\u5728\u4E00\u4E2A\u7A0B\u5E8F\u76F8\u5173\u7684\u6570\u636E\uFF0C\u5305\u62EC\u7A0B\u5E8F\u6BB5\u548C\u6570\u636E\u6BB5\u4E24\u4E2A\u90E8\u5206\uFF0C\u7A0B\u5E8F\u6BB5\u4FDD\u5B58\u7684\u662F\u4EE3\u7801\u672C\u8EAB\uFF0C\u6570\u636E\u6BB5\u5B58\u653E\u7684\u662F\u7A0B\u5E8F\u8FD0\u884C\u8FC7\u7A0B\u4E2D\u7684\u4E2D\u95F4\u6570\u636E

                                                                        image-20211215221112255

                                                                      2. \u5F15\u5165\u591A\u9053\u7A0B\u5E8F\u6280\u672F\u4E4B\u540E

                                                                        image-20211215221415179

                                                                        \u4E3A\u4E86\u65B9\u4FBF\u64CD\u4F5C\u7CFB\u7EDF\u7BA1\u7406\uFF0C\u5B8C\u6210\u5404\u7A0B\u5E8F\u5E76\u53D1\u6267\u884C\uFF0C\u5F15\u5165\u4E86\u8FDB\u7A0B\u3001\u8FDB\u7A0B\u5B9E\u4F53\u7684\u6982\u5FF5

                                                                        \u64CD\u4F5C\u7CFB\u7EDF\u4E3A\u6BCF\u4E2A\u8FD0\u884C\u7684\u7A0B\u5E8F\uFF08\u8FDB\u7A0B\uFF09\u914D\u7F6E\u4E00\u4E2A\u6570\u636E\u7ED3\u6784\uFF0C\u79F0\u4E3A\u8FDB\u7A0B\u63A7\u5236\u5757\uFF08PCB\uFF09\uFF0C\u7528\u6765\u63CF\u8FF0\u8FDB\u7A0B\u7684\u5404\u79CD\u4FE1\u606F\uFF08\u5982\u7A0B\u5E8F\u4EE3\u7801\u5B58\u653E\u4F4D\u7F6E\u3001\u8FDB\u7A0B\u7684\u72B6\u6001\uFF09

                                                                        PCB\u3001\u7A0B\u5E8F\u6BB5\u3001\u6570\u636E\u6BB5\u4E09\u90E8\u5206\u6784\u6210\u4E86\u8FDB\u7A0B\u5B9E\u4F53\uFF08\u8FDB\u7A0B\u6620\u50CF\uFF09

                                                                      3. \u4E00\u822C\u60C5\u51B5\u4E0B\uFF0C\u6211\u4EEC\u628A\u8FDB\u7A0B\u5B9E\u4F53\u5C31\u7B80\u79F0\u4E3A\u8FDB\u7A0B\uFF0C\u4F8B\u5982\uFF0C\u6240\u8C13\u521B\u5EFA\u8FDB\u7A0B\uFF0C\u5B9E\u8D28\u4E0A\u662F\u521B\u5EFA\u8FDB\u7A0B\u5B9E\u4F53\u4E2D\u7684PCB\uFF0C\u800C\u64A4\u9500\u8FDB\u7A0B\uFF0C\u5B9E\u8D28\u4E0A\u662F\u64A4\u9500\u8FDB\u7A0B\u5B9E\u4F53\u4E2D\u7684PCB

                                                                        \u6CE8\u610F\uFF1APCB\u662F\u8FDB\u7A0B\u5B58\u5728\u7684\u552F\u4E00\u6807\u5FD7\u3002

                                                                      4. \u4ECE\u4E0D\u540C\u7684\u89D2\u5EA6\uFF0C\u8FDB\u7A0B\u53EF\u4EE5\u6709\u4E0D\u540C\u7684\u5B9A\u4E49\uFF0C\u6BD4\u8F83\u4F20\u7EDF\u5178\u578B\u7684\u5B9A\u4E49\u6709\uFF1A

                                                                        • \u8FDB\u7A0B\u662F\u7A0B\u5E8F\u7684\u4E00\u6B21\u6267\u884C\u8FC7\u7A0B
                                                                        • \u8FDB\u7A0B\u662F\u4E00\u4E2A\u7A0B\u5E8F\u53CA\u5176\u6570\u636E\u5728\u5904\u7406\u5668\u4E0A\u987A\u5E8F\u6267\u884C\u65F6\u6240\u53D1\u751F\u7684\u6D3B\u52A8
                                                                        • \u8FDB\u7A0B\u662F\u5177\u6709\u72EC\u7ACB\u529F\u80FD\u7684\u7A0B\u5E8F\u5728\u6570\u636E\u96C6\u5408\u4E0A\u8FD0\u884C\u7684\u8FC7\u7A0B\uFF0C\u5B83\u662F\u7CFB\u7EDF\u8FDB\u884C\u8D44\u6E90\u5206\u914D\u548C\u8C03\u5EA6\u7684\u4E00\u4E2A\u72EC\u7ACB\u5355\u4F4D\u3002

                                                                        \u6240\u6709\u7684\u5B9A\u4E49\u90FD\u5F3A\u8C03\u8FDB\u7A0B\u662F\u4E00\u4E2A\u52A8\u6001\u7684\u8FC7\u7A0B

                                                                      5. \u5F15\u5165\u8FDB\u7A0B\u5B9E\u4F53\u7684\u6982\u5FF5\u540E\uFF0C\u53EF\u628A\u8FDB\u7A0B\u5B9A\u4E49\u4E3A\uFF1A

                                                                        \u8FDB\u7A0B\u662F\u8FDB\u7A0B\u5B9E\u4F53\uFF08\u6216\u8005\u8BF4\u9759\u6001\u7A0B\u5E8F\uFF09\u7684\u8FD0\u884C\u8FC7\u7A0B\uFF0C\u662F\u7CFB\u7EDF\u8FDB\u884C\u8D44\u6E90\u5206\u914D\u548C\u8C03\u5EA6\u7684\u4E00\u4E2A\u72EC\u7ACB\u5355\u4F4D\u3002

                                                                        \u6CE8\u610F\uFF1A\u4E25\u683C\u6765\u8BF4\uFF0C\u8FDB\u7A0B\u5B9E\u4F53\u548C\u8FDB\u7A0B\u5E76\u4E0D\u4E00\u6837\uFF0C\u8FDB\u7A0B\u5B9E\u4F53\u662F\u9759\u6001\u7684\uFF0C\u8FDB\u7A0B\u5219\u662F\u52A8\u6001\u7684

                                                                      \u8FDB\u7A0B\u7684\u7EC4\u6210

                                                                      1. \u8FDB\u7A0B\uFF08\u8FDB\u7A0B\u5B9E\u4F53\uFF09\u7531\u7A0B\u5E8F\u6BB5\u3001\u6570\u636E\u6BB5\u3001PCB\u4E09\u90E8\u5206\u7EC4\u6210

                                                                        image-20211215222440380

                                                                      2. PCB\u7684\u7EC4\u6210

                                                                        image-20211215222506062

                                                                        \u5F53\u8FDB\u7A0B\u88AB\u521B\u5EFA\u65F6\uFF0C\u64CD\u4F5C\u7CFB\u7EDF\u4F1A\u4E3A\u8BE5\u8FDB\u7A0B\u5206\u914D\u4E00\u4E2A\u552F\u4E00\u7684\u3001\u4E0D\u91CD\u590D\u7684ID\uFF0C\u7528\u4E8E\u533A\u5206\u4E0D\u540C\u7684\u8FDB\u7A0B\u3002

                                                                        \u5F53\u8FDB\u7A0B\u5207\u6362\u65F6\uFF0C\u9700\u8981\u628A\u8FDB\u7A0B\u5F53\u524D\u7684\u8FD0\u884C\u60C5\u51B5\u8BB0\u5F55\u4E0B\u6765\uFF0C\u4FDD\u5B58\u5728PCB\u4E2D\uFF0C\u5982\u7A0B\u5E8F\u8BA1\u6570\u5668\u7684\u503C\u8868\u793A\u4E86\u5F53\u524D\u7A0B\u5E8F\u6267\u884C\u5230\u54EA\u4E00\u53E5\u3002\uFF08\u5728jvm\u4E2D\uFF0C\u7A0B\u5E8F\u8BA1\u6570\u5668\u4FDD\u5B58\u4E86\u4E0B\u4E00\u6761\u9700\u8981\u6267\u884C\u7684\u5B57\u8282\u7801\u6307\u4EE4\u5BF9\u5E94\u7684\u5730\u5740\uFF01\uFF01\uFF09

                                                                        \u8FDB\u7A0B\u7684\u7BA1\u7406\u8005\uFF08\u64CD\u4F5C\u7CFB\u7EDF\uFF09\u6240\u9700\u7684\u6570\u636E\u90FD\u5728PCB\u4E2D\uFF01\uFF01

                                                                        \u7A0B\u5E8F\u6BB5\u548C\u6570\u636E\u6BB5\u5B58\u653E\u7684\u662F\u7A0B\u5E8F\u672C\u8EAB\u7684\u8FD0\u884C\u6240\u9700\u7684\u6570\u636E

                                                                      \u8FDB\u7A0B\u7684\u7EC4\u7EC7\u65B9\u5F0F

                                                                      1. \u5728\u4E00\u4E2A\u7CFB\u7EDF\u4E2D\uFF0C\u901A\u5E38\u6709\u6570\u5341\u3001\u6570\u767E\u4E43\u81F3\u6570\u5343\u4E2APCB\uFF08\u8FDB\u7A0B\u63A7\u5236\u5757\uFF0C\u63CF\u8FF0\u8FDB\u7A0B\u7684\u5404\u79CD\u4FE1\u606F\uFF09\uFF0C\u4E3A\u4E86\u80FD\u5BF9\u4ED6\u4EEC\u52A0\u4EE5\u6709\u6548\u7684\u7BA1\u7406\uFF0C\u5E94\u8BE5\u7528\u9002\u5F53\u7684\u65B9\u5F0F\u628A\u8FD9\u4E9BPCB\u7EC4\u7EC7\u8D77\u6765

                                                                        \u8FDB\u7A0B\u7684\u7EC4\u6210\u8BA8\u8BBA\u7684\u662F\u4E00\u4E2A\u8FDB\u7A0B\u5185\u90E8\u7531\u54EA\u4E9B\u90E8\u5206\u6784\u6210\u7684\u95EE\u9898\uFF0C\u800C\u8FDB\u7A0B\u7684\u7EC4\u7EC7\u8BA8\u8BBA\u7684\u662F\u591A\u4E2A\u8FDB\u7A0B\u4E4B\u95F4\u7684\u7EC4\u7EC7\u65B9\u5F0F\u7684\u95EE\u9898\u3002

                                                                      2. image-20211216150358099

                                                                      3. \u8FDB\u7A0B\u7684\u7EC4\u7EC7---\u94FE\u63A5\u65B9\u5F0F\uFF08\u64CD\u4F5C\u7CFB\u7EDF\u6301\u6709\u6307\u9488\uFF0C\u6307\u5411\u4E0D\u540C\u961F\u5217\uFF09

                                                                        \u6267\u884C\u6307\u9488\u6307\u5411\u5F53\u524D\u5904\u4E8E\u8FD0\u884C\u6001\uFF08\u6267\u884C\u6001\uFF09\u7684\u8FDB\u7A0B

                                                                        \u5C31\u7EEA\u961F\u5217\u6307\u9488\uFF0C\u6307\u5411\u5F53\u524D\u5904\u4E8E\u5C31\u7EEA\u6001\u7684\u8FDB\u7A0B

                                                                        \u963B\u585E\u961F\u5217\u6307\u9488\uFF0C\u6307\u5411\u5F53\u524D\u5904\u4E8E\u963B\u585E\u6001\u7684\u8FDB\u7A0B\uFF0C\u5F88\u591A\u64CD\u4F5C\u7CFB\u7EDF\u8FD8\u4F1A\u6839\u636E\u963B\u585E\u539F\u56E0\u4E0D\u540C\uFF0C\u518D\u5206\u4E3A\u591A\u4E2A\u963B\u585E\u961F\u5217

                                                                        image-20211216150733591

                                                                      4. \u8FDB\u7A0B\u7684\u7EC4\u7EC7---\u7D22\u5F15\u65B9\u5F0F\uFF08\u64CD\u4F5C\u7CFB\u7EDF\u6301\u6709\u6307\u9488\uFF0C\u6307\u5411\u7D22\u5F15\u8868\uFF0C\u800C\u4E0D\u662F\u961F\u5217\uFF09

                                                                        image-20211216150812905

                                                                        \u6CE8\u610F\uFF1A\u94FE\u63A5\u65B9\u5F0F\uFF0C\u662F\u6307\u9488\u6307\u5411\u961F\u5217\uFF0C\u7D22\u5F15\u65B9\u5F0F\uFF0C\u662F\u6307\u9488\u6307\u5411\u7D22\u5F15\u8868

                                                                      \u8FDB\u7A0B\u7684\u7279\u5F81

                                                                      1. \u8FDB\u7A0B\u548C\u7A0B\u5E8F\u662F\u4E24\u4E2A\u622A\u7136\u4E0D\u540C\u7684\u6982\u5FF5\uFF0C\u76F8\u6BD4\u4E8E\u7A0B\u5E8F\uFF0C\u8FDB\u7A0B\u62E5\u6709\u4EE5\u4E0B\u7279\u5F81\uFF1A

                                                                        • \u52A8\u6001\u6027\uFF1A\u8FDB\u7A0B\u662F\u7A0B\u5E8F\u7684\u4E00\u6B21\u6267\u884C\u8FC7\u7A0B\uFF0C\u662F\u52A8\u6001\u5730\u4EA7\u751F\u3001\u53D8\u5316\u3001\u6D88\u4EA1\u7684\u3002\uFF08\u52A8\u6001\u6027\u4E5F\u662F\u8FDB\u7A0B\u6700\u57FA\u672C\u7684\u7279\u5F81\uFF09

                                                                        • \u5E76\u53D1\u6027\uFF1A\u5185\u5B58\u4E2D\u6709\u591A\u4E2A\u8FDB\u7A0B\u5B9E\u4F53\uFF08\u6620\u50CF\uFF09\uFF0C\u5404\u8FDB\u7A0B\u53EF\u5E76\u53D1\u6267\u884C\uFF08\u5E76\u53D1\u5C31\u662F\u5B8F\u89C2\u4E0A\u5E76\u884C\uFF0C\u5FAE\u89C2\u4E0A\u4E32\u884C\uFF0C\u8F6E\u6D41\u88ABCPU\u6267\u884C\uFF0C\u4F46\u662F\u5728\u5B8F\u89C2\u4E0A\uFF0C\u5404\u8FDB\u7A0B\u597D\u50CF\u662F\u5E76\u884C\u6267\u884C\u7684\u3002 \uFF09

                                                                        • \u72EC\u7ACB\u6027\uFF1A\u8FDB\u7A0B\u662F\u80FD\u72EC\u7ACB\u8FD0\u884C\u3001\u72EC\u7ACB\u83B7\u5F97\u8D44\u6E90\uFF0C\u72EC\u7ACB\u63A5\u53D7\u8C03\u5EA6\u7684\u57FA\u672C\u5355\u4F4D

                                                                        • \u5F02\u6B65\u6027\uFF1A\u5404\u8FDB\u7A0B\u6309\u5404\u81EA\u72EC\u7ACB\u7684\u3001\u4E0D\u53EF\u9884\u77E5\u7684\u901F\u5EA6\u5411\u524D\u63A8\u8FDB\uFF08\u56E0\u4E3A\u5E76\u53D1\u6027\uFF0C\u4E0D\u662F\u88ABCPU\u5B8C\u5168\u4E32\u884C\u6267\u884C\u7684\uFF0C\u6240\u4EE5\u63A8\u8FDB\u7684\u901F\u5EA6\u662F\u672A\u77E5\u7684\uFF09\uFF0C\u64CD\u4F5C\u7CFB\u7EDF\u8981\u63D0\u4F9B\u201C\u8FDB\u7A0B\u540C\u6B65\u673A\u5236\u201D\u6765\u89E3\u51B3\u5F02\u6B65\u95EE\u9898\u3002

                                                                          \u5F02\u6B65\u6027\u6709\u53EF\u80FD\u5BFC\u81F4\u8FD0\u7B97\u7ED3\u679C\u7684\u4E0D\u786E\u5B9A\u6027\uFF0C\u6240\u4EE5\u9700\u8981\u4F9D\u9760\u540C\u6B65\u673A\u5236\u3002

                                                                        • \u7ED3\u6784\u578B\uFF1A\u6BCF\u4E2A\u8FDB\u7A0B\uFF08\u8FDB\u7A0B\u5B9E\u4F53\uFF09\u4F1A\u914D\u7F6E\u4E00\u4E2APCB\uFF0C\u7ED3\u6784\u4E0A\u770B\uFF0C\u8FDB\u7A0B\u7531\u7A0B\u5E8F\u6BB5\u3001\u6570\u636E\u6BB5\u3001PCB\u7EC4\u6210

                                                                      2. \u5728Java\u4E2D\uFF0C\u8FDB\u7A0B\u662F\u4F5C\u4E3A\u8D44\u6E90\u5206\u914D\u7684\u6700\u5C0F\u5355\u4F4D\uFF0C\u7EBF\u7A0B\u624D\u662F\u63A5\u53D7\u8C03\u5EA6\u7684\u6700\u5C0F\u5355\u4F4D\u3002

                                                                        \u5BF9\u4E8E\u64CD\u4F5C\u7CFB\u7EDF\u6765\u8BF4\uFF0C\u8FDB\u7A0B\u662F\u8D44\u6E90\u5206\u914D\u548C\u64CD\u4F5C\u7CFB\u7EDF\u8C03\u5EA6\u7684\u4E00\u4E2A\u72EC\u7ACB\u5355\u4F4D

                                                                      3. PCB\u662F\u64CD\u4F5C\u7CFB\u7EDF\u4E3A\u4E86\u7BA1\u7406\u8FDB\u7A0B\u6240\u521B\u5EFA\u7684\u6570\u636E\u7ED3\u6784\uFF0CPCB\u5B58\u653E\u7684\u6570\u636E\u662F\u5BF9\u8FDB\u7A0B\u7684\u7BA1\u7406\u6570\u636E

                                                                      \u8FDB\u7A0B\u7684\u72B6\u6001\u548C\u8F6C\u6362

                                                                      \u8FDB\u7A0B\u7684\u72B6\u6001
                                                                      1. \u8FDB\u7A0B\u662F\u7A0B\u5E8F\u7684\u4E00\u6B21\u6267\u884C\uFF0C\u5728\u8FD9\u4E2A\u6267\u884C\u8FC7\u7A0B\u4E2D\uFF0C\u6709\u65F6\u8FDB\u7A0B\u6B63\u5728\u88ABCPU\u5904\u7406\uFF0C\u6709\u65F6\u53C8\u9700\u8981\u7B49\u5F85CPU\u670D\u52A1\uFF0C\u53EF\u89C1\uFF0C\u8FDB\u7A0B\u7684\u72B6\u6001\u662F\u4F1A\u6709\u5404\u79CD\u53D8\u5316\uFF0C\u4E3A\u4E86\u65B9\u4FBF\u5BF9\u5404\u4E2A\u8FDB\u7A0B\u7684\u7BA1\u7406\uFF0C\u64CD\u4F5C\u7CFB\u7EDF\u9700\u8981\u5C06\u8FDB\u7A0B\u5408\u7406\u5730\u5212\u5206\u4E3A\u51E0\u79CD\u72B6\u6001\u3002

                                                                      2. \u4E09\u79CD\u57FA\u672C\u72B6\u6001

                                                                        • \u8FD0\u884C\u6001---\u5360\u6709CPU\uFF0C\u5E76\u5728CPU\u4E0A\u8FD0\u884C\u3002\u6CE8\u610F\uFF1A\u5355\u6838\u5904\u7406\u673A\u73AF\u5883\u4E0B\uFF0C\u6BCF\u4E00\u4E2A\u65F6\u523B\u6700\u591A\u53EA\u6709\u4E00\u4E2A\u8FDB\u7A0B\u5904\u4E8E\u8FD0\u884C\u6001\uFF08\u53CC\u6838\u73AF\u5883\u4E0B\uFF0C\u53EF\u4EE5\u540C\u65F6\u6709\u4E24\u4E2A\u8FDB\u7A0B\u5904\u4E8E\u8FD0\u884C\u6001\u5373\u5728\u5FAE\u89C2\u4E0A\u4E5F\u662F\u5E76\u884C\u7684\uFF0C\u5355\u6838\u7684\u8BDD\uFF0C\u5982\u679C\u6709\u591A\u4E2A\u8FDB\u7A0B\uFF0C\u90A3\u4E48\u5728\u5FAE\u89C2\u4E0A\u5C31\u662F\u4E32\u884C\u6267\u884C\u7684\uFF0C\u5728\u5B8F\u89C2\u4E0A\u662F\u5E76\u884C\u7684\u3002\uFF09

                                                                        • \u5C31\u7EEA\u6001---\u5DF2\u7ECF\u5177\u5907\u8FD0\u884C\u6761\u4EF6\uFF0C\u4F46\u662F\u7531\u4E8E\u6CA1\u6709\u7A7A\u95F2CPU\uFF0C\u800C\u6682\u65F6\u4E0D\u80FD\u8FD0\u884C\u3002\u5904\u4E8E\u5C31\u7EEA\u6001\u7684\u8FDB\u7A0B\uFF0C\u5DF2\u7ECF\u62E5\u6709\u4E86\u9664\u5904\u7406\u5668\u4E4B\u5916\u6240\u6709\u9700\u8981\u7684\u8D44\u6E90\uFF0C\u4E00\u65E6\u83B7\u5F97\u5904\u7406\u5668\uFF0C\u5373\u53EF\u7ACB\u5373\u8FDB\u5165\u8FD0\u884C\u6001\u5F00\u59CB\u8FD0\u884C\uFF0C\u5373\u4E07\u4E8B\u5177\u5907\uFF0C\u53EA\u6B20CPU

                                                                        • \u963B\u585E\u6001---\u56E0\u7B49\u5F85\u67D0\u4E00\u4E8B\u4EF6\uFF0C\u800C\u6682\u65F6\u4E0D\u80FD\u8FD0\u884C\uFF08\u4E0D\u662F\u5728\u7B49\u5F85CPU\uFF0C\u800C\u662F\u7B49\u5F85\u9664\u4E86CPU\u4E4B\u5916\u7684\u5176\u4ED6\u4E8B\u4EF6\uFF0C\u5982\u679C\u53EA\u662F\u7B49\u5F85CPU\uFF0C\u90A3\u4E48\u662F\u5C31\u7EEA\u6001\uFF09\u3002\u5982\u7B49\u5F85\u64CD\u4F5C\u7CFB\u7EDF\u5206\u914D\u6253\u5370\u673A\u3001\u7B49\u5F85\u8BFB\u78C1\u76D8\u64CD\u4F5C\u7684\u7ED3\u679C\u7B49\uFF0C\u8FD9\u4E9BIO\u64CD\u4F5C\u4F7F\u5F97\u6B64\u8FDB\u7A0B\u963B\u585E\uFF0C\u6B64\u8FDB\u7A0B\u5FC5\u987B\u7B49\u5F85IO\u64CD\u4F5C\u5B8C\u6210\uFF0C\u6B64\u65F6CPU\u5904\u4E8E\u7A7A\u95F2\u72B6\u6001\uFF08\u8FD9\u4E5F\u662F\u591A\u7EBF\u7A0B\u6216\u8005\u8BF4\u591A\u4EFB\u52A1\u7684\u610F\u4E49\uFF0C\u5728\u67D0\u4E2A\u7EBF\u7A0B\u56E0\u4E3AIO\u64CD\u4F5C\u800C\u963B\u585E\u7684\u9002\u5408\uFF0C\u4E0D\u81F3\u4E8E\u8BA9CPU\u5904\u4E8E\u7A7A\u95F2\u72B6\u6001\u800C\u5BFC\u81F4CPU\u5229\u7528\u7387\u5F88\u4F4E\u548C\u7CFB\u7EDF\u541E\u5410\u91CF\u5F88\u4F4E\uFF0C\u5982\u679C\u91C7\u7528\u591A\u7EBF\u7A0B\uFF0C\u8FD9\u79CD\u60C5\u51B5\u4E0B\uFF0CCPU\u53EF\u4EE5\u5728\u67D0\u4E2A\u7EBF\u7A0B\u56E0\u4E3AIO\u64CD\u4F5C\u800C\u963B\u585E\u7684\u65F6\u5019\uFF0C\u4E0D\u5904\u4E8E\u7A7A\u95F2\u72B6\u6001\uFF0C\u800C\u53BB\u6267\u884C\u5176\u4ED6\u7EBF\u7A0B\uFF0C\u63D0\u9AD8\u7CFB\u7EDF\u541E\u5410\u91CF\uFF09\u3002

                                                                          CPU\u662F\u8BA1\u7B97\u673A\u4E2D\u6700\u6602\u8D35\u7684\u90E8\u4EF6\uFF0C\u4E3A\u4E86\u63D0\u9AD8CPU\u7684\u5229\u7528\u7387\uFF0C\u9700\u8981\u5148\u5C06\u8FDB\u7A0B\u9700\u8981\u7684\u5176\u4ED6\u8D44\u6E90\u5206\u914D\u5230\u4F4D\uFF0C\u624D\u80FD\u5F97\u5230CPU\u7684\u670D\u52A1\uFF0C\u4E5F\u5C31\u662F\u8BF4\uFF0C\u5904\u4E8E\u963B\u585E\u6001\u7684\u8FDB\u7A0B\uFF0C\u662F\u8FD8\u6CA1\u6709\u83B7\u5F97\u9664\u4E86CPU\u4E4B\u5916\u7684\u5176\u4ED6\u8D44\u6E90\u3002\u5982\u679C\u83B7\u5F97\u4E86\u9664\u4E86CPU\u4EE5\u5916\u7684\u5176\u4ED6\u8D44\u6E90\uFF0C\u53EA\u5DEECPU\uFF0C\u90A3\u4E48\u8FD9\u4E2A\u8FDB\u7A0B\u4F1A\u5904\u4E8E\u5C31\u7EEA\u6001\u3002

                                                                          \u83B7\u5F97\u4E86CPU\u4EE5\u5916\u7684\u5176\u4ED6\u6240\u6709\u9700\u8981\u7684\u8D44\u6E90\uFF0C\u4F1A\u4ECE\u963B\u585E\u6001\u5230\u5C31\u7EEA\u6001\uFF0C\u76F8\u5F53\u4E8EJava\u4E2D\u88AB\u5524\u9192\uFF01\uFF01

                                                                      3. \u8FDB\u7A0B\u7684\u53E6\u5916\u4E24\u79CD\u72B6\u6001

                                                                        • \u521B\u5EFA\u6001\uFF08NEW\uFF0C\u65B0\u5EFA\u6001\uFF09\uFF1A\u8FDB\u7A0B\u6B63\u5728\u88AB\u521B\u5EFA\uFF0C\u64CD\u4F5C\u7CFB\u7EDF\u4E3A\u8FDB\u7A0B\u5206\u914D\u5185\u5B58\u7A7A\u95F4\u7B49\u7CFB\u7EDF\u8D44\u6E90\uFF0C\u521D\u59CB\u5316PCB
                                                                        • \u7EC8\u6B62\u6001\uFF08TERMINATED\uFF09\uFF1A\u8FDB\u7A0B\u6B63\u5728\u4ECE\u7CFB\u7EDF\u4E2D\u64A4\u9500\uFF0C\u64CD\u4F5C\u7CFB\u7EDF\u4F1A\u56DE\u6536\u8FDB\u7A0B\u6240\u62E5\u6709\u7684\u8D44\u6E90\u3001\u64A4\u9500PCB
                                                                      \u8FDB\u7A0B\u72B6\u6001\u7684\u8F6C\u6362
                                                                      1. image-20211216153719194

                                                                        \u6CE8\u610F\uFF1A\u4E0D\u80FD\u7531\u963B\u585E\u6001\u76F4\u63A5\u8F6C\u6362\u4E3A\u8FD0\u884C\u6001\uFF08\u5FC5\u987B\u5148\u8F6C\u6362\u4E3A\u5C31\u7EEA\u6001\uFF09\uFF0C\u4E5F\u4E0D\u80FD\u7531\u5C31\u7EEA\u6001\u76F4\u63A5\u8F6C\u6362\u4E3A\u963B\u585E\u6001\uFF08\u56E0\u4E3A\u8FDB\u7A0B\u8FDB\u5165\u963B\u585E\u6001\u662F\u8FDB\u7A0B\u4E3B\u52A8\u8BF7\u6C42\u7684\uFF0C\u5FC5\u7136\u9700\u8981\u8FDB\u7A0B\u5728\u8FD0\u884C\u65F6\u624D\u80FD\u53D1\u51FA\u8FD9\u79CD\u8BF7\u6C42\u3002\uFF09

                                                                      2. image-20211216154057426

                                                                      \u8FDB\u7A0B\u63A7\u5236

                                                                      \u57FA\u672C\u6982\u5FF5

                                                                      1. \u8FDB\u7A0B\u63A7\u5236\u7684\u4E3B\u8981\u529F\u80FD\u662F\u5BF9\u7CFB\u7EDF\u4E2D\u7684\u6240\u6709\u8FDB\u7A0B\u5B9E\u65BD\u6709\u6548\u7684\u7BA1\u7406\uFF0C\u5B83\u5177\u6709\u521B\u5EFA\u65B0\u8FDB\u7A0B\u3001\u64A4\u9500\u5DF2\u6709\u8FDB\u7A0B\u3001\u5B9E\u73B0\u8FDB\u7A0B\u72B6\u6001\u8F6C\u6362\u6BD4\u5982\u963B\u585E\u3001\u5524\u9192\u7B49\u529F\u80FD\u3002

                                                                        \u7B80\u5316\u7406\u89E3\uFF1A\u53CD\u6B63\u8FDB\u7A0B\u63A7\u5236\u5C31\u662F\u8981\u5B9E\u73B0\u8FDB\u7A0B\u72B6\u6001\u8F6C\u6362

                                                                        image-20211216155307167

                                                                      2. \u5982\u4F55\u5B9E\u73B0\u8FDB\u7A0B\u63A7\u5236\uFF1F

                                                                        image-20211216155950660

                                                                      3. PCB\u6240\u5904\u7684\u961F\u5217\u548CPCB\u91CC\u7684\u72B6\u6001\u6807\u5FD7\u4E00\u5B9A\u8981\u662F\u5BF9\u5E94\u7684\uFF0C\u4E00\u81F4\u7684\uFF0C\u4E0D\u7136\u4F1A\u4EA7\u751F\u7CFB\u7EDF\u9519\u8BEF\uFF0C\u4E8E\u662F\u91C7\u7528\u539F\u8BED\u6765\u5B9E\u73B0\u8FDB\u7A0B\u63A7\u5236\uFF0C\u5B9E\u73B0\u8FDB\u7A0B\u72B6\u6001\u7684\u8F6C\u6362\uFF0C\u539F\u8BED\u53EF\u4EE5\u7406\u89E3\u4E3A\u4E00\u6C14\u5475\u6210\u3002

                                                                      \u8FDB\u7A0B\u63A7\u5236\u76F8\u5173\u7684\u539F\u8BED

                                                                      1. \u7528\u539F\u8BED\u5B9E\u73B0\u8FDB\u7A0B\u63A7\u5236\uFF0C\u539F\u8BED\u7684\u7279\u70B9\u662F\u6267\u884C\u671F\u95F4\u4E0D\u5141\u8BB8\u4E2D\u65AD\uFF0C\u53EA\u80FD\u4E00\u6C14\u5475\u6210

                                                                        \u8FD9\u79CD\u4E0D\u53EF\u88AB\u4E2D\u65AD\u7684\u64CD\u4F5C\u5373\u539F\u5B50\u64CD\u4F5C

                                                                        \u539F\u8BED\u91C7\u7528\u201C\u5173\u4E2D\u65AD\u6307\u4EE4\u201D\u548C\u201C\u5F00\u4E2D\u65AD\u6307\u4EE4\u201D\u5B9E\u73B0

                                                                        image-20211216160414267

                                                                        \u663E\u7136\uFF0C\u5173\u3001\u5F00\u4E2D\u65AD\u6307\u4EE4\u7684\u6743\u9650\u975E\u5E38\u5927\uFF0C\u5FC5\u7136\u662F\u53EA\u5141\u8BB8\u5728\u6838\u5FC3\u6001\u4E0B\u6267\u884C\u7684\u7279\u6743\u6307\u4EE4

                                                                        \u539F\u8BED\u4E5F\u662F\u53EA\u80FD\u8FD0\u884C\u5728\u6838\u5FC3\u6001\u7684\u3002

                                                                      2. \u8FDB\u7A0B\u63A7\u5236\u4F1A\u5BFC\u81F4\u8FDB\u7A0B\u72B6\u6001\u7684\u8F6C\u6362

                                                                        \u65E0\u8BBA\u54EA\u4E2A\u539F\u8BED\uFF0C\u8981\u505A\u7684\u65E0\u975E\u662F\u4E09\u7C7B\u4E8B\u60C5\uFF1A

                                                                        • \u66F4\u65B0PCB\u4E2D\u7684\u4FE1\u606F\uFF08\u5982\u4FEE\u6539PCB\u4E2D\u7684\u8FDB\u7A0B\u72B6\u6001\u6807\u5FD7\uFF0C\u5C06\u8FD0\u884C\u73AF\u5883\u4FDD\u5B58\u5230PCB\uFF0C\u4ECEPCB\u6062\u590D\u8FDB\u7A0B\u8FD0\u884C\u73AF\u5883\uFF09
                                                                          • \u6240\u6709\u7684\u8FDB\u7A0B\u63A7\u5236\u539F\u8BED\u4E00\u5B9A\u90FD\u4F1A\u4FEE\u6539\u8FDB\u7A0B\u72B6\u6001\u6807\u5FD7
                                                                          • \u5265\u593A\u5F53\u524D\u8FD0\u884C\u8FDB\u7A0B\u7684CPU\u4F7F\u7528\u6743\u5FC5\u987B\u9700\u8981\u4FDD\u5B58\u5176\u8FD0\u884C\u73AF\u5883\uFF0C\u4EE5\u8FDB\u884C\u4E0A\u4E0B\u6587\u5207\u6362
                                                                          • \u67D0\u8FDB\u7A0B\u5F00\u59CB\u8FD0\u884C\u524D\u5FC5\u7136\u8981\u6062\u590D\u5176\u8FD0\u884C\u73AF\u5883\u5373\u4E0A\u4E0B\u6587\u5207\u6362
                                                                        • \u5C06PCB\u63D2\u5165\u5408\u9002\u7684\u961F\u5217\uFF0C\u6240\u63D2\u5165\u7684\u961F\u5217\u8981\u4E0EPCB\u91CC\u7684\u4FE1\u606F\u4FDD\u6301\u4E00\u81F4\uFF0C\u6240\u4EE5\u8981\u901A\u8FC7\u539F\u8BED\u6765\u5B9E\u73B0\u8FDB\u7A0B\u63A7\u5236
                                                                        • \u5206\u914D\u3001\u56DE\u6536\u8D44\u6E90\uFF0C\u6BD4\u5982\u8FDB\u7A0BTERMINATED\u4E4B\u540E\uFF0C\u9700\u8981\u56DE\u6536\u5185\u5B58\u8FD9\u79CD\u7CFB\u7EDF\u8D44\u6E90\uFF01\uFF01 \u5F53\u7136\u53EF\u80FD\u8FD8\u6709\u8FD9\u4E2A\u8FDB\u7A0B\u6267\u884C\u6240\u9700\u8981\u7684\u5176\u4ED6\u8D44\u6E90
                                                                      3. image-20211216161206697

                                                                        image-20211216161225780

                                                                        image-20211216161549508

                                                                        image-20211216161628062

                                                                        \u6CE8\u610F\uFF1A\u4E00\u5B9A\u8981\u6CE8\u610F\uFF0C\u8FDB\u7A0B\u8F6C\u6362\u5230\u8FD0\u884C\u6001\uFF0C\u4E00\u5B9A\u8981\u6062\u590D\u8FDB\u7A0B\u8FD0\u884C\u73AF\u5883\uFF0C\u5982\u679C\u8FDB\u7A0B\u4ECE\u8FD0\u884C\u6001\u8F6C\u6362\u5230\u963B\u585E\u6001\uFF0C\u90A3\u4E48\u8981\u4FDD\u62A4\u8FDB\u7A0B\u8FD0\u884C\u73AF\u5883\uFF0C\u8FDB\u7A0B\u8FD0\u884C\u73AF\u5883\u4FDD\u5B58\u5230PCB\u3002

                                                                        \u8FDB\u7A0B\u8F6C\u6362\u5230\u963B\u585E\u6001\uFF0C\u662F\u4E3B\u52A8\u52A8\u4F5C\uFF0C\u6240\u4EE5\u4E00\u5B9A\u662F\u8FD0\u884C\u6001---\u963B\u585E\u6001\uFF0C\u56E0\u4E3A\u662F\u8FDB\u7A0B\u4E3B\u52A8\u7533\u8BF7\u7684\uFF0C\u4ECE\u963B\u585E\u6001\u662F\u8F6C\u6362\u5230\u5C31\u7EEA\u6001\uFF0C\u8FD9\u4E2A\u8FC7\u7A0B\u65E0\u9700\u6062\u590D\u8FDB\u7A0B\u8FD0\u884C\u73AF\u5883\uFF0C\u5F53\u8FDB\u7A0B\u4ECE\u5C31\u7EEA\u6001\u8F6C\u6362\u5230\u8FD0\u884C\u6001\u65F6\uFF0C\u9700\u4ECEPCB\u6062\u590D\u8FDB\u7A0B\u8FD0\u884C\u73AF\u5883\u3002

                                                                      \u8FDB\u7A0B\u901A\u4FE1

                                                                      \u6982\u5FF5

                                                                      1. \u8FDB\u7A0B\u901A\u4FE1\u6307\u7684\u5C31\u662F\u8FDB\u7A0B\u4E4B\u95F4\u7684\u4FE1\u606F\u4EA4\u6362

                                                                        \u8FDB\u7A0B\u662F\u8D44\u6E90\u5206\u914D\u7684\u57FA\u672C\u5355\u4F4D\uFF08\u5305\u62EC\u5185\u5B58\u5730\u5740\u7A7A\u95F4\uFF09\uFF0C\u56E0\u6B64\u5404\u8FDB\u7A0B\u62E5\u6709\u7684\u5185\u5B58\u5730\u5740\u7A7A\u95F4\u76F8\u4E92\u72EC\u7ACB

                                                                        \u4E3A\u4E86\u4FDD\u8BC1\u5B89\u5168\uFF0C\u4E00\u4E2A\u8FDB\u7A0B\u4E0D\u80FD\u76F4\u63A5\u8BBF\u95EE\u53E6\u4E00\u4E2A\u8FDB\u7A0B\u7684\u5730\u5740\u7A7A\u95F4

                                                                        \u4F46\u662F\u8FDB\u7A0B\u4E4B\u95F4\u7684\u4FE1\u606F\u4EA4\u6362\u53C8\u662F\u5FC5\u987B\u5B9E\u73B0\u7684\uFF0C\u6BD4\u5982\u8BF4\u4F7F\u7528\u5E94\u7528\u7A0B\u5E8F\u7684\u65F6\u5019\u7684\u5206\u4EAB\u529F\u80FD\uFF0C\u5C06\u4E00\u4E2A\u8FDB\u7A0B\u7684\u6570\u636E\u4FE1\u606F\u548C\u53E6\u4E00\u4E2A\u8FDB\u7A0B\u8FDB\u884C\u901A\u4FE1\uFF0C\u6240\u4EE5\u9700\u8981\u8FDB\u7A0B\u4E4B\u95F4\u7684\u901A\u4FE1

                                                                        \u4E3A\u4E86\u4FDD\u8BC1\u8FDB\u7A0B\u95F4\u7684\u5B89\u5168\u901A\u4FE1\uFF0C\u64CD\u4F5C\u7CFB\u7EDF\u63D0\u4F9B\u4E86\u4E00\u4E9B\u65B9\u6CD5---\u5171\u4EAB\u5B58\u50A8\u3001\u6D88\u606F\u4F20\u9012\u548C\u7BA1\u9053\u901A\u4FE1

                                                                      \u5171\u4EAB\u5B58\u50A8

                                                                      1. \u4E24\u4E2A\u8FDB\u7A0B\u4E0D\u80FD\u76F4\u63A5\u8BBF\u95EE\u5BF9\u65B9\u7684\u5730\u5740\u7A7A\u95F4\uFF0C\u6240\u4EE5\u64CD\u4F5C\u7CFB\u7EDF\u4F1A\u4E3A\u4E24\u4E2A\u8FDB\u7A0B\u5206\u914D\u4E00\u4E2A\u5171\u4EAB\u7A7A\u95F4\uFF0C\u4E24\u4E2A\u8FDB\u7A0B\u4E4B\u95F4\u7684\u901A\u4FE1\u5C31\u901A\u8FC7\u8FD9\u4E2A\u5171\u4EAB\u7A7A\u95F4\u6765\u5B8C\u6210\u3002

                                                                        \u4F46\u662F\u8FD9\u4E24\u4E2A\u8FDB\u7A0B\u5BF9\u5171\u4EAB\u7A7A\u95F4\u7684\u8BBF\u95EE\u5FC5\u987B\u662F\u4E92\u65A5\u7684\uFF0C\u8FD9\u5C31\u662F\u524D\u9762\u63D0\u5230\u7684\u4E92\u65A5\u5171\u4EAB

                                                                        \u4E92\u65A5\u5171\u4EAB\u5C31\u662F\u7CFB\u7EDF\u4E2D\u7684\u67D0\u4E9B\u8D44\u6E90\uFF0C\u867D\u7136\u53EF\u4EE5\u63D0\u4F9B\u7ED9\u591A\u4E2A\u8FDB\u7A0B\u4F7F\u7528\uFF0C\u4F46\u4E00\u4E2A\u65F6\u95F4\u6BB5\u5185\u53EA\u5141\u8BB8\u4E00\u4E2A\u8FDB\u7A0B\u8BBF\u95EE\u8BE5\u8D44\u6E90\u3002

                                                                      2. \u4E92\u65A5\u8BBF\u95EE\uFF0C\u4E00\u822C\u662F\u901A\u8FC7\u64CD\u4F5C\u7CFB\u7EDF\u63D0\u4F9B\u7684\u5DE5\u5177\u5B9E\u73B0\u7684\uFF0C\u64CD\u4F5C\u7CFB\u7EDF\u53EA\u8D1F\u8D23\u63D0\u4F9B\u5171\u4EAB\u7A7A\u95F4\u548C\u540C\u6B65\u4E92\u65A5\u5DE5\u5177\uFF08\u5982P\u3001V\u64CD\u4F5C\uFF09

                                                                      3. \u5171\u4EAB\u5B58\u50A8\uFF08\u5171\u4EAB\u7A7A\u95F4\uFF09\u5206\u4E3A\u4E24\u79CD

                                                                        • \u57FA\u4E8E\u6570\u636E\u7ED3\u6784\u7684\u5171\u4EAB

                                                                          \u5171\u4EAB\u7A7A\u95F4\u4E2D\u53EA\u80FD\u5B58\u653E\u4E00\u79CD\u56FA\u5B9A\u7684\u6570\u636E\u7ED3\u6784\uFF0C\u6BD4\u5982\u5171\u4EAB\u7A7A\u95F4\u91CC\u53EA\u80FD\u653E\u4E00\u4E2A\u957F\u5EA6\u4E3A10\u7684\u6570\u7EC4\uFF0C\u90A3\u4E48\u4E24\u4E2A\u8FDB\u7A0B\u4E4B\u95F4\u7684\u901A\u4FE1\uFF0C\u6BCF\u4E00\u6B21\u53EA\u80FD\u901A\u8FC7\u8FD9\u4E2A\u957F\u5EA6\u4E3A10\u7684\u6570\u7EC4\uFF0C\u8FD9\u79CD\u5171\u4EAB\u65B9\u5F0F\u901F\u5EA6\u6162\u3001\u9650\u5236\u591A\uFF0C\u662F\u4E00\u79CD\u4F4E\u7EA7\u901A\u4FE1\u65B9\u5F0F\u3002

                                                                        • \u57FA\u4E8E\u5B58\u50A8\u533A\u7684\u5171\u4EAB

                                                                          \u64CD\u4F5C\u7CFB\u7EDF\u53EA\u8D1F\u8D23\u4E3A\u901A\u4FE1\u7684\u8FDB\u7A0B\u63D0\u4F9B\u5B58\u50A8\u7A7A\u95F4\uFF0C\u5728\u5185\u5B58\u4E2D\u753B\u51FA\u4E00\u5757\u5171\u4EAB\u5B58\u50A8\u533A\uFF0C\u4F46\u662F\u5728\u8FD9\u4E2A\u5171\u4EAB\u7A7A\u95F4\u4E2D\uFF0C\u4E24\u4E2A\u8FDB\u7A0B\u4EA4\u6362\u7684\u6570\u636E\u662F\u4EC0\u4E48\u5F62\u5F0F\uFF0C\u5B58\u653E\u7684\u4F4D\u7F6E\u90FD\u662F\u7531\u8FDB\u7A0B\u63A7\u5236\uFF0C\u800C\u4E0D\u662F\u64CD\u4F5C\u7CFB\u7EDF\uFF0C\u76F8\u6BD4\u4E4B\u4E0B\uFF0C\u8FD9\u79CD\u5171\u4EAB\u65B9\u5F0F\u901F\u5EA6\u66F4\u5FEB\uFF0C\u662F\u4E00\u79CD\u9AD8\u7EA7\u901A\u4FE1\u65B9\u5F0F\uFF08\u76F8\u5F53\u4E8E\u662F\u8BF4\u4E0D\u4F1A\u6536\u5230\u90A3\u4E48\u591A\u9650\u5236\uFF09\u3002

                                                                      \u6D88\u606F\u4F20\u9012

                                                                      1. \u8FDB\u7A0B\u95F4\u7684\u6570\u636E\u4EA4\u6362\u4EE5\u683C\u5F0F\u5316\u7684\u6D88\u606F\u4E3A\u5355\u4F4D\uFF0C\u8FDB\u7A0B\u901A\u8FC7\u64CD\u4F5C\u7CFB\u7EDF\u63D0\u4F9B\u7684\u201C\u53D1\u9001\u6D88\u606F/\u63A5\u6536\u6D88\u606F\u201D\u4E24\u4E2A\u539F\u8BED\u8FDB\u884C\u6570\u636E\u4EA4\u6362\u3002

                                                                        \u4E00\u4E2A\u683C\u5F0F\u5316\u7684\u6D88\u606F\u4F1A\u5305\u542B\u6D88\u606F\u5934\u548C\u6D88\u606F\u4F53\u4E24\u4E2A\u90E8\u5206

                                                                        \u6D88\u606F\u5934\u5305\u62EC\uFF1A\u53D1\u9001\u8FDB\u7A0BID\uFF0C\u63A5\u6536\u8FDB\u7A0BID\uFF0C\u6D88\u606F\u7C7B\u578B\uFF0C\u6D88\u606F\u957F\u5EA6\u7B49\u683C\u5F0F\u5316\u7684\u4FE1\u606F\uFF08\u8BA1\u7B97\u673A\u7F51\u7EDC\u4E2D\u53D1\u9001\u7684\u201C\u62A5\u6587\u201D\u5176\u5B9E\u5C31\u662F\u4E00\u79CD\u683C\u5F0F\u5316\u7684\u6D88\u606F\uFF09

                                                                        image-20211216171359712

                                                                      2. \u6D88\u606F\u4F20\u9012\u5206\u4E3A\u4E24\u79CD

                                                                        • \u76F4\u63A5\u901A\u4FE1\u65B9\u5F0F

                                                                          \u628A\u6D88\u606F\u76F4\u63A5\u6302\u5230\u63A5\u6536\u8FDB\u7A0B\u7684\u6D88\u606F\u7F13\u51B2\u961F\u5217\u4E0A\uFF0C\u6BCF\u4E00\u4E2A\u8FDB\u7A0B\u4F1A\u6709\u4E00\u4E2A\u6D88\u606F\u7F13\u51B2\u961F\u5217\uFF0C\u5982\u679C\u6709\u53E6\u5916\u4E00\u4E2A\u8FDB\u7A0B\u60F3\u7ED9\u8FD9\u4E2A\u8FDB\u7A0B\u53D1\u9001\u6D88\u606F\u7684\u65F6\u5019\uFF0C\u53D1\u9001\u8FDB\u7A0B\u9996\u5148\u4F1A\u521B\u5EFA\u597D\u6D88\u606F\u5934\u548C\u6D88\u606F\u4F53\uFF0C\u901A\u8FC7\u53D1\u9001\u539F\u8BED\u53D1\u9001\u7ED9\u76EE\u6807\u8FDB\u7A0B\uFF0C\u6D88\u606F\u5C31\u4F1A\u6302\u5230\u76EE\u6807\u8FDB\u7A0B\u7684\u6D88\u606F\u7F13\u51B2\u961F\u5217\u7684\u961F\u5C3E\u3002

                                                                          \u76EE\u6807\u8FDB\u7A0B\u901A\u8FC7\u63A5\u6536\u539F\u8BED\uFF0C\u4F9D\u6B21\u628A\u6D88\u606F\u7F13\u51B2\u961F\u5217\u7684\u6D88\u606F\u53D6\u8D70

                                                                        • \u95F4\u63A5\u901A\u4FE1\u65B9\u5F0F

                                                                          \u6D88\u606F\u8981\u5148\u53D1\u9001\u5230\u4E2D\u95F4\u5B9E\u4F53\uFF08\u4FE1\u7BB1\uFF09\u4E2D\uFF0C\u56E0\u6B64\u4E5F\u79F0\u4E3A\u201C\u4FE1\u7BB1\u901A\u4FE1\u65B9\u5F0F\u201D

                                                                          image-20211216171817705

                                                                          \u4FE1\u7BB1\u4E2D\u7684\u6D88\u606F\u7531\u54EA\u4E2A\u8FDB\u7A0B\u53D1\u9001\u7684\uFF0C\u7531\u54EA\u4E2A\u8FDB\u7A0B\u63A5\u6536\uFF0C\u90FD\u5728\u6D88\u606F\u5934\u4E2D

                                                                          \u901A\u8FC7\u53D1\u9001\u539F\u8BED\uFF0C\u53D1\u9001\u8FDB\u7A0B\u53D1\u9001\u6D88\u606F\u5230\u4FE1\u7BB1\u4E2D

                                                                          \u540C\u6837\uFF0C\u63A5\u6536\u8FDB\u7A0B\u901A\u8FC7\u63A5\u6536\u539F\u8BED\uFF0C\u4ECE\u4FE1\u7BB1\u4E2D\u53D6\u6D88\u606F

                                                                      \u7BA1\u9053\u901A\u4FE1

                                                                      1. \u6240\u8C13\u7684\u7BA1\u9053\u5176\u5B9E\u662F\u4E00\u79CD\u7279\u6B8A\u7684\u5171\u4EAB\u6587\u4EF6\u3002

                                                                        \u201C\u7BA1\u9053\u201D\u662F\u6307\u7528\u4E8E\u8FDE\u63A5\u8BFB\u5199\u8FDB\u7A0B\u7684\u4E00\u4E2A\u5171\u4EAB\u6587\u4EF6\uFF0C\u53C8\u540Dpipe\u6587\u4EF6

                                                                        \u5176\u5B9E\u5C31\u662F\u5728\u5185\u5B58\u4E2D\u5F00\u8F9F\u4E00\u4E2A\u5927\u5C0F\u56FA\u5B9A\u7684\u7F13\u51B2\u533A

                                                                        \u8FD9\u4E2A\u7F13\u51B2\u533A\u7684\u5927\u5C0F\u4E00\u822C\u548C\u5185\u5B58\u9875\u9762\u662F\u4E00\u6837\u7684

                                                                        image-20211216170454485

                                                                      2. \u4E00\u4E2A\u7BA1\u9053\u53EA\u80FD\u91C7\u7528\u534A\u53CC\u5DE5\u901A\u4FE1\uFF0C\u67D0\u4E00\u65F6\u95F4\u6BB5\u53EA\u80FD\u5B9E\u73B0\u5355\u5411\u7684\u4F20\u8F93\uFF0C\u5982\u679C\u8981\u5B9E\u73B0\u53CC\u5411\u540C\u65F6\u901A\u4FE1\uFF0C\u5219\u9700\u8981\u8BBE\u7F6E\u4E24\u4E2A\u7BA1\u9053\u3002

                                                                        image-20211216170707557

                                                                      3. \u5404\u4E2A\u8FDB\u7A0B\u5BF9\u7BA1\u9053\u7684\u8BBF\u95EE\uFF0C\u9700\u8981\u4E92\u65A5\u7684\u8FDB\u884C\uFF0C\u4E5F\u662F\u524D\u9762\u63D0\u5230\u7684\u4E92\u65A5\u5171\u4EAB\u3002

                                                                      4. \u6570\u636E\u4EE5\u5B57\u7B26\u6D41\u7684\u5F62\u5F0F\u5199\u5165\u7BA1\u9053\uFF0C\u5F53\u7BA1\u9053\u5199\u6EE1\u65F6\uFF0C\u5199\u8FDB\u7A0B\u7684write()\u7CFB\u7EDF\u8C03\u7528\u5C06\u5BFC\u81F4\u5199\u8FDB\u7A0B\u88AB\u963B\u585E\uFF0C\u7B49\u5F85\u8BFB\u8FDB\u7A0B\u5C06\u6570\u636E\u53D6\u8D70\u3002

                                                                        \u5F53\u8BFB\u8FDB\u7A0B\u5C06\u6570\u636E\u5168\u90E8\u53D6\u8D70\u540E\uFF0C\u7BA1\u9053\u53D8\u7A7A\uFF0C\u6B64\u65F6\u8BFB\u8FDB\u7A0B\u7684read()\u7CFB\u7EDF\u8C03\u7528\u5C06\u5BFC\u81F4\u8BFB\u8FDB\u7A0B\u963B\u585E

                                                                      5. \u5982\u679C\u6CA1\u5199\u6EE1\uFF0C\u5C31\u4E0D\u5141\u8BB8\u8BFB\uFF0C\u5982\u679C\u6CA1\u8BFB\u7A7A\uFF0C\u5C31\u4E0D\u5141\u8BB8\u5199\u3002

                                                                      6. \u6570\u636E\u4E00\u65E6\u88AB\u8BFB\u51FA\uFF0C\u5C31\u4ECE\u7BA1\u9053\u4E2D\u629B\u5F03\uFF0C\u8FD9\u5C31\u610F\u5473\u7740\u8BFB\u8FDB\u7A0B\u6700\u591A\u53EA\u80FD\u6709\u4E00\u4E2A\uFF0C\u5426\u5219\u53EF\u80FD\u4F1A\u6709\u8BFB\u9519\u6570\u636E\u7684\u60C5\u51B5

                                                                      image-20211216172035502

                                                                      \u7EBF\u7A0B\u548C\u591A\u7EBF\u7A0B\u6A21\u578B

                                                                      \u6982\u5FF5

                                                                      1. \u5728\u6CA1\u6709\u5F15\u5165\u8FDB\u7A0B\u4E4B\u524D\uFF0C\u7CFB\u7EDF\u4E2D\u5404\u4E2A\u7A0B\u5E8F\u53EA\u80FD\u4E32\u884C\u6267\u884C\u3002

                                                                      2. \u6709\u7684\u8FDB\u7A0B\uFF0C\u53EF\u80FD\u9700\u8981\u540C\u65F6\u505A\u5F88\u591A\u4E8B\uFF0C\u800C\u4F20\u7EDF\u7684\u8FDB\u7A0B\u53EA\u80FD\u4E32\u884C\u5730\u6267\u884C\u4E00\u7CFB\u5217\u7A0B\u5E8F\uFF08\u591A\u4E2A\u8FDB\u7A0B\u4E4B\u95F4\u662F\u5E76\u53D1\u7684\uFF0C\u4F46\u662F\u4E00\u4E2A\u8FDB\u7A0B\u5185\u90E8\u7684\u7A0B\u5E8F\u662F\u4E32\u884C\u6267\u884C\u7684\u3002\uFF09\uFF0C\u4E3A\u6B64\uFF0C\u5F15\u5165\u4E86\u201C\u7EBF\u7A0B\u201D\uFF0C\u6765\u589E\u52A0\u5E76\u53D1\u5EA6\u3002

                                                                        image-20211216191425419

                                                                        \u540C\u4E00\u4E2A\u8FDB\u7A0B\u4E2D\u88AB\u5206\u4E3A\u4E86\u591A\u4E2A\u7EBF\u7A0B\u3002

                                                                        \u591A\u4E2A\u7EBF\u7A0B\u4E4B\u95F4\uFF0C\u53EF\u4EE5\u5E76\u53D1\u5730\u6267\u884C\uFF01\uFF01\u4E4B\u524D\u4E00\u76F4\u8BF4\u7684\u90FD\u662F\u8FDB\u7A0B\u4E4B\u95F4\u7684\u5E76\u53D1\uFF0C\u4F46\u662F\u5F15\u5165\u4E86\u7EBF\u7A0B\u4E4B\u540E\uFF0C\u591A\u4E2A\u7EBF\u7A0B\u4E4B\u95F4\uFF0C\u80FD\u591F\u5E76\u53D1\u6267\u884C\uFF0C\u4E5F\u5C31\u662F\u5728\u5B8F\u89C2\u4E0A\u591A\u4E2A\u7EBF\u7A0B\u662F\u5E76\u884C\u6267\u884C\u7684\uFF0C\u5728\u5FAE\u89C2\u4E0A\uFF0C\u662FCPU\u4EA4\u66FF\u6267\u884C\u8FD9\u591A\u4E2A\u7EBF\u7A0B\uFF0C\u4E5F\u5C31\u662F\u5FAE\u89C2\u4E0A\u662F\u5E76\u53D1\u7684\uFF0C\u4F46\u662F\u5982\u679CCPU\u662F\u591A\u6838\u7684\uFF0C\u5FAE\u89C2\u4E0A\u4E5F\u80FD\u591F\u5B9E\u73B0\u771F\u6B63\u610F\u4E49\u4E0A\u7684\u5E76\u884C\u3002

                                                                      3. \u5F15\u5165\u4E86\u7EBF\u7A0B\u4E4B\u540E\uFF0C\u7EBF\u7A0B\u6210\u4E3A\u4E86\u7A0B\u5E8F\u6267\u884C\u6D41\u7684\u6700\u5C0F\u5355\u4F4D\u3002\u8FDB\u7A0B\u662F\u8D44\u6E90\u5206\u914D\u7684\u6700\u5C0F\u5355\u4F4D\uFF0C\u591A\u4E2A\u7EBF\u7A0B\u4F1A\u5171\u7528\u8FDB\u7A0B\u7684\u8D44\u6E90\uFF0C\u4F46\u662F\u7EBF\u7A0B\u662F\u8C03\u5EA6\u7684\u6700\u5C0F\u5355\u4F4D\u3002

                                                                        \u5F15\u5165\u4E86\u7EBF\u7A0B\u4E4B\u540E\uFF0C\u662F\u591A\u4E2A\u7EBF\u7A0B\u5E76\u53D1\u5730\u88ABCPU\u5904\u7406\u3002

                                                                      4. \u7EBF\u7A0B\u53EF\u4EE5\u7406\u89E3\u4E3A\u662F\u8F7B\u91CF\u7EA7\u7684\u8FDB\u7A0B\u3002

                                                                        \u7EBF\u7A0B\u662F\u4E00\u4E2A\u57FA\u672C\u7684CPU\u6267\u884C\u5355\u5143\uFF0C\u4E5F\u662F\u7A0B\u5E8F\u6267\u884C\u6D41\u7684\u6700\u5C0F\u5355\u4F4D\u3002\u5F15\u5165\u7EBF\u7A0B\u4E4B\u540E\uFF0C\u4E0D\u4EC5\u662F\u8FDB\u7A0B\u4E4B\u95F4\u53EF\u4EE5\u5E76\u53D1\uFF0C\u8FDB\u7A0B\u5185\u7684\u5404\u7EBF\u7A0B\u4E4B\u95F4\u4E5F\u53EF\u4EE5\u5E76\u53D1\uFF0C\u4ECE\u800C\u8FDB\u4E00\u6B65\u63D0\u5347\u4E86\u7CFB\u7EDF\u7684\u5E76\u53D1\u5EA6\uFF0C\u4F7F\u5F97\u4E00\u4E2A\u8FDB\u7A0B\u5185\u4E5F\u53EF\u4EE5\u5E76\u53D1\u5904\u7406\u5404\u79CD\u4EFB\u52A1\u3002

                                                                        \u5F15\u5165\u7EBF\u7A0B\u540E\uFF0C\u8FDB\u7A0B\u53EA\u4F5C\u4E3A\u9664CPU\u4E4B\u5916\u7684\u7CFB\u7EDF\u8D44\u6E90\u7684\u5206\u914D\u5355\u5143\uFF08\u5982\u6253\u5370\u673A\u3001\u5185\u5B58\u5730\u5740\u7A7A\u95F4\u7B49\u90FD\u662F\u5206\u914D\u7ED9\u8FDB\u7A0B\u7684\uFF0C\u8FDB\u7A0B\u662F\u8D44\u6E90\u5206\u914D\u7684\u6700\u5C0F\u5355\u4F4D\uFF09

                                                                        CPU\u4E5F\u7B97\u662F\u7CFB\u7EDF\u8D44\u6E90\uFF0C\u5206\u914D\u7684\u6700\u5C0F\u5355\u4F4D\u662F\u7EBF\u7A0B\uFF01\uFF01\u7EBF\u7A0B\u4E5F\u9700\u8981\u5F97\u5230CPU\u670D\u52A1\u4E4B\u540E\uFF0C\u624D\u80FD\u6267\u884C\u3002\u7EBF\u7A0B\u4E4B\u95F4\u4E5F\u5B58\u5728\u4E0A\u4E0B\u6587\u5207\u6362\uFF0C\u7EBF\u7A0B\u7684\u72B6\u6001\u8F6C\u6362\u662F\u7531\u4E8ECPU\u7684\u8F6E\u8F6C\u673A\u5236\u6216\u8005\u5176\u4ED6\u673A\u5236\u800C\u5BFC\u81F4CPU\u4E0D\u7EE7\u7EED\u670D\u52A1\u5F53\u524D\u7EBF\u7A0B\uFF0C\u4E8E\u662F\u51FA\u73B0\u7EBF\u7A0B\u7684\u72B6\u6001\u8F6C\u6362\uFF0C\u4E5F\u5B58\u5728\u8981\u4FDD\u5B58\u7EBF\u7A0B\u7684\u8FD0\u884C\u73AF\u5883\uFF0C\u6062\u590D\u8FD0\u884C\u73AF\u5883\u8FD9\u79CD\u4E0A\u4E0B\u6587\u5207\u6362\uFF0C\u548C\u524D\u9762\u8BF4\u7684\u8FDB\u7A0B\u5F88\u7C7B\u4F3C\u3002

                                                                      \u5F15\u5165\u7EBF\u7A0B\u673A\u5236\u540E\u7684\u53D8\u5316

                                                                      1. image-20211216193636875

                                                                      \u7EBF\u7A0B\u6709\u54EA\u4E9B\u5C5E\u6027

                                                                      1. \u7EBF\u7A0B\u662F\u5904\u7406\u5668\u8C03\u5EA6\u7684\u5355\u4F4D
                                                                      2. \u591A\u6838CPU\u73AF\u5883\u4E0B\uFF0C\u5404\u4E2A\u7EBF\u7A0B\u53EF\u5360\u7528\u4E0D\u540C\u7684CPU
                                                                      3. \u6BCF\u4E2A\u7EBF\u7A0B\u90FD\u6709\u4E00\u4E2A\u7EBF\u7A0BID\uFF0C\u7EBF\u7A0B\u63A7\u5236\u5757\uFF08TCB\uFF09
                                                                      4. \u7EBF\u7A0B\u4E5F\u6709\u5C31\u7EEA\u3001\u963B\u585E\u3001\u8FD0\u884C\u4E09\u79CD\u57FA\u672C\u72B6\u6001
                                                                      5. \u7EBF\u7A0B\u51E0\u4E4E\u4E0D\u62E5\u6709\u7CFB\u7EDF\u8D44\u6E90
                                                                      6. \u540C\u4E00\u8FDB\u7A0B\u7684\u4E0D\u540C\u7EBF\u7A0B\u95F4\u5171\u4EAB\u8FDB\u7A0B\u7684\u8D44\u6E90
                                                                      7. \u7531\u4E8E\u5171\u4EAB\u5185\u5B58\u5730\u5740\u7A7A\u95F4\uFF0C\u540C\u4E00\u8FDB\u7A0B\u7684\u7EBF\u7A0B\u95F4\u901A\u4FE1\u751A\u81F3\u65E0\u9700\u64CD\u4F5C\u7CFB\u7EDF\u5E72\u6270\uFF08\u56E0\u4E3A\u540C\u4E00\u8FDB\u7A0B\u4E2D\u7684\u7EBF\u7A0B\u5171\u4EAB\u5185\u5B58\u5730\u5740\u7A7A\u95F4\uFF09
                                                                      8. \u540C\u4E00\u8FDB\u7A0B\u4E2D\u7684\u7EBF\u7A0B\u5207\u6362\uFF0C\u4E0D\u4F1A\u5F15\u8D77\u8FDB\u7A0B\u5207\u6362
                                                                      9. \u4E0D\u540C\u8FDB\u7A0B\u4E2D\u7684\u7EBF\u7A0B\u5207\u6362\uFF0C\u4F1A\u5F15\u8D77\u8FDB\u7A0B\u5207\u6362
                                                                      10. \u5207\u6362\u540C\u8FDB\u7A0B\u5185\u7684\u7EBF\u7A0B\uFF0C\u7CFB\u7EDF\u5F00\u9500\u5F88\u5C0F
                                                                      11. \u5207\u6362\u8FDB\u7A0B\uFF0C\u7CFB\u7EDF\u5F00\u9500\u8F83\u5927\u3002\uFF08\u56E0\u4E3A\u5207\u6362\u8FDB\u7A0B\u8FD8\u8981\u5207\u6362\u9875\u8868\uFF0C\u9875\u8868\u662F\u865A\u62DF\u5730\u5740\u5230\u7269\u7406\u5730\u5740\u7684\u6620\u5C04\uFF0C\u7EBF\u7A0B\u4E0D\u6D89\u53CA\u5230\u9875\u8868\u7684\u5207\u6362\uFF09

                                                                      \u7EBF\u7A0B\u7684\u5B9E\u73B0\u65B9\u5F0F

                                                                      1. \u7528\u6237\u7EA7\u7EBF\u7A0B

                                                                        \u7528\u6237\u7EA7\u7EBF\u7A0B\u7531\u5E94\u7528\u7A0B\u5E8F\u901A\u8FC7\u7EBF\u7A0B\u5E93\u5B9E\u73B0\uFF0C\u6240\u6709\u7684\u7EBF\u7A0B\u7BA1\u7406\u5DE5\u4F5C\u90FD\u7531\u5E94\u7528\u7A0B\u5E8F\u8D1F\u8D23\uFF08\u5305\u62EC\u7EBF\u7A0B\u5207\u6362\uFF09

                                                                        \u7528\u6237\u7EA7\u7EBF\u7A0B\u4E2D\uFF0C\u7EBF\u7A0B\u5207\u6362\u53EF\u4EE5\u5728\u7528\u6237\u6001\u4E0B\u8FDB\u884C\uFF0C\u65E0\u9700\u64CD\u4F5C\u7CFB\u7EDF\u5E72\u9884

                                                                        \u5728\u7528\u6237\u770B\u6765\uFF0C\u662F\u6709\u591A\u4E2A\u7EBF\u7A0B\uFF0C\u4F46\u662F\u5728\u64CD\u4F5C\u7CFB\u7EDF\u5185\u6838\u770B\u6765\uFF0C\u610F\u8BC6\u4E0D\u5230\u7EBF\u7A0B\u7684\u5B58\u5728\uFF0C\u7528\u6237\u7EA7\u7EBF\u7A0B\u5BF9\u7528\u6237\u4E0D\u900F\u660E\uFF0C\u5BF9\u64CD\u4F5C\u7CFB\u7EDF\u900F\u660E\u3002

                                                                        \u7528\u6237\u7EA7\u7EBF\u7A0B\u5C31\u662F\u4ECE\u7528\u6237\u7684\u89C6\u89D2\u53EF\u4EE5\u770B\u5230\u7684\u7EBF\u7A0B

                                                                      2. \u5185\u6838\u7EA7\u7EBF\u7A0B

                                                                        \u5185\u6838\u7EA7\u7EBF\u7A0B\u7684\u7BA1\u7406\u5DE5\u4F5C\u662F\u7531\u64CD\u4F5C\u7CFB\u7EDF\u5185\u6838\u5B8C\u6210\uFF0C\u7EBF\u7A0B\u8C03\u5EA6\u3001\u5207\u6362\u7B49\u5DE5\u4F5C\u90FD\u7531\u5185\u6838\u8D1F\u8D23\uFF0C\u56E0\u6B64\u5185\u6838\u7EA7\u7EBF\u7A0B\u7684\u5207\u6362\u5FC5\u7136\u9700\u8981\u5728\u6838\u5FC3\u6001\u4E0B\u5B8C\u6210\u3002

                                                                        \u5185\u6838\u7EA7\u7EBF\u7A0B\u5C31\u662F\u4ECE\u64CD\u4F5C\u7CFB\u7EDF\u5185\u6838\u89C6\u89D2\u80FD\u591F\u770B\u5230\u7684\u7EBF\u7A0B

                                                                      3. \u5728\u540C\u65F6\u652F\u6301\u7528\u6237\u7EA7\u7EBF\u7A0B\u548C\u5185\u6838\u7EA7\u7EBF\u7A0B\u7684\u7CFB\u7EDF\u4E2D\uFF0C\u53EF\u91C7\u7528\u4E8C\u8005\u7EC4\u5408\u7684\u65B9\u5F0F\uFF0C\u5C06n\u4E2A\u7528\u6237\u7EA7\u7EBF\u7A0B\uFF0C\u6620\u5C04\u5230m\u4E2A\u5185\u6838\u7EA7\u7EBF\u7A0B\u4E0A

                                                                        \u91CD\u70B9\uFF1A\u64CD\u4F5C\u7CFB\u7EDF\u53EA\u770B\u5F97\u89C1\u5185\u6838\u7EA7\u7EBF\u7A0B\uFF0C\u56E0\u6B64\u53EA\u6709\u5185\u6838\u7EA7\u7EBF\u7A0B\u624D\u662F\u5904\u7406\u5668\u5206\u914D\u7684\u5355\u4F4D\u3002

                                                                        image-20211216203142509

                                                                      \u591A\u7EBF\u7A0B\u6A21\u578B

                                                                      1. \u5728\u540C\u65F6\u652F\u6301\u7528\u6237\u7EA7\u7EBF\u7A0B\u548C\u5185\u6838\u7EA7\u7EBF\u7A0B\u7684\u7CFB\u7EDF\u4E2D\uFF0C\u7531\u51E0\u4E2A\u7528\u6237\u7EA7\u7EBF\u7A0B\u6620\u5C04\u5230\u51E0\u4E2A\u5185\u6838\u7EA7\u7EBF\u7A0B\u7684\u95EE\u9898\u5F15\u51FA\u4E86\u201C\u591A\u7EBF\u7A0B\u6A21\u578B\u201D\u95EE\u9898

                                                                      2. \u591A\u5BF9\u4E00\u6A21\u578B

                                                                        image-20211216210038328

                                                                        \u591A\u4E2A\u7528\u6237\u7EA7\u7EBF\u7A0B\u6620\u5C04\u5230\u4E00\u4E2A\u5185\u6838\u7EA7\u7EBF\u7A0B\u3002\u6BCF\u4E2A\u7528\u6237\u8FDB\u7A0B\u53EA\u5BF9\u5E94\u4E00\u4E2A\u5185\u6838\u7EA7\u7EBF\u7A0B\uFF0C\u5185\u6838\u7EA7\u7EBF\u7A0B\u624D\u662F\u4F5C\u4E3A\u8C03\u5EA6\u7684\u57FA\u672C\u5355\u4F4D

                                                                        \u4F18\u70B9\uFF1A\u7528\u6237\u7EA7\u7EBF\u7A0B\u7684\u5207\u6362\u5728\u7528\u6237\u7A7A\u95F4\u5373\u53EF\u5B8C\u6210\uFF0C\u4E0D\u9700\u8981\u5207\u6362\u5230\u6838\u5FC3\u6001\uFF0C\u7EBF\u7A0B\u7BA1\u7406\u7684\u7CFB\u7EDF\u5F00\u9500\u5C0F\uFF0C\u6548\u7387\u9AD8

                                                                        \u7F3A\u70B9\uFF1A\u5F53\u4E00\u4E2A\u7528\u6237\u7EA7\u7EBF\u7A0B\u88AB\u963B\u585E\u540E\uFF0C\u4F1A\u5BFC\u81F4\u5185\u6838\u7EA7\u7EBF\u7A0B\u963B\u585E\uFF0C\u5176\u4ED6\u7528\u6237\u7EA7\u7EBF\u7A0B\u4E5F\u4E0D\u80FD\u6267\u884C\u4E86\uFF0C \u6574\u4E2A\u8FDB\u7A0B\u4F1A\u88AB\u963B\u585E\uFF0C\u5E76\u53D1\u5EA6\u4E0D\u9AD8\u3002\u591A\u4E2A\u7EBF\u7A0B\u4E0D\u53EF\u4EE5\u5728\u591A\u6838\u5904\u7406\u5668\u4E0A\u5E76\u884C\u8FD0\u884C\u3002\u56E0\u4E3A\u5185\u6838\u7EA7\u7EBF\u7A0B\u624D\u662F\u5904\u7406\u5668\u8C03\u5EA6\u7684\u57FA\u672C\u5355\u4F4D\u3002\uFF08\u64CD\u4F5C\u7CFB\u7EDF\u53EA\u770B\u5F97\u89C1\u5185\u6838\u7EA7\u7EBF\u7A0B\uFF09

                                                                      3. \u4E00\u5BF9\u4E00\u6A21\u578B

                                                                        image-20211216210353349

                                                                        \u4E00\u4E2A\u7528\u6237\u7EA7\u7EBF\u7A0B\u6620\u5C04\u5230\u4E00\u4E2A\u5185\u6838\u7EA7\u7EBF\u7A0B\uFF0C\u6BCF\u4E2A\u7528\u6237\u8FDB\u7A0B\u6709\u4E0E\u7528\u6237\u7EA7\u7EBF\u7A0B\u540C\u6570\u91CF\u7684\u5185\u6838\u7EA7\u7EBF\u7A0B

                                                                        \u4F18\u70B9\uFF1A\u5F53\u4E00\u4E2A\u7EBF\u7A0B\u88AB\u963B\u585E\u540E\uFF0C\u522B\u7684\u7EBF\u7A0B\u8FD8\u53EF\u4EE5\u7EE7\u7EED\u6267\u884C\uFF0C\u5E76\u53D1\u80FD\u529B\u5F3A\uFF0C\u591A\u7EBF\u7A0B\u53EF\u4EE5\u5728\u591A\u6838\u5904\u7406\u5668\u4E0A\u5E76\u884C\u6267\u884C\u3002

                                                                        \u7F3A\u70B9\uFF1A\u4E00\u4E2A\u7528\u6237\u8FDB\u7A0B\u4F1A\u5360\u7528\u591A\u4E2A\u5185\u6838\u7EA7\u7EBF\u7A0B\uFF0C\u7EBF\u7A0B\u5207\u6362\u662F\u7531\u64CD\u4F5C\u7CFB\u7EDF\u5185\u6838\u5B8C\u6210\uFF0C\u9700\u8981\u5207\u6362\u5230\u6838\u5FC3\u6001\uFF0C\u56E0\u6B64\u7EBF\u7A0B\u7BA1\u7406\u7684\u6210\u672C\u9AD8\uFF0C\u5F00\u9500\u5927\u3002

                                                                      4. \u591A\u5BF9\u591A\u6A21\u578B

                                                                        image-20211216210743381

                                                                        n\u4E2A\u7528\u6237\u7EA7\u7EBF\u7A0B\u6620\u5C04\u5230m\u4E2A\u5185\u6838\u7EA7\u7EBF\u7A0B\uFF0C\u6BCF\u4E2A\u7528\u6237\u8FDB\u7A0B\u5BF9\u5E94m\u4E2A\u5185\u6838\u7EA7\u7EBF\u7A0B

                                                                        \u514B\u670D\u4E86\u591A\u5BF9\u4E00\u6A21\u578B\u5E76\u53D1\u5EA6\u4E0D\u9AD8\u7684\u7F3A\u70B9\uFF0C\u53C8\u514B\u670D\u4E86\u4E00\u5BF9\u4E00\u6A21\u578B\u4E2D\u4E00\u4E2A\u7528\u6237\u8FDB\u7A0B\u5360\u7528\u592A\u591A\u5185\u6838\u7EA7\u7EBF\u7A0B\uFF0C\u5F00\u9500\u592A\u5927\u7684\u7F3A\u70B9\u3002

                                                                      \u5904\u7406\u673A\u8C03\u5EA6

                                                                      \u57FA\u672C\u6982\u5FF5

                                                                      1. \u7EBF\u7A0B\u662F\u8C03\u5EA6\u7684\u6700\u5C0F\u5355\u4F4D\uFF08\u5185\u6838\u7EA7\u7EBF\u7A0B\uFF09

                                                                      2. \u8C03\u5EA6\uFF1A

                                                                        \u5F53\u6709\u4E00\u5806\u4EFB\u52A1\u8981\u5904\u7406\uFF0C\u4F46\u7531\u4E8E\u8D44\u6E90\u6709\u9650\uFF0C\u8FD9\u4E9B\u4E8B\u60C5\u6CA1\u6CD5\u540C\u65F6\u5904\u7406\uFF0C\u8FD9\u5C31\u9700\u8981\u786E\u5B9A\u67D0\u79CD\u89C4\u5219\u6765\u51B3\u5B9A\u5904\u7406\u8FD9\u4E9B\u4EFB\u52A1\u7684\u987A\u5E8F\uFF0C\u8FD9\u5C31\u662F\u201C\u8C03\u5EA6\u201D\u7814\u7A76\u7684\u95EE\u9898

                                                                        \u8FD9\u79CD\u8BF4\u6CD5\u4E0B\u7684\u4EFB\u52A1\u4E5F\u53EF\u4EE5\u7406\u89E3\u4E3A\u7EBF\u7A0B\u3002

                                                                      3. \u5728\u591A\u9053\u7A0B\u5E8F\u7CFB\u7EDF\u4E2D\uFF0C\u8FDB\u7A0B\u7684\u6570\u91CF\uFF08\u7EBF\u7A0B\u7684\u6570\u91CF\uFF09\u5F80\u5F80\u662F\u591A\u4E8E\u5904\u7406\u5668\u7684\u6838\u5FC3\u4E2A\u6570\u7684\uFF0C\u8FD9\u6837\u4E0D\u53EF\u80FD\u540C\u65F6\u5E76\u884C\u5730\u5904\u7406\u5404\u4E2A\u8FDB\u7A0B\uFF0C\u5982\u679C\u7EBF\u7A0B\u6570\u91CF\u548C\u5904\u7406\u5668\u6838\u5FC3\u6570\u76F8\u540C\uFF0C\u90A3\u4E48\u5728\u5FAE\u89C2\u4E0A\u662F\u80FD\u505A\u5230\u771F\u6B63\u7684\u5E76\u884C\u5904\u7406\u7EBF\u7A0B\u7684\u3002

                                                                        \u5728\u8FD9\u53E5\u8BDD\u4E2D\uFF0C\u5C31\u662F\u7528\u8FDB\u7A0B\u6216\u7EBF\u7A0B\u7684\u63CF\u8FF0\u6765\u4F5C\u4E3A\u5904\u7406\u5668\u5904\u7406\u7684\u5BF9\u8C61\u3002

                                                                        \u5728\u7B2C\u4E8C\u70B9\uFF0C\u662F\u8BF4\u7684\u4EFB\u52A1\u4F5C\u4E3A\u5904\u7406\u5668\u5904\u7406\u7684\u5BF9\u8C61\uFF0C\u6240\u4EE5\uFF0C\u53EF\u4EE5\u5C06\u8FDB\u7A0B\u548C\u4EFB\u52A1\u7406\u89E3\u4E3A\u76F8\u540C\u7684\u4E8B\u7269\u3002

                                                                      4. \u5904\u7406\u673A\u8C03\u5EA6\uFF0C\u5C31\u662F\u4ECE\u5C31\u7EEA\u8FDB\u7A0B\u961F\u5217\u4E2D\u6309\u7167\u4E00\u5B9A\u7684\u7B97\u6CD5\u9009\u62E9\u4E00\u4E2A\u8FDB\u7A0B\u5E76\u5C06\u5904\u7406\u673A\u5206\u914D\u7ED9\u5B83\u8FD0\u884C\uFF0C\u4EE5\u5B9E\u73B0\u8FDB\u7A0B\u7684\u5E76\u53D1\u6267\u884C\uFF08\u5FAE\u89C2\u4E0A\u4E32\u884C\uFF0C\u5B8F\u89C2\u4E0A\u5E76\u884C\uFF0C\u5C31\u662F\u5E76\u53D1\uFF09\u3002

                                                                      \u4E09\u4E2A\u5C42\u6B21

                                                                      \u9AD8\u7EA7\u8C03\u5EA6
                                                                      1. \u9AD8\u7EA7\u8C03\u5EA6\uFF08\u4F5C\u4E1A\u8C03\u5EA6\uFF09\uFF0C\u6309\u4E00\u5B9A\u7684\u539F\u5219\u4ECE\u5916\u5B58\u4E0A\u5904\u4E8E\u540E\u5907\u961F\u5217\u7684\u4F5C\u4E1A\u4E2D\u6311\u9009\u4E00\u4E2A\u6216\u591A\u4E2A\u4F5C\u4E1A\uFF0C\u7ED9\u4ED6\u4EEC\u5206\u914D\u5185\u5B58\u7B49\u5FC5\u8981\u8D44\u6E90\uFF0C\u5E76\u5EFA\u7ACB\u76F8\u5E94\u7684\u8FDB\u7A0B\uFF08\u5EFA\u7ACBPCB\uFF08\u8FDB\u7A0B\u63A7\u5236\u5757\uFF09\uFF0CPCB\u3001\u6570\u636E\u6BB5\u3001\u7A0B\u5E8F\u6BB5\u7EC4\u6210\u4E00\u4E2A\u8FDB\u7A0B\u5B9E\u4F53\uFF09\uFF0C\u4EE5\u4F7F\u5B83\uFF08\u4EEC\uFF09\u83B7\u5F97\u7ADE\u4E89\u5904\u7406\u673A\u7684\u6743\u5229\u3002\u80FD\u591F\u7ADE\u4E89CPU\uFF0C\u8BF4\u660E\u5904\u4E8E\u5C31\u7EEA\u961F\u5217\uFF0C\u8BF4\u660E\u5DF2\u7ECF\u83B7\u5F97\u4E86\u9664CPU\u4EE5\u5916\u5176\u4ED6\u9700\u8981\u7684\u8D44\u6E90\uFF0C\u5F53\u7136\u5305\u62EC\u5185\u5B58\u3002

                                                                      2. \u9AD8\u7EA7\u8C03\u5EA6\u662F\u5916\u5B58\u548C\u5185\u5B58\u4E4B\u95F4\u7684\u8C03\u5EA6\u3002

                                                                        \u4F5C\u4E1A\u8C03\u5165\u65F6\u4F1A\u5EFA\u7ACB\u76F8\u5E94\u7684PCB\uFF0C\u4F5C\u4E1A\u8C03\u51FA\u65F6\u624D\u64A4\u9500PCB\uFF0C\u9AD8\u7EA7\u8C03\u5EA6\u4E3B\u8981\u662F\u6307\u8C03\u5165\u7684\u95EE\u9898\u3002\u56E0\u4E3A\u53EA\u6709\u8C03\u5165\u7684\u65F6\u673A\u9700\u8981\u64CD\u4F5C\u7CFB\u7EDF\u6765\u786E\u5B9A\uFF0C\u4F46\u8C03\u51FA\u7684\u65F6\u673A\u5FC5\u7136\u662F\u4F5C\u4E1A\u8FD0\u884C\u7ED3\u675F\u624D\u8C03\u51FA\u3002

                                                                      \u4E2D\u7EA7\u8C03\u5EA6
                                                                      1. \u5F15\u5165\u4E86\u865A\u62DF\u5B58\u50A8\u6280\u672F\u4E4B\u540E\uFF0C\u53EF\u5C06\u6682\u65F6\u4E0D\u80FD\u8FD0\u884C\u7684\u8FDB\u7A0B\u8C03\u81F3\u5916\u5B58\u7B49\u5F85\uFF0C\u7B49\u5B83\u91CD\u65B0\u5177\u5907\u4E86\u8FD0\u884C\u6761\u4EF6\u4E14\u5185\u5B58\u53C8\u7A0D\u6709\u7A7A\u95F2\u65F6\uFF0C\u518D\u91CD\u65B0\u8C03\u5165\u5185\u5B58\u3002

                                                                        \u8FD9\u4E48\u505A\u7684\u76EE\u7684\u65F6\u4E3A\u4E86\u63D0\u9AD8\u5185\u5B58\u5229\u7528\u7387\u548C\u7CFB\u7EDF\u541E\u5410\u91CF\u3002

                                                                        \u6682\u65F6\u8C03\u5230\u5916\u5B58\u7B49\u5F85\u7684\u8FDB\u7A0B\u79F0\u4E3A\u6302\u8D77\u72B6\u6001\uFF0C\u503C\u5F97\u6CE8\u610F\u7684\u662F\uFF0C\u8FDB\u7A0B\u63A7\u5236\u5757PCB\u4E0D\u4F1A\u4E00\u8D77\u8C03\u5230\u5916\u5B58\uFF0C\u800C\u662F\u4F1A\u5E38\u9A7B\u5185\u5B58\uFF0CPCB\u4E2D\u4F1A\u8BB0\u5F55\u8FDB\u7A0B\u6570\u636E\u5728\u5916\u5B58\u4E2D\u7684\u5B58\u653E\u4F4D\u7F6E\uFF0C\u8FDB\u7A0B\u72B6\u6001\u7B49\u4FE1\u606F\uFF0C\u64CD\u4F5C\u7CFB\u7EDF\u901A\u8FC7\u5185\u5B58\u4E2D\u7684PCB\u6765\u4FDD\u6301\u5BF9\u5404\u4E2A\u8FDB\u7A0B\u7684\u76D1\u63A7\u3001\u7BA1\u7406\u3002\u88AB\u6302\u8D77\u7684\u8FDB\u7A0BPCB\u4F1A\u88AB\u653E\u5230\u6302\u8D77\u961F\u5217\u4E2D\uFF08\u64CD\u4F5C\u7CFB\u7EDF\u4F1A\u4E3A\u5904\u4E8E\u6302\u8D77\u6001\u7684\u8FDB\u7A0B\u5EFA\u7ACB\u4E00\u4E2A\u6302\u8D77\u961F\u5217\uFF0C\u628A\u8FD9\u4E9B\u8FDB\u7A0B\u7684PCB\u7528\u4E00\u4E2A\u961F\u5217\u7684\u65B9\u5F0F\u7EC4\u7EC7\u8D77\u6765\uFF09\u3002

                                                                        \u5728\u5185\u5B58\u4E2D\u624D\u53EB\u8FDB\u7A0B\uFF0C\u56E0\u4E3A\u8FD9\u91CC\u8BF4\u7684\u5185\u5B58\u662F\u8FD0\u884C\u65F6\u5185\u5B58\uFF0C\u800C\u5916\u5B58\u662F\u78C1\u76D8\uFF0C\u53EF\u4EE5\u7406\u89E3\u4E3A\u9759\u6001\u7684\uFF0C\u4F46\u662F\u4E3A\u4EC0\u4E48\u53C8\u80FD\u5B58\u653E\u5230\u5916\u5B58\u5462\uFF0C\u5C31\u662F\u865A\u62DF\u5B58\u50A8\u6280\u672F\uFF0C\u4E5F\u5C31\u662F\u865A\u62DF\u6280\u672F\u4E2D\u7684\u7A7A\u5206\u590D\u7528\u6280\u672F

                                                                        \u5C31\u7EEA\u961F\u5217\u3001\u963B\u585E\u961F\u5217\u5B58\u653E\u7684\u4E5F\u662FPCB

                                                                      2. \u4E2D\u7EA7\u8C03\u5EA6\uFF08\u5185\u5B58\u8C03\u5EA6\uFF09\uFF0C\u5C31\u662F\u8981\u51B3\u5B9A\u5C06\u54EA\u4E2A\u5904\u4E8E\u6302\u8D77\u72B6\u6001\u7684\u8FDB\u7A0B\u91CD\u65B0\u8C03\u5165\u5185\u5B58

                                                                        \u4E00\u4E2A\u8FDB\u7A0B\u53EF\u80FD\u4F1A\u88AB\u591A\u6B21\u8C03\u51FA\u3001\u8C03\u5165\u5185\u5B58\uFF0C\u56E0\u6B64\u4E2D\u7EA7\u8C03\u5EA6\u7684\u53D1\u751F\u9891\u7387\u8981\u6BD4\u9AD8\u7EA7\u8C03\u5EA6\u66F4\u9AD8\u3002

                                                                      3. \u6682\u65F6\u8C03\u5230\u5916\u5B58\u7B49\u5F85\u7684\u8FDB\u7A0B\u72B6\u6001\u4E3A\u6302\u8D77\u72B6\u6001

                                                                        \u6302\u8D77\u6001\u53C8\u53EF\u4EE5\u5206\u4E3A\u5C31\u7EEA\u6302\u8D77\u3001\u963B\u585E\u6302\u8D77\u4E24\u79CD\u72B6\u6001

                                                                        \u5C31\u7EEA\u6001\u7684\u8FDB\u7A0B\u53EF\u80FD\u4F1A\u7531\u4E8E\u5185\u5B58\u7A7A\u95F4\u4E0D\u8DB3\uFF0C\u800C\u88AB\u79FB\u5230\u5916\u5B58\u6302\u8D77\uFF0C\u8FD9\u53EB\u5C31\u7EEA\u6302\u8D77

                                                                        \u963B\u585E\u6001\u7684\u8FDB\u7A0B\u540C\u6837\u53EF\u80FD\u4F1A\u7531\u4E8E\u5185\u5B58\u7A7A\u95F4\u4E0D\u8DB3\uFF0C\u88AB\u79FB\u5230\u5916\u5B58\u6302\u8D77\uFF0C\u53EB\u963B\u585E\u6302\u8D77

                                                                        image-20211216222006381

                                                                      4. \u6CE8\u610F\uFF1A

                                                                        \u6302\u8D77\u548C\u963B\u585E\u7684\u533A\u522B\uFF0C\u4E24\u79CD\u72B6\u6001\u90FD\u662F\u6682\u65F6\u4E0D\u80FD\u83B7\u5F97CPU\u7684\u670D\u52A1\uFF0C\u4F46\u662F\u6302\u8D77\u6001\u662F\u5C06\u8FDB\u7A0B\u5B9E\u4F53\uFF08\u6620\u50CF\uFF09\u8C03\u5230\u5916\u5B58\u4E2D\u53BB\u4E86\uFF0C\u800C\u963B\u585E\u6001\u4E0B\u7684\u8FDB\u7A0B\u6620\u50CF\u8FD8\u5728\u5185\u5B58\u4E2D\u3002

                                                                        \u6709\u7684\u64CD\u4F5C\u7CFB\u7EDF\u4F1A\u628A\u5C31\u7EEA\u6302\u8D77\uFF0C\u963B\u585E\u6302\u8D77\u5206\u4E3A\u4E24\u4E2A\u6302\u8D77\u961F\u5217\uFF0C\u751A\u81F3\u4F1A\u6839\u636E\u963B\u585E\u539F\u56E0\u4E0D\u540C\u518D\u628A\u963B\u585E\u6302\u8D77\u8FDB\u7A0B\u8FDB\u4E00\u6B65\u7EC6\u5206\u4E3A\u591A\u4E2A\u961F\u5217\u3002

                                                                      \u4F4E\u7EA7\u8C03\u5EA6
                                                                      1. \u4F4E\u7EA7\u8C03\u5EA6\uFF08\u8FDB\u7A0B\u8C03\u5EA6\uFF09\uFF0C\u5176\u4E3B\u8981\u4EFB\u52A1\u662F\u6309\u7167\u67D0\u79CD\u65B9\u6CD5\u548C\u7B56\u7565\u4ECE\u5C31\u7EEA\u961F\u5217\u4E2D\u9009\u53D6\u4E00\u4E2A\u8FDB\u7A0B\uFF0C\u5C06\u5904\u7406\u5668\u5206\u914D\u7ED9\u5B83

                                                                      2. \u8FDB\u7A0B\u8C03\u5EA6\u662F\u64CD\u4F5C\u7CFB\u7EDF\u4E2D\u6700\u57FA\u672C\u7684\u4E00\u79CD\u8C03\u5EA6\uFF0C\u5728\u4E00\u822C\u7684\u64CD\u4F5C\u7CFB\u7EDF\u4E2D\u90FD\u5FC5\u987B\u914D\u7F6E\u8FDB\u7A0B\u8C03\u5EA6\u3002

                                                                        \u8FDB\u7A0B\u8C03\u5EA6\u7684\u9891\u7387\u5F88\u9AD8\uFF0C\u4E00\u822C\u51E0\u5341\u6BEB\u79D2\u4E00\u6B21\uFF0C\u53EA\u6709\u8FD9\u6837\uFF0C\u624D\u80FD\u5728\u5B8F\u89C2\u4E0A\u770B\u8D77\u6765\u662F\u5E76\u884C\u6267\u884C\u7684\uFF0C\u5B9E\u9645\u4E0A\u5FAE\u89C2\u4E0A\u662F\u8FD9\u4E9B\u8FDB\u7A0B\u4E4B\u95F4\u4EA4\u66FF\u6267\u884C\u3002

                                                                      \u8054\u7CFB

                                                                      1. image-20211216222809386

                                                                      \u8FDB\u7A0B\u8C03\u5EA6

                                                                      \u8FDB\u7A0B\u8C03\u5EA6\u7684\u65F6\u673A

                                                                      1. \u8FDB\u7A0B\u8C03\u5EA6\u5C31\u662F\u4F4E\u7EA7\u8C03\u5EA6\uFF0C\u5C31\u662F\u6309\u7167\u67D0\u79CD\u7B97\u6CD5\u4ECE\u5C31\u7EEA\u961F\u5217\u4E2D\u9009\u62E9\u4E00\u4E2A\u8FDB\u7A0B\u4E3A\u5176\u5206\u914D\u5904\u7406\u673A\u3002

                                                                      2. \u4EC0\u4E48\u65F6\u5019\u9700\u8981\u8FDB\u884C\u8FDB\u7A0B\u8C03\u5EA6\u548C\u5207\u6362\uFF1F

                                                                        • \u5F53\u524D\u8FD0\u884C\u7684\u8FDB\u7A0B\u4E3B\u52A8\u653E\u5F03\u5904\u7406\u673A
                                                                          • \u8FDB\u7A0B\u6B63\u5E38\u7EC8\u6B62
                                                                          • \u8FD0\u884C\u8FC7\u7A0B\u4E2D\u53D1\u751F\u5F02\u5E38\u800C\u7EC8\u6B62
                                                                          • \u8FDB\u7A0B\u4E3B\u52A8\u8BF7\u6C42\u963B\u585E\uFF0C\u901A\u8FC7\u7CFB\u7EDF\u8C03\u7528\uFF0C\u7CFB\u7EDF\u8C03\u7528\u65F6\u4F1A\u6267\u884C\u9677\u5165\u6307\u4EE4\u6216\u8005\u8BF4\u8BBF\u7BA1\u6307\u4EE4\uFF0C\u4ECE\u800C\u8FDB\u5165\u6838\u5FC3\u6001\uFF0C\u8FD9\u662F\u5185\u4E2D\u65AD\u4E2D\u7684\u81EA\u613F\u4E2D\u65AD\uFF0C\u8FDB\u7A0B\u7531\u8FD0\u884C\u6001\u5230\u963B\u585E\u6001\u662F\u4E3B\u52A8\u884C\u4E3A\u3002
                                                                        • \u5F53\u524D\u8FD0\u884C\u7684\u8FDB\u7A0B\u88AB\u52A8\u653E\u5F03\u5904\u7406\u673A
                                                                          • \u5206\u7ED9\u8FDB\u7A0B\u7684\u65F6\u95F4\u7247\u7528\u5B8C
                                                                          • \u6709\u66F4\u7D27\u6025\u7684\u4E8B\u9700\u8981\u5904\u7406\uFF08\u5982IO\u4E2D\u65AD\uFF09
                                                                          • \u6709\u66F4\u9AD8\u4F18\u5148\u7EA7\u7684\u8FDB\u7A0B\u8FDB\u5165\u5C31\u7EEA\u961F\u5217
                                                                      3. \u4E0D\u80FD\u8FDB\u884C\u8FDB\u7A0B\u8C03\u5EA6\u548C\u5207\u6362\u7684\u60C5\u51B5

                                                                        • \u5728\u5904\u7406\u4E2D\u65AD\u7684\u8FC7\u7A0B\u4E2D\uFF0C\u4E2D\u65AD\u5904\u7406\u8FC7\u7A0B\u590D\u6742\uFF0C\u4E0E\u786C\u4EF6\u5BC6\u5207\u76F8\u5173\uFF0C\u5F88\u96BE\u505A\u5230\u5728\u4E2D\u65AD\u5904\u7406\u8FC7\u7A0B\u4E2D\u8FDB\u884C\u8FDB\u7A0B\u5207\u6362
                                                                        • \u8FDB\u7A0B\u5728\u64CD\u4F5C\u7CFB\u7EDF\u5185\u6838\u7A0B\u5E8F\u4E34\u754C\u533A\u4E2D\uFF08\u4F46\u662F\u8FDB\u7A0B\u5728\u666E\u901A\u4E34\u754C\u533A\u4E2D\u662F\u53EF\u4EE5\u8FDB\u884C\u8C03\u5EA6\u3001\u5207\u6362\u7684\uFF09
                                                                        • \u5728\u539F\u5B50\u64CD\u4F5C\u8FC7\u7A0B\u4E2D\uFF08\u539F\u8BED\uFF09\uFF0C\u539F\u5B50\u64CD\u4F5C\u4E0D\u53EF\u4E2D\u65AD\uFF0C\u8981\u4E00\u6C14\u5475\u6210\uFF08\u539F\u5B50\u64CD\u4F5C\u662F\u901A\u8FC7\u4E2D\u65AD\u6765\u5B8C\u6210\u7684\uFF0C\u6240\u4EE5\u4E00\u5B9A\u662F\u5728\u6838\u5FC3\u6001\u8FDB\u884C\u3002\uFF09
                                                                      4. \u4E34\u754C\u8D44\u6E90\uFF1A\u4E00\u4E2A\u65F6\u95F4\u6BB5\u5185\u53EA\u5141\u8BB8\u4E00\u4E2A\u8FDB\u7A0B\u4F7F\u7528\u7684\u8D44\u6E90\uFF0C\u5404\u8FDB\u7A0B\u9700\u8981\u4E92\u65A5\u5730\u8BBF\u95EE\u4E34\u754C\u8D44\u6E90

                                                                        \u4E34\u754C\u533A\uFF1A\u8BBF\u95EE\u4E34\u754C\u8D44\u6E90\u90A3\u6BB5\u4EE3\u7801

                                                                      5. \u5185\u6838\u7A0B\u5E8F\u4E34\u754C\u533A\u8BBF\u95EE\u7684\u4E34\u754C\u8D44\u6E90\uFF0C\u5982\u679C\u4E0D\u5C3D\u5FEB\u91CA\u653E\u7684\u8BDD\uFF0C\u6781\u6709\u53EF\u80FD\u6620\u50CF\u5230\u64CD\u4F5C\u7CFB\u7EDF\u5185\u6838\u7684\u5176\u4ED6\u7BA1\u7406\u5DE5\u4F5C\uFF0C\u56E0\u6B64\u5728\u8BBF\u95EE\u5185\u6838\u7A0B\u5E8F\u4E34\u754C\u533A\u671F\u95F4\u4E0D\u80FD\u8FDB\u884C\u8C03\u5EA6\u4E0E\u5207\u6362

                                                                        \u666E\u901A\u4E34\u754C\u533A\u8BBF\u95EE\u7684\u4E34\u754C\u8D44\u6E90\u4E0D\u4F1A\u76F4\u63A5\u5F71\u54CD\u64CD\u4F5C\u7CFB\u7EDF\u5185\u6838\u7684\u7BA1\u7406\u5DE5\u4F5C\uFF0C\u56E0\u6B64\u5728\u8BBF\u95EE\u666E\u901A\u4E34\u754C\u533A\u65F6\u53EF\u4EE5\u8FDB\u884C\u8C03\u5EA6\u548C\u5207\u6362\uFF0C\u800C\u4E14\u662F\u5F88\u6709\u5FC5\u8981\u8FDB\u884C\u8FDB\u7A0B\u7684\u8C03\u5EA6\u548C\u5207\u6362\u6765\u63D0\u9AD8CPU\u7684\u5229\u7528\u7387\u548C\u7CFB\u7EDF\u541E\u5410\u91CF\u3002

                                                                      \u8FDB\u7A0B\u8C03\u5EA6\u7684\u65B9\u5F0F

                                                                      1. \u975E\u5265\u593A\u8C03\u5EA6\u65B9\u5F0F\uFF0C\u53C8\u79F0\u4E3A\u975E\u62A2\u5360\u65B9\u5F0F\uFF0C\u5373\u53EA\u5141\u8BB8\u8FDB\u7A0B\u4E3B\u52A8\u653E\u5F03\u5904\u7406\u673A\uFF0C\u5728\u8FD0\u884C\u8FC7\u7A0B\u4E2D\u5373\u4FBF\u6709\u66F4\u7D27\u8FEB\u7684\u4EFB\u52A1\u5230\u8FBE\uFF0C\u5F53\u524D\u8FDB\u7A0B\u4F9D\u7136\u4F1A\u7EE7\u7EED\u4F7F\u7528\u5904\u7406\u673A\uFF0C\u76F4\u5230\u8BE5\u8FDB\u7A0B\u7EC8\u6B62\u6216\u4E3B\u52A8\u8981\u6C42\u8FDB\u5165\u963B\u585E\u6001\u3002
                                                                      2. \u5265\u593A\u8C03\u5EA6\u65B9\u5F0F\uFF0C\u53C8\u79F0\u62A2\u5360\u65B9\u5F0F\uFF0C\u5F53\u4E00\u4E2A\u8FDB\u7A0B\u6B63\u5728\u5904\u7406\u673A\u4E0A\u6267\u884C\u65F6\uFF0C\u5982\u679C\u6709\u4E00\u4E2A\u66F4\u91CD\u8981\u6216\u66F4\u7D27\u8FEB\u7684\u8FDB\u7A0B\u9700\u8981\u4F7F\u7528\u5904\u7406\u673A\uFF0C\u5219\u7ACB\u523B\u6682\u505C\u5F53\u524D\u6B63\u5728\u6267\u884C\u7684\u8FDB\u7A0B\uFF0C\u5C06\u5904\u7406\u673A\u5206\u914D\u7ED9\u66F4\u91CD\u8981\u7D27\u8FEB\u7684\u8FDB\u7A0B\u3002

                                                                      \u8FDB\u7A0B\u7684\u5207\u6362\u548C\u8FC7\u7A0B

                                                                      1. \u72ED\u4E49\u7684\u8FDB\u7A0B\u8C03\u5EA6\u6307\u7684\u662F\u4ECE\u5C31\u7EEA\u961F\u5217\u4E2D\u9009\u4E2D\u4E00\u4E2A\u8981\u8FD0\u884C\u7684\u8FDB\u7A0B

                                                                        \u8FDB\u7A0B\u5207\u6362\u662F\u6307\u4E00\u4E2A\u8FDB\u7A0B\u8BA9\u51FA\u5904\u7406\u673A\uFF0C\u7531\u53E6\u4E00\u4E2A\u8FDB\u7A0B\u5360\u7528\u5904\u7406\u673A\u7684\u8FC7\u7A0B\u3002

                                                                        \u5E7F\u4E49\u7684\u8FDB\u7A0B\u8C03\u5EA6\u5305\u542B\u4E86\u9009\u62E9\u4E00\u4E2A\u8FDB\u7A0B\u548C\u8FDB\u7A0B\u5207\u6362\u4E24\u4E2A\u6B65\u9AA4

                                                                      2. \u8FDB\u7A0B\u5207\u6362\u7684\u8FC7\u7A0B\u4E3B\u8981\u5B8C\u6210\u4E86\uFF1A

                                                                        • \u5BF9\u539F\u6765\u8FD0\u884C\u8FDB\u7A0B\u5404\u79CD\u6570\u636E\u7684\u4FDD\u5B58\uFF0C\u4FDD\u5B58\u5230PCB\u4E2D

                                                                        • \u5BF9\u65B0\u7684\u8FDB\u7A0B\u7684\u5404\u79CD\u6570\u636E\u7684\u6062\u590D

                                                                          \u8FD9\u4E9B\u8FDB\u7A0B\u7684\u4FE1\u606F\uFF0C\u8FD0\u884C\u73AF\u5883\u7684\u4FE1\u606F\u4E00\u822C\u4FDD\u5B58\u5728\u8FDB\u7A0B\u63A7\u5236\u5757PCB\u4E2D\u3002

                                                                      3. \u4E0D\u80FD\u7B80\u5355\u5730\u8BA4\u4E3A\u8FDB\u7A0B\u5207\u6362\u8D8A\u9891\u7E41\uFF0C\u5E76\u53D1\u5EA6\u5C31\u8D8A\u9AD8

                                                                        \u8FDB\u7A0B\u5207\u6362\u662F\u6709\u4EE3\u4EF7\u7684\uFF0C\u56E0\u6B64\u5982\u679C\u8FC7\u4E8E\u9891\u7E41\u5730\u8FDB\u884C\u8FDB\u7A0B\u8C03\u5EA6\u3001\u5207\u6362\uFF0C\u5FC5\u7136\u4F1A\u4F7F\u6574\u4E2A\u7CFB\u7EDF\u7684\u6548\u7387\u964D\u4F4E\uFF0C\u4F7F\u7CFB\u7EDF\u5927\u90E8\u5206\u65F6\u95F4\u90FD\u82B1\u5728\u4E86\u8FDB\u7A0B\u5207\u6362\u4E0A\u3002

                                                                      \u8FDB\u7A0B\u540C\u6B65\u3001\u4E92\u65A5

                                                                      \u6982\u5FF5

                                                                      1. \u8FDB\u7A0B\u5177\u6709\u5F02\u6B65\u6027\u7684\u7279\u5F81\uFF0C\u5F02\u6B65\u6027\u662F\u6307\uFF0C\u5404\u5E76\u53D1\u6267\u884C\u7684\u8FDB\u7A0B\u5404\u81EA\u4EE5\u72EC\u7ACB\u7684\u3001\u4E0D\u53EF\u9884\u77E5\u7684\u901F\u5EA6\u5411\u524D\u63A8\u8FDB

                                                                      2. \u8FDB\u7A0B\u540C\u6B65\uFF1A

                                                                        \u5E76\u53D1\u6027\u5E26\u6765\u4E86\u5F02\u6B65\u6027\uFF0C\u6709\u65F6\u9700\u8981\u901A\u8FC7\u8FDB\u7A0B\u540C\u6B65\u89E3\u51B3\u8FD9\u79CD\u5F02\u6B65\u95EE\u9898

                                                                        \u6709\u7684\u8FDB\u7A0B\u4E4B\u95F4\u9700\u8981\u76F8\u4E92\u914D\u5408\u5730\u5B8C\u6210\u5DE5\u4F5C\uFF0C\u5404\u8FDB\u7A0B\u7684\u5DE5\u4F5C\u63A8\u8FDB\u9700\u8981\u9075\u5FAA\u4E00\u5B9A\u7684\u5148\u540E\u987A\u5E8F\uFF0C\u5C31\u662F\u901A\u8FC7\u540C\u6B65\uFF0C\u540C\u6B65\u9501\u7684\u5B9E\u73B0\u901A\u8FC7\u540C\u6B65\u4EE3\u7801\u5757\u548C\u540C\u6B65\u65B9\u6CD5\uFF0C \u4E5F\u6B63\u662F\u8FD9\u4E2A\u610F\u601D\u3002

                                                                      3. \u6211\u4EEC\u628A\u4E00\u4E2A\u65F6\u95F4\u6BB5\u5185\u53EA\u5141\u8BB8\u4E00\u4E2A\u8FDB\u7A0B\u4F7F\u7528\u7684\u8D44\u6E90\u79F0\u4E3A\u4E34\u754C\u8D44\u6E90\uFF0C\u5BF9\u4E34\u754C\u8D44\u6E90\u7684\u8BBF\u95EE\uFF0C\u5FC5\u987B\u4E92\u65A5\u5730\u8FDB\u884C\u3002

                                                                      4. image-20211217163414696

                                                                        \u6CE8\u610F\uFF1A

                                                                        \u4E34\u754C\u533A\u662F\u8FDB\u7A0B\u4E2D\u8BBF\u95EE\u4E34\u754C\u8D44\u6E90\u7684\u4EE3\u7801\u6BB5

                                                                        \u8FDB\u5165\u533A\u548C\u9000\u51FA\u533A\u662F\u8D1F\u8D23\u5B9E\u73B0\u4E92\u65A5\u7684\u4EE3\u7801\u6BB5

                                                                      5. \u4E3A\u4E86\u5B9E\u73B0\u5BF9\u4E34\u754C\u8D44\u6E90\u7684\u4E92\u65A5\u8BBF\u95EE\uFF0C\u540C\u65F6\u4FDD\u8BC1\u7CFB\u7EDF\u6574\u4F53\u6027\u80FD\uFF0C\u9700\u8981\u9075\u5FAA\u4EE5\u4E0B\u539F\u5219\uFF1A

                                                                        • \u7A7A\u95F2\u8BA9\u8FDB\u3002\u4E34\u754C\u533A\u7A7A\u95F2\u65F6\uFF0C\u53EF\u4EE5\u5141\u8BB8\u4E00\u4E2A\u8BF7\u6C42\u8FDB\u5165\u4E34\u754C\u533A\u7684\u8FDB\u7A0B\u7ACB\u5373\u8FDB\u5165\u4E34\u754C\u533A
                                                                        • \u5FD9\u5219\u7B49\u5F85\u3002\u5F53\u5DF2\u6709\u8FDB\u7A0B\u8FDB\u5165\u4E34\u754C\u533A\u65F6\uFF0C\u5176\u4ED6\u8BD5\u56FE\u8FDB\u5165\u4E34\u754C\u533A\u7684\u8FDB\u7A0B\u5FC5\u987B\u7B49\u5F85\u3002
                                                                        • \u6709\u9650\u7B49\u5F85\uFF08\u4FDD\u8BC1\u4E0D\u4F1A\u9965\u997F\uFF09\u3002\u5BF9\u8BF7\u6C42\u8BBF\u95EE\u7684\u8FDB\u7A0B\uFF0C\u5E94\u4FDD\u8BC1\u80FD\u5728\u6709\u9650\u65F6\u95F4\u5185\u8FDB\u5165\u4E34\u754C\u533A\uFF08\u4FDD\u8BC1\u4E0D\u4F1A\u9965\u997F\uFF09
                                                                        • \u8BA9\u6743\u7B49\u5F85\u3002\u5F53\u8FDB\u7A0B\u4E0D\u80FD\u8FDB\u5165\u4E34\u754C\u533A\u65F6\uFF0C\u5E94\u7ACB\u5373\u91CA\u653E\u5904\u7406\u673A\uFF0C\u9632\u6B62\u8FDB\u7A0B\u5FD9\u7B49\u5F85\u3002

                                                                      \u4FE1\u53F7\u91CF\u673A\u5236

                                                                      1. \u7528\u6237\u8FDB\u7A0B\u53EF\u4EE5\u901A\u8FC7\u4F7F\u7528\u64CD\u4F5C\u7CFB\u7EDF\u63D0\u4F9B\u7684\u4E00\u5BF9\u539F\u8BED\u6765\u5BF9\u4FE1\u53F7\u91CF\u8FDB\u884C\u64CD\u4F5C\uFF0C\u4ECE\u800C\u5F88\u65B9\u4FBF\u5730\u5B9E\u73B0\u4E86\u8FDB\u7A0B\u4E92\u65A5\u3001\u8FDB\u7A0B\u540C\u6B65\u3002

                                                                        \u4FE1\u53F7\u91CF\u5176\u5B9E\u5C31\u662F\u4E00\u4E2A\u53D8\u91CF\uFF08\u53EF\u4EE5\u662F\u4E00\u4E2A\u6574\u6570\uFF0C\u4E5F\u53EF\u4EE5\u662F\u66F4\u590D\u6742\u7684\u8BB0\u5F55\u578B\u53D8\u91CF\uFF09\uFF0C\u53EF\u4EE5\u7528\u4E00\u4E2A\u4FE1\u53F7\u91CF\u6765\u8868\u793A\u7CFB\u7EDF\u4E2D\u67D0\u79CD\u8D44\u6E90\u7684\u6570\u91CF\u3002

                                                                        image-20211217172238888

                                                                      2. \u6574\u578B\u4FE1\u53F7\u91CF

                                                                        \u4E0E\u666E\u901A\u6574\u6570\u53D8\u91CF\u7684\u533A\u522B\uFF1A\u5BF9\u4FE1\u53F7\u91CF\u7684\u64CD\u4F5C\u53EA\u6709\u4E09\u79CD\uFF0C\u5373\u521D\u59CB\u5316\uFF0CP\u64CD\u4F5C\u3001V\u64CD\u4F5C

                                                                        image-20211217173250040

                                                                        \u4E5F\u5C31\u662F\u8BF4\uFF0C\u5728\u8FDB\u5165\u533A\u548C\u9000\u51FA\u533A\u8FD9\u4E24\u4E2A\u4EE3\u7801\u533A\uFF0C\u5206\u522B\u4F7F\u7528P\u64CD\u4F5C\u548CV\u64CD\u4F5C\u8FD9\u4E24\u4E2A\u539F\u8BED\u64CD\u4F5C\u6765\u4E0A\u9501\u548C\u89E3\u9501\u3002

                                                                        \u68C0\u67E5\u548C\u4E0A\u9501\u4E00\u6C14\u5475\u6210\uFF0C\u907F\u514D\u4E86\u5E76\u53D1\u3001\u5F02\u6B65\u5BFC\u81F4\u7684\u95EE\u9898\u3002

                                                                        \u5B58\u5728\u7684\u95EE\u9898\uFF1A\u4E0D\u6EE1\u8DB3\u8BA9\u6743\u7B49\u5F85\u7684\u539F\u5219\uFF0C\u4F1A\u53D1\u751F\u5FD9\u7B49\u3002

                                                                      3. \u8BB0\u5F55\u578B\u4FE1\u53F7\u91CF

                                                                        image-20211217173913631

                                                                        wait(S)\u548Csignal(S)\u53EF\u7528\u4E8E\u5B9E\u73B0\u5BF9\u7CFB\u7EDF\u8D44\u6E90\u7684\u7533\u8BF7\u548C\u91CA\u653E

                                                                        S.value\u7684\u521D\u503C\u8868\u793A\u7CFB\u7EDF\u4E2D\u67D0\u79CD\u8D44\u6E90\u7684\u6570\u76EE

                                                                        \u5BF9\u4FE1\u53F7\u91CFS\u7684\u4E00\u6B21P\u64CD\u4F5C\u610F\u5473\u7740\u8FDB\u7A0B\u8BF7\u6C42\u4E00\u4E2A\u5355\u4F4D\u7684\u8BE5\u8D44\u6E90\uFF0C\u56E0\u6B64\u9700\u8981\u6267\u884CS.value--\uFF0C\u8868\u793A\u8BE5\u8D44\u6E90\u6570\u51CF1\uFF0C\u5F53S.value<0\u65F6\uFF0C\u8868\u793A\u8BE5\u7C7B\u8D44\u6E90\u5DF2\u5206\u914D\u5B8C\u6BD5\uFF0C\u56E0\u6B64\u8FDB\u7A0B\u5E94\u8C03\u7528block\u539F\u8BED\u8FDB\u884C\u81EA\u6211\u963B\u585E\uFF0C\u5F53\u524D\u8FD0\u884C\u7684\u8FDB\u7A0B\u4ECE\u8FD0\u884C\u6001\u5230\u963B\u585E\u6001\uFF0C\u4E3B\u52A8\u653E\u5F03\u5904\u7406\u673A\uFF0C\u5E76\u63D2\u5165\u8BE5\u7C7B\u8D44\u6E90\u7684\u7B49\u5F85\u961F\u5217\uFF0C\u53EF\u89C1\uFF0C\u8BE5\u673A\u5236\u9075\u5FAA\u4E86\u8BA9\u6743\u7B49\u5F85\u7684\u539F\u5219\uFF0C\u4E0D\u4F1A\u51FA\u73B0\u5FD9\u7B49\u73B0\u8C61\uFF0C\u53EA\u8981\u53D1\u73B0\u8D44\u6E90\u5206\u914D\u5B8C\u6BD5\uFF0C\u90A3\u4E48\u4E3B\u52A8\u8FDB\u5165\u963B\u585E\u6001\uFF0C\u76F8\u5F53\u4E8E\u662F\u7B49\u5F85IO\uFF0C\u8FDB\u7A0B\u8FDB\u5165\u963B\u585E\u6001\uFF0C\u90FD\u662F\u4E3B\u52A8\u7684\uFF0C\u662F\u8FD0\u884C\u6001\u4E3B\u52A8\u5230\u963B\u585E\u6001\uFF0C\u901A\u8FC7\u7CFB\u7EDF\u8C03\u7528\u7684\u8BBF\u7BA1\u6307\u4EE4\u6216\u9677\u5165\u6307\u4EE4\uFF0C\u6267\u884C\u4E2D\u65AD\uFF0C\u4E8E\u662F\u963B\u585E\uFF0C\u64CD\u4F5C\u6743\u9650\u4EA4\u7ED9\u64CD\u4F5C\u7CFB\u7EDF\u3002

                                                                        \u5BF9\u4FE1\u53F7\u91CFS\u7684\u4E00\u6B21V\u64CD\u4F5C\uFF0C\u610F\u5473\u7740\u8FDB\u7A0B\u91CA\u653E\u4E00\u4E2A\u5355\u4F4D\u7684\u8BE5\u7C7B\u8D44\u6E90\uFF0C\u56E0\u6B64\u9700\u8981\u6267\u884CS.value++\uFF0C\u8868\u793A\u8D44\u6E90\u6570+1\uFF0C\u82E5\u52A01\u540E\u4ECD\u7136\u662F\u5C0F\u4E8E\u7B49\u4E8E0\uFF0C\u8BF4\u660E\u4ECD\u7136\u6709\u8FDB\u7A0B\u56E0\u4E3A\u7B49\u5F85\u8BE5\u8D44\u6E90\u800C\u5904\u4E8E\u963B\u585E\u6001\uFF0C\u56E0\u6B64\u5E94\u8C03\u7528wakeup\u539F\u8BED\u5524\u9192\u7B49\u5F85\u961F\u5217\u4E2D\u7684\u7B2C\u4E00\u4E2A\u8FDB\u7A0B\uFF08\u88AB\u5524\u9192\u8FDB\u7A0B\u4ECE\u963B\u585E\u6001\u5230\u5C31\u7EEA\u6001\uFF0C\u7B49\u5F85CPU\u65F6\u95F4\u7247\uFF0C\u5373\u53EF\u88ABCPU\u6267\u884C\u3002\uFF09

                                                                      4. \u7528\u4FE1\u53F7\u91CF\u673A\u5236\u5B9E\u73B0\u8FDB\u7A0B\u4E92\u65A5

                                                                        • \u5206\u6790\u5E76\u53D1\u8FDB\u7A0B\u7684\u5173\u952E\u6D3B\u52A8\uFF0C\u5212\u5B9A\u4E34\u754C\u533A\uFF08\u5982\uFF1A\u5BF9\u4E34\u754C\u8D44\u6E90\u6253\u5370\u673A\u7684\u8BBF\u95EE\u5C31\u5E94\u8BE5\u653E\u5728\u4E34\u754C\u533A\uFF0C\u4E34\u754C\u533A\u662F\u4EE3\u7801\uFF09
                                                                        • \u8BBE\u7F6E\u4E92\u65A5\u4FE1\u53F7\u91CFmutex\uFF0C\u521D\u503C\u4E3A1\uFF0C\u4E34\u754C\u533A\u53EF\u4EE5\u7406\u89E3\u4E3A\u662F\u4E00\u79CD\u7279\u6B8A\u7684\u7CFB\u7EDF\u8D44\u6E90\uFF0C\u56E0\u4E3A\u8981\u5B9E\u73B0\u4E92\u65A5\uFF0C\u6240\u4EE5\u8BBE\u7F6E\u8FD9\u79CD\u201C\u7CFB\u7EDF\u8D44\u6E90\u201D\u7684\u6570\u91CF\u521D\u503C\u4E3A1\uFF0C\u76F8\u5F53\u4E8E\u662F\u4E0A\u9501
                                                                        • \u5728\u4E34\u754C\u533A\u4E4B\u524D\u6267\u884CP(mutex)
                                                                        • \u5728\u4E34\u754C\u533A\u4E4B\u540E\u6267\u884CV(mutex)

                                                                        \u6CE8\u610F\uFF1A\u5BF9\u4E0D\u540C\u7684\u4E34\u754C\u8D44\u6E90\u9700\u8981\u8BBE\u7F6E\u4E0D\u540C\u7684\u4E92\u65A5\u4FE1\u53F7\u91CF\uFF0C\u53EF\u4EE5\u4ECEJava\u591A\u7EBF\u7A0B\u7684\u89D2\u5EA6\u6765\u7406\u89E3\uFF0C\u540C\u6B65\u9501\u5BF9\u8C61\u4E00\u5B9A\u8981\u662F\u540C\u4E00\u4E2A\uFF0C\u591A\u4E2A\u7EBF\u7A0B\u8981\u83B7\u5F97\u7684\u662F\u540C\u4E00\u628A\u9501\uFF0C\u8FD9\u6837\u624D\u6709\u4E0A\u9501\u7684\u610F\u4E49

                                                                        PV\u64CD\u4F5C\u5FC5\u987B\u6210\u5BF9\u51FA\u73B0\uFF08\u4E0A\u9501\u548C\u89E3\u9501\u5FC5\u987B\u6210\u5BF9\u51FA\u73B0\uFF09\uFF0C\u7F3A\u5C11P\u5C31\u4E0D\u80FD\u4FDD\u8BC1\u4E34\u754C\u8D44\u6E90\u7684\u4E92\u65A5\u8BBF\u95EE\uFF0C\u56E0\u4E3AP\u64CD\u4F5C\u76F8\u5F53\u4E8E\u662F\u4E0A\u9501\uFF0C\u7F3A\u5C11V\u4F1A\u5BFC\u81F4\u8D44\u6E90\u6C38\u4E0D\u88AB\u91CA\u653E\uFF0CV\u64CD\u4F5C\u76F8\u5F53\u4E8E\u662F\u89E3\u9501

                                                                      5. \u7528\u4FE1\u53F7\u91CF\u5B9E\u73B0\u8FDB\u7A0B\u540C\u6B65\uFF1A

                                                                        • \u5206\u6790\u4EC0\u4E48\u5730\u65B9\u9700\u8981\u5B9E\u73B0\u540C\u6B65\u5173\u7CFB\uFF0C\u627E\u5230\u9700\u8981\u6267\u884C\u540C\u6B65\u5173\u7CFB\u7684\u4EE3\u7801
                                                                        • \u8BBE\u7F6E\u540C\u6B65\u4FE1\u53F7\u91CFS\uFF0C\u521D\u59CB\u503C\u8BBE\u7F6E\u4E3A0
                                                                        • \u5728\u201C\u524D\u64CD\u4F5C\u201D\u4E4B\u540E\u6267\u884CV\uFF08S\uFF09
                                                                        • \u5728\u201C\u540E\u64CD\u4F5C\u201D\u4E4B\u524D\u6267\u884CP\uFF08S\uFF09

                                                                        image-20211217182011808

                                                                      \u7BA1\u7A0B

                                                                      \u6982\u5FF5

                                                                      1. \u7BA1\u7A0B\u662F\u4E00\u79CD\u9AD8\u7EA7\u540C\u6B65\u673A\u5236\uFF0C\u548C\u4E4B\u524D\u5B66\u8FC7\u7684PV\u64CD\u4F5C\u4E00\u6837\uFF0C\u4E5F\u662F\u7528\u6765\u5B9E\u73B0\u8FDB\u7A0B\u7684\u4E92\u65A5\u548C\u540C\u6B65\u7684
                                                                      2. \u5F15\u5165\u7BA1\u7A0B\u7684\u76EE\u7684\u662F\u4E3A\u4E86\u66F4\u65B9\u4FBF\u5730\u5B9E\u73B0\u8FDB\u7A0B\u4E92\u65A5\u548C\u540C\u6B65

                                                                      \u6B7B\u9501

                                                                      \u6982\u5FF5

                                                                      1. \u6B7B\u9501\uFF1A\u5728\u5E76\u53D1\u73AF\u5883\u4E0B\uFF0C**\u5404\u8FDB\u7A0B\uFF08\u53D1\u751F\u6B7B\u9501\u4E00\u5B9A\u662F\u4E24\u4E2A\u6216\u4EE5\u4E0A\uFF09**\u56E0\u7ADE\u4E89\u8D44\u6E90\u800C\u9020\u6210\u7684\u4E00\u79CD\u4E92\u76F8\u7B49\u5F85\u5BF9\u65B9\u624B\u91CC\u7684\u8D44\u6E90\uFF0C\u5BFC\u81F4\u5404\u8FDB\u7A0B\u90FD\u963B\u585E\uFF0C\u90FD\u65E0\u6CD5\u5411\u524D\u63A8\u8FDB\u7684\u73B0\u8C61\uFF0C\u5C31\u662F\u201C\u6B7B\u9501\u201D\u3002\u53D1\u751F\u6B7B\u9501\u540E\u82E5\u65E0\u5916\u529B\u5E72\u6D89\uFF0C\u8FD9\u4E9B\u8FDB\u7A0B\u90FD\u5C06\u65E0\u6CD5\u5411\u524D\u63A8\u8FDB\u3002

                                                                      \u8FDB\u7A0B\u6B7B\u9501\u3001\u9965\u997F\u3001\u6B7B\u5FAA\u73AF\u7684\u533A\u522B

                                                                      1. \u6B7B\u9501\uFF1A\u5404\u8FDB\u7A0B\u4E92\u76F8\u7B49\u5F85\u5BF9\u65B9\u624B\u91CC\u7684\u8D44\u6E90\uFF0C\u5BFC\u81F4\u5404\u8FDB\u7A0B\u90FD\u963B\u585E\uFF0C\u65E0\u6CD5\u5411\u524D\u63A8\u8FDB\u7684\u73B0\u8C61\u3002
                                                                      2. \u9965\u997F\uFF1A\u7531\u4E8E\u957F\u671F\u5F97\u4E0D\u5230\u60F3\u8981\u7684\u8D44\u6E90\uFF0C\u67D0\u8FDB\u7A0B\u65E0\u6CD5\u5411\u524D\u63A8\u8FDB\u7684\u73B0\u8C61\uFF0C\u6BD4\u5982\uFF1A\u5728\u77ED\u8FDB\u7A0B\u4F18\u5148\u7B97\u6CD5\u4E2D\uFF0C\u82E5\u6709\u6E90\u6E90\u4E0D\u65AD\u7684\u77ED\u8FDB\u7A0B\u5230\u6765\uFF0C\u5219\u957F\u8FDB\u7A0B\u5C06\u4E00\u76F4\u5F97\u4E0D\u5230\u5904\u7406\u673A\uFF0C\u4ECE\u800C\u53D1\u751F\u957F\u8FDB\u7A0B\u9965\u997F\u73B0\u8C61
                                                                      3. \u6B7B\u5FAA\u73AF\uFF1A\u67D0\u8FDB\u7A0B\u6267\u884C\u8FC7\u7A0B\u4E2D\u4E00\u76F4\u8DF3\u4E0D\u51FA\u67D0\u4E2A\u5FAA\u73AF\u7684\u73B0\u8C61\u3002

                                                                      image-20211217200059209

                                                                      \u6B7B\u9501\u4EA7\u751F\u7684\u5FC5\u8981\u6761\u4EF6

                                                                      1. \u4E92\u65A5\u6761\u4EF6\uFF1A\u53EA\u6709\u5BF9\u5FC5\u987B\u4E92\u65A5\u4F7F\u7528\u7684\u8D44\u6E90\u7684\u4E89\u62A2\u624D\u4F1A\u5BFC\u81F4\u6B7B\u9501\uFF08\u6BD4\u5982IO\u8BBE\u5907\uFF09\uFF0C\u50CF\u5185\u5B58\u3001\u626C\u58F0\u5668\u8FD9\u6837\u53EF\u4EE5\u540C\u65F6\u8BA9\u591A\u4E2A\u8FDB\u7A0B\u4F7F\u7528\u7684\u8D44\u6E90\u662F\u4E0D\u4F1A\u5BFC\u81F4\u6B7B\u9501\u7684\uFF08\u56E0\u4E3A\u8FDB\u7A0B\u4E0D\u7528\u963B\u585E\u7B49\u5F85\u8FD9\u79CD\u8D44\u6E90\uFF09

                                                                      2. \u4E0D\u53EF\u5265\u593A\u6761\u4EF6\uFF1A\u8FDB\u7A0B\u6240\u83B7\u5F97\u7684\u8D44\u6E90\u5728\u672A\u4F7F\u7528\u5B8C\u4E4B\u524D\uFF0C\u4E0D\u80FD\u7531\u5176\u4ED6\u8FDB\u7A0B\u5F3A\u884C\u593A\u8D70\uFF0C\u53EA\u80FD\u4E3B\u52A8\u91CA\u653E\u3002

                                                                      3. \u8BF7\u6C42\u4FDD\u6301\u6761\u4EF6\uFF1A\u8FDB\u7A0B\u5DF2\u7ECF\u4FDD\u6301\u4E86\u81F3\u5C11\u4E00\u4E2A\u8D44\u6E90\uFF0C\u4F46\u53C8\u63D0\u51FA\u4E86\u65B0\u7684\u8D44\u6E90\u8BF7\u6C42\uFF0C\u800C\u8BE5\u8D44\u6E90\u53C8\u88AB\u5176\u4ED6\u8FDB\u7A0B\u5360\u6709\uFF0C\u6B64\u65F6\u8BF7\u6C42\u8FDB\u7A0B\u88AB\u963B\u585E\uFF0C\u4F46\u53C8\u5BF9\u81EA\u5DF1\u5DF2\u6709\u7684\u8D44\u6E90\u4FDD\u6301\u4E0D\u653E\u3002

                                                                      4. \u5FAA\u73AF\u7B49\u5F85\u6761\u4EF6\uFF1A\u5B58\u5728\u4E00\u79CD\u8FDB\u7A0B\u8D44\u6E90\u7684\u5FAA\u73AF\u7B49\u5F85\u94FE\uFF0C\u94FE\u4E2D\u7684\u6BCF\u4E00\u4E2A\u8FDB\u7A0B\u5DF2\u83B7\u5F97\u7684\u8D44\u6E90\u540C\u65F6\u88AB\u4E0B\u4E00\u4E2A\u8FDB\u7A0B\u6240\u8BF7\u6C42\u3002

                                                                        \u6CE8\u610F\uFF1A\u53D1\u751F\u6B7B\u9501\u65F6\uFF0C\u4E00\u5B9A\u6709\u5FAA\u73AF\u7B49\u5F85\uFF0C\u4F46\u662F\u53D1\u751F\u5FAA\u73AF\u7B49\u5F85\u65F6\u672A\u5FC5\u6B7B\u9501

                                                                        \u5982\u679C\u540C\u7C7B\u8D44\u6E90\u6570\u5927\u4E8E1\uFF0C\u5219\u5373\u4F7F\u6709\u5FAA\u73AF\u7B49\u5F85\uFF0C\u4E5F\u672A\u5FC5\u53D1\u751F\u6B7B\u9501\uFF0C\u4F46\u5982\u679C\u7CFB\u7EDF\u4E2D\u6BCF\u7C7B\u8D44\u6E90\u90FD\u53EA\u67091\u4E2A\uFF0C\u90A3\u5FAA\u73AF\u7B49\u5F85\u5C31\u662F\u6B7B\u9501\u7684\u5145\u5206\u5FC5\u8981\u6761\u4EF6\u4E86\u3002

                                                                      \u4EC0\u4E48\u65F6\u5019\u4F1A\u53D1\u751F\u6B7B\u9501

                                                                      1. \u5BF9\u4E0D\u53EF\u5265\u593A\u7684\u8D44\u6E90\u7684\u4E0D\u5408\u7406\u5206\u914D\uFF0C\u53EF\u80FD\u5BFC\u81F4\u6B7B\u9501\u3002

                                                                      \u6B7B\u9501\u7684\u5904\u7406\u7B56\u7565

                                                                      1. \u9884\u9632\u6B7B\u9501\u3002\u7834\u574F\u6B7B\u9501\u4EA7\u751F\u7684\u56DB\u4E2A\u5FC5\u8981\u6761\u4EF6\u4E2D\u7684\u4E00\u4E2A\u6216\u51E0\u4E2A
                                                                      2. \u907F\u514D\u6B7B\u9501\u3002\u7528\u67D0\u79CD\u65B9\u6CD5\u9632\u6B62\u7CFB\u7EDF\u8FDB\u5165\u4E0D\u5B89\u5168\u72B6\u6001\uFF0C\u4ECE\u800C\u907F\u514D\u6B7B\u9501\uFF08\u94F6\u884C\u5BB6\u7B97\u6CD5\uFF09
                                                                      3. \u6B7B\u9501\u7684\u68C0\u6D4B\u548C\u89E3\u9664\u3002\u5141\u8BB8\u6B7B\u9501\u7684\u53D1\u751F\uFF0C\u4E0D\u8FC7\u64CD\u4F5C\u7CFB\u7EDF\u4F1A\u8D1F\u8D23\u68C0\u6D4B\u51FA\u6B7B\u9501\u7684\u53D1\u751F\uFF0C\u7136\u540E\u91C7\u53D6\u67D0\u79CD\u63AA\u65BD\u89E3\u9664\u6B7B\u9501\u3002

                                                                      \u6B7B\u9501\u7684\u5904\u7406

                                                                      \u4E0D\u5141\u8BB8\u6B7B\u9501\u53D1\u751F

                                                                      \u9759\u6001\u7B56\u7565\uFF1A\u9884\u9632\u6B7B\u9501
                                                                      1. \u6B7B\u9501\u7684\u4EA7\u751F\u5FC5\u987B\u6EE1\u8DB3\u56DB\u4E2A\u5FC5\u8981\u6761\u4EF6\uFF0C\u53EA\u8981\u5176\u4E2D\u4E00\u4E2A\u6216\u51E0\u4E2A\u6761\u4EF6\u4E0D\u6210\u7ACB\uFF0C\u6B7B\u9501\u5C31\u4E0D\u4F1A\u53D1\u751F

                                                                      2. \u7834\u574F\u4E92\u65A5\u6761\u4EF6

                                                                        \u4E92\u65A5\u6761\u4EF6\uFF1A\u53EA\u6709\u5BF9\u5FC5\u987B\u4E92\u65A5\u4F7F\u7528\u7684\u8D44\u6E90\uFF08\u4E92\u65A5\u5171\u4EAB\uFF09\u7684\u4E89\u62A2\uFF0C\u624D\u4F1A\u5BFC\u81F4\u6B7B\u9501

                                                                        \u5982\u679C\u628A\u53EA\u80FD\u4E92\u65A5\u4F7F\u7528\u7684\u8D44\u6E90\u6539\u9020\u4E3A\u5141\u8BB8\u5171\u4EAB\u4F7F\u7528\uFF08\u540C\u65F6\u5171\u4EAB\uFF0C\u5B8F\u89C2\u4E0A\u5E76\u884C\uFF0C\u5FAE\u89C2\u4E0A\u4ECD\u7136\u662F\u4E32\u884C\u7684\uFF0C\u662F\u5E76\u53D1\u3002\uFF09\uFF0C\u5219\u7CFB\u7EDF\u4E0D\u4F1A\u8FDB\u5165\u6B7B\u9501\u72B6\u6001\uFF0C\u6BD4\u5982\uFF1ASPOOLing\u6280\u672F\u3002\u64CD\u4F5C\u7CFB\u7EDF\u53EF\u4EE5\u91C7\u7528SPOOLing\u6280\u672F\u5C06\u72EC\u5360\u8BBE\u5907\u5728\u903B\u8F91\u4E0A\u6539\u4E3A\u5171\u4EAB\u8BBE\u5907\u3002

                                                                        \u7F3A\u70B9\uFF1A\u5E76\u4E0D\u662F\u6240\u6709\u7684\u8D44\u6E90\u90FD\u53EF\u4EE5\u6539\u9020\u6210\u53EF\u5171\u4EAB\u4F7F\u7528\u7684\u8D44\u6E90\uFF0C\u5E76\u4E14\u4E3A\u4E86\u7CFB\u7EDF\u5B89\u5168\uFF0C\u5F88\u591A\u5730\u65B9\u5FC5\u987B\u4FDD\u6301\u8FD9\u79CD\u4E92\u65A5\u6027\u3002\u56E0\u6B64\uFF0C\u5F88\u591A\u65F6\u5019\u90FD\u65E0\u6CD5\u7834\u574F\u4E92\u65A5\u6761\u4EF6\u3002

                                                                      3. \u7834\u574F\u4E0D\u5265\u593A\u6761\u4EF6

                                                                        \u65B9\u6848\u4E00\uFF1A\u5F53\u67D0\u4E2A\u8FDB\u7A0B\u8BF7\u6C42\u65B0\u7684\u8D44\u6E90\u5F97\u4E0D\u5230\u6EE1\u8DB3\u65F6\uFF0C\u5B83\u5FC5\u987B\u7ACB\u5373\u91CA\u653E\u4FDD\u6301\u7684\u6240\u6709\u8D44\u6E90\uFF0C\u5F85\u4EE5\u540E\u9700\u8981\u65F6\u518D\u91CD\u65B0\u7533\u8BF7\u3002

                                                                        \u65B9\u6848\u4E8C\uFF1A\u5F53\u67D0\u4E2A\u8FDB\u7A0B\u9700\u8981\u7684\u8D44\u6E90\u88AB\u5176\u4ED6\u8FDB\u7A0B\u6240\u5360\u6709\u7684\u65F6\u5019\uFF0C\u53EF\u4EE5\u7531\u64CD\u4F5C\u7CFB\u7EDF\u534F\u52A9\uFF0C\u5C06\u60F3\u8981\u7684\u8D44\u6E90\u5F3A\u884C\u5265\u593A\uFF0C\u8FD9\u79CD\u65B9\u5F0F\u4E00\u822C\u8003\u8651\u5404\u8FDB\u7A0B\u7684\u4F18\u5148\u7EA7\uFF08\u6BD4\u5982\u5265\u593A\u8C03\u5EA6\u65B9\u5F0F\u5C31\u662F\u5C06\u5904\u7406\u673A\u8D44\u6E90\u5F3A\u884C\u5265\u593A\u7ED9\u4F18\u5148\u7EA7\u66F4\u9AD8\u7684\u8FDB\u7A0B\u4F7F\u7528\uFF09

                                                                        \u4E00\u79CD\u662F\u81EA\u613F\u653E\u5F03\uFF0C\u5BFC\u81F4\u4E0D\u7528\u5265\u593A\uFF0C\u4E00\u79CD\u662F\u5F3A\u884C\u5265\u593A\u3002

                                                                      4. \u7834\u574F\u8BF7\u6C42\u548C\u4FDD\u6301\u6761\u4EF6

                                                                        \u53EF\u4EE5\u91C7\u7528\u9759\u6001\u5206\u914D\u65B9\u6CD5\uFF0C\u5373\u8FDB\u7A0B\u5728\u8FD0\u884C\u524D\u4E00\u6B21\u6027\u7533\u8BF7\u5B8C\u5B83\u6240\u9700\u8981\u7684\u5168\u90E8\u8D44\u6E90\uFF0C\u5728\u5B83\u7684\u8D44\u6E90\u672A\u6EE1\u8DB3\u524D\uFF0C\u4E0D\u8BA9\u5B83\u6295\u5165\u8FD0\u884C\uFF0C\u4E00\u65E6\u6295\u5165\u8FD0\u884C\u540E\uFF0C\u8FD9\u4E9B\u8D44\u6E90\u5C31\u4E00\u76F4\u5F52\u5B83\u6240\u6709\uFF0C\u8BE5\u8FDB\u7A0B\u5C31\u4E0D\u4F1A\u518D\u8BF7\u6C42\u522B\u7684\u8D44\u6E90\u4E86\u3002

                                                                        \u7F3A\u70B9\uFF1A\u6709\u4E9B\u8D44\u6E90\u53EF\u80FD\u53EA\u9700\u8981\u7528\u5F88\u77ED\u7684\u65F6\u95F4\uFF0C\u56E0\u6B64\u5982\u679C\u8FDB\u7A0B\u7684\u6574\u4E2A\u8FD0\u884C\u671F\u95F4\u90FD\u4E00\u76F4\u4FDD\u6301\u7740\u6240\u6709\u8D44\u6E90\uFF0C\u5C31\u4F1A\u9020\u6210\u4E25\u91CD\u7684\u8D44\u6E90\u6D6A\u8D39\uFF0C\u8D44\u6E90\u5229\u7528\u7387\u6781\u4F4E\u3002\u53E6\u5916\uFF0C\u8BE5\u7B56\u7565\u4E5F\u6709\u53EF\u80FD\u5BFC\u81F4\u67D0\u4E9B\u8FDB\u7A0B\u9965\u997F\u3002

                                                                      5. \u7834\u574F\u5FAA\u73AF\u7B49\u5F85\u6761\u4EF6

                                                                        image-20211217204429202

                                                                        image-20211217204620460

                                                                      6. image-20211217204757093

                                                                      \u52A8\u6001\u7B56\u7565\uFF1A\u907F\u514D\u6B7B\u9501
                                                                      1. \u5B89\u5168\u5E8F\u5217\uFF0C\u5C31\u662F\u6307\u5982\u679C\u7CFB\u7EDF\u6309\u7167\u8FD9\u79CD\u5E8F\u5217\u5206\u914D\u8D44\u6E90\uFF0C\u5219\u6BCF\u4E2A\u8FDB\u7A0B\u90FD\u80FD\u987A\u5229\u5B8C\u6210\uFF0C\u53EA\u8981\u80FD\u627E\u51FA\u4E00\u4E2A\u5B89\u5168\u5E8F\u5217\uFF0C\u7CFB\u7EDF\u5C31\u662F\u5B89\u5168\u72B6\u6001\uFF0C\u5F53\u7136\u5B89\u5168\u5E8F\u5217\u53EF\u80FD\u6709\u591A\u4E2A\u3002

                                                                      2. \u5982\u679C\u7CFB\u7EDF\u5904\u4E8E\u5B89\u5168\u72B6\u6001\uFF0C\u5C31\u4E00\u5B9A\u4E0D\u4F1A\u53D1\u751F\u6B7B\u9501\uFF0C\u5982\u679C\u7CFB\u7EDF\u8FDB\u5165\u4E0D\u5B89\u5168\u72B6\u6001\uFF0C\u5C31\u53EF\u80FD\u53D1\u751F\u6B7B\u9501\uFF08\u5904\u4E8E\u4E0D\u5B89\u5168\u72B6\u6001\u672A\u5FC5\u662F\u53D1\u751F\u4E86\u6B7B\u9501\uFF0C\u4F46\u53D1\u751F\u6B7B\u9501\u65F6\uFF0C\u4E00\u5B9A\u662F\u5728\u4E0D\u5B89\u5168\u72B6\u6001\uFF09

                                                                        \u56E0\u6B64\u53EF\u4EE5\u5728\u8D44\u6E90\u5206\u914D\u4E4B\u524D\u9884\u5148\u5224\u65AD\u8FD9\u6B21\u5206\u914D\u662F\u5426\u4F1A\u5BFC\u81F4\u7CFB\u7EDF\u8FDB\u5165\u4E0D\u5B89\u5168\u72B6\u6001\uFF08\u80FD\u5426\u627E\u5230\u4E00\u4E2A\u5B89\u5168\u5E8F\u5217\uFF09\uFF0C\u4EE5\u6B64\u51B3\u5B9A\u662F\u5426\u7B54\u5E94\u8D44\u6E90\u5206\u914D\u8BF7\u6C42\u3002\u8FD9\u662F\u94F6\u884C\u5BB6\u7B97\u6CD5\u7684\u6838\u5FC3\u601D\u60F3\u3002

                                                                      \u5141\u8BB8\u6B7B\u9501\u53D1\u751F

                                                                      1. \u5982\u679C\u7CFB\u7EDF\u4E2D\u65E2\u4E0D\u91C7\u53D6\u9884\u9632\u6B7B\u9501\u7684\u63AA\u65BD\uFF0C\u4E5F\u4E0D\u91C7\u53D6\u907F\u514D\u6B7B\u9501\u7684\u63AA\u65BD\uFF0C\u7CFB\u7EDF\u5C31\u5F88\u53EF\u80FD\u53D1\u751F\u6B7B\u9501\uFF0C\u5728\u8FD9\u79CD\u60C5\u51B5\u4E0B\uFF0C\u7CFB\u7EDF\u5E94\u5F53\u63D0\u4F9B\u4E24\u4E2A\u7B97\u6CD5\uFF1A

                                                                        • \u6B7B\u9501\u68C0\u6D4B\u7B97\u6CD5\uFF1A\u7528\u4E8E\u68C0\u6D4B\u7CFB\u7EDF\u72B6\u6001\uFF0C\u4EE5\u786E\u5B9A\u7CFB\u7EDF\u4E2D\u662F\u5426\u53D1\u751F\u4E86\u6B7B\u9501
                                                                        • \u6B7B\u9501\u89E3\u9664\u7B97\u6CD5\uFF1A\u5F53\u8BA4\u5B9A\u7CFB\u7EDF\u4E2D\u5DF2\u7ECF\u53D1\u751F\u4E86\u6B7B\u9501\uFF0C\u5229\u7528\u8BE5\u7B97\u6CD5\u53EF\u5C06\u7CFB\u7EDF\u4ECE\u6B7B\u9501\u72B6\u6001\u4E2D\u89E3\u8131\u51FA\u6765\u3002
                                                                      2. \u6B7B\u9501\u7684\u68C0\u6D4B

                                                                        \u6B7B\u9501\u5B9A\u7406\uFF1A\u5982\u679C\u67D0\u65F6\u523B\u7CFB\u7EDF\u7684\u8D44\u6E90\u5206\u914D\u56FE\u662F\u4E0D\u53EF\u5B8C\u5168\u7B80\u5316\u7684\uFF0C\u90A3\u4E48\u6B64\u65F6\u7CFB\u7EDF\u6B7B\u9501

                                                                      3. \u6B7B\u9501\u7684\u89E3\u9664

                                                                        \u5E76\u4E0D\u662F\u7CFB\u7EDF\u4E2D\u6240\u6709\u7684\u8FDB\u7A0B\u90FD\u662F\u6B7B\u9501\u72B6\u6001\uFF0C\u7528\u6B7B\u9501\u68C0\u6D4B\u7B97\u6CD5\u5316\u7B80\u8D44\u6E90\u5206\u914D\u56FE\u540E\uFF0C\u8FD8\u8FDE\u7740\u8FB9\u7684\u90A3\u4E9B\u8FDB\u7A0B\u5C31\u662F\u6B7B\u9501\u8FDB\u7A0B

                                                                        \u89E3\u9664\u6B7B\u9501\u7684\u4E3B\u8981\u65B9\u6CD5\u6709\uFF1A

                                                                        • \u8D44\u6E90\u5265\u593A\u6CD5\uFF1A\u6302\u8D77\uFF08\u6682\u65F6\u653E\u5230\u5916\u5B58\u4E0A\uFF09\u67D0\u4E9B\u6B7B\u9501\u8FDB\u7A0B\uFF0C\u5E76\u62A2\u5360\u5B83\u7684\u8D44\u6E90\uFF0C\u5C06\u8FD9\u4E9B\u8D44\u6E90\u5206\u914D\u7ED9\u5176\u4ED6\u7684\u6B7B\u9501\u8FDB\u7A0B\u3002\u4F46\u662F\u5E94\u9632\u6B62\u88AB\u6302\u8D77\u7684\u8FDB\u7A0B\u957F\u65F6\u95F4\u5F97\u4E0D\u5230\u8D44\u6E90\u800C\u9965\u997F\u3002
                                                                        • \u64A4\u9500\u8FDB\u7A0B\u6CD5\uFF08\u7EC8\u6B62\u8FDB\u7A0B\u6CD5\uFF09\uFF1A\u5F3A\u5236\u64A4\u9500\u90E8\u5206\u751A\u81F3\u5168\u90E8\u6B7B\u9501\u8FDB\u7A0B\uFF0C\u5E76\u5265\u593A\u8FD9\u4E9B\u8FDB\u7A0B\u7684\u8D44\u6E90\u3002
                                                                        • \u8FDB\u7A0B\u56DE\u9000\u6CD5\u3002\u8BA9\u4E00\u4E2A\u6216\u591A\u4E2A\u6B7B\u9501\u8FDB\u7A0B\u56DE\u9000\u5230\u8DB3\u4EE5\u907F\u514D\u6B7B\u9501\u7684\u5730\u6B65\u3002

                                                                        \u5982\u4F55\u51B3\u5B9A\u5BF9\u54EA\u4E2A\u8FDB\u7A0B\u8FDB\u884C\u8D44\u6E90\u5265\u593A\u6216\u64A4\u9500\u6216\u56DE\u9000\uFF1A

                                                                        • \u8FDB\u7A0B\u4F18\u5148\u7EA7
                                                                        • \u5DF2\u6267\u884C\u591A\u957F\u65F6\u95F4
                                                                        • \u8FD8\u6709\u591A\u4E45\u80FD\u5B8C\u6210
                                                                        • \u8FDB\u7A0B\u5DF2\u7ECF\u4F7F\u7528\u4E86\u591A\u5C11\u8D44\u6E90
                                                                        • \u8FDB\u7A0B\u662F\u4EA4\u4E92\u5F0F\u7684\u8FD8\u662F\u6279\u5904\u7406\u5F0F\u7684
                                                                      4. image-20211217213054745

                                                                      \u7B2C\u4E09\u7AE0

                                                                      \u5185\u5B58

                                                                      \u6982\u5FF5

                                                                      1. \u5185\u5B58\u662F\u7528\u4E8E\u5B58\u653E\u6570\u636E\u7684\u786C\u4EF6\uFF0C\u7A0B\u5E8F\u6267\u884C\u524D\u9700\u8981\u5148\u653E\u5230\u5185\u5B58\u4E2D\u624D\u80FD\u88ABCPU\u5904\u7406
                                                                      2. \u5916\u5B58\u5C31\u662F\u786C\u76D8\u6216\u8005\u53EB\u8F85\u5B58
                                                                      3. \u786C\u76D8\u662F\u6162\u901F\u7684\u8BBE\u5907\uFF0C\u800CCPU\u662F\u8D85\u5FEB\u901F\u7684\u8BBE\u5907\uFF0C\u6240\u4EE5CPU\u8981\u5904\u7406\u7684\u6570\u636E\u76F4\u63A5\u4ECE\u5916\u5B58\u4E2D\u8BFB\u53D6\uFF0CCPU\u9700\u8981\u5927\u91CF\u65F6\u95F4\u90FD\u5728\u7B49\u5F85\uFF0CCPU\u76F4\u63A5\u548C\u5916\u5B58\u7684\u6570\u636E\u8FDB\u884C\u4EA4\u4E92\uFF0C\u4F1A\u4EA7\u751F\u901F\u5EA6\u4E0A\u7684\u77DB\u76FE
                                                                      4. \u5185\u5B58\u53EF\u4EE5\u7406\u89E3\u4E3A\u662F\u4E00\u79CD\u66F4\u5FEB\u901F\u5730\u5B58\u653E\u6570\u636E\u7684\u786C\u4EF6\u3002
                                                                      5. \u5185\u5B58\u5730\u5740\u4ECE0\u5F00\u59CB\uFF0C\u6BCF\u4E2A\u5730\u5740\u5BF9\u5E94\u4E00\u4E2A\u5B58\u50A8\u5355\u5143\u3002

                                                                      \u8FDB\u7A0B\u7684\u8FD0\u884C\u539F\u7406---\u6307\u4EE4

                                                                      1. \u6211\u4EEC\u5199\u7684\u4EE3\u7801\u8981\u7FFB\u8BD1\u6210CPU\u80FD\u8BC6\u522B\u7684\u6307\u4EE4\uFF0C\u8FD9\u4E9B\u6307\u4EE4\u4F1A\u544A\u8BC9CPU\u5E94\u8BE5\u53BB\u5185\u5B58\u7684\u54EA\u4E2A\u5730\u5740\u5B58\u3001\u53D6\u6570\u636E\uFF0C\u8FD9\u4E2A\u6570\u636E\u5E94\u8BE5\u505A\u4EC0\u4E48\u6837\u7684\u5904\u7406\u3002\u4F46\u662F\u5BF9\u4E8EJava\u6765\u8BF4\uFF0C\u6211\u4EEC\u5199\u7684Java\u4EE3\u7801\u4F1A\u7F16\u8BD1\u6210\u5B57\u8282\u7801\u6587\u4EF6\uFF0C\u5B57\u8282\u7801\u4E5F\u662F\u4E8C\u8FDB\u5236\u7801\uFF0C\u4F46\u662F\u5374\u4E0D\u662FCPU\u80FD\u591F\u76F4\u63A5\u8BC6\u522B\u7684\u4E8C\u8FDB\u5236\u673A\u5668\u7801\uFF0C\u5B57\u8282\u7801\u5BF9\u5E94\u4E8E\u5B57\u8282\u7801\u6307\u4EE4\uFF0C\u6240\u4EE5\u5728JVM\u4E2D\u7684\u6267\u884C\u5F15\u64CE\u90E8\u5206\uFF0C\u89E3\u91CA\u5668\u4F1A\u89E3\u91CA\u5B57\u8282\u7801\u6307\u4EE4\u5E76\u6267\u884C\uFF0C\u540C\u65F6JIT\u5373\u65F6\u7F16\u8BD1\u5668\u4F1A\u5C06\u5B57\u8282\u7801\u518D\u6B21\u7F16\u8BD1\u6210CPU\u80FD\u76F4\u63A5\u8BC6\u522B\u7684\u673A\u5668\u7801\uFF0C\u8FD9\u662F\u4E8C\u6B21\u7F16\u8BD1\uFF0C\u6240\u4EE5\u8BF4Java\u662F\u534A\u89E3\u91CA\u534A\u7F16\u8BD1\u7684\u8BED\u8A00\uFF0C\u89E3\u91CA\u5668\u5B58\u5728\u7684\u539F\u56E0\u662F\u4E3A\u4E86\u4FDD\u8BC1\u54CD\u5E94\u901F\u5EA6\uFF0C\u56E0\u4E3A\u7F16\u8BD1\u662F\u9700\u8981\u65F6\u95F4\u7684\uFF0C\u5728JIT\u5373\u65F6\u7F16\u8BD1\u5668\u7F16\u8BD1\u70ED\u70B9\u4EE3\u7801\u7684\u65F6\u5019\uFF0C\u89E3\u91CA\u5668\u5C31\u80FD\u591F\u76F4\u63A5\u89E3\u91CA\u5B57\u8282\u7801\u6307\u4EE4\u5E76\u6267\u884C\u4E86\uFF0C\u4FDD\u8BC1\u4E86\u54CD\u5E94\u901F\u5EA6\u3002

                                                                      2. \u5B9E\u9645\u4E0A\uFF0C\u7F16\u8BD1\u65F6\uFF0C\u6307\u4EE4\u4E2D\u7ED9\u51FA\u7684\u5730\u5740\u53C2\u6570\u90FD\u662F\u903B\u8F91\u5730\u5740\uFF0C\u6216\u8005\u8BF4\u76F8\u5BF9\u5730\u5740\u3002

                                                                        \u7EDD\u5BF9\u5730\u5740\u53C8\u79F0\u7269\u7406\u5730\u5740

                                                                        \u7F16\u8BD1\uFF1A\u7531\u7F16\u8BD1\u7A0B\u5E8F\u5C06\u7528\u6237\u6E90\u4EE3\u7801\u7F16\u8BD1\u6210\u82E5\u5E72\u4E2A\u76EE\u6807\u6A21\u5757\uFF08\u7F16\u8BD1\u5C31\u662F\u628A\u9AD8\u7EA7\u8BED\u8A00\u7FFB\u8BD1\u6210\u673A\u5668\u8BED\u8A00\uFF09

                                                                        \u94FE\u63A5\uFF1A\u7531\u94FE\u63A5\u7A0B\u5E8F\u5C06\u7F16\u8BD1\u540E\u5F62\u6210\u7684\u4E00\u7EC4\u76EE\u6807\u6A21\u5757\uFF0C\u4EE5\u53CA\u6240\u9700\u5E93\u51FD\u6570\u94FE\u63A5\u5728\u4E00\u8D77\uFF0C\u5F62\u6210\u4E00\u4E2A\u5B8C\u6574\u7684\u88C5\u5165\u6A21\u5757

                                                                        \u88C5\u5165\uFF1A\u7531\u88C5\u5165\u7A0B\u5E8F\u5C06\u88C5\u5165\u6A21\u5757\u88C5\u5165\u5185\u5B58\u8FD0\u884C\u3002

                                                                      3. \u88C5\u5165\u7684\u4E09\u79CD\u65B9\u5F0F

                                                                        • \u7EDD\u5BF9\u88C5\u5165

                                                                          \u5728\u7F16\u8BD1\u65F6\uFF0C\u5982\u679C\u76F4\u5230\u7A0B\u5E8F\u5C06\u653E\u5230\u5185\u5B58\u4E2D\u7684\u54EA\u4E2A\u4F4D\u7F6E\uFF0C\u7F16\u8BD1\u7A0B\u5E8F\u5C06\u4EA7\u751F\u7EDD\u5BF9\u5730\u5740\u7684\u76EE\u6807\u4EE3\u7801\uFF0C\u88C5\u5165\u7A0B\u5E8F\u6309\u7167\u88C5\u5165\u6A21\u5757\u4E2D\u7684\u5730\u5740\uFF0C\u5C06\u7A0B\u5E8F\u548C\u6570\u636E\u88C5\u5165\u5185\u5B58

                                                                          \u7EDD\u5BF9\u88C5\u5165\u53EA\u9002\u7528\u4E8E\u5355\u9053\u7A0B\u5E8F\u73AF\u5883

                                                                        • \u9759\u6001\u91CD\u5B9A\u4F4D

                                                                          \u7531\u88C5\u5165\u7A0B\u5E8F\u628A\u903B\u8F91\u5730\u5740\u8F6C\u6362\u4E3A\u7269\u7406\u5730\u5740\u3002

                                                                          \u9759\u6001\u91CD\u5B9A\u4F4D\u7684\u7279\u70B9\u662F\u5728\u4E00\u4E2A\u4F5C\u4E1A\u88C5\u5165\u5185\u5B58\u65F6\uFF0C\u5FC5\u987B\u5206\u914D\u5176\u8981\u6C42\u7684\u5168\u90E8\u5185\u5B58\u7A7A\u95F4\uFF0C\u5982\u679C\u6CA1\u6709\u8DB3\u591F\u7684\u5185\u5B58\uFF0C\u5C31\u4E0D\u80FD\u88C5\u5165\u8BE5\u4F5C\u4E1A\u3002\u4F5C\u4E1A\u4E00\u65E6\u8FDB\u5165\u5185\u5B58\u540E\uFF0C\u5728\u8FD0\u884C\u671F\u95F4\u5C31\u4E0D\u80FD\u518D\u79FB\u52A8\uFF0C\u4E5F\u4E0D\u80FD\u518D\u7533\u8BF7\u5185\u5B58\u7A7A\u95F4\u3002

                                                                        • \u52A8\u6001\u91CD\u5B9A\u4F4D

                                                                          \u53C8\u79F0\u52A8\u6001\u8FD0\u884C\u65F6\u88C5\u5165\u3002\u8FD9\u79CD\u65B9\u5F0F\u9700\u8981\u4E00\u4E2A\u91CD\u5B9A\u4F4D\u5BC4\u5B58\u5668\u652F\u6301

                                                                          \u91CD\u5B9A\u4F4D\u5BC4\u5B58\u5668\uFF1A\u5B58\u653E\u88C5\u5165\u6A21\u5757\u5B58\u653E\u7684\u8D77\u59CB\u4F4D\u7F6E\u3002

                                                                          \u5141\u8BB8\u7A0B\u5E8F\u5728\u5185\u5B58\u4E2D\u53D1\u751F\u79FB\u52A8\u3002

                                                                          \u5E76\u4E14\u53EF\u5C06\u7A0B\u5E8F\u5206\u914D\u5230\u4E0D\u8FDE\u7EED\u7684\u5B58\u50A8\u533A\u4E2D\uFF1A\u5728\u7A0B\u5E8F\u8FD0\u884C\u524D\uFF0C\u53EA\u9700\u88C5\u5165\u5B83\u7684\u90E8\u5206\u4EE3\u7801\u5373\u53EF\u6295\u5165\u8FD0\u884C\uFF0C\u7136\u540E\u5728\u7A0B\u5E8F\u8FD0\u884C\u671F\u95F4\uFF0C\u6839\u636E\u9700\u8981\u52A8\u6001\u7533\u8BF7\u5206\u914D\u5185\u5B58

                                                                      4. \u94FE\u63A5\u7684\u4E09\u79CD\u65B9\u5F0F

                                                                        image-20211217222113746

                                                                      \u5185\u5B58\u7BA1\u7406

                                                                      \u6982\u5FF5

                                                                      1. \u64CD\u4F5C\u7CFB\u7EDF\u4F5C\u4E3A\u7CFB\u7EDF\u8D44\u6E90\u7684\u7BA1\u7406\u8005\uFF0C\u5F53\u7136\u4E5F\u9700\u8981\u5BF9\u5185\u5B58\u8FDB\u884C\u7BA1\u7406

                                                                      2. \u5404\u79CD\u8FDB\u7A0B\u60F3\u8981\u8FD0\u884C\u7684\u65F6\u5019\uFF0C\u8FDB\u7A0B\u76F8\u5173\u7684\u6570\u636E\u90FD\u8981\u653E\u5165\u5185\u5B58\u5F53\u4E2D\uFF0C\u6216\u8005\u8BF4\u8FDB\u7A0B\u5B9E\u4F53\u8981\u653E\u5165\u5185\u5B58\u4E2D\uFF0C\u8FDB\u7A0B\u5B9E\u4F53\u662F\u7531PCB\u3001\u7A0B\u5E8F\u6BB5\u548C\u6570\u636E\u6BB5\u7EC4\u6210\u3002

                                                                      3. \u64CD\u4F5C\u7CFB\u7EDF\u5728\u5185\u5B58\u7BA1\u7406\u7684\u4F5C\u7528\uFF1A

                                                                        • \u64CD\u4F5C\u7CFB\u7EDF\u9700\u8981\u8D1F\u8D23\u5185\u5B58\u7A7A\u95F4\u7684\u5206\u914D\u548C\u56DE\u6536

                                                                        • \u64CD\u4F5C\u7CFB\u7EDF\u9700\u8981\u63D0\u4F9B\u67D0\u79CD\u6280\u672F\uFF08\u865A\u62DF\u6280\u672F\u6216\u8005\u8BF4\u7A7A\u5206\u590D\u7528\u6280\u672F\uFF09\u4ECE\u903B\u8F91\u4E0A\u5BF9\u5185\u5B58\u7A7A\u95F4\u8FDB\u884C\u6269\u5145

                                                                          image-20211220143402386

                                                                        • \u64CD\u4F5C\u7CFB\u7EDF\u9700\u8981\u63D0\u4F9B\u5730\u5740\u8F6C\u6362\u529F\u80FD\uFF0C\u8D1F\u8D23\u7A0B\u5E8F\u7684\u903B\u8F91\u5730\u5740\u548C\u7269\u7406\u5730\u5740\u7684\u8F6C\u6362\u3002

                                                                        • \u64CD\u4F5C\u7CFB\u7EDF\u9700\u8981\u63D0\u4F9B\u5185\u5B58\u4FDD\u62A4\u529F\u80FD\uFF0C\u4FDD\u8BC1\u5404\u8FDB\u7A0B\u5728\u5404\u81EA\u5B58\u50A8\u7A7A\u95F4\u5185\u7684\u8FD0\u884C\uFF0C\u4E92\u4E0D\u5E72\u6270\u3002

                                                                      4. \u903B\u8F91\u5730\u5740\u5230\u7269\u7406\u5730\u5740\u7684\u8F6C\u6362\uFF0C\u5C31\u662F\u524D\u9762\u63D0\u5230\u7684\u88C5\u5165\u7684\u4E09\u79CD\u65B9\u5F0F\u3002

                                                                      5. \u5185\u5B58\u4FDD\u62A4\u53EF\u91C7\u53D6\u4E24\u79CD\u65B9\u6CD5\uFF1A

                                                                        • \u5728CPU\u4E2D\u8BBE\u7F6E\u4E00\u5BF9\u4E0A\u4E0B\u9650\u5BC4\u5B58\u5668\uFF0C\u5B58\u653E\u8FDB\u7A0B\u7684\u4E0A\u4E0B\u9650\u5730\u5740\uFF0C\u8FDB\u7A0B\u7684\u6307\u4EE4\u8981\u8BBF\u95EE\u67D0\u4E2A\u5730\u5740\u65F6\uFF0CCPU\u68C0\u67E5\u662F\u5426\u8D8A\u754C\u3002
                                                                        • \u91C7\u7528\u91CD\u5B9A\u4F4D\u5BC4\u5B58\u5668\uFF08\u53C8\u79F0\u57FA\u5740\u5BC4\u5B58\u5668\uFF09\u548C\u754C\u5730\u5740\u5BC4\u5B58\u5668\uFF08\u53C8\u79F0\u9650\u957F\u5BC4\u5B58\u5668\uFF09\u8FDB\u884C\u8D8A\u754C\u68C0\u67E5\uFF0C\u91CD\u5B9A\u4F4D\u5BC4\u5B58\u5668\u4E2D\u5B58\u653E\u7684\u662F\u8FDB\u7A0B\u7684\u8D77\u59CB\u7269\u7406\u5730\u5740\uFF0C\u754C\u5730\u5740\u5BC4\u5B58\u5668\u4E2D\u5B58\u653E\u7684\u662F\u8FDB\u7A0B\u7684\u6700\u5927\u903B\u8F91\u5730\u5740\u3002\u8FDB\u7A0B\u7684\u6307\u4EE4\u8981\u8BBF\u95EE\u67D0\u4E2A\u5730\u5740\u65F6\uFF0CCPU\u68C0\u67E5\u662F\u5426\u8D8A\u754C\u3002

                                                                      \u8986\u76D6\u548C\u4EA4\u6362

                                                                      1. \u8986\u76D6\u6280\u672F\uFF0C\u7528\u6765\u89E3\u51B3\u201C\u7A0B\u5E8F\u5927\u5C0F\u8D85\u8FC7\u7269\u7406\u5185\u5B58\u603B\u548C\u201D\u7684\u95EE\u9898

                                                                        \u8986\u76D6\u6280\u672F\u7684\u601D\u60F3\uFF1A\u5C06\u7A0B\u5E8F\u5206\u4E3A\u591A\u4E2A\u6BB5\uFF08\u591A\u4E2A\u6A21\u5757\uFF09\uFF0C\u5E38\u7528\u7684\u6BB5\u5E38\u9A7B\u5185\u5B58\uFF0C\u4E0D\u5E38\u7528\u7684\u6BB5\u5728\u9700\u8981\u65F6\u8C03\u5165\u5185\u5B58\u3002

                                                                      2. \u7A0B\u5E8F\u4E00\u5B9A\u8981\u8C03\u5165\u5185\u5B58\u624D\u80FD\u591F\u88AB\u8FD0\u884C\uFF0C\u8FDB\u7A0B\u5C31\u662F\u4E00\u4E2A\u7A0B\u5E8F\u7684\u8FD0\u884C\u671F\uFF0C\u7A0B\u5E8F\u53EF\u4EE5\u7406\u89E3\u4E3A\u9759\u6001\u7684\uFF0C\u5FC5\u987B\u8C03\u5165\u5185\u5B58\u624D\u80FD\u591F\u88ABCPU\u6240\u6267\u884C\uFF0C\u56E0\u4E3ACPU\u662F\u9AD8\u901F\u8BA1\u7B97\u8BBE\u5907\uFF0C\u800C\u786C\u76D8\u7684IO\u901F\u5EA6\u5F88\u6162\uFF0C\u8FD9\u4E2D\u95F4\u5B58\u5728\u77DB\u76FE\uFF0C\u6240\u4EE5\u4E00\u4E2A\u7A0B\u5E8F\u5728\u8FD0\u884C\u524D\u5FC5\u987B\u88AB\u8C03\u5165\u5185\u5B58\u624D\u80FD\u591F\u88ABCPU\u6267\u884C\uFF0C\u8C03\u5165\u5185\u5B58\u7684\u7A0B\u5E8F\u53EF\u4EE5\u8BF4\u662F\u7A0B\u5E8F\u7684\u8FD0\u884C\u6001\uFF0C\u4E5F\u5C31\u662F\u8FDB\u7A0B\u3002

                                                                      3. \u5185\u5B58\u4E2D\u5206\u4E3A\u4E00\u4E2A\u56FA\u5B9A\u533A\u548C\u82E5\u5E72\u4E2A\u8986\u76D6\u533A

                                                                        \u9700\u8981\u5E38\u9A7B\u5185\u5B58\u7684\u6BB5\u653E\u5728\u56FA\u5B9A\u533A\u4E2D\uFF0C\u8C03\u5165\u540E\u5C31\u4E0D\u518D\u8C03\u51FA

                                                                        \u4E0D\u5E38\u7528\u7684\u6BB5\u653E\u5728\u8986\u76D6\u533A\uFF0C\u9700\u8981\u7528\u5230\u65F6\u8C03\u5165\u5185\u5B58\uFF0C\u7528\u4E0D\u5230\u65F6\u8C03\u51FA\u5185\u5B58

                                                                        \u6309\u7167\u81EA\u8EAB\u903B\u8F91\u7ED3\u6784\uFF0C\u8BA9\u90A3\u4E9B\u4E0D\u53EF\u80FD\u540C\u65F6\u88AB\u8BBF\u95EE\u7684\u7A0B\u5E8F\u6BB5\u5171\u4EAB\u540C\u4E00\u4E2A\u8986\u76D6\u533A

                                                                        image-20211220145412455

                                                                        \u8986\u76D6\u6280\u672F\u53EA\u7528\u4E8E\u65E9\u671F\u7684\u64CD\u4F5C\u7CFB\u7EDF\u4E2D\uFF0C\u73B0\u5728\u5DF2\u7ECF\u6210\u4E3A\u5386\u53F2\uFF01\uFF01\uFF01

                                                                      4. \u4EA4\u6362\u6280\u672F

                                                                        \u5F53\u5185\u5B58\u7A7A\u95F4\u7D27\u5F20\u65F6\uFF0C\u7CFB\u7EDF\u5C06\u5185\u5B58\u4E2D\u67D0\u4E9B\u8FDB\u7A0B\u6682\u65F6\u6362\u51FA\u5916\u5B58\uFF0C\u628A\u5916\u5B58\u4E2D\u67D0\u4E9B\u5DF2\u5177\u5907\u8FD0\u884C\u6761\u4EF6\u7684\u8FDB\u7A0B\u6362\u5165\u5185\u5B58\uFF08\u8FDB\u7A0B\u5728\u5185\u5B58\u4E0E\u78C1\u76D8\u95F4\u52A8\u6001\u8C03\u5EA6\u3002\uFF09

                                                                        \u5904\u7406\u673A\u8C03\u5EA6\u4E2D\u7684\u4E2D\u7EA7\u8C03\u5EA6\u5C31\u662F\u4E3A\u4E86\u5B9E\u73B0\u4EA4\u6362\u6280\u672F\u7684\u8C03\u5EA6\u7B56\u7565\u3002

                                                                        \u8FDB\u7A0B\u7684PCB\u4F1A\u4FDD\u7559\u5728\u5185\u5B58\u4E2D\uFF0C\u63D2\u5165\u5230\u6302\u8D77\u961F\u5217

                                                                        PCB\u4E00\u5B9A\u662F\u4FDD\u7559\u5728\u5185\u5B58\u4E2D\uFF0C\u56E0\u4E3A\u6302\u8D77\u7684\u8FDB\u7A0B\u5728\u78C1\u76D8\u7684\u4EC0\u4E48\u4F4D\u7F6E\u5728PCB\u6709\u8BB0\u5F55\u3002

                                                                      5. \u5177\u6709\u5BF9\u6362\u529F\u80FD\u7684\u64CD\u4F5C\u7CFB\u7EDF\u4E2D\uFF0C\u901A\u5E38\u628A\u78C1\u76D8\u7A7A\u95F4\u5206\u4E3A\u5BF9\u6362\u533A\u548C\u6587\u4EF6\u533A\u4E24\u90E8\u5206\u3002\u6587\u4EF6\u533A\u4E3B\u8981\u7528\u4E8E\u5B58\u653E\u6587\u4EF6\uFF0C\u4E3B\u8981\u8FFD\u6C42\u5B58\u50A8\u7A7A\u95F4\u7684\u5229\u7528\u7387\uFF0C\u56E0\u6B64\u5BF9\u6587\u4EF6\u533A\u7A7A\u95F4\u7684\u7BA1\u7406\u91C7\u7528\u79BB\u6563\u5206\u914D\u65B9\u5F0F

                                                                        \u5BF9\u6362\u533A\u7A7A\u95F4\u53EA\u5360\u78C1\u76D8\u7684\u5C0F\u90E8\u5206\uFF0C\u88AB\u6362\u51FA\u7684\u8FDB\u7A0B\u6570\u636E\u5C31\u5B58\u653E\u5728\u5BF9\u6362\u533A\uFF0C\u4E3B\u8981\u8FFD\u6C42\u6362\u5165\u6362\u51FA\u901F\u5EA6\uFF0C\u91C7\u7528\u8FDE\u7EED\u5206\u914D\u65B9\u5F0F\u3002

                                                                        \u5BF9\u6362\u533A\u7684IO\u901F\u5EA6\u6BD4\u6587\u4EF6\u533A\u7684\u66F4\u5FEB

                                                                      6. \u4EC0\u4E48\u65F6\u5019\u5E94\u8BE5\u4EA4\u6362\u5185\u5B58\u4E2D\u7684\u8FDB\u7A0B\u5230\u5916\u5B58\u4E2D\uFF0C\u628A\u5916\u5B58\u4E2D\u5177\u5907\u8FD0\u884C\u6761\u4EF6\u7684\u8FDB\u7A0B\u4EA4\u6362\u8FDB\u5185\u5B58\u4E2D\uFF1F

                                                                        \u4EA4\u6362\u901A\u5E38\u5728\u8BB8\u591A\u8FDB\u7A0B\u8FD0\u884C\u4E14\u5185\u5B58\u5403\u7D27\u65F6\u8FDB\u884C\uFF0C\u4F8B\u5982\uFF1A\u5728\u53D1\u73B0\u8BB8\u591A\u8FDB\u7A0B\u8FD0\u884C\u65F6\u7ECF\u5E38\u53D1\u751F\u7F3A\u9875\u65F6\uFF0C\u8BF4\u660E\u5185\u5B58\u7D27\u5F20\uFF0C\u6B64\u65F6\u53EF\u4EE5\u6362\u51FA\u4E00\u4E9B\u8FDB\u7A0B\uFF0C\u5982\u679C\u7F3A\u9875\u7387\u660E\u663E\u4E0B\u964D\uFF0C\u5C31\u53EF\u4EE5\u6682\u505C\u6362\u51FA\u3002

                                                                      7. \u53EF\u4F18\u5148\u6362\u51FA\u963B\u585E\u8FDB\u7A0B\uFF0C\u53EF\u6362\u51FA\u4F18\u5148\u7EA7\u4F4E\u7684\u8FDB\u7A0B\uFF0C\u4E3A\u4E86\u9632\u6B62\u4F18\u5148\u7EA7\u4F4E\u7684\u8FDB\u7A0B\u5728\u88AB\u8C03\u5165\u5185\u5B58\u540E\u5F88\u5FEB\u53C8\u88AB\u6362\u51FA\uFF0C\u6709\u7684\u7CFB\u7EDF\u8FD8\u4F1A\u8003\u8651\u8FDB\u7A0B\u5728\u5185\u5B58\u4E2D\u7684\u9A7B\u7559\u65F6\u95F4\u3002

                                                                        PCB\u4F1A\u5E38\u9A7B\u5185\u5B58\uFF0C\u4E0D\u4F1A\u88AB\u6362\u51FA\u5916\u5B58

                                                                      8. \u8986\u76D6\u548C\u4EA4\u6362\u7684\u533A\u522B\uFF1A

                                                                        • \u8986\u76D6\u662F\u5728\u540C\u4E00\u4E2A\u7A0B\u5E8F\u6216\u8FDB\u7A0B\u4E2D\u7684
                                                                        • \u4EA4\u6362\u662F\u5728\u4E0D\u540C\u8FDB\u7A0B\u6216\u4F5C\u4E1A\u4E4B\u95F4\u7684\u3002

                                                                      \u8FDE\u7EED\u5206\u914D\u7BA1\u7406\u65B9\u5F0F

                                                                      1. \u5355\u4E00\u8FDE\u7EED\u5206\u914D

                                                                        \u5728\u5355\u4E00\u8FDE\u7EED\u5206\u914D\u65B9\u5F0F\u4E2D\uFF0C\u5185\u5B58\u88AB\u5206\u4E3A\u7CFB\u7EDF\u533A\u548C\u7528\u6237\u533A\u3002

                                                                        \u7CFB\u7EDF\u533A\u901A\u5E38\u4F4D\u4E8E\u5185\u5B58\u7684\u4F4E\u5730\u5740\u90E8\u5206\uFF0C\u7528\u4E8E\u5B58\u653E\u64CD\u4F5C\u7CFB\u7EDF\u7684\u76F8\u5173\u6570\u636E\u3002

                                                                        \u7528\u6237\u533A\u7528\u4E8E\u5B58\u653E\u7528\u6237\u8FDB\u7A0B\u76F8\u5173\u6570\u636E

                                                                        \u5185\u5B58\u4E2D\u53EA\u80FD\u6709\u4E00\u9053\u7528\u6237\u7A0B\u5E8F\uFF0C\u7528\u6237\u7A0B\u5E8F\u72EC\u5360\u6574\u4E2A\u7528\u6237\u533A\u7A7A\u95F4\u3002

                                                                        \u4E0D\u652F\u6301\u591A\u4E2A\u8FDB\u7A0B\u5E76\u53D1\u8FD0\u884C\u3002

                                                                        \u6CA1\u6709\u5916\u90E8\u788E\u7247\uFF0C\u6709\u5185\u90E8\u788E\u7247

                                                                      2. \u56FA\u5B9A\u5206\u533A\u5206\u914D

                                                                        \u5C06\u6574\u4E2A\u7528\u6237\u7A7A\u95F4\u5212\u5206\u4E3A\u82E5\u5E72\u4E2A\u56FA\u5B9A\u5927\u5C0F\u7684\u5206\u533A\uFF0C\u5728\u6BCF\u4E2A\u5206\u533A\u4E2D\u53EA\u88C5\u5165\u4E00\u9053\u4F5C\u4E1A

                                                                        \u6CA1\u6709\u5916\u90E8\u788E\u7247\uFF0C\u6709\u5185\u90E8\u788E\u7247

                                                                        • \u5206\u533A\u5927\u5C0F\u76F8\u7B49

                                                                          image-20211220153145382

                                                                        • \u5206\u533A\u5927\u5C0F\u4E0D\u7B49

                                                                          image-20211220153203225

                                                                      3. \u52A8\u6001\u5206\u533A\u5206\u914D

                                                                        \u53C8\u79F0\u53EF\u53D8\u5206\u533A\u5206\u914D\uFF0C\u8FD9\u79CD\u5206\u914D\u65B9\u5F0F\u4E0D\u4F1A\u9884\u5148\u5212\u5206\u5185\u5B58\u5206\u533A\uFF0C\u800C\u662F\u5728\u8FDB\u7A0B\u88C5\u5165\u5185\u5B58\u65F6\uFF0C\u6839\u636E\u8FDB\u7A0B\u7684\u5927\u5C0F\u52A8\u6001\u5730\u5EFA\u7ACB\u5206\u533A\uFF0C\u5E76\u4F7F\u5206\u533A\u7684\u5927\u5C0F\u6B63\u597D\u9002\u5408\u8FDB\u7A0B\u7684\u9700\u8981\u3002\u56E0\u6B64\u7CFB\u7EDF\u5206\u533A\u7684\u5927\u5C0F\u548C\u6570\u76EE\u662F\u53EF\u53D8\u7684

                                                                        • \u7CFB\u7EDF\u7528\u4EC0\u4E48\u6837\u7684\u6570\u636E\u7ED3\u6784\u8BB0\u5F55\u5185\u5B58\u7684\u4F7F\u7528\u60C5\u51B5

                                                                          image-20211220154132962

                                                                        • \u628A\u4E00\u4E2A\u65B0\u4F5C\u4E1A\u653E\u5165\u5185\u5B58\u65F6\uFF0C\u5FC5\u987B\u6309\u7167\u4E00\u5B9A\u7684\u52A8\u6001\u5206\u533A\u5206\u914D\u7B97\u6CD5\uFF0C\u4ECE\u7A7A\u95F2\u5206\u533A\u8868\uFF08\u6216\u7A7A\u95F2\u5206\u533A\u94FE\uFF09\u4E2D\u9009\u51FA\u4E00\u4E2A\u5206\u533A\u5206\u914D\u7ED9\u8BE5\u4F5C\u4E1A

                                                                      4. \u52A8\u6001\u5206\u533A\u5206\u914D\u6CA1\u6709\u5185\u90E8\u788E\u7247\uFF0C\u4F46\u662F\u6709\u5916\u90E8\u788E\u7247

                                                                        \u5185\u90E8\u788E\u7247\uFF0C\u5206\u914D\u7ED9\u67D0\u8FDB\u7A0B\u7684\u5185\u5B58\u533A\u57DF\u4E2D\uFF0C\u5982\u679C\u6709\u4E9B\u90E8\u5206\u6CA1\u6709\u7528\u4E0A

                                                                        \u5916\u90E8\u788E\u7247\uFF0C\u662F\u6307\u5185\u5B58\u4E2D\u7684\u67D0\u4E9B\u7A7A\u95F2\u5206\u533A\u7531\u4E8E\u592A\u5C0F\u800C\u96BE\u4EE5\u5229\u7528\uFF0C\u5373\u6CA1\u6709\u5206\u914D\u7ED9\u8FDB\u7A0B\u7684\u5185\u5B58\u7A7A\u95F4

                                                                        \u5982\u679C\u5185\u5B58\u4E2D\u7A7A\u95F2\u7A7A\u95F4\u7684\u7EFC\u5408\u672C\u6765\u53EF\u4EE5\u6EE1\u8DB3\u67D0\u8FDB\u7A0B\u7684\u8981\u6C42\uFF0C\u4F46\u7531\u4E8E\u8FDB\u7A0B\u9700\u8981\u7684\u662F\u4E00\u6574\u5757\u8FDE\u7EED\u7684\u5185\u5B58\u7A7A\u95F4\uFF0C\u56E0\u6B64\u8FD9\u4E9B\u788E\u7247\u4E0D\u80FD\u6EE1\u8DB3\u8FDB\u7A0B\u7684\u9700\u6C42

                                                                        \u53EF\u4EE5\u901A\u8FC7\u7D27\u51D1\u6280\u672F\u6765\u89E3\u51B3\u5916\u90E8\u788E\u7247

                                                                      \u52A8\u6001\u5206\u533A\u5206\u914D\u7B97\u6CD5

                                                                      1. \u9996\u6B21\u9002\u5E94\u7B97\u6CD5

                                                                        \u6BCF\u6B21\u90FD\u4ECE\u4F4E\u5730\u5740\u5F00\u59CB\u67E5\u627E\uFF0C\u627E\u5230\u7B2C\u4E00\u4E2A\u80FD\u6EE1\u8DB3\u5927\u5C0F\u7684\u7A7A\u95F2\u5206\u533A

                                                                        \u5982\u4F55\u5B9E\u73B0\uFF1A\u7A7A\u95F2\u5206\u533A\u4EE5\u5730\u5740\u9012\u589E\u7684\u6B21\u5E8F\u6392\u5E8F\uFF0C\u6BCF\u6B21\u5206\u914D\u5185\u5B58\u65F6\u4ECE\u5934\uFF08\u4ECE\u4F4E\u5730\u5740\uFF09\u987A\u5E8F\u67E5\u627E\u7A7A\u95F2\u5206\u533A\u94FE\uFF08\u6216\u7A7A\u95F2\u5206\u533A\u8868\uFF09\uFF0C\u627E\u5230\u5927\u5C0F\u80FD\u6EE1\u8DB3\u8981\u6C42\u7684\u7B2C\u4E00\u4E2A\u7A7A\u95F2\u5206\u533A\u3002

                                                                      2. \u6700\u4F73\u9002\u5E94\u7B97\u6CD5

                                                                        \u4E3A\u5404\u8FDB\u7A0B\u5206\u914D\u7684\u7A7A\u95F4\u5FC5\u987B\u662F\u8FDE\u7EED\u7684\u4E00\u6574\u7247\u533A\u57DF\uFF0C\u56E0\u6B64\u4E3A\u4E86\u4FDD\u8BC1\u5F53\u5927\u8FDB\u7A0B\u5230\u6765\u65F6\u80FD\u6709\u8FDE\u7EED\u7684\u5927\u7247\u7A7A\u95F4\uFF0C\u53EF\u4EE5\u5C3D\u53EF\u80FD\u591A\u5730\u7559\u4E0B\u5927\u7247\u7684\u7A7A\u95F2\u533A\uFF0C\u5373\uFF0C\u4F18\u5148\u4F7F\u7528\u66F4\u5C0F\u7684\u7A7A\u95F2\u533A

                                                                        \u5982\u4F55\u5B9E\u73B0\uFF1A\u7A7A\u95F2\u5206\u533A\u6309\u5BB9\u91CF\u9012\u589E\u6B21\u5E8F\u94FE\u63A5\uFF0C\u6BCF\u6B21\u5206\u914D\u5185\u5B58\u65F6\u987A\u5E8F\u67E5\u627E\u7A7A\u95F2\u5206\u533A\u94FE\uFF08\u6216\u7A7A\u95F2\u5206\u533A\u8868\uFF09\uFF0C\u627E\u5230\u5927\u5C0F\u80FD\u6EE1\u8DB3\u8981\u6C42\u7684\u7B2C\u4E00\u4E2A\u7A7A\u95F2\u5206\u533A\u3002

                                                                        \u66F4\u5C0F\u7684\u7A7A\u95F2\u5206\u533A\u4F1A\u79FB\u5230\u94FE\u5934\u7684\u4F4D\u7F6E\u3002

                                                                        \u7F3A\u70B9\uFF1A\u6BCF\u6B21\u90FD\u9009\u6700\u5C0F\u7684\u5206\u533A\u8FDB\u884C\u5206\u914D\uFF0C\u4F1A\u7559\u4E0B\u8D8A\u6765\u8D8A\u591A\u7684\u3001\u5F88\u5C0F\u7684\u3001\u96BE\u4EE5\u5229\u7528\u7684\u5185\u5B58\u5757\uFF0C\u56E0\u6B64\u8FD9\u79CD\u65B9\u6CD5\u4F1A\u4EA7\u751F\u5F88\u591A\u7684\u5916\u90E8\u788E\u7247

                                                                      3. \u6700\u574F\u9002\u5E94\u7B97\u6CD5

                                                                        \u548C\u6700\u4F73\u9002\u5E94\u7B97\u6CD5\u76F8\u53CD

                                                                        \u7B97\u6CD5\u601D\u60F3\uFF1A\u4F18\u5148\u4F7F\u7528\u6700\u5927\u7684\u8FDE\u7EED\u7A7A\u95F2\u533A\uFF0C\u8FD9\u6837\u5206\u914D\u540E\u5269\u4F59\u7684\u7A7A\u95F2\u533A\u5C31\u4E0D\u4F1A\u592A\u5C0F\uFF0C\u66F4\u65B9\u4FBF\u4F7F\u7528

                                                                        \u5982\u4F55\u5B9E\u73B0\uFF1A\u7A7A\u95F2\u5206\u533A\u6309\u5BB9\u91CF\u9012\u51CF\u6B21\u5E8F\u94FE\u63A5\uFF0C\u6BCF\u6B21\u5206\u914D\u5185\u5B58\u65F6\u987A\u5E8F\u67E5\u627E\u7A7A\u95F2\u5206\u533A\u94FE\uFF08\u6216\u7A7A\u95F2\u5206\u533A\u8868\uFF09\uFF0C\u627E\u5230\u5927\u5C0F\u80FD\u6EE1\u8DB3\u8981\u6C42\u7684\u7B2C\u4E00\u4E2A\u7A7A\u95F2\u5206\u533A\u3002

                                                                        \u7F3A\u70B9\uFF1A\u8FD9\u79CD\u65B9\u5F0F\u4F1A\u5BFC\u81F4\u8F83\u5927\u7684\u8FDE\u7EED\u7A7A\u95F2\u533A\u88AB\u8FC5\u901F\u7528\u5B8C\uFF0C\u5982\u679C\u4E4B\u540E\u6709\u5927\u8FDB\u7A0B\u5230\u8FBE\uFF0C\u5C31\u6CA1\u6709\u5185\u5B58\u5206\u533A\u53EF\u7528\u4E86\u3002

                                                                      4. \u90BB\u8FD1\u9002\u5E94\u7B97\u6CD5

                                                                        \u7B97\u6CD5\u601D\u60F3\uFF1A\u9996\u6B21\u9002\u5E94\u7B97\u6CD5\u6BCF\u6B21\u90FD\u4ECE\u94FE\u5934\u5F00\u59CB\u67E5\u627E\u7684\uFF0C\u8FD9\u53EF\u80FD\u4F1A\u5BFC\u81F4\u4F4E\u5730\u5740\u90E8\u5206\u51FA\u73B0\u5F88\u591A\u5C0F\u7684\u7A7A\u95F2\u5206\u533A\uFF08\u96BE\u4EE5\u5229\u7528\u7684\u5206\u533A\uFF09\uFF0C\u800C\u6BCF\u6B21\u5206\u914D\u67E5\u627E\u65F6\uFF0C\u90FD\u8981\u7ECF\u8FC7\u8FD9\u4E9B\u5206\u533A\uFF0C\u56E0\u6B64\u4E5F\u589E\u52A0\u4E86\u67E5\u627E\u7684\u5F00\u9500\uFF0C\u5982\u679C\u6BCF\u6B21\u90FD\u4ECE\u4E0A\u6B21\u67E5\u627E\u7ED3\u675F\u7684\u4F4D\u7F6E\u5F00\u59CB\u68C0\u7D22\uFF0C\u5C31\u80FD\u89E3\u51B3\u4E0A\u8FF0\u95EE\u9898\u3002

                                                                      \u57FA\u672C\u5206\u9875\u5B58\u50A8\u7BA1\u7406

                                                                      \u4ECB\u7ECD
                                                                      1. \u8FDE\u7EED\u5206\u914D\u65B9\u5F0F\u7684\u7F3A\u70B9\uFF1A

                                                                        \u56FA\u5B9A\u5206\u533A\u5206\u914D\uFF0C\u4F1A\u4EA7\u751F\u5927\u91CF\u7684\u5185\u90E8\u788E\u7247\uFF0C\u5185\u5B58\u7684\u5229\u7528\u7387\u5F88\u4F4E

                                                                        \u52A8\u6001\u5206\u533A\u5206\u914D\uFF0C\u4F1A\u4EA7\u751F\u5F88\u591A\u5916\u90E8\u788E\u7247

                                                                        \u5982\u679C\u5141\u8BB8\u5C06\u4E00\u4E2A\u8FDB\u7A0B\u5206\u6563\u5730\u88C5\u5165\u5230\u8BB8\u591A\u4E0D\u76F8\u90BB\u7684\u5206\u533A\u4E2D\uFF0C\u4FBF\u53EF\u5145\u5206\u5730\u5229\u7528\u5185\u5B58\uFF0C\u800C\u65E0\u9700\u518D\u8FDB\u884C\u201C\u7D27\u51D1\u201D\uFF08\u5185\u5B58\u6574\u7406\uFF09

                                                                      2. \u975E\u8FDE\u7EED\u5206\u914D\u7BA1\u7406\u65B9\u5F0F

                                                                        • \u57FA\u672C\u5206\u9875\u5B58\u50A8\u7BA1\u7406
                                                                        • \u57FA\u672C\u5206\u6BB5\u5B58\u50A8\u7BA1\u7406
                                                                        • \u6BB5\u9875\u5F0F\u5B58\u50A8\u7BA1\u7406
                                                                      3. \u57FA\u672C\u5206\u9875\u5B58\u50A8\u7BA1\u7406\u7684\u601D\u60F3\uFF1A

                                                                        \u628A\u5185\u5B58\u5206\u4E3A\u4E00\u4E2A\u4E2A\u76F8\u7B49\u7684\u5C0F\u5206\u533A\uFF0C\u518D\u6309\u7167\u5206\u533A\u5927\u5C0F\u628A\u8FDB\u7A0B\u62C6\u5206\u6210\u4E00\u4E2A\u4E2A\u5C0F\u90E8\u5206

                                                                      4. \u5C06\u5185\u5B58\u7A7A\u95F4\u5206\u4E3A\u4E00\u4E2A\u4E2A\u5927\u5C0F\u76F8\u7B49\u7684\u5206\u533A\uFF0C\u6BCF\u4E2A\u5206\u533A\u5C31\u662F\u4E00\u4E2A\u201C\u9875\u6846\u201D\u6216\u9875\u5E27\u3002

                                                                        \u6BCF\u4E2A\u9875\u6846\u6709\u4E00\u4E2A\u7F16\u53F7\uFF0C\u5373\u9875\u6846\u53F7\u3002\u9875\u6846\u53F7\u4ECE0\u5F00\u59CB\u3002

                                                                        \u628A\u7528\u6237\u8FDB\u7A0B\u7684\u5730\u5740\u7A7A\u95F4\u4E5F\u5206\u4E3A\u4E0E\u9875\u6846\u5927\u5C0F\u76F8\u7B49\u7684\u4E00\u4E2A\u4E2A\u533A\u57DF\uFF0C\u79F0\u4E3A\u9875\u6216\u9875\u9762\uFF0C\u6BCF\u4E2A\u9875\u9762\u4E5F\u6709\u4E00\u4E2A\u7F16\u53F7\uFF0C\u5373\u201C\u9875\u53F7\u201D\uFF0C\u9875\u53F7\u4E5F\u662F\u4ECE0\u5F00\u59CB

                                                                        \u4E5F\u5C31\u662F\u9875\u6216\u9875\u9762\u662F\u8FDB\u7A0B\u5206\u7684\uFF0C\u9875\u6846\u6216\u8005\u8BF4\u9875\u5E27\u662F\u5185\u5B58\u5206\u7684\u3002

                                                                        \u6CE8\uFF1A\u8FDB\u7A0B\u7684\u6700\u540E\u4E00\u4E2A\u9875\u9762\u53EF\u80FD\u6CA1\u6709\u4E00\u4E2A\u9875\u6846\u90A3\u4E48\u5927\uFF0C\u56E0\u6B64\uFF0C\u9875\u6846\u4E0D\u80FD\u592A\u5927\uFF0C\u5426\u5219\u53EF\u80FD\u4EA7\u751F\u8FC7\u5927\u7684\u5185\u90E8\u788E\u7247

                                                                        \u64CD\u4F5C\u7CFB\u7EDF\u4EE5\u9875\u6846\u4E3A\u5355\u4F4D\uFF0C\u4E3A\u5404\u4E2A\u8FDB\u7A0B\u5206\u914D\u5185\u5B58\u7A7A\u95F4\uFF0C\u8FDB\u7A0B\u7684\u6BCF\u4E2A\u9875\u9762\u5206\u522B\u653E\u5165\u4E00\u4E2A\u9875\u6846\u4E2D\uFF0C\u4E5F\u5C31\u662F\u8BF4\uFF0C\u8FDB\u7A0B\u7684\u9875\u9762\u4E0E\u5185\u5B58\u7684\u9875\u6846\u6709\u4E00\u4E00\u5BF9\u5E94\u7684\u5173\u7CFB\u3002

                                                                        \u8FDB\u7A0B\u7684\u5404\u4E2A\u9875\u9762\u4E0D\u5FC5\u8FDE\u7EED\u5B58\u653E\uFF0C\u4E5F\u4E0D\u5FC5\u6309\u7167\u5148\u540E\u987A\u5E8F\u6765\uFF0C\u53EF\u4EE5\u653E\u5230\u4E0D\u76F8\u90BB\u7684\u5404\u4E2A\u9875\u6846\u4E2D\u3002

                                                                      5. \u5982\u4F55\u5B9E\u73B0\u903B\u8F91\u5730\u5740\u5230\u7269\u7406\u5730\u5740\u7684\u8F6C\u6362\uFF1F

                                                                        • \u8981\u7B97\u51FA\u903B\u8F91\u5730\u5740\u5BF9\u5E94\u7684\u9875\u53F7----\u903B\u8F91\u5730\u5740 / \u9875\u9762\u5927\u5C0F
                                                                        • \u8981\u77E5\u9053\u8BE5\u9875\u53F7\u5BF9\u5E94\u9875\u9762\u518D\u5185\u5B58\u4E2D\u7684\u8D77\u59CB\u5730\u5740----\u5F97\u5230\u9875\u53F7\u4E4B\u540E\uFF0C\u6839\u636E\u9875\u8868\u7684\u8868\u9879\uFF0C\u627E\u5230\u5757\u53F7\uFF0C\u5757\u53F7 * \u5185\u5B58\u5757\u5927\u5C0F\uFF0C\u5F97\u5230\u5BF9\u5E94\u9875\u9762\u5728\u5185\u5B58\u4E2D\u7684\u8D77\u59CB\u5730\u5740\u3002
                                                                        • \u8981\u7B97\u51FA\u903B\u8F91\u5730\u5740\u5728\u201C\u9875\u9762\u5185\u201D\u7684\u504F\u79FB\u91CF----\u903B\u8F91\u5730\u5740 % \u9875\u9762\u5927\u5C0F
                                                                        • \u7269\u7406\u5730\u5740 = \u9875\u9762\u5730\u5740 + \u9875\u5185\u504F\u79FB\u91CF
                                                                      6. \u4E3A\u4E86\u80FD\u76F4\u5230\u8FDB\u7A0B\u7684\u6BCF\u4E2A\u9875\u9762\u5728\u5185\u5B58\u4E2D\u5B58\u653E\u7684\u8D77\u59CB\u4F4D\u7F6E\uFF0C\u64CD\u4F5C\u7CFB\u7EDF\u8981\u4E3A\u6BCF\u4E2A\u8FDB\u7A0B\u5EFA\u7ACB\u4E00\u5F20\u9875\u8868\u3002

                                                                        \u9875\u9762\u5185\u7684\u5730\u5740\u662F\u8FDE\u7EED\u7684\uFF0C\u5404\u9875\u9762\u4E4B\u95F4\u662F\u79BB\u6563\u7684\u3002

                                                                        \u4E00\u4E2A\u8FDB\u7A0B\u5BF9\u5E94\u4E00\u5F20\u9875\u8868

                                                                        \u4E00\u4E2A\u8FDB\u7A0B\u7684\u6BCF\u4E00\u4E2A\u9875\u9762\uFF0C\u5BF9\u5E94\u4E00\u4E2A\u9875\u8868\u9879

                                                                        \u6BCF\u4E2A\u9875\u8868\u9879\u7531\u9875\u53F7\u548C\u5757\u53F7\u7EC4\u6210

                                                                        \u9875\u8868\u8BB0\u5F55\u8FDB\u7A0B\u9875\u9762\u548C**\u5B9E\u9645\u5B58\u653E\u7684\u5185\u5B58\u5757\uFF08\u5757\u53F7\uFF09**\u4E4B\u95F4\u7684\u5BF9\u5E94\u5173\u7CFB\uFF01\uFF01

                                                                        image-20211220175427142

                                                                        M\u53F7\u5185\u5B58\u5757\u7684\u8D77\u59CB\u5730\u5740\u5C31\u662FM * \u5185\u5B58\u5757\u5927\u5C0F

                                                                        \u5404\u5757\u4E4B\u95F4\u662F\u79BB\u6563\u7684\uFF0C\u4F46\u662F\u6BCF\u4E00\u5757\u5185\u662F\u8FDE\u7EED\u7684\u3002

                                                                      \u57FA\u672C\u5730\u5740\u53D8\u6362\u673A\u6784
                                                                      1. \u57FA\u672C\u5730\u5740\u53D8\u6362\u673A\u6784---\u7528\u4E8E\u5B9E\u73B0\u903B\u8F91\u5730\u5740\u5230\u7269\u7406\u5730\u5740\u8F6C\u6362\u7684\u4E00\u7EC4\u786C\u4EF6\u673A\u6784\u3002

                                                                        \u9875\u8868\u5BC4\u5B58\u5668\u7684\u4F5C\u7528\uFF1A

                                                                        • \u5B58\u653E\u9875\u8868\u8D77\u59CB\u5730\u5740
                                                                        • \u5B58\u653E\u9875\u8868\u957F\u5EA6
                                                                      2. image-20211220183023318

                                                                      \u5177\u6709\u5FEB\u8868\u7684\u5730\u5740\u53D8\u6362\u673A\u6784
                                                                      1. \u65F6\u95F4\u5C40\u90E8\u6027\uFF1A

                                                                        \u5982\u679C\u6267\u884C\u4E86\u7A0B\u5E8F\u4E2D\u7684\u67D0\u6761\u6307\u4EE4\uFF0C\u90A3\u4E48\u4E0D\u4E45\u540E\u8FD9\u6761\u6307\u4EE4\u5F88\u53EF\u80FD\u518D\u6B21\u6267\u884C\uFF1B\u5982\u679C\u67D0\u4E2A\u6570\u636E\u88AB\u8BBF\u95EE\u8FC7\uFF0C\u4E0D\u4E45\u4E4B\u540E\u8BE5\u6570\u636E\u5F88\u53EF\u80FD\u518D\u6B21\u88AB\u8BBF\u95EE

                                                                        \u7A7A\u95F4\u5C40\u90E8\u6027\uFF1A

                                                                        \u4E00\u65E6\u7A0B\u5E8F\u8BBF\u95EE\u4E86\u67D0\u4E2A\u5B58\u50A8\u5355\u5143\uFF0C\u5728\u4E0D\u4E45\u4E4B\u540E\uFF0C\u5176\u9644\u8FD1\u7684\u5B58\u50A8\u5355\u5143\u4E5F\u5F88\u6709\u53EF\u80FD\u88AB\u8BBF\u95EE\uFF08\u56E0\u4E3A\u5F88\u591A\u6570\u636E\u5728\u5185\u5B58\u4E2D\u90FD\u662F\u8FDE\u7EED\u5B58\u653E\u7684\u3002 \uFF09

                                                                      2. \u6BCF\u6B21\u8981\u8BBF\u95EE\u4E00\u4E2A\u903B\u8F91\u5730\u5740\uFF0C\u90FD\u9700\u8981\u67E5\u8BE2\u5185\u5B58\u4E2D\u7684\u9875\u8868\uFF08\u6839\u636E\u903B\u8F91\u5730\u5740\u53EF\u4EE5\u5F97\u5230\u9875\u53F7\u548C\u9875\u5185\u504F\u79FB\u91CF\uFF0C\u6839\u636E\u9875\u53F7\u3001\u9875\u8868\u8D77\u59CB\u5730\u5740\u548C\u9875\u8868\u9879\u957F\u5EA6\uFF0C\u53EF\u4EE5\u5F97\u5230\u9875\u53F7\u5BF9\u5E94\u7684\u9875\u8868\u9879\u5730\u5740\uFF0C\u5F97\u5230\u9875\u53F7\u5BF9\u5E94\u7684\u5185\u5B58\u5757\u53F7\uFF0C\u6839\u636E\u5185\u5B58\u5757\u53F7\u548C\u9875\u9762\u5927\u5C0F\u5373\u6BCF\u4E00\u4E2A\u5185\u5B58\u5757\u7684\u5927\u5C0F\uFF0C\u53EF\u4EE5\u5F97\u5230\u8BE5\u5185\u5B58\u5757\u5728\u5185\u5B58\u4E2D\u7684\u8D77\u59CB\u5730\u5740\uFF0C\u6839\u636E\u8D77\u59CB\u5730\u5740\u548C\u504F\u79FB\u91CF\u4FBF\u53EF\u4EE5\u5F97\u5230\u7269\u7406\u5730\u5740\uFF09\u3002

                                                                        \u7531\u4E8E\u5C40\u90E8\u6027\u539F\u7406\uFF0C\u53EF\u80FD\u8FDE\u7EED\u5F88\u591A\u6B21\u67E5\u5230\u7684\u90FD\u662F\u540C\u4E00\u4E2A\u9875\u8868\u9879\u5730\u5740\u3002\u65E2\u7136\u5982\u6B64\uFF0C\u80FD\u5426\u5229\u7528\u8FD9\u4E2A\u7279\u6027\u51CF\u5C11\u8BBF\u95EE\u9875\u8868\u7684\u6B21\u6570\u5462\uFF1F

                                                                      3. \u5FEB\u8868\uFF0C\u53C8\u79F0TLB\u5373\u8054\u60F3\u5BC4\u5B58\u5668\uFF0C\u662F\u4E00\u79CD\u8BBF\u95EE\u901F\u5EA6\u6BD4\u5185\u5B58\u5FEB\u5F88\u591A\u7684\u9AD8\u901F\u7F13\u51B2\u5B58\u50A8\u5668\uFF0C\u7528\u6765\u5B58\u653E\u5F53\u524D\u8BBF\u95EE\u7684\u82E5\u5E72\u9875\u8868\u9879\uFF0C\u4EE5\u52A0\u901F\u5730\u5740\u53D8\u6362\u7684\u8FC7\u7A0B\uFF0C\u4E0E\u6B64\u5BF9\u5E94\uFF0C\u5185\u5B58\u4E2D\u7684\u9875\u8868\u5E38\u79F0\u4E3A\u6162\u8868\u3002

                                                                        \u9875\u53F7\u3001\u9875\u8868\u8D77\u59CB\u5730\u5740\u548C\u9875\u8868\u9879\u5927\u5C0F\u53EF\u4EE5\u5F97\u5230\u9875\u53F7P\u5BF9\u5E94\u7684\u9875\u8868\u9879\u5730\u5740\uFF01

                                                                      4. \u5728\u67E5\u8BE2\u6162\u8868\u5373\u5185\u5B58\u4E2D\u7684\u9875\u8868\u4E4B\u524D\uFF0C\u4F1A\u5148\u67E5\u8BE2\u5FEB\u8868\uFF0C\u7406\u89E3\u4E3A\u7F13\u5B58

                                                                        image-20211220184619310

                                                                        \u82E5\u5FEB\u8868\u547D\u4E2D\uFF0C\u5C31\u4E0D\u9700\u8981\u518D\u8BBF\u95EE\u5185\u5B58\u4E86\uFF0C\u67E5\u8BE2\u5FEB\u8868\u6BD4\u5185\u5B58\u5FEB

                                                                      5. \u5F15\u5165\u5FEB\u8868\u540E\uFF0C\u5730\u5740\u7684\u53D8\u6362\u8FC7\u7A0B

                                                                        image-20211220184944890

                                                                      6. \u7531\u4E8E\u67E5\u8BE2\u5FEB\u8868\u7684\u901F\u5EA6\u6BD4\u67E5\u8BE2\u9875\u8868\uFF08\u6162\u8868\uFF09\u7684\u901F\u5EA6\u5FEB\u5F88\u591A\uFF0C\u56E0\u6B64\u53EA\u8981\u5FEB\u8868\u547D\u4E2D\uFF0C\u5C31\u53EF\u4EE5\u8282\u7701\u5F88\u591A\u65F6\u95F4\uFF0C\u7531\u4E8E\u5C40\u90E8\u6027\u539F\u7406\uFF0C\u4E00\u822C\u6765\u8BF4\u5FEB\u8868\u7684\u547D\u4E2D\u7387\u53EF\u4EE5\u8FBE\u523090%\u4EE5\u4E0A\u3002

                                                                      7. \u5BF9\u6BD4

                                                                        image-20211220185327397

                                                                      \u4E24\u7EA7\u9875\u8868
                                                                      1. \u5355\u7EA7\u9875\u8868\u5B58\u5728\u7684\u95EE\u9898

                                                                        • \u95EE\u98981\uFF1A\u9875\u8868\u5FC5\u987B\u8FDE\u7EED\u5B58\u653E\uFF0C\u56E0\u6B64\u5F53\u9875\u8868\u5F88\u5927\u65F6\uFF0C\u9700\u8981\u5360\u7528\u5F88\u591A\u4E2A\u8FDE\u7EED\u7684\u9875\u6846---\u91C7\u7528\u4E24\u7EA7\u9875\u8868\u89E3\u51B3
                                                                        • \u95EE\u98982\uFF1A\u6CA1\u6709\u5FC5\u8981\u8BA9\u6574\u4E2A\u9875\u8868\u5E38\u9A7B\u5185\u5B58\uFF0C\u56E0\u4E3A\u8FDB\u7A0B\u5728\u4E00\u6BB5\u65F6\u95F4\u5185\u53EF\u80FD\u53EA\u9700\u8BBF\u95EE\u67D0\u51E0\u4E2A\u7279\u5B9A\u7684\u9875\u9762\u3002

                                                                        \u6211\u4EEC\u662F\u5982\u4F55\u89E3\u51B3\u8FDB\u7A0B\u5728\u5185\u5B58\u4E2D\u5FC5\u987B\u8FDE\u7EED\u5B58\u50A8\u7684\u95EE\u9898\u7684\uFF1F

                                                                        \u5C06\u4E00\u4E2A\u8FDB\u7A0B\u5206\u6563\u5730\u88C5\u5165\u5230\u8BB8\u591A\u4E0D\u76F8\u90BB\u7684\u5206\u533A\u4E2D\uFF0C\u4FBF\u53EF\u5145\u5206\u5730\u5229\u7528\u5185\u5B58

                                                                        \u540C\u6837\uFF0C\u6211\u4EEC\u53EF\u4EE5\u5C06\u5F88\u957F\u7684\u9875\u8868\u5206\u7EC4\uFF0C\u4F7F\u6BCF\u4E00\u4E2A\u5185\u5B58\u5757\u521A\u597D\u53EF\u4EE5\u653E\u5165\u4E00\u4E2A\u5206\u7EC4\uFF0C\u4E4B\u524D\u662F\u5C06\u8FDB\u7A0B\u5206\u6210\u5F88\u591A\u4E2A\u9875\u9762\uFF0C\u76F8\u5F53\u4E8E\u5C06\u8FDB\u7A0B\u5206\u7EC4\uFF0C\u73B0\u5728\u9875\u8868\u592A\u957F\u4E86\uFF0C\u90A3\u4E48\u5C31\u5C06\u9875\u8868\u5206\u7EC4\u3002

                                                                        \u53E6\u5916\uFF0C\u8981\u4E3A\u79BB\u6563\u5206\u914D\u7684\u9875\u8868\u518D\u5EFA\u7ACB\u4E00\u5F20\u9875\u8868\uFF0C\u79F0\u4E3A\u9875\u76EE\u5F55\u8868\uFF0C\u6216\u79F0\u5916\u5C42\u9875\u8868\uFF0C\u6216\u79F0\u9876\u5C42\u9875\u8868\u3002

                                                                        \u901A\u8FC7\u9875\u76EE\u5F55\u8868\u548C\u9875\u53F7\uFF0C\u627E\u5230\u5185\u5B58\u5757\u53F7\uFF0C\u901A\u8FC7\u6B64\u5185\u5B58\u5757\u53F7\u5F97\u5230\u6B64\u5185\u5B58\u5757\u5BF9\u5E94\u7684\u4E8C\u7EA7\u9875\u8868\u7684\u8D77\u59CB\u5730\u5740

                                                                      2. \u6162\u8868\u4E5F\u5C31\u662F\u5185\u5B58\u4E2D\u7684\u9875\u8868\uFF0C\u5F53\u7136\u662F\u5B58\u50A8\u5728\u5185\u5B58\u4E2D\u7684\uFF0C\u9875\u8868\u8D77\u59CB\u5730\u5740\u548C\u9875\u8868\u957F\u5EA6\u5B58\u5728\u9875\u8868\u5BC4\u5B58\u5668\u4E2D\uFF0C\u8FDB\u7A0B\u8FD0\u884C\u7684\u65F6\u5019\u5B58\u50A8\u5728\u9875\u8868\u5BC4\u5B58\u5668\u4E2D\uFF0C\u6CA1\u6709\u88ABCPU\u6267\u884C\u7684\u65F6\u5019\uFF0C\u5B58\u50A8\u5728PCB\u4E2D\uFF0C\u6240\u4EE5\u9875\u8868\u5B58\u50A8\u5728\u5185\u5B58\u4E2D\uFF0C\u5F53\u7136\u6D89\u53CA\u5230\u8D77\u59CB\u5730\u5740\uFF0C\u8FD9\u4E2A\u5730\u5740\u5B58\u50A8\u5728\u9875\u8868\u5BC4\u5B58\u5668\u3002

                                                                        \u5FEB\u8868\u4E0D\u662F\u5B58\u50A8\u5728\u5185\u5B58\u4E2D\u7684\uFF0C\u8BBF\u95EE\u5FEB\u8868\u7684\u901F\u5EA6\u6BD4\u5185\u5B58\u5FEB\u5F88\u591A\uFF0C\u662F\u9AD8\u901F\u7F13\u51B2\u5B58\u50A8\u5668\u3002

                                                                      3. \u95EE\u98982\u7684\u89E3\u51B3\uFF1A

                                                                        \u53EF\u4EE5\u5728\u9700\u8981\u8BBF\u95EE\u9875\u9762\u65F6\u624D\u628A\u9875\u9762\u8C03\u5165\u5185\u5B58\uFF08\u865A\u62DF\u5B58\u50A8\u6280\u672F\uFF0C\u9875\u9762\u662F\u7531\u8FDB\u7A0B\u5206\u5272\u800C\u6765\u7684\uFF0C\u628A\u8FDB\u7A0B\u5206\u6210\u5F88\u591A\u4E2A\u90E8\u5206\uFF09\uFF0C\u76F8\u5F53\u4E8E\u9700\u8981\u8FDB\u7A0B\u67D0\u4E2A\u90E8\u5206\u65F6\uFF0C\u624D\u628A\u8FD9\u90E8\u5206\u8C03\u5165\u5185\u5B58\uFF0C\u8FDB\u7A0B\u5206\u7684\u90E8\u5206\u5C31\u53EB\u9875\u9762\uFF0C\u5185\u5B58\u5206\u7684\u90E8\u5206\u5C31\u53EB\u9875\u6846\uFF0C\u53EF\u4EE5\u5728\u9875\u8868\u9879\u4E2D\u589E\u52A0\u4E00\u4E2A\u6807\u5FD7\u4F4D\uFF0C\u7528\u4E8E\u8868\u793A\u8BE5\u9875\u9762\u662F\u5426\u5DF2\u7ECF\u8C03\u5165\u5185\u5B58\u3002

                                                                        \u82E5\u60F3\u8BBF\u95EE\u7684\u9875\u9762\u4E0D\u5728\u5185\u5B58\u4E2D\uFF0C\u5219\u4EA7\u751F\u7F3A\u9875\u4E2D\u65AD\uFF08\u5185\u4E2D\u65AD\uFF0C\u5185\u4E2D\u65AD\u5206\u4E3A\u81EA\u613F\u4E2D\u65AD\u3001\u786C\u4EF6\u6545\u969C\u3001\u8F6F\u4EF6\u4E2D\u65AD\uFF09\uFF0C\u7136\u540E\u5C06\u76EE\u6807\u9875\u9762\u4ECE\u5916\u5B58\u8C03\u5165\u5185\u5B58\u3002

                                                                      4. \u4E24\u7EA7\u9875\u8868\u7684\u8BBF\u5B58\u6B21\u6570\u5206\u6790\uFF1A\uFF08\u5047\u8BBE\u6CA1\u6709\u5FEB\u8868\u673A\u6784\uFF09

                                                                        • \u7B2C\u4E00\u6B21\u8BBF\u5B58\uFF1A\u8BBF\u95EE\u5185\u5B58\u4E2D\u7684\u9875\u76EE\u5F55\u8868
                                                                        • \u7B2C\u4E8C\u6B21\u8BBF\u5B58\uFF1A\u8BBF\u95EE\u5185\u5B58\u4E2D\u7684\u4E8C\u7EA7\u9875\u8868
                                                                        • \u7B2C\u4E09\u6B21\u8BBF\u5B58\uFF1A\u8BBF\u95EE\u76EE\u6807\u5185\u5B58\u5355\u5143
                                                                      5. \u5982\u4F55\u5B9E\u73B0\u5730\u5740\u53D8\u6362

                                                                        • \u6309\u7167\u5730\u5740\u7ED3\u6784\u5C06\u903B\u8F91\u5730\u5740\u5206\u4E3A\u4E09\u90E8\u5206
                                                                        • \u4ECEPCB\u4E2D\u8BFB\u51FA\u9875\u76EE\u5F55\u8868\u8D77\u59CB\u5730\u5740\uFF08\u9875\u76EE\u5F55\u8868\u4E5F\u662F\u5728\u5185\u5B58\u4E2D\u7684\uFF0C\u5F53\u7136\u6709\u8D77\u59CB\u5730\u5740\uFF09\uFF0C\u6839\u636E\u4E00\u7EA7\u9875\u53F7\u67E5\u627E\u5230\u5757\u53F7\uFF0C\u6839\u636E\u5185\u5B58\u5757\u53F7\u627E\u5230\u4E0B\u4E00\u7EA7\u9875\u8868\u5728\u5185\u5B58\u4E2D\u7684\u5B58\u653E\u4F4D\u7F6E\uFF08\u8D77\u59CB\u5730\u5740\uFF09
                                                                        • \u6839\u636E\u4E8C\u7EA7\u9875\u53F7\u67E5\u8868\uFF0C\u627E\u5230\u6700\u7EC8\u60F3\u8BBF\u95EE\u7684\u5185\u5B58\u5757\u53F7
                                                                        • \u7ED3\u5408\u9875\u5185\u504F\u79FB\u91CF\u5F97\u5230\u7269\u7406\u5730\u5740\u3002

                                                                      \u57FA\u672C\u5206\u6BB5\u5B58\u50A8\u7BA1\u7406

                                                                      \u4ECB\u7ECD
                                                                      1. \u5206\u6BB5\uFF1A

                                                                        \u8FDB\u7A0B\u7684\u5730\u5740\u7A7A\u95F4\uFF0C\u6309\u7167\u7A0B\u5E8F\u81EA\u8EAB\u7684\u903B\u8F91\u5173\u7CFB\u5212\u5206\u4E3A\u82E5\u5E72\u4E2A\u6BB5\uFF0C\u6BCF\u4E2A\u6BB5\u90FD\u6709\u4E00\u4E2A\u6BB5\u540D

                                                                      2. \u5185\u5B58\u5206\u914D\u89C4\u5219\uFF1A\u4EE5\u6BB5\u4E3A\u5355\u4F4D\u8FDB\u884C\u5206\u914D\uFF0C\u6BCF\u4E2A\u6BB5\u5728\u5185\u5B58\u4E2D\u5360\u636E\u8FDE\u7EED\u7A7A\u95F4\uFF0C\u4F46\u5404\u6BB5\u4E4B\u95F4\u53EF\u4EE5\u4E0D\u76F8\u90BB

                                                                      3. \u5206\u6BB5\u7CFB\u7EDF\u7684\u903B\u8F91\u5730\u5740\u7ED3\u6784\u7531\u6BB5\u53F7\uFF08\u6BB5\u540D\uFF09\u548C\u6BB5\u5185\u5730\u5740\uFF08\u6BB5\u5185\u504F\u79FB\u91CF\uFF09\u7EC4\u6210

                                                                        \u6BB5\u53F7\u7684\u4F4D\u6570\u51B3\u5B9A\u4E86\u6BCF\u4E2A\u8FDB\u7A0B\u6700\u591A\u53EF\u4EE5\u5206\u4E3A\u51E0\u4E2A\u6BB5

                                                                        \u6BB5\u5185\u5730\u5740\u4F4D\u6570\u51B3\u5B9A\u4E86\u6BCF\u4E2A\u6BB5\u7684\u6700\u5927\u957F\u5EA6\u662F\u591A\u5C11

                                                                      4. \u64CD\u4F5C\u7CFB\u7EDF\u9700\u8981\u4E3A\u6BCF\u4E2A\u8FDB\u7A0B\u5EFA\u7ACB\u4E00\u5F20\u6BB5\u6620\u5C04\u8868\uFF0C\u7B80\u79F0\u6BB5\u8868

                                                                      5. \u5728\u5206\u9875\u5B58\u50A8\u7BA1\u7406\u5F53\u4E2D\uFF0C\u6BCF\u4E2A\u9875\u9762\u7684\u957F\u5EA6\u90FD\u662F\u4E00\u6837\u7684\uFF0C\u4F46\u662F\u5206\u6BB5\u5B58\u50A8\u7BA1\u7406\u4E2D\uFF0C\u6BCF\u4E2A\u6BB5\u7684\u957F\u5EA6\u662F\u4E0D\u4E00\u6837\u7684\uFF0C\u6240\u4EE5\u6BB5\u8868\u9879\u6BD4\u9875\u8868\u9879\u591A\u4E86\u4E00\u4E2A\u6BB5\u957F

                                                                      6. \u6BCF\u4E2A\u6BB5\u5BF9\u5E94\u4E00\u4E2A\u6BB5\u8868\u9879\uFF0C\u5C31\u50CF\u4E00\u4E2A\u8FDB\u7A0B\u5BF9\u5E94\u4E8E\u4E00\u4E2A\u9875\u8868\uFF0C\u8FDB\u7A0B\u7684\u6BCF\u4E00\u9875\u5BF9\u5E94\u4E8E\u4E00\u4E2A\u9875\u8868\u9879\uFF01\uFF01

                                                                        \u4E00\u4E2A\u6BB5\u8868\u9879\uFF0C\u8BB0\u5F55\u4E86\u8BE5\u6BB5\u5728\u5185\u5B58\u4E2D\u7684\u8D77\u59CB\u4F4D\u7F6E\uFF08\u57FA\u5740\uFF09\u548C\u6BB5\u7684\u957F\u5EA6

                                                                      7. \u5404\u4E2A\u6BB5\u8868\u9879\u548C\u5404\u4E2A\u9875\u8868\u9879\u7684\u957F\u5EA6\u662F\u76F8\u540C\u7684\u3002

                                                                        \u56E0\u6B64\u6BB5\u53F7\u548C\u9875\u53F7\u53EF\u4EE5\u662F\u9690\u542B\u7684\uFF0C\u4E0D\u5360\u5B58\u50A8\u7A7A\u95F4\u3002

                                                                      8. \u5730\u5740\u53D8\u6362\u7684\u8FC7\u7A0B\uFF1A

                                                                        image-20211220210600944

                                                                      9. \u5206\u9875\u7684\u4E3B\u8981\u76EE\u7684\u662F\u4E3A\u4E86\u5B9E\u73B0\u79BB\u6563\u5206\u914D\uFF0C\u63D0\u9AD8\u5185\u5B58\u5229\u7528\u7387\uFF0C\u5206\u9875\u4EC5\u4EC5\u662F\u7CFB\u7EDF\u7BA1\u7406\u4E0A\u7684\u9700\u8981\uFF0C\u5B8C\u5168\u662F\u7CFB\u7EDF\u884C\u4E3A\uFF0C\u5BF9\u7528\u6237\u662F\u4E0D\u53EF\u89C1\u7684\u3002

                                                                        \u5206\u6BB5\u7684\u4E3B\u8981\u76EE\u7684\u662F\u4E3A\u4E86\u66F4\u597D\u5730\u6EE1\u8DB3\u7528\u6237\u9700\u6C42\uFF0C\u4E00\u4E2A\u6BB5\u901A\u5E38\u5305\u542B\u7740\u4E00\u7EC4\u5C5E\u4E8E\u4E00\u4E2A\u903B\u8F91\u6A21\u5757\u7684\u4FE1\u606F\uFF0C\u5206\u6BB5\u5BF9\u7528\u6237\u662F\u53EF\u89C1\u7684\uFF0C\u7528\u6237\u7F16\u7A0B\u65F6\u9700\u8981\u663E\u5F0F\u5730\u7ED9\u51FA\u6BB5\u540D\u3002

                                                                        \u9875\u7684\u5927\u5C0F\u56FA\u5B9A\uFF0C\u6BB5\u7684\u957F\u5EA6\u4E0D\u56FA\u5B9A\uFF0C\u51B3\u5B9A\u4E8E\u7528\u6237\u7F16\u5199\u7684\u7A0B\u5E8F\u3002

                                                                      10. \u4E0D\u80FD\u88AB\u4FEE\u6539\u7684\u4EE3\u7801\u79F0\u4E3A\u7EAF\u4EE3\u7801\u6216\u53EF\u91CD\u5165\u4EE3\u7801\uFF0C\u4E0D\u5C5E\u4E8E\u4E34\u754C\u8D44\u6E90\uFF0C\u8FD9\u6837\u7684\u4EE3\u7801\u662F\u53EF\u4EE5\u5171\u4EAB\u7684\uFF0C\u76F8\u5F53\u4E8E\u53EA\u8BFB\u3002

                                                                        \u53EF\u4FEE\u6539\u7684\u4EE3\u7801\u662F\u4E0D\u80FD\u5171\u4EAB\u7684

                                                                        \u5206\u6BB5\u6BD4\u5206\u9875\u66F4\u5BB9\u6613\u5B9E\u73B0\u4FE1\u606F\u7684\u5171\u4EAB\u548C\u4FDD\u62A4\u3002

                                                                      11. \u4E0E\u5206\u9875\u7CFB\u7EDF\u7C7B\u4F3C\uFF0C\u5206\u6BB5\u7CFB\u7EDF\u4E2D\u9875\u53EF\u4EE5\u5F15\u5165\u5FEB\u8868\u673A\u6784\uFF0C\u5C06\u8FD1\u671F\u8BBF\u95EE\u8FC7\u7684\u6BB5\u8868\u9879\u653E\u5230\u5FEB\u8868\u4E2D

                                                                      \u6BB5\u9875\u5F0F\u7BA1\u7406\u65B9\u5F0F

                                                                      1. \u5206\u9875\u3001\u5206\u6BB5\u7684\u4F18\u7F3A\u70B9\u5206\u6790

                                                                        \u7F3A\u70B9\u4F18\u70B9
                                                                        \u5206\u9875\u7BA1\u7406\u4E0D\u65B9\u4FBF\u6309\u7167\u903B\u8F91\u6A21\u5757\u5B9E\u73B0\u4FE1\u606F\u7684\u5171\u4EAB\u548C\u4FDD\u62A4\u5185\u5B58\u7A7A\u95F4\u5229\u7528\u7387\u9AD8\uFF0C\u4E0D\u4F1A\u4EA7\u751F\u5916\u90E8\u788E\u7247\uFF0C\u53EA\u6709\u5C11\u91CF\u7684\u5185\u90E8\u788E\u7247
                                                                        \u5206\u6BB5\u7BA1\u7406\u5982\u679C\u6BB5\u957F\u8FC7\u5927\uFF0C\u4E3A\u5176\u5206\u914D\u5F88\u5927\u7684\u8FDE\u7EED\u7A7A\u95F4\u4F1A\u5F88\u4E0D\u65B9\u4FBF\uFF0C\u53E6\u5916\uFF0C\u6BB5\u5F0F\u7BA1\u7406\u4F1A\u4EA7\u751F\u5916\u90E8\u788E\u7247\u5F88\u65B9\u4FBF\u6309\u7167\u903B\u8F91\u6A21\u5757\u5B9E\u73B0\u4FE1\u606F\u7684\u5171\u4EAB\u548C\u4FDD\u62A4
                                                                      2. image-20211220212626340

                                                                      3. \u5206\u6BB5\u7CFB\u7EDF\u7684\u903B\u8F91\u5730\u5740\u7ED3\u6784\u7531\u6BB5\u53F7\u548C\u6BB5\u5185\u5730\u5740\uFF08\u6BB5\u5185\u504F\u79FB\u91CF\uFF09\u7EC4\u6210

                                                                        image-20211220212723931

                                                                        \u6BB5\u9875\u5F0F\u7CFB\u7EDF\u7684\u903B\u8F91\u5730\u5740\u7ED3\u6784\u7531\u6BB5\u53F7\u3001\u9875\u53F7\u3001\u9875\u5185\u5730\u5740\uFF08\u9875\u5185\u504F\u79FB\u91CF\uFF09\u7EC4\u6210

                                                                        image-20211220212746790

                                                                        \u6BB5\u53F7\u7684\u4F4D\u6570\u51B3\u5B9A\u4E86\u6BCF\u4E2A\u8FDB\u7A0B\u6700\u591A\u53EF\u4EE5\u5206\u51E0\u4E2A\u6BB5

                                                                        \u9875\u53F7\u4F4D\u6570\u51B3\u5B9A\u4E86\u6BCF\u4E2A\u6BB5\u6700\u5927\u6709\u591A\u5C11\u9875

                                                                      4. \u903B\u8F91\u5730\u5740\u5230\u7269\u7406\u5730\u5740\u7684\u8F6C\u6362

                                                                        image-20211220213646069

                                                                      \u865A\u62DF\u5185\u5B58

                                                                      \u6982\u5FF5

                                                                      1. \u5185\u5B58\u7A7A\u95F4\u7684\u6269\u5145\uFF1A

                                                                        • \u8986\u76D6\u6280\u672F

                                                                        • \u4EA4\u6362\u6280\u672F\uFF08\u901A\u8FC7\u5904\u7406\u673A\u8C03\u5EA6\u7684\u4E2D\u7EA7\u8C03\u5EA6\u5B9E\u73B0\uFF09

                                                                        • \u865A\u62DF\u5B58\u50A8\u6280\u672F\uFF08\u7528\u5230\u8FDB\u7A0B\u7684\u67D0\u4E00\u90E8\u5206\uFF0C\u624D\u8C03\u5165\u5185\u5B58\uFF0C\u6309\u9875\u8C03\u5165\u5185\u5B58\uFF09

                                                                          \u53EF\u4EE5\u5728\u9700\u8981\u8BBF\u95EE\u9875\u9762\u65F6\uFF0C\u624D\u628A\u9875\u9762\u8C03\u5165\u5185\u5B58\u3002

                                                                      2. \u4F20\u7EDF\u5B58\u50A8\u7BA1\u7406\u65B9\u5F0F

                                                                        image-20211221154032346

                                                                        \u7279\u5F81\uFF1A

                                                                        • \u4E00\u6B21\u6027\uFF1A\u4F5C\u4E1A\u5FC5\u987B\u4E00\u6B21\u6027\u5168\u90E8\u88C5\u5165\u5185\u5B58\u540E\u624D\u80FD\u5F00\u59CB\u8FD0\u884C

                                                                          \u4F5C\u4E1A\u5F88\u5927\u65F6\uFF0C\u4E0D\u80FD\u5168\u90E8\u88C5\u5165\u5185\u5B58\uFF0C\u5BFC\u81F4\u5927\u4F5C\u4E1A\u65E0\u6CD5\u8FD0\u884C\uFF1B

                                                                          \u5F53\u5927\u91CF\u4F5C\u4E1A\u8981\u6C42\u8FD0\u884C\u65F6\uFF0C\u7531\u4E8E\u5185\u5B58\u65E0\u6CD5\u5BB9\u7EB3\u6240\u6709\u4F5C\u4E1A\uFF0C\u56E0\u6B64\u53EA\u6709\u5C11\u91CF\u4F5C\u4E1A\u80FD\u8FD0\u884C\uFF0C\u5BFC\u81F4\u591A\u9053\u7A0B\u5E8F\u5E76\u53D1\u5EA6\u4E0B\u964D\u3002

                                                                        • **\u9A7B\u7559\u6027\uFF1A\u4E00\u65E6\u4F5C\u4E1A\u88AB\u88C5\u5165\u5185\u5B58\uFF0C\u5C31\u4F1A\u4E00\u76F4\u9A7B\u7559\u5728\u5185\u5B58\u4E2D\uFF0C\u76F4\u81F3\u4F5C\u4E1A\u8FD0\u884C\u7ED3\u675F\u3002**\u4E8B\u5B9E\u4E0A\uFF0C\u5728\u4E00\u4E2A\u65F6\u95F4\u6BB5\u5185\uFF0C\u53EA\u9700\u8981\u8BBF\u95EE\u4F5C\u4E1A\u7684\u4E00\u5C0F\u90E8\u5206\u6570\u636E\u5373\u53EF\u6B63\u5E38\u8FD0\u884C\uFF0C\u8FD9\u5C31\u5BFC\u81F4\u4E86\u5185\u5B58\u4E2D\u4F1A\u9A7B\u7559\u5927\u91CF\u7684\u3001\u6682\u65F6\u7528\u4E0D\u5230\u7684\u6570\u636E\u3002

                                                                      3. \u9AD8\u901F\u7F13\u51B2\u6280\u672F\u7684\u601D\u60F3\uFF1A

                                                                        \u5C06\u8FD1\u671F\u4F1A\u9891\u7E41\u8BBF\u95EE\u5230\u7684\u6570\u636E\u653E\u5230\u66F4\u9AD8\u901F\u7684\u5B58\u50A8\u5668\u4E2D\uFF0C\u6682\u65F6\u7528\u4E0D\u5230\u7684\u6570\u636E\u653E\u5728\u66F4\u4F4E\u901F\u5B58\u50A8\u5668\u4E2D

                                                                        image-20211221154907782

                                                                        \u5FEB\u8868\u673A\u6784\u5C31\u662F\u5C06\u8FD1\u671F\u5E38\u8BBF\u95EE\u7684\u9875\u8868\u9879\u526F\u672C\u653E\u5230\u66F4\u9AD8\u901F\u7684\u9AD8\u901F\u7F13\u51B2\u5BC4\u5B58\u5668\u4E2D

                                                                      4. \u57FA\u4E8E\u5C40\u90E8\u6027\u539F\u7406\uFF0C\u5728\u7A0B\u5E8F\u88C5\u5165\u65F6\uFF0C\u53EF\u4EE5\u5C06\u7A0B\u5E8F\u4E2D\u5F88\u5FEB\u4F1A\u7528\u5230\u7684\u90E8\u5206\u88C5\u5165\u5185\u5B58\uFF0C\u6682\u65F6\u7528\u4E0D\u5230\u7684\u90E8\u5206\u7559\u5728\u5916\u5B58\uFF0C\u5C31\u53EF\u4EE5\u8BA9\u7A0B\u5E8F\u5F00\u59CB\u6267\u884C\u3002

                                                                        \u5728\u7A0B\u5E8F\u6267\u884C\u8FC7\u7A0B\u4E2D\uFF0C\u5F53\u6240\u8BBF\u95EE\u7684\u4FE1\u606F\u4E0D\u5728\u5185\u5B58\u65F6\uFF0C\u7531\u64CD\u4F5C\u7CFB\u7EDF\u8D1F\u8D23\u5C06\u6240\u9700\u4FE1\u606F\u4ECE\u5916\u5B58\u8C03\u5165\u5185\u5B58\uFF0C\u7136\u540E\u7EE7\u7EED\u6267\u884C\u7A0B\u5E8F\u3002\uFF08\u5F53\u6240\u8BBF\u95EE\u7684\u4FE1\u606F\u4E0D\u5728\u5185\u5B58\u65F6\uFF0C\u8BF4\u660E\u7F3A\u9875\uFF0C\u5C31\u662F\u7F3A\u5C11\u8FDB\u7A0B\u7684\u67D0\u4E00\u90E8\u5206\uFF0C\u8FDB\u7A0B\u5206\u5272\u4E3A\u9875\u9762\uFF0C\u7F3A\u5C11\u5C31\u65F6\u7F3A\u9875\uFF0C\u90A3\u4E48\u4F1A\u53D1\u751F\u7F3A\u9875\u4E2D\u65AD\uFF0C\u8FD9\u662F\u5185\u4E2D\u65AD\uFF0C\u5C5E\u4E8E\u786C\u4EF6\u4E2D\u65AD\uFF0C\u4E2D\u65AD\u4E4B\u540E\uFF0C\u4F1A\u4F7FCPU\u7ACB\u5373\u8FDB\u5165\u5185\u6838\u6001\uFF0C\u5C06\u6267\u884C\u6743\u7531\u7528\u6237\u8FDB\u7A0B\u4EA4\u7ED9\u64CD\u4F5C\u7CFB\u7EDF\uFF0C\u64CD\u4F5C\u7CFB\u7EDF\u628A\u9700\u8981\u7684\u9875\u9762\u5373\u8FDB\u7A0B\u7684\u67D0\u4E00\u90E8\u5206\u8C03\u5165\u5185\u5B58\uFF0C\u8FD9\u5C31\u662F\u4E2D\u65AD\uFF0C\u4E2D\u65AD\u5C31\u662F\u5C06\u6267\u884C\u6743\u4EA4\u7ED9\u64CD\u4F5C\u7CFB\u7EDF\uFF0C\u64CD\u4F5C\u7CFB\u7EDF\u6267\u884C\u76F8\u5E94\u7684\u8FC7\u7A0B\u6765\u6EE1\u8DB3\u7A0B\u5E8F\u8FD0\u884C\u3002\u50CF\u8FDB\u7A0B\u8FD0\u884C\u65F6\u6267\u884C\u9677\u5165\u6307\u4EE4\u53D1\u751F\u81EA\u613F\u4E2D\u65AD\uFF0C\u56E0\u4E3A\u6D89\u53CA\u5230\u7CFB\u7EDF\u8C03\u7528\uFF0C\u9700\u8981\u64CD\u4F5C\u7CFB\u7EDF\u6765\u5B8C\u6210\u67D0\u4E9B\u4E8B\u60C5\uFF0C\u4E5F\u662F\u540C\u7406\u3002\u539F\u8BED\u662F\u901A\u8FC7\u5173\u4E2D\u65AD\u548C\u5F00\u4E2D\u65AD\u6765\u5B8C\u6210\uFF0C\u7EA7\u522B\u5F88\u9AD8\uFF0C\u5FC5\u987B\u5728\u5185\u6838\u6001\u8FDB\u884C\u3002\uFF09

                                                                        \u82E5\u5185\u5B58\u7A7A\u95F4\u4E0D\u591F\uFF0C\u7531\u64CD\u4F5C\u7CFB\u7EDF\u8D1F\u8D23\u5C06\u5185\u5B58\u4E2D\u6682\u65F6\u7528\u4E0D\u5230\u7684\u4FE1\u606F\u6362\u51FA\u5230\u5916\u5B58\u3002\u5C31\u662F\u6302\u8D77\uFF0C\u4E4B\u524D\u8BB2\u7684\u4E2D\u7EA7\u8C03\u5EA6\uFF0C\u5C31\u662F\u5B8C\u6210\u4EA4\u6362\u3002\u4EA4\u6362\u51FA\u7684\u8FDB\u7A0B\u4F1A\u653E\u5230\u78C1\u76D8\u7684\u4EA4\u6362\u533A\u800C\u4E0D\u662F\u6587\u4EF6\u533A\u3002\u5185\u5B58\u53C8\u5206\u4E3A\u7CFB\u7EDF\u533A\u548C\u7528\u6237\u533A\u3002\u4F46\u662F\u4EA4\u6362\u6280\u672F\uFF0C\u8BB2\u7684\u662F\u8FDB\u7A0B\u4E4B\u95F4\uFF0C\u4EA4\u6362\u7684\u662F\u8FDB\u7A0B\uFF0C\u8FD9\u91CC\u7684\u8BB2\u5185\u5B58\u4E2D\u6682\u65F6\u7528\u4E0D\u5230\u7684\u4FE1\u606F\u6362\u51FA\uFF0C\u6307\u7684\u662F\u8FDB\u7A0B\u5185\u90E8\u7684\u9875\u9762\uFF0C\u662F\u5C5E\u4E8E\u8FDB\u7A0B\u5185\u800C\u4E0D\u662F\u8FDB\u7A0B\u95F4\u3002

                                                                        \u5728\u64CD\u4F5C\u7CFB\u7EDF\u7684\u7BA1\u7406\u4E0B\uFF0C\u5728\u7528\u6237\u770B\u6765\u4F3C\u4E4E\u6709\u4E00\u4E2A\u6BD4\u5B9E\u9645\u5185\u5B58\u5927\u5F97\u591A\u7684\u5185\u5B58\uFF0C\u8FD9\u5C31\u662F\u865A\u62DF\u5185\u5B58\u3002

                                                                        \u64CD\u4F5C\u7CFB\u7EDF\u865A\u62DF\u6027\uFF0C\u5C31\u662F\u5B9E\u9645\u7684\u7269\u7406\u5185\u5B58\u5927\u5C0F\u6CA1\u6709\u53D8\uFF0C\u53EA\u662F\u5728\u903B\u8F91\u4E0A\u8FDB\u884C\u4E86\u6269\u5145\u3002

                                                                        \u4E5F\u5C31\u662F\u5185\u5B58\u4E2D\u7684\u8FDB\u7A0B\u53EA\u662F\u8FD9\u4E2A\u8FDB\u7A0B\u7684\u67D0\u4E00\u4E9B\u9875\u9762\uFF0C\u800C\u4E0D\u662F\u4E00\u4E2A\u5B8C\u6574\u7684\u8FDB\u7A0B\uFF0C\u901A\u8FC7\u8C03\u5165\u8C03\u51FA\u9875\u9762\u6765\u5B8C\u6210\u6574\u4E2A\u8FDB\u7A0B\u7684\u6267\u884C\u3002

                                                                      5. \u865A\u62DF\u5185\u5B58\u7684\u7279\u5F81\uFF1A

                                                                        • \u591A\u6B21\u6027\uFF1A\u65E0\u9700\u5728\u4F5C\u4E1A\u8FD0\u884C\u65F6\uFF0C\u4E00\u6B21\u6027\u5168\u90E8\u88C5\u5165\u5185\u5B58\uFF0C\u800C\u662F\u5141\u8BB8\u88AB\u5206\u6210\u591A\u6B21\u8C03\u5165\u5185\u5B58
                                                                        • \u5BF9\u6362\u6027\uFF1A\u5728\u4F5C\u4E1A\u8FD0\u884C\u65F6\u65E0\u9700\u4E00\u76F4\u5E38\u9A7B\u5185\u5B58\uFF0C\u800C\u662F\u5141\u8BB8\u5728\u4F5C\u4E1A\uFF08\u8FDB\u7A0B\uFF09\u8FD0\u884C\u8FC7\u7A0B\u4E2D\uFF0C\u5C06\u4F5C\u4E1A\uFF08\u8FDB\u7A0B\u7684\u67D0\u4E9B\u6682\u65F6\u7528\u4E0D\u5230\u7684\u9875\u9762\uFF09\u6362\u5165\u3001\u6362\u51FA\u3002
                                                                        • \u865A\u62DF\u6027\uFF1A\u4ECE\u903B\u8F91\u4E0A\u6269\u5145\u5185\u5B58\u7684\u5BB9\u91CF\uFF0C\u4F7F\u7528\u6237\u770B\u5230\u7684\u5185\u5B58\u5BB9\u91CF\u8FDC\u5927\u4E8E\u5B9E\u9645\u7684\u5BB9\u91CF\u3002
                                                                      6. \u865A\u62DF\u5185\u5B58\u6280\u672F\uFF0C\u5141\u8BB8\u4E00\u4E2A\u4F5C\u4E1A\u5206\u591A\u6B21\u8C03\u5165\u5185\u5B58\uFF0C\u5982\u679C\u91C7\u7528\u8FDE\u7EED\u5206\u914D\u65B9\u5F0F\uFF0C\u4F1A\u4E0D\u65B9\u4FBF\u5B9E\u73B0\uFF0C\u56E0\u6B64\uFF0C\u865A\u62DF\u5185\u5B58\u7684\u5B9E\u73B0\u9700\u8981\u5EFA\u7ACB\u5728\u79BB\u6563\u5206\u914D\u7684\u5185\u5B58\u7BA1\u7406\u65B9\u5F0F\u57FA\u7840\u4E0A\u3002

                                                                      7. \u64CD\u4F5C\u7CFB\u7EDF\u9700\u8981\u63D0\u4F9B\u8BF7\u6C42\u8C03\u9875\uFF08\u8BF7\u6C42\u8C03\u6BB5\uFF09\u529F\u80FD

                                                                        \u64CD\u4F5C\u7CFB\u7EDF\u9700\u8981\u63D0\u4F9B\u9875\u9762\u7F6E\u6362\uFF08\u6216\u6BB5\u7F6E\u6362\uFF09\u529F\u80FD

                                                                      \u8BF7\u6C42\u5206\u9875\u5B58\u50A8\u7BA1\u7406\u65B9\u5F0F

                                                                      1. \u8BF7\u6C42\u5206\u9875\u5B58\u50A8\u7BA1\u7406\u4E0E\u57FA\u672C\u5206\u9875\u5B58\u50A8\u7BA1\u7406\u7684\u4E3B\u8981\u533A\u522B\uFF1A

                                                                        \u5728\u7A0B\u5E8F\u6267\u884C\u8FC7\u7A0B\u4E2D\uFF0C\u5F53\u6240\u8BBF\u95EE\u7684\u4FE1\u606F\u4E0D\u5728\u5185\u5B58\u65F6\uFF0C\u7531\u64CD\u4F5C\u7CFB\u7EDF\u8D1F\u8D23\u5C06\u6240\u9700\u4FE1\u606F\uFF08\u8FDB\u7A0B\u7684\u9875\u9762\uFF09\u4ECE\u5916\u5B58\u8C03\u5165\u5185\u5B58\uFF0C\u7136\u540E\u7EE7\u7EED\u6267\u884C\u7A0B\u5E8F\u3002

                                                                        \u82E5\u5185\u5B58\u7A7A\u95F4\u4E0D\u591F\uFF0C\u7531\u64CD\u4F5C\u7CFB\u7EDF\u8D1F\u8D23\u5C06\u5185\u5B58\u4E2D\u6682\u65F6\u7528\u4E0D\u5230\u7684\u4FE1\u606F\u6362\u51FA\u5230\u5916\u5B58\u3002

                                                                      2. \u9875\u8868\u673A\u5236\uFF1A

                                                                        \u4E0E\u57FA\u672C\u5206\u9875\u7BA1\u7406\u76F8\u6BD4\uFF0C\u8BF7\u6C42\u5206\u9875\u7BA1\u7406\u4E2D\uFF0C\u4E3A\u4E86\u5B9E\u73B0\u201C\u8BF7\u6C42\u8C03\u9875\u201D\uFF0C\u64CD\u4F5C\u7CFB\u7EDF\u9700\u8981\u77E5\u9053\u6BCF\u4E2A\u9875\u9762\u662F\u5426\u5DF2\u7ECF\u8C03\u5165\u5185\u5B58\uFF1B\u5982\u679C\u8FD8\u6CA1\u8C03\u5165\uFF0C\u90A3\u4E48\u4E5F\u9700\u8981\u77E5\u9053\u8BE5\u9875\u9762\u5728\u5916\u5B58\u4E2D\u5B58\u653E\u7684\u4F4D\u7F6E\u3002

                                                                        \u5F53\u5185\u5B58\u7A7A\u95F4\u4E0D\u591F\u65F6\uFF0C\u8981\u5B9E\u73B0\u9875\u9762\u7F6E\u6362\uFF0C\u64CD\u4F5C\u7CFB\u7EDF\u8981\u901A\u8FC7**\u67D0\u4E9B\u6307\u6807\uFF08\u9875\u9762\u7F6E\u6362\u7B97\u6CD5\uFF09**\u77E5\u9053\u8BE5\u6362\u51FA\u54EA\u4E2A\u9875\u9762\uFF0C\u6709\u7684\u9875\u9762\u6CA1\u6709\u88AB\u4FEE\u6539\u8FC7\uFF0C\u5C31\u4E0D\u9700\u8981\u6D6A\u8D39\u65F6\u95F4\u518D\u5199\u56DE\u5916\u5B58\uFF0C\u6709\u7684\u9875\u9762\u4FEE\u6539\u8FC7\uFF0C\u5C31\u9700\u8981\u5C06\u5916\u5B58\u4E2D\u7684\u65E7\u6570\u636E\u8986\u76D6\uFF0C\u56E0\u6B64\u64CD\u4F5C\u7CFB\u7EDF\u4E5F\u9700\u8981\u8BB0\u5F55\u5404\u4E2A\u9875\u9762\u662F\u5426\u88AB\u4FEE\u6539\u7684\u4FE1\u606F\u3002

                                                                        image-20211221163750995

                                                                        \u8BF7\u6C42\u9875\u8868\u9879\u589E\u52A0\u4E86\u56DB\u4E2A\u5B57\u6BB5

                                                                      3. \u7F3A\u9875\u4E2D\u65AD\u673A\u6784

                                                                        \u5728\u8BF7\u6C42\u5206\u9875\u7CFB\u7EDF\u4E2D\uFF0C\u6BCF\u5F53\u8981\u8BBF\u95EE\u7684\u9875\u9762\u4E0D\u5728\u5185\u5B58\u65F6\uFF0C\u4FBF\u4EA7\u751F\u4E00\u4E2A\u7F3A\u9875\u4E2D\u65AD\uFF0C\u7136\u540E\u7531\u64CD\u4F5C\u7CFB\u7EDF\u7684\u7F3A\u9875\u4E2D\u65AD\u5904\u7406\u7A0B\u5E8F\u5904\u7406\u4E2D\u65AD\u3002\u6B64\u65F6\u662F\u53D1\u751FIO\u64CD\u4F5C\uFF0C\u56E0\u4E3A\u8981\u5C06\u9875\u9762\u4ECE\u5916\u5B58\u8C03\u5165\u5185\u5B58\u3002

                                                                        \u6B64\u65F6\u7F3A\u9875\u7684\u8FDB\u7A0B\u963B\u585E\uFF0C\u653E\u5165\u963B\u585E\u961F\u5217\uFF0C\u8C03\u9875\u5B8C\u6210\u540E\uFF0C\u518D\u5C06\u5176\u5524\u9192\uFF0C\u653E\u56DE\u5C31\u7EEA\u961F\u5217\u3002\u8FD9\u91CC\u8BF4\u7684\u63D2\u5165\u5230\u961F\u5217\u91CC\u7684\u90FD\u662FPCB

                                                                        \u5982\u679C\u5185\u5B58\u4E2D\u6709\u7A7A\u95F2\u5757\uFF0C\u5219\u4E3A\u8FDB\u7A0B\u5206\u914D\u4E00\u4E2A\u7A7A\u95F2\u5757\uFF0C\u5C06\u6240\u7F3A\u9875\u9762\u88C5\u5165\u8BE5\u5757\uFF0C\u5E76\u4FEE\u6539\u9875\u8868\u4E2D\u76F8\u5E94\u7684\u9875\u8868\u9879\u3002

                                                                        \u5982\u679C\u5185\u5B58\u4E2D\u6CA1\u6709\u7A7A\u95F2\u5757\uFF0C\u5219\u7531\u9875\u9762\u7F6E\u6362\u7B97\u6CD5\u9009\u62E9\u4E00\u4E2A\u9875\u9762\u6DD8\u6C70\uFF08\u4ECE\u5185\u5B58\u8C03\u5230\u5916\u5B58\uFF09\uFF0C\u82E5\u8BE5\u9875\u9762\u5728\u5185\u5B58\u671F\u95F4\u88AB\u4FEE\u6539\u8FC7\uFF0C\u5219\u8981\u5C06\u5176\u5199\u56DE\u5916\u5B58\uFF0C\u5728\u5185\u5B58\u671F\u95F4\u672A\u4FEE\u6539\u8FC7\u7684\u9875\u9762\u4E0D\u7528\u5199\u56DE\u5916\u5B58\u3002

                                                                      4. \u7F3A\u9875\u4E2D\u65AD\u662F\u56E0\u4E3A\u5F53\u524D\u6267\u884C\u7684\u6307\u4EE4\u60F3\u8981\u8BBF\u95EE\u7684\u76EE\u6807\u9875\u9762\u672A\u8C03\u5165\u5185\u5B58\u800C\u4EA7\u751F\u7684\uFF0C\u56E0\u6B64\u5C5E\u4E8E\u5185\u4E2D\u65AD\u3002

                                                                        \u4E00\u6761\u6307\u4EE4\u5728\u6267\u884C\u671F\u95F4\uFF0C\u53EF\u80FD\u4EA7\u751F\u591A\u6B21\u7F3A\u9875\u4E2D\u65AD\u3002

                                                                        image-20211221173752429

                                                                      5. image-20211221174313529

                                                                        • \u53EA\u6709\u5199\u6307\u4EE4\u624D\u9700\u8981\u4FEE\u6539\u4FEE\u6539\u4F4D\uFF0C\u5E76\u4E14\uFF0C\u4E00\u822C\u6765\u8BF4\u53EA\u9700\u4FEE\u6539\u5FEB\u8868\u4E2D\u7684\u6570\u636E\uFF0C\u53EA\u6709\u8981\u5C06\u5FEB\u8868\u9879\u5220\u9664\u65F6\u624D\u9700\u8981\u5199\u56DE\u5185\u5B58\u4E2D\u7684\u6162\u8868\uFF0C\u8FD9\u6837\u53EF\u4EE5\u51CF\u5C11\u8BBF\u5B58\u6B21\u6570
                                                                        • \u548C\u666E\u901A\u7684\u4E2D\u65AD\u5904\u7406\u4E00\u6837\uFF0C\u7F3A\u9875\u4E2D\u65AD\u5904\u7406\u4F9D\u7136\u9700\u8981\u4FDD\u7559CPU\u73B0\u573A
                                                                        • \u9700\u8981\u7528\u67D0\u79CD\u9875\u9762\u7F6E\u6362\u7B97\u6CD5\uFF0C\u6765\u51B3\u5B9A\u6362\u51FA\u54EA\u4E2A\u9875\u9762
                                                                        • \u6362\u51FA\u3001\u6362\u5165\u90FD\u9700\u8981\u542F\u52A8\u6162\u901F\u7684IO\u64CD\u4F5C\u3002
                                                                        • \u9875\u9762\u8C03\u5165\u5185\u5B58\u540E\uFF0C\u9700\u8981\u4FEE\u6539\u6162\u8868\u7684\u76F8\u5E94\u9875\u8868\u9879\uFF0C\u540C\u65F6\uFF0C\u9700\u8981\u5C06\u8868\u9879\u590D\u5236\u5230\u5FEB\u8868\u4E2D\u3002

                                                                        \u8BF7\u6C42\u8C03\u9875\u65F6\u901A\u8FC7\u7F3A\u9875\u4E2D\u65AD\u8FDB\u884C\uFF01\uFF01\u7F3A\u9875\u4E2D\u65AD\u7684\u76EE\u7684\u5C31\u662F\u8BF7\u6C42\u64CD\u4F5C\u7CFB\u7EDF\u8C03\u9875\u3002

                                                                      \u9875\u9762\u7F6E\u6362\u7B97\u6CD5

                                                                      1. \u7528\u9875\u9762\u7F6E\u6362\u7B97\u6CD5\u51B3\u5B9A\u5E94\u8BE5\u6362\u51FA\u54EA\u4E2A\u9875\u9762

                                                                      2. \u9875\u9762\u6362\u5165\u6362\u51FA\u9700\u8981\u78C1\u76D8IO\uFF0C\u4F1A\u6709\u8F83\u5927\u7684\u5F00\u9500\uFF0C\u56E0\u6B64\u597D\u7684\u9875\u9762\u7F6E\u6362\u7B97\u6CD5\u5E94\u8BE5\u8FFD\u6C42\u66F4\u5C11\u7684\u7F3A\u9875\u7387

                                                                      3. \u9875\u9762\u7F6E\u6362\u7B97\u6CD5

                                                                        • \u6700\u4F73\u7F6E\u6362\u7B97\u6CD5
                                                                        • \u5148\u8FDB\u5148\u51FA\u7F6E\u6362\u7B97\u6CD5
                                                                        • \u6700\u8FD1\u6700\u4E45\u672A\u4F7F\u7528\u7F6E\u6362\u7B97\u6CD5
                                                                        • \u65F6\u949F\u7F6E\u6362\u7B97\u6CD5
                                                                        • \u6539\u8FDB\u578B\u7684\u65F6\u949F\u7F6E\u6362\u7B97\u6CD5
                                                                      4. \u6700\u4F73\u7F6E\u6362\u7B97\u6CD5OPT

                                                                        \u6BCF\u6B21\u9009\u62E9\u6DD8\u6C70\u7684\u9875\u9762\u5C06\u662F\u4EE5\u540E\u6C38\u4E0D\u4F7F\u7528\uFF0C\u6216\u8005\u5728\u6700\u957F\u65F6\u95F4\u5185\u4E0D\u518D\u88AB\u8BBF\u95EE\u7684\u9875\u9762\uFF0C\u8FD9\u6837\u53EF\u4EE5\u4FDD\u8BC1\u6700\u4F4E\u7684\u7F3A\u9875\u7387\u3002

                                                                        \u6CE8\u610F\uFF1A\u53D1\u751F\u4E86\u7F3A\u9875\u4E2D\u65AD\uFF0C\u672A\u5FC5\u4F1A\u53D1\u751F\u9875\u9762\u7F6E\u6362\uFF0C\u82E5\u8FD8\u6709\u53EF\u7528\u7684\u7A7A\u95F2\u5185\u5B58\u5757\uFF0C\u5C31\u4E0D\u7528\u8FDB\u884C\u9875\u9762\u7F6E\u6362\u3002\u53EA\u6709\u5185\u5B58\u4E0D\u591F\u7528\u4E86\u624D\u9700\u8981\u8FDB\u884C\u9875\u9762\u7F6E\u6362

                                                                        \u5B9E\u9645\uFF1A\u64CD\u4F5C\u7CFB\u7EDF\u65E0\u6CD5\u63D0\u524D\u9884\u5224\u9875\u9762\u8BBF\u95EE\u5E8F\u5217\uFF0C\u56E0\u6B64\uFF0C\u6700\u4F73\u7F6E\u6362\u7B97\u6CD5\u662F\u65E0\u6CD5\u5B9E\u73B0\u7684\u3002 \u8FD9\u662F\u7406\u60F3\u5316\u7684\u7B97\u6CD5\u3002

                                                                      5. \u5148\u8FDB\u5148\u51FA\u7F6E\u6362\u7B97\u6CD5FIFO

                                                                        \u6BCF\u6B21\u9009\u62E9\u6DD8\u6C70\u7684\u9875\u9762\u662F\u6700\u65E9\u8FDB\u5165\u5185\u5B58\u7684\u9875\u9762

                                                                        \u5B9E\u73B0\u65B9\u6CD5\uFF1A\u628A\u8C03\u5165\u5185\u5B58\u7684\u9875\u9762\u6839\u636E\u8C03\u5165\u7684\u5148\u540E\u987A\u5E8F\u6392\u6210\u4E00\u4E2A\u961F\u5217\uFF0C\u9700\u8981\u6362\u51FA\u9875\u9762\u65F6\uFF0C\u9009\u62E9\u5BF9\u5934\u7684\u9875\u9762\u5373\u53EF\u3002

                                                                        \u8D1D\u62C9\u8FEA\u5F02\u5E38\uFF1A\u5F53\u4E3A\u8FDB\u7A0B\u5206\u914D\u7684\u7269\u7406\u5757\u6570\u589E\u5927\u65F6\uFF0C\u7F3A\u9875\u6B21\u6570\u4E0D\u51CF\u53CD\u589E\u7684\u5F02\u5E38\u73B0\u8C61\u3002

                                                                        \u53EA\u6709FIFO\u7B97\u6CD5\u4F1A\u4EA7\u751F\u8D1D\u62C9\u8FEA\u5F02\u5E38\uFF0C\u53E6\u5916\uFF0CFIFO\u7B97\u6CD5\u867D\u7136\u5B9E\u73B0\u7B80\u5355\uFF0C\u4F46\u662F\u8BE5\u7B97\u6CD5\u4E0E\u8FDB\u7A0B\u5B9E\u9645\u8FD0\u884C\u65F6\u7684\u89C4\u5F8B\u4E0D\u9002\u5E94\uFF0C\u56E0\u4E3A\u5148\u8FDB\u5165\u7684\u9875\u9762\u4E5F\u6709\u53EF\u80FD\u6700\u7ECF\u5E38\u88AB\u8BBF\u95EE\uFF0C\u56E0\u6B64\u7B97\u6CD5\u6027\u80FD\u5DEE\u3002

                                                                      6. \u6700\u8FD1\u6700\u4E45\u672A\u4F7F\u7528\u7F6E\u6362\u7B97\u6CD5LRU

                                                                        \u6BCF\u6B21\u6DD8\u6C70\u7684\u9875\u9762\u662F\u6700\u8FD1\u6700\u4E45\u672A\u4F7F\u7528\u7684\u9875\u9762

                                                                        \u5B9E\u73B0\u65B9\u6CD5\uFF1A\u6B64\u8FDB\u7A0B\u5BF9\u5E94\u7684\u9875\u8868\u7684\u9875\u8868\u9879\u4E2D\uFF0C\u7528\u8BBF\u95EE\u5B57\u6BB5\u8BB0\u5F55\u8BE5\u9875\u9762\u81EA\u4E0A\u6B21\u88AB\u8BBF\u95EE\u4EE5\u6765\u6240\u7ECF\u5386\u7684\u65F6\u95F4t

                                                                        \u5F53\u9700\u8981\u6DD8\u6C70\u4E00\u4E2A\u9875\u9762\u65F6\uFF0C\u9009\u62E9\u73B0\u6709\u9875\u9762\u4E2Dt\u503C\u6700\u5927\u7684\uFF0C\u5373\u6700\u8FD1\u6700\u4E45\u672A\u4F7F\u7528\u7684\u9875\u9762\u3002

                                                                        image-20211221185055893

                                                                        \u6B64\u7B97\u6CD5\u6027\u80FD\u6700\u63A5\u8FD1\u6700\u4F73\u7F6E\u6362\u7B97\u6CD5

                                                                        \u9700\u8981\u4E13\u95E8\u7684\u786C\u4EF6\u652F\u6301\uFF0C\u7B97\u6CD5\u5F00\u9500\u5927

                                                                      7. \u65F6\u949F\u7F6E\u6362\u7B97\u6CD5CLOCK

                                                                        LRU\u7B97\u6CD5\u662F\u6700\u63A5\u8FD1OPT\u7B97\u6CD5\u6027\u80FD\u7684\uFF0C\u4F46\u662F\u9700\u8981\u4E13\u95E8\u7684\u786C\u4EF6\u652F\u6301\uFF0C\u7B97\u6CD5\u5F00\u9500\u5927

                                                                        \u65F6\u949F\u7F6E\u6362\u7B97\u6CD5\u662F\u4E00\u79CD\u6027\u80FD\u548C\u5F00\u9500\u6BD4\u8F83\u5747\u8861\u7684\u7B97\u6CD5

                                                                        image-20211221185458329

                                                                        image-20211221185505869

                                                                      8. \u6539\u8FDB\u578B\u7684\u65F6\u949F\u7F6E\u6362\u7B97\u6CD5

                                                                        \u7B80\u5355\u7684\u65F6\u949F\u7F6E\u6362\u7B97\u6CD5\u4EC5\u8003\u8651\u5230\u4E00\u4E2A\u9875\u9762\u6700\u8FD1\u662F\u5426\u88AB\u8BBF\u95EE\u8FC7\uFF0C\u4E8B\u5B9E\u4E0A\uFF0C\u5982\u679C\u88AB\u6DD8\u6C70\u7684\u9875\u9762\u6CA1\u6709\u88AB\u4FEE\u6539\u8FC7\uFF0C\u5C31\u4E0D\u9700\u8981\u6267\u884CIO\u64CD\u4F5C\u5199\u56DE\u5916\u5B58\uFF0C\u53EA\u6709\u88AB\u6DD8\u6C70\u7684\u9875\u9762\u88AB\u4FEE\u6539\u8FC7\u65F6\uFF0C\u624D\u9700\u8981\u5199\u56DE\u5916\u5B58\u3002

                                                                        \u56E0\u6B64\uFF0C\u9664\u4E86\u8003\u8651\u4E00\u4E2A\u9875\u9762\u6700\u8FD1\u6709\u6CA1\u6709\u88AB\u8BBF\u95EE\u8FC7\u4E4B\u5916\uFF0C\u64CD\u4F5C\u7CFB\u7EDF\u8FD8\u5E94\u8003\u8651\u9875\u9762\u6709\u6CA1\u6709\u88AB\u4FEE\u6539\u8FC7\uFF0C\u5728\u5176\u4ED6\u6761\u4EF6\u90FD\u76F8\u540C\u65F6\uFF0C\u5E94\u4F18\u5148\u6DD8\u6C70\u6CA1\u6709\u88AB\u4FEE\u6539\u8FC7\u7684\u9875\u9762\uFF0C\u907F\u514DIO\u64CD\u4F5C\u3002\u8FD9\u5C31\u662F\u6539\u8FDB\u578B\u7684\u65F6\u949F\u7F6E\u6362\u7B97\u6CD5\u7684\u601D\u60F3\u3002

                                                                        image-20211221185940035

                                                                        image-20211221190423652

                                                                        \u6BCF\u4E00\u8F6E\u5206\u522B\u4EE3\u8868\u4E00\u4E2A\u4F18\u5148\u7EA7

                                                                        \u7B2C\u4E00\u4F18\u5148\u7EA7\uFF1A\u6700\u8FD1\u6CA1\u8BBF\u95EE\uFF0C\u4E14\u6CA1\u4FEE\u6539\u8FC7\u7684\u9875\u9762

                                                                        \u7B2C\u4E8C\u4F18\u5148\u7EA7\uFF1A\u6700\u8FD1\u6CA1\u8BBF\u95EE\uFF0C\u4F46\u662F\u4FEE\u6539\u8FC7\u7684\u9875\u9762

                                                                        \u7B2C\u4E09\u4F18\u5148\u7EA7\uFF1A\u6700\u8FD1\u8BBF\u95EE\u8FC7\uFF0C\u6CA1\u4FEE\u6539\u8FC7\u7684\u9875\u9762

                                                                        \u7B2C\u56DB\u4F18\u5148\u7EA7\uFF1A\u6700\u8FD1\u8BBF\u95EE\u8FC7\uFF0C\u4E14\u4FEE\u6539\u8FC7\u7684\u9875\u9762\u3002

                                                                      9. image-20211221190938925

                                                                      \u9875\u9762\u5206\u914D\u7B56\u7565

                                                                      1. \u9A7B\u7559\u96C6\uFF1A\u8BF7\u6C42\u5206\u9875\u5B58\u50A8\u7BA1\u7406\u4E2D\uFF0C\u7ED9\u8FDB\u7A0B\u5206\u914D\u7684\u5185\u5B58\u5757\uFF08\u9875\u6846\uFF09\u7684\u96C6\u5408

                                                                        \u5728\u91C7\u7528\u4E86\u865A\u62DF\u5B58\u50A8\u6280\u672F\u7684\u7CFB\u7EDF\u4E2D\uFF0C\u9A7B\u7559\u96C6\u7684\u5927\u5C0F\u4E00\u822C\u5C0F\u4E8E\u8FDB\u7A0B\u7684\u603B\u5927\u5C0F\u3002

                                                                      2. \u9A7B\u7559\u96C6\u5927\u5C0F

                                                                        \u56FA\u5B9A\u5206\u914D\uFF1A\u64CD\u4F5C\u7CFB\u7EDF\u4E3A\u6BCF\u4E2A\u8FDB\u7A0B\u5206\u914D\u4E00\u7EC4\u56FA\u5B9A\u6570\u76EE\u7684\u5185\u5B58\u5757\uFF0C\u5728\u8FDB\u7A0B\u8FD0\u884C\u671F\u95F4\u4E0D\u518D\u6539\u53D8

                                                                        \u53EF\u53D8\u5206\u914D\uFF1A\u5148\u4E3A\u6BCF\u4E2A\u8FDB\u7A0B\u5206\u914D\u4E00\u5B9A\u6570\u76EE\u7684\u7269\u7406\u5757\uFF0C\u5728\u8FDB\u7A0B\u8FD0\u884C\u671F\u95F4\uFF0C\u53EF\u6839\u636E\u60C5\u51B5\u505A\u9002\u5F53\u7684\u589E\u52A0\u6216\u51CF\u5C11\u3002

                                                                      3. \u5C40\u90E8\u7F6E\u6362\uFF1A\u53D1\u751F\u7F3A\u9875\u65F6\u53EA\u80FD\u9009\u8FDB\u7A0B\u81EA\u5DF1\u7684\u7269\u7406\u5757\u8FDB\u7A0B\u7F6E\u6362

                                                                        \u5168\u5C40\u7F6E\u6362\uFF1A\u53EF\u4EE5\u5C06\u64CD\u4F5C\u7CFB\u7EDF\u4FDD\u7559\u7684\u7A7A\u95F2\u7269\u7406\u5757\u5206\u914D\u7ED9\u7F3A\u9875\u8FDB\u7A0B\uFF0C\u4E5F\u53EF\u4EE5\u5C06\u522B\u7684\u8FDB\u7A0B\u6301\u6709\u7684\u7269\u7406\u5757\u7F6E\u6362\u5230\u5916\u5B58\uFF0C\u518D\u5206\u914D\u7ED9\u7F3A\u9875\u8FDB\u7A0B\u3002

                                                                        image-20211221205210092

                                                                      4. \u56FA\u5B9A\u5206\u914D\u5C40\u90E8\u7F6E\u6362\uFF1A

                                                                        \u7CFB\u7EDF\u4E3A\u6BCF\u4E2A\u8FDB\u7A0B\u5206\u914D\u4E00\u5B9A\u6570\u91CF\u7684\u7269\u7406\u5757\uFF0C\u5728\u6574\u4E2A\u8FD0\u884C\u671F\u95F4\u90FD\u4E0D\u6539\u53D8\uFF0C\u82E5\u8FDB\u7A0B\u5728\u8FD0\u884C\u4E2D\u53D1\u751F\u7F3A\u9875\uFF0C\u5219\u53EA\u80FD\u4ECE\u8BE5\u8FDB\u7A0B\u5728\u5185\u5B58\u4E2D\u7684\u9875\u9762\u4E2D\u9009\u51FA\u4E00\u9875\u6362\u51FA\uFF0C\u7136\u540E\u518D\u8C03\u5165\u9700\u8981\u7684\u9875\u9762\u3002

                                                                        \u8FD9\u79CD\u7B56\u7565\u7684\u7F3A\u70B9\u662F\uFF1A\u5F88\u96BE\u5728\u521A\u5F00\u59CB\u5C31\u786E\u5B9A\u5E94\u4E3A\u6BCF\u4E2A\u8FDB\u7A0B\u5206\u914D\u591A\u5C11\u4E2A\u7269\u7406\u5757\u624D\u7B97\u5408\u7406

                                                                      5. \u53EF\u53D8\u5206\u914D\u5168\u5C40\u7F6E\u6362\uFF1A

                                                                        \u521A\u5F00\u59CB\u4F1A\u4E3A\u6BCF\u4E2A\u8FDB\u7A0B\u5206\u914D\u4E00\u5B9A\u6570\u91CF\u7684\u7269\u7406\u5757\u3002\u64CD\u4F5C\u7CFB\u7EDF\u4F1A\u4FDD\u6301\u4E00\u4E2A\u7A7A\u95F2\u7269\u7406\u5757\u961F\u5217\u3002\u5F53\u67D0\u8FDB\u7A0B\u53D1\u751F\u7F3A\u9875\u65F6\uFF0C\u4ECE\u7A7A\u95F2\u7269\u7406\u5757\u4E2D\u53D6\u51FA\u4E00\u5757\u5206\u914D\u7ED9\u8BE5\u8FDB\u7A0B\uFF1B\u82E5\u5DF2\u65E0\u7A7A\u95F2\u7269\u7406\u5757\uFF0C\u5219\u53EF\u9009\u62E9\u4E00\u4E2A\u672A\u9501\u5B9A\u7684\u9875\u9762\u6362\u51FA\uFF0C\u518D\u5C06\u8BE5\u7269\u7406\u5757\u5206\u914D\u7ED9\u7F3A\u9875\u7684\u8FDB\u7A0B\u3002

                                                                        \u91C7\u7528\u8FD9\u79CD\u7B56\u7565\u65F6\uFF0C\u53EA\u8981\u67D0\u8FDB\u7A0B\u53D1\u751F\u7F3A\u9875\uFF0C\u90FD\u5C06\u83B7\u5F97\u65B0\u7684\u7269\u7406\u5757\uFF0C\u4EC5\u5F53\u7269\u7406\u5757\u7528\u5B8C\u65F6\uFF0C\u7CFB\u7EDF\u624D\u9009\u62E9\u4E00\u4E2A\u672A\u9501\u5B9A\u7684\u9875\u9762\u6362\u51FA\uFF0C\u88AB\u9009\u62E9\u8C03\u51FA\u7684\u9875\u53EF\u80FD\u65F6\u7CFB\u7EDF\u4E2D\u4EFB\u4F55\u4E00\u4E2A\u8FDB\u7A0B\u7684\u9875\uFF0C\u56E0\u6B64\u8FD9\u4E2A\u88AB\u9009\u4E2D\u7684\u8FDB\u7A0B\u62E5\u6709\u7684\u7269\u7406\u5757\u4F1A\u51CF\u5C11\uFF0C\u7F3A\u9875\u7387\u4F1A\u589E\u52A0\u3002

                                                                      6. \u53EF\u53D8\u5206\u914D\u5C40\u90E8\u7F6E\u6362\uFF1A

                                                                        \u521A\u5F00\u59CB\u4F1A\u4E3A\u6BCF\u4E2A\u8FDB\u7A0B\u5206\u914D\u4E00\u5B9A\u6570\u91CF\u7684\u7269\u7406\u5757\uFF0C\u5F53\u67D0\u8FDB\u7A0B\u53D1\u751F\u7F3A\u9875\u7684\u65F6\u5019\uFF0C\u53EA\u5141\u8BB8\u4ECE\u8BE5\u8FDB\u7A0B\u81EA\u5DF1\u7684\u7269\u7406\u5757\u4E2D\u9009\u51FA\u4E00\u4E2A\u8FDB\u884C\u6362\u51FA\u3002\u5982\u679C\u8FDB\u7A0B\u5728\u8FD0\u884C\u4E2D\u9891\u7E41\u5730\u7F3A\u9875\uFF0C\u7CFB\u7EDF\u4F1A\u4E3A\u8BE5\u8FDB\u7A0B\u591A\u5206\u914D\u51E0\u4E2A\u7269\u7406\u5757\uFF0C\u76F4\u81F3\u8BE5\u8FDB\u7A0B\u7F3A\u9875\u7387\u8D8B\u4E8E\u9002\u5F53\u7A0B\u5EA6\uFF0C\u53CD\u4E4B\uFF0C\u5982\u679C\u8BE5\u8FDB\u7A0B\u7F3A\u9875\u7387\u5F88\u4F4E\uFF0C\u5219\u4F1A\u51CF\u5C11\u5206\u914D\u7ED9\u8BE5\u8FDB\u7A0B\u7684\u7269\u7406\u5757\u3002

                                                                      7. \u4F55\u65F6\u8C03\u5165\u9875\u9762

                                                                        image-20211221210739713

                                                                      8. \u4ECE\u4F55\u5904\u8C03\u5165\u9875\u9762

                                                                        image-20211221211043210

                                                                      9. \u6296\u52A8\u73B0\u8C61\uFF1A

                                                                        \u521A\u521A\u6362\u51FA\u7684\u9875\u9762\u9A6C\u4E0A\u53C8\u8981\u6362\u5165\u5185\u5B58\uFF0C\u521A\u521A\u6362\u5165\u7684\u9875\u9762\u9A6C\u4E0A\u53C8\u8981\u6362\u51FA\u5185\u5B58\uFF0C\u8FD9\u79CD\u9891\u7E41\u7684\u9875\u9762\u8C03\u5EA6\u884C\u4E3A\u79F0\u4E3A\u6296\u52A8\u3002

                                                                        \u4EA7\u751F\u6296\u52A8\u7684\u4E3B\u8981\u539F\u56E0\u662F\u8FDB\u7A0B\u9891\u7E41\u8BBF\u95EE\u7684\u9875\u9762\u6570\u76EE\u9AD8\u4E8E\u53EF\u7528\u7684\u7269\u7406\u5757\u6570\u3002

                                                                      10. \u5DE5\u4F5C\u96C6\uFF1A

                                                                        \u6307\u5728\u67D0\u6BB5\u65F6\u95F4\u95F4\u9694\u5185\uFF0C\u8FDB\u7A0B\u5B9E\u9645\u8BBF\u95EE\u9875\u9762\u7684\u96C6\u5408\u3002

                                                                        \u4E00\u822C\u6765\u8BF4\uFF0C\u9A7B\u7559\u96C6\u7684\u5927\u5C0F\u4E0D\u80FD\u5C0F\u4E8E\u5DE5\u4F5C\u96C6\u7684\u5927\u5C0F\uFF0C\u5426\u5219\u8FDB\u7A0B\u8FD0\u884C\u8FC7\u7A0B\u4E2D\u5C06\u9891\u7E41\u7F3A\u9875\uFF08\u6296\u52A8\uFF09

                                                                      ',167);function jp(Gp,Kp){return Qp}var Hp=p(Ap,[["render",jp],["__file","\u64CD\u4F5C\u7CFB\u7EDF.html.vue"]]);export{Hp as default}; diff --git "a/assets/\346\223\215\344\275\234\347\263\273\347\273\237.html.e2a129ed.js" "b/assets/\346\223\215\344\275\234\347\263\273\347\273\237.html.d862ed98.js" similarity index 99% rename from "assets/\346\223\215\344\275\234\347\263\273\347\273\237.html.e2a129ed.js" rename to "assets/\346\223\215\344\275\234\347\263\273\347\273\237.html.d862ed98.js" index 1a3e5f9f..6673ecce 100644 --- "a/assets/\346\223\215\344\275\234\347\263\273\347\273\237.html.e2a129ed.js" +++ "b/assets/\346\223\215\344\275\234\347\263\273\347\273\237.html.d862ed98.js" @@ -1 +1 @@ -const l={key:"v-d2a5a678",path:"/java/%E8%AE%A1%E7%AE%97%E6%9C%BA%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F/%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F.html",title:"\u64CD\u4F5C\u7CFB\u7EDF",lang:"zh-CN",frontmatter:{},excerpt:"",headers:[{level:2,title:"\u7B2C\u4E00\u7AE0",slug:"\u7B2C\u4E00\u7AE0",children:[{level:3,title:"\u64CD\u4F5C\u7CFB\u7EDF\u7684\u6982\u5FF5\u3001\u529F\u80FD\u548C\u76EE\u6807",slug:"\u64CD\u4F5C\u7CFB\u7EDF\u7684\u6982\u5FF5\u3001\u529F\u80FD\u548C\u76EE\u6807",children:[]},{level:3,title:"\u64CD\u4F5C\u7CFB\u7EDF\u7684\u56DB\u4E2A\u7279\u5F81",slug:"\u64CD\u4F5C\u7CFB\u7EDF\u7684\u56DB\u4E2A\u7279\u5F81",children:[{level:4,title:"\u5E76\u53D1",slug:"\u5E76\u53D1",children:[]},{level:4,title:"\u5171\u4EAB",slug:"\u5171\u4EAB",children:[]},{level:4,title:"\u865A\u62DF",slug:"\u865A\u62DF",children:[]},{level:4,title:"\u5F02\u6B65",slug:"\u5F02\u6B65",children:[]}]},{level:3,title:"\u64CD\u4F5C\u7CFB\u7EDF\u7684\u53D1\u5C55\u548C\u5206\u7C7B",slug:"\u64CD\u4F5C\u7CFB\u7EDF\u7684\u53D1\u5C55\u548C\u5206\u7C7B",children:[]},{level:3,title:"\u64CD\u4F5C\u7CFB\u7EDF\u7684\u8FD0\u884C\u673A\u5236\u548C\u4F53\u7CFB\u7ED3\u6784",slug:"\u64CD\u4F5C\u7CFB\u7EDF\u7684\u8FD0\u884C\u673A\u5236\u548C\u4F53\u7CFB\u7ED3\u6784",children:[{level:4,title:"\u8FD0\u884C\u673A\u5236",slug:"\u8FD0\u884C\u673A\u5236",children:[]},{level:4,title:"\u64CD\u4F5C\u7CFB\u7EDF\u5185\u6838",slug:"\u64CD\u4F5C\u7CFB\u7EDF\u5185\u6838",children:[]},{level:4,title:"\u64CD\u4F5C\u7CFB\u7EDF\u4F53\u7CFB\u7ED3\u6784",slug:"\u64CD\u4F5C\u7CFB\u7EDF\u4F53\u7CFB\u7ED3\u6784",children:[]}]},{level:3,title:"\u4E2D\u65AD\u548C\u5F02\u5E38",slug:"\u4E2D\u65AD\u548C\u5F02\u5E38",children:[{level:4,title:"\u4E2D\u65AD\u673A\u5236\u7684\u8BDE\u751F",slug:"\u4E2D\u65AD\u673A\u5236\u7684\u8BDE\u751F",children:[]},{level:4,title:"\u4E2D\u65AD\u7684\u6982\u5FF5\u548C\u4F5C\u7528",slug:"\u4E2D\u65AD\u7684\u6982\u5FF5\u548C\u4F5C\u7528",children:[]},{level:4,title:"\u4E2D\u65AD\u7684\u5206\u7C7B",slug:"\u4E2D\u65AD\u7684\u5206\u7C7B",children:[]},{level:4,title:"\u5916\u4E2D\u65AD\u7684\u5904\u7406\u8FC7\u7A0B",slug:"\u5916\u4E2D\u65AD\u7684\u5904\u7406\u8FC7\u7A0B",children:[]}]},{level:3,title:"\u7CFB\u7EDF\u8C03\u7528",slug:"\u7CFB\u7EDF\u8C03\u7528",children:[{level:4,title:"\u6982\u8FF0",slug:"\u6982\u8FF0",children:[]},{level:4,title:"\u7CFB\u7EDF\u8C03\u7528\u5206\u7C7B",slug:"\u7CFB\u7EDF\u8C03\u7528\u5206\u7C7B",children:[]},{level:4,title:"\u7CFB\u7EDF\u8C03\u7528\u4E0E\u5E93\u51FD\u6570\u7684\u533A\u522B",slug:"\u7CFB\u7EDF\u8C03\u7528\u4E0E\u5E93\u51FD\u6570\u7684\u533A\u522B",children:[]},{level:4,title:"\u7CFB\u7EDF\u8C03\u7528\u80CC\u540E\u7684\u8FC7\u7A0B",slug:"\u7CFB\u7EDF\u8C03\u7528\u80CC\u540E\u7684\u8FC7\u7A0B",children:[]}]}]},{level:2,title:"\u7B2C\u4E8C\u7AE0",slug:"\u7B2C\u4E8C\u7AE0",children:[{level:3,title:"\u8FDB\u7A0B",slug:"\u8FDB\u7A0B",children:[{level:4,title:"\u8FDB\u7A0B\u7684\u5B9A\u4E49",slug:"\u8FDB\u7A0B\u7684\u5B9A\u4E49",children:[]},{level:4,title:"\u8FDB\u7A0B\u7684\u7EC4\u6210",slug:"\u8FDB\u7A0B\u7684\u7EC4\u6210",children:[]},{level:4,title:"\u8FDB\u7A0B\u7684\u7EC4\u7EC7\u65B9\u5F0F",slug:"\u8FDB\u7A0B\u7684\u7EC4\u7EC7\u65B9\u5F0F",children:[]},{level:4,title:"\u8FDB\u7A0B\u7684\u7279\u5F81",slug:"\u8FDB\u7A0B\u7684\u7279\u5F81",children:[]},{level:4,title:"\u8FDB\u7A0B\u7684\u72B6\u6001\u548C\u8F6C\u6362",slug:"\u8FDB\u7A0B\u7684\u72B6\u6001\u548C\u8F6C\u6362",children:[{level:5,title:"\u8FDB\u7A0B\u7684\u72B6\u6001",slug:"\u8FDB\u7A0B\u7684\u72B6\u6001",children:[]},{level:5,title:"\u8FDB\u7A0B\u72B6\u6001\u7684\u8F6C\u6362",slug:"\u8FDB\u7A0B\u72B6\u6001\u7684\u8F6C\u6362",children:[]}]}]},{level:3,title:"\u8FDB\u7A0B\u63A7\u5236",slug:"\u8FDB\u7A0B\u63A7\u5236",children:[{level:4,title:"\u57FA\u672C\u6982\u5FF5",slug:"\u57FA\u672C\u6982\u5FF5",children:[]},{level:4,title:"\u8FDB\u7A0B\u63A7\u5236\u76F8\u5173\u7684\u539F\u8BED",slug:"\u8FDB\u7A0B\u63A7\u5236\u76F8\u5173\u7684\u539F\u8BED",children:[]}]},{level:3,title:"\u8FDB\u7A0B\u901A\u4FE1",slug:"\u8FDB\u7A0B\u901A\u4FE1",children:[{level:4,title:"\u6982\u5FF5",slug:"\u6982\u5FF5",children:[]},{level:4,title:"\u5171\u4EAB\u5B58\u50A8",slug:"\u5171\u4EAB\u5B58\u50A8",children:[]},{level:4,title:"\u6D88\u606F\u4F20\u9012",slug:"\u6D88\u606F\u4F20\u9012",children:[]},{level:4,title:"\u7BA1\u9053\u901A\u4FE1",slug:"\u7BA1\u9053\u901A\u4FE1",children:[]}]},{level:3,title:"\u7EBF\u7A0B\u548C\u591A\u7EBF\u7A0B\u6A21\u578B",slug:"\u7EBF\u7A0B\u548C\u591A\u7EBF\u7A0B\u6A21\u578B",children:[{level:4,title:"\u6982\u5FF5",slug:"\u6982\u5FF5-1",children:[]},{level:4,title:"\u5F15\u5165\u7EBF\u7A0B\u673A\u5236\u540E\u7684\u53D8\u5316",slug:"\u5F15\u5165\u7EBF\u7A0B\u673A\u5236\u540E\u7684\u53D8\u5316",children:[]},{level:4,title:"\u7EBF\u7A0B\u6709\u54EA\u4E9B\u5C5E\u6027",slug:"\u7EBF\u7A0B\u6709\u54EA\u4E9B\u5C5E\u6027",children:[]},{level:4,title:"\u7EBF\u7A0B\u7684\u5B9E\u73B0\u65B9\u5F0F",slug:"\u7EBF\u7A0B\u7684\u5B9E\u73B0\u65B9\u5F0F",children:[]},{level:4,title:"\u591A\u7EBF\u7A0B\u6A21\u578B",slug:"\u591A\u7EBF\u7A0B\u6A21\u578B",children:[]}]},{level:3,title:"\u5904\u7406\u673A\u8C03\u5EA6",slug:"\u5904\u7406\u673A\u8C03\u5EA6",children:[{level:4,title:"\u57FA\u672C\u6982\u5FF5",slug:"\u57FA\u672C\u6982\u5FF5-1",children:[]},{level:4,title:"\u4E09\u4E2A\u5C42\u6B21",slug:"\u4E09\u4E2A\u5C42\u6B21",children:[{level:5,title:"\u9AD8\u7EA7\u8C03\u5EA6",slug:"\u9AD8\u7EA7\u8C03\u5EA6",children:[]},{level:5,title:"\u4E2D\u7EA7\u8C03\u5EA6",slug:"\u4E2D\u7EA7\u8C03\u5EA6",children:[]},{level:5,title:"\u4F4E\u7EA7\u8C03\u5EA6",slug:"\u4F4E\u7EA7\u8C03\u5EA6",children:[]}]},{level:4,title:"\u8054\u7CFB",slug:"\u8054\u7CFB",children:[]}]},{level:3,title:"\u8FDB\u7A0B\u8C03\u5EA6",slug:"\u8FDB\u7A0B\u8C03\u5EA6",children:[{level:4,title:"\u8FDB\u7A0B\u8C03\u5EA6\u7684\u65F6\u673A",slug:"\u8FDB\u7A0B\u8C03\u5EA6\u7684\u65F6\u673A",children:[]},{level:4,title:"\u8FDB\u7A0B\u8C03\u5EA6\u7684\u65B9\u5F0F",slug:"\u8FDB\u7A0B\u8C03\u5EA6\u7684\u65B9\u5F0F",children:[]},{level:4,title:"\u8FDB\u7A0B\u7684\u5207\u6362\u548C\u8FC7\u7A0B",slug:"\u8FDB\u7A0B\u7684\u5207\u6362\u548C\u8FC7\u7A0B",children:[]}]},{level:3,title:"\u8FDB\u7A0B\u540C\u6B65\u3001\u4E92\u65A5",slug:"\u8FDB\u7A0B\u540C\u6B65\u3001\u4E92\u65A5",children:[{level:4,title:"\u6982\u5FF5",slug:"\u6982\u5FF5-2",children:[]},{level:4,title:"\u4FE1\u53F7\u91CF\u673A\u5236",slug:"\u4FE1\u53F7\u91CF\u673A\u5236",children:[]}]},{level:3,title:"\u7BA1\u7A0B",slug:"\u7BA1\u7A0B",children:[{level:4,title:"\u6982\u5FF5",slug:"\u6982\u5FF5-3",children:[]}]},{level:3,title:"\u6B7B\u9501",slug:"\u6B7B\u9501",children:[{level:4,title:"\u6982\u5FF5",slug:"\u6982\u5FF5-4",children:[]},{level:4,title:"\u8FDB\u7A0B\u6B7B\u9501\u3001\u9965\u997F\u3001\u6B7B\u5FAA\u73AF\u7684\u533A\u522B",slug:"\u8FDB\u7A0B\u6B7B\u9501\u3001\u9965\u997F\u3001\u6B7B\u5FAA\u73AF\u7684\u533A\u522B",children:[]},{level:4,title:"\u6B7B\u9501\u4EA7\u751F\u7684\u5FC5\u8981\u6761\u4EF6",slug:"\u6B7B\u9501\u4EA7\u751F\u7684\u5FC5\u8981\u6761\u4EF6",children:[]},{level:4,title:"\u4EC0\u4E48\u65F6\u5019\u4F1A\u53D1\u751F\u6B7B\u9501",slug:"\u4EC0\u4E48\u65F6\u5019\u4F1A\u53D1\u751F\u6B7B\u9501",children:[]},{level:4,title:"\u6B7B\u9501\u7684\u5904\u7406\u7B56\u7565",slug:"\u6B7B\u9501\u7684\u5904\u7406\u7B56\u7565",children:[]}]},{level:3,title:"\u6B7B\u9501\u7684\u5904\u7406",slug:"\u6B7B\u9501\u7684\u5904\u7406",children:[{level:4,title:"\u4E0D\u5141\u8BB8\u6B7B\u9501\u53D1\u751F",slug:"\u4E0D\u5141\u8BB8\u6B7B\u9501\u53D1\u751F",children:[{level:5,title:"\u9759\u6001\u7B56\u7565\uFF1A\u9884\u9632\u6B7B\u9501",slug:"\u9759\u6001\u7B56\u7565-\u9884\u9632\u6B7B\u9501",children:[]},{level:5,title:"\u52A8\u6001\u7B56\u7565\uFF1A\u907F\u514D\u6B7B\u9501",slug:"\u52A8\u6001\u7B56\u7565-\u907F\u514D\u6B7B\u9501",children:[]}]},{level:4,title:"\u5141\u8BB8\u6B7B\u9501\u53D1\u751F",slug:"\u5141\u8BB8\u6B7B\u9501\u53D1\u751F",children:[]}]}]},{level:2,title:"\u7B2C\u4E09\u7AE0",slug:"\u7B2C\u4E09\u7AE0",children:[{level:3,title:"\u5185\u5B58",slug:"\u5185\u5B58",children:[{level:4,title:"\u6982\u5FF5",slug:"\u6982\u5FF5-5",children:[]},{level:4,title:"\u8FDB\u7A0B\u7684\u8FD0\u884C\u539F\u7406---\u6307\u4EE4",slug:"\u8FDB\u7A0B\u7684\u8FD0\u884C\u539F\u7406-\u6307\u4EE4",children:[]}]},{level:3,title:"\u5185\u5B58\u7BA1\u7406",slug:"\u5185\u5B58\u7BA1\u7406",children:[{level:4,title:"\u6982\u5FF5",slug:"\u6982\u5FF5-6",children:[]},{level:4,title:"\u8986\u76D6\u548C\u4EA4\u6362",slug:"\u8986\u76D6\u548C\u4EA4\u6362",children:[]},{level:4,title:"\u8FDE\u7EED\u5206\u914D\u7BA1\u7406\u65B9\u5F0F",slug:"\u8FDE\u7EED\u5206\u914D\u7BA1\u7406\u65B9\u5F0F",children:[]},{level:4,title:"\u52A8\u6001\u5206\u533A\u5206\u914D\u7B97\u6CD5",slug:"\u52A8\u6001\u5206\u533A\u5206\u914D\u7B97\u6CD5",children:[]},{level:4,title:"\u57FA\u672C\u5206\u9875\u5B58\u50A8\u7BA1\u7406",slug:"\u57FA\u672C\u5206\u9875\u5B58\u50A8\u7BA1\u7406",children:[{level:5,title:"\u4ECB\u7ECD",slug:"\u4ECB\u7ECD",children:[]},{level:5,title:"\u57FA\u672C\u5730\u5740\u53D8\u6362\u673A\u6784",slug:"\u57FA\u672C\u5730\u5740\u53D8\u6362\u673A\u6784",children:[]},{level:5,title:"\u5177\u6709\u5FEB\u8868\u7684\u5730\u5740\u53D8\u6362\u673A\u6784",slug:"\u5177\u6709\u5FEB\u8868\u7684\u5730\u5740\u53D8\u6362\u673A\u6784",children:[]},{level:5,title:"\u4E24\u7EA7\u9875\u8868",slug:"\u4E24\u7EA7\u9875\u8868",children:[]}]},{level:4,title:"\u57FA\u672C\u5206\u6BB5\u5B58\u50A8\u7BA1\u7406",slug:"\u57FA\u672C\u5206\u6BB5\u5B58\u50A8\u7BA1\u7406",children:[{level:5,title:"\u4ECB\u7ECD",slug:"\u4ECB\u7ECD-1",children:[]}]},{level:4,title:"\u6BB5\u9875\u5F0F\u7BA1\u7406\u65B9\u5F0F",slug:"\u6BB5\u9875\u5F0F\u7BA1\u7406\u65B9\u5F0F",children:[]}]},{level:3,title:"\u865A\u62DF\u5185\u5B58",slug:"\u865A\u62DF\u5185\u5B58",children:[{level:4,title:"\u6982\u5FF5",slug:"\u6982\u5FF5-7",children:[]},{level:4,title:"\u8BF7\u6C42\u5206\u9875\u5B58\u50A8\u7BA1\u7406\u65B9\u5F0F",slug:"\u8BF7\u6C42\u5206\u9875\u5B58\u50A8\u7BA1\u7406\u65B9\u5F0F",children:[]},{level:4,title:"\u9875\u9762\u7F6E\u6362\u7B97\u6CD5",slug:"\u9875\u9762\u7F6E\u6362\u7B97\u6CD5",children:[]},{level:4,title:"\u9875\u9762\u5206\u914D\u7B56\u7565",slug:"\u9875\u9762\u5206\u914D\u7B56\u7565",children:[]}]}]}],git:{updatedTime:1710173765e3,contributors:[{name:"shailene",email:"64005626+shaileneF@users.noreply.github.com",commits:1}]},filePathRelative:"java/\u8BA1\u7B97\u673A\u57FA\u7840\u77E5\u8BC6/\u64CD\u4F5C\u7CFB\u7EDF/\u64CD\u4F5C\u7CFB\u7EDF.md"};export{l as data}; +const l={key:"v-d2a5a678",path:"/java/%E8%AE%A1%E7%AE%97%E6%9C%BA%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F/%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F.html",title:"\u64CD\u4F5C\u7CFB\u7EDF",lang:"zh-CN",frontmatter:{},excerpt:"",headers:[{level:2,title:"\u7B2C\u4E00\u7AE0",slug:"\u7B2C\u4E00\u7AE0",children:[{level:3,title:"\u64CD\u4F5C\u7CFB\u7EDF\u7684\u6982\u5FF5\u3001\u529F\u80FD\u548C\u76EE\u6807",slug:"\u64CD\u4F5C\u7CFB\u7EDF\u7684\u6982\u5FF5\u3001\u529F\u80FD\u548C\u76EE\u6807",children:[]},{level:3,title:"\u64CD\u4F5C\u7CFB\u7EDF\u7684\u56DB\u4E2A\u7279\u5F81",slug:"\u64CD\u4F5C\u7CFB\u7EDF\u7684\u56DB\u4E2A\u7279\u5F81",children:[{level:4,title:"\u5E76\u53D1",slug:"\u5E76\u53D1",children:[]},{level:4,title:"\u5171\u4EAB",slug:"\u5171\u4EAB",children:[]},{level:4,title:"\u865A\u62DF",slug:"\u865A\u62DF",children:[]},{level:4,title:"\u5F02\u6B65",slug:"\u5F02\u6B65",children:[]}]},{level:3,title:"\u64CD\u4F5C\u7CFB\u7EDF\u7684\u53D1\u5C55\u548C\u5206\u7C7B",slug:"\u64CD\u4F5C\u7CFB\u7EDF\u7684\u53D1\u5C55\u548C\u5206\u7C7B",children:[]},{level:3,title:"\u64CD\u4F5C\u7CFB\u7EDF\u7684\u8FD0\u884C\u673A\u5236\u548C\u4F53\u7CFB\u7ED3\u6784",slug:"\u64CD\u4F5C\u7CFB\u7EDF\u7684\u8FD0\u884C\u673A\u5236\u548C\u4F53\u7CFB\u7ED3\u6784",children:[{level:4,title:"\u8FD0\u884C\u673A\u5236",slug:"\u8FD0\u884C\u673A\u5236",children:[]},{level:4,title:"\u64CD\u4F5C\u7CFB\u7EDF\u5185\u6838",slug:"\u64CD\u4F5C\u7CFB\u7EDF\u5185\u6838",children:[]},{level:4,title:"\u64CD\u4F5C\u7CFB\u7EDF\u4F53\u7CFB\u7ED3\u6784",slug:"\u64CD\u4F5C\u7CFB\u7EDF\u4F53\u7CFB\u7ED3\u6784",children:[]}]},{level:3,title:"\u4E2D\u65AD\u548C\u5F02\u5E38",slug:"\u4E2D\u65AD\u548C\u5F02\u5E38",children:[{level:4,title:"\u4E2D\u65AD\u673A\u5236\u7684\u8BDE\u751F",slug:"\u4E2D\u65AD\u673A\u5236\u7684\u8BDE\u751F",children:[]},{level:4,title:"\u4E2D\u65AD\u7684\u6982\u5FF5\u548C\u4F5C\u7528",slug:"\u4E2D\u65AD\u7684\u6982\u5FF5\u548C\u4F5C\u7528",children:[]},{level:4,title:"\u4E2D\u65AD\u7684\u5206\u7C7B",slug:"\u4E2D\u65AD\u7684\u5206\u7C7B",children:[]},{level:4,title:"\u5916\u4E2D\u65AD\u7684\u5904\u7406\u8FC7\u7A0B",slug:"\u5916\u4E2D\u65AD\u7684\u5904\u7406\u8FC7\u7A0B",children:[]}]},{level:3,title:"\u7CFB\u7EDF\u8C03\u7528",slug:"\u7CFB\u7EDF\u8C03\u7528",children:[{level:4,title:"\u6982\u8FF0",slug:"\u6982\u8FF0",children:[]},{level:4,title:"\u7CFB\u7EDF\u8C03\u7528\u5206\u7C7B",slug:"\u7CFB\u7EDF\u8C03\u7528\u5206\u7C7B",children:[]},{level:4,title:"\u7CFB\u7EDF\u8C03\u7528\u4E0E\u5E93\u51FD\u6570\u7684\u533A\u522B",slug:"\u7CFB\u7EDF\u8C03\u7528\u4E0E\u5E93\u51FD\u6570\u7684\u533A\u522B",children:[]},{level:4,title:"\u7CFB\u7EDF\u8C03\u7528\u80CC\u540E\u7684\u8FC7\u7A0B",slug:"\u7CFB\u7EDF\u8C03\u7528\u80CC\u540E\u7684\u8FC7\u7A0B",children:[]}]}]},{level:2,title:"\u7B2C\u4E8C\u7AE0",slug:"\u7B2C\u4E8C\u7AE0",children:[{level:3,title:"\u8FDB\u7A0B",slug:"\u8FDB\u7A0B",children:[{level:4,title:"\u8FDB\u7A0B\u7684\u5B9A\u4E49",slug:"\u8FDB\u7A0B\u7684\u5B9A\u4E49",children:[]},{level:4,title:"\u8FDB\u7A0B\u7684\u7EC4\u6210",slug:"\u8FDB\u7A0B\u7684\u7EC4\u6210",children:[]},{level:4,title:"\u8FDB\u7A0B\u7684\u7EC4\u7EC7\u65B9\u5F0F",slug:"\u8FDB\u7A0B\u7684\u7EC4\u7EC7\u65B9\u5F0F",children:[]},{level:4,title:"\u8FDB\u7A0B\u7684\u7279\u5F81",slug:"\u8FDB\u7A0B\u7684\u7279\u5F81",children:[]},{level:4,title:"\u8FDB\u7A0B\u7684\u72B6\u6001\u548C\u8F6C\u6362",slug:"\u8FDB\u7A0B\u7684\u72B6\u6001\u548C\u8F6C\u6362",children:[{level:5,title:"\u8FDB\u7A0B\u7684\u72B6\u6001",slug:"\u8FDB\u7A0B\u7684\u72B6\u6001",children:[]},{level:5,title:"\u8FDB\u7A0B\u72B6\u6001\u7684\u8F6C\u6362",slug:"\u8FDB\u7A0B\u72B6\u6001\u7684\u8F6C\u6362",children:[]}]}]},{level:3,title:"\u8FDB\u7A0B\u63A7\u5236",slug:"\u8FDB\u7A0B\u63A7\u5236",children:[{level:4,title:"\u57FA\u672C\u6982\u5FF5",slug:"\u57FA\u672C\u6982\u5FF5",children:[]},{level:4,title:"\u8FDB\u7A0B\u63A7\u5236\u76F8\u5173\u7684\u539F\u8BED",slug:"\u8FDB\u7A0B\u63A7\u5236\u76F8\u5173\u7684\u539F\u8BED",children:[]}]},{level:3,title:"\u8FDB\u7A0B\u901A\u4FE1",slug:"\u8FDB\u7A0B\u901A\u4FE1",children:[{level:4,title:"\u6982\u5FF5",slug:"\u6982\u5FF5",children:[]},{level:4,title:"\u5171\u4EAB\u5B58\u50A8",slug:"\u5171\u4EAB\u5B58\u50A8",children:[]},{level:4,title:"\u6D88\u606F\u4F20\u9012",slug:"\u6D88\u606F\u4F20\u9012",children:[]},{level:4,title:"\u7BA1\u9053\u901A\u4FE1",slug:"\u7BA1\u9053\u901A\u4FE1",children:[]}]},{level:3,title:"\u7EBF\u7A0B\u548C\u591A\u7EBF\u7A0B\u6A21\u578B",slug:"\u7EBF\u7A0B\u548C\u591A\u7EBF\u7A0B\u6A21\u578B",children:[{level:4,title:"\u6982\u5FF5",slug:"\u6982\u5FF5-1",children:[]},{level:4,title:"\u5F15\u5165\u7EBF\u7A0B\u673A\u5236\u540E\u7684\u53D8\u5316",slug:"\u5F15\u5165\u7EBF\u7A0B\u673A\u5236\u540E\u7684\u53D8\u5316",children:[]},{level:4,title:"\u7EBF\u7A0B\u6709\u54EA\u4E9B\u5C5E\u6027",slug:"\u7EBF\u7A0B\u6709\u54EA\u4E9B\u5C5E\u6027",children:[]},{level:4,title:"\u7EBF\u7A0B\u7684\u5B9E\u73B0\u65B9\u5F0F",slug:"\u7EBF\u7A0B\u7684\u5B9E\u73B0\u65B9\u5F0F",children:[]},{level:4,title:"\u591A\u7EBF\u7A0B\u6A21\u578B",slug:"\u591A\u7EBF\u7A0B\u6A21\u578B",children:[]}]},{level:3,title:"\u5904\u7406\u673A\u8C03\u5EA6",slug:"\u5904\u7406\u673A\u8C03\u5EA6",children:[{level:4,title:"\u57FA\u672C\u6982\u5FF5",slug:"\u57FA\u672C\u6982\u5FF5-1",children:[]},{level:4,title:"\u4E09\u4E2A\u5C42\u6B21",slug:"\u4E09\u4E2A\u5C42\u6B21",children:[{level:5,title:"\u9AD8\u7EA7\u8C03\u5EA6",slug:"\u9AD8\u7EA7\u8C03\u5EA6",children:[]},{level:5,title:"\u4E2D\u7EA7\u8C03\u5EA6",slug:"\u4E2D\u7EA7\u8C03\u5EA6",children:[]},{level:5,title:"\u4F4E\u7EA7\u8C03\u5EA6",slug:"\u4F4E\u7EA7\u8C03\u5EA6",children:[]}]},{level:4,title:"\u8054\u7CFB",slug:"\u8054\u7CFB",children:[]}]},{level:3,title:"\u8FDB\u7A0B\u8C03\u5EA6",slug:"\u8FDB\u7A0B\u8C03\u5EA6",children:[{level:4,title:"\u8FDB\u7A0B\u8C03\u5EA6\u7684\u65F6\u673A",slug:"\u8FDB\u7A0B\u8C03\u5EA6\u7684\u65F6\u673A",children:[]},{level:4,title:"\u8FDB\u7A0B\u8C03\u5EA6\u7684\u65B9\u5F0F",slug:"\u8FDB\u7A0B\u8C03\u5EA6\u7684\u65B9\u5F0F",children:[]},{level:4,title:"\u8FDB\u7A0B\u7684\u5207\u6362\u548C\u8FC7\u7A0B",slug:"\u8FDB\u7A0B\u7684\u5207\u6362\u548C\u8FC7\u7A0B",children:[]}]},{level:3,title:"\u8FDB\u7A0B\u540C\u6B65\u3001\u4E92\u65A5",slug:"\u8FDB\u7A0B\u540C\u6B65\u3001\u4E92\u65A5",children:[{level:4,title:"\u6982\u5FF5",slug:"\u6982\u5FF5-2",children:[]},{level:4,title:"\u4FE1\u53F7\u91CF\u673A\u5236",slug:"\u4FE1\u53F7\u91CF\u673A\u5236",children:[]}]},{level:3,title:"\u7BA1\u7A0B",slug:"\u7BA1\u7A0B",children:[{level:4,title:"\u6982\u5FF5",slug:"\u6982\u5FF5-3",children:[]}]},{level:3,title:"\u6B7B\u9501",slug:"\u6B7B\u9501",children:[{level:4,title:"\u6982\u5FF5",slug:"\u6982\u5FF5-4",children:[]},{level:4,title:"\u8FDB\u7A0B\u6B7B\u9501\u3001\u9965\u997F\u3001\u6B7B\u5FAA\u73AF\u7684\u533A\u522B",slug:"\u8FDB\u7A0B\u6B7B\u9501\u3001\u9965\u997F\u3001\u6B7B\u5FAA\u73AF\u7684\u533A\u522B",children:[]},{level:4,title:"\u6B7B\u9501\u4EA7\u751F\u7684\u5FC5\u8981\u6761\u4EF6",slug:"\u6B7B\u9501\u4EA7\u751F\u7684\u5FC5\u8981\u6761\u4EF6",children:[]},{level:4,title:"\u4EC0\u4E48\u65F6\u5019\u4F1A\u53D1\u751F\u6B7B\u9501",slug:"\u4EC0\u4E48\u65F6\u5019\u4F1A\u53D1\u751F\u6B7B\u9501",children:[]},{level:4,title:"\u6B7B\u9501\u7684\u5904\u7406\u7B56\u7565",slug:"\u6B7B\u9501\u7684\u5904\u7406\u7B56\u7565",children:[]}]},{level:3,title:"\u6B7B\u9501\u7684\u5904\u7406",slug:"\u6B7B\u9501\u7684\u5904\u7406",children:[{level:4,title:"\u4E0D\u5141\u8BB8\u6B7B\u9501\u53D1\u751F",slug:"\u4E0D\u5141\u8BB8\u6B7B\u9501\u53D1\u751F",children:[{level:5,title:"\u9759\u6001\u7B56\u7565\uFF1A\u9884\u9632\u6B7B\u9501",slug:"\u9759\u6001\u7B56\u7565-\u9884\u9632\u6B7B\u9501",children:[]},{level:5,title:"\u52A8\u6001\u7B56\u7565\uFF1A\u907F\u514D\u6B7B\u9501",slug:"\u52A8\u6001\u7B56\u7565-\u907F\u514D\u6B7B\u9501",children:[]}]},{level:4,title:"\u5141\u8BB8\u6B7B\u9501\u53D1\u751F",slug:"\u5141\u8BB8\u6B7B\u9501\u53D1\u751F",children:[]}]}]},{level:2,title:"\u7B2C\u4E09\u7AE0",slug:"\u7B2C\u4E09\u7AE0",children:[{level:3,title:"\u5185\u5B58",slug:"\u5185\u5B58",children:[{level:4,title:"\u6982\u5FF5",slug:"\u6982\u5FF5-5",children:[]},{level:4,title:"\u8FDB\u7A0B\u7684\u8FD0\u884C\u539F\u7406---\u6307\u4EE4",slug:"\u8FDB\u7A0B\u7684\u8FD0\u884C\u539F\u7406-\u6307\u4EE4",children:[]}]},{level:3,title:"\u5185\u5B58\u7BA1\u7406",slug:"\u5185\u5B58\u7BA1\u7406",children:[{level:4,title:"\u6982\u5FF5",slug:"\u6982\u5FF5-6",children:[]},{level:4,title:"\u8986\u76D6\u548C\u4EA4\u6362",slug:"\u8986\u76D6\u548C\u4EA4\u6362",children:[]},{level:4,title:"\u8FDE\u7EED\u5206\u914D\u7BA1\u7406\u65B9\u5F0F",slug:"\u8FDE\u7EED\u5206\u914D\u7BA1\u7406\u65B9\u5F0F",children:[]},{level:4,title:"\u52A8\u6001\u5206\u533A\u5206\u914D\u7B97\u6CD5",slug:"\u52A8\u6001\u5206\u533A\u5206\u914D\u7B97\u6CD5",children:[]},{level:4,title:"\u57FA\u672C\u5206\u9875\u5B58\u50A8\u7BA1\u7406",slug:"\u57FA\u672C\u5206\u9875\u5B58\u50A8\u7BA1\u7406",children:[{level:5,title:"\u4ECB\u7ECD",slug:"\u4ECB\u7ECD",children:[]},{level:5,title:"\u57FA\u672C\u5730\u5740\u53D8\u6362\u673A\u6784",slug:"\u57FA\u672C\u5730\u5740\u53D8\u6362\u673A\u6784",children:[]},{level:5,title:"\u5177\u6709\u5FEB\u8868\u7684\u5730\u5740\u53D8\u6362\u673A\u6784",slug:"\u5177\u6709\u5FEB\u8868\u7684\u5730\u5740\u53D8\u6362\u673A\u6784",children:[]},{level:5,title:"\u4E24\u7EA7\u9875\u8868",slug:"\u4E24\u7EA7\u9875\u8868",children:[]}]},{level:4,title:"\u57FA\u672C\u5206\u6BB5\u5B58\u50A8\u7BA1\u7406",slug:"\u57FA\u672C\u5206\u6BB5\u5B58\u50A8\u7BA1\u7406",children:[{level:5,title:"\u4ECB\u7ECD",slug:"\u4ECB\u7ECD-1",children:[]}]},{level:4,title:"\u6BB5\u9875\u5F0F\u7BA1\u7406\u65B9\u5F0F",slug:"\u6BB5\u9875\u5F0F\u7BA1\u7406\u65B9\u5F0F",children:[]}]},{level:3,title:"\u865A\u62DF\u5185\u5B58",slug:"\u865A\u62DF\u5185\u5B58",children:[{level:4,title:"\u6982\u5FF5",slug:"\u6982\u5FF5-7",children:[]},{level:4,title:"\u8BF7\u6C42\u5206\u9875\u5B58\u50A8\u7BA1\u7406\u65B9\u5F0F",slug:"\u8BF7\u6C42\u5206\u9875\u5B58\u50A8\u7BA1\u7406\u65B9\u5F0F",children:[]},{level:4,title:"\u9875\u9762\u7F6E\u6362\u7B97\u6CD5",slug:"\u9875\u9762\u7F6E\u6362\u7B97\u6CD5",children:[]},{level:4,title:"\u9875\u9762\u5206\u914D\u7B56\u7565",slug:"\u9875\u9762\u5206\u914D\u7B56\u7565",children:[]}]}]}],git:{updatedTime:1710173784e3,contributors:[{name:"shailene",email:"64005626+shaileneF@users.noreply.github.com",commits:1}]},filePathRelative:"java/\u8BA1\u7B97\u673A\u57FA\u7840\u77E5\u8BC6/\u64CD\u4F5C\u7CFB\u7EDF/\u64CD\u4F5C\u7CFB\u7EDF.md"};export{l as data}; diff --git "a/assets/\350\256\276\350\256\241\346\250\241\345\274\2171.html.59f2acaf.js" "b/assets/\350\256\276\350\256\241\346\250\241\345\274\2171.html.38456b0f.js" similarity index 99% rename from "assets/\350\256\276\350\256\241\346\250\241\345\274\2171.html.59f2acaf.js" rename to "assets/\350\256\276\350\256\241\346\250\241\345\274\2171.html.38456b0f.js" index ce0f10d6..a3f35310 100644 --- "a/assets/\350\256\276\350\256\241\346\250\241\345\274\2171.html.59f2acaf.js" +++ "b/assets/\350\256\276\350\256\241\346\250\241\345\274\2171.html.38456b0f.js" @@ -1,4 +1,4 @@ -import{_ as p,r as t,o as e,c as o,a as n,b as c,F as l,d as s,e as i}from"./app.0d029894.js";const u={},k=n("h1",{id:"\u8BBE\u8BA1\u6A21\u5F0F",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u8BBE\u8BA1\u6A21\u5F0F","aria-hidden":"true"},"#"),s(" \u8BBE\u8BA1\u6A21\u5F0F")],-1),r={href:"https://time.geekbang.org/column/intro/250?tab=catalog",target:"_blank",rel:"noopener noreferrer"},d=s("\u6781\u5BA2\u65F6\u95F4\u8BBE\u8BA1\u6A21\u5F0F\u4E4B\u7F8E"),m=s("\u7B14\u8BB0\u6574\u7406"),g=i(`

                                                                      1. \u6982\u8FF0

                                                                      \u91CD\u70B9\u8BB0\u5F5523\u79CD\u7ECF\u5178\u7684\u8BBE\u8BA1\u6A21\u5F0F\u3002

                                                                      \u8BBE\u8BA1\u6A21\u5F0F\u4E3B\u8981\u89E3\u51B3\u7684\u662F\u4EE3\u7801\u7684\u53EF\u6269\u5C55\u6027\u95EE\u9898\u3002

                                                                      \u867D\u7136\u4F7F\u7528\u8BBE\u8BA1\u6A21\u5F0F\u53EF\u4EE5\u63D0\u9AD8\u4EE3\u7801\u7684\u53EF\u6269\u5C55\u6027\uFF0C\u4F46\u8FC7\u5EA6\u4E0D\u6070\u5F53\u5730\u4F7F\u7528\uFF0C\u4E5F\u4F1A\u589E\u52A0\u4EE3\u7801\u7684\u590D\u6742\u5EA6\uFF0C\u964D\u4F4E\u4EE3\u7801\u7684\u53EF\u8BFB\u6027\u3002\u5728\u5F00\u53D1\u521D\u671F\uFF0C\u9664\u975E\u7279\u522B\u5FC5\u987B\uFF0C\u6211\u4EEC\u4E00\u5B9A\u4E0D\u8981\u8FC7\u5EA6\u8BBE\u8BA1\uFF0C\u5E94\u7528\u590D\u6742\u7684\u8BBE\u8BA1\u6A21\u5F0F\u3002

                                                                      \u4ED6\u4EEC\u53EF\u4EE5\u5206\u4E3A\u4E09\u5927\u7C7B\uFF1A

                                                                      • \u521B\u5EFA\u578B
                                                                      • \u7ED3\u6784\u6027
                                                                      • \u884C\u4E3A\u578B

                                                                      \u5BF9\u4E8E\u8FD923\u79CD\u8BBE\u8BA1\u6A21\u5F0F\u7684\u5B66\u4E60\uFF0C\u8981\u6709\u4FA7\u91CD\u70B9\uFF0C\u56E0\u4E3A\u6709\u4E9B\u6A21\u5F0F\u662F\u6BD4\u8F83\u5E38\u7528\u7684\uFF0C\u6709\u4E9B\u6A21\u5F0F\u662F\u5F88\u5C11\u88AB\u7528\u5230\u7684\u3002\u5BF9\u4E8E\u4E0D\u5E38\u7528\u7684\u8BBE\u8BA1\u6A21\u5F0F\uFF0C\u7A0D\u5FAE\u4E86\u89E3\u5373\u53EF\u3002

                                                                      \u521B\u5EFA\u578B\uFF1A

                                                                      • \u5E38\u7528\u7684\u6709\uFF1A\u5355\u4F8B\u6A21\u5F0F\u3001\u5DE5\u5382\u6A21\u5F0F\uFF08\u5DE5\u5382\u65B9\u6CD5\u548C\u62BD\u8C61\u5DE5\u5382\uFF09\u3001\u5EFA\u9020\u8005\u6A21\u5F0F\u3002
                                                                      • \u4E0D\u5E38\u7528\u7684\u6709\uFF1A\u539F\u578B\u6A21\u5F0F\u3002

                                                                      \u7ED3\u6784\u578B\uFF1A

                                                                      • \u5E38\u7528\u7684\u6709\uFF1A\u4EE3\u7406\u6A21\u5F0F\u3001\u6865\u63A5\u6A21\u5F0F\u3001\u88C5\u9970\u8005\u6A21\u5F0F\u3001\u9002\u914D\u5668\u6A21\u5F0F\u3002
                                                                      • \u4E0D\u5E38\u7528\u7684\u6709\uFF1A\u95E8\u9762\u6A21\u5F0F\u3001\u7EC4\u5408\u6A21\u5F0F\u3001\u4EAB\u5143\u6A21\u5F0F\u3002

                                                                      \u884C\u4E3A\u578B\uFF1A

                                                                      • \u5E38\u7528\u7684\u6709\uFF1A\u89C2\u5BDF\u8005\u6A21\u5F0F\u3001\u6A21\u677F\u6A21\u5F0F\u3001\u7B56\u7565\u6A21\u5F0F\u3001\u804C\u8D23\u94FE\u6A21\u5F0F\u3001\u8FED\u4EE3\u5668\u6A21\u5F0F\u3001\u72B6\u6001\u6A21\u5F0F\u3002
                                                                      • \u4E0D\u5E38\u7528\u7684\u6709\uFF1A\u8BBF\u95EE\u8005\u6A21\u5F0F\u3001\u5907\u5FD8\u5F55\u6A21\u5F0F\u3001\u547D\u4EE4\u6A21\u5F0F\u3001\u89E3\u91CA\u5668\u6A21\u5F0F\u3001\u4E2D\u4ECB\u6A21\u5F0F\u3002

                                                                      2. \u91CD\u6784

                                                                      \u5728\u8F6F\u4EF6\u5F00\u53D1\u4E2D\uFF0C\u53EA\u8981\u8F6F\u4EF6\u5728\u4E0D\u505C\u5730\u8FED\u4EE3\uFF0C\u5C31\u6CA1\u6709\u4E00\u52B3\u6C38\u9038\u7684\u8BBE\u8BA1\u3002\u968F\u7740\u9700\u6C42\u7684\u53D8\u5316\uFF0C\u4EE3\u7801\u7684\u4E0D\u505C\u5806\u780C\uFF0C\u539F\u6709\u7684\u8BBE\u8BA1\u5FC5\u5B9A\u4F1A\u5B58\u5728\u8FD9\u6837\u90A3\u6837\u7684\u95EE\u9898\u3002\u9488\u5BF9\u8FD9\u4E9B\u95EE\u9898\uFF0C\u6211\u4EEC\u5C31\u9700\u8981\u8FDB\u884C\u4EE3\u7801\u91CD\u6784\u3002\u91CD\u6784\u662F\u8F6F\u4EF6\u5F00\u53D1\u4E2D\u975E\u5E38\u91CD\u8981\u7684\u4E00\u4E2A\u73AF\u8282\u3002\u6301\u7EED\u91CD\u6784\u662F\u4FDD\u6301\u4EE3\u7801\u8D28\u91CF\u4E0D\u4E0B\u964D\u7684\u6709\u6548\u624B\u6BB5\uFF0C\u80FD\u6709\u6548\u907F\u514D\u4EE3\u7801\u8150\u5316\u5230\u65E0\u53EF\u6551\u836F\u7684\u5730\u6B65\u3002

                                                                      \u628A\u91CD\u6784\u5F53\u4F5C\u5F00\u53D1\u7684\u4E00\u90E8\u5206\uFF0C\u878D\u5165\u5230\u65E5\u5E38\u5F00\u53D1\u4E2D\u3002

                                                                      \u9762\u5411\u5BF9\u8C61\u3001\u8BBE\u8BA1\u539F\u5219\u3001\u8BBE\u8BA1\u6A21\u5F0F\u3001\u7F16\u7A0B\u89C4\u8303\u3001\u91CD\u6784\u4E94\u8005\u7684\u5173\u7CFB\uFF1A

                                                                      • \u9762\u5411\u5BF9\u8C61\u7F16\u7A0B\u56E0\u4E3A\u5176\u5177\u6709\u4E30\u5BCC\u7684\u7279\u6027\uFF08\u5C01\u88C5\u3001\u96C6\u6210\u3001\u591A\u6001\u3001\u62BD\u8C61\u7B49\uFF09\uFF0C\u53EF\u4EE5\u5B9E\u73B0\u5F88\u590D\u6742\u7684\u8BBE\u8BA1\u601D\u8DEF\uFF0C\u662F\u5F88\u591A\u8BBE\u8BA1\u539F\u5219\u3001\u8BBE\u8BA1\u6A21\u5F0F\u7B49\u7F16\u7801\u5B9E\u73B0\u7684\u57FA\u7840\u3002
                                                                      • \u8BBE\u8BA1\u539F\u5219\u662F\u6307\u5BFC\u6211\u4EEC\u4EE3\u7801\u8BBE\u8BA1\u7684\u4E00\u4E9B\u7ECF\u9A8C\u603B\u7ED3\uFF0C\u5BF9\u4E8E\u67D0\u4E9B\u573A\u666F\u4E0B\uFF0C\u662F\u5426\u5E94\u8BE5\u5E94\u7528\u67D0\u79CD\u8BBE\u8BA1\u6A21\u5F0F\uFF0C\u5177\u6709\u6307\u5BFC\u610F\u4E49\uFF0C\u6BD4\u5982\uFF0C\u201C\u5F00\u95ED\u539F\u5219\u201D\u662F\u5F88\u591A\u8BBE\u8BA1\u6A21\u5F0F\uFF08\u7B56\u7565\u3001\u6A21\u677F\u7B49\uFF09\u7684\u6307\u5BFC\u539F\u5219\u3002
                                                                      • \u8BBE\u8BA1\u6A21\u5F0F\u662F\u9488\u5BF9\u8F6F\u4EF6\u5F00\u53D1\u4E2D\u7ECF\u5E38\u9047\u5230\u7684\u4E00\u4E9B\u8BBE\u8BA1\u95EE\u9898\uFF0C\u603B\u7ED3\u51FA\u6765\u7684\u4E00\u5957\u89E3\u51B3\u65B9\u6848\u6216\u8005\u8BBE\u8BA1\u601D\u8DEF\u3002\u4ECE\u62BD\u8C61\u7A0B\u5EA6\u4E0A\u6765\u8BB2\uFF0C\u8BBE\u8BA1\u539F\u5219\u6BD4\u8BBE\u8BA1\u6A21\u5F0F\u66F4\u62BD\u8C61\u3002\u8BBE\u8BA1\u6A21\u5F0F\u66F4\u52A0\u5177\u4F53\u3001\u66F4\u52A0\u53EF\u6267\u884C\u3002
                                                                      • \u7F16\u7A0B\u89C4\u8303\u4E3B\u8981\u89E3\u51B3\u7684\u662F\u4EE3\u7801\u7684\u53EF\u8BFB\u6027\u95EE\u9898\u3002\u7F16\u7801\u89C4\u8303\u76F8\u5BF9\u4E8E\u8BBE\u8BA1\u539F\u5219\u3001\u8BBE\u8BA1\u6A21\u5F0F\uFF0C\u66F4\u52A0\u5177\u4F53\u3001\u66F4\u52A0\u504F\u91CD\u4EE3\u7801\u7EC6\u8282\u3001\u66F4\u52A0\u80FD\u843D\u5730\u3002\u6301\u7EED\u7684\u5C0F\u91CD\u6784\u4F9D\u8D56\u7684\u7406\u8BBA\u57FA\u7840\u4E3B\u8981\u5C31\u662F\u7F16\u7A0B\u89C4\u8303\u3002

                                                                      3. \u9762\u5411\u5BF9\u8C61

                                                                      \u9762\u5411\u5BF9\u8C61\u7F16\u7A0B\u662F\u4E00\u79CD\u7F16\u7A0B\u8303\u5F0F\u6216\u8005\u8BF4\u7F16\u7A0B\u98CE\u683C\uFF0C\u5B83\u4EE5\u7C7B\u6216\u5BF9\u8C61\u4F5C\u4E3A\u7EC4\u7EC7\u4EE3\u7801\u7684\u57FA\u672C\u5355\u5143\uFF0C\u5E76\u5C06\u5C01\u88C5\u3001\u62BD\u8C61\u3001\u7EE7\u627F\u3001\u591A\u6001\u56DB\u4E2A\u7279\u6027\uFF0C\u4F5C\u4E3A\u4EE3\u7801\u8BBE\u8BA1\u548C\u5B9E\u73B0\u7684\u57FA\u77F3 \u3002

                                                                      • \u5982\u4F55\u5224\u5B9A\u4E00\u4E2A\u8BED\u8A00\u662F\u9762\u5411\u5BF9\u8C61\u7F16\u7A0B\u8BED\u8A00

                                                                        \u5982\u679C\u6309\u7167\u4E25\u683C\u7684\u7684\u5B9A\u4E49\uFF0C\u9700\u8981\u6709\u73B0\u6210\u7684\u8BED\u6CD5\u652F\u6301\u7C7B\u3001\u5BF9\u8C61\u3001\u56DB\u5927\u7279\u6027\u624D\u80FD\u53EB\u4F5C\u9762\u5411\u5BF9\u8C61\u7F16\u7A0B\u8BED\u8A00\u3002\u5982\u679C\u653E\u5BBD\u8981\u6C42\u7684\u8BDD\uFF0C\u53EA\u8981\u67D0\u79CD\u7F16\u7A0B\u8BED\u8A00\u652F\u6301\u7C7B\u3001\u5BF9\u8C61\u8BED\u6CD5\u673A\u5236\uFF0C\u90A3\u57FA\u672C\u4E0A\u5C31\u53EF\u4EE5\u8BF4\u8FD9\u79CD\u7F16\u7A0B\u8BED\u8A00\u662F\u9762\u5411\u5BF9\u8C61\u7F16\u7A0B\u8BED\u8A00\u4E86\uFF0C\u4E0D\u4E00\u5B9A\u975E\u5F97\u8981\u6C42\u5177\u6709\u6240\u6709\u7684\u56DB\u5927\u7279\u6027\u3002

                                                                      \u7406\u89E3\u9762\u5411\u5BF9\u8C61\u7F16\u7A0B\u53CA\u9762\u5411\u5BF9\u8C61\u7F16\u7A0B\u8BED\u8A00\u7684\u5173\u952E\u5C31\u662F\u7406\u89E3\u5176\u56DB\u5927\u7279\u6027\uFF1A\u5C01\u88C5\u3001\u7EE7\u627F\u3001\u591A\u6001\u3001\u62BD\u8C61\u3002\u4E0D\u8FC7\u5BF9\u4E8E\u8FD9\u56DB\u5927\u7279\u6027\uFF0C\u5149\u77E5\u9053\u4ED6\u4EEC\u7684\u5B9A\u4E49\u662F\u4E0D\u591F\u7684\uFF0C\u6211\u4EEC\u8FD8\u8981\u77E5\u9053\u6BCF\u4E2A\u7279\u6027\u7684\u610F\u4E49\u548C\u76EE\u7684\uFF0C\u4EE5\u53CA\u4ED6\u4EEC\u80FD\u89E3\u51B3\u54EA\u4E9B\u7F16\u7A0B\u95EE\u9898\u3002

                                                                      3.1\u5C01\u88C5

                                                                      3.1.1 \u5C01\u88C5\u7684\u5B9A\u4E49

                                                                      \u5C01\u88C5\u4E5F\u53EB\u505A\u4FE1\u606F\u9690\u85CF\u6216\u6570\u636E\u8BBF\u95EE\u4FDD\u62A4\u3002\u7C7B\u901A\u8FC7\u66B4\u9732\u6709\u9650\u7684\u8BBF\u95EE\u63A5\u53E3\uFF0C\u6388\u6743\u5916\u90E8\u4EC5\u80FD\u901A\u8FC7\u7C7B\u63D0\u4F9B\u7684\u65B9\u5F0F\uFF08\u6216\u8005\u53EB\u51FD\u6570\uFF09\u6765\u8BBF\u95EE\u5185\u90E8\u4FE1\u606F\u6216\u8005\u6570\u636E\u3002

                                                                      \u7C7B\u7684\u5C5E\u6027\u901A\u5E38\u88AB\u8BBE\u8BA1\u4E3A\u79C1\u6709\u7684\uFF0C\u901A\u8FC7\u56FA\u6709\u7684get\u65B9\u6CD5\u8FDB\u884C\u8BBF\u95EE\uFF0C\u5916\u90E8\u4E0D\u80FD\u5BF9\u8FD9\u4E9B\u79C1\u6709\u5C5E\u6027\u8FDB\u884C\u76F4\u63A5\u8BBF\u95EE\u548C\u4FEE\u6539\u3002

                                                                      \u865A\u62DF\u94B1\u5305\u7C7B\u7684\u4EE3\u7801\u793A\u4F8B\uFF1A

                                                                      
                                                                      +import{_ as p,r as t,o as e,c as o,a as n,b as c,F as l,d as s,e as i}from"./app.f8791b52.js";const u={},k=n("h1",{id:"\u8BBE\u8BA1\u6A21\u5F0F",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u8BBE\u8BA1\u6A21\u5F0F","aria-hidden":"true"},"#"),s(" \u8BBE\u8BA1\u6A21\u5F0F")],-1),r={href:"https://time.geekbang.org/column/intro/250?tab=catalog",target:"_blank",rel:"noopener noreferrer"},d=s("\u6781\u5BA2\u65F6\u95F4\u8BBE\u8BA1\u6A21\u5F0F\u4E4B\u7F8E"),m=s("\u7B14\u8BB0\u6574\u7406"),g=i(`

                                                                      1. \u6982\u8FF0

                                                                      \u91CD\u70B9\u8BB0\u5F5523\u79CD\u7ECF\u5178\u7684\u8BBE\u8BA1\u6A21\u5F0F\u3002

                                                                      \u8BBE\u8BA1\u6A21\u5F0F\u4E3B\u8981\u89E3\u51B3\u7684\u662F\u4EE3\u7801\u7684\u53EF\u6269\u5C55\u6027\u95EE\u9898\u3002

                                                                      \u867D\u7136\u4F7F\u7528\u8BBE\u8BA1\u6A21\u5F0F\u53EF\u4EE5\u63D0\u9AD8\u4EE3\u7801\u7684\u53EF\u6269\u5C55\u6027\uFF0C\u4F46\u8FC7\u5EA6\u4E0D\u6070\u5F53\u5730\u4F7F\u7528\uFF0C\u4E5F\u4F1A\u589E\u52A0\u4EE3\u7801\u7684\u590D\u6742\u5EA6\uFF0C\u964D\u4F4E\u4EE3\u7801\u7684\u53EF\u8BFB\u6027\u3002\u5728\u5F00\u53D1\u521D\u671F\uFF0C\u9664\u975E\u7279\u522B\u5FC5\u987B\uFF0C\u6211\u4EEC\u4E00\u5B9A\u4E0D\u8981\u8FC7\u5EA6\u8BBE\u8BA1\uFF0C\u5E94\u7528\u590D\u6742\u7684\u8BBE\u8BA1\u6A21\u5F0F\u3002

                                                                      \u4ED6\u4EEC\u53EF\u4EE5\u5206\u4E3A\u4E09\u5927\u7C7B\uFF1A

                                                                      • \u521B\u5EFA\u578B
                                                                      • \u7ED3\u6784\u6027
                                                                      • \u884C\u4E3A\u578B

                                                                      \u5BF9\u4E8E\u8FD923\u79CD\u8BBE\u8BA1\u6A21\u5F0F\u7684\u5B66\u4E60\uFF0C\u8981\u6709\u4FA7\u91CD\u70B9\uFF0C\u56E0\u4E3A\u6709\u4E9B\u6A21\u5F0F\u662F\u6BD4\u8F83\u5E38\u7528\u7684\uFF0C\u6709\u4E9B\u6A21\u5F0F\u662F\u5F88\u5C11\u88AB\u7528\u5230\u7684\u3002\u5BF9\u4E8E\u4E0D\u5E38\u7528\u7684\u8BBE\u8BA1\u6A21\u5F0F\uFF0C\u7A0D\u5FAE\u4E86\u89E3\u5373\u53EF\u3002

                                                                      \u521B\u5EFA\u578B\uFF1A

                                                                      • \u5E38\u7528\u7684\u6709\uFF1A\u5355\u4F8B\u6A21\u5F0F\u3001\u5DE5\u5382\u6A21\u5F0F\uFF08\u5DE5\u5382\u65B9\u6CD5\u548C\u62BD\u8C61\u5DE5\u5382\uFF09\u3001\u5EFA\u9020\u8005\u6A21\u5F0F\u3002
                                                                      • \u4E0D\u5E38\u7528\u7684\u6709\uFF1A\u539F\u578B\u6A21\u5F0F\u3002

                                                                      \u7ED3\u6784\u578B\uFF1A

                                                                      • \u5E38\u7528\u7684\u6709\uFF1A\u4EE3\u7406\u6A21\u5F0F\u3001\u6865\u63A5\u6A21\u5F0F\u3001\u88C5\u9970\u8005\u6A21\u5F0F\u3001\u9002\u914D\u5668\u6A21\u5F0F\u3002
                                                                      • \u4E0D\u5E38\u7528\u7684\u6709\uFF1A\u95E8\u9762\u6A21\u5F0F\u3001\u7EC4\u5408\u6A21\u5F0F\u3001\u4EAB\u5143\u6A21\u5F0F\u3002

                                                                      \u884C\u4E3A\u578B\uFF1A

                                                                      • \u5E38\u7528\u7684\u6709\uFF1A\u89C2\u5BDF\u8005\u6A21\u5F0F\u3001\u6A21\u677F\u6A21\u5F0F\u3001\u7B56\u7565\u6A21\u5F0F\u3001\u804C\u8D23\u94FE\u6A21\u5F0F\u3001\u8FED\u4EE3\u5668\u6A21\u5F0F\u3001\u72B6\u6001\u6A21\u5F0F\u3002
                                                                      • \u4E0D\u5E38\u7528\u7684\u6709\uFF1A\u8BBF\u95EE\u8005\u6A21\u5F0F\u3001\u5907\u5FD8\u5F55\u6A21\u5F0F\u3001\u547D\u4EE4\u6A21\u5F0F\u3001\u89E3\u91CA\u5668\u6A21\u5F0F\u3001\u4E2D\u4ECB\u6A21\u5F0F\u3002

                                                                      2. \u91CD\u6784

                                                                      \u5728\u8F6F\u4EF6\u5F00\u53D1\u4E2D\uFF0C\u53EA\u8981\u8F6F\u4EF6\u5728\u4E0D\u505C\u5730\u8FED\u4EE3\uFF0C\u5C31\u6CA1\u6709\u4E00\u52B3\u6C38\u9038\u7684\u8BBE\u8BA1\u3002\u968F\u7740\u9700\u6C42\u7684\u53D8\u5316\uFF0C\u4EE3\u7801\u7684\u4E0D\u505C\u5806\u780C\uFF0C\u539F\u6709\u7684\u8BBE\u8BA1\u5FC5\u5B9A\u4F1A\u5B58\u5728\u8FD9\u6837\u90A3\u6837\u7684\u95EE\u9898\u3002\u9488\u5BF9\u8FD9\u4E9B\u95EE\u9898\uFF0C\u6211\u4EEC\u5C31\u9700\u8981\u8FDB\u884C\u4EE3\u7801\u91CD\u6784\u3002\u91CD\u6784\u662F\u8F6F\u4EF6\u5F00\u53D1\u4E2D\u975E\u5E38\u91CD\u8981\u7684\u4E00\u4E2A\u73AF\u8282\u3002\u6301\u7EED\u91CD\u6784\u662F\u4FDD\u6301\u4EE3\u7801\u8D28\u91CF\u4E0D\u4E0B\u964D\u7684\u6709\u6548\u624B\u6BB5\uFF0C\u80FD\u6709\u6548\u907F\u514D\u4EE3\u7801\u8150\u5316\u5230\u65E0\u53EF\u6551\u836F\u7684\u5730\u6B65\u3002

                                                                      \u628A\u91CD\u6784\u5F53\u4F5C\u5F00\u53D1\u7684\u4E00\u90E8\u5206\uFF0C\u878D\u5165\u5230\u65E5\u5E38\u5F00\u53D1\u4E2D\u3002

                                                                      \u9762\u5411\u5BF9\u8C61\u3001\u8BBE\u8BA1\u539F\u5219\u3001\u8BBE\u8BA1\u6A21\u5F0F\u3001\u7F16\u7A0B\u89C4\u8303\u3001\u91CD\u6784\u4E94\u8005\u7684\u5173\u7CFB\uFF1A

                                                                      • \u9762\u5411\u5BF9\u8C61\u7F16\u7A0B\u56E0\u4E3A\u5176\u5177\u6709\u4E30\u5BCC\u7684\u7279\u6027\uFF08\u5C01\u88C5\u3001\u96C6\u6210\u3001\u591A\u6001\u3001\u62BD\u8C61\u7B49\uFF09\uFF0C\u53EF\u4EE5\u5B9E\u73B0\u5F88\u590D\u6742\u7684\u8BBE\u8BA1\u601D\u8DEF\uFF0C\u662F\u5F88\u591A\u8BBE\u8BA1\u539F\u5219\u3001\u8BBE\u8BA1\u6A21\u5F0F\u7B49\u7F16\u7801\u5B9E\u73B0\u7684\u57FA\u7840\u3002
                                                                      • \u8BBE\u8BA1\u539F\u5219\u662F\u6307\u5BFC\u6211\u4EEC\u4EE3\u7801\u8BBE\u8BA1\u7684\u4E00\u4E9B\u7ECF\u9A8C\u603B\u7ED3\uFF0C\u5BF9\u4E8E\u67D0\u4E9B\u573A\u666F\u4E0B\uFF0C\u662F\u5426\u5E94\u8BE5\u5E94\u7528\u67D0\u79CD\u8BBE\u8BA1\u6A21\u5F0F\uFF0C\u5177\u6709\u6307\u5BFC\u610F\u4E49\uFF0C\u6BD4\u5982\uFF0C\u201C\u5F00\u95ED\u539F\u5219\u201D\u662F\u5F88\u591A\u8BBE\u8BA1\u6A21\u5F0F\uFF08\u7B56\u7565\u3001\u6A21\u677F\u7B49\uFF09\u7684\u6307\u5BFC\u539F\u5219\u3002
                                                                      • \u8BBE\u8BA1\u6A21\u5F0F\u662F\u9488\u5BF9\u8F6F\u4EF6\u5F00\u53D1\u4E2D\u7ECF\u5E38\u9047\u5230\u7684\u4E00\u4E9B\u8BBE\u8BA1\u95EE\u9898\uFF0C\u603B\u7ED3\u51FA\u6765\u7684\u4E00\u5957\u89E3\u51B3\u65B9\u6848\u6216\u8005\u8BBE\u8BA1\u601D\u8DEF\u3002\u4ECE\u62BD\u8C61\u7A0B\u5EA6\u4E0A\u6765\u8BB2\uFF0C\u8BBE\u8BA1\u539F\u5219\u6BD4\u8BBE\u8BA1\u6A21\u5F0F\u66F4\u62BD\u8C61\u3002\u8BBE\u8BA1\u6A21\u5F0F\u66F4\u52A0\u5177\u4F53\u3001\u66F4\u52A0\u53EF\u6267\u884C\u3002
                                                                      • \u7F16\u7A0B\u89C4\u8303\u4E3B\u8981\u89E3\u51B3\u7684\u662F\u4EE3\u7801\u7684\u53EF\u8BFB\u6027\u95EE\u9898\u3002\u7F16\u7801\u89C4\u8303\u76F8\u5BF9\u4E8E\u8BBE\u8BA1\u539F\u5219\u3001\u8BBE\u8BA1\u6A21\u5F0F\uFF0C\u66F4\u52A0\u5177\u4F53\u3001\u66F4\u52A0\u504F\u91CD\u4EE3\u7801\u7EC6\u8282\u3001\u66F4\u52A0\u80FD\u843D\u5730\u3002\u6301\u7EED\u7684\u5C0F\u91CD\u6784\u4F9D\u8D56\u7684\u7406\u8BBA\u57FA\u7840\u4E3B\u8981\u5C31\u662F\u7F16\u7A0B\u89C4\u8303\u3002

                                                                      3. \u9762\u5411\u5BF9\u8C61

                                                                      \u9762\u5411\u5BF9\u8C61\u7F16\u7A0B\u662F\u4E00\u79CD\u7F16\u7A0B\u8303\u5F0F\u6216\u8005\u8BF4\u7F16\u7A0B\u98CE\u683C\uFF0C\u5B83\u4EE5\u7C7B\u6216\u5BF9\u8C61\u4F5C\u4E3A\u7EC4\u7EC7\u4EE3\u7801\u7684\u57FA\u672C\u5355\u5143\uFF0C\u5E76\u5C06\u5C01\u88C5\u3001\u62BD\u8C61\u3001\u7EE7\u627F\u3001\u591A\u6001\u56DB\u4E2A\u7279\u6027\uFF0C\u4F5C\u4E3A\u4EE3\u7801\u8BBE\u8BA1\u548C\u5B9E\u73B0\u7684\u57FA\u77F3 \u3002

                                                                      • \u5982\u4F55\u5224\u5B9A\u4E00\u4E2A\u8BED\u8A00\u662F\u9762\u5411\u5BF9\u8C61\u7F16\u7A0B\u8BED\u8A00

                                                                        \u5982\u679C\u6309\u7167\u4E25\u683C\u7684\u7684\u5B9A\u4E49\uFF0C\u9700\u8981\u6709\u73B0\u6210\u7684\u8BED\u6CD5\u652F\u6301\u7C7B\u3001\u5BF9\u8C61\u3001\u56DB\u5927\u7279\u6027\u624D\u80FD\u53EB\u4F5C\u9762\u5411\u5BF9\u8C61\u7F16\u7A0B\u8BED\u8A00\u3002\u5982\u679C\u653E\u5BBD\u8981\u6C42\u7684\u8BDD\uFF0C\u53EA\u8981\u67D0\u79CD\u7F16\u7A0B\u8BED\u8A00\u652F\u6301\u7C7B\u3001\u5BF9\u8C61\u8BED\u6CD5\u673A\u5236\uFF0C\u90A3\u57FA\u672C\u4E0A\u5C31\u53EF\u4EE5\u8BF4\u8FD9\u79CD\u7F16\u7A0B\u8BED\u8A00\u662F\u9762\u5411\u5BF9\u8C61\u7F16\u7A0B\u8BED\u8A00\u4E86\uFF0C\u4E0D\u4E00\u5B9A\u975E\u5F97\u8981\u6C42\u5177\u6709\u6240\u6709\u7684\u56DB\u5927\u7279\u6027\u3002

                                                                      \u7406\u89E3\u9762\u5411\u5BF9\u8C61\u7F16\u7A0B\u53CA\u9762\u5411\u5BF9\u8C61\u7F16\u7A0B\u8BED\u8A00\u7684\u5173\u952E\u5C31\u662F\u7406\u89E3\u5176\u56DB\u5927\u7279\u6027\uFF1A\u5C01\u88C5\u3001\u7EE7\u627F\u3001\u591A\u6001\u3001\u62BD\u8C61\u3002\u4E0D\u8FC7\u5BF9\u4E8E\u8FD9\u56DB\u5927\u7279\u6027\uFF0C\u5149\u77E5\u9053\u4ED6\u4EEC\u7684\u5B9A\u4E49\u662F\u4E0D\u591F\u7684\uFF0C\u6211\u4EEC\u8FD8\u8981\u77E5\u9053\u6BCF\u4E2A\u7279\u6027\u7684\u610F\u4E49\u548C\u76EE\u7684\uFF0C\u4EE5\u53CA\u4ED6\u4EEC\u80FD\u89E3\u51B3\u54EA\u4E9B\u7F16\u7A0B\u95EE\u9898\u3002

                                                                      3.1\u5C01\u88C5

                                                                      3.1.1 \u5C01\u88C5\u7684\u5B9A\u4E49

                                                                      \u5C01\u88C5\u4E5F\u53EB\u505A\u4FE1\u606F\u9690\u85CF\u6216\u6570\u636E\u8BBF\u95EE\u4FDD\u62A4\u3002\u7C7B\u901A\u8FC7\u66B4\u9732\u6709\u9650\u7684\u8BBF\u95EE\u63A5\u53E3\uFF0C\u6388\u6743\u5916\u90E8\u4EC5\u80FD\u901A\u8FC7\u7C7B\u63D0\u4F9B\u7684\u65B9\u5F0F\uFF08\u6216\u8005\u53EB\u51FD\u6570\uFF09\u6765\u8BBF\u95EE\u5185\u90E8\u4FE1\u606F\u6216\u8005\u6570\u636E\u3002

                                                                      \u7C7B\u7684\u5C5E\u6027\u901A\u5E38\u88AB\u8BBE\u8BA1\u4E3A\u79C1\u6709\u7684\uFF0C\u901A\u8FC7\u56FA\u6709\u7684get\u65B9\u6CD5\u8FDB\u884C\u8BBF\u95EE\uFF0C\u5916\u90E8\u4E0D\u80FD\u5BF9\u8FD9\u4E9B\u79C1\u6709\u5C5E\u6027\u8FDB\u884C\u76F4\u63A5\u8BBF\u95EE\u548C\u4FEE\u6539\u3002

                                                                      \u865A\u62DF\u94B1\u5305\u7C7B\u7684\u4EE3\u7801\u793A\u4F8B\uFF1A

                                                                      
                                                                       public class Wallet {
                                                                         private String id;
                                                                         private long createTime;
                                                                      diff --git "a/assets/\350\256\276\350\256\241\346\250\241\345\274\2171.html.2c1e2068.js" "b/assets/\350\256\276\350\256\241\346\250\241\345\274\2171.html.86b74039.js"
                                                                      similarity index 97%
                                                                      rename from "assets/\350\256\276\350\256\241\346\250\241\345\274\2171.html.2c1e2068.js"
                                                                      rename to "assets/\350\256\276\350\256\241\346\250\241\345\274\2171.html.86b74039.js"
                                                                      index da854196..4b25191d 100644
                                                                      --- "a/assets/\350\256\276\350\256\241\346\250\241\345\274\2171.html.2c1e2068.js"
                                                                      +++ "b/assets/\350\256\276\350\256\241\346\250\241\345\274\2171.html.86b74039.js"
                                                                      @@ -1 +1 @@
                                                                      -const l={key:"v-24adc8d7",path:"/Design-patterns/design-patterns-1/%E8%AE%BE%E8%AE%A1%E6%A8%A1%E5%BC%8F1.html",title:"\u8BBE\u8BA1\u6A21\u5F0F",lang:"zh-CN",frontmatter:{},excerpt:"",headers:[{level:2,title:"1. \u6982\u8FF0",slug:"_1-\u6982\u8FF0",children:[]},{level:2,title:"2. \u91CD\u6784",slug:"_2-\u91CD\u6784",children:[]},{level:2,title:"3. \u9762\u5411\u5BF9\u8C61",slug:"_3-\u9762\u5411\u5BF9\u8C61",children:[{level:3,title:"3.1\u5C01\u88C5",slug:"_3-1\u5C01\u88C5",children:[{level:4,title:"3.1.1 \u5C01\u88C5\u7684\u5B9A\u4E49",slug:"_3-1-1-\u5C01\u88C5\u7684\u5B9A\u4E49",children:[]},{level:4,title:"3.1.2 \u5C01\u88C5\u80FD\u89E3\u51B3\u7684\u95EE\u9898",slug:"_3-1-2-\u5C01\u88C5\u80FD\u89E3\u51B3\u7684\u95EE\u9898",children:[]}]},{level:3,title:"3.2 \u62BD\u8C61",slug:"_3-2-\u62BD\u8C61",children:[{level:4,title:"3.2.1 \u5B9A\u4E49",slug:"_3-2-1-\u5B9A\u4E49",children:[]},{level:4,title:"3.2.2 \u7528\u9014",slug:"_3-2-2-\u7528\u9014",children:[]}]},{level:3,title:"3.3 \u7EE7\u627F",slug:"_3-3-\u7EE7\u627F",children:[]},{level:3,title:"3.4 \u591A\u6001",slug:"_3-4-\u591A\u6001",children:[{level:4,title:"3.4.1 \u7528\u9014",slug:"_3-4-1-\u7528\u9014",children:[]}]},{level:3,title:"3.4 \u9762\u5411\u8FC7\u7A0B",slug:"_3-4-\u9762\u5411\u8FC7\u7A0B",children:[]},{level:3,title:"3.5 \u6CE8\u610F",slug:"_3-5-\u6CE8\u610F",children:[]},{level:3,title:"3.6 \u63A5\u53E3\u548C\u62BD\u8C61\u7C7B",slug:"_3-6-\u63A5\u53E3\u548C\u62BD\u8C61\u7C7B",children:[{level:4,title:"\u62BD\u8C61\u7C7B",slug:"\u62BD\u8C61\u7C7B",children:[]},{level:4,title:"\u63A5\u53E3",slug:"\u63A5\u53E3",children:[]},{level:4,title:"\u6CE8\u610F",slug:"\u6CE8\u610F",children:[]}]},{level:3,title:"3.7 \u57FA\u4E8E\u63A5\u53E3\u7F16\u7A0B",slug:"_3-7-\u57FA\u4E8E\u63A5\u53E3\u7F16\u7A0B",children:[]},{level:3,title:"3.8 \u591A\u7528\u7EC4\u5408\u5C11\u7528\u7EE7\u627F",slug:"_3-8-\u591A\u7528\u7EC4\u5408\u5C11\u7528\u7EE7\u627F",children:[]},{level:3,title:"3.9 MVC\u67B6\u6784",slug:"_3-9-mvc\u67B6\u6784",children:[]}]},{level:2,title:"4. \u8BBE\u8BA1\u539F\u5219",slug:"_4-\u8BBE\u8BA1\u539F\u5219",children:[{level:3,title:"4.1 \u91CC\u6C0F\u66FF\u6362\u539F\u5219",slug:"_4-1-\u91CC\u6C0F\u66FF\u6362\u539F\u5219",children:[]},{level:3,title:"4.2 \u63A5\u53E3\u9694\u79BB\u539F\u5219",slug:"_4-2-\u63A5\u53E3\u9694\u79BB\u539F\u5219",children:[]},{level:3,title:"4.3 \u4F9D\u8D56\u6CE8\u5165",slug:"_4-3-\u4F9D\u8D56\u6CE8\u5165",children:[]},{level:3,title:"4.4 \u4F9D\u8D56\u53CD\u8F6C\u539F\u5219",slug:"_4-4-\u4F9D\u8D56\u53CD\u8F6C\u539F\u5219",children:[]},{level:3,title:"4.5 \u9AD8\u5185\u805A\u4F4E\u8026\u5408",slug:"_4-5-\u9AD8\u5185\u805A\u4F4E\u8026\u5408",children:[]}]}],git:{updatedTime:1710173765e3,contributors:[{name:"shailene",email:"64005626+shaileneF@users.noreply.github.com",commits:1}]},filePathRelative:"Design-patterns/design-patterns-1/\u8BBE\u8BA1\u6A21\u5F0F1.md"};export{l as data};
                                                                      +const l={key:"v-24adc8d7",path:"/Design-patterns/design-patterns-1/%E8%AE%BE%E8%AE%A1%E6%A8%A1%E5%BC%8F1.html",title:"\u8BBE\u8BA1\u6A21\u5F0F",lang:"zh-CN",frontmatter:{},excerpt:"",headers:[{level:2,title:"1. \u6982\u8FF0",slug:"_1-\u6982\u8FF0",children:[]},{level:2,title:"2. \u91CD\u6784",slug:"_2-\u91CD\u6784",children:[]},{level:2,title:"3. \u9762\u5411\u5BF9\u8C61",slug:"_3-\u9762\u5411\u5BF9\u8C61",children:[{level:3,title:"3.1\u5C01\u88C5",slug:"_3-1\u5C01\u88C5",children:[{level:4,title:"3.1.1 \u5C01\u88C5\u7684\u5B9A\u4E49",slug:"_3-1-1-\u5C01\u88C5\u7684\u5B9A\u4E49",children:[]},{level:4,title:"3.1.2 \u5C01\u88C5\u80FD\u89E3\u51B3\u7684\u95EE\u9898",slug:"_3-1-2-\u5C01\u88C5\u80FD\u89E3\u51B3\u7684\u95EE\u9898",children:[]}]},{level:3,title:"3.2 \u62BD\u8C61",slug:"_3-2-\u62BD\u8C61",children:[{level:4,title:"3.2.1 \u5B9A\u4E49",slug:"_3-2-1-\u5B9A\u4E49",children:[]},{level:4,title:"3.2.2 \u7528\u9014",slug:"_3-2-2-\u7528\u9014",children:[]}]},{level:3,title:"3.3 \u7EE7\u627F",slug:"_3-3-\u7EE7\u627F",children:[]},{level:3,title:"3.4 \u591A\u6001",slug:"_3-4-\u591A\u6001",children:[{level:4,title:"3.4.1 \u7528\u9014",slug:"_3-4-1-\u7528\u9014",children:[]}]},{level:3,title:"3.4 \u9762\u5411\u8FC7\u7A0B",slug:"_3-4-\u9762\u5411\u8FC7\u7A0B",children:[]},{level:3,title:"3.5 \u6CE8\u610F",slug:"_3-5-\u6CE8\u610F",children:[]},{level:3,title:"3.6 \u63A5\u53E3\u548C\u62BD\u8C61\u7C7B",slug:"_3-6-\u63A5\u53E3\u548C\u62BD\u8C61\u7C7B",children:[{level:4,title:"\u62BD\u8C61\u7C7B",slug:"\u62BD\u8C61\u7C7B",children:[]},{level:4,title:"\u63A5\u53E3",slug:"\u63A5\u53E3",children:[]},{level:4,title:"\u6CE8\u610F",slug:"\u6CE8\u610F",children:[]}]},{level:3,title:"3.7 \u57FA\u4E8E\u63A5\u53E3\u7F16\u7A0B",slug:"_3-7-\u57FA\u4E8E\u63A5\u53E3\u7F16\u7A0B",children:[]},{level:3,title:"3.8 \u591A\u7528\u7EC4\u5408\u5C11\u7528\u7EE7\u627F",slug:"_3-8-\u591A\u7528\u7EC4\u5408\u5C11\u7528\u7EE7\u627F",children:[]},{level:3,title:"3.9 MVC\u67B6\u6784",slug:"_3-9-mvc\u67B6\u6784",children:[]}]},{level:2,title:"4. \u8BBE\u8BA1\u539F\u5219",slug:"_4-\u8BBE\u8BA1\u539F\u5219",children:[{level:3,title:"4.1 \u91CC\u6C0F\u66FF\u6362\u539F\u5219",slug:"_4-1-\u91CC\u6C0F\u66FF\u6362\u539F\u5219",children:[]},{level:3,title:"4.2 \u63A5\u53E3\u9694\u79BB\u539F\u5219",slug:"_4-2-\u63A5\u53E3\u9694\u79BB\u539F\u5219",children:[]},{level:3,title:"4.3 \u4F9D\u8D56\u6CE8\u5165",slug:"_4-3-\u4F9D\u8D56\u6CE8\u5165",children:[]},{level:3,title:"4.4 \u4F9D\u8D56\u53CD\u8F6C\u539F\u5219",slug:"_4-4-\u4F9D\u8D56\u53CD\u8F6C\u539F\u5219",children:[]},{level:3,title:"4.5 \u9AD8\u5185\u805A\u4F4E\u8026\u5408",slug:"_4-5-\u9AD8\u5185\u805A\u4F4E\u8026\u5408",children:[]}]}],git:{updatedTime:1710173784e3,contributors:[{name:"shailene",email:"64005626+shaileneF@users.noreply.github.com",commits:1}]},filePathRelative:"Design-patterns/design-patterns-1/\u8BBE\u8BA1\u6A21\u5F0F1.md"};export{l as data};
                                                                      diff --git "a/assets/\350\256\276\350\256\241\346\250\241\345\274\2172.html.f6de4e88.js" "b/assets/\350\256\276\350\256\241\346\250\241\345\274\2172.html.013cf02d.js"
                                                                      similarity index 99%
                                                                      rename from "assets/\350\256\276\350\256\241\346\250\241\345\274\2172.html.f6de4e88.js"
                                                                      rename to "assets/\350\256\276\350\256\241\346\250\241\345\274\2172.html.013cf02d.js"
                                                                      index e9f456c0..cb1527b3 100644
                                                                      --- "a/assets/\350\256\276\350\256\241\346\250\241\345\274\2172.html.f6de4e88.js"
                                                                      +++ "b/assets/\350\256\276\350\256\241\346\250\241\345\274\2172.html.013cf02d.js"
                                                                      @@ -1,4 +1,4 @@
                                                                      -import{_ as p,r as t,o,c as e,a as n,b as c,F as l,d as s,e as u}from"./app.0d029894.js";const k={},i=n("h1",{id:"\u8BBE\u8BA1\u6A21\u5F0F",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u8BBE\u8BA1\u6A21\u5F0F","aria-hidden":"true"},"#"),s(" \u8BBE\u8BA1\u6A21\u5F0F")],-1),r={href:"https://time.geekbang.org/column/intro/250?tab=catalog",target:"_blank",rel:"noopener noreferrer"},d=s("\u6781\u5BA2\u65F6\u95F4\u8BBE\u8BA1\u6A21\u5F0F\u4E4B\u7F8E"),m=s("\u7B14\u8BB0\u6574\u7406"),y=u(`

                                                                      1. \u8BBE\u8BA1\u6A21\u5F0F

                                                                      \u7ECF\u5178\u7684\u8BBE\u8BA1\u6A21\u5F0F\u670923\u79CD\uFF0C\u5E38\u7528\u7684\u5E76\u4E0D\u662F\u5F88\u591A\uFF0C\u53EF\u80FD\u90FD\u4E0D\u5230\u4E00\u534A\u3002

                                                                      \u5355\u4F8B\u6A21\u5F0F

                                                                      \u4E3A\u4EC0\u4E48\u8981\u4F7F\u7528\u5355\u4F8B

                                                                      \u5355\u4F8B\u6A21\u5F0F\u5C31\u662F\uFF0C\u4E00\u4E2A\u7C7B\u53EA\u5141\u8BB8\u521B\u5EFA\u4E00\u4E2A\u5B9E\u4F8B\u6216\u8005\u8BF4\u5BF9\u8C61\uFF0C\u90A3\u8FD9\u4E2A\u7C7B\u5C31\u662F\u5355\u4F8B\u7C7B\uFF0C\u8FD9\u79CD\u8BBE\u8BA1\u6A21\u5F0F\u5C31\u53EB\u5355\u4F8B\u8BBE\u8BA1\u6A21\u5F0F\u3002

                                                                      • \u5904\u7406\u8D44\u6E90\u8BBF\u95EE\u51B2\u7A81
                                                                      • \u8868\u793A\u5168\u5C40\u552F\u4E00\u7C7B

                                                                      \u5927\u90E8\u5206\u60C5\u51B5\u4E0B\uFF0C\u6211\u4EEC\u4F7F\u7528\u5355\u4F8B\uFF0C\u90FD\u662F\u7528\u5B83\u6765\u8868\u793A\u4E00\u4E9B\u5168\u5C40\u552F\u4E00\u7C7B\uFF0C\u6BD4\u5982\u914D\u7F6E\u7C7B\u3001\u8FDE\u63A5\u6C60\u7C7B\u3001ID\u751F\u6210\u5668\u7C7B\u7B49\u3002

                                                                      \u5982\u4F55\u5B9E\u73B0\u4E00\u4E2A\u5355\u4F8B

                                                                      • \u6784\u9020\u51FD\u6570\u9700\u8981\u662F private \u8BBF\u95EE\u6743\u9650\u7684\uFF0C\u8FD9\u6837\u624D\u80FD\u907F\u514D\u5916\u90E8\u901A\u8FC7 new \u521B\u5EFA\u5B9E\u4F8B\uFF1B

                                                                      • \u8003\u8651\u5BF9\u8C61\u521B\u5EFA\u65F6\u7684\u7EBF\u7A0B\u5B89\u5168\u95EE\u9898\uFF1B

                                                                      • \u8003\u8651\u662F\u5426\u652F\u6301\u5EF6\u8FDF\u52A0\u8F7D\uFF1B

                                                                      • \u8003\u8651 getInstance() \u6027\u80FD\u662F\u5426\u9AD8\uFF08\u662F\u5426\u52A0\u9501\uFF09\u3002

                                                                      • \u5355\u4F8B\u4E0D\u652F\u6301\u6709\u53C2\u7684\u6784\u9020\u51FD\u6570

                                                                      \u7C7B\u5BF9\u8C61\u7684\u5168\u5C40\u552F\u4E00\u6027\u53EF\u4EE5\u901A\u8FC7\u591A\u79CD\u4E0D\u540C\u7684\u65B9\u5F0F\u6765\u4FDD\u8BC1\u3002\u6211\u4EEC\u65E2\u53EF\u4EE5\u901A\u8FC7\u5355\u4F8B\u6A21\u5F0F\u6765\u5F3A\u5236\u4FDD\u8BC1\uFF0C\u4E5F\u53EF\u4EE5\u901A\u8FC7\u5DE5\u5382\u6A21\u5F0F\u3001IOC \u5BB9\u5668\uFF08\u6BD4\u5982 Spring IOC \u5BB9\u5668\uFF09\u6765\u4FDD\u8BC1\u3002

                                                                      \u997F\u6C49\u5F0F

                                                                      \u5728\u7C7B\u52A0\u8F7D\u7684\u65F6\u5019\uFF0Cinstance \u9759\u6001\u5B9E\u4F8B\u5C31\u5DF2\u7ECF\u521B\u5EFA\u5E76\u521D\u59CB\u5316\u597D\u4E86\uFF0C\u6240\u4EE5\uFF0Cinstance \u5B9E\u4F8B\u7684\u521B\u5EFA\u8FC7\u7A0B\u662F\u7EBF\u7A0B\u5B89\u5168\u7684\u3002

                                                                      public class IdGenerator { 
                                                                      +import{_ as p,r as t,o,c as e,a as n,b as c,F as l,d as s,e as u}from"./app.f8791b52.js";const k={},i=n("h1",{id:"\u8BBE\u8BA1\u6A21\u5F0F",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u8BBE\u8BA1\u6A21\u5F0F","aria-hidden":"true"},"#"),s(" \u8BBE\u8BA1\u6A21\u5F0F")],-1),r={href:"https://time.geekbang.org/column/intro/250?tab=catalog",target:"_blank",rel:"noopener noreferrer"},d=s("\u6781\u5BA2\u65F6\u95F4\u8BBE\u8BA1\u6A21\u5F0F\u4E4B\u7F8E"),m=s("\u7B14\u8BB0\u6574\u7406"),y=u(`

                                                                      1. \u8BBE\u8BA1\u6A21\u5F0F

                                                                      \u7ECF\u5178\u7684\u8BBE\u8BA1\u6A21\u5F0F\u670923\u79CD\uFF0C\u5E38\u7528\u7684\u5E76\u4E0D\u662F\u5F88\u591A\uFF0C\u53EF\u80FD\u90FD\u4E0D\u5230\u4E00\u534A\u3002

                                                                      \u5355\u4F8B\u6A21\u5F0F

                                                                      \u4E3A\u4EC0\u4E48\u8981\u4F7F\u7528\u5355\u4F8B

                                                                      \u5355\u4F8B\u6A21\u5F0F\u5C31\u662F\uFF0C\u4E00\u4E2A\u7C7B\u53EA\u5141\u8BB8\u521B\u5EFA\u4E00\u4E2A\u5B9E\u4F8B\u6216\u8005\u8BF4\u5BF9\u8C61\uFF0C\u90A3\u8FD9\u4E2A\u7C7B\u5C31\u662F\u5355\u4F8B\u7C7B\uFF0C\u8FD9\u79CD\u8BBE\u8BA1\u6A21\u5F0F\u5C31\u53EB\u5355\u4F8B\u8BBE\u8BA1\u6A21\u5F0F\u3002

                                                                      • \u5904\u7406\u8D44\u6E90\u8BBF\u95EE\u51B2\u7A81
                                                                      • \u8868\u793A\u5168\u5C40\u552F\u4E00\u7C7B

                                                                      \u5927\u90E8\u5206\u60C5\u51B5\u4E0B\uFF0C\u6211\u4EEC\u4F7F\u7528\u5355\u4F8B\uFF0C\u90FD\u662F\u7528\u5B83\u6765\u8868\u793A\u4E00\u4E9B\u5168\u5C40\u552F\u4E00\u7C7B\uFF0C\u6BD4\u5982\u914D\u7F6E\u7C7B\u3001\u8FDE\u63A5\u6C60\u7C7B\u3001ID\u751F\u6210\u5668\u7C7B\u7B49\u3002

                                                                      \u5982\u4F55\u5B9E\u73B0\u4E00\u4E2A\u5355\u4F8B

                                                                      • \u6784\u9020\u51FD\u6570\u9700\u8981\u662F private \u8BBF\u95EE\u6743\u9650\u7684\uFF0C\u8FD9\u6837\u624D\u80FD\u907F\u514D\u5916\u90E8\u901A\u8FC7 new \u521B\u5EFA\u5B9E\u4F8B\uFF1B

                                                                      • \u8003\u8651\u5BF9\u8C61\u521B\u5EFA\u65F6\u7684\u7EBF\u7A0B\u5B89\u5168\u95EE\u9898\uFF1B

                                                                      • \u8003\u8651\u662F\u5426\u652F\u6301\u5EF6\u8FDF\u52A0\u8F7D\uFF1B

                                                                      • \u8003\u8651 getInstance() \u6027\u80FD\u662F\u5426\u9AD8\uFF08\u662F\u5426\u52A0\u9501\uFF09\u3002

                                                                      • \u5355\u4F8B\u4E0D\u652F\u6301\u6709\u53C2\u7684\u6784\u9020\u51FD\u6570

                                                                      \u7C7B\u5BF9\u8C61\u7684\u5168\u5C40\u552F\u4E00\u6027\u53EF\u4EE5\u901A\u8FC7\u591A\u79CD\u4E0D\u540C\u7684\u65B9\u5F0F\u6765\u4FDD\u8BC1\u3002\u6211\u4EEC\u65E2\u53EF\u4EE5\u901A\u8FC7\u5355\u4F8B\u6A21\u5F0F\u6765\u5F3A\u5236\u4FDD\u8BC1\uFF0C\u4E5F\u53EF\u4EE5\u901A\u8FC7\u5DE5\u5382\u6A21\u5F0F\u3001IOC \u5BB9\u5668\uFF08\u6BD4\u5982 Spring IOC \u5BB9\u5668\uFF09\u6765\u4FDD\u8BC1\u3002

                                                                      \u997F\u6C49\u5F0F

                                                                      \u5728\u7C7B\u52A0\u8F7D\u7684\u65F6\u5019\uFF0Cinstance \u9759\u6001\u5B9E\u4F8B\u5C31\u5DF2\u7ECF\u521B\u5EFA\u5E76\u521D\u59CB\u5316\u597D\u4E86\uFF0C\u6240\u4EE5\uFF0Cinstance \u5B9E\u4F8B\u7684\u521B\u5EFA\u8FC7\u7A0B\u662F\u7EBF\u7A0B\u5B89\u5168\u7684\u3002

                                                                      public class IdGenerator { 
                                                                         private AtomicLong id = new AtomicLong(0);
                                                                         private static final IdGenerator instance = new IdGenerator();
                                                                         private IdGenerator() {}
                                                                      diff --git "a/assets/\350\256\276\350\256\241\346\250\241\345\274\2172.html.f8c65f89.js" "b/assets/\350\256\276\350\256\241\346\250\241\345\274\2172.html.e3943cda.js"
                                                                      similarity index 97%
                                                                      rename from "assets/\350\256\276\350\256\241\346\250\241\345\274\2172.html.f8c65f89.js"
                                                                      rename to "assets/\350\256\276\350\256\241\346\250\241\345\274\2172.html.e3943cda.js"
                                                                      index 2bbd6f4c..a7b3b3ef 100644
                                                                      --- "a/assets/\350\256\276\350\256\241\346\250\241\345\274\2172.html.f8c65f89.js"
                                                                      +++ "b/assets/\350\256\276\350\256\241\346\250\241\345\274\2172.html.e3943cda.js"
                                                                      @@ -1 +1 @@
                                                                      -const e={key:"v-2d61ea56",path:"/Design-patterns/design-patterns-2/%E8%AE%BE%E8%AE%A1%E6%A8%A1%E5%BC%8F2.html",title:"\u8BBE\u8BA1\u6A21\u5F0F",lang:"zh-CN",frontmatter:{},excerpt:"",headers:[{level:2,title:"1. \u8BBE\u8BA1\u6A21\u5F0F",slug:"_1-\u8BBE\u8BA1\u6A21\u5F0F",children:[{level:3,title:"\u5355\u4F8B\u6A21\u5F0F",slug:"\u5355\u4F8B\u6A21\u5F0F",children:[{level:4,title:"\u4E3A\u4EC0\u4E48\u8981\u4F7F\u7528\u5355\u4F8B",slug:"\u4E3A\u4EC0\u4E48\u8981\u4F7F\u7528\u5355\u4F8B",children:[]},{level:4,title:"\u5982\u4F55\u5B9E\u73B0\u4E00\u4E2A\u5355\u4F8B",slug:"\u5982\u4F55\u5B9E\u73B0\u4E00\u4E2A\u5355\u4F8B",children:[]},{level:4,title:"\u997F\u6C49\u5F0F",slug:"\u997F\u6C49\u5F0F",children:[]},{level:4,title:"\u61D2\u6C49\u5F0F",slug:"\u61D2\u6C49\u5F0F",children:[]},{level:4,title:"\u53CC\u91CD\u68C0\u6D4B",slug:"\u53CC\u91CD\u68C0\u6D4B",children:[]},{level:4,title:"\u9759\u6001\u5185\u90E8\u7C7B",slug:"\u9759\u6001\u5185\u90E8\u7C7B",children:[]}]},{level:3,title:"\u5DE5\u5382\u6A21\u5F0F",slug:"\u5DE5\u5382\u6A21\u5F0F",children:[{level:4,title:"\u7B80\u5355\u5DE5\u5382",slug:"\u7B80\u5355\u5DE5\u5382",children:[]},{level:4,title:"\u5DE5\u5382\u65B9\u6CD5",slug:"\u5DE5\u5382\u65B9\u6CD5",children:[]},{level:4,title:"\u62BD\u8C61\u5DE5\u5382",slug:"\u62BD\u8C61\u5DE5\u5382",children:[]}]},{level:3,title:"DI",slug:"di",children:[]},{level:3,title:"\u5EFA\u9020\u8005\u6A21\u5F0F",slug:"\u5EFA\u9020\u8005\u6A21\u5F0F",children:[]},{level:3,title:"\u4EE3\u7406\u6A21\u5F0F",slug:"\u4EE3\u7406\u6A21\u5F0F",children:[]},{level:3,title:"\u6865\u63A5\u6A21\u5F0F",slug:"\u6865\u63A5\u6A21\u5F0F",children:[]},{level:3,title:"\u9002\u914D\u5668\u6A21\u5F0F",slug:"\u9002\u914D\u5668\u6A21\u5F0F",children:[]},{level:3,title:"\u95E8\u9762\u6A21\u5F0F",slug:"\u95E8\u9762\u6A21\u5F0F",children:[]},{level:3,title:"\u89C2\u5BDF\u8005\u6A21\u5F0F",slug:"\u89C2\u5BDF\u8005\u6A21\u5F0F",children:[]}]}],git:{updatedTime:1710173765e3,contributors:[{name:"shailene",email:"64005626+shaileneF@users.noreply.github.com",commits:1}]},filePathRelative:"Design-patterns/design-patterns-2/\u8BBE\u8BA1\u6A21\u5F0F2.md"};export{e as data};
                                                                      +const e={key:"v-2d61ea56",path:"/Design-patterns/design-patterns-2/%E8%AE%BE%E8%AE%A1%E6%A8%A1%E5%BC%8F2.html",title:"\u8BBE\u8BA1\u6A21\u5F0F",lang:"zh-CN",frontmatter:{},excerpt:"",headers:[{level:2,title:"1. \u8BBE\u8BA1\u6A21\u5F0F",slug:"_1-\u8BBE\u8BA1\u6A21\u5F0F",children:[{level:3,title:"\u5355\u4F8B\u6A21\u5F0F",slug:"\u5355\u4F8B\u6A21\u5F0F",children:[{level:4,title:"\u4E3A\u4EC0\u4E48\u8981\u4F7F\u7528\u5355\u4F8B",slug:"\u4E3A\u4EC0\u4E48\u8981\u4F7F\u7528\u5355\u4F8B",children:[]},{level:4,title:"\u5982\u4F55\u5B9E\u73B0\u4E00\u4E2A\u5355\u4F8B",slug:"\u5982\u4F55\u5B9E\u73B0\u4E00\u4E2A\u5355\u4F8B",children:[]},{level:4,title:"\u997F\u6C49\u5F0F",slug:"\u997F\u6C49\u5F0F",children:[]},{level:4,title:"\u61D2\u6C49\u5F0F",slug:"\u61D2\u6C49\u5F0F",children:[]},{level:4,title:"\u53CC\u91CD\u68C0\u6D4B",slug:"\u53CC\u91CD\u68C0\u6D4B",children:[]},{level:4,title:"\u9759\u6001\u5185\u90E8\u7C7B",slug:"\u9759\u6001\u5185\u90E8\u7C7B",children:[]}]},{level:3,title:"\u5DE5\u5382\u6A21\u5F0F",slug:"\u5DE5\u5382\u6A21\u5F0F",children:[{level:4,title:"\u7B80\u5355\u5DE5\u5382",slug:"\u7B80\u5355\u5DE5\u5382",children:[]},{level:4,title:"\u5DE5\u5382\u65B9\u6CD5",slug:"\u5DE5\u5382\u65B9\u6CD5",children:[]},{level:4,title:"\u62BD\u8C61\u5DE5\u5382",slug:"\u62BD\u8C61\u5DE5\u5382",children:[]}]},{level:3,title:"DI",slug:"di",children:[]},{level:3,title:"\u5EFA\u9020\u8005\u6A21\u5F0F",slug:"\u5EFA\u9020\u8005\u6A21\u5F0F",children:[]},{level:3,title:"\u4EE3\u7406\u6A21\u5F0F",slug:"\u4EE3\u7406\u6A21\u5F0F",children:[]},{level:3,title:"\u6865\u63A5\u6A21\u5F0F",slug:"\u6865\u63A5\u6A21\u5F0F",children:[]},{level:3,title:"\u9002\u914D\u5668\u6A21\u5F0F",slug:"\u9002\u914D\u5668\u6A21\u5F0F",children:[]},{level:3,title:"\u95E8\u9762\u6A21\u5F0F",slug:"\u95E8\u9762\u6A21\u5F0F",children:[]},{level:3,title:"\u89C2\u5BDF\u8005\u6A21\u5F0F",slug:"\u89C2\u5BDF\u8005\u6A21\u5F0F",children:[]}]}],git:{updatedTime:1710173784e3,contributors:[{name:"shailene",email:"64005626+shaileneF@users.noreply.github.com",commits:1}]},filePathRelative:"Design-patterns/design-patterns-2/\u8BBE\u8BA1\u6A21\u5F0F2.md"};export{e as data};
                                                                      diff --git a/go/gin/gin.html b/go/gin/gin.html
                                                                      index 931d7855..9f55ff31 100644
                                                                      --- a/go/gin/gin.html
                                                                      +++ b/go/gin/gin.html
                                                                      @@ -23,7 +23,7 @@
                                                                       			}
                                                                           
                                                                           Gin | shAilene
                                                                      -    
                                                                      +    
                                                                           
                                                                         
                                                                         
                                                                      @@ -266,6 +266,6 @@
                                                                       	}
                                                                       }
                                                                       

                                                                    注意

                                                                    1. gin.Default()默认使用了Logger和Recovery中间件,其中:

                                                                      • Logger中间件将日志写入gin.DefaultWriter,即使配置了GIN_MODE=release

                                                                        Logger是把gin框架本身的日志输出到标准输出(我们本地开发调试时在终端输出的那些日志就是它的功劳)

                                                                      • Recovery中间件

                                                                        是在程序出现panic的时候恢复现场并写入500响应的。

                                                                      如果不想使用以上默认的两个中间件,可以使用gin.New()新建一个没有任何默认中间件的路由。

                                                                    2. 中间件中使用goroutine

                                                                      当在中间件中启动新的goroutine时,不能使用原始的上下文c *gin.Context,必须使用其只读副本c.Copy()

                                                                    六、Model

                                                                    概述

                                                                    1. 如果应用非常简单的话,可以在Controller里面处理常见的业务逻辑(其实按照目前我的理解来看,Controller层也不是处理全部的业务逻辑,最主要的还是像servlet一样接收了参数之后,做一些简单的处理如参数校验,主要是去调用service层的业务)。但是如果我们有一个功能想在多个控制器复用的话,那么我们就可以把公共的功能单独抽取出来作为一个模块(类似Java的utils工具类??),Model是逐步抽象的过程,一般我们会在Model里面封装一些公共的方法让不同Controller使用,也可以在Model中实现和数据库打交道。
                                                                    Last Updated:
                                                                    Contributors: shailene
                                                                  - + diff --git a/go/golang/golang.html b/go/golang/golang.html index 56b82f3c..6be0f077 100644 --- a/go/golang/golang.html +++ b/go/golang/golang.html @@ -23,7 +23,7 @@ } go | shAilene - + @@ -257,6 +257,6 @@

                                                                go modules模块管理

                                                                什么是go modules

                                                                1. go modules是go语言的依赖解决方案。

                                                                  go modules目前集成在go的工具链中,只要安装了go,也就可以使用go modules了,而go modules的出现也解决了在go 1.11之前的几个常见争议问题:

                                                                  • go语言长久以来的依赖管理问题
                                                                  • 淘汰现有的go path使用模式
                                                                  • 统一社区中的其他依赖管理工具
                                                                2. go modules的目的之一就是淘汰gopath,那么gopath是什么?

                                                                  gopath是表示当前golang全部项目所在路径。

                                                                  goroot是go语言源码包所在路径,对比JDK。

                                                                3. go path路径下有三个文件夹

                                                                  • bin

                                                                    包含所有go代码已经编译过的可执行程序

                                                                  • pkg

                                                                    存放自定义包的目录

                                                                  • src

                                                                    存放项目源文件的目录

                                                                4. gopath的弊端

                                                                  go get下载第三放库的时候,因为无法指定版本号,无版本控制概念。

                                                                5. 使用go modules就可以不使用gopath

                                                                  用go modules来控制依赖。

                                                                6. go mod命令

                                                                  命令作用
                                                                  go mod init生成go.mod文件
                                                                  go mod download下载go.mod文件中指明的所有依赖
                                                                  go mod tidy整理现有的依赖
                                                                  go mod graph查看现有的依赖结构
                                                                  go mod edit编辑go.mod文件
                                                                  go mod vendor导出项目所有的依赖到vendor目录
                                                                  go mod verify检验一个模块是否被篡改过
                                                                  go mod why查看为什么需要依赖某模块
                                                                7. go mod 环境变量--GO111MODULE

                                                                  可以通过 go env命令查看

                                                                  go语言提供了GO111MODULE这个环境变量来作为go modules的开关,其允许设置以下参数:

                                                                  • auto : 只要项目包含了go.mod文件的话启用go modules
                                                                  • on:启用go modules,推荐设置,将会是未来版本中的默认值。
                                                                  • off:禁用go modules,不推荐设置。

                                                                  命令:

                                                                  $ go env -w GO111MODULE=ON
                                                                   
                                                                8. GOPROXY

                                                                  这个环境变量主要是用于设置Go模块代理,其作用是用于使Go在后续拉取模块版本时直接通过镜像站点来快速拉取。

                                                                  $ go env -w GOPROXY=https://goproxy.cn,direct
                                                                   
                                                                9. GOSUMDB

                                                                  用来校验拉取的第三方库是否是完整的,如果设置了GOPROXY,这个就不用设置了。

                                                                10. GONOPROXY、GONOSUMDB、GOPRIVATE

                                                                  设置GOPRIVATE即可,他们表示一个意思,表示第三方库是私有仓库。

                                                                11. 初始化项目

                                                                  • 任意文件夹创建项目

                                                                  • 创建go.mod文件 init

                                                                  • 在该项目编写源代码

                                                                    如果源代码中依赖某个库,我们可以手动download即用go get,也可以自动download

                                                                Last Updated:
                                                                Contributors: shailene
                                                            - + diff --git a/go/gorm/gorm.html b/go/gorm/gorm.html index 74bca41f..571c159a 100644 --- a/go/gorm/gorm.html +++ b/go/gorm/gorm.html @@ -23,7 +23,7 @@ } gorm | shAilene - + @@ -469,6 +469,6 @@ tx.RollbackTo("p") tx.Commit()

                                                        自定义数据类型

                                                        自定义数据类型 | GORM - The fantastic ORM library for Golang, aims to be developer friendly.open in new window

                                                      Last Updated:
                                                      Contributors: shailene
                                                - + diff --git a/go/index.html b/go/index.html index f9329ca9..a728cf30 100644 --- a/go/index.html +++ b/go/index.html @@ -23,11 +23,11 @@ } shAilene - + - + diff --git a/index.html b/index.html index 17a62626..502b7f7d 100644 --- a/index.html +++ b/index.html @@ -23,11 +23,11 @@ } shAilene - + - + diff --git "a/java/JVM/JVM\344\270\212\347\257\207/\344\270\200\344\272\233\347\237\245\350\257\206\347\202\271\347\232\204\350\256\260\345\275\225.html" "b/java/JVM/JVM\344\270\212\347\257\207/\344\270\200\344\272\233\347\237\245\350\257\206\347\202\271\347\232\204\350\256\260\345\275\225.html" index 3dfae051..e77b8c62 100644 --- "a/java/JVM/JVM\344\270\212\347\257\207/\344\270\200\344\272\233\347\237\245\350\257\206\347\202\271\347\232\204\350\256\260\345\275\225.html" +++ "b/java/JVM/JVM\344\270\212\347\257\207/\344\270\200\344\272\233\347\237\245\350\257\206\347\202\271\347\232\204\350\256\260\345\275\225.html" @@ -23,12 +23,12 @@ } JVM上篇 | shAilene - +

                                                JVM上篇

                                                JVM与Java体系结构

                                                JVM的整体结构

                                                1. image-20210804221355245

                                                  字节码文件-----> JVM

                                                  这个过程是通过classloader 即 类装载器子系统。

                                                  classloader的作用是将字节码文件加载到内存中,生成一个Class对象,这个过程中涉及到加载、链接、初始化。其中链接有三步

                                                  运行时数据区

                                                  • 方法区、堆 是多个线程共享
                                                  • 虚拟机栈(Java栈)、本地方法栈和程序计数器是每个线程独有一份

                                                  执行引擎

                                                  • 解释器
                                                  • JIT即时编译器
                                                  • 垃圾回收器

                                                  我们说把字节码文件加载到内存中,下一步就是解释运行,解释运行这一步就是用到解释器,如果只用解释器,性能就差一些,对于一些热点代码,我们希望提前编译出来,就要用到JIT即时编译器。这里的编译器和javac.exe编译java源文件到字节码文件时不同的,javac.exe编译java源文件叫编译器的前端,JIT即时编译器叫编译器的后端。

                                                  操作系统只能够识别机器指令,但是字节码指令虽然是二进制的,但是它不等同于机器指令,执行引擎就充当了把高级语言Java语言翻译成机器语言的翻译者。

                                                  操作系统并不识别字节码指令

                                                Java代码执行流程

                                                1. image-20210804223602743

                                                  高级语言翻译成机器指令的过程其实就是由执行引擎来执行的

                                                  市面上主流的虚拟机都采用了解释执行和即时编译并存的方式

                                                  解释器是保证响应的时间的,逐行地对字节码指令进行解释执行

                                                  JIT是对热点代码的字节码指令再编译成机器指令,这是二次编译,第一次编译是把源文件编译成字节码文件,第二次是把字节码文件中的字节码指令编译成机器指令,这部分机器指令是反复执行的热点代码,还缓存起来了,存储在方法区中,保证程序执行的性能,所以市面上主流的虚拟机都采用二者并存的方式。

                                                JVM的架构模型

                                                1. Java编译器输入的指令流是基于栈的指令架构

                                                  另外一种指令集架构是基于寄存器的指令集架构

                                                  image-20210804224747608

                                                  栈是内存层面的,不需要和硬件打交道,所以有更好的可移植性

                                                  基于寄存器的方式,性能优秀,指令需要由CPU来执行,在高速缓冲区中进行执行,和硬件的耦合度高,

                                                  栈式架构的指令集少,但是完成一个操作的指令多,寄存器架构完成同样操作的指令少。

                                                JVM的生命周期

                                                1. 自定义类是由系统类加载器加载的,自定义类会默认继承Object类,Object类就是由引导类加载器加载的。

                                                2. Java虚拟机的启动是通过引导类加载器创建一个初始类来完成的。这个初始类不是Object类

                                                  执行一个简单的程序,实际上会加载非常多的类,Object类是属于引导类加载器加载的类之一

                                                  父类的加载是早于子类的

                                                3. 一个JVM对应于一个运行时数据区,也就是运行时环境,对应于Runtime类,Runtime类是单例的,是饿汉式

                                                4. 主流的JVM既提供解释器,也提供JIT即时编译器,解释器逐行解释执行字节码文件,编译器是将字节码编译成机器指令,因为字节码虽然是二进制文件,但是并不是机器指令,这是一次再编译,目的就是将热点代码编译成机器指令并进行缓存,提高执行效率。

                                                  第一次编译是将Java源文件编译成字节码文件

                                                  第二次编译是将字节码的热点代码编译成机器指令。

                                                5. 类的加载器就有几种,有引导类加载器,系统类加载器,一个自定义类就是通过系统类加载器进行加载,作为Class类的对象加载到方法区中。

                                                  JVM启动是通过引导类加载器,即bootstrap class loader 创建一个初始类。Object类就是引导类加载器加载的。

                                                6. 执行引擎的作用就是将高级语言翻译成机器指令

                                                7. 为什么不把所有字节码都编译成机器指令,都进行缓存

                                                  执行引擎中的JIT即时编译器,将字节码再编译成机器指令,这也是需要花时间的。如果编译每一行,会导致暂停时间过长。暂停的时间就是用来编译的。

                                                  解释器是保证响应时间的,响应很快,上来就执行,因为不需要编译!

                                                  解释器和JIT即时编译器要搭配使用,这也是Java说是半编译半解释运行的原因

                                                8. 方法区的概念只有HOTSPOT才有

                                                9. 通过计数器找到最具编译价值代码,将字节码指令翻译成机器指令,在本地缓存起来,下次需要的时候直接执行

                                                10. 解释器主要负责的是响应时间,编译器主要解决的是执行的性能,因为将字节码指令编译成机器指令是需要花时间的,编译好并缓存好之后才解决性能。解释器就负责响应,所以两者需要结合起来。

                                                类加载子系统

                                                概述

                                                image-20210805223255637

                                                image-20210805223443030

                                                1. 类加载器子系统详细可见下面这张图,类加载器子系统。

                                                  类加载器又有多种,比如引导类加载器、系统类加载器

                                                  类的加载

                                                  • loading 加载
                                                    • 引导类加载器
                                                    • 扩展类加载器
                                                    • 系统类加载器
                                                    • 也可以自定义类加载器
                                                  • linking 链接
                                                    • 验证
                                                    • 准备
                                                    • 解析
                                                  • initialization 初始化 (涉及到静态变量的显示初始化)
                                                2. 程序计数器是每个线程一份

                                                3. 我们平时说的栈是指虚拟机栈

                                                4. 堆区是被多个线程共享的

                                                5. 方法区主要用来存放类的信息、常量等等,方法区只有hotspot才有

                                                6. 执行引擎分为解释器、JIT编译器、垃圾回收器

                                                  image-20210805224014478

                                                  image-20210805224156490

                                                7. 如果自己想手写一个虚拟机的话,要考虑

                                                  • 类加载器子系统
                                                  • 执行引擎

                                                类加载器子系统作用

                                                1. image-20210805224728324

                                                  class字节码文件在开头有特定文件标识,这个验证是在链接阶段第一个阶段验证阶段来验证

                                                2. 字节码文件是物理磁盘上的文件,类的加载器主要是把这个物理磁盘上的字节码文件加载到内存当中,生成Class的实例,生成到方法区

                                                3. image-20210805225629843

                                                  加载分为加载、链接、初始化三个部分,恰好第一个部分也叫加载

                                                  方法区在jdk7即以前叫永久代,之后叫元空间,都是方法区的具体实现

                                                  生成Class的对象实例是在加载这个环节出现的。

                                                4. 链接分为三个子阶段:

                                                  • 验证

                                                    字节码文件起始都是叫CA FE BA BE,这称为魔术,所有能被JVM识别的字节码文件,有效起始都是这个,通过这个来进行校验

                                                    字节码文件也是二进制文件,但是字节码指令不是机器指令!虽然字节码文件是二进制的。所以jvm结构中有执行引擎,执行引擎就有将高级语言转换成机器指令的作用,所以在执行引擎中,JIT即时编译器要对字节码指令编译成机器指令,这是二次编译

                                                    字节码文件是二进制文件,很容易伪造。所以需要进行验证,看所验证的字节码文件是否是符合当前虚拟机要求,保证被加载类的正确性。

                                                  • 准备

                                                    image-20210806215338200

                                                    静态变量(或者叫类变量),a被显式赋值为1,但是在链接的准备阶段,是赋值为0,在初始化阶段才会赋值为1。链接的准备阶段,是为静态属性赋默认初始值,初始化阶段才是显式赋值

                                                    这里不包含用final修饰的static变量,因为final在编译的时候就会分配了,准备阶段会显式初始化

                                                    这里不会为实例变量分配初始化,因为这个时候还没有创建对象,还是一个类的加载过程。类变量(可以理解为类的信息,类变量也是静态变量,属于静态结构,是随着类的加载而加载的),类变量会分配在方法区中,而实例变量是随着对象一起分配到Java堆中。

                                                    虚拟机栈里存的是局部变量,那么成员变量就分为静态变量和非静态变量,静态变量就是随着类的加载而加载,是属于类的结构,会分配在方法区中,因为类在被classloader,也就是类加载器子系统加载之后,类的信息、结构会加载到内存的方法区中,而非静态变量不会,非静态变量会随着实例对象的创建,和对象实例一起,分配到Java堆空间中

                                                    属性也就是成员变量是有默认初始值的,而局部变量没有,必须显式赋初始值,属性中的静态变量在链接的准备阶段就会默认赋初始值了,而非静态变量会随着对象实例的创建而创建,分配到堆空间中。虽然都是成员变量,但是他们的生命周期是不同的。

                                                  • 解析

                                                    将符号引用转换为直接引用

                                                5. 初始化

                                                  执行类构造器方法<clinit>()的过程

                                                  任何一个类,声明以后,内部至少存在一个类的构造器,这里说的构造器就是我们平常说的构造器了,可以显式声明,也可以是系统默认提供的, 这个在字节码文件里对应于<init>(严格来说字节码文件是二进制文件,字节码文件翻译之后会有这个<init>),这个就是指的我们说的构造器

                                                  而<clinit>这个指的是类里面的所有静态变量(类变量)的显式赋值动作以及静态代码块里的内容。<clinit> 是静态变量赋值和静态代码块的语句

                                                  子类的<clinit>执行一定会晚于父类的<clinit>的执行

                                                  虚拟机执行类的加载的时候,只会调用一次<clinit>方法,类加载之后会在内存中缓存起来,也就是说,一个类只会被加载一次

                                                类加载器的分类

                                                1. JVM支持两种类型的类加载器,分别为引导类加载器,和自定义类加载器,

                                                  所有派生于抽象类ClassLoader的类加载器都划分为自定义类加载器。所以系统类加载器也属于自定义类加载器

                                                2. bootstrap classloader即引导类加载器不是Java语言编写的,在代码里也不能通过getParent()的方式获取到

                                                3. 对于用户自定义类来说,默认使用系统类加载器进行加载

                                                  Object类则是用引导类加载器进行加载

                                                  String类是用引导类加载器进行加载

                                                4. 系统的核心类库都是使用引导类加载器进行加载的。

                                                  引导类加载器在代码里没办法获取到。

                                                  引导类加载器是使用C和C++来编写的,嵌套在JVM内部(可以理解为就是JVM中的一部分,就是用来加载Java的核心类库), 自定义类加载器是使用Java语言编写的。

                                                5. 引导类加载器并不继承自ClassLoader,没有父加载器

                                                  引导类加载器加载扩展类和应用程序类加载器(系统类加载器),并指定为他们的父类加载器

                                                  代码里获取到类的加载器之后,发现这些类的加载器也是对象,这些对象对应的类也是需要加载的,就是通过引导类加载器进行加载的。

                                                  也就是说比如自定义类是通过系统类加载器加载的,而系统类加载器是通过引导类加载器加载的。

                                                  出于安全考虑, 引导类加载器只加载java、javax、sun等开头的类

                                                  引导类加载核心类库!

                                                6. 引导类加载器也叫启动类加载器,Bootstrap ClassLoader

                                                  凡是和底层操作系统编程相关的,还是考虑C和C++,但是现在随着硬件的发展Java的执行效率和C已经不相上下,在最初的时候,Java的启动类加载器还是用C和C++来编写的

                                                7. 扩展类加载器是虚拟机自带的加载器,是Java语言编写的,继承于ClassLoader类,父类加载器为启动类加载器,也就是引导类加载器。

                                                  注意在这里父类和父类加载器是不同的

                                                  扩展类加载器就是加载核心类库之外的扩展的那些包

                                                8. 应用程序类加载器也叫系统类加载器,AppClassLoader

                                                  也是派生于ClassLoader类

                                                  父类加载器为扩展类加载器,扩展类加载器的父类加载器为启动类加载器,父类加载器和父类不同。

                                                  该类加载器是程序中默认的类加载器

                                                9. 在必要时,用户还可以自定义类加载器

                                                  为什么要自定义类加载器

                                                  • 隔离加载类
                                                  • 修改类加载的方式
                                                  • 扩展加载源
                                                  • 防止源码泄漏

                                                  隔离加载类就是说在同一个项目中,引入不同的框架,或者在框架中用到了中间件,中间件和应用是隔离的,那么就需要把类加载到不同环境中,比如应用的jar包,让jar包不冲突

                                                10. 类加载器分为两类,一类是引导类加载器,另一类是继承于ClassLoader的类加载器即自定义类加载器

                                                11. 抽象类里面可以有不抽象的方法

                                                12. 系统类加载器的父类加载器是扩展类加载器

                                                  扩展类加载器的父类加载器是引导类加载器

                                                13. 大的Class的实例clazz可以获取当前类的ClassLoader

                                                  clazz.getClassLoader();
                                                  -

                                                双亲委派机制

                                                1. Java虚拟机对class文件采用的是按需加载的方式,也就是说当需要使用该类时,才会将它的class文件加载到内存生成class对象。

                                                  加载某个类的class文件时,Java虚拟机采用的是双亲委派模式,即把请求交给父类处理。它是一种任务委派模式

                                                2. 静态结构是随着类的加载而加载,随着类的结构被加载到内存中的方法区中,类的加载就是类作为Class的实例被加载到内存中的方法区中,作为类的信息、结构的调用的接口

                                                  属性也就是成员变量分为静态和非静态的,非静态的变量是随着对象的加载而加载到内存的堆空间中,而静态变量是静态结构,随着类的加载过程,被加载到方法区中,类作为Class的对象,是类的信息和各种数据的访问入口。

                                                  静态代码块的代码也会随着类的加载而执行

                                                  静态代码块是在类加载的第三个阶段,初始化阶段调用的!<clinit>调用的是静态变量显式赋值和静态代码块内的语句。前两个阶段是加载和链接,其中链接又分为三个阶段

                                                  静态变量显式赋值和静态代码块内的语句会被放在<clinit>构造器中进行执行。而<init>构造器是指的我们平常说的构造器,就是类的构造器。

                                                  要分清楚<clinit>和<init>这两种构造器

                                                3. 类的加载过程分为加载、链接、初始化,其中链接分为验证、准备、解析

                                                  其中加载过程具体有三点:

                                                  1. 通过全限定名获取此类的二进制字节流
                                                  2. 将二进制字节流代表的静态存储结构转换为方法区中的运行时结构
                                                  3. 将此类作为Class的对象,加载到内存中的方法区中,作为该Class对象各种信息和方法调用的访问入口
                                                4. 双亲委派机制工作原理

                                                  如果一个类加载器收到了类加载请求,它并不会自己先去加载,而是把这个请求委托给父类的加载器去执行

                                                  如果父类加载器还存在其父类加载器,则进一步向上委托,依次递归,请求最终会到达顶层的启动类加载器(引导类加载器)。

                                                  这个过程和类的加载有点像,类的加载过程中,子类的加载之前一定要有父类的加载,最终会到Object类需要加载

                                                  如果父类加载器可以完成类加载任务,就成功返回,如果父类加载器不可以完成任务,子类加载器才会自己去尝试加载,这就是双亲委派模式。

                                                  引导类加载器加载完之后,子类加载器就不会去加载了。

                                                5. 比如一个自定义类加载过程中的双亲委派机制。

                                                  类加载过程中涉及到类装载子系统,就是类加载器,类加载器有工作机制,就是双亲委派机制,比如一个自定义类,那么就对应于系统类加载器收到了类加载请求,然后向上委托,最终到达顶层的引导类加载器,引导类加载器是加载Java的核心类库,它不管自定义类的加载,就向下委托(严格来说不叫向下委托,就是父类加载器加载失败,交由子类加载器自己处理),扩展类加载器也不管,最后是才是系统类加载器负责加载我们的自定义类

                                                6. 类加载过程中,只有一个类加载器加载就行了。父类加载器不加载的话,那么就给子类加载器自己加载!

                                                7. 去执行类里面的代码,或者说运行过程,会进行类的加载,有些代码运行不了,或者运行失败,可以试试从类的加载这个过程去考虑。

                                                  比如自定义String类里写main方法,为什么运行失败,因为类加载时,由于双亲委派机制,最终由引导类加载器加载String类,那么加载的是核心类库的String类,而不是我们自定义的String类

                                                8. 对象.getClass() == 类.class 为true,等号两边都是Class的对象实例

                                                  Class的对象实例什么意思?

                                                  就是这个类本身就是对象,是Class的对象

                                                9. 双亲委派机制的优势

                                                  • 避免类的重复加载,一旦有一个类的加载器去加载了,另外的加载器就不会去加载了。
                                                  • 保护程序安全,防止程序被恶意篡改
                                                10. 自定义String类,但是在加载自定义String类的时候会率先使用引导类加载器加载,而引导类加载器在加载的过程中会先加载jdk自带的java.lang包下的String类,报错信息说没有main方法,就是因为jdk自带的String类这个核心类没有main方法,这样可以保证对Java核心源代码的保护,这就是沙箱安全机制

                                                11. 在JVM中表示两个class对象是否相同的两个必要条件:

                                                  • 类的完整类名必须一致,包括包名

                                                  • 加载这个类的ClassLoader(指ClassLoader实例对象)必须相同

                                                    这里说的类加载器是指实例对象,类加载器本身又是对象,它对应的类是属于Java类库的,比如ClassLoader抽象类,所以类加载器对应的类是由引导类加载器加载的

                                                  换句话说,在JVM中,即使类名相同,但是加载他们的类加载器ClassLoader不同,那么这两个类对象(Class的对象)也是不相等的。

                                                12. 系统类加载器加载自定义类,这个类加载器的信息会在方法区中进行记录,就是这个类加载器的一个引用会作为类型信息的一部分保存在方法区中

                                                运行时数据区概述及线程

                                                概述

                                                1. image-20210808193347849

                                                  类加载过程分为加载、链接、初始化三个过程

                                                  加载完以后,内存中的方法区中就保存了运行时类本身,加载到内存中的类叫做运行时类!

                                                  接下来就要用执行引擎去做执行,执行引擎分为解释器(保证响应)、JIT即时编译器(保证执行效率, 热点代码二次编译及缓存)、垃圾回收器三部分。执行引擎执行的过程中,都要用到运行时数据区

                                                2. 执行引擎的JIT即时编译器可以把字节码指令翻译成机器指令

                                                3. 内存是非常重要的系统资源,可以理解为运行内存,时硬盘和CPU的中间仓库和桥梁,承载着系统和应用程序的实时运行

                                                  内存一定要和实时运行挂钩

                                                  JVM内存布局规定了Java在运行过程中的内存申请、分配、管理的策略

                                                  运行时数据区就是JVM内存布局,就理解为内存

                                                  CPU读的数据都来自于内存,或者说CPU直接交互的对象就是内存!

                                                4. image-20210808201004706

                                                  红色的是所有线程共享的,即方法区(jdk8及以后也可以叫元空间)和堆空间

                                                  灰色的是每个线程私有的,即本地方法栈、虚拟机栈和程序计数器

                                                  运行时数据区中,其中有一些会随着虚拟机的启动而创建,随着虚拟机的退出而销毁,与虚拟机的生命周期是一样的,另外一些则是与线程一一对应的,与线程的生命周期是一致的。

                                                  如果有5个线程,就是有5组程序计数器、本地方法栈、虚拟机栈,但是只有一个方法区和堆

                                                  堆空间和方法区是共用的

                                                  类只会加载一次,类加载过程中的初始化<clinit>需要保证同步

                                                  方法区主要放类的信息

                                                5. 从频率上讲,95%的垃圾都集中在堆区,5%集中在方法区

                                                6. JIT编译以后的代码缓存有的认为是方法区的一部分,有的认为不是,不用细抠,但是要明确JIT编译的代码缓存不在堆空间

                                                7. 一个JVM实例就对应一个Runtime实例,Runtime实例对象就对应于运行时数据区,并且只有一个Runtime实例,是单例的

                                                8. 在Hotspot jvm里,每个线程都与操作系统的本地线程直接映射,当一个Java线程准备好执行以后,此时一个操作系统的本地线程也同时创建,Java线程执行终止后,本地线程也会回收

                                                  如果执行线程的过程中,出现了异常没有处理,会导致Java线程终止,此时本地线程决定JVM要不要终止,取决于当前线程是不是最后一个非守护线程

                                                9. 一个简单的程序,后台都有许多的线程,这些线程不包括main线程和main线程里创建的线程

                                                  这些后台线程主要有:

                                                  虚拟机线程

                                                  周期任务线程

                                                  GC线程,对垃圾收集行为提供了支持

                                                  编译线程

                                                  信号调度线程

                                                程序计数器

                                                1. 也称为PC寄存器,就是CPU的寄存器的物理结构的一个抽象模拟,因为Java虚拟机是软件层面的概念,运行时数据区可以理解为内存

                                                  也叫程序的钩子,这个钩子可以理解为钩程序的,就是上一行执行完只会,下一行该执行谁了,由PC寄存器来做一个记录

                                                2. PC寄存器用来存储指向下一条指令的地址,由执行引擎根据PC寄存器的下一条指令地址读取下一条指令

                                                  PC寄存器是一块很小的内存空间

                                                  每个线程都有自己的程序计数器,是线程私有的,生命周期与线程的生命周期一致。记录执行到哪里了

                                                  任何一个线程都只有一个方法在执行,也就是所谓的当前方法,栈最上面的方法PC寄存器存储指向当前方法的指令的地址!(这里的当前方法是说栈顶的方法,就是下一条指令)

                                                3. 栈是只有入栈和出栈,不考虑垃圾回收,PC寄存器也没有垃圾回收机制,堆空间和方法区有垃圾回收机制

                                                  PC寄存器不会发生OOM(OutOfMemory)溢出

                                                  栈结构没有垃圾回收,但是有可能会溢出,堆和方法区也可能会溢出

                                                  总结:

                                                  堆、方法区:线程共有,有垃圾回收,可能溢出

                                                  虚拟机栈:线程私有,没有垃圾回收,可能溢出

                                                  PC: 线程私有,没有垃圾回收,不会溢出

                                                4. image-20210808204810558

                                                  指令地址右边的结构叫操作指令

                                                  image-20210808205132418

                                                  执行引擎取出指令后,会操作局部变量表、操作数栈,会把字节码指令翻译成机器指令,机器指令就可以被CPU运算,这是二次编译,解释器就是对字节码逐行解释执行,所以Java是半编译半解释语言

                                                5. PC寄存器的一个面试问题:

                                                  1. 使用PC寄存器存储字节码指令地址有什么用?

                                                  2. 为什么使用PC寄存器记录当前线程的执行地址呢?

                                                    因为CPU需要不停地切换各个线程,这个时候切换回来以后,就需要知道从哪里继续执行,因为PC寄存器存的就是字节码指令的地址!

                                                    JVM字节码解释器就需要通过改变PC寄存器的值,来明确下一条应该执行什么样的字节码指令

                                                    字节码解释器逐行执行字节码指令的,执行引擎通过PC寄存器拿到字节码指令地址,进而拿到字节码指令,然后执行,整个过程就是对字节码指令的逐行解释执行,这里的逐行执行指的不是Java代码!

                                                    执行引擎里有字节码解释器、编译器、垃圾回收器

                                                6. 字节码文件进行反编译操作就能看到字节码指令地址和字节码指令

                                                7. PC寄存器为什么是线程私有的?

                                                  假如三个线程并行执行,实际上是并发执行,因为他们抢占同一个CPU资源

                                                  要注意PC寄存器里面记录的是下一条要执行的字节码指令的指令地址,比如线程1该执行第5行字节码指令,现在切换到另一个线程了,当然不可以接着5执行,PC寄存器必须每个线程一份,分别记录自己的该执行的下一条字节码指令的地址!

                                                8. 如果对应于一个CPU核,有三个线程,那么任何一个确定的时刻,只有一个线程执行。看似并行执行,实际是并发执行

                                                  CPU快速切换执行多个线程,就是并发

                                                虚拟机栈

                                                概述

                                                1. Java是跨平台的语言,有三个特性

                                                  健壮性

                                                  面向对象性

                                                  跨平台性

                                                  其中跨平台性就是因为JVM,展开来说就是Java源文件先经过编译,编译成字节码文件,字节码文件会被加载到JVM内存里,变成运行时数据。而JVM在不同系统平台上有不同的实现,同一份代码,同一份字节码文件可以在不同系统平台的JVM上加载、运行。

                                                  一次编译、多次运行

                                                2. JVM的指令是根据栈来设计的,不同平台CPU的架构不同,所以不能设计为基于寄存器的,不能设计为基于硬件的,而JVM是软件层面,所以设计为基于栈的指令集

                                                  指令集小,但是实现同样的功能,需要更多的指令

                                                  相对寄存器来讲性能更差,因为寄存器是硬件CPU层面的

                                                3. JVM中的内存中,栈和堆是非常重要的两个结构!

                                                4. 栈是运行时的单位,而堆是存储的单位

                                                  栈解决程序的运行问题,局部数据变量是放在栈中的,如果是引用类型变量,放的是对象应用,指向堆空间中的地址

                                                5. 栈的存储单位是栈帧,栈帧里又会细分局部变量表、操作数栈等

                                                6. 堆空间的大小是可以设置的,方法区现在可以设置本地内存了,是物理的内存了,不考虑方法区的话,堆空间是内存中最大的区域

                                                7. 要理解到栈里不只有局部变量表,还有字节码指令,而不是Java代码!都进入到运行时数据区了,怎么可能是Java代码,Java源文件经编译后,运行才会通过类加载子系统加载进运行时数据区,才会从静态的结构变成运行时数据结构。

                                                  要牢记字节码----对应于JVM。

                                                8. 虚拟机栈和线程的生命周期是一样的,一个线程对应一个Java虚拟机栈。虚拟机栈是线程私有的

                                                  栈里面保存的是一个个的栈帧,一个栈帧就对应着一次方法调用!栈顶的方法称为当前方法!

                                                  虚拟机栈主管Java程序的运行,保存方法的局部变量(8种基本数据类型、对象的引用地址)、部分结果,并参与方法的调用和返回

                                                9. 每个方法执行,伴随着进栈

                                                  执行结束后,出栈

                                                  对于栈来说,不存在垃圾回收问题

                                                10. 栈溢出异常,递归如果说不朝着退出递归的条件逼近,就会报栈溢出异常。递归一定要朝着结束递归的方向进行

                                                11. -Xss可以这是栈的大小,EditConfiguration里VM options设置

                                                栈的存储单位

                                                1. 栈中的数据都是以栈帧的格式存在,以栈帧为基本单位

                                                  这个线程正在执行的每个方法都各自对应一个栈帧

                                                  方法和栈帧是一一对应的关系

                                                2. 栈帧是一个内存区块,是一个数据集,维系着方法执行过程种的各种数据信息

                                                3. 栈的操作只有压栈和出栈

                                                4. 在一个活动线程中,一个时间点上,只会有一个活动的栈帧,即只有当前正在执行的方法的栈帧(栈顶栈帧)是有效的。

                                                  这个栈帧被称为当前栈帧

                                                  要注意栈顶栈帧对应着一个当前正在执行的方法。而pc寄存器存储的是下一次要执行的字节指令的地址

                                                  image-20210808221622960

                                                  如果在当前方法中调用了其他方法,那么对应的新的栈帧会被创建出来,放在栈的顶端,成为新的当前帧。

                                                  这是栈,先进后出,后进先出,后创建,后进栈,先执行

                                                5. 程序计数器来指定执行引擎要执行的下一个指令

                                                6. main()方法也对应一个栈帧

                                                7. 不同的栈的数据是不可以共享的,即不可能在一个栈帧中引用另一个栈的栈帧

                                                8. image-20210808222718076

                                                  方法的结束方式分为两种

                                                  1. 正常结束,以return为代表
                                                  2. 方法执行中出现未被捕获的异常,以抛出异常的形式结束

                                                栈帧的内部结构

                                                1. 一个栈帧对应于一个方法

                                                  一个栈帧的入栈对应于一个新的方法的调用

                                                  一个栈帧的出栈对应于一个方法执行的结束,以正常方式结束,或者返回异常返回给前一个方法

                                                2. 栈帧是需要有大小的,取决于内部结构的大小

                                                3. 栈帧内部:

                                                  • 局部变量表
                                                  • 操作数栈(或表达式栈)
                                                  • 动态链接(或指向运行时常量池的方法引用
                                                  • 方法返回地址(或方法正常退出或者异常退出的定义)
                                                  • 一些附加信息

                                                  image-20210808224402410

                                                局部变量表

                                                1. 局部变量表也叫局部变量数组或本地变量表

                                                2. 局部变量表的数据类型主要包括各类基本数据类型、对象引用、以及返回地址类型

                                                3. 局部变量表是数字数组,8种基本数据类型都用数值来表示,对象引用(引用变量或者说引用地址)、返回值类型都可以用数值类型来表示

                                                4. 局部变量表的存储单位是slot,变量槽

                                                5. 局部变量表由于是在栈的栈帧里,栈是线程私有,那么就涉及不到共享的问题,就自然没有线程安全问题了。

                                                6. 局部变量表的大小在编译期间就确定下来,一旦确定下来,在运行期间就不会更改。

                                                7. 一个栈帧对应于一个方法,每个方法里有局部变量,就对应于每个栈帧的局部变量表。在编译期间确定局部变量表大小

                                                  主要影响栈帧的大小的就是栈帧里局部变量表的大小

                                                8. javap指令解析字节码文件,能够看到字节码指令,或通过插件

                                                9. 程序计数器存的是下一条要执行的字节码指令的指令地址,是数值!

                                                10. 局部变量表每个slot的StartPC 指的是声明了这个局部变量之后,下一行开始执行的Java代码对应的字节码指令地址

                                                11. JVM会为局部变量表中每一个slot都分配一个访问索引

                                                12. 构造器在字节码层面会生成<init>,字节码文件解析之后,能够看到<init>

                                                  如果当前栈帧是由构造方法或者实例方法创建的,那么该对象引用this将会存放在index为0的slot处。其余的参数按照参数表继续排列

                                                  每一个slot都会分配索引,那this就分配在索引为0的slot处

                                                13. 引用类型占据一个slot,double类型变量占据两个slot

                                                14. 栈帧中的局部变量表中的槽位是可以重用的。如果一个局部变量过了其作用域,那么在其作用域之后申明的新的局部变量就很有可能会复用过期局部变量的槽位

                                                15. 成员变量(类里面,方法外部定义的变量)

                                                  • 类变量(静态变量,随着类的加载而创建,分配到方法区中)
                                                    • linking的prepare阶段:给类变量默认赋值(这个赋值,不包括给实例变量默认赋值,因为加载、链接、初始化三个阶段是类的加载过程,现在是类的加载,加载的是类的结构,静态变量是随着类的加载而加载,但是实例变量不是,实例变量是随着对象创建而分配到堆中)
                                                    • initial阶段:给类变量显式赋值及静态代码块赋值<clinit>
                                                  • 实例变量(随着对象的创建而分配到堆空间中)
                                                    • 随着对象的创建,会在对空间中分类实例变量空间,并进行默认赋值

                                                  局部变量(方法内部的变量)

                                                  • 在使用前,必须要进行显式赋值,否则编译不通过
                                                16. 局部变量表中的变量也是重要的垃圾回收根节点(gc root),只要被局部变量表中直接或间接引用的对象都不会被回收

                                                操作数栈

                                                1. 栈帧里另一个非常重要的结构,叫操作数栈

                                                2. 栈可以使用数组或链表来实现,数组和链表是真实存在的物理结构(存储结构)

                                                3. 也就是虚拟机栈以栈帧为存储单元,而栈帧里又有栈!就是表达式栈即操作数栈

                                                4. 只要是栈,只能有入栈和出栈两个操作

                                                  入栈、出栈的对象为操作数!!

                                                5. 操作数是什么呢?

                                                  操作数栈,主要用于保存计算过程的中间结果,同时作为计算过程中变量临时的存储空间。所以操作数就是指的临时中间结果或临时变量之类的

                                                6. 操作数栈,栈中的任何一个元素都是可以任意的Java数据类型

                                                  • 32bit的类型占用一个栈单位深度
                                                  • 64bit的类型占用两个栈单位深度
                                                7. 操作数栈和局部变量表一样,在编译之后就确定了栈的深度

                                                8. image-20210809192420557

                                                  这是字节码文件解析之后的样子,stack就是操作数栈编译之后确定的深度,locals是局部变量表编译之后确定的大小

                                                  编译之后还是在本地磁盘的,是生成字节码文件,要运行,那么就需要进行加载,这样二进制静态数据才会被加载到方法区,变成运行时结构

                                                9. 如果被调用的方法带有返回值,其返回值将会被压入当前栈帧的操作数栈中,并更新PC寄存器中下一条需要执行的字节码指令的地址!

                                                10. Java虚拟机的解释引擎是基于栈的执行引擎,这里的栈就是指的操作数栈!

                                                11. byte、short、char、boolean类型都是以int类型保存

                                                12. 执行引擎是负责把字节码执行转换为机器指令,然后CPU执行

                                                13. image-20210809193704853

                                                  框起来这个几个,涉及到操作数栈,iadd会首先出栈,然后CPU执行相加,CPU能执行的原因是因为执行引擎将字节码指令转换成了机器指令,上面这张图就是字节码指令

                                                  istore这些就是涉及到局部变量表

                                                14. 局部变量表用数组实现,在编译期就确定了数组的长度,局部变量表是数字数组

                                                  操作数栈,可以用数组或链表这两种真实结构来实现,在这里是用数组实现。在编译期间就确定了数组的长度

                                                  也就是说局部变量表和操作数栈都是用数组实现

                                                栈顶缓存技术

                                                1. 基于栈式指令架构的虚拟机是使用的零地址指令,栈式内存层面的,为了JVM的跨平台性,用的栈式指令架构

                                                  而基于寄存器(与硬件挂钩),是一地址指令、二地址指令、三地址指令。

                                                  栈式架构指令集更小,但是由于是栈式的,那么完成一个操作,需要使用很多的入栈、出栈指令,所以完成一项操作的指令数比基于寄存器的架构多,那么内存读写次数也就更多

                                                2. 栈顶缓存:将栈顶元素全部缓存在物理CPU的寄存器中,降低对内存的读、写次数

                                                动态链接

                                                1. 大部分字节码指令在执行的时候都需要进行对常量池的访问

                                                  帧数据区中就保持着能够访问运行时常量池的指针

                                                  动态链接就是指向运行时常量池的方法引用(这里的运行时常量池就是方法区中的运行时常量池)

                                                2. 在Java源文件被编译到字节码文件中时,所有的变量和方法引用都作为符号引用保存在class文件的常量池里,运行之后,class文件的常量池的信息就保存到方法区中的运行时常量池中了。

                                                  比如:描述一个方法调用了另外的其他方法时,就是通过常量池中指向方法的符号引用来表示的。

                                                  动态链接的作用就是为了将这些符号引用转换为调用方法的直接引用

                                                  可以理解为:

                                                  动态链接指向方法区中运行时常量池中的符号引用,从而得到直接引用

                                                3. 常量池里面是符号引用

                                                  动态链接是根据符号引用去常量池里面找到具体的位置,再根据符号引用得到直接方法引用

                                                方法的调用

                                                1. image-20210809204952628

                                                  静态链接也叫早期绑定,由符号引用转换为直接引用,在编译期就能确定下来

                                                  动态链接叫晚期绑定

                                                2. 虚函数的特征就体现为在运行期才能够确定下来调用的是哪个方法!!!!

                                                  就是具备晚期绑定的特点!

                                                  如果Java程序中不想让某个方法拥有虚函数的特征,就可以使用关键字final来标识。

                                                  final标识就是不允许这个方法被重写,那么就是在编译期就确定了,没有重写方法,就是不具备多态的这种特点了。

                                                3. 子类对象多态性的使用前提

                                                  1. 类的继承关系

                                                  2. 方法的重写

                                                    静态方法、final方法、私有方法都不可以被重写,构造器不能重写!

                                                4. 非虚方法

                                                  如果方法在编译期就确定了具体的调用版本,这个版本在运行时是不可变的,这样的方法称为非虚方法

                                                  静态方法、final方法、私有方法、实例构造器、父类方法都是非虚方法

                                                  剩下的方法都是虚方法,就是在编译期不确定具体调用的哪个方法,为什么不确定?就是因为涉及到方法的重写,这是多态性的体现

                                                5. image-20210809210735289

                                                6. Java是静态类型语言

                                                  动态类型语言和静态类型语言两者的区别就在于对类型的检查是在编译期还是在运行期,满足前者就是静态类型语言,反之就是动态类型语言

                                                  JavaScript,python是动态类型语言

                                                  动态类型语言是判断变量值的类型信息,变量没有类型信息,变量值才有类型信息

                                                7. 方法重写的本质

                                                  image-20210809214353466

                                                8. 虚方法表是为了减少频繁地去找应该调用哪个方法的过程

                                                  在面向对象的编程中,会很频繁地使用到动态分派(可以理解为去找应该执行哪个方法),为了提高性能,JVM采用在类的方法区建立一个虚方法表来实现,非虚方法不需要,因为非虚方法在编译就可以确定是执行哪个方法。

                                                9. 每个类中都有一个虚方法表,表中存放着各个方法的实际入口

                                                  子类重写过父类的方法,或者实现了接口的方法,那么虚方法表中有实际入口,指向子类自己实现的方法,如果没有重写的那些虚方法,就是指向父类的方法或者接口的方法

                                                  换句话说,虚方法表就有方法具体的实际入口

                                                  虚方法表是在方法区的,每个类都有!

                                                  虚方法表在方法区,是运行时,类的加载过程才被创建,开始初始化

                                                  运行字节码文件,才会有虚方法表

                                                  因为是虚方法,编译时,不知道在运行时具体会调用哪个方法,只有在运行时有了创建了虚方法表才知道。

                                                  虚方法表,代替了每次都在常量池中找符号调用,如果找不到就继续从下往上对父类进行搜索的这个过程

                                                  字节码文件的常量池对应于方法区的运行时常量池(进行类的加载后),常量池里有所有变量和方法的符号引用,根据符号引用转换为调用方法的直接引用,这叫做动态链接

                                                10. 虚方法表在类加载的链接阶段被创建并开始初始化

                                                方法返回地址

                                                1. 方法返回地址存储的是调用该方法的PC寄存器的值。

                                                  PC寄存器存储的是要执行的下一条字节码指令的指令地址

                                                  PC寄存器这个下一条要执行的指令的指令地址给了方法返回地址

                                                  交给执行引擎,去执行后续的操作

                                                2. 一个方法的结束有两种方式

                                                  • 正常执行完成---正常退出出口
                                                  • 出现未处理的异常,非正常退出----异常退出出口

                                                  无论哪种方式退出,在方法退出后都返回到该方法被调用的位置!

                                                  方法退出后,返回到该方法被调用的位置,递归就是要这么来分析

                                                  方法正常退出时,调用者的PC计数器的值作为返回地址,即调用该方法的指令的下一条指令的地址

                                                  通过异常退出的,返回地址是要通过异常表来确定,栈帧中一般不会保存这部分信息

                                                  通过异常完成退出的,不会给他的上层调用者产生任何的返回值

                                                3. 正常完成出口和异常完成出口的区别在于:

                                                  通过异常完成出口退出的不会给他的上层调用者产生任何的返回值

                                                4. 不考虑方法区的情况下,最大的就是堆空间

                                                5. 方法返回地址相当于是给上层调用者产生的一个返回地址,是调用者PC寄存器保存的下一条指令的指令地址,是给执行引擎执行的,相当于是上层调用者调用完一个方法了,得到一个返回地址了,该接着往下执行了

                                                6. 何为线程安全?

                                                  如果只有一个线程才可以操作此数据,则必是线程安全的

                                                  如果有多个线程操作此数据,则此数据是共享数据,如果不考虑同步机制的话,会存在线程安全问题

                                                7. 方法中定义的局部变量是否是线程安全的?

                                                  方法中的局部变量r颗是在内部产生内部消亡的,就是线程安全的,

                                                  不是内部产生的,或者是内部产生的,但是返回到外面了,就不是线程安全的。

                                                本地方法接口

                                                1. 什么是本地方法?

                                                  就是用native来修饰的Java方法就是本地方法

                                                  没有方法体!但不是抽象方法!没有方法体是因为方法体由C、C++实现

                                                  本地方法就是一个Java调用非Java代码的接口

                                                2. 本地方法接口的作用就是融合不同的编程语言为Java所用,初衷时融合C\C++程序

                                                  就是说方法体的具体实现不由Java来实现,就用native标识,就是本地方法

                                                3. 为什么要使用本地方法

                                                  1. 有时Java应用需要与Java外面的环境交互。这是本地方法存在的主要原因

                                                    如果我们在某些需要很在乎执行效率的场景,要考虑调用C和C++

                                                  2. 虽然Java代码运行在jvm上,但是jvm并不是真实的操作系统,是虚拟机,它要依赖真实的操作系统,操作系统层面,就要依赖C实现,JVM一些部分就是用C写的

                                                    引导类加载器就是C\C++编写的,属于JVM的一部分

                                                4. 用native标识来表示对本地方法的调用

                                                本地方法栈

                                                1. Java虚拟机栈管理Java方法的调用,本地方法栈管理本地方法的调用

                                                  虚拟机栈的存储单位是栈帧,一个栈帧就对应于一个方法,里面有局部变量表、操作数栈、动态链接、方法返回地址

                                                  一个栈帧就对应于一个方法的调用

                                                2. 栈管运行,堆管存储

                                                3. 本地方法栈和虚拟机栈、PC都是线程私有的。堆和方法区是线程公用的。

                                                4. 本地方法栈和虚拟机栈一样,允许被实现成固定或者是可动态扩展的内存大小

                                                  image-20210810201758436

                                                  栈层面,线程请求分配的栈容量超过了栈允许的最大容量,是StackOverflowError

                                                  内存层面不够了,是outOfMemoryError

                                                5. Hotspot JVM 有本地方法栈,但是不是所有的Java虚拟机都有本地方法栈。

                                                  Hotspot JVM将本地方法栈和虚拟机栈合二为一

                                                6. image-20210810202350855

                                                堆的核心概述

                                                1. 在整个运行时数据区,不考虑方法区,堆是最大的空间,因为方法区可以设置,可以通过本地空间实现

                                                2. 堆空间主要用来存储对象实例的

                                                3. 方法区、堆对于线程来说是共用的,但是对于一个进程来说,是唯一的。

                                                  一个进程对应于一个JVM实例,**一个JVM实例就有一个运行时数据区。**所以一个JVM实例就对应于一个堆内存

                                                  Runtime是单例的,是饿汉式创建的。

                                                  Runtime里面就有一个堆、一个方法区。所以对于一个进程来说,堆和方法区是唯一的。

                                                  但是一个进程有多个线程,所以多个线程要共享这个进程的堆空间和方法区

                                                4. 每一个线程各自拥有程序计数器、本地方法栈、虚拟机栈。共用他们所属的进程的方法区和堆。

                                                5. 共享就涉及到线程安全问题

                                                6. 一个jvm实例只存在一个堆空间,堆是Java内存管理的核心区域

                                                7. Java堆空间在JVM启动的时候被创建。

                                                  JVM是什么时候启动?

                                                  JVM是在Java程序运行时,JVM实例通过引导类加载器创建,即启动

                                                  堆空间在jvm启动时候创建,其空间大小也就确定了。

                                                8. 堆是垃圾回收、性能调优的重要区域

                                                9. 堆内存的大小是可以调节的。

                                                10. -Xms -Xmx分别设置堆的初始大小和最大大小

                                                11. 通过两个main方法入口跑两份Java代码,就是启动两个进程!一个进程里有多个线程,main是主线程,还有垃圾回收线程,还有异常处理线程,还可以自定义线程!

                                                  而一份Java程序(只有一个main方法入口)视为一个进程!跑两个就是两个进程!

                                                12. 一个进程对应于一个JVM实例,那么对应于一个运行时数据区,对应于一个堆空间、方法区

                                                13. Java虚拟机规范规定,堆可以处于物理上不连续的内存空间内,但在逻辑上它应该视为连续的。

                                                  物理内存和逻辑内存可以建立一个映射表,可以对物理上不连续的内存在逻辑上看作是连续的。

                                                14. 所有的线程共享Java堆,在这里还可以划分线程私有的缓冲区

                                                  一个进程中的线程共享这个堆的所有空间吗?

                                                  不是的,堆中还有线程私有的缓冲区

                                                15. 所有的对象实例以及数组都应该在运行时分配在堆上

                                                  几乎所有的对象实例都在这里分配内存---almost

                                                  为什么是几乎呢?因为还有可能在栈上分配

                                                16. 数组和对象可能永远都不会存储在栈上,因为栈帧中保存引用(栈帧的局部变量表里保存的基本数据类型是数字、对象引用、返回值类型也可以用数值来表示,所以局部变量是数字数组),这个引用指向对象或者数组在堆中的位置

                                                17. 在方法结束后,堆中的对象不会马上被移除,仅仅在垃圾回收的时候才会被移除

                                                  比如某个方法执行完,调用完之后,栈帧要出栈,那么栈帧中的局部变量表中的对象引用,指向堆空间中的“指针”就没有了,指针没有了之后,堆空间中的对象实例就被认为是垃圾了。

                                                  但是认为是垃圾的这个过程,要等到GC的时候判断,来确定堆空间的对象实例没有对象引用指向了。

                                                  也就是栈帧出栈,没有指针指向堆空间,对象实例变成垃圾,垃圾回收机制判断,回收掉对象实例

                                                  栈帧出栈之后,对象实例不是立即被垃圾回收回收掉的。不是立马回收的!不能老是执行垃圾回收,GC频率高,就影响用户线程执行

                                                  垃圾回收线程执行的时候,需要用户线程停止。

                                                  所以我们会优化使得堆空间大一点,减少GC的次数

                                                  所以并不是栈帧出栈,就立即回收掉堆空间的对象实例

                                                内存细分

                                                1. jdk7及以前,堆内存逻辑上分为三部分

                                                  • 新生区

                                                  • 养老区

                                                  • 永久区(永久代)

                                                  jdk8及以后,堆内存逻辑上分为三部分

                                                  • 新生区
                                                  • 养老区
                                                  • 元空间

                                                  虽然逻辑上分为三部分,但是实际上堆空间不包括永久代

                                                  永久代和元空间都看作是方法区具体的落地实现。

                                                  所以这一章堆空间,主要涉及到新生区和养老区

                                                  堆空间逻辑上有三个区,实际上元空间或者永久代是方法区,实际上堆空间目前来说只有新生区和养老区

                                                2. 新生区具体又分为:

                                                  伊甸园区

                                                  survivor零区(from区)

                                                  survivor一区(to区)

                                                3. -Xms -Xmx分别设置堆的初始大小和最大大小,只管新生代、养老代两个区。

                                                设置堆空间内存大小与OOM

                                                1. 一旦堆区中的内存大小超过“-Xmx”所指定的最大内存时,将会抛出OutOfMemoryError异常

                                                  栈溢出是线程申请的栈容量大小超过了栈的容量

                                                  而OOM是内存不够了。

                                                  比如本地方法栈在扩展的时候无法申请到足够的内存,或者在创建栈的时候,因为内存不够,不能创建本地方法栈,会报OOM

                                                  总之,栈空间溢出了,报栈溢出,内存不够了,报OOM

                                                2. -Xms用来设置堆空间(年轻代、老年代)的初始内存大小

                                                  -X 是jvm的运行参数

                                                  ms 是memory start

                                                  -Xmx 用来设置堆空间(年轻代、老年代)的最大内存大小

                                                3. 开发中,建议将-Xms和-Xmx两个参数配置相同的值,

                                                  堆空间频繁地扩容和释放会造成系统的不必要的压力

                                                  其目的是为了在Java垃圾回收时,避免在GC的时候去调整堆内存的大小,造成系统不必要的压力

                                                4. 堆空间的新生代分为伊甸园区,survivor 0区和survivor 1区

                                                  如果我们要存储对象的话,伊甸园区可以存储,survivor 0区和survivor1区只能选择一个存储,涉及到垃圾回收的复制算法,survivor 0区和survivor1区始终有一个区是空的

                                                5. 查看堆空间设置的参数

                                                  image-20210810224237483

                                                6. OOM也有多种情况,Java heap space只是其中一种,超出了堆空间内存范围

                                                7. new的对象实例会被分配到堆空间中,伊甸园区可以分配空间存储对象实例,幸存者区一定有一个是空的

                                                  old区满了之后,就会报OOM了。

                                                  image-20210810225009965

                                                年轻代与老年代

                                                1. 存储在JVM中的Java对象可以被划分为两类:

                                                  一类是生命周期较短的瞬时对象,这类对象的创建和消亡都非常迅速

                                                  另外一类对象的生命周期很长,在某些极端情况下还能够与JVM的生命周期保持一致

                                                2. 每次进行GC的时候,生命周期较短的对象,会被回收

                                                  生命周期很长的对象,就放在老年代,老年代不会经常进行是否需要进行垃圾回收的判断

                                                3. 年轻代

                                                  • Eden
                                                  • Survivor 0 (from)
                                                  • Survivor 1 (to)

                                                  老年代

                                                4. 对象最先创建的一个位置,就叫伊甸园

                                                  伊甸园中的Java对象,在GC的时候有的会被回收掉,有的还存活了,就放在幸存者0区或1区

                                                5. -XX:NewRatio设置老年代与新生代的比例,默认值是2

                                                  一般情况下不会调这个参数

                                                  如果明确这个程序中有很多对象生命周期都很长,那么把老年代的比例调得更大些

                                                6. -XX:-UseAdaptiveSizePolicy 关闭自适应的内存分配策略

                                                  -XX:SurvivorRatio:设置新生代中Eden与Survivor区的比例

                                                  -Xmn:设置新生代的空间的大小(一般不设置)

                                                7. 几乎所有的Java对象都是在Eden区被new出来的

                                                  绝大部分的Java对象的销毁都在新生代进行了。

                                                新生代对象分配与回收过程

                                                1. 首先把对象分配到伊甸园区(几乎所有的Java对象都是在Eden区被new出来的,不是所有的)

                                                  一旦伊甸园区放满之后,伊甸园区放不下了,这时候就要进行YGC/MinorGC,这个时候进行年轻代的垃圾回收,此时用户线程停止

                                                  触发年轻代的垃圾回收之后,就要进行判断,判断伊甸区的对象谁是垃圾谁不是垃圾

                                                  如果是垃圾,就被回收掉,如果不是垃圾的对象,就被放在幸存者的to区,从Eden区放在幸存者区的对象,age赋值为1

                                                  接着会继续放对象在伊甸园区,伊甸园区满了之后会触发YGC

                                                  每次执行YGC之后,不是垃圾的对象会被放在幸存者to区,即幸存者区空的那个区域(下一轮YGC,此时的to区又变成from区,空的那个叫to区),总之空的叫to区

                                                  也就是说对象可能会交替放在s0区和s1区

                                                  age达到15(幸存者区晋升到老年代的阈值,可以进行设置)的对象,做一个晋升,晋升到老年代,判断对象从幸存者区到老年代,会用到年龄计数器

                                                  image-20210811201352406

                                                2. 伊甸园区满的时候,触发young GC, 幸存者区满的时候,不会触发YGC

                                                  触发YGC之后,会将伊甸园区和幸存者区一起进行垃圾回收

                                                  幸存者区不触发,但是不意味着幸存者区不进行垃圾回收

                                                3. 在进行YGC的时候,绝大部分对象都已经变成垃圾,需要进行回收了,只有很少的对象会进入幸存者区

                                                4. 总结:

                                                  image-20210811201920137

                                                5. image-20210811202400426

                                                6. 伊甸区满---触发YGC

                                                7. image-20210811203453743

                                                Minor GC/Major GC/ Full GC

                                                1. MinorGC = YOUNG GC

                                                2. 针对于老年代的垃圾回收叫Major GC,如果老年代的垃圾回收完了之后,对象仍然放不下,就会出现OOM异常

                                                3. 调优就是希望出现垃圾回收的情况少一些

                                                4. 区分

                                                  HotSpot VM的GC实现:

                                                  • 部分收集(Partial GC)

                                                    • 新生代收集(young gc / minor gc)

                                                      只是新生代的垃圾收集,新生代包括Eden,s0、s1

                                                    • 老年代收集 (old gc/ major gc)

                                                      只是老年代的垃圾收集

                                                      目前只有CMS GC 会有单独收集老年代的行为(但是分类要这么来划分)

                                                      注意,很多时候major gc和full gc会混淆使用,需要具体分辨是老年代回收还是整堆回收

                                                    • 混合收集(mixed GC)

                                                      收集整个新生代以及部分老年代的垃圾收集

                                                  • 整堆收集(full gc)

                                                    就是收集整个Java堆和方法区(新生代、老年代、方法区)的垃圾收集

                                                5. young gc的触发机制

                                                  1. eden区满(survivor满不会引发gc)
                                                  2. 因为Java对象大多具备朝生夕灭的特性,所以minor gc非常频繁,一般回收速度也比较快
                                                  3. minor gc会引发stw,暂停其他用户的线程,等垃圾回收结束,用户线程才恢复运行
                                                6. major gc触发机制

                                                  image-20210811212717272

                                                7. full gc触发机制

                                                  image-20210811212930949

                                                8. 出现OOM之前,一定经历过full gc,因为老年代空间不足会触发full gc,当对象要往老年代放时,但老年代空间不足,那么触发full gc,如果full gc之后还是放不下,那么就会出现OOM

                                                  这里的full gc 和 major gc没有加区分

                                                堆空间分代思想

                                                1. 为什么需要把Java堆分代?

                                                  不同对象的生命周期不同,大多数对象是临时对象

                                                  新生代:eden、survivor0、survivor1

                                                  老年代:存放新生代中经历多次GC仍然存活的对象,有一个阈值,age = 15,如果对象太大,伊甸园区放不下,会判断老年代是否放得下,如果老年代放得下,会直接放到老年代,另外如果survivor区满了,也可能放到老年代。老年代如果还放不下,那么会触发full gc或者说是major gc,如果经历full gc或者major gc后还放不下,那么就会出现OOM

                                                2. 分代就是为了优化GC性能,有minor gc、major gc、 full gc

                                                  minor gc就是高频触发的,新生代是频繁回收的

                                                  老年代回收就降低,就实现优化,因为回收老年代花费时间较多

                                                  优化的方向就是朝着减少gc次数

                                                内存分配策略

                                                1. 优先分配到Eden

                                                  大对象直接分配到老年代

                                                  • 尽量避免程序中出现过多的大对象

                                                  长期存活的对象分配到老年代

                                                  动态对象年龄判断

                                                  • 如果Survivor区中相同年龄的所有对象大小的总和大于survivor区的大小的一半,年龄大于等于该年龄的对象可以直接进入老年代,无需等到那个阈值

                                                  空间分配担保

                                                2. 对象分配过程:TLAB

                                                  TLAB是线程缓冲区

                                                3. 在并发环境下从堆区中划分内存空间是线程不安全

                                                  堆是线程共享的,所以线程不安全

                                                4. 什么是TLAB

                                                  对Eden区继续进行划分,JVM为每个线程分配了一个私有缓存区域,包含在EDEN空间内

                                                  多线程同时分配内存时,使用TLAB可以避免一系列的线程不安全问题

                                                  同时还能提升内存分配的吞吐量,因此我们可以将这种内存分配方式称为快速分配策略

                                                5. image-20210811220336129

                                                6. 所以堆空间所有部分都是线程共享的吗?

                                                  不是,堆空间的新生代的伊甸园区里有TLAB,是线程私有的,JVM会把TLAB作为为对象分配空间的首选,可以避免线程安全问题,如果TLAB放不下,那么会在伊甸园的非TLAB区域为对象分配空间,这时要采用加锁机制确保数据操作的原子性。

                                                  换句话说,如果对象能在伊甸园区的TLAB区域分配空间,则没有采用加锁这种机制。因为使用加锁机制会影响空间分配的速度,所以TLAB是为对象分配空间的首选

                                                7. 分代的一个主要目的就是为了让对象存储在新生代,因为大多数对象是临时对象,通过新生代的ygc,就可以把垃圾回收掉,提高效率

                                                  gc频率变高会影响执行效率,影响用户线程

                                                  调优就是要减少gc频率

                                                8. image-20210811222818578

                                                9. 堆外存储技术

                                                  • 逃逸分析,一个对象没有逃逸出方法的话,那么就可能被优化成栈上分配

                                                  • TAOBAO VM, 将生命周期较长的Java对象从heap中移至堆外(GCIH)

                                                    GC不能管理GCIH的Java对象,从而达到降低GC的回收频率和提升GC的回收效率的目的

                                                10. 为什么要堆外存储?

                                                  为了降低GC频率。提高效率

                                                11. 逃逸分析

                                                  image-20210811223633056

                                                  如何快速地判断是否发生了逃逸分析,就看new的对象是否有可能在方法外被调用

                                                12. 开发中能使用局部变量的,就不要在方法外定义,更不会考虑静态的问题

                                                  如果定义成属性,就涉及到GC的问题

                                                13. 逃逸分析是需要开启的,没有开启的情况下,即时没有发生逃逸,那么对象也是在堆上分配空间

                                                  开启逃逸分析可以减少GC次数,因为将符合条件的对象(即没有发生逃逸的对象)分配到栈上,栈上的对象就不需要垃圾回收了,提高效率,减少GC

                                                  堆外存储的目的就是为了降低GC频率

                                                14. 使用逃逸分析,编译器可以对代码做如下优化

                                                  1. 栈上分配,减少GC

                                                  2. 同步省略,Java虚拟机通过逃逸分析,发现这块代码只能被一个线程访问到,那么在JIT编译阶段就会把上锁的这块代码给取消掉同步锁

                                                  3. 分离对象或标量替换----把聚合量替换成标量,也就是把对象替换成局部变量,局部变量就可以分配到栈空间中,目的还是减少GC,标量替换可以大大减少堆内存的使用,因为一旦不需要创建对象了,那么就不再需要分配堆内存了

                                                    标量替换默认是打开的,就是将对象打散了分配到栈上

                                                  逃逸分析自身也是需要进行一系列复杂的分析的,这其实也是一个相对耗时的过程

                                                15. 但是逃逸分析目前并不成熟

                                                  淘宝的GCIH也不是栈上分配,而是放到本地内存中

                                                16. 用synchronized关键字同步代码块,监视器锁一定要保证是同一个

                                                17. 年轻代是对象的诞生、成长、消亡的区域,一个对象在这里产生、应用,最后被垃圾回收器回收

                                                  老年代放置长生命周期的对象,也有垃圾回收

                                                  老年代回收(full gc)是开发中要尽量避免的

                                                18. 老年代防止长生命周期的对象:

                                                  通常都是从survivor区域筛选拷贝过来的Java对象

                                                19. 普通对象分配:

                                                  • 首先TLAB
                                                  • 如果对象较大,试图直接分配到Eden其他位置上
                                                  • 如果对象太大,完全无法在新生代找到足够的连续空闲空间,JVM就会直接分配到老年代

                                                方法区

                                                栈、堆、方法区的交互关系

                                                1. image-20210813105607835

                                                2. 堆空间和方法区是线程共享,要考虑线程安全问题

                                                  元空间相对来说是比较稳定的,GC不会像堆空间那么频繁

                                                  GC是较多回收新生代,较少回收老年代,基本不动方法区

                                                3. 程序计数器不会报异常,也不存在GC

                                                4. image-20210813105911154

                                                  整个类的结构会加载到方法区

                                                  new的对象放到对空间中

                                                  如果这行代码在方法内写的,那么person这个对象引用就作为局部变量放到虚拟机栈的栈帧的局部变量表中

                                                5. 方法区主要存放的是方法和构造器的字节码指令、类的信息(结构)

                                                6. 方法区是随着虚拟机启动,创建好的

                                                7. 虽然方法区在逻辑上是堆空间的一部分(在Java虚拟机规范上),但是堆的话,有压缩算法、GC。但是方法区可以不压缩,也可以没有GC,就是说方法区可以独立于堆空间存在

                                                  jdk8没有限定方法区是不是堆的一部分

                                                  在Java虚拟机的具体实现上,方法区是和堆分开的,看作是独立于堆的一块空间

                                                方法区的理解

                                                1. 方法区在JVM启动的时候被创建,并且它的实际的物理内存空间中和Java堆区一样都是可以是不连续

                                                2. 方法区的大小和堆空间一样,可以选择固定大小或者可扩展

                                                3. 方法区的大小决定了系统可以保存多少个类,如果系统定义了太多了的类,导致方法区溢出,虚拟机同样会抛出OOM:jdk7及以前是PermGen space,JDK8及以后是Metaspace

                                                4. 方法区可以看过接口、规范,永久代和元空间可以看作方法区的具体落地实现

                                                5. 对hotspot来说,方法区和永久代是等价的,对于其它虚拟机实现来说,方法区和永久代不等价。我们面试答题针对于hotspot来说就可以了

                                                6. 使用永久代的时候,仍然是使用Java虚拟机的内存,更容易超过OOM

                                                  在jdk8及以后,使用元空间作为方法区的具体落地实现,替代了永久代

                                                  永久代是使用Java虚拟机的内存,而元空间是使用的本地的内存,这样显然更不容易出现OOM

                                                7. 元空间和永久代的最大区别就是,元空间不是使用的Java虚拟机的内存,而是使用本地的物理内存这里的物理内存不是指硬盘,是指内存,内存都是指运行内存

                                                  元空间依赖本地内存

                                                设置方法区大小与OOM

                                                1. 没有加参数的情况下,方法区会使用动态扩展的形式

                                                  在jdk1.8及以后,采用元空间,使用本地内存,那么默认初始大小是21M,上限默认是本地内存大小,如果方法区占满了,会进行一个动态扩展,直到把本地内存占满,然后如果还有类加载,那么会报OOM异常

                                                  可以设置方法区的初始大小和上限,也可以采用默认,默认的动态扩展会直到占满整个物理内存

                                                2. 如何解决OOM

                                                  通过内存映像分析工具进行分析,重点确认内存中的对象是否是必要的, 也就是要分清楚到底是出现了内存泄漏还是内存溢出

                                                  内存泄漏:如果是内存泄漏,导致垃圾回收不掉,导致内存溢出。就是堆空间中的对象回收不掉,因为有栈空间中的对象引用指向堆空间中的对象,但是不用这个对象,导致堆空间中的对象回收不掉。如果内存泄漏,通过工具查看泄漏对象到GC roots的引用链,于是就找到泄漏对象是通过怎样的路径与GC Roots相关联并导致垃圾回收器无法自动回收他们的。

                                                  内存溢出:如果不是内存泄漏,导致垃圾回收不掉,导致内存溢出,就检查虚拟机的堆参数

                                                方法区的内部结构

                                                1. 方法区里面主要放类信息和运行时常量池

                                                  这个类信息指类、接口、枚举类、注解等

                                                2. 《深入理解Java虚拟机》对方法区存储内容的描述:

                                                  它用于存储已被虚拟机加载的类型信息、常量(运行时常量池)、静态变量、被JIT即时编译器编译的缓存代码等

                                                3. 方法区也会记录字节码文件是使用哪一个类加载器加载进来的,类加载器在方法区里也是有记录的。(垃圾回收的时候,如果某个类加载器没有用了,类加载器对应的类也会被回收)

                                                  也会记录某个类加载器,加载过哪些字节码文件

                                                4. 从字节码角度来看,构造器和普通的方法都叫做方法,在源代码层面,构造器和方法是分开的

                                                类型信息

                                                image-20210813161957453

                                                方法信息

                                                image-20210813161930317

                                                静态变量

                                                1. image-20210813153359383

                                                  静态变量,没有final修饰:

                                                  • 在类加载的链接的准备阶段,默认赋初值为0,在初始化阶段才赋值为1

                                                  静态变量,用final修饰

                                                  • 在类加载的链接的准备阶段,或者说编译阶段,就已经赋值为2了。

                                                  image-20210813153525632

                                                运行时常量池

                                                1. 要注意运行时常量池和常量池的区别

                                                  运行时常量池是运行时结构,而常量池是静态结构

                                                  方法区,内部包含了运行时常量池

                                                  字节码文件,内部包含了常量池

                                                  要弄清楚方法区,需要理解清楚字节码文件,因为加载类的信息都在方法区

                                                  要弄清楚方法区的运行时常量池,需要理解清楚字节码文件中的常量池

                                                2. 字节码文件的常量池表,包含了各种字面量和对类型、域和方法的符号引用,符号引用转换为直接引用是发生在类加载过程的链接的解析阶段。(动态链接就是指向运行时常量池的符号引用,从而得到直接引用)

                                                3. 一份很简单的代码,都要加载很多结构,这些结构不直接存到字节码里,那么就存到常量池,字节码包含了指向常量池的引用。在动态链接的时候会用到运行时常量池,将符号引用转换为直接引用

                                                  说简单点:

                                                  字节码文件的指令中会有符号引用,指向常量池的符号引用,所有的变量和方法引用都作为符号引用保存在class文件的常量池里

                                                4. 常量池,可以看作是一张表,虚拟机指令根据这张常量表找到要执行的类名、方法名、参数类型、字面量等类型

                                                5. 运行时常量池是方法区的一部分,常量池是字节码文件的一部分

                                                  常量池是字节码文件的一部分,用于存放编译器生成的各种字面量与符号引用,这部分内容将在类加载后存放到方法区的运行时常量池中,它们是对应的关系!

                                                6. 运行时常量池中包含多种不同的常量,包括编译器就已经明确的数值字面量,也包括到运行期解析后才能够获得的方法或字段引用,此时不再是常量池中的符号地址了,这里转换为真实地址

                                                7. 总结:方法区存的结构

                                                  • 类型信息
                                                  • 运行时常量池
                                                  • 静态变量
                                                  • 域信息
                                                  • 方法信息
                                                  • JIT编译器编译的代码缓存
                                                8. 局部变量表,如果放的基本数据类型,就是放的变量真实的值,如果放的引用类型变量,那么就放的是地址,都可以用数字来表示,所以局部变量表是一个数值数组

                                                方法区的演进细节

                                                1. jdk1.6及以前,有永久代,静态变量存放在永久代上

                                                  jdk1.7,有永久代,但是静态变量和字符串常量池保存在堆中

                                                  jdk1.8及以后,无永久代,用元空间作为方法区的实现,字符串常量池、静态变量仍然在堆,但是元空间中有类型信息、运行时常量池、方法信息

                                                  (字符串常量池和运行时常量池不一样)

                                                2. image-20210813225341464

                                                  image-20210813225401420

                                                  image-20210813225429219

                                                3. 永久代为什么要被元空间替换?

                                                  1. 很难确定为永久代设置的大小,空间小了,容易引起full gc,会拖慢程序的性能
                                                  2. 元空间和永久代之间的最大区别在于:元空间并不在虚拟机中,而是使用本地运行内存,默认情况下元空间的大小仅受本地内存限制
                                                  3. 对永久代调优困难
                                                4. 方法区的垃圾回收主要回收废弃的常量和不再使用的类型

                                                5. StringTable(字符串常量或者说字面量)为什么要调整到堆空间中?

                                                  因为永久代的回收效率很低,永久代的回收是在full gc的时候才会触发,而minor gc是高频触发的,而full gc是低频触发的(调优就是为了减少gc),所以导致StringTable的回收效率不高

                                                  而我们开发中有大量的字符串被创建,回收效率低,导致永久代内存不足,放到堆里,能及时回收内存

                                                  full gc是在老年代空间不足的时候会被触发

                                                6. 静态引用(静态变量名)对应的对象实体始终都存在堆空间

                                                  前面说的静态变量存在的位置有一个变化,在1.6是永久代,1.7、1.8是在堆空间,这是说的静态变量名!(右边的对象实体始终在堆空间)

                                                方法区的垃圾回收

                                                1. 方法区的垃圾收集主要回收两部分内容

                                                  • 运行时常量池中废弃的常量
                                                  • 不再使用的类型
                                                2. 方法区的垃圾回收效果可能不好,但是是有必要的

                                                3. 常量池中主要存放两大类常量

                                                  • 字面量
                                                  • 符号引用
                                                4. 要想判断一个类不再使用,需要同时满足下面三个条件:

                                                  image-20210813234222298

                                                对象的实例化布局与访问定位

                                                1. 创建对象的方式

                                                  image-20210820161439568

                                                2. 创建对象的步骤

                                                  image-20210820162323011

                                                  如果内存不是规整的,已使用的内存和未使用的内存相互交错,那么虚拟机将采用的是空闲列表法来为对象分配内存

                                                  意思是虚拟机维护了一个列表,记录上哪些内存块是可用的,再分配的时候从列表中找到一块足够大的空间划分给对象实例,并更新列表上的内容,这种分配方式叫空闲列表

                                                  指针碰撞对应标记压缩算法,空闲列表分配对应于标记清除算法(CMS这个垃圾收集器就用的标记清除算法)

                                                  采用什么方式来为对象分配内存,还要取决于用的哪种垃圾收集器,是用的标记压缩算法还是标记清除算法。

                                                  第四步是对属性的默认初始化

                                                  第六步是对属性的显式初始化,包括代码块和构造器中对变量的初始化。是在<init>这一步中。要区分<init>和<clinit>,后者是类加载过程的初始化阶段,前者是对应于类里面的构造器

                                                3. 对象实例化的过程

                                                  1. 加载类元信息(判断类是否加载、链接、初始化)
                                                  2. 为对象分配内存(要分内存空间是否规整,规整对应于指针碰撞,不规整基于空闲列表)(垃圾回收分别对应于标记压缩算法和标记清除算法)
                                                  3. 处理并发安全问题
                                                  4. 对属性的默认初始化
                                                  5. 设置对象头的信息
                                                  6. 对属性的显式初始化(对对象真正意义上的初始化)
                                                4. new的对象放在堆空间中的,那么这个堆空间中的对象有哪几部分?

                                                  image-20210820164458201

                                                  image-20210906143610290

                                                  运行时元数据Mark Word格式:

                                                  image-20210906171812809

                                                5. image-20210820165552514

                                                6. 对象的访问定位

                                                  HOTSPOT采用的直接指针的方式,即通过栈上的对象引用指向堆中的实例,堆中的实例对象有一部分叫对象头,对象头里有类型指针指向方法区中的对象的类型数据(即类型信息),这种方式没有在堆空间专门开辟空间来记录句柄

                                                直接内存

                                                1. 运行时数据区是虚拟机内存的概念

                                                2. 直接内存不属于虚拟机内存,也不包含在jvm规范里

                                                3. 方法区的具体实现元空间就是用的直接内存,也就是本地运行内存,是Java堆外的,直接向系统申请的内存空间,来源于NIO

                                                4. Java堆、栈都是虚拟机内存层面的

                                                5. 通过缓冲区操作本地内存

                                                  ByteBuffer的allocateDirect可以直接分配本地内存空间

                                                  出于性能考虑,读写频繁的场合可能会考虑使用直接内存

                                                6. 读写文件,使用非直接缓冲区,需要与磁盘交互,需要由用户态切换到内核态。导致效率低

                                                  使用直接缓冲区直接和物理内存进行交互,没有用户态和内核态copy的过程

                                                7. 直接内存也会导致OOM异常

                                                8. 直接内存分配回收成本较高,不受JVM内存回收管理

                                                9. 直接内存大小可以通过MaxDirectMemorySize设置

                                                执行引擎

                                                执行引擎概述

                                                1. Java虚拟机粗略角度来分可以分为三层

                                                  • 类加载器子系统
                                                    • 加载
                                                    • 链接
                                                    • 初始化
                                                  • 运行时数据区
                                                    • 堆空间
                                                    • 方法区
                                                    • 虚拟机栈
                                                    • 本地方法栈
                                                    • 程序计数器
                                                  • 执行引擎
                                                    • JIT即时编译器
                                                    • 解释器
                                                    • 垃圾回收器
                                                2. 执行引擎是将字节码指令转换成机器指令,从而使得字节码文件能够被CPU所识别

                                                3. 执行引擎是Java虚拟机核心组成部分之一

                                                4. 虚拟机是一个相对于物理机的概念,这两种机器都有代码执行能力

                                                  区别是虚拟机的执行引擎是由软件自行实现的。(不受物理条件制约)

                                                  物理机的执行引擎是直接建立在处理器、缓存、指令集和操作系统层面上的。

                                                5. JVM也是Java语言的跨平台性的原因

                                                6. JVM主要任务就是装在字节码文件到虚拟机内部

                                                  字节码虽然是二进制的,字节码文件是二进制文件,但是字节码并不能够直接运行在操作系统之上,因为字节码指令并非等价于能够被CPU所识别的机器指令,字节码文件内部包含的仅仅是一些能够被JVM识别的字节码指令、符号表,以及其他辅助信息

                                                  那么,想让一个Java程序运行起来,执行引擎的任务就是将字节码指令解释、编译成为对应平台上的本地机器指令才可以,简单来说,JVM中的执行引擎充当了将高级语言翻译为机器语言的译者

                                                7. 执行引擎的工作过程

                                                  image-20210824181108997

                                                Java代码编译和执行的过程

                                                1. 首先要明确,字节码文件只能够被JVM识别,而不能够被操作系统或者说CPU这种硬件层面识别,那么想要执行字节码文件,将字节码文件加载到JVM之后,JVM的执行引擎要将加载进来的字节码文件解释、编译成操作系统能够识别的机器指令。可以理解为执行引擎就是将字节码指令翻译成机器指令的翻译官

                                                2. image-20210824181700991

                                                  橙色的过程是由javac.exe完成的,形成一个线性的字节码二进制流

                                                  就相当于前端编译器,就是第一次编译,编译成.class字节码文件的过程

                                                  蓝色的就是第二次编译,将字节码指令编译成目标代码也就是机器指令

                                                  绿色的就是执行引擎的解释器逐行对字节码指令进行解释执行

                                                  Java语言是半解释型半编译型语言说的就是这个意思

                                                  橙色的过程跟Java虚拟机是没有关系的,是生成字节码文件的时候

                                                  字节码文件加载进Java虚拟机之后才和JVM有关系

                                                3. 什么是解释器?

                                                  解释器:当Java虚拟机启动时会根据预定义的规范对字节码采用逐行解释的方式执行,将每条字节码文件中的内容“翻译”成对应平台的本地机器指令执行。也就是说解释器,也要将字节码指令翻译成机器指令

                                                  什么是JIT即时编译器?

                                                  虚拟机将字节码直接翻译成和本地机器平台相关的机器语言,没有说马上去执行

                                                  解释器的作用是保证响应的速度

                                                  编译器是保证执行的效率,对热点代码翻译成机器指令,进行一个缓存,存在方法区中。(好处就是去调用的时候,直接去调用缓存的已经编译好的机器指令,效率高)

                                                4. 解释器解释执行字节码指令,依赖程序计数器,每当解释执行完一条机器指令后,程序计数器会更新下一条需要执行的字节码指令的指令地址。

                                                  无论是解释执行还是JIT即时编译器进行编译,都要将字节码文件转换成操作系统能懂的机器指令

                                                机器码、指令和汇编语言

                                                1. 机器码就是二进制编码表示的指令,叫机器指令码或机器语言。

                                                  就是0101这种的二进制符号

                                                  机器语言就是二进制,特点就是CPU可以直接读取运行,机器指令是和CPU密切相关的。

                                                2. 指令就是把机器码中特定二进制序列,简化成对应的指令,比如mov、inc

                                                3. 汇编语言也是不可以被硬件识别的,也是需要翻译成机器指令(二进制)。

                                                4. 高级语言就是可以理解为层层封装的,最终也要被翻译成机器指令,才能够被执行。比如JVM将字节码指令翻译成机器指令。一种是解释执行,一种是编译执行。

                                                5. image-20210825160558621

                                                6. 字节码文件是与硬件环境无关的,就是为了实现软件运行和软件环境。

                                                  这就是Java语言具有跨平台性的原因

                                                7. 字节码文件具有跨平台的特性

                                                解释器

                                                1. 解释器在运行时采用逐行解释字节码执行程序的想法

                                                2. 执行引擎里的解释器也是要将字节码指令翻译成机器指令执行,并不是说只有JIT即时编译器,才会对字节码指令进行二次编译,编译成机器指令缓存起来,解释器和编译器都是翻译者,最终都要翻译成机器指令才能被硬件所识别

                                                3. 当一条字节码指令被解释执行完成后,接着再根据PC寄存器中记录的下一条需要被执行的字节码指令执行解释操作

                                                4. 基于解释器执行已经是低效的代名词。

                                                  C和C++是编译和汇编两个过程,编译是把高级语言翻译为汇编语言的过程,汇编是把汇编语言翻译成机器指令的过程。

                                                  python是基于解释器执行,是动态语言,写很简单,但是执行效率就更低。写的语言更接近机器,那么执行效率就更高。

                                                JIT编译器

                                                1. 即时编译,就是将热点的字节码指令编译成机器码,每次函数执行时,只需要调用编译好的机器码,因为编译好的机器码缓存在方法区中供调用

                                                2. 解释器的优势是立刻逐条解释执行字节码指令,响应速度快。

                                                  JIT编译器的优势是响应速度慢,因为需要编译成机器指令缓存这个过程,但是执行效率高。

                                                3. 当虚拟机启动时,解释器可以首先发挥作用,省去许多不必要的编译时间。

                                                  随着程序运行时间的退役,根据热点探测功能,将有价值的代码编译成为本地机器指令

                                                4. JRockit VM 内部就不包含解释器,字节码全部依靠即时编译器编译后执行。

                                                  在服务端,对响应速度的要求并不是特别高,更关注执行效率、性能,所以可以砍掉解释器。客户端对响应速度才有要求

                                                5. 任何高级语言翻译成机器指令都要经过汇编这个过程。

                                                6. 什么时候让JIT做即时编译?

                                                  需要判断代码被调用执行的频率,频率高的代码被称为热点代码

                                                7. JIT编译器编译字节码为本地机器指令,这种编译方式发生在方法的执行过程中,因此也被称之为栈上替换

                                                8. 基于计数器进行热点探测

                                                  • 方法调用计数器用于统计方法的调用次数
                                                  • 回边计数器用于统计循环体执行的循环次数
                                                9. image-20210825173756594

                                                  两计数器之和超过阈值,触发OSR编译器请求

                                                10. image-20210825174714351

                                                11. 可以通过参数设置使hotspot虚拟机只使用解释器的模式或者只使用即时编译器的模式

                                                12. hotspot虚拟机内置了两个JIT编译器,C1编译器和C2编译器,C1是client模式的编译器,C2是server模式的编译器,当电脑是64bits的操作系统,Java就是server模式的,就不用去设置了

                                                  C1的优化稍微弱一些,C2的优化更强一些

                                                  C1 JIT编译器进行简单的优化,耗时短,为了响应时间更短,因为client模式,更在乎响应时间

                                                  C2 JIT编译器花的时间更长,优化更强,响应时间更慢,但是优化好之后,执行效率更好。

                                                  没有说哪种编译器更好,他们是互补的关系,耗时短那么响应速度快,就优化稍差,执行效率稍差

                                                  耗时长,那么就优化好,执行效率高,但是响应速度慢,要辩证地来看他们之间的关系

                                                  C1是轻量级的优化

                                                13. 在jdk7之后的版本,使用server模式时,默认会开启分层编译策略,由C1编译器和C2编译器相互写作共同执行编译任务

                                                14. 总结:

                                                  • 一般来讲,JIT编译出来的机器码性能比解释器高(这里要注意解释器和编译器都是要把字节码转换成操作系统或者说硬件能识别的机器码,并不是只有编译器会转换成机器码,解释器也要将字节码指令转换成机器码)(执行引擎的作用就是充当将字节码或者说高级语言转换成机器码指令的翻译者)
                                                  • C2编译器即server模式下的JIT编译器,启动时长比C1编译器慢,但是执行效率更高。系统稳定执行之后,C2编译器执行速度远远快于C1编译器
                                                15. 编译器:

                                                  • AOT编译器(静态提前编译器),这是在程序运行之前,对字节码转换成机器码的编译操作
                                                  • JIT即时编译器,在程序的运行过程中,对热点代码(字节码)编译成可直接在硬件上运行的机器指令,并缓存到方法区中,是在程序的执行过程中来执行的。
                                                    • C1编译器(client模式)
                                                    • C2编译器(server模式)
                                                    • graal编译器

                                                  AOT编译器和JIT即时编译器都是将字节码指令转换成机器指令,只不过AOT在运行前,JIT在运行时

                                                StringTable

                                                String的基本特性

                                                1. String类声明为final的,不可被继承

                                                2. String变量的实例化

                                                  String s1 = "atguigu"; // 字面量的定义方式

                                                  String s2 = new String("hello");

                                                3. String类实现了Serializable接口,Comparable接口

                                                4. 在jdk1.8底层用的是char数组,一个字符对应于两个字节16位

                                                  在jdk1.9及以后底层用的是byte数组

                                                  这是重大的一个改变

                                                  结论:String在jdk1.8之后不用char[]来存储,改成了byte[]加上编码标记,节约了空间,如果是ISO-8859/Latin-1,就用一个字节来存,如果是中文字符,还是用两个字节去存

                                                5. StringBuffer和StringBuilder也都做了修改

                                                6. String代表不可变的字符序列,简称不可变性

                                                  从以下三个方面体现:

                                                  • 当对字符串重新赋值时,需要重写指定内存区域赋值,不能使用原有的value进行赋值
                                                  • 当对现有的字符串进行连接操作时,也需要重新指定内存区域赋值,不能使用原有的value进行赋值
                                                  • 当调用String的replace()方法修改指定字符或字符串时,也需要重新指定内存区域赋值,不能使用原有的value进行赋值
                                                7. 通过字面量定义字符串的方式,字面量存储在字符串常量池中,字符串常量池中绝对不允许存储相同的字符串

                                                8. 字符串底层是数组,既然是数组,那么底层在创建的时候就已经确定好了长度,那么拼接的时候,显然是另外指令内存区域赋值,而不是直接在原数据后进行连接

                                                  而且数组的扩容也是需要另外造数组,而不是直接在原内存位置进行扩容

                                                9. 字符串常量池底层是一个固定大小的hashtable,hashtable又称为散列表,散列表在底层是jdk7及以前是采用数组+链表的形式存储,在jdk8及以后是采用数组+链表+红黑树的形式存储,所以在jdk7中数组就有固定长度是是60013

                                                String的内存分配

                                                1. 在Java语言中,有8种基本数据类型和一种比较特殊的类型String,这些类型为了使他们在运行过程中速度更快、更节省内存,都提供了一种常量池的概念
                                                2. 常量池就类似于一个Java系统级别提供的缓存,8种基本数据类型的常量池都是系统协调的,String类型的常量池比较特殊,主要使用方法有两种
                                                  • 字面量声明的方式:String s1 = "atguigu"; // 会直接将String对象存储到字符串常量池中,当然字符串常量池底层是hashtable,字符串底层是byte或char数组
                                                  • 如果不是使用双引号声明的String对象,可以使用intern方法
                                                3. Stringtable为什么要从方法区的运行时常量池调整到堆空间中
                                                  • permSize默认比较小
                                                  • 永久代垃圾回收频率低,导致大量不用的字符串不能够及时回收,导致容易报OOM,字符串常量池放到堆里,能够及时回收
                                                4. 要注意区分运行时常量池和字符串常量池

                                                字符串拼接操作

                                                1. 非静态方法的栈帧的局部变量表里面的第一个位置放的this,而静态方法则没有这个this

                                                2. 常量与常量的拼接结果在常量池中,原理是编译期优化(在生成字节码文件这个过程就直接认为字符串是拼接后的结果)

                                                  String s1 = "a" + "b" + "c";//等同于String s1 = "abc";
                                                  +

                                                双亲委派机制

                                                1. Java虚拟机对class文件采用的是按需加载的方式,也就是说当需要使用该类时,才会将它的class文件加载到内存生成class对象。

                                                  加载某个类的class文件时,Java虚拟机采用的是双亲委派模式,即把请求交给父类处理。它是一种任务委派模式

                                                2. 静态结构是随着类的加载而加载,随着类的结构被加载到内存中的方法区中,类的加载就是类作为Class的实例被加载到内存中的方法区中,作为类的信息、结构的调用的接口

                                                  属性也就是成员变量分为静态和非静态的,非静态的变量是随着对象的加载而加载到内存的堆空间中,而静态变量是静态结构,随着类的加载过程,被加载到方法区中,类作为Class的对象,是类的信息和各种数据的访问入口。

                                                  静态代码块的代码也会随着类的加载而执行

                                                  静态代码块是在类加载的第三个阶段,初始化阶段调用的!<clinit>调用的是静态变量显式赋值和静态代码块内的语句。前两个阶段是加载和链接,其中链接又分为三个阶段

                                                  静态变量显式赋值和静态代码块内的语句会被放在<clinit>构造器中进行执行。而<init>构造器是指的我们平常说的构造器,就是类的构造器。

                                                  要分清楚<clinit>和<init>这两种构造器

                                                3. 类的加载过程分为加载、链接、初始化,其中链接分为验证、准备、解析

                                                  其中加载过程具体有三点:

                                                  1. 通过全限定名获取此类的二进制字节流
                                                  2. 将二进制字节流代表的静态存储结构转换为方法区中的运行时结构
                                                  3. 将此类作为Class的对象,加载到内存中的方法区中,作为该Class对象各种信息和方法调用的访问入口
                                                4. 双亲委派机制工作原理

                                                  如果一个类加载器收到了类加载请求,它并不会自己先去加载,而是把这个请求委托给父类的加载器去执行

                                                  如果父类加载器还存在其父类加载器,则进一步向上委托,依次递归,请求最终会到达顶层的启动类加载器(引导类加载器)。

                                                  这个过程和类的加载有点像,类的加载过程中,子类的加载之前一定要有父类的加载,最终会到Object类需要加载

                                                  如果父类加载器可以完成类加载任务,就成功返回,如果父类加载器不可以完成任务,子类加载器才会自己去尝试加载,这就是双亲委派模式。

                                                  引导类加载器加载完之后,子类加载器就不会去加载了。

                                                5. 比如一个自定义类加载过程中的双亲委派机制。

                                                  类加载过程中涉及到类装载子系统,就是类加载器,类加载器有工作机制,就是双亲委派机制,比如一个自定义类,那么就对应于系统类加载器收到了类加载请求,然后向上委托,最终到达顶层的引导类加载器,引导类加载器是加载Java的核心类库,它不管自定义类的加载,就向下委托(严格来说不叫向下委托,就是父类加载器加载失败,交由子类加载器自己处理),扩展类加载器也不管,最后是才是系统类加载器负责加载我们的自定义类

                                                6. 类加载过程中,只有一个类加载器加载就行了。父类加载器不加载的话,那么就给子类加载器自己加载!

                                                7. 去执行类里面的代码,或者说运行过程,会进行类的加载,有些代码运行不了,或者运行失败,可以试试从类的加载这个过程去考虑。

                                                  比如自定义String类里写main方法,为什么运行失败,因为类加载时,由于双亲委派机制,最终由引导类加载器加载String类,那么加载的是核心类库的String类,而不是我们自定义的String类

                                                8. 对象.getClass() == 类.class 为true,等号两边都是Class的对象实例

                                                  Class的对象实例什么意思?

                                                  就是这个类本身就是对象,是Class的对象

                                                9. 双亲委派机制的优势

                                                  • 避免类的重复加载,一旦有一个类的加载器去加载了,另外的加载器就不会去加载了。
                                                  • 保护程序安全,防止程序被恶意篡改
                                                10. 自定义String类,但是在加载自定义String类的时候会率先使用引导类加载器加载,而引导类加载器在加载的过程中会先加载jdk自带的java.lang包下的String类,报错信息说没有main方法,就是因为jdk自带的String类这个核心类没有main方法,这样可以保证对Java核心源代码的保护,这就是沙箱安全机制

                                                11. 在JVM中表示两个class对象是否相同的两个必要条件:

                                                  • 类的完整类名必须一致,包括包名

                                                  • 加载这个类的ClassLoader(指ClassLoader实例对象)必须相同

                                                    这里说的类加载器是指实例对象,类加载器本身又是对象,它对应的类是属于Java类库的,比如ClassLoader抽象类,所以类加载器对应的类是由引导类加载器加载的

                                                  换句话说,在JVM中,即使类名相同,但是加载他们的类加载器ClassLoader不同,那么这两个类对象(Class的对象)也是不相等的。

                                                12. 系统类加载器加载自定义类,这个类加载器的信息会在方法区中进行记录,就是这个类加载器的一个引用会作为类型信息的一部分保存在方法区中

                                                运行时数据区概述及线程

                                                概述

                                                1. image-20210808193347849

                                                  类加载过程分为加载、链接、初始化三个过程

                                                  加载完以后,内存中的方法区中就保存了运行时类本身,加载到内存中的类叫做运行时类!

                                                  接下来就要用执行引擎去做执行,执行引擎分为解释器(保证响应)、JIT即时编译器(保证执行效率, 热点代码二次编译及缓存)、垃圾回收器三部分。执行引擎执行的过程中,都要用到运行时数据区

                                                2. 执行引擎的JIT即时编译器可以把字节码指令翻译成机器指令

                                                3. 内存是非常重要的系统资源,可以理解为运行内存,时硬盘和CPU的中间仓库和桥梁,承载着系统和应用程序的实时运行

                                                  内存一定要和实时运行挂钩

                                                  JVM内存布局规定了Java在运行过程中的内存申请、分配、管理的策略

                                                  运行时数据区就是JVM内存布局,就理解为内存

                                                  CPU读的数据都来自于内存,或者说CPU直接交互的对象就是内存!

                                                4. image-20210808201004706

                                                  红色的是所有线程共享的,即方法区(jdk8及以后也可以叫元空间)和堆空间

                                                  灰色的是每个线程私有的,即本地方法栈、虚拟机栈和程序计数器

                                                  运行时数据区中,其中有一些会随着虚拟机的启动而创建,随着虚拟机的退出而销毁,与虚拟机的生命周期是一样的,另外一些则是与线程一一对应的,与线程的生命周期是一致的。

                                                  如果有5个线程,就是有5组程序计数器、本地方法栈、虚拟机栈,但是只有一个方法区和堆

                                                  堆空间和方法区是共用的

                                                  类只会加载一次,类加载过程中的初始化<clinit>需要保证同步

                                                  方法区主要放类的信息

                                                5. 从频率上讲,95%的垃圾都集中在堆区,5%集中在方法区

                                                6. JIT编译以后的代码缓存有的认为是方法区的一部分,有的认为不是,不用细抠,但是要明确JIT编译的代码缓存不在堆空间

                                                7. 一个JVM实例就对应一个Runtime实例,Runtime实例对象就对应于运行时数据区,并且只有一个Runtime实例,是单例的

                                                8. 在Hotspot jvm里,每个线程都与操作系统的本地线程直接映射,当一个Java线程准备好执行以后,此时一个操作系统的本地线程也同时创建,Java线程执行终止后,本地线程也会回收

                                                  如果执行线程的过程中,出现了异常没有处理,会导致Java线程终止,此时本地线程决定JVM要不要终止,取决于当前线程是不是最后一个非守护线程

                                                9. 一个简单的程序,后台都有许多的线程,这些线程不包括main线程和main线程里创建的线程

                                                  这些后台线程主要有:

                                                  虚拟机线程

                                                  周期任务线程

                                                  GC线程,对垃圾收集行为提供了支持

                                                  编译线程

                                                  信号调度线程

                                                程序计数器

                                                1. 也称为PC寄存器,就是CPU的寄存器的物理结构的一个抽象模拟,因为Java虚拟机是软件层面的概念,运行时数据区可以理解为内存

                                                  也叫程序的钩子,这个钩子可以理解为钩程序的,就是上一行执行完只会,下一行该执行谁了,由PC寄存器来做一个记录

                                                2. PC寄存器用来存储指向下一条指令的地址,由执行引擎根据PC寄存器的下一条指令地址读取下一条指令

                                                  PC寄存器是一块很小的内存空间

                                                  每个线程都有自己的程序计数器,是线程私有的,生命周期与线程的生命周期一致。记录执行到哪里了

                                                  任何一个线程都只有一个方法在执行,也就是所谓的当前方法,栈最上面的方法PC寄存器存储指向当前方法的指令的地址!(这里的当前方法是说栈顶的方法,就是下一条指令)

                                                3. 栈是只有入栈和出栈,不考虑垃圾回收,PC寄存器也没有垃圾回收机制,堆空间和方法区有垃圾回收机制

                                                  PC寄存器不会发生OOM(OutOfMemory)溢出

                                                  栈结构没有垃圾回收,但是有可能会溢出,堆和方法区也可能会溢出

                                                  总结:

                                                  堆、方法区:线程共有,有垃圾回收,可能溢出

                                                  虚拟机栈:线程私有,没有垃圾回收,可能溢出

                                                  PC: 线程私有,没有垃圾回收,不会溢出

                                                4. image-20210808204810558

                                                  指令地址右边的结构叫操作指令

                                                  image-20210808205132418

                                                  执行引擎取出指令后,会操作局部变量表、操作数栈,会把字节码指令翻译成机器指令,机器指令就可以被CPU运算,这是二次编译,解释器就是对字节码逐行解释执行,所以Java是半编译半解释语言

                                                5. PC寄存器的一个面试问题:

                                                  1. 使用PC寄存器存储字节码指令地址有什么用?

                                                  2. 为什么使用PC寄存器记录当前线程的执行地址呢?

                                                    因为CPU需要不停地切换各个线程,这个时候切换回来以后,就需要知道从哪里继续执行,因为PC寄存器存的就是字节码指令的地址!

                                                    JVM字节码解释器就需要通过改变PC寄存器的值,来明确下一条应该执行什么样的字节码指令

                                                    字节码解释器逐行执行字节码指令的,执行引擎通过PC寄存器拿到字节码指令地址,进而拿到字节码指令,然后执行,整个过程就是对字节码指令的逐行解释执行,这里的逐行执行指的不是Java代码!

                                                    执行引擎里有字节码解释器、编译器、垃圾回收器

                                                6. 字节码文件进行反编译操作就能看到字节码指令地址和字节码指令

                                                7. PC寄存器为什么是线程私有的?

                                                  假如三个线程并行执行,实际上是并发执行,因为他们抢占同一个CPU资源

                                                  要注意PC寄存器里面记录的是下一条要执行的字节码指令的指令地址,比如线程1该执行第5行字节码指令,现在切换到另一个线程了,当然不可以接着5执行,PC寄存器必须每个线程一份,分别记录自己的该执行的下一条字节码指令的地址!

                                                8. 如果对应于一个CPU核,有三个线程,那么任何一个确定的时刻,只有一个线程执行。看似并行执行,实际是并发执行

                                                  CPU快速切换执行多个线程,就是并发

                                                虚拟机栈

                                                概述

                                                1. Java是跨平台的语言,有三个特性

                                                  健壮性

                                                  面向对象性

                                                  跨平台性

                                                  其中跨平台性就是因为JVM,展开来说就是Java源文件先经过编译,编译成字节码文件,字节码文件会被加载到JVM内存里,变成运行时数据。而JVM在不同系统平台上有不同的实现,同一份代码,同一份字节码文件可以在不同系统平台的JVM上加载、运行。

                                                  一次编译、多次运行

                                                2. JVM的指令是根据栈来设计的,不同平台CPU的架构不同,所以不能设计为基于寄存器的,不能设计为基于硬件的,而JVM是软件层面,所以设计为基于栈的指令集

                                                  指令集小,但是实现同样的功能,需要更多的指令

                                                  相对寄存器来讲性能更差,因为寄存器是硬件CPU层面的

                                                3. JVM中的内存中,栈和堆是非常重要的两个结构!

                                                4. 栈是运行时的单位,而堆是存储的单位

                                                  栈解决程序的运行问题,局部数据变量是放在栈中的,如果是引用类型变量,放的是对象应用,指向堆空间中的地址

                                                5. 栈的存储单位是栈帧,栈帧里又会细分局部变量表、操作数栈等

                                                6. 堆空间的大小是可以设置的,方法区现在可以设置本地内存了,是物理的内存了,不考虑方法区的话,堆空间是内存中最大的区域

                                                7. 要理解到栈里不只有局部变量表,还有字节码指令,而不是Java代码!都进入到运行时数据区了,怎么可能是Java代码,Java源文件经编译后,运行才会通过类加载子系统加载进运行时数据区,才会从静态的结构变成运行时数据结构。

                                                  要牢记字节码----对应于JVM。

                                                8. 虚拟机栈和线程的生命周期是一样的,一个线程对应一个Java虚拟机栈。虚拟机栈是线程私有的

                                                  栈里面保存的是一个个的栈帧,一个栈帧就对应着一次方法调用!栈顶的方法称为当前方法!

                                                  虚拟机栈主管Java程序的运行,保存方法的局部变量(8种基本数据类型、对象的引用地址)、部分结果,并参与方法的调用和返回

                                                9. 每个方法执行,伴随着进栈

                                                  执行结束后,出栈

                                                  对于栈来说,不存在垃圾回收问题

                                                10. 栈溢出异常,递归如果说不朝着退出递归的条件逼近,就会报栈溢出异常。递归一定要朝着结束递归的方向进行

                                                11. -Xss可以这是栈的大小,EditConfiguration里VM options设置

                                                栈的存储单位

                                                1. 栈中的数据都是以栈帧的格式存在,以栈帧为基本单位

                                                  这个线程正在执行的每个方法都各自对应一个栈帧

                                                  方法和栈帧是一一对应的关系

                                                2. 栈帧是一个内存区块,是一个数据集,维系着方法执行过程种的各种数据信息

                                                3. 栈的操作只有压栈和出栈

                                                4. 在一个活动线程中,一个时间点上,只会有一个活动的栈帧,即只有当前正在执行的方法的栈帧(栈顶栈帧)是有效的。

                                                  这个栈帧被称为当前栈帧

                                                  要注意栈顶栈帧对应着一个当前正在执行的方法。而pc寄存器存储的是下一次要执行的字节指令的地址

                                                  image-20210808221622960

                                                  如果在当前方法中调用了其他方法,那么对应的新的栈帧会被创建出来,放在栈的顶端,成为新的当前帧。

                                                  这是栈,先进后出,后进先出,后创建,后进栈,先执行

                                                5. 程序计数器来指定执行引擎要执行的下一个指令

                                                6. main()方法也对应一个栈帧

                                                7. 不同的栈的数据是不可以共享的,即不可能在一个栈帧中引用另一个栈的栈帧

                                                8. image-20210808222718076

                                                  方法的结束方式分为两种

                                                  1. 正常结束,以return为代表
                                                  2. 方法执行中出现未被捕获的异常,以抛出异常的形式结束

                                                栈帧的内部结构

                                                1. 一个栈帧对应于一个方法

                                                  一个栈帧的入栈对应于一个新的方法的调用

                                                  一个栈帧的出栈对应于一个方法执行的结束,以正常方式结束,或者返回异常返回给前一个方法

                                                2. 栈帧是需要有大小的,取决于内部结构的大小

                                                3. 栈帧内部:

                                                  • 局部变量表
                                                  • 操作数栈(或表达式栈)
                                                  • 动态链接(或指向运行时常量池的方法引用
                                                  • 方法返回地址(或方法正常退出或者异常退出的定义)
                                                  • 一些附加信息

                                                  image-20210808224402410

                                                局部变量表

                                                1. 局部变量表也叫局部变量数组或本地变量表

                                                2. 局部变量表的数据类型主要包括各类基本数据类型、对象引用、以及返回地址类型

                                                3. 局部变量表是数字数组,8种基本数据类型都用数值来表示,对象引用(引用变量或者说引用地址)、返回值类型都可以用数值类型来表示

                                                4. 局部变量表的存储单位是slot,变量槽

                                                5. 局部变量表由于是在栈的栈帧里,栈是线程私有,那么就涉及不到共享的问题,就自然没有线程安全问题了。

                                                6. 局部变量表的大小在编译期间就确定下来,一旦确定下来,在运行期间就不会更改。

                                                7. 一个栈帧对应于一个方法,每个方法里有局部变量,就对应于每个栈帧的局部变量表。在编译期间确定局部变量表大小

                                                  主要影响栈帧的大小的就是栈帧里局部变量表的大小

                                                8. javap指令解析字节码文件,能够看到字节码指令,或通过插件

                                                9. 程序计数器存的是下一条要执行的字节码指令的指令地址,是数值!

                                                10. 局部变量表每个slot的StartPC 指的是声明了这个局部变量之后,下一行开始执行的Java代码对应的字节码指令地址

                                                11. JVM会为局部变量表中每一个slot都分配一个访问索引

                                                12. 构造器在字节码层面会生成<init>,字节码文件解析之后,能够看到<init>

                                                  如果当前栈帧是由构造方法或者实例方法创建的,那么该对象引用this将会存放在index为0的slot处。其余的参数按照参数表继续排列

                                                  每一个slot都会分配索引,那this就分配在索引为0的slot处

                                                13. 引用类型占据一个slot,double类型变量占据两个slot

                                                14. 栈帧中的局部变量表中的槽位是可以重用的。如果一个局部变量过了其作用域,那么在其作用域之后申明的新的局部变量就很有可能会复用过期局部变量的槽位

                                                15. 成员变量(类里面,方法外部定义的变量)

                                                  • 类变量(静态变量,随着类的加载而创建,分配到方法区中)
                                                    • linking的prepare阶段:给类变量默认赋值(这个赋值,不包括给实例变量默认赋值,因为加载、链接、初始化三个阶段是类的加载过程,现在是类的加载,加载的是类的结构,静态变量是随着类的加载而加载,但是实例变量不是,实例变量是随着对象创建而分配到堆中)
                                                    • initial阶段:给类变量显式赋值及静态代码块赋值<clinit>
                                                  • 实例变量(随着对象的创建而分配到堆空间中)
                                                    • 随着对象的创建,会在对空间中分类实例变量空间,并进行默认赋值

                                                  局部变量(方法内部的变量)

                                                  • 在使用前,必须要进行显式赋值,否则编译不通过
                                                16. 局部变量表中的变量也是重要的垃圾回收根节点(gc root),只要被局部变量表中直接或间接引用的对象都不会被回收

                                                操作数栈

                                                1. 栈帧里另一个非常重要的结构,叫操作数栈

                                                2. 栈可以使用数组或链表来实现,数组和链表是真实存在的物理结构(存储结构)

                                                3. 也就是虚拟机栈以栈帧为存储单元,而栈帧里又有栈!就是表达式栈即操作数栈

                                                4. 只要是栈,只能有入栈和出栈两个操作

                                                  入栈、出栈的对象为操作数!!

                                                5. 操作数是什么呢?

                                                  操作数栈,主要用于保存计算过程的中间结果,同时作为计算过程中变量临时的存储空间。所以操作数就是指的临时中间结果或临时变量之类的

                                                6. 操作数栈,栈中的任何一个元素都是可以任意的Java数据类型

                                                  • 32bit的类型占用一个栈单位深度
                                                  • 64bit的类型占用两个栈单位深度
                                                7. 操作数栈和局部变量表一样,在编译之后就确定了栈的深度

                                                8. image-20210809192420557

                                                  这是字节码文件解析之后的样子,stack就是操作数栈编译之后确定的深度,locals是局部变量表编译之后确定的大小

                                                  编译之后还是在本地磁盘的,是生成字节码文件,要运行,那么就需要进行加载,这样二进制静态数据才会被加载到方法区,变成运行时结构

                                                9. 如果被调用的方法带有返回值,其返回值将会被压入当前栈帧的操作数栈中,并更新PC寄存器中下一条需要执行的字节码指令的地址!

                                                10. Java虚拟机的解释引擎是基于栈的执行引擎,这里的栈就是指的操作数栈!

                                                11. byte、short、char、boolean类型都是以int类型保存

                                                12. 执行引擎是负责把字节码执行转换为机器指令,然后CPU执行

                                                13. image-20210809193704853

                                                  框起来这个几个,涉及到操作数栈,iadd会首先出栈,然后CPU执行相加,CPU能执行的原因是因为执行引擎将字节码指令转换成了机器指令,上面这张图就是字节码指令

                                                  istore这些就是涉及到局部变量表

                                                14. 局部变量表用数组实现,在编译期就确定了数组的长度,局部变量表是数字数组

                                                  操作数栈,可以用数组或链表这两种真实结构来实现,在这里是用数组实现。在编译期间就确定了数组的长度

                                                  也就是说局部变量表和操作数栈都是用数组实现

                                                栈顶缓存技术

                                                1. 基于栈式指令架构的虚拟机是使用的零地址指令,栈式内存层面的,为了JVM的跨平台性,用的栈式指令架构

                                                  而基于寄存器(与硬件挂钩),是一地址指令、二地址指令、三地址指令。

                                                  栈式架构指令集更小,但是由于是栈式的,那么完成一个操作,需要使用很多的入栈、出栈指令,所以完成一项操作的指令数比基于寄存器的架构多,那么内存读写次数也就更多

                                                2. 栈顶缓存:将栈顶元素全部缓存在物理CPU的寄存器中,降低对内存的读、写次数

                                                动态链接

                                                1. 大部分字节码指令在执行的时候都需要进行对常量池的访问

                                                  帧数据区中就保持着能够访问运行时常量池的指针

                                                  动态链接就是指向运行时常量池的方法引用(这里的运行时常量池就是方法区中的运行时常量池)

                                                2. 在Java源文件被编译到字节码文件中时,所有的变量和方法引用都作为符号引用保存在class文件的常量池里,运行之后,class文件的常量池的信息就保存到方法区中的运行时常量池中了。

                                                  比如:描述一个方法调用了另外的其他方法时,就是通过常量池中指向方法的符号引用来表示的。

                                                  动态链接的作用就是为了将这些符号引用转换为调用方法的直接引用

                                                  可以理解为:

                                                  动态链接指向方法区中运行时常量池中的符号引用,从而得到直接引用

                                                3. 常量池里面是符号引用

                                                  动态链接是根据符号引用去常量池里面找到具体的位置,再根据符号引用得到直接方法引用

                                                方法的调用

                                                1. image-20210809204952628

                                                  静态链接也叫早期绑定,由符号引用转换为直接引用,在编译期就能确定下来

                                                  动态链接叫晚期绑定

                                                2. 虚函数的特征就体现为在运行期才能够确定下来调用的是哪个方法!!!!

                                                  就是具备晚期绑定的特点!

                                                  如果Java程序中不想让某个方法拥有虚函数的特征,就可以使用关键字final来标识。

                                                  final标识就是不允许这个方法被重写,那么就是在编译期就确定了,没有重写方法,就是不具备多态的这种特点了。

                                                3. 子类对象多态性的使用前提

                                                  1. 类的继承关系

                                                  2. 方法的重写

                                                    静态方法、final方法、私有方法都不可以被重写,构造器不能重写!

                                                4. 非虚方法

                                                  如果方法在编译期就确定了具体的调用版本,这个版本在运行时是不可变的,这样的方法称为非虚方法

                                                  静态方法、final方法、私有方法、实例构造器、父类方法都是非虚方法

                                                  剩下的方法都是虚方法,就是在编译期不确定具体调用的哪个方法,为什么不确定?就是因为涉及到方法的重写,这是多态性的体现

                                                5. image-20210809210735289

                                                6. Java是静态类型语言

                                                  动态类型语言和静态类型语言两者的区别就在于对类型的检查是在编译期还是在运行期,满足前者就是静态类型语言,反之就是动态类型语言

                                                  JavaScript,python是动态类型语言

                                                  动态类型语言是判断变量值的类型信息,变量没有类型信息,变量值才有类型信息

                                                7. 方法重写的本质

                                                  image-20210809214353466

                                                8. 虚方法表是为了减少频繁地去找应该调用哪个方法的过程

                                                  在面向对象的编程中,会很频繁地使用到动态分派(可以理解为去找应该执行哪个方法),为了提高性能,JVM采用在类的方法区建立一个虚方法表来实现,非虚方法不需要,因为非虚方法在编译就可以确定是执行哪个方法。

                                                9. 每个类中都有一个虚方法表,表中存放着各个方法的实际入口

                                                  子类重写过父类的方法,或者实现了接口的方法,那么虚方法表中有实际入口,指向子类自己实现的方法,如果没有重写的那些虚方法,就是指向父类的方法或者接口的方法

                                                  换句话说,虚方法表就有方法具体的实际入口

                                                  虚方法表是在方法区的,每个类都有!

                                                  虚方法表在方法区,是运行时,类的加载过程才被创建,开始初始化

                                                  运行字节码文件,才会有虚方法表

                                                  因为是虚方法,编译时,不知道在运行时具体会调用哪个方法,只有在运行时有了创建了虚方法表才知道。

                                                  虚方法表,代替了每次都在常量池中找符号调用,如果找不到就继续从下往上对父类进行搜索的这个过程

                                                  字节码文件的常量池对应于方法区的运行时常量池(进行类的加载后),常量池里有所有变量和方法的符号引用,根据符号引用转换为调用方法的直接引用,这叫做动态链接

                                                10. 虚方法表在类加载的链接阶段被创建并开始初始化

                                                方法返回地址

                                                1. 方法返回地址存储的是调用该方法的PC寄存器的值。

                                                  PC寄存器存储的是要执行的下一条字节码指令的指令地址

                                                  PC寄存器这个下一条要执行的指令的指令地址给了方法返回地址

                                                  交给执行引擎,去执行后续的操作

                                                2. 一个方法的结束有两种方式

                                                  • 正常执行完成---正常退出出口
                                                  • 出现未处理的异常,非正常退出----异常退出出口

                                                  无论哪种方式退出,在方法退出后都返回到该方法被调用的位置!

                                                  方法退出后,返回到该方法被调用的位置,递归就是要这么来分析

                                                  方法正常退出时,调用者的PC计数器的值作为返回地址,即调用该方法的指令的下一条指令的地址

                                                  通过异常退出的,返回地址是要通过异常表来确定,栈帧中一般不会保存这部分信息

                                                  通过异常完成退出的,不会给他的上层调用者产生任何的返回值

                                                3. 正常完成出口和异常完成出口的区别在于:

                                                  通过异常完成出口退出的不会给他的上层调用者产生任何的返回值

                                                4. 不考虑方法区的情况下,最大的就是堆空间

                                                5. 方法返回地址相当于是给上层调用者产生的一个返回地址,是调用者PC寄存器保存的下一条指令的指令地址,是给执行引擎执行的,相当于是上层调用者调用完一个方法了,得到一个返回地址了,该接着往下执行了

                                                6. 何为线程安全?

                                                  如果只有一个线程才可以操作此数据,则必是线程安全的

                                                  如果有多个线程操作此数据,则此数据是共享数据,如果不考虑同步机制的话,会存在线程安全问题

                                                7. 方法中定义的局部变量是否是线程安全的?

                                                  方法中的局部变量r颗是在内部产生内部消亡的,就是线程安全的,

                                                  不是内部产生的,或者是内部产生的,但是返回到外面了,就不是线程安全的。

                                                本地方法接口

                                                1. 什么是本地方法?

                                                  就是用native来修饰的Java方法就是本地方法

                                                  没有方法体!但不是抽象方法!没有方法体是因为方法体由C、C++实现

                                                  本地方法就是一个Java调用非Java代码的接口

                                                2. 本地方法接口的作用就是融合不同的编程语言为Java所用,初衷时融合C\C++程序

                                                  就是说方法体的具体实现不由Java来实现,就用native标识,就是本地方法

                                                3. 为什么要使用本地方法

                                                  1. 有时Java应用需要与Java外面的环境交互。这是本地方法存在的主要原因

                                                    如果我们在某些需要很在乎执行效率的场景,要考虑调用C和C++

                                                  2. 虽然Java代码运行在jvm上,但是jvm并不是真实的操作系统,是虚拟机,它要依赖真实的操作系统,操作系统层面,就要依赖C实现,JVM一些部分就是用C写的

                                                    引导类加载器就是C\C++编写的,属于JVM的一部分

                                                4. 用native标识来表示对本地方法的调用

                                                本地方法栈

                                                1. Java虚拟机栈管理Java方法的调用,本地方法栈管理本地方法的调用

                                                  虚拟机栈的存储单位是栈帧,一个栈帧就对应于一个方法,里面有局部变量表、操作数栈、动态链接、方法返回地址

                                                  一个栈帧就对应于一个方法的调用

                                                2. 栈管运行,堆管存储

                                                3. 本地方法栈和虚拟机栈、PC都是线程私有的。堆和方法区是线程公用的。

                                                4. 本地方法栈和虚拟机栈一样,允许被实现成固定或者是可动态扩展的内存大小

                                                  image-20210810201758436

                                                  栈层面,线程请求分配的栈容量超过了栈允许的最大容量,是StackOverflowError

                                                  内存层面不够了,是outOfMemoryError

                                                5. Hotspot JVM 有本地方法栈,但是不是所有的Java虚拟机都有本地方法栈。

                                                  Hotspot JVM将本地方法栈和虚拟机栈合二为一

                                                6. image-20210810202350855

                                                堆的核心概述

                                                1. 在整个运行时数据区,不考虑方法区,堆是最大的空间,因为方法区可以设置,可以通过本地空间实现

                                                2. 堆空间主要用来存储对象实例的

                                                3. 方法区、堆对于线程来说是共用的,但是对于一个进程来说,是唯一的。

                                                  一个进程对应于一个JVM实例,**一个JVM实例就有一个运行时数据区。**所以一个JVM实例就对应于一个堆内存

                                                  Runtime是单例的,是饿汉式创建的。

                                                  Runtime里面就有一个堆、一个方法区。所以对于一个进程来说,堆和方法区是唯一的。

                                                  但是一个进程有多个线程,所以多个线程要共享这个进程的堆空间和方法区

                                                4. 每一个线程各自拥有程序计数器、本地方法栈、虚拟机栈。共用他们所属的进程的方法区和堆。

                                                5. 共享就涉及到线程安全问题

                                                6. 一个jvm实例只存在一个堆空间,堆是Java内存管理的核心区域

                                                7. Java堆空间在JVM启动的时候被创建。

                                                  JVM是什么时候启动?

                                                  JVM是在Java程序运行时,JVM实例通过引导类加载器创建,即启动

                                                  堆空间在jvm启动时候创建,其空间大小也就确定了。

                                                8. 堆是垃圾回收、性能调优的重要区域

                                                9. 堆内存的大小是可以调节的。

                                                10. -Xms -Xmx分别设置堆的初始大小和最大大小

                                                11. 通过两个main方法入口跑两份Java代码,就是启动两个进程!一个进程里有多个线程,main是主线程,还有垃圾回收线程,还有异常处理线程,还可以自定义线程!

                                                  而一份Java程序(只有一个main方法入口)视为一个进程!跑两个就是两个进程!

                                                12. 一个进程对应于一个JVM实例,那么对应于一个运行时数据区,对应于一个堆空间、方法区

                                                13. Java虚拟机规范规定,堆可以处于物理上不连续的内存空间内,但在逻辑上它应该视为连续的。

                                                  物理内存和逻辑内存可以建立一个映射表,可以对物理上不连续的内存在逻辑上看作是连续的。

                                                14. 所有的线程共享Java堆,在这里还可以划分线程私有的缓冲区

                                                  一个进程中的线程共享这个堆的所有空间吗?

                                                  不是的,堆中还有线程私有的缓冲区

                                                15. 所有的对象实例以及数组都应该在运行时分配在堆上

                                                  几乎所有的对象实例都在这里分配内存---almost

                                                  为什么是几乎呢?因为还有可能在栈上分配

                                                16. 数组和对象可能永远都不会存储在栈上,因为栈帧中保存引用(栈帧的局部变量表里保存的基本数据类型是数字、对象引用、返回值类型也可以用数值来表示,所以局部变量是数字数组),这个引用指向对象或者数组在堆中的位置

                                                17. 在方法结束后,堆中的对象不会马上被移除,仅仅在垃圾回收的时候才会被移除

                                                  比如某个方法执行完,调用完之后,栈帧要出栈,那么栈帧中的局部变量表中的对象引用,指向堆空间中的“指针”就没有了,指针没有了之后,堆空间中的对象实例就被认为是垃圾了。

                                                  但是认为是垃圾的这个过程,要等到GC的时候判断,来确定堆空间的对象实例没有对象引用指向了。

                                                  也就是栈帧出栈,没有指针指向堆空间,对象实例变成垃圾,垃圾回收机制判断,回收掉对象实例

                                                  栈帧出栈之后,对象实例不是立即被垃圾回收回收掉的。不是立马回收的!不能老是执行垃圾回收,GC频率高,就影响用户线程执行

                                                  垃圾回收线程执行的时候,需要用户线程停止。

                                                  所以我们会优化使得堆空间大一点,减少GC的次数

                                                  所以并不是栈帧出栈,就立即回收掉堆空间的对象实例

                                                内存细分

                                                1. jdk7及以前,堆内存逻辑上分为三部分

                                                  • 新生区

                                                  • 养老区

                                                  • 永久区(永久代)

                                                  jdk8及以后,堆内存逻辑上分为三部分

                                                  • 新生区
                                                  • 养老区
                                                  • 元空间

                                                  虽然逻辑上分为三部分,但是实际上堆空间不包括永久代

                                                  永久代和元空间都看作是方法区具体的落地实现。

                                                  所以这一章堆空间,主要涉及到新生区和养老区

                                                  堆空间逻辑上有三个区,实际上元空间或者永久代是方法区,实际上堆空间目前来说只有新生区和养老区

                                                2. 新生区具体又分为:

                                                  伊甸园区

                                                  survivor零区(from区)

                                                  survivor一区(to区)

                                                3. -Xms -Xmx分别设置堆的初始大小和最大大小,只管新生代、养老代两个区。

                                                设置堆空间内存大小与OOM

                                                1. 一旦堆区中的内存大小超过“-Xmx”所指定的最大内存时,将会抛出OutOfMemoryError异常

                                                  栈溢出是线程申请的栈容量大小超过了栈的容量

                                                  而OOM是内存不够了。

                                                  比如本地方法栈在扩展的时候无法申请到足够的内存,或者在创建栈的时候,因为内存不够,不能创建本地方法栈,会报OOM

                                                  总之,栈空间溢出了,报栈溢出,内存不够了,报OOM

                                                2. -Xms用来设置堆空间(年轻代、老年代)的初始内存大小

                                                  -X 是jvm的运行参数

                                                  ms 是memory start

                                                  -Xmx 用来设置堆空间(年轻代、老年代)的最大内存大小

                                                3. 开发中,建议将-Xms和-Xmx两个参数配置相同的值,

                                                  堆空间频繁地扩容和释放会造成系统的不必要的压力

                                                  其目的是为了在Java垃圾回收时,避免在GC的时候去调整堆内存的大小,造成系统不必要的压力

                                                4. 堆空间的新生代分为伊甸园区,survivor 0区和survivor 1区

                                                  如果我们要存储对象的话,伊甸园区可以存储,survivor 0区和survivor1区只能选择一个存储,涉及到垃圾回收的复制算法,survivor 0区和survivor1区始终有一个区是空的

                                                5. 查看堆空间设置的参数

                                                  image-20210810224237483

                                                6. OOM也有多种情况,Java heap space只是其中一种,超出了堆空间内存范围

                                                7. new的对象实例会被分配到堆空间中,伊甸园区可以分配空间存储对象实例,幸存者区一定有一个是空的

                                                  old区满了之后,就会报OOM了。

                                                  image-20210810225009965

                                                年轻代与老年代

                                                1. 存储在JVM中的Java对象可以被划分为两类:

                                                  一类是生命周期较短的瞬时对象,这类对象的创建和消亡都非常迅速

                                                  另外一类对象的生命周期很长,在某些极端情况下还能够与JVM的生命周期保持一致

                                                2. 每次进行GC的时候,生命周期较短的对象,会被回收

                                                  生命周期很长的对象,就放在老年代,老年代不会经常进行是否需要进行垃圾回收的判断

                                                3. 年轻代

                                                  • Eden
                                                  • Survivor 0 (from)
                                                  • Survivor 1 (to)

                                                  老年代

                                                4. 对象最先创建的一个位置,就叫伊甸园

                                                  伊甸园中的Java对象,在GC的时候有的会被回收掉,有的还存活了,就放在幸存者0区或1区

                                                5. -XX:NewRatio设置老年代与新生代的比例,默认值是2

                                                  一般情况下不会调这个参数

                                                  如果明确这个程序中有很多对象生命周期都很长,那么把老年代的比例调得更大些

                                                6. -XX:-UseAdaptiveSizePolicy 关闭自适应的内存分配策略

                                                  -XX:SurvivorRatio:设置新生代中Eden与Survivor区的比例

                                                  -Xmn:设置新生代的空间的大小(一般不设置)

                                                7. 几乎所有的Java对象都是在Eden区被new出来的

                                                  绝大部分的Java对象的销毁都在新生代进行了。

                                                新生代对象分配与回收过程

                                                1. 首先把对象分配到伊甸园区(几乎所有的Java对象都是在Eden区被new出来的,不是所有的)

                                                  一旦伊甸园区放满之后,伊甸园区放不下了,这时候就要进行YGC/MinorGC,这个时候进行年轻代的垃圾回收,此时用户线程停止

                                                  触发年轻代的垃圾回收之后,就要进行判断,判断伊甸区的对象谁是垃圾谁不是垃圾

                                                  如果是垃圾,就被回收掉,如果不是垃圾的对象,就被放在幸存者的to区,从Eden区放在幸存者区的对象,age赋值为1

                                                  接着会继续放对象在伊甸园区,伊甸园区满了之后会触发YGC

                                                  每次执行YGC之后,不是垃圾的对象会被放在幸存者to区,即幸存者区空的那个区域(下一轮YGC,此时的to区又变成from区,空的那个叫to区),总之空的叫to区

                                                  也就是说对象可能会交替放在s0区和s1区

                                                  age达到15(幸存者区晋升到老年代的阈值,可以进行设置)的对象,做一个晋升,晋升到老年代,判断对象从幸存者区到老年代,会用到年龄计数器

                                                  image-20210811201352406

                                                2. 伊甸园区满的时候,触发young GC, 幸存者区满的时候,不会触发YGC

                                                  触发YGC之后,会将伊甸园区和幸存者区一起进行垃圾回收

                                                  幸存者区不触发,但是不意味着幸存者区不进行垃圾回收

                                                3. 在进行YGC的时候,绝大部分对象都已经变成垃圾,需要进行回收了,只有很少的对象会进入幸存者区

                                                4. 总结:

                                                  image-20210811201920137

                                                5. image-20210811202400426

                                                6. 伊甸区满---触发YGC

                                                7. image-20210811203453743

                                                Minor GC/Major GC/ Full GC

                                                1. MinorGC = YOUNG GC

                                                2. 针对于老年代的垃圾回收叫Major GC,如果老年代的垃圾回收完了之后,对象仍然放不下,就会出现OOM异常

                                                3. 调优就是希望出现垃圾回收的情况少一些

                                                4. 区分

                                                  HotSpot VM的GC实现:

                                                  • 部分收集(Partial GC)

                                                    • 新生代收集(young gc / minor gc)

                                                      只是新生代的垃圾收集,新生代包括Eden,s0、s1

                                                    • 老年代收集 (old gc/ major gc)

                                                      只是老年代的垃圾收集

                                                      目前只有CMS GC 会有单独收集老年代的行为(但是分类要这么来划分)

                                                      注意,很多时候major gc和full gc会混淆使用,需要具体分辨是老年代回收还是整堆回收

                                                    • 混合收集(mixed GC)

                                                      收集整个新生代以及部分老年代的垃圾收集

                                                  • 整堆收集(full gc)

                                                    就是收集整个Java堆和方法区(新生代、老年代、方法区)的垃圾收集

                                                5. young gc的触发机制

                                                  1. eden区满(survivor满不会引发gc)
                                                  2. 因为Java对象大多具备朝生夕灭的特性,所以minor gc非常频繁,一般回收速度也比较快
                                                  3. minor gc会引发stw,暂停其他用户的线程,等垃圾回收结束,用户线程才恢复运行
                                                6. major gc触发机制

                                                  image-20210811212717272

                                                7. full gc触发机制

                                                  image-20210811212930949

                                                8. 出现OOM之前,一定经历过full gc,因为老年代空间不足会触发full gc,当对象要往老年代放时,但老年代空间不足,那么触发full gc,如果full gc之后还是放不下,那么就会出现OOM

                                                  这里的full gc 和 major gc没有加区分

                                                堆空间分代思想

                                                1. 为什么需要把Java堆分代?

                                                  不同对象的生命周期不同,大多数对象是临时对象

                                                  新生代:eden、survivor0、survivor1

                                                  老年代:存放新生代中经历多次GC仍然存活的对象,有一个阈值,age = 15,如果对象太大,伊甸园区放不下,会判断老年代是否放得下,如果老年代放得下,会直接放到老年代,另外如果survivor区满了,也可能放到老年代。老年代如果还放不下,那么会触发full gc或者说是major gc,如果经历full gc或者major gc后还放不下,那么就会出现OOM

                                                2. 分代就是为了优化GC性能,有minor gc、major gc、 full gc

                                                  minor gc就是高频触发的,新生代是频繁回收的

                                                  老年代回收就降低,就实现优化,因为回收老年代花费时间较多

                                                  优化的方向就是朝着减少gc次数

                                                内存分配策略

                                                1. 优先分配到Eden

                                                  大对象直接分配到老年代

                                                  • 尽量避免程序中出现过多的大对象

                                                  长期存活的对象分配到老年代

                                                  动态对象年龄判断

                                                  • 如果Survivor区中相同年龄的所有对象大小的总和大于survivor区的大小的一半,年龄大于等于该年龄的对象可以直接进入老年代,无需等到那个阈值

                                                  空间分配担保

                                                2. 对象分配过程:TLAB

                                                  TLAB是线程缓冲区

                                                3. 在并发环境下从堆区中划分内存空间是线程不安全

                                                  堆是线程共享的,所以线程不安全

                                                4. 什么是TLAB

                                                  对Eden区继续进行划分,JVM为每个线程分配了一个私有缓存区域,包含在EDEN空间内

                                                  多线程同时分配内存时,使用TLAB可以避免一系列的线程不安全问题

                                                  同时还能提升内存分配的吞吐量,因此我们可以将这种内存分配方式称为快速分配策略

                                                5. image-20210811220336129

                                                6. 所以堆空间所有部分都是线程共享的吗?

                                                  不是,堆空间的新生代的伊甸园区里有TLAB,是线程私有的,JVM会把TLAB作为为对象分配空间的首选,可以避免线程安全问题,如果TLAB放不下,那么会在伊甸园的非TLAB区域为对象分配空间,这时要采用加锁机制确保数据操作的原子性。

                                                  换句话说,如果对象能在伊甸园区的TLAB区域分配空间,则没有采用加锁这种机制。因为使用加锁机制会影响空间分配的速度,所以TLAB是为对象分配空间的首选

                                                7. 分代的一个主要目的就是为了让对象存储在新生代,因为大多数对象是临时对象,通过新生代的ygc,就可以把垃圾回收掉,提高效率

                                                  gc频率变高会影响执行效率,影响用户线程

                                                  调优就是要减少gc频率

                                                8. image-20210811222818578

                                                9. 堆外存储技术

                                                  • 逃逸分析,一个对象没有逃逸出方法的话,那么就可能被优化成栈上分配

                                                  • TAOBAO VM, 将生命周期较长的Java对象从heap中移至堆外(GCIH)

                                                    GC不能管理GCIH的Java对象,从而达到降低GC的回收频率和提升GC的回收效率的目的

                                                10. 为什么要堆外存储?

                                                  为了降低GC频率。提高效率

                                                11. 逃逸分析

                                                  image-20210811223633056

                                                  如何快速地判断是否发生了逃逸分析,就看new的对象是否有可能在方法外被调用

                                                12. 开发中能使用局部变量的,就不要在方法外定义,更不会考虑静态的问题

                                                  如果定义成属性,就涉及到GC的问题

                                                13. 逃逸分析是需要开启的,没有开启的情况下,即时没有发生逃逸,那么对象也是在堆上分配空间

                                                  开启逃逸分析可以减少GC次数,因为将符合条件的对象(即没有发生逃逸的对象)分配到栈上,栈上的对象就不需要垃圾回收了,提高效率,减少GC

                                                  堆外存储的目的就是为了降低GC频率

                                                14. 使用逃逸分析,编译器可以对代码做如下优化

                                                  1. 栈上分配,减少GC

                                                  2. 同步省略,Java虚拟机通过逃逸分析,发现这块代码只能被一个线程访问到,那么在JIT编译阶段就会把上锁的这块代码给取消掉同步锁

                                                  3. 分离对象或标量替换----把聚合量替换成标量,也就是把对象替换成局部变量,局部变量就可以分配到栈空间中,目的还是减少GC,标量替换可以大大减少堆内存的使用,因为一旦不需要创建对象了,那么就不再需要分配堆内存了

                                                    标量替换默认是打开的,就是将对象打散了分配到栈上

                                                  逃逸分析自身也是需要进行一系列复杂的分析的,这其实也是一个相对耗时的过程

                                                15. 但是逃逸分析目前并不成熟

                                                  淘宝的GCIH也不是栈上分配,而是放到本地内存中

                                                16. 用synchronized关键字同步代码块,监视器锁一定要保证是同一个

                                                17. 年轻代是对象的诞生、成长、消亡的区域,一个对象在这里产生、应用,最后被垃圾回收器回收

                                                  老年代放置长生命周期的对象,也有垃圾回收

                                                  老年代回收(full gc)是开发中要尽量避免的

                                                18. 老年代防止长生命周期的对象:

                                                  通常都是从survivor区域筛选拷贝过来的Java对象

                                                19. 普通对象分配:

                                                  • 首先TLAB
                                                  • 如果对象较大,试图直接分配到Eden其他位置上
                                                  • 如果对象太大,完全无法在新生代找到足够的连续空闲空间,JVM就会直接分配到老年代

                                                方法区

                                                栈、堆、方法区的交互关系

                                                1. image-20210813105607835

                                                2. 堆空间和方法区是线程共享,要考虑线程安全问题

                                                  元空间相对来说是比较稳定的,GC不会像堆空间那么频繁

                                                  GC是较多回收新生代,较少回收老年代,基本不动方法区

                                                3. 程序计数器不会报异常,也不存在GC

                                                4. image-20210813105911154

                                                  整个类的结构会加载到方法区

                                                  new的对象放到对空间中

                                                  如果这行代码在方法内写的,那么person这个对象引用就作为局部变量放到虚拟机栈的栈帧的局部变量表中

                                                5. 方法区主要存放的是方法和构造器的字节码指令、类的信息(结构)

                                                6. 方法区是随着虚拟机启动,创建好的

                                                7. 虽然方法区在逻辑上是堆空间的一部分(在Java虚拟机规范上),但是堆的话,有压缩算法、GC。但是方法区可以不压缩,也可以没有GC,就是说方法区可以独立于堆空间存在

                                                  jdk8没有限定方法区是不是堆的一部分

                                                  在Java虚拟机的具体实现上,方法区是和堆分开的,看作是独立于堆的一块空间

                                                方法区的理解

                                                1. 方法区在JVM启动的时候被创建,并且它的实际的物理内存空间中和Java堆区一样都是可以是不连续

                                                2. 方法区的大小和堆空间一样,可以选择固定大小或者可扩展

                                                3. 方法区的大小决定了系统可以保存多少个类,如果系统定义了太多了的类,导致方法区溢出,虚拟机同样会抛出OOM:jdk7及以前是PermGen space,JDK8及以后是Metaspace

                                                4. 方法区可以看过接口、规范,永久代和元空间可以看作方法区的具体落地实现

                                                5. 对hotspot来说,方法区和永久代是等价的,对于其它虚拟机实现来说,方法区和永久代不等价。我们面试答题针对于hotspot来说就可以了

                                                6. 使用永久代的时候,仍然是使用Java虚拟机的内存,更容易超过OOM

                                                  在jdk8及以后,使用元空间作为方法区的具体落地实现,替代了永久代

                                                  永久代是使用Java虚拟机的内存,而元空间是使用的本地的内存,这样显然更不容易出现OOM

                                                7. 元空间和永久代的最大区别就是,元空间不是使用的Java虚拟机的内存,而是使用本地的物理内存这里的物理内存不是指硬盘,是指内存,内存都是指运行内存

                                                  元空间依赖本地内存

                                                设置方法区大小与OOM

                                                1. 没有加参数的情况下,方法区会使用动态扩展的形式

                                                  在jdk1.8及以后,采用元空间,使用本地内存,那么默认初始大小是21M,上限默认是本地内存大小,如果方法区占满了,会进行一个动态扩展,直到把本地内存占满,然后如果还有类加载,那么会报OOM异常

                                                  可以设置方法区的初始大小和上限,也可以采用默认,默认的动态扩展会直到占满整个物理内存

                                                2. 如何解决OOM

                                                  通过内存映像分析工具进行分析,重点确认内存中的对象是否是必要的, 也就是要分清楚到底是出现了内存泄漏还是内存溢出

                                                  内存泄漏:如果是内存泄漏,导致垃圾回收不掉,导致内存溢出。就是堆空间中的对象回收不掉,因为有栈空间中的对象引用指向堆空间中的对象,但是不用这个对象,导致堆空间中的对象回收不掉。如果内存泄漏,通过工具查看泄漏对象到GC roots的引用链,于是就找到泄漏对象是通过怎样的路径与GC Roots相关联并导致垃圾回收器无法自动回收他们的。

                                                  内存溢出:如果不是内存泄漏,导致垃圾回收不掉,导致内存溢出,就检查虚拟机的堆参数

                                                方法区的内部结构

                                                1. 方法区里面主要放类信息和运行时常量池

                                                  这个类信息指类、接口、枚举类、注解等

                                                2. 《深入理解Java虚拟机》对方法区存储内容的描述:

                                                  它用于存储已被虚拟机加载的类型信息、常量(运行时常量池)、静态变量、被JIT即时编译器编译的缓存代码等

                                                3. 方法区也会记录字节码文件是使用哪一个类加载器加载进来的,类加载器在方法区里也是有记录的。(垃圾回收的时候,如果某个类加载器没有用了,类加载器对应的类也会被回收)

                                                  也会记录某个类加载器,加载过哪些字节码文件

                                                4. 从字节码角度来看,构造器和普通的方法都叫做方法,在源代码层面,构造器和方法是分开的

                                                类型信息

                                                image-20210813161957453

                                                方法信息

                                                image-20210813161930317

                                                静态变量

                                                1. image-20210813153359383

                                                  静态变量,没有final修饰:

                                                  • 在类加载的链接的准备阶段,默认赋初值为0,在初始化阶段才赋值为1

                                                  静态变量,用final修饰

                                                  • 在类加载的链接的准备阶段,或者说编译阶段,就已经赋值为2了。

                                                  image-20210813153525632

                                                运行时常量池

                                                1. 要注意运行时常量池和常量池的区别

                                                  运行时常量池是运行时结构,而常量池是静态结构

                                                  方法区,内部包含了运行时常量池

                                                  字节码文件,内部包含了常量池

                                                  要弄清楚方法区,需要理解清楚字节码文件,因为加载类的信息都在方法区

                                                  要弄清楚方法区的运行时常量池,需要理解清楚字节码文件中的常量池

                                                2. 字节码文件的常量池表,包含了各种字面量和对类型、域和方法的符号引用,符号引用转换为直接引用是发生在类加载过程的链接的解析阶段。(动态链接就是指向运行时常量池的符号引用,从而得到直接引用)

                                                3. 一份很简单的代码,都要加载很多结构,这些结构不直接存到字节码里,那么就存到常量池,字节码包含了指向常量池的引用。在动态链接的时候会用到运行时常量池,将符号引用转换为直接引用

                                                  说简单点:

                                                  字节码文件的指令中会有符号引用,指向常量池的符号引用,所有的变量和方法引用都作为符号引用保存在class文件的常量池里

                                                4. 常量池,可以看作是一张表,虚拟机指令根据这张常量表找到要执行的类名、方法名、参数类型、字面量等类型

                                                5. 运行时常量池是方法区的一部分,常量池是字节码文件的一部分

                                                  常量池是字节码文件的一部分,用于存放编译器生成的各种字面量与符号引用,这部分内容将在类加载后存放到方法区的运行时常量池中,它们是对应的关系!

                                                6. 运行时常量池中包含多种不同的常量,包括编译器就已经明确的数值字面量,也包括到运行期解析后才能够获得的方法或字段引用,此时不再是常量池中的符号地址了,这里转换为真实地址

                                                7. 总结:方法区存的结构

                                                  • 类型信息
                                                  • 运行时常量池
                                                  • 静态变量
                                                  • 域信息
                                                  • 方法信息
                                                  • JIT编译器编译的代码缓存
                                                8. 局部变量表,如果放的基本数据类型,就是放的变量真实的值,如果放的引用类型变量,那么就放的是地址,都可以用数字来表示,所以局部变量表是一个数值数组

                                                方法区的演进细节

                                                1. jdk1.6及以前,有永久代,静态变量存放在永久代上

                                                  jdk1.7,有永久代,但是静态变量和字符串常量池保存在堆中

                                                  jdk1.8及以后,无永久代,用元空间作为方法区的实现,字符串常量池、静态变量仍然在堆,但是元空间中有类型信息、运行时常量池、方法信息

                                                  (字符串常量池和运行时常量池不一样)

                                                2. image-20210813225341464

                                                  image-20210813225401420

                                                  image-20210813225429219

                                                3. 永久代为什么要被元空间替换?

                                                  1. 很难确定为永久代设置的大小,空间小了,容易引起full gc,会拖慢程序的性能
                                                  2. 元空间和永久代之间的最大区别在于:元空间并不在虚拟机中,而是使用本地运行内存,默认情况下元空间的大小仅受本地内存限制
                                                  3. 对永久代调优困难
                                                4. 方法区的垃圾回收主要回收废弃的常量和不再使用的类型

                                                5. StringTable(字符串常量或者说字面量)为什么要调整到堆空间中?

                                                  因为永久代的回收效率很低,永久代的回收是在full gc的时候才会触发,而minor gc是高频触发的,而full gc是低频触发的(调优就是为了减少gc),所以导致StringTable的回收效率不高

                                                  而我们开发中有大量的字符串被创建,回收效率低,导致永久代内存不足,放到堆里,能及时回收内存

                                                  full gc是在老年代空间不足的时候会被触发

                                                6. 静态引用(静态变量名)对应的对象实体始终都存在堆空间

                                                  前面说的静态变量存在的位置有一个变化,在1.6是永久代,1.7、1.8是在堆空间,这是说的静态变量名!(右边的对象实体始终在堆空间)

                                                方法区的垃圾回收

                                                1. 方法区的垃圾收集主要回收两部分内容

                                                  • 运行时常量池中废弃的常量
                                                  • 不再使用的类型
                                                2. 方法区的垃圾回收效果可能不好,但是是有必要的

                                                3. 常量池中主要存放两大类常量

                                                  • 字面量
                                                  • 符号引用
                                                4. 要想判断一个类不再使用,需要同时满足下面三个条件:

                                                  image-20210813234222298

                                                对象的实例化布局与访问定位

                                                1. 创建对象的方式

                                                  image-20210820161439568

                                                2. 创建对象的步骤

                                                  image-20210820162323011

                                                  如果内存不是规整的,已使用的内存和未使用的内存相互交错,那么虚拟机将采用的是空闲列表法来为对象分配内存

                                                  意思是虚拟机维护了一个列表,记录上哪些内存块是可用的,再分配的时候从列表中找到一块足够大的空间划分给对象实例,并更新列表上的内容,这种分配方式叫空闲列表

                                                  指针碰撞对应标记压缩算法,空闲列表分配对应于标记清除算法(CMS这个垃圾收集器就用的标记清除算法)

                                                  采用什么方式来为对象分配内存,还要取决于用的哪种垃圾收集器,是用的标记压缩算法还是标记清除算法。

                                                  第四步是对属性的默认初始化

                                                  第六步是对属性的显式初始化,包括代码块和构造器中对变量的初始化。是在<init>这一步中。要区分<init>和<clinit>,后者是类加载过程的初始化阶段,前者是对应于类里面的构造器

                                                3. 对象实例化的过程

                                                  1. 加载类元信息(判断类是否加载、链接、初始化)
                                                  2. 为对象分配内存(要分内存空间是否规整,规整对应于指针碰撞,不规整基于空闲列表)(垃圾回收分别对应于标记压缩算法和标记清除算法)
                                                  3. 处理并发安全问题
                                                  4. 对属性的默认初始化
                                                  5. 设置对象头的信息
                                                  6. 对属性的显式初始化(对对象真正意义上的初始化)
                                                4. new的对象放在堆空间中的,那么这个堆空间中的对象有哪几部分?

                                                  image-20210820164458201

                                                  image-20210906143610290

                                                  运行时元数据Mark Word格式:

                                                  image-20210906171812809

                                                5. image-20210820165552514

                                                6. 对象的访问定位

                                                  HOTSPOT采用的直接指针的方式,即通过栈上的对象引用指向堆中的实例,堆中的实例对象有一部分叫对象头,对象头里有类型指针指向方法区中的对象的类型数据(即类型信息),这种方式没有在堆空间专门开辟空间来记录句柄

                                                直接内存

                                                1. 运行时数据区是虚拟机内存的概念

                                                2. 直接内存不属于虚拟机内存,也不包含在jvm规范里

                                                3. 方法区的具体实现元空间就是用的直接内存,也就是本地运行内存,是Java堆外的,直接向系统申请的内存空间,来源于NIO

                                                4. Java堆、栈都是虚拟机内存层面的

                                                5. 通过缓冲区操作本地内存

                                                  ByteBuffer的allocateDirect可以直接分配本地内存空间

                                                  出于性能考虑,读写频繁的场合可能会考虑使用直接内存

                                                6. 读写文件,使用非直接缓冲区,需要与磁盘交互,需要由用户态切换到内核态。导致效率低

                                                  使用直接缓冲区直接和物理内存进行交互,没有用户态和内核态copy的过程

                                                7. 直接内存也会导致OOM异常

                                                8. 直接内存分配回收成本较高,不受JVM内存回收管理

                                                9. 直接内存大小可以通过MaxDirectMemorySize设置

                                                执行引擎

                                                执行引擎概述

                                                1. Java虚拟机粗略角度来分可以分为三层

                                                  • 类加载器子系统
                                                    • 加载
                                                    • 链接
                                                    • 初始化
                                                  • 运行时数据区
                                                    • 堆空间
                                                    • 方法区
                                                    • 虚拟机栈
                                                    • 本地方法栈
                                                    • 程序计数器
                                                  • 执行引擎
                                                    • JIT即时编译器
                                                    • 解释器
                                                    • 垃圾回收器
                                                2. 执行引擎是将字节码指令转换成机器指令,从而使得字节码文件能够被CPU所识别

                                                3. 执行引擎是Java虚拟机核心组成部分之一

                                                4. 虚拟机是一个相对于物理机的概念,这两种机器都有代码执行能力

                                                  区别是虚拟机的执行引擎是由软件自行实现的。(不受物理条件制约)

                                                  物理机的执行引擎是直接建立在处理器、缓存、指令集和操作系统层面上的。

                                                5. JVM也是Java语言的跨平台性的原因

                                                6. JVM主要任务就是装在字节码文件到虚拟机内部

                                                  字节码虽然是二进制的,字节码文件是二进制文件,但是字节码并不能够直接运行在操作系统之上,因为字节码指令并非等价于能够被CPU所识别的机器指令,字节码文件内部包含的仅仅是一些能够被JVM识别的字节码指令、符号表,以及其他辅助信息

                                                  那么,想让一个Java程序运行起来,执行引擎的任务就是将字节码指令解释、编译成为对应平台上的本地机器指令才可以,简单来说,JVM中的执行引擎充当了将高级语言翻译为机器语言的译者

                                                7. 执行引擎的工作过程

                                                  image-20210824181108997

                                                Java代码编译和执行的过程

                                                1. 首先要明确,字节码文件只能够被JVM识别,而不能够被操作系统或者说CPU这种硬件层面识别,那么想要执行字节码文件,将字节码文件加载到JVM之后,JVM的执行引擎要将加载进来的字节码文件解释、编译成操作系统能够识别的机器指令。可以理解为执行引擎就是将字节码指令翻译成机器指令的翻译官

                                                2. image-20210824181700991

                                                  橙色的过程是由javac.exe完成的,形成一个线性的字节码二进制流

                                                  就相当于前端编译器,就是第一次编译,编译成.class字节码文件的过程

                                                  蓝色的就是第二次编译,将字节码指令编译成目标代码也就是机器指令

                                                  绿色的就是执行引擎的解释器逐行对字节码指令进行解释执行

                                                  Java语言是半解释型半编译型语言说的就是这个意思

                                                  橙色的过程跟Java虚拟机是没有关系的,是生成字节码文件的时候

                                                  字节码文件加载进Java虚拟机之后才和JVM有关系

                                                3. 什么是解释器?

                                                  解释器:当Java虚拟机启动时会根据预定义的规范对字节码采用逐行解释的方式执行,将每条字节码文件中的内容“翻译”成对应平台的本地机器指令执行。也就是说解释器,也要将字节码指令翻译成机器指令

                                                  什么是JIT即时编译器?

                                                  虚拟机将字节码直接翻译成和本地机器平台相关的机器语言,没有说马上去执行

                                                  解释器的作用是保证响应的速度

                                                  编译器是保证执行的效率,对热点代码翻译成机器指令,进行一个缓存,存在方法区中。(好处就是去调用的时候,直接去调用缓存的已经编译好的机器指令,效率高)

                                                4. 解释器解释执行字节码指令,依赖程序计数器,每当解释执行完一条机器指令后,程序计数器会更新下一条需要执行的字节码指令的指令地址。

                                                  无论是解释执行还是JIT即时编译器进行编译,都要将字节码文件转换成操作系统能懂的机器指令

                                                机器码、指令和汇编语言

                                                1. 机器码就是二进制编码表示的指令,叫机器指令码或机器语言。

                                                  就是0101这种的二进制符号

                                                  机器语言就是二进制,特点就是CPU可以直接读取运行,机器指令是和CPU密切相关的。

                                                2. 指令就是把机器码中特定二进制序列,简化成对应的指令,比如mov、inc

                                                3. 汇编语言也是不可以被硬件识别的,也是需要翻译成机器指令(二进制)。

                                                4. 高级语言就是可以理解为层层封装的,最终也要被翻译成机器指令,才能够被执行。比如JVM将字节码指令翻译成机器指令。一种是解释执行,一种是编译执行。

                                                5. image-20210825160558621

                                                6. 字节码文件是与硬件环境无关的,就是为了实现软件运行和软件环境。

                                                  这就是Java语言具有跨平台性的原因

                                                7. 字节码文件具有跨平台的特性

                                                解释器

                                                1. 解释器在运行时采用逐行解释字节码执行程序的想法

                                                2. 执行引擎里的解释器也是要将字节码指令翻译成机器指令执行,并不是说只有JIT即时编译器,才会对字节码指令进行二次编译,编译成机器指令缓存起来,解释器和编译器都是翻译者,最终都要翻译成机器指令才能被硬件所识别

                                                3. 当一条字节码指令被解释执行完成后,接着再根据PC寄存器中记录的下一条需要被执行的字节码指令执行解释操作

                                                4. 基于解释器执行已经是低效的代名词。

                                                  C和C++是编译和汇编两个过程,编译是把高级语言翻译为汇编语言的过程,汇编是把汇编语言翻译成机器指令的过程。

                                                  python是基于解释器执行,是动态语言,写很简单,但是执行效率就更低。写的语言更接近机器,那么执行效率就更高。

                                                JIT编译器

                                                1. 即时编译,就是将热点的字节码指令编译成机器码,每次函数执行时,只需要调用编译好的机器码,因为编译好的机器码缓存在方法区中供调用

                                                2. 解释器的优势是立刻逐条解释执行字节码指令,响应速度快。

                                                  JIT编译器的优势是响应速度慢,因为需要编译成机器指令缓存这个过程,但是执行效率高。

                                                3. 当虚拟机启动时,解释器可以首先发挥作用,省去许多不必要的编译时间。

                                                  随着程序运行时间的退役,根据热点探测功能,将有价值的代码编译成为本地机器指令

                                                4. JRockit VM 内部就不包含解释器,字节码全部依靠即时编译器编译后执行。

                                                  在服务端,对响应速度的要求并不是特别高,更关注执行效率、性能,所以可以砍掉解释器。客户端对响应速度才有要求

                                                5. 任何高级语言翻译成机器指令都要经过汇编这个过程。

                                                6. 什么时候让JIT做即时编译?

                                                  需要判断代码被调用执行的频率,频率高的代码被称为热点代码

                                                7. JIT编译器编译字节码为本地机器指令,这种编译方式发生在方法的执行过程中,因此也被称之为栈上替换

                                                8. 基于计数器进行热点探测

                                                  • 方法调用计数器用于统计方法的调用次数
                                                  • 回边计数器用于统计循环体执行的循环次数
                                                9. image-20210825173756594

                                                  两计数器之和超过阈值,触发OSR编译器请求

                                                10. image-20210825174714351

                                                11. 可以通过参数设置使hotspot虚拟机只使用解释器的模式或者只使用即时编译器的模式

                                                12. hotspot虚拟机内置了两个JIT编译器,C1编译器和C2编译器,C1是client模式的编译器,C2是server模式的编译器,当电脑是64bits的操作系统,Java就是server模式的,就不用去设置了

                                                  C1的优化稍微弱一些,C2的优化更强一些

                                                  C1 JIT编译器进行简单的优化,耗时短,为了响应时间更短,因为client模式,更在乎响应时间

                                                  C2 JIT编译器花的时间更长,优化更强,响应时间更慢,但是优化好之后,执行效率更好。

                                                  没有说哪种编译器更好,他们是互补的关系,耗时短那么响应速度快,就优化稍差,执行效率稍差

                                                  耗时长,那么就优化好,执行效率高,但是响应速度慢,要辩证地来看他们之间的关系

                                                  C1是轻量级的优化

                                                13. 在jdk7之后的版本,使用server模式时,默认会开启分层编译策略,由C1编译器和C2编译器相互写作共同执行编译任务

                                                14. 总结:

                                                  • 一般来讲,JIT编译出来的机器码性能比解释器高(这里要注意解释器和编译器都是要把字节码转换成操作系统或者说硬件能识别的机器码,并不是只有编译器会转换成机器码,解释器也要将字节码指令转换成机器码)(执行引擎的作用就是充当将字节码或者说高级语言转换成机器码指令的翻译者)
                                                  • C2编译器即server模式下的JIT编译器,启动时长比C1编译器慢,但是执行效率更高。系统稳定执行之后,C2编译器执行速度远远快于C1编译器
                                                15. 编译器:

                                                  • AOT编译器(静态提前编译器),这是在程序运行之前,对字节码转换成机器码的编译操作
                                                  • JIT即时编译器,在程序的运行过程中,对热点代码(字节码)编译成可直接在硬件上运行的机器指令,并缓存到方法区中,是在程序的执行过程中来执行的。
                                                    • C1编译器(client模式)
                                                    • C2编译器(server模式)
                                                    • graal编译器

                                                  AOT编译器和JIT即时编译器都是将字节码指令转换成机器指令,只不过AOT在运行前,JIT在运行时

                                                StringTable

                                                String的基本特性

                                                1. String类声明为final的,不可被继承

                                                2. String变量的实例化

                                                  String s1 = "atguigu"; // 字面量的定义方式

                                                  String s2 = new String("hello");

                                                3. String类实现了Serializable接口,Comparable接口

                                                4. 在jdk1.8底层用的是char数组,一个字符对应于两个字节16位

                                                  在jdk1.9及以后底层用的是byte数组

                                                  这是重大的一个改变

                                                  结论:String在jdk1.8之后不用char[]来存储,改成了byte[]加上编码标记,节约了空间,如果是ISO-8859/Latin-1,就用一个字节来存,如果是中文字符,还是用两个字节去存

                                                5. StringBuffer和StringBuilder也都做了修改

                                                6. String代表不可变的字符序列,简称不可变性

                                                  从以下三个方面体现:

                                                  • 当对字符串重新赋值时,需要重写指定内存区域赋值,不能使用原有的value进行赋值
                                                  • 当对现有的字符串进行连接操作时,也需要重新指定内存区域赋值,不能使用原有的value进行赋值
                                                  • 当调用String的replace()方法修改指定字符或字符串时,也需要重新指定内存区域赋值,不能使用原有的value进行赋值
                                                7. 通过字面量定义字符串的方式,字面量存储在字符串常量池中,字符串常量池中绝对不允许存储相同的字符串

                                                8. 字符串底层是数组,既然是数组,那么底层在创建的时候就已经确定好了长度,那么拼接的时候,显然是另外指令内存区域赋值,而不是直接在原数据后进行连接

                                                  而且数组的扩容也是需要另外造数组,而不是直接在原内存位置进行扩容

                                                9. 字符串常量池底层是一个固定大小的hashtable,hashtable又称为散列表,散列表在底层是jdk7及以前是采用数组+链表的形式存储,在jdk8及以后是采用数组+链表+红黑树的形式存储,所以在jdk7中数组就有固定长度是是60013

                                                String的内存分配

                                                1. 在Java语言中,有8种基本数据类型和一种比较特殊的类型String,这些类型为了使他们在运行过程中速度更快、更节省内存,都提供了一种常量池的概念
                                                2. 常量池就类似于一个Java系统级别提供的缓存,8种基本数据类型的常量池都是系统协调的,String类型的常量池比较特殊,主要使用方法有两种
                                                  • 字面量声明的方式:String s1 = "atguigu"; // 会直接将String对象存储到字符串常量池中,当然字符串常量池底层是hashtable,字符串底层是byte或char数组
                                                  • 如果不是使用双引号声明的String对象,可以使用intern方法
                                                3. Stringtable为什么要从方法区的运行时常量池调整到堆空间中
                                                  • permSize默认比较小
                                                  • 永久代垃圾回收频率低,导致大量不用的字符串不能够及时回收,导致容易报OOM,字符串常量池放到堆里,能够及时回收
                                                4. 要注意区分运行时常量池和字符串常量池

                                                字符串拼接操作

                                                1. 非静态方法的栈帧的局部变量表里面的第一个位置放的this,而静态方法则没有这个this

                                                2. 常量与常量的拼接结果在常量池中,原理是编译期优化(在生成字节码文件这个过程就直接认为字符串是拼接后的结果)

                                                  String s1 = "a" + "b" + "c";//等同于String s1 = "abc";
                                                   
                                                3. 常量池中不会存在相同内容的字符串常量

                                                4. 只要其中有一个是变量,结果就在堆中非字符串常量池的区域(因为jdk7及以后,字符串常量池也在堆中而不在方法区中),变量拼接的原理的是StringBuilder

                                                  如果拼接符号的前后出现了变量,则相当于在堆空间中new String(),具体的内容为拼接后的结果(只要是new,那么就是在堆空间中新建了一个新的对象,当然是新的地址)

                                                  只要连接符两边任何一边出现了变量,先是new了一个StringBuilder,然后从局部变量表取出字符串,调用append方法

                                                  String s1 = "a";
                                                   String s2 = "b";
                                                   /*
                                                  @@ -41,6 +41,6 @@
                                                   */
                                                   String s4 = s1 + s2;
                                                   
                                                5. 如果拼接的结果调用intern方法,则主动将常量池中还没有的字符串对象放入池中,并返回此对象地址

                                                6. intern()

                                                  javaEEhadoop 代表一个具体的字符串,进行一个说明

                                                  判断字符串常量池中是否存在JavaEEhadoop值,如果存在,则返回常量池中javaEEhadoop的地址

                                                  如果字符串常量池中不存在javaEEhadoop,则在常量池中加载一份javaEEhadoop,并返回此对象的地址

                                                7. 字符串拼接操作:

                                                  • 如果拼接符号左右两边有变量,则使用的是StringBuilder
                                                  • 如果拼接符号左右两边都是常量或者常量引用,则仍然使用编译期优化,即非StringBuilder的方式,结果在字符串常量池中

                                                  只要使用了StringBuilder,通过append,然后toString的方式,那结果一定类似于new String(),最后结果在堆中非字符串常量池的区域

                                                8. 体会拼接符号+和StringBuilder的append()方式添加字符串执行效率

                                                  StringBuilder的append()方式的效率要远高于+

                                                  详情:

                                                  • StringBuilder的append()方式,自始至终只创建过一个StringBuilder对象

                                                  • 使用String的字符串拼接方式,创建过多个StringBuilder对象,String对象(只要两边有变量),内存占用较大

                                                    进行GC操作也需要花费额外的时间

                                                  改进的空间:

                                                  在实际开发中,如果基本确定前前后后要添加的字符串长度的大小不超过某个阈值highLevel,建议使用构造器StringBuilder stringBuilder = new StringBuilder(highLevel);,这样的话,既可以采用StringBuilder的append方式,也可以尽量保证,不进行StringBuilder底层char数组的扩容操作。

                                                  只要是数组涉及到扩容,都是要新建一个新的数组,然后复制数据

                                                intern()的使用

                                                1. 如何保证变量s指向的是字符串常量池中的数据?

                                                  • String s = "aaa"; // 字面量方式
                                                  • String s = xxx.intern(); // 不管前面是怎么做的,只要调用intern方法,返回的**引用都是指向字符串常量池里的字符串!**因为,即使字符串常量池里没有,调用了intern,也会在字符串常量池里造一个,再返回
                                                2. image-20210831202906556

                                                3. new String("ab")会创建几个对象?

                                                  一个对象是:new关键字在堆空间创建的

                                                  另一个对象是:字符串常量池中的对象。字节码指令:ldc

                                                4. new String("a") + new String("b")呢?

                                                  对象1:拼接操作:new了一个StringBuilder对象

                                                  对象2:new String("a"),new关键字在堆空间创建的

                                                  对象3:常量池中的"a",字节码指令:ldc

                                                  对象4:new String("b"),new关键字在堆空间创建的

                                                  对象5:常量池中的"b",字节码指令:ldc

                                                  深入剖析:StringBuilder的toString():

                                                  对象6:new String("ab")

                                                  强调一下:toString()的调用,在字符串常量池中,没有生成"ab"

                                                5. image-20210831204236410

                                                  解释:

                                                  第一道题:s.intern()之前,字符串常量池里已经有了"1"

                                                  s是指向堆空间中的地址,而s2是指向字符串常量池中的,无论是jdk6中永久代的字符串常量池,还是jdk7/8中堆空间的字符串常量池,s2和s指向的都是两个不同的地址,所以都是false

                                                  第二道题:

                                                  对于jdk1.6来说,s3是指向堆空间中的地址,s3.intern()之前,字符串常量池中没有"11",所以会新建一个新的"11"在字符串常量池(为什么会新建"11"字符串常量而不是引用呢,正是因为字符串常量池在方法区,而堆空间和方法区逻辑上是分开的),s4指向字符串常量池中这个新建的"11",所以s4指向字符串常量池,s3指向堆空间,结果为false

                                                  对于jdk7/8来说,s3仍然指向堆空间中的地址,而s3.intern()这行代码之前,字符串常量池中没有"11",所以会新建,但是由于字符串常量池已经挪动到堆中,新建之前,会检验,发现堆中已有new String("11"),字符串常量池中并不会直接新建一个"11"字符串对象,而是一个引用,直接指向堆中的new String("11"),新建之后,s4指向字符串常量池中这个引用,这个引用又指向new String("11"),而s3直接指向堆中这个new String("11")

                                                  如图

                                                  image-20210831210153404

                                                  关键点:

                                                  1. jdk7之后字符串常量池在堆中,当堆中已有new String("11")时,并不会在字符串常量池中直接新建"11"字符串对象,而是一个引用指向这个new String("11")

                                                  2. 无论是jdk1.6还是jdk7/8,因为是拼接操作的原因,用到了StringBuilder对象,最终在字符串常量池中不会生成"11",导致了后面调用s3.intern(),会新建,新建的时候由于字符串常量池位置的差异,造成了是否生成的是"11"还是一个引用的差异

                                                  3. image-20210831211340502

                                                  4. 用了intern(),在时间上和空间上都有节省

                                                StringTable的垃圾回收和String去重

                                                1. 正是因为Stringtabe(字符串常量池)存在垃圾回收,所以使用intern,才会在空间上进行节省即优化

                                                  字符串常量池放在堆空间中,会进行垃圾回收,这也是要将字符串常量池从方法区移到堆空间的一个主要原因,因为如果串池在方法区中,那么只有在full gc的时候,才会进行回收,回收效率低,导致内存占用大,可能存在太多不用的字符串,如果串池放在堆空间中,那么在young gc或者说minor gc的时候,就可以对字符串常量池进行垃圾回收,效率高。

                                                2. image-20210831214906016

                                                  G1垃圾回收器的String去重指的是蓝色圈起来这个地方的去重

                                                垃圾回收概述

                                                什么是垃圾

                                                1. 垃圾回收算法分为垃圾标记阶段算法、垃圾清除阶段算法

                                                2. jdk里默认使用G1垃圾回收器,ZGC垃圾回收器会替换G1垃圾回收器,ZGC现在不断地在优化

                                                3. 垃圾收集机制是Java的招牌能力,极大地提高了开发效率

                                                4. 哪些内存需要回收?

                                                5. 什么时候需要回收?

                                                6. 如何回收?

                                                7. 什么是垃圾?

                                                  在运行程序中没有任何指针指向的对象,这个对象就是需要被回收的垃圾

                                                  如果不及时对内存中的垃圾进行清理,那么这些垃圾对象所占的内存空间会一直保留到应用程序结束,被保留的空间无法被其他对象使用,可能造成内存溢出

                                                  一个应用程序或者说一个进程对应着一个运行时数据区,一个运行时数据区就有一份方法区、堆空间等

                                                  进程结束,运行时数据区就没有了

                                                为什么需要GC

                                                1. 对于高级语言来说,一个基本认知是如果不进行垃圾回收,内存迟早都会被消耗完

                                                  除了释放没有用的对象,垃圾回收也可以清除内存里的记录碎片,碎片整理将所占用的堆内存移到堆的一段,以便JVM将整理出的内存分配给新的对象,特别是新的对象比较大,需要一片连续的大的存储空间的时候

                                                早期垃圾回收

                                                1. 在早期的c/c++时代,垃圾回收基本上是手工进行的

                                                2. 什么叫内存泄漏?

                                                  数据不用了,但是试图进行回收的时候,发现它还有相关引用,于是回收不掉

                                                  如果内存泄漏过多,导致内存空间持续上升,还没办法GC,最终造成内存溢出

                                                Java垃圾回收机制

                                                1. GC的作用区域是方法区和堆,只有在full gc的时候才会对方法区进行垃圾回收

                                                  而虚拟机栈是存在内存溢出,但是没有垃圾回收

                                                  image-20210901123338716

                                                  程序技术器连溢出行为都没有

                                                  垃圾回收器可以对年轻代回收(minor gc),也可以对老年代回收(major gc),甚至是全堆和方法区的回收(full gc)

                                                  Java垃圾回收机制,从次数上讲:

                                                  频繁收集新生代

                                                  较少收集老年代

                                                  基本不收集方法区,只有在full gc的时候会对全堆和方法区进行垃圾回收,但是full gc很少会触发

                                                垃圾回收算法

                                                1. gc过程分为两个阶段,第一个阶段是标记阶段,第二个阶段是清除阶段

                                                  标记阶段就是要标记出哪些对象我们不再使用了,那么下一阶段就是清除

                                                2. Object类里有一个finalize()方法,在对象被回收的时候,这个方法会被调用

                                                标记阶段:引用计数算法

                                                1. 垃圾标记阶段就是判断对象是否存活,把垃圾标记出来

                                                2. 方法区的垃圾回收不具有普遍性,很多垃圾回收器都没有回收方法区

                                                  我们这里说的GC主要针对的是堆,堆里主要放的就是对象,所以这里垃圾回收主要针对对象,对垃圾的标记,也是对对象的标记,标记对象是死亡还是存活

                                                3. 在GC执行垃圾回收之前,需要区分出内存中哪些是存活对象,哪些是已经死亡的对象。只有被标记为已经死亡的对象,GC才会在执行垃圾回收时,释放掉其所占用的内存空间,因此这个过程我们可以称为垃圾标记阶段

                                                4. 当一个对象已经不再被任何的存活对象继续引用时,就可以宣判为已经死亡。

                                                5. 判断对象存活一般有两种方式:引用计数算法和可达性分析算法

                                                6. 引用计数算法,对每个对象保存一个整型的引用计数器属性,用于记录对象被引用的情况

                                                  只要对象A的引用计数器的值为0,即表示对象A不可能再被使用,可进行回收

                                                7. 优点:

                                                  实现简单,垃圾对象便于辨识,判定效率高,回收没有延迟性(不需要等到内存不够的时候才进行垃圾回收,只要发现引用计数器为0了,那就可以回收)。

                                                8. 缺点:

                                                  • 引用计数器增加了存储空间的开销

                                                  • 更新计数器伴随着加法和减法操作,增加了时间开销

                                                  • 没有办法处理循环引用,这是致命缺陷,导致Java垃圾回收器没有使用这类算法

                                                    image-20210901130731403

                                                9. python使用了引用计数算法

                                                  python如何解决的?

                                                  image-20210901131706912

                                                标记阶段:可达性分析算法

                                                1. 这是Java所选择的标记阶段的算法

                                                2. 也叫做根搜索算法、追踪性垃圾收集

                                                3. 在可达性分析算法中,只有能够被根对象集合(gc roots)直接或者间接连接的对象才是存活对象

                                                4. gc roots 包括以下几类元素:

                                                  • 虚拟机栈中引用的对象
                                                  • 本地方法栈内JNI引用对象
                                                  • 方法区中静态属性引用的对象,比如引用类型静态变量
                                                  • 方法区中常量引用的对象,比如字符串常量池(String table)里的引用
                                                  • 所有被同步锁synchronized持有的对象
                                                  • Java虚拟机内部的引用
                                                    • 基本数据类型对应的Class对象
                                                    • 一些常驻的异常对象
                                                    • 系统类加载器
                                                  • 特别地,比如说eden区满,触发young gc,要回收eden区的对象,有老年代的对象的引用指向这个要回收的对象,那么老年代里的对象也是gc roots,因为当前的young gc并不涉及到老年代的对象。换句话说,在当前gc涉及范围之外的对象,指向了gc涉及范围之内的对象,那么之外的这部分对象也是gc roots
                                                5. 小技巧:

                                                  如果一个指针,它保存了堆内存里面的对象,但是自己又不存放在堆内存里面,那它就是一个Root

                                                6. 如果要使用可达性分析算法来判断内存是否可回收,那么分析工作必须在一个能保障一致性的快照中进行,这也是导致GC进行时,必须stw的一个重要原因,即使是号称不会发生stw的CMS收集器中,在枚举根节点时也是必须要停顿的。

                                                  不能在当前时刻标记好了,在下一时刻,引用又没有了,所以必须要保证一致性,在标记的那一刻,需要停顿,是这个原因

                                                对象的finalization机制

                                                1. 一个垃圾对象被回收之前,会调用这个对象的finalize()方法,但是被回收之前,调用这个finalize()方法,可能使对象复活,于是不被回收,类似于刀下留人

                                                2. finalize()方法允许在子类中被重写,用于在对象被回收时进行资源的释放

                                                3. 永远不要主动调用某个对象的finalize()方法

                                                4. 虚拟机中的对象可能的三种状态:

                                                  • 可触及的:从根节点开始,可以到达这个对象,说明这个对象不是垃圾
                                                  • 可复活的:对象的所有引用都被释放,但是对象有可能在finalize()中复活
                                                  • 不可触及的:对象的finalize()被调用,并且没有复活,那么就会进入不可触及状态。不可触及的对象不可能被复活,因为finalize()只会被调用一次。

                                                  以上三种状态中,只有在对象不可触及时,才可以被回收

                                                  finalize()是在对象要被回收时才会被调用!

                                                5. image-20210901142223783

                                                6. 没有引用链,先判断是否有必要执行finalize()方法,并不是没有引用链就视为垃圾马上回收,在回收之前,要调用finalize()方法,而调用之前,要判断是否有必要调用

                                                清除阶段:标记-清除算法

                                                1. 当成功区分出内存中存活对象和死亡对象后,GC接下来的任务就是执行垃圾回收,释放掉无用对象所占用的内存空间,以便有足够的可用内存空间为新对象分配内存

                                                2. 执行过程:

                                                  当堆中的有效内存空间被耗尽,则触发垃圾回收,就会停止整个程序,被称为stop the world,然后进行两项工作,第一项则是标记,第二项就是清除。

                                                  标记:垃圾回收器从引用根节点开始遍历,标记所有被引用的对象(注意,标记的不是垃圾,而是垃圾的反面),一般是在对象的header中记录为可达对象

                                                  标记之后的记录是记录在对象头里

                                                  清除:垃圾回收器对堆内存从头到尾进行线性的遍历,如果发现某个对象在其header中没有标记为可达对象,则将其回收

                                                  (标记的过程有两步,一是没有引用链要标记,二是判断是否要finalize())

                                                3. image-20210901155852236

                                                清除阶段:复制算法

                                                1. image-20210901160638209

                                                2. 显然这种算法清理出来的空闲内存是连续的,不会产生内存碎片

                                                3. 这个和将对象放到堆空间新生代的伊甸园区,伊甸园区满后,存活对象放到s0区,下一次伊甸园区满的时候,会触发minor gc,s0区中存活的对象又放到s1区,那么对象在s0区和s1区的这种交换,用到的就是复制算法

                                                4. 要注意s0区和s1区是会发生垃圾回收的,但是幸存者区满不触发垃圾回收,伊甸园区满才出发minor gc,minor gc会对幸存者区进行垃圾回收

                                                5. 为对象分配内存时,如果内存空间是规整的,那么采用指针碰撞的方式,对应垃圾回收算法是标记压缩算法和复制算法

                                                  如果内存空间不是规整的,采用维护空闲列表的方式,对应垃圾回收算法是标记清除算法

                                                6. image-20210901161418211

                                                7. 缺点显然就是存活对象在堆空间中的地址发生了改变,那么其他对象或者局部变量指向这个对象的引用地址就需要发生改变,这个引用是需要维护的,这也是开销

                                                  结论:复制算法,应用在所需要复制的对象并不用太多的情况下

                                                  因为新生代的对象死亡率很高,大多数朝生夕死,所以需要我们复制的存活的对象就相对少,于是在幸存者的from和to区应用复制算法

                                                  在老年代就不适合使用复制算法,因为老年代的对象大,存活时间长,复制算法的话,需要复制的对象就多,效率自然就不好

                                                8. 也就是使用了复制算法来进行GC之后,下一次为对象分配内存的时候,内存空间就是规整的,就可以使用指针碰撞的方式

                                                清除阶段:标记-压缩算法

                                                1. 复制算法的高效性是建立在存活对象少、垃圾对象多的前提下的。所以不适合使用在老年代,适合应用在新生代的幸存者区

                                                  标记-清除算法执行效率低下,而且在执行完后会产生内存碎片,碎片化很严重,那么大对象就在老年代中放不下(老年代要放大对象,因为如果小对象,首选是伊甸园区)

                                                2. 执行过程:

                                                  • 第一阶段和标记-清除算法一样,从根节点开始标记所有被引用的对象(在对象头中)
                                                  • 第二阶段将所有的存活对象压缩到内存的一段,按顺序排放
                                                  • 之后清理边界外所有的空间
                                                3. 标记-压缩算法的最终效果等同于标记-清除算法执行完成后,再进行一次内存碎片整理

                                                  二者的本质差异在于标记-清除算法是一种非移动式的回收算法,标记-压缩是移动式的,是否移动回收后的存活对象是一项优缺点并存的风险决策

                                                4. image-20210901163322093

                                                5. image-20210901163544154

                                                6. 分代收集算法,是基于:

                                                  不同的对象的生命周期是不一样的,因此,不同生命周期的对象可以采取不同的收集方式,以便提高回收效率

                                                  • 年轻代回收频繁,那么回收次数多,那么需要每一次的回收效率高,所以可以使用复制算法

                                                    复制算法的效率只和当前存活对象大小有关,因为存活对象少,所以使用复制算法效率高

                                                    而复制算法内存利用率不高的问题,通过两个幸存者区的设计解决

                                                  • 老年代回收不频繁,对象生命周期长

                                                    一般用标记-清除或者标记-清除、标记-压缩的混合实现

                                                  image-20210901173929090

                                                7. 增量收集算法

                                                  优点:

                                                  增量收集的算法仍是传统的标记-清除和复制算法,通过对线程间冲突的妥善处理,允许垃圾收集线程以分阶段的方式完成标记、清理或复制工作。

                                                  也就是垃圾收集线程和应用程序线程交替执行(所以能减少系统的停顿时间),依次反复,直到垃圾收集完成。

                                                  缺点:

                                                  线程切换和上下文转换的消耗使得垃圾回收的总体成本上升,造成系统吞吐量的下降。

                                                8. 分区算法

                                                  image-20210901175026625

                                                垃圾回收相关概念

                                                System.gc()的理解

                                                1. 通过System.gc()可以主动调用垃圾回收器进行垃圾回收,是full gc
                                                2. System.gc()触发的gc不一定马上执行,无法保证对垃圾收集器的调用
                                                3. System.runFinalization() // 强制调用失去引用的对象的finalize()方法

                                                内存溢出与内存泄漏

                                                1. 内存溢出

                                                  没有空闲内存,并且垃圾回收器也无法提供更多内存

                                                2. 在报OOM之前,通常会有一次GC的,GC之后还不够,才会报OOM

                                                  当然也不是任何情况都会有一次GC,例如分配一个超大对象,JVM可以判断出垃圾收集并不能解决这个问题,所以直接抛出OOM

                                                3. 内存泄漏

                                                  对象不会被用到了,但是GC又无法收集他们

                                                4. 尽管内存泄漏并不会立刻引起程序崩溃,但是一旦发生内存泄漏,程序中的可用内存就会被逐步蚕食,最终出现oom异常,导致程序崩溃

                                                5. 内存泄漏有可能导致内存溢出,但是不是一定导致内存溢出

                                                6. image-20210901203518311

                                                7. 内存泄漏举例:

                                                  • 单例模式,生命周期和应用程序一样长,所以单例程序中,如果持有对外部对象的引用的话,这个外部对象是不能够被回收的,则会导致内存泄漏的产生。
                                                  • 一些提供close的资源未关闭导致内存泄漏
                                                    • 数据库连接没有关闭
                                                    • 网络连接socket没有关闭
                                                    • io流没有关闭
                                                8. 上面说的都是狭义上的内存泄漏:即某个对象不用了,但是由于还有其它的对象的引用链接着它,所以导致回收不掉

                                                9. 广义上的内存泄漏,由于实践上的疏忽,导致某些对象生命周期变得很长,导致OOM,这也叫内存泄漏

                                                stop the world

                                                1. 指的是GC事件发生过程中,会产生应用程序的卡顿,卡顿的原因是GC发生时,Java用户线程会暂停

                                                2. 标记阶段的可达性算法,在枚举GC ROOTS的时候,会造成应用程序或者说用户线程的停顿

                                                  因为分析工作必须在一个能确保一致性的快照中进行,所以需要停顿

                                                  如果出现分析过程中,对象引用关系还在不停变化,则分析结果的准确性无法保证。

                                                3. 每次GC的时候都会出现STW

                                                4. STW事件和采用哪款GC无关,所有的GC都有这个事件

                                                5. CMS号称低延迟,仍然有STW事件,G1、ZGC垃圾回收器都有STW

                                                6. STW是JVM在后台自动发起和自动完成的,在用户不可见的情况下,把用户正常的工作线程全部停掉

                                                垃圾回收的并行与并发

                                                1. 并发与并行二者得对比

                                                  并发,指的是多个事情,在同一时间段内同时发生了,在同一时刻只有一个事情发生

                                                  并行,指的是多个事情,在同一时间点上同时发生了

                                                  并发的多个任务之间是互相抢占资源的

                                                  并行的多个任务之间是不互相抢占资源的

                                                  只有在多CPU或者一个CPU多核的情况下,才会发生并行

                                                  否则看似同时发生的事情,其实都是并发执行的。

                                                2. 在垃圾回收方面的并发与并行

                                                  并行:

                                                  指的多条垃圾收集线程并行工作,此时用户线程仍处于等待状态

                                                  image-20210901212509383

                                                  串行:

                                                  单个垃圾回收线程

                                                  程序暂停,启动垃圾回收器进行垃圾回收,回收完,再启动用户程序的线程(用户线程)

                                                3. 垃圾回收的并行和串行两种,对于用户线程和垃圾回收线程来说都是串行的,并行是说有多条垃圾回收线程同时执行,而不是说垃圾回收线程和用户线程并行

                                                  image-20210901212745465

                                                4. 垃圾回收的并发

                                                  指用户线程和垃圾回收线程同时执行。

                                                  这里的同时执行指的同一时间段内

                                                  垃圾回收线程在执行时不会停顿用户程序的执行,但是这里是一段时间内,在某一刻可能会出现STW,出现STW那么用户线程就是暂停的。

                                                安全点和安全区域

                                                1. 程序在执行的时候并非在所有的地方都可以停下来开始GC,只有在特定的位置才可以停下来GC,这些位置叫做安全点

                                                2. 安全点的选择很重要,如果太少可能导致GC等待的时间太长,如果太频繁可能导致运行时的性能问题。

                                                  选择一些执行时间较长的指令作为安全点,如方法调用、循环跳转和异常跳转等。(提高执行效率)

                                                3. 如何在GC发生时,检查所有线程都跑到最近的安全点停顿下来?

                                                  • 抢先式中断(目前没有虚拟机采用)
                                                  • 主动式中断:设置一个中断标志,各个线程运行到安全点时,主动轮询这个标志,如果中断标志为真,则将自己进行中断挂起
                                                4. 安全区域是指在一段代码片段中,对象的引用关系不会发生变化,在这个区域中的任何位置开始GC都是安全的。可以把安全区域看作被扩展的安全点。

                                                引用

                                                1. image-20210901214254559

                                                2. 强引用是默认的引用类型,普通系统99%以上都是强引用,也是最常见的。

                                                  强引用的对象是可触及的,垃圾回收器就永远不会回收掉被引用的对象。

                                                  强引用就是即使内存空间不足了,只要强引用还存在,那么就不应该被断掉,就报OOM

                                                  而软引用,在内存空间还足够的情况下,不会回收掉,但是系统内存空间不足了,就会把软引用的对象进行回收,这次回收之后,如果还是没有足够的内存,那么就报OOM

                                                  而弱引用,就是只要有垃圾回收,那么就回收掉这类引用

                                                  强引用是造成Java内存泄漏的主要原因之一,因为引用的存在,垃圾回收不能将不用的对象回收掉,所以造成内存泄漏

                                                3. image-20210902132700890

                                                4. 软引用、弱引用的对象都是可触及的对象

                                                  软引用用来描述一些还有用,但是非必须的对象,只被软引用关联着的对象,在系统发生内存溢出异常前,会把这些对象列进回收范围之中进行第二次回收(第一次回收是回收的不可触及的对象),如果这次回收还没有足够的内存,才会抛出OOM

                                                  OOM和软引用的对象没有关系,因为在OOM之前,内存不足,就要将软引用的对象回收掉,回收掉之后,内存还不够,报OOM,这个时候软引用的对象已经被回收掉了。

                                                  所以OOM是由强引用,无法被回收掉造成的

                                                  另外强应用还会造成内存泄漏

                                                5. 软引用、弱引用都非常适合来保存那些可有可无的缓存数据,系统内存不足时,这些缓存数据会被回收,不会导致内存溢出

                                                6. 内存---本地----网络(三级缓存)

                                                7. 弱引用是发现即回收,软引用是内存不足即回收

                                                8. WeakHashMap存的数据就是与弱引用关联的对象,在内存不足的时候可以及时进行回收

                                                9. 一个对象是否有虚引用的存在,完全不会决定对象的生命周期

                                                  如果一个对象仅有虚引用,那么它和没有引用几乎是一样的,随时都可能被垃圾回收器回收

                                                  无法通过虚引用获得被引用的对象。

                                                10. 设置虚引用的唯一目的是跟踪垃圾回收过程,比如能在这个对象被收集器回收掉时收到一个系统通知

                                                11. 软引用和弱引用都可以根据引用拿到对象,但是虚引用无法获得被引用的对象

                                                12. 一旦虚引用对象被回收,就会将此虚引用存放到引用队列中,可以从引用队列取出引用

                                                13. 终结器引用(了解)

                                                垃圾回收器

                                                GC分类与性能指标

                                                1. 串行回收与并行回收

                                                  串行回收是指只有单个垃圾回收线程,并行回收是指有多个垃圾回收线程同时工作

                                                2. 按照工作模式分

                                                  • 并发式回收:垃圾回收线程和用户线程交替工作(在一段时间内看起来就是用户线程和垃圾回收线程同时工作,在某一时刻仍然是只有一个线程在工作,这是并发的概念)
                                                  • 独占式回收:独占式垃圾回收器一旦运行,就停止应用程序中的所有用户线程,直到垃圾回收过程完全结束,有很明显的stw
                                                3. 按照碎片处理方式

                                                  • 压缩式垃圾回收器:对存活对象进行压缩整理,消除回收后的碎片,主要看底层用什么垃圾回收算法,标记压缩算法和复制算法都是属于压缩

                                                    用压缩方式收集垃圾后,再分配对象空间使用:指针碰撞

                                                  • 非压缩式垃圾回收器:回收后,再分配对象空间使用:空闲列表(维护空闲列表本身也需要内存)

                                                4. 按照工作的内存区间来分

                                                  • 年轻代垃圾回收器:比如说复制算法的垃圾回收
                                                  • 老年代垃圾回收器:标记清除算法或者 标记清除算法与标记压缩算法的混合算法
                                                5. 评估GC的性能指标

                                                  • 吞吐量:运行用户代码占总运行时间的比例: a / (a+b)

                                                    总运行时间:用户程序的运行时间a + 垃圾回收的时间b

                                                  • 暂停时间:stw的时间,垃圾回收线程工作时,用户线程暂停的时间

                                                  • 收集频率:回收操作发生的频率

                                                  • 内存占用:Java堆区所占的内存大小

                                                6. image-20210902143218566

                                                7. 高吞吐量和低暂停时间,是矛盾的,是一对相互竞争的目标

                                                  如果选择以吞吐量优先,那么必然需要降低内存回收的执行频率,但是这样会导致GC需要更长的暂停时间来执行内存回收

                                                不同的垃圾回收器概述

                                                1. image-20210902151132543

                                                2. CMS是第一款并发的垃圾回收器

                                                3. image-20210902151540079

                                                4. 新生代收集器:Serial、ParNew、Parallel Scavenge

                                                  老年代收集器 : Serial Old、CMS、 Parallel Old

                                                  整堆收集器:G1

                                                5. image-20210902151910504

                                                6. 为什么要有这么多垃圾回收器?一个不好吗?

                                                  针对不同的场景,提供不同的垃圾回收器,还可以将垃圾回收器搭配使用,提高垃圾回收的性能,我们只是根据场景选择最合适的垃圾回收器,没有最好的垃圾回收器

                                                Serial回收器:串行回收

                                                1. Serial收集器采用复制算法、串行回收和stop the world机制的方式执行内存回收

                                                2. 除了新生代之外,Serial收集器还提供用于执行老年代垃圾收集的Serial Old收集器

                                                  Serial Old收集器也是串行回收和stop the world机制,只不过内存回收算法使用的是标记-压缩算法。因为复制算法不适用于老年代垃圾收集,复制算法最重要的就是存活的对象需要较少,这样复制的效率才高,垃圾回收的效率才高。

                                                3. 这个收集器是一个单线程的收集器,但它的单线程的意义并不仅仅说明它只使用一个CPU或一个垃圾线程去工作,而且是说它在垃圾回收的时候必须暂停其他用户线程,即stw

                                                4. 对于交互较强的应用而言,这种垃圾收集器不能接受,Javaweb应用程序中是不会采用这种串行垃圾收集器的。

                                                ParNew回收器:并行回收

                                                1. 这是Serial GC的多线程版本
                                                2. 适合处理新生代的垃圾回收
                                                3. image-20210902161841951

                                                Parallel 回收器:吞吐量优先

                                                1. 这个回收器吞吐量优先,吞吐量是指用户线程执行时间占总时间的比例

                                                2. 年轻代使用Parallel Scavenge回收器,采用复制算法、并行回收和stop the world

                                                  和ParNew收集器一样

                                                3. ParNew收集器主要强调并行,Parallel收集器主要强调并行和吞吐量优先,并且Parallel收集器自成一派,G1收集器也是自成一派,所谓自成一派,是指收集器的底层框架和别的收集器不一样

                                                4. 垃圾回收的自适应调节策略,根据当前运行情况,进行性能监控,来调整吞吐量优先和低延迟优先,这也是Parallel和ParNew的区别

                                                5. 高吞吐量适合在后台运算不需要太多交互的任务,需要太多交互肯定是低延迟优先。

                                                6. Parallel Old收集器采用了标记-压缩算法,也是基于并行回收和stw机制

                                                CMS回收器:低延迟

                                                1. 第一款真正意义上的并发收集器,第一次实现了垃圾收集线程与用户线程同时工作

                                                2. 采用标记-清除算法(标记的不是垃圾,而是垃圾的反面,即存活的对象),也会stw

                                                3. 关注低延迟看重服务的响应速度,标记清除算法时间就是居中的,标记压缩算法时间是最多的,复制算法所需时间是最快的。

                                                4. CMS GC是老年代的GC,它不能和parallel gc工作,是因为他们的底层框架不一样

                                                5. G1是兼具并行与并发的特点。GMS GC在jdk14的时候被移除

                                                6. image-20210902164858170

                                                  image-20210902164912311

                                                  image-20210902164952610

                                                7. 目前所有的垃圾收集器都做不到完全不要stw

                                                8. 初始标记和重新标记这两个阶段需要stw,暂停工作线程

                                                  最耗时的并发标记与并发清除阶段都不需要暂停用户线程的工作,所以整体的回收是低延迟的。

                                                9. 由于在垃圾回收阶段用户线程没有中断(并发),所以在CMS回收过程中,还应该确保用户线程有足够的内存可用。所以不能像其他收集器那样等到老年代几乎被填满才收集,而是当堆内存使用率达到某一阈值时,便开始进行回收

                                                10. 采用的是标记-清除算法,所以再次为对象分配内存时,不能采用指针碰撞,因为内存不规整。

                                                11. image-20210902170033661

                                                G1回收器:区域化分代式

                                                1. 此回收器是分区的。

                                                2. G1的目标是在延迟可控(低延迟)的情况下获得尽可能高的吞吐量

                                                3. 任何一个垃圾回收器包括ZGC都有暂停时间,在可控的暂停时间内,使得吞吐量尽可能高

                                                4. G1是一个并行回收器(兼具并行与并发),把堆内存分割成很多不相关的区域(region),这些区域物理上是不连续的

                                                  使用不同的region来表示eden、s0区、s1区、老年代等

                                                  G1有计划地避免在整个Java堆中进行全区域的垃圾收集

                                                5. G1在后台维护一个优先列表(根据价值维护了一个列表),每次根据允许的收集时间优先回收价值最大的region

                                                  这种方式的侧重点在于回收垃圾最大量(回收价值最大的region)的区间

                                                  G1就是garbage-first,就是垃圾优先的意思,就是上面说的意思

                                                6. G1是一款面向服务端应用的垃圾收集器

                                                7. G1收集器在jdk9及以后取代了CMS回收器和parNew回收器的组合,还有parallel + parallel old的组合

                                                  CMS回收器在jdk9被标记为deprecated,在jdk14被remove

                                                8. G1回收器的优势:

                                                  1. 兼顾并行与并发

                                                    并行性:可以有多个GC线程同时工作(并行指的就是同一时刻,并发指的就是同一时间段内),有效利用多核计算能力

                                                    注意多个GC线程并行工作的时候,用户线程STW

                                                    并发性:G1部分工作可以和应用程序同时执行,因此不会在整个回收阶段发生完全阻塞用户线程的情况

                                                  2. 分代收集,和之前的各类回收器不同,它同时兼顾年轻代和老年代

                                                    • 新生代

                                                    • 老年代

                                                  3. 空间整合

                                                    在结构上不要求新生代、老年代这些结构是连续的,G1将堆空间分为了很多区域region,这些区域在物理上不是连续的,在逻辑上表示年轻代和老年代

                                                    image-20210902193300146

                                                    region之间,是复制算法,但整体上实际可看作标记-压缩算法

                                                    这两种算法都可以避免内存碎片,分配大对象时不会因为无法找到连续内存空间而提前触发下一次GC

                                                  4. 可预测的停顿时间模型

                                                    能让使用者明确指定在一个长度为M毫秒的时间片段内,消耗在垃圾收集上的时间不得超过N毫秒

                                                    选取部分region进行回收,既不是将新生代全部回收,也不是将老年代全部回收(正式因为了有了region这个概念,停顿时间才是可预测的

                                                    G1跟踪各个region的垃圾的价值大小(所谓价值是回收所获得的空间大小以及回收所需时间的经验值),在后台维护一个优先列表,优先回收价值最大的region

                                                9. G1无论是为了垃圾收集产生的内存占用还是程序运行时的额外执行负载都要比CMS高

                                                  从经验上来说,在小内存应用上CMS的表现大概率会优于G1,在大内存上则G1优势更大。平衡点在6-8GB之间

                                                10. G1 GC可以采用应用线程承担后台运行的GC工作,即当JVM的GC线程处理速度慢时,系统会调用应用程序线程帮助加速垃圾回收过程。

                                                11. region,化整为零的概念,为什么说暂停时间可预测,正是因为region的概念,并且有优先列表,指定时间之后,那么可以根据优先列表,选取部分region进行垃圾回收

                                                12. 所有的region大小相同,且在JVM生命周期内不会被改变

                                                  虽然还保留有新生代和老年代的概念,但新生代和老年代不再是物理上连续的了。

                                                13. 一个region有可能属于eden、survivor、老年代,但是一个region在一个时刻只可能属于一个角色

                                                14. G1垃圾收集器增加了一种新的内存区域,叫做humongous内存区域,简称H,主要存储大对象。如果超过1.5个region,那么就放到H区

                                                  如果一个H区装不下一个大对象,那么G1会寻找连续的H区来存储,为了能找到了连续的H区,有时候不得不启动full gc

                                                15. 为什么单独设置H区呢?

                                                  因为大对象默认放到老年代,但是有可能这个大对象的生命周期很短,用完之后,需要被及时回收,但是老年代的回收频率很低,所以会影响垃圾回收,宽泛意义上会造成内存泄漏,所以单独划分H区来存储大对象。(连续的H区,为了寻找到连续的H区,可能会触发full gc)

                                                16. G1垃圾回收过程主要包括以下三个环节

                                                  • 年轻代gc
                                                  • 老年代并发标记过程
                                                  • 混合回收

                                                  image-20210902205456500

                                                  有可能会出现full gc,比如设置最大暂停时间的时候,这个时间设置得很小,那么每次回收的region很少,随着内存占用越来越大,反而还会出现full gc,所以暂停时间并不是设置得越小越好

                                                  如果需要,单线程、独占式、高强度的full gc还是继续存在的,它针对GC的评估失败提供了一种失败保护机制,即强力回收

                                                17. G1垃圾回收过程

                                                  • 年轻代GC

                                                    和之前介绍的一样,Eden区用尽,触发minor gc,并且minor gc也会回收幸存者区,但是幸存者区满了则不会触发minor gc,minor gc时,g1 gc暂停所有用户线程,启动多线程并行执行年轻代回收

                                                    然后从年轻代区间移动存活对象到幸存者区或者老年代,或者两个区域都涉及(大对象放不进幸存者区,则会放入老年代)

                                                  • 老年代并发标记

                                                    这个过程,年轻代的垃圾回收也在进行

                                                    堆内存使用达到一定值(默认45%)时,开始老年代并发标记

                                                  • 混合回收过程

                                                    标记完成,开始混合回收过程

                                                    对于老年代的回收,G1 GC从老年代移动存活对象到空闲区间,那么这些空闲区间也成了新的老年代,因为是按照region来回收的。这里就和以前不一样,以前是老年代满了触发major gc或者full gc,那么是针对整个老年代,而这里是根据设置的暂停时间,从后台维护的region优先列表选择价值最大的老年代region进行回收,region间的回收算法是复制算法,是选择的部分老年代region而不是整个老年代,要注意区分,同时年轻代的回收也在进行,所以是混合回收

                                                  young gc 在以上三个环节全都出现

                                                18. 记忆集

                                                  image-20210902212337207

                                                19. 回收过程:

                                                  • 年轻代gc

                                                    image-20210902213607255

                                                  • 并发标记过程

                                                    image-20210902214136025

                                                  • 混合回收

                                                    image-20210902221152209

                                                20. 七种垃圾回收器比较

                                                  image-20210903140209591

                                                21. -XX:+PrintGC 只打印出垃圾回收的行为,不列举出堆空间的使用情况

                                                  -XX:+PrintGCDetails 会列举出堆空间的使用情况

                                                  full gc会回收新生代、老年代、永久代

                                                22. eden区和两个幸存者区,新生代大小显式的是eden区和一个幸存者区的大小的和,总是有一个幸存者区是空的,作为to区,显式的是新生代区可用的大小。

                                                23. ZGC与Shenandoah GC目标高度相似,在尽可能对吞吐量影响不大的前提下,实现在任意堆内存大小下都可以把垃圾收集的停顿时间限制在十毫秒以内的低延迟

                                                  ZGC几乎在所有地方都是并发执行的,除了初始标记是STW的,所以停顿时间几乎就耗在初始标记上,这部分实际时间是非常少的。

                                                Last Updated:
                                                Contributors: shailene
                                                - + diff --git a/java/JavaWeb/Javaweb.html b/java/JavaWeb/Javaweb.html index d26745bf..ccc9b231 100644 --- a/java/JavaWeb/Javaweb.html +++ b/java/JavaWeb/Javaweb.html @@ -23,7 +23,7 @@ } Java Web | shAilene - + @@ -405,6 +405,6 @@ IOUtils.copy(resourceAsStream, outputStream); }
                                            Last Updated:
                                            Contributors: shailene
                                          - + diff --git "a/java/Java\345\237\272\347\241\200/Java\347\254\224\350\256\260/Java\347\254\224\350\256\260.html" "b/java/Java\345\237\272\347\241\200/Java\347\254\224\350\256\260/Java\347\254\224\350\256\260.html" index b92895c6..2bc34cf8 100644 --- "a/java/Java\345\237\272\347\241\200/Java\347\254\224\350\256\260/Java\347\254\224\350\256\260.html" +++ "b/java/Java\345\237\272\347\241\200/Java\347\254\224\350\256\260/Java\347\254\224\350\256\260.html" @@ -23,7 +23,7 @@ } Java笔记 | shAilene - + @@ -1204,6 +1204,6 @@ } }

                                        注意

                                        1. StringBuffer、StringBuilder,底层char数组初始大小为16,如果底层需要扩容,是扩容为原来数组大小的2倍+2

                                        2. ArrayList底层使用Object数组存储,初始大小为10,如果扩容是扩容为原来数组大小的1.5倍

                                          LinkedList底层使用双向链表存储,不涉及到扩容

                                        3. 对于扩容来说,HashMap底层是Entry[]数组,数组的每一个位置是键值对链表,初始大小16,超过数组大小 * 加载因子,就会扩容为原来的2倍。

                                        4. 上面三点分别是char数组(jdk9开始就改为了byte数组),Object数组,Entry[]数组,可以这么来记,并且都有初始大小和扩容的倍数

                                        5. HashMap底层在jdk7及以前是数组 + 链表形式存储

                                          在jdk8及以后是数组 + 链表+ 红黑树形式存储

                                          new了一个HashMap对象之后,在堆空间中会有一个初始大小为16的Entry[] table 数组,这个数组的每一个位置,是链表,所以是数组 + 链表的形式,是这么来理解。说到HashMap的大小,当然是说的最外层的Entry[]数组的大小,每一个位置是Entry的链表,也就是键值对的链表

                                          当数组大小超过64,以及数组的某个位置上的元素以链表形式存储,且链表长度超过8,这时用红黑树存储

                                          一直往HashMap里put,当超过某个阈值时,会扩容,扩容是扩容成原来的2倍!

                                          这个阈值是Entry[]数组大小 * 加载因子。默认加载因子是0.75

                                          比如Entry[]数组大小是16,那么超过12时,就要扩容了,扩容为原来的2倍

                                        6. HashSet底层就是HashMap,是一样的。

                                        image-20210811173003995

                                        Last Updated:
                                        Contributors: shailene
                                    - + diff --git a/java/index.html b/java/index.html index 4fe5cdf8..107bb522 100644 --- a/java/index.html +++ b/java/index.html @@ -23,11 +23,11 @@ } shAilene - + - + diff --git "a/java/\345\210\206\345\270\203\345\274\217/RPC\346\241\206\346\236\266-dubbo/dubbo.html" "b/java/\345\210\206\345\270\203\345\274\217/RPC\346\241\206\346\236\266-dubbo/dubbo.html" index 8e9e3155..f5ddd894 100644 --- "a/java/\345\210\206\345\270\203\345\274\217/RPC\346\241\206\346\236\266-dubbo/dubbo.html" +++ "b/java/\345\210\206\345\270\203\345\274\217/RPC\346\241\206\346\236\266-dubbo/dubbo.html" @@ -23,7 +23,7 @@ } Dubbo | shAilene - + @@ -187,6 +187,6 @@ <dubbo:registry address="zookeeper://localhost:2181" /> </beans>
                                5. 定义使用者类,调用服务提供者的功能,这是一个远程调用。

                                第4章 监控中心

                                概述

                                1. 监控中心是dubbo框架提供好的一个web应用。

                                  是一个后台,收集dubbo服务提供者和消费者的信息。

                                2. 监控中心从注册中心收集服务提供者和消费者的信息。

                                步骤

                                • 下载dubbo-admin.war包
                                • 部署到tomcat服务器即容器中,发布。
                                • 启动。
                                • 进入http://localhost:8080/dubbo_admin_2_6_0_war/页面管理

                                监控中心能够获取到消费者和服务提供者的相关信息。

                                第5章 负载均衡

                                概述

                                1. 集群:

                                  集群是一种计算机系统,是一种服务器结构,分布式可以理解为一种思想。把一组计算机,包括硬件和软件组织在一个网络中,相互连接起来共同完成某个工作,对用户来说是一个整体,集群对用户来说是透明的。

                                2. 负载均衡:

                                  负载均衡是以集群为前提的,英文名为load balance,意思就是将负载(工作任务)进行平衡,分摊到多个操作单元上进行执行。

                                  对于网络应用而言,并不是一开始就需要负载均衡,当网络应用的访问量不断增长,单个处理单元无法满足负载需求的时候,网络应用流量将要出现瓶颈时,负载均衡才会起到作用。

                                  一般通过一个或者多个前端负载均衡器(负载均衡服务器),将工作负载分发到后端一组服务器上,从而达到整个系统的高性能和高可用性。

                                3. 负载均衡有两方面的含义:

                                  • 首先,单个重负载的工作分配到多台服务器做并行处理,每个服务器处理结束后,将结果汇总,返回给用户,系统处理能力得到大幅度提高。这是集群技术带来的优势。
                                  • 大量的并发访问或数据流量分担到多台服务器分别处理,减少用户等待响应的时间。每个访问分配给不同的服务器处理。(不可能一台服务器承受大量用户请求,所以要将用户请求分摊到多台服务器,这就是负载均衡。)
                                4. 负载均衡服务器很贵,成本高,中小型企业可以通过软件的方式实现负载均衡。

                                Dubbo负载均衡

                                概述

                                dubbo提供了多种负载均衡策略,缺省为random随机调用。

                                Ramdom LoadBalance

                                当请求提交给dubbo后,dubbo生成一个随机数,这个随机数对应于一个后台的服务器,通过这种方式做负载均衡,这也是dubbo框架默认的方式。

                                调用量越大,分布越均匀。

                                还可以调整请求发给某一个服务器的权重。

                                调用量大的时候,可以用这种方式。

                                RoundRobin LoadBalance

                                轮询。在后台多个服务器的性能差别大的时候会出现问题,性能慢的服务器积累的没处理的请求会随着时间越来越多。

                                后台的服务器的性能差不多的时候可以用这种方式,那么每台服务器处理的请求差不多,积累的没处理的请求也差不多。

                                LeastActive LoadBalance

                                最少活跃调用数,活跃数指调用前后技术差。比如1、2、3台服务器,每台在开始都分配了10个请求,1号处理了9个,差值为1,2号处理了5个,差值为5,3号处理了7个,差值为3,说明2号服务器的性能相对更弱。

                                在以后的请求分配中,分配给性能弱的服务器的请求会越少。

                                服务器的性能差异比较大的时候,可以用这种方式。

                                ConsistenceHash LoadBalance

                                image-20220108194148535

                                比如说1、2、3、4请求分给A服务器

                                5、6、7、8请求分给B服务器

                                9、10、11、12请求分给C服务器

                                当B服务器宕掉了之后,5、6分给A,7、8分给C。

                                让每个服务器接收到的请求仍然保持均衡,发生故障之后,对用户来说,波动小。因为会把请求均匀地分配给剩下的服务器

                                配置方式

                                1. image-20220108194925385
                                Last Updated:
                                Contributors: shailene
                                - + diff --git "a/java/\345\210\206\345\270\203\345\274\217/springcloud/springcloud\357\274\210\344\270\212\357\274\211.html" "b/java/\345\210\206\345\270\203\345\274\217/springcloud/springcloud\357\274\210\344\270\212\357\274\211.html" index b0c4fc63..fe640ae6 100644 --- "a/java/\345\210\206\345\270\203\345\274\217/springcloud/springcloud\357\274\210\344\270\212\357\274\211.html" +++ "b/java/\345\210\206\345\270\203\345\274\217/springcloud/springcloud\357\274\210\344\270\212\357\274\211.html" @@ -23,7 +23,7 @@ } SpringCloud上 | shAilene - + @@ -1312,6 +1312,6 @@ return result; }
                              熔断类型
                              1. 熔断打开--open

                                请求不再进行调用当前服务,内部设置时钟一般为MTTR(平均故障处理时间),当打开时长达到所设时钟则进入半熔断状态(half open)。

                              2. 熔断关闭--closed

                                熔断关闭,那么调用服务正常进行。

                              3. 熔断半开--half open

                                部分请求根据规则调用当前服务,如果请求成功且符合规则,则认为当前服务恢复正常,关闭熔断(closed)。

                              断路器
                              1. 打开或关闭的条件

                                • 时间窗口期内,请求总数必须达到,当失败率达到一定阈值的时候,断路器会开启。

                                • 断路器开启的时候,所有的请求都不会成功,都会去执行服务降级fallback。这就是服务熔断调用服务降级。

                                • 一段时间之后(默认是5秒),断路器会处于半开状态,进行保护性的调用,会让其中的一个请求进行转发,如果成功,断路器会关闭,到closed状态,如果失败,继续开启,然后重复这个过程。这就是服务熔断机制的链路恢复过程。

                              2. 断路器打开后,再有请求调用的时候,将不会调用主逻辑,而是直接调用服务降级方法fallback

                                原来的主逻辑如何恢复?

                                hystrix实现了自动恢复功能。当断路器打开,对服务进行了熔断之后,会进行一段时间,这段时间的逻辑都是降级逻辑,都不会进行主逻辑,因为服务被熔断了,链路处于open状态。这段时间之后,断路器处于半开状态,释放一次请求到原来的主逻辑上,如果此次请求正常返回,那么断路器继续闭合,主逻辑恢复,如果这次请求依然有问题,断路器继续进入打开状态。重复这个过程。

                              3. 可以把服务降级看作为服务熔断的一部分。服务熔断还有很重要的一点是有链路的恢复!服务熔断会调用服务降级。

                              Last Updated:
                              Contributors: shailene
                        - + diff --git "a/java/\345\210\206\345\270\203\345\274\217/springcloud/springcloud\357\274\210\344\270\213\357\274\211.html" "b/java/\345\210\206\345\270\203\345\274\217/springcloud/springcloud\357\274\210\344\270\213\357\274\211.html" index 115bc5f0..c8cfcc73 100644 --- "a/java/\345\210\206\345\270\203\345\274\217/springcloud/springcloud\357\274\210\344\270\213\357\274\211.html" +++ "b/java/\345\210\206\345\270\203\345\274\217/springcloud/springcloud\357\274\210\344\270\213\357\274\211.html" @@ -23,7 +23,7 @@ } spring cloud下 | shAilene - + @@ -844,6 +844,6 @@ }

                    image-20220429154831580

                4. 重要属性:

                  • value:资源名称:必需项

                  • blockHandler/blockHandlerClass:

                    blockHandler对应处理BlockException的函数名称,可选项。

                    blockHandler函数访问范围必须是public,返回类型需要与原业务方法相匹配,参数类型需要和原业务方法相匹配并且最后加一个额外的参数,类型为BlockException。blockHandler函数默认需要和原方法在同一个类中,若希望使用其他类的函数,则可以指定blockHandlerClass为对应的类class对象,注意对应的函数必须为static函数,否则无法解析。

                  • fallback:可选项,用于在抛出异常的时候提供fallback处理逻辑。fallback函数可以针对所有类型的异常(除了exceptionsToIgnore里面排除掉的异常类型)进行处理。

                    fallback函数签名和位置要求:

                    • 返回值类型必须和原业务方法返回值类型一致。
                    • 方法参数列表需要和原函数一致,或者可以额外多一个Throwable类型的参数用于接收对应的异常。
                    • fallback函数默认需要和原方法在同一个类中,若希望使用其他类的函数(使处理异常的代码和业务逻辑代码解耦合),则可以指定fallbackClass为对应的类的class对象,注意到对应的函数必须为staic函数,否则无法解析。

                服务熔断功能

                1. @SentinelResource的属性

                  • fallback管运行异常
                  • blockHandler管配置违规

                  若blockHandler和fallback都进行了配置,则被限流降级而抛出BlockException时只会进入blockHandler处理逻辑。

                2. 异常忽略

                  image-20220429164904026

                Last Updated:
                Contributors: shailene
          - + diff --git "a/java/\345\210\206\345\270\203\345\274\217/zookeeper/zookeeper.html" "b/java/\345\210\206\345\270\203\345\274\217/zookeeper/zookeeper.html" index 196b5ae0..44a272ca 100644 --- "a/java/\345\210\206\345\270\203\345\274\217/zookeeper/zookeeper.html" +++ "b/java/\345\210\206\345\270\203\345\274\217/zookeeper/zookeeper.html" @@ -23,11 +23,11 @@ } zookeeper | shAilene - +

          zookeeper

          概述

          1. 分布式:由多台服务器共同完成一件比较复杂的事,可以理解为分布式

            具体说:设计网站可扩展架构的核心思想是模块化,并在此基础上,降低模块间的耦合性,提高模块的复用性。

            所谓分布式业务系统,就是把原来一个大块系统,根据功能,拆分成多个独立的子系统,这些独立的子系统(模块)部署在独立的服务器(集群上),从物理上解耦合这些模块之间的关系,降低模块之间的耦合度,提高模块的复用性。

            这些子模块或者说子系统通过消息传递以及依赖调用的方式聚合成一个完整的系统。

          2. 什么是集群

            集群(cluster)是**一组(即多个)**计算机、服务器,他们作为一个整体向用户提供一组网络资源,这些单个的计算机或者服务器就是集群的节点。

          3. 分布式和集群的区别是什么?

            集群是个物理形态,分布式是个工作方式,也可以理解为一种思想。

            分布式:将一个业务拆分成多个子业务,每个业务部署在不同的服务器上

            集群:多个不同的服务器合起来构成一个cluster,并作为一个整体完成业务。

          分布式理论

          CAP

          1. 概述

            当我们的单个数据库的性能产生瓶颈的时候,我们可能会对数据库进行分区,这里所说的分区是指物理分区,分区之后可能不同的库就处于不同的服务器上了,也可以理解成分库,分库分区是一个意思,这个时候单个数据库的ACID已经不能适应这种情况了,而在这种集群环境下,再想保证进群的ACID几乎是很难达到,或者即使能达到,那么性能和效率也会大幅度下降,这个时候如果再追求集群的ACID会导致我们的系统变得很差,此时我们就需要引入一个新的理论原则来适应这种集群的情况,就是CAP原理

          2. CAP原理又被称作布鲁尔定理,它指出对于一个分布式系统来说,不能同时满足以下三点:(CAP原理针对的是分布式系统,而ACID针对的是持久化数据库)

            • 一致性(Consistence)

              一致性指的是多个数据副本是否能保持一致的特性,在一致性的条件下,系统在执行数据更新操作之后能够从一致性状态转移到另一个一致性状态

            • 可用性(Availability)

              可用性指的是分布式系统在面对各种异常时可以提供正常服务的能力

              在可用性条件下,要求系统提供的服务一直处于可用的状态,对于用户的每一个操作请求总是能够在有限的时间内返回结果。

            • 分区容错性(Partition tolerance)

              网络分区是指分布式系统中的节点,被划分为多个区域,每个区域内部可以通信,但是区域之间无法通信

              在分区容忍性条件下,分布式系统在遇到任何网络分区故障的时候仍然需要能对外提供一致性和可用性的服务,除非是整个网络环境都发生了故障。

          3. CAP仅适用于原子读写的NOSQL场景中,并不适用于数据库系统,现在的分布式系统具有更多特性,比如扩展性、可用性等等,在进行分布式系统搭建或者开发的时候,我们不应该仅仅局限于CAP特性上。

            分区容错性(Partition tolerance)我们是必须要实现的。

          BASE理论

          1. 在分布式系统中,我们往往追求的是可用性。Redis是CP,也就是一致性和分区容错性

          2. BASE理论是对CAP理论的进一步扩充

            BA:是指基本可用,Basically Available(基本可用)

            S:Soft-state(软状态)

            E:Eventually Consistent(最终一致性)

          3. BASE理论的核心思想:

            (Redis是CP,是一致性和分区容错性),而我们在设计分布式系统中,往往更加追求一些其他的特性,比如说扩展性,可用性,不应该只是局限于CAP,所以BASE理论作为CAP理论的扩展,来满足我们对分布式系统的设计理论

            核心思想:

            牺牲数据的一致性来满足系统的高可用性,系统中一部分数据不可用或不一致时,仍需要保持系统整体是主要可用的。

            从这里也可以看出这种场景,对于数据来说,不是强一致性的(因为我们追求高可用,而可用性和一致性在CAP原理下无法并存,那么在追求可用性的同时,就牺牲掉一致性),体现在软状态。

            针对数据库领域,BASE思想的主要实现是对业务数据进行拆分,不同数据分布在不同的机器上,以提升系统的可用性。(可以通过按照业务功能划分、也可以通过分片的形式,让数据散布在不同的服务器上。)

          4. BASE理论三要素

            • BA:基本可用

              基本可用是指分布式系统在出现不可预知故障的时候,允许损失部分可用性。但是,这绝不等价于系统不可用。

              • 响应时间上的损失:正常情况下,一个在线搜索引擎需要在0.5秒之内返回给用户相应的查询结果,但由于出现故障,查询结果的响应时间增加了1~2秒
              • 系统功能上的损失:正常情况下,在一个电子商务网站上进行购物的时候,消费者几乎能够顺利完成每一笔订单,但是在一些节日大促购物高峰的时候,由于消费者的购物行为激增,为了保护购物系统的稳定性,部分消费者可能会被引导到一个降级页面
            • S:软状态

              软状态指允许系统中的数据存在中间状态并认为该中间状态的存在不会影响系统的整体可用性,即允许系统在不同节点的数据副本之间进行数据同步的过程存在延时。

              牺牲掉数据的一致性,来追求可用性

            • E:最终一致性

              最终一致性强调的是系统中所有的数据副本,在经过一段时间的同步后,最终能够达到一个一致的状态。因此,最终一致性的本质是需要系统保证最终数据能够达到一致,而不需要实时保证系统数据的强一致性。

          Zookeeper入门

          概述

          1. zookeeper是一个开源的分布式的,为分布式框架提供协调服务的apache项目

          2. zookeeper从设计模式的角度来理解:是一个基于观察者模式设计的分布式服务管理框架,它负责存储和管理大家都关心的数据(比如服务器信息),然后接受观察者(客户端)的注册,一旦这些数据(服务器的信息)的状态发生变化,zookeeper就将负责通知已经在zookeeper上注册的那些观察者(客户端)做出相应的反应。

            zookeeper相当于是一个文件系统,加通知机制。

          3. zookeeper本身是一个集群,有多台服务器

            image-20211003203400587

          4. zookeeper:多台服务器,有一个领导者Leader,多个跟随着Follower组成的集群。

          5. 特点:

            • 集群中只要有半数以上节点存活,zookeeper集群就能正常服务,所以zookeeper适合安装奇数台服务器

            • 全局数据一致,每个server保存一份相同的数据副本,Client无论连接到哪个server,数据都是一致的。

            • 更新请求顺序执行,来自同一个client的更新请求按其发送顺序依次执行。

            • 数据更新原子性,一次数据更新要么成功,要么失败。

            • 实时性:在一定时间范围内,client能读到最新数据,有一个同步数据的过程

          6. zookeeper的数据结构

            zookeeper的数据模型的结构与unix文件系统很类似,整体上可以看作是一棵树,每个节点称作一个ZNode,每一个ZNode默认能够存储1MB的数据,每个ZNode都可以通过其路径唯一标识

          7. zookeeper应用场景

            • 统一命名服务

              在分布式环境下,经常需要对应用(服务)进行统一命名,便于识别

              例如:IP不容易记住,而域名容易记住。

              image-20211003204538685

              我们访问哪台服务器,zookeeper会根据负载情况进行一个分配

            • 统一配置管理

              分布式环境下,配置文件同步非常常见,一般要求一个集群中,所有节点的配置信息是一致的,比如kafka集群

              对配置文件修改后,希望能够快速同步到节点上。

              配置管理可交由zookeeper实现

              • 可将配置信息写入zookeeper上的一个znode
              • 各个客户端服务器监听这个znode
            • 统一集群管理

              分布式环境中,实时掌握每个节点的状态是必要的

              可根据节点实时状态做出一些调整

              • 可将节点信息写入zookeeper的一个znode
              • 监听这个znode可获取它的实时状态变化
            • 服务器节点动态上下线

            • 软负载均衡

              image-20211003205325088

          zookeeper配置

          1. image-20211006145100475

            • tickTime = 2000,通信心跳时间,zookeeper服务器与客户端心跳时间,单位毫秒

              服务器与服务器之间也可以进行心跳通讯,互相发送信号。

              image-20211006145844714

            • initLimit = 10, LF初始通信时限

              Leader和Follower初始连接时能容忍的最多心跳数

              如果超过 initLimit*tickTime还没有连接成功的话就认为连接失败

            • syncLimit = 5 LF同步通信时限

              Leader和Follower之间通信时间如果超过syncLimit * tickTime,Leader认为Follower死

              从服务器列表中删除Follower

            • dataDir:保存zookeeper中的数据

              注意:默认的tmp目录,容易被linux系统定期删除,所以一般不使用默认的tmp目录

            • clientPort=2181:客户端连接端口,通常不做修改

          2. zookeeper集群最少是三台

          zookeeper选举机制

          1. 第一次启动

            image-20211006152112242

            只要集群中已经有了Leader,后面启动的服务器不会因为myid大而当选Leader,因为如果集群中已经有了Leader,那么前面的服务器都不是LOOKING状态,所以不会更改选票信息,新启动的服务器仍然会将票投给自己,此时新启动的服务器就会少数服从多数,更改选票信息会之前的Leader服务器

          2. 相关概念:

            image-20211006152451588

          3. 非第一次启动

            image-20211006153042844

          zookeeper节点类型

          1. 持久:客户端和服务器端断开连接后,创建的节点不删除

            短暂:客户端和服务器端断开连接后,创建的节点自己删除

          2. 带序号:创建znode时设置顺序标识,znode名称后会附加一个值,顺序号是一个单调递增的计数器,由父节点维护

            注意:在分布式系统中,顺序号可以被用于为所有的事件进行全局排序,这样客户端可以通过顺序号推断事件的顺序

          zookeeper监听器原理

          1. 将zookeeper客户端去服务器端进行注册,注册说要监听哪一个节点数据的变化,zookeeper服务器端的对应节点数据如果发生变化了,就会通知客户端,这就是这个过程。

          2. 监听器原理

            • 首先要有一个main()线程
            • 在main线程中创建zookeeper客户端,这时就会创建两个线程,一个负责网络通信(connect),一个负责监听(listener)
            • 通过connect线程将注册的监听事件发送给zookeeper服务器
            • 在zookeeper服务器的注册监听器列表中将注册的监听事件添加到列表中
            • zookeeper服务器监听到有数据或路径变化,就会将这个消息发送给listener线程
          3. 常见的监听

            • 监听节点数据的变化

              get path [watch]

              注册一次,只能监听一次,想再次监听,需要再次注册

            • 监听子节点增减的变化

              ls path [watch]

              注册一次,只能监听一次,想再次监听,需要再次注册

          客户端向服务器端写数据流程

          1. 如果客户端直接访问Leader

            image-20211006171214463

            只要有半数的节点认为已经写完了,那么Leader就会告诉客户端即发送给客户端确认ack,说已经写完了。

          2. 如果客户端的写入请求发送给follower节点

            被访问的follower会把写请求发送给leader,leader来处理并写数据,自己先写一份,并且发写命令给follower节点,follower需要写并且再发送ack给leader,超过半数以上节点认为写完,那么leader会再发ack给客户端访问的follower节点,被访问的follower节点给客户端发ack

            image-20211006171630741

          服务器动态上下线监听

          1. 服务器启动时去注册信息(创建都是临时),在zookeeper上创建对应的节点

          2. 客户端获取到当前在线服务器列表,并且注册监听,就是监听器原理

          这里说的服务器和客户端对于zookeeper集群来说都是客户端,只不过服务器去调的zookeeper的创建节点方法,客户端去监听

          分布式锁

          原生zookeeper实现分布式锁方法

          1. 什么叫分布式锁

            比如说进程1在使用该资源的适合,会先去获得锁,进程1获得锁以后会对该资源保持独占,这样其他进程就无法访问该资源,进程1用完该资源以后就将锁释放掉,让其他进程来获得锁,那么通过这个锁机制,我们就保证了分布式系统中多个进程能够有序地访问该临界资源,我们把这个分布式环境下的锁叫做分布式锁。

          2. 步骤:

            • 在/lock目录下,创建临时顺序节点,序号最小的节点可以获得锁,处理业务

            • 节点需要判断自己是不是当前节点下序号最小的节点,如果是,获取到锁,如果不是,对前一个节点进行监听,监听这一步很重要,因为就是要监听到前一个节点的释放也就是删除,我们自己写的上锁这个过程才能完成!否则前一个节点没有释放,即没有删除,当前节点永远不可能完成上锁,这里要通过代码实现,可以通过CountDownLatch实现,当没有监听到前一个结点删除的适合,一直锁住,监听到前一个节点删除了,通过CountDownLatch释放锁,我们自己上锁的代码才完成。

              我们自己写的上锁这个方法, 可以通过CountDownLatch来控制流程,通过CountDownLatch的释放锁来使我们的方法执行完成。两者不要搞混。

            • 获取到锁,处理完业务后,delete节点释放锁,然后下面的节点将接收到通知,重复第二步判断。

            image-20211006180545474

          成熟的Curator框架实现分布式锁

          1. 原生地通过zookeeper和JavaAPI实现分布式锁存在的问题
            • 会话连接是异步的,需要自己去处理,比如使用CountDownLatch
            • watch需要重复注册,不然就不能生效
            • 不支持多节点的创建和删除,需要自己去递归
          2. Curator是一个专门解决分布式锁的框架,解决了原生JavaAPI开发分布式遇到的问题
          Last Updated:
          Contributors: shailene
          - + diff --git "a/java/\345\271\266\345\217\221\347\274\226\347\250\213/\345\271\266\345\217\221\347\274\226\347\250\213\347\232\204\350\211\272\346\234\257/\343\200\212\345\271\266\345\217\221\347\274\226\347\250\213\347\232\204\350\211\272\346\234\257\343\200\213\347\254\224\350\256\260.html" "b/java/\345\271\266\345\217\221\347\274\226\347\250\213/\345\271\266\345\217\221\347\274\226\347\250\213\347\232\204\350\211\272\346\234\257/\343\200\212\345\271\266\345\217\221\347\274\226\347\250\213\347\232\204\350\211\272\346\234\257\343\200\213\347\254\224\350\256\260.html" index 50a443a3..08576f59 100644 --- "a/java/\345\271\266\345\217\221\347\274\226\347\250\213/\345\271\266\345\217\221\347\274\226\347\250\213\347\232\204\350\211\272\346\234\257/\343\200\212\345\271\266\345\217\221\347\274\226\347\250\213\347\232\204\350\211\272\346\234\257\343\200\213\347\254\224\350\256\260.html" +++ "b/java/\345\271\266\345\217\221\347\274\226\347\250\213/\345\271\266\345\217\221\347\274\226\347\250\213\347\232\204\350\211\272\346\234\257/\343\200\212\345\271\266\345\217\221\347\274\226\347\250\213\347\232\204\350\211\272\346\234\257\343\200\213\347\254\224\350\256\260.html" @@ -23,11 +23,11 @@ } 第2章 Java并发机制的底层实现原理 | shAilene - +

          第2章 Java并发机制的底层实现原理

          锁的升级和对比

          偏向锁

          1. 偏向锁

            偏向锁的本质上是只有一个线程,这个线程在重复获得这个锁对象时(可重入),如果根据锁对象的对象头的运行时元数据mark word里记录的线程ID,发现锁对象已经记录了当前线程的线程ID,那么不会再通过CAS来操作加锁和解锁,减少了开销!

            如果有多个线程来竞争锁,那么会进行锁的升级,由偏向锁升级为轻量级锁。

          2. 偏向锁的撤销

            偏向锁使用了一种等到竞争出现才释放锁的机制,所以当有其他线程尝试竞争偏向锁时,持有偏向锁的线程才会释放锁,将对象头的锁标志位设置成无锁状态。

          轻量级锁

          1. 轻量级锁膨胀,升级成重量级锁,是在轻量级锁解锁阶段

            轻量级锁解锁时,会使用原子的CAS操作(这里是描述CAS这个操作是原子的,而Java原子类atom类的实现原理便是通过CAS),将因为轻量级锁而存储在栈帧的锁记录里的锁地址和标志位部分的mark word交换回去,即替换回对象头,如果成功,则表示没有竞争发生,如果失败,表示当前锁存在竞争,锁就会膨胀成重量级锁。

          2. Java原子类的原子操作是通过CAS实现的。

          volatile实现原理

          1. Lock前缀指令会引起处理器缓存回写到内存

          2. 一个处理器的缓存回写到内存会导致其他处理器的缓存行的数据无效

            处理器使用嗅探技术保证它的内部缓存、系统内存和其他处理器的缓存的数据在总线上保持一致。

            以上两条就是说的缓存锁。

          3. 缓存一致性协议:

            系统阻止同时修改由两个或以上处理器缓存的内存区域数据

          原子操作的实现原理

          总线锁和缓存锁

          1. 总线锁定

            所谓总线锁就是使用处理器提供的一个LOCK #信号,当该处理器在总线上输出此信号时,其他处理器的请求将被阻塞住,不能和内存进行通信,那么该处理器可以独占共享内存。

            在同一时刻,我们只需保证对某个内存地址的操作是原子性即可,但总线锁把处理器和内存之间的通信锁住了,这使得锁定期间,其他处理器不能操作其他内存的数据!!所以总线锁的开销很大,目前处理器在某些场景下使用缓存锁定代替总线锁定来进行优化。

            目前处理器都是锁缓存而不是锁总线。

          2. 缓存锁定

            所谓缓存锁定是指内存区域如果被缓存在处理器的缓存行(CPU高速缓存)中,并且在Lock操作期间被锁定,那么当它执行锁操作回写到内存时,不在总线上声言(输出)LOCK # 信号,即不执行总线锁定,而是修改内部的内存地址,当其他处理器回写已被锁定的缓存行数据时,会使缓存行无效,因为其他处理器经过嗅探在总线上传输的数据,发现自己缓存行里的数据在内存的地址已改变,说明数据已失效,就会将当前处理器的缓存行设置为无效状态。

            有两种情况下处理器不支持缓存锁定:

            • 处理器本身不支持。
            • 当操作的数据不能被缓存在处理器内部,或操作的数据跨多个缓存行时,则处理器会调用总线锁定。

          Java如何实现原子操作

          1. 使用CAS,不断自旋比较,直到成功为止。

            问题:

            • ABA问题---通过原子引用类的版本号机制来解决,在变量前面追加上版本号。

              AtomicStampedReference解决

            • 循环时间长,开销大

            • 只能保证一个共享变量的原子操作。

              当对一个共享变量执行操作时,我们可以通过自旋CAS来保证原子操作,但是对多个共享变量操作时,循环CAS无法保证原子性,这个时候可以用锁

              从JDK1.5开始,JDK提供了AtomicReference类来保证引用类型变量即对象的操作的原子性,我们就可以把多个变量放在一个对象里,然后进行CAS操作

          2. 使用锁。

            除了偏向锁,JVM实现锁的方式都用了循环CAS,即当一个线程想进入同步块的时候使用循环CAS的方式来获取锁,当它退出同步块的时候,使用循环CAS来释放锁。比如轻量级锁就通过CAS的方式去将对象的mark word交换到锁记录的锁地址部分,将锁记录的锁地址部分移到锁对象的mark word

          第3章 Java内存模型

          Java内存模型的基础

          通信和同步

          1. 线程之间的通信和线程之间的同步是两个问题。

            通信是指线程之间以何种机制来交换信息。

            同步是指程序中用于控制不同线程之间操作发生相对顺序的机制。

            通信强调线程间交换信息,同步强调线程间的操作执行顺序。

          2. 在命令式编程中,线程之间的通信机制有两种:共享内存和消息传递。

          3. 在共享内存的并发模型里,线程间的通信是隐式的,线程间的同步是显式的。

            在消息传递的并发模型里,线程间的通信是显式的,线程间的同步是隐式的。

            Java的并发采用的是共享内存的模型,Java线程之间的通信总是隐式进行的,整个通信过程对程序员完全透明。

          Java内存模型的抽象结构

          1. Java线程之间的通信由Java内存模型JMM控制,JMM决定一个线程对共享变量的写入何时对另一个线程可见。

            线程之间的共享变量存储在主内存中,每个线程都有一个私有的本地内存,也叫工作内存,是线程私有的,并且本地内存是抽象的概念,并不真实存在。

            JVM中的运行时数据区的堆空间就是共享内存,是线程间共享的,所以说Java的并发模型是共享内存模型。所以主存不能说是抽象的。

            JMM通过控制主内存与每个线程的本地内存之间的交互,来提供各线程对于共享变量的可见性。

          指令重排序

          1. 在执行程序时,为了提高性能,编译器和处理器常常会对指令做重排序。

            重排序分3种类型:

            • 编译器优化的重排序

            • 指令级并行的重排序

              现代处理器采用了指令级并行技术,来讲多条指令重叠执行,如果不存在数据依赖性,处理器可以改变语句对应机器指令的执行顺序

            • 内存系统的重排序

            上述的第一种属于编译器重排序,第二种和第三种属于处理器重排序。

          2. 这些重排序可能导致多线程程序出现内存可见性问题。

            对于处理器重排序,JMM的处理器重排序规则要求Java编译器在生成指令序列的时候,插入特定类型的内存屏障指令,通过内存屏障指令来禁止特定类型的处理器重排序。

            插入内存屏障的目的是禁止指令重排序,来解决共享变量内存可见性的问题。

          3. 写缓冲区就是线程的本地内存或者说工作内存

          4. 指令重排序可能会改变多线程环境下的程序的执行结果。

            由于指令重排序,会出现多个线程对共享变量的可见性问题。

          happens-before

          1. JMM使用happens-before的概念,来阐述操作之间的内存可见性

            JMM中,如果一个操作执行的结果要对另一个操作可见,那么这两个操作之间必须要存在happens-before关系。这里提到的两个操作,可以是同一个线程内的操作,也可以是两个线程之间的。

            happens-before解决的是操作执行的结果可见性的问题!!

          2. 两个操作之间具有happens-before关系,并不意味着前一个操作的执行必须在后一个操作之前,happens-before仅仅要求钱一个操作执行的结果对后一个操作是可见的,且前一个操作按顺序排在后一个操作之前。

          3. happens-before规则:

            • 程序顺序规则

              一个线程中的每个操作(这里说的是单线程,并且说的是字节码指令层面的),happens-before这个线程中的任意后续操作

            • 监视器锁规则

              对一个锁的解锁,happens-before随后对这个锁的上锁

            • volatile规则

              对一个volatile变量的写,happens-before任意后续对这个volatile变量的读。这里涉及到前面说的内存屏障,作用是禁止指令重排序,保证共享变量对于各个线程的可见性!!重点在于通过内存屏障,将线程本地内存的数据同步到主内存即共享内存。

            • 传递规则

          as-if-serial

          1. 意思是不管怎么执行指令重排序,单线程的执行结果不能被改变。

          顺序一致性

          顺序一致性内存模型

          1. 这是一个理想化的理论参考模型,有以下两点特征

            • 一个线程中的所有操作必须按照程序的顺序来执行
            • 不管程序是否同步,所有线程都只能看到一个单一的操作执行顺序。
          2. 在JMM中,没有以上两点保证,对于未同步程序来说,不仅整体执行顺序是无序的,而且所有线程看到的操作执行顺序也可能不一致。

          3. 若是未同步程序:

            • 对于单线程,在顺序一致性模型中,可以确定程序执行顺序,在JMM中,可能出现指令重排序。
            • 顺序一致性模型能保证所有线程看到一致的程序执行顺序,尽管他们未同步,而JMM不行。
          Last Updated:
          Contributors: shailene
          - + diff --git "a/java/\345\271\266\345\217\221\347\274\226\347\250\213/\345\271\266\345\217\221\347\274\226\347\250\213\347\254\224\350\256\260/\345\271\266\345\217\221\347\274\226\347\250\213.html" "b/java/\345\271\266\345\217\221\347\274\226\347\250\213/\345\271\266\345\217\221\347\274\226\347\250\213\347\254\224\350\256\260/\345\271\266\345\217\221\347\274\226\347\250\213.html" index d00eab53..bb4143be 100644 --- "a/java/\345\271\266\345\217\221\347\274\226\347\250\213/\345\271\266\345\217\221\347\274\226\347\250\213\347\254\224\350\256\260/\345\271\266\345\217\221\347\274\226\347\250\213.html" +++ "b/java/\345\271\266\345\217\221\347\274\226\347\250\213/\345\271\266\345\217\221\347\274\226\347\250\213\347\254\224\350\256\260/\345\271\266\345\217\221\347\274\226\347\250\213.html" @@ -23,11 +23,11 @@ } 并发编程 | shAilene - + -

          并发编程

          进程与线程

          进程

          1. 当一个程序被运行,从磁盘加载这个程序的代码到内存,这就开启了一个进程

            进程是活动的,程序已经被CPU执行了,这就是进程

            程序是静态的,进程是动态的。

          线程

          1. 一个进程之内可以分为一到多个线程,可以认为一个进程是由多个线程组成的。
          2. 一个线程就是一个指令流,将指令流中的一条条指令以一定的顺序交给CPU执行
          3. Java中,线程作为最小的调度单位,进程作为资源分配的最小单位

          二者对比

          1. 进程基本上相互独立,而线程存在于进程内,是进程的一个子集

          2. 进程拥有共享的资源,供内部的线程共享

          3. 不同计算机之间的进程通信,比如客户端和服务器之间的通信,需要遵循共同的协议,如HTTP

            浏览器是一个进程,服务器是tomcat,他们之间的通信需要遵循http

          4. 上下文切换,就是一个任务暂停与继续的这个过程(一个任务从保存到再加载的过程)

          并行与并发

          1. 单核CPU下,线程实际还是串行执行的,只是由于CPU在线程间的切换非常快,所以感觉是并行的,总结就是微观串行,宏观并行

            一般将这种线程轮流执行的,线程轮流使用CPU的做法称为并发

            image-20210904170008584

          2. CPU多核才可以并行

            image-20210904170145964

            每个核心都可以处理一个线程的指令,只要有多个核心,那么就可以同时执行。

          3. 更多的时候是既有并发也有并行

            线程数比核心数多的时候,就是并发和并行都存在

          4. 并不是多线程执行的效率一定比单线程高

            因为有上下文切换、死锁、资源限制

          5. 并发就是同一时间应对多件事情的能力

            并行就是同一时间动手做多件事情的能力

          6. 既有并发又有并行是最常见的场景

          7. 同步:

            从方法调用的角度

            • 如果需要等待结果返回,才能继续运行,就是同步
            • 不需要等待结果返回,就能继续运行,这是异步
          8. 多线程可以让方法执行变为异步的,不需要干等着上一个方法的结果返回

            多个线程同时执行,所以才有线程安全问题,线程之间相互抢占资源

          9. 比如在项目中,视频文件格式转换比较费时,这时新开一个线程处理视频转换,避免阻塞主线程。

          10. 多线程可以充分利用多核,做到并行执行!

            单核CPU同样可以执行多线程,这就是并发,多个线程同时抢占同一份CPU资源。

            image-20210904171814442

          11. 单核是并发,在微观上是串行执行的。

            单核CPU也可以多线程,但是微观上串行,宏观上并行,并不能提高效率,多核CPU才能提高效率,单核时仍然是轮流执行

            而且还可能有死锁、资源限制、上下文切换的影响,导致多线程的执行效率并不一定就比单线程高。

            单核CPU即使用了多线程也没有办法提高效率,因为在微观上是串行的。

            单核CPU用多线程反而比单线程慢,而不是执行时间相等,因为多线程涉及到上下文切换。

            总结:多核CPU用多线程可以做到并行,可以提高执行效率,而单核CPU执行多线程,在微观上串行,并且有上下文切换,反而不能提高执行效率

          12. 并不是说单核CPU下,多线程没有意义

            多核CPU可以并行跑多个线程,但能否提高效率还是要分情况

          Java线程

          创建线程

          1. 使用Runnable接口,对比直接继承Thread的方式,改变的地方是:把任务和线程分离了,而继承Thread的方式,声明Thread对象是和任务在一起的。

          2. 如果一个接口,只有一个抽象方法,那么可以用lambda表达式来简化,接口用FunctionalInterface来修饰,如果一个接口有多个抽象方法是没法用lambda表达式来简化的。

          3. 原理之Thread和Runnable的关系

            • Thread是把线程和任务合并在了一起

              Runnable是把线程和任务分开了

            • 用Runnable更容易与线程池等高级API配合

            • 用Runnable让任务脱离了Thread继承体系,没有单继承的局限性,更灵活

          4. 用FutureTask配合Callable接口和Thread的方式创建线程

            FutureTask能够接收Callable类型的参数,用来处理有返回结果的情况

          5. Callable接口和Runnable接口的差别:

            Callable里的call()方法可以抛出异常,而且比Runnable接口里的run()方法多了一个返回值

          6. 底层是多核来对多线程进行并行的处理还是由一个单核CPU来对多线程进行并发的执行,采用时间片轮转的方式,这是我们控制不了的,是由底层的任务调度器来决定的。

          线程运行的原理

          1. JVM的虚拟机栈、本地方法栈和程序计数器是线程独有的

            虚拟机启动后,虚拟机就会为线程分配一块栈内存

          2. 每个栈由多个栈帧组成,对应着每次方法调用时所占用的内存

            一个栈帧对应着一个方法调用

            每个线程只能有一个活动栈帧,对应着当前正在执行的那个方法。

          3. 一个方法调用完毕后,即返回后,那个方法调用对应的栈帧就没有了,对应的栈帧的内存就被释放掉了,没有垃圾回收,但是存在栈溢出

            PC是两样都没有,而虚拟机栈和本地方法栈是存在栈溢出,但是没有垃圾回收,堆空间和方法区是存在OOM,也有垃圾回收机制

          4. 栈帧里有局部变量表,操作数栈,方法返回地址,动态链接,一些附加信息

          5. 每个线程拥有独立的虚拟机栈

          线程的上下文切换

          1. 线程的上下文切换,是指一个线程暂停,然后恢复执行,这是一次上下文切换
          2. 以下一些原因触发线程的上下文切换(即线程暂停就会出现上下文切换):
            • 线程的CPU时间片用完
            • 垃圾回收(用户线程暂停(stw),垃圾回收线程工作)
            • 有更高优先级的线程需要运行
            • 线程自己调用了sleep 、wait、join、yield等方法
          3. sleep和wait方法都可以使调用方法的线程进入阻塞状态,但是sleep不会释放同步监视器锁,而wait会释放同步监视器锁,而且sleep可以在任何地方调用,但是wait方法只能在同步代码块内或同步方法内调用
          4. 当上下文切换发生时,操作系统需要保存当前线程的状态,并恢复另一个线程的状态,Java中对应的概念就是程序计数器,左边是指令地址(偏移地址),右边是字节码指令,作用就是记住下一条JVM需要执行的字节码指令的指令地址。
          5. 频繁的上下文切换会影响性能,而且考虑到死锁、资源限制,并不是线程数越多越好

          start()与run()

          1. start()表示启动线程,run()表示线程启动后要执行的代码

            不能直接调用run(),因为线程没有启动,还是只有一个线程即主线程

            调用start()方法后,线程会进入就绪状态,等待CPU分配时间片即资源,就可以运行了,就绪状态和运行状态在Java里都称为RUNNABLE状态

          2. 直接调用run是在主线程中执行了run,没有启动新的线程

          3. 使用start是启动新的线程,通过新的线程间接执行run中的代码

          sleep()与yield()

          1. 调用sleep会让当前线程从Runnable进入到Timed Waiting状态(阻塞,或者说一个有时限的等待过程)

          2. 其他线程可以使用interrupt方法打断正在睡眠的线程,这是睡眠的线程会抛出InterruptedException

          3. sleep()方法写在哪个线程中,就让哪个线程睡眠,对当前线程进行睡眠操作

          4. 睡眠结束后的线程未必会立刻得到执行,也要重新等待直到得到cpu时间片分配

          5. 调用yield会让当前线程从Running进入Runnable就绪状态,然后调度执行其他线程

            具体的实现依赖于操作系统的任务调度器

          线程优先级

          1. 线程优先级会提示任务调度器优先调度该线程,但是它仅仅是一个提示,但是调度器可以忽略它。

            如果CPU比较忙,那么优先级较高的线程会获得更多的时间片,但CPU闲时,优先级几乎没有作用

          2. sleep和wait的差别

            • sleep()方法适用于无需同步锁的场景,可以应用在任何地方,而wait()则需要在同步方法或同步代码块中使用
            • sleep()和wait()都是使线程进入阻塞状态,sleep使线程进入timed waiting状态,即一个有时限的等待过程,而调用wait()的线程则需要唤醒
            • 如果两个方法都使用在同步代码块或同步方法中,sleep()不会释放同步监视器,而wait()会释放同步监视器
            • Thread类中声明sleep()方法, Object类中声明wait()
          3. 实现Runnable接口,首先避免了继承Thread类的单继承的局限性。

            并且将线程和任务分开来

          4. 实现Runnable接口和实现Callable接口的区别

            • 一个重写run(),一个重写call()

            • call()方法有返回值,并且返回值可以带泛型,而run()方法不能有返回值

            • run()方法内部有异常的话不能抛出,只能通过try-catch进行处理,但是call()方法内部有异常,可以将异常抛出

            • 实现Callable接口要配合FutureTask使用,比如获取返回值

              // FutureTask的实例化对象的get()方法的返回值即为FutureTask构造器Callable对象的实现类所重写的call()方法的返回值

          5. join()是等待调用join方法的线程运行结束

          6. sleep() 、join()、wait(),suspend()、等待同步锁这五种情况可以让线程从运行状态到阻塞状态。

          interrupt方法

          1. 线程在sleep时,被interrupt打断,会置打断标记为false

            即打断sleep的线程,会清空打断状态

            打断正常运行的线程,不会清空打断状态

            打断park线程,不会清空打断状态

            不会清空打断状态,即打断标记为真

          主线程和守护线程

          1. 有一种特殊的线程叫做守护线程,只要其他非守护线程运行结束了,即时守护线程的代码没有执行完,也会强制结束。
          2. 垃圾回收器线程就是一种守护线程。

          六种状态

          1. NEW ,线程刚被创建,但是还没有调用start()方法

            RUNNABLE当调用了start()方法之后,线程就是RUNNABLE状态,运行状态和就绪状态都是RUNNABLE状态

            从线程的生命周期图来看,是区分了就绪状态和运行状态。比如调用yield方法,会从运行状态到就绪状态。

          2. NEW RUNNABLE BLOCKED WAITING TIMED_WAITING TERMINATED

          3. BLOCKED WAITING TIMED_WAITING 这三种状态,是Java层面的阻塞

            比如sleep()对应就是进入TIMED_WAITING状态

            join(),就是进入WAITING状态

          4. join()是等待调用join()的线程运行结束!

            哪个线程去调用join(),那么这个线程还在运行中!别的线程必须等待调用join的这个线程运行结束才可以运行

            不要认为谁调用join(),谁就进入WAITING状态了

          共享模型之管程

          1. 多个线程共享内存中的资源会造成安全隐患

            如果是多核CPU,那么多个线程并行执行,如果访问内存中的同一个资源,由于线程都是做的不同的任务,肯定会出现安全问题,即结果不确定

            如果是单核CPU,采用的是时间片轮转的方式,**那么线程间仍然是可能访问同一个资源,仍然可能出现线程安全问题。**比如两个线程交替执行,采用时间片轮转的方式,但是他们每次执行都去访问一个静态变量,这个静态变量属于类的结构,随着类的加载而加载,属于共享资源,他们会出现线程安全问题。

            总结:多个线程只要访问的是同一块资源,就可能出现线程安全问题,必须采取相应的措施。

          2. 也就是说多个线程并行执行,去访问同一个资源,会造成线程安全问题。

            单核CPU,多个线程交替执行,由于上下文切换,造成的指令交错,这多个线程又访问同一个资源,出现线程安全问题。

          3. 一个程序运行多个线程本身是没有问题的

            问题出在多个线程访问共享资源

            多个线程读取共享资源其实也没有问题

            在多个线程对共享资源进行读写操作时,发生了指令交错,就会出现问题

          4. 一段代码块内,如果存在对共享资源的多线程读写操作,称这段代码块为临界区

          5. 竞态条件

            多个线程在临界区内执行,由于代码的执行序列不同而导致结果无法预测,称为发生了竞态条件

          synchronized解决方案

          1. 为了避免临界区的竞态条件发生

            阻塞式的解决方案:synchronized,Lock

            非阻塞式的解决方案:原子变量

          2. synchronized俗称对象锁,它会采用互斥的方式让同一时刻至多只有一个线程能持有对象锁。其他线程再想获取这个对象锁时就会阻塞住。

            sleep() join() 等待同步锁 wait() suspend()

            这几种会让线程从运行态到阻塞态。

            这里说的就是等待同步锁。

            一个线程需要某个资源才能执行,这里锁就是这个资源,但是获取不到这个资源,那么这个线程会进入阻塞状态。

          3. synchronized能保证拥有锁的线程可以安全地执行临界区内的代码,不用担心线程上下文切换。

            因为只要这个线程不释放监视器,其他线程就无法执行这块代码

          4. 采用继承Thread的方式创建的线程,要注意同步监视器要使用类的对象,避免直接使用线程对象,因为要保证使用的同步监视器是唯一的。所以这种情况下不能用this

          5. 不要错误理解为拥有锁的线程就能一直执行下去,因为这个线程可能会时间片用完,但是即时这个线程的时间片用完,只要它没有释放锁,其他线程仍然进不来这块代码。只有等这个线程下一次分配到时间片,才会继续进去执行。

          6. 阻塞的线程被唤醒之后也不是说就可以立即执行了,仍然要等CPU分配时间片给这个线程。

            总之线程想要执行某一段代码,除了CPU需要分配给这个线程时间片,还要这段代码的锁(这里讨论的是同步监视器锁的情况),如果获取不到锁,就相当于获取不到资源,那么就会被阻塞。

            线程需要获取到资源才能执行某段代码,如果一直获取不到资源,那么就会被阻塞。当线程执行这段代码需要的资源被释放后,那么这个线程从阻塞态被唤醒,也不能马上执行,而是进入就绪状态,等待CPU分配时间片给这个线程。

          7. synchronized实际是用对象锁保证了临界区内代码的原子性,临界区内的代码执行不会被线程切换所打断。

            比如说某个线程拥有某段代码的锁,即时这个线程时间片用完,只要它没有释放锁,其他线程仍然不能进来执行这段代码,这段代码只有等CPU下一次分配时间片给这个线程,才可以继续执行。

            但千万不要理解为一个线程拥有某段代码的锁,就可以一直执行下去,中间仍然有时间片用完的过程,仍然存在上下文切换,但是被锁住的这段代码保证了原子性。

            **即时发生了上下文切换,这段代码也不会让其他没有拥有锁的线程来执行。**只有等这个拥有锁的线程下一次分配到时间片

          8. 再一次说明了即使是单核CPU通过时间片轮转的方式交替执行线程,仍然会出现线程安全问题,不要以为在微观上是串行的,实际没有线程同一时刻去操作同一个资源,就不会存在线程安全问题,关键在于时间片会用完,结果没保存的情况下,某个资源又被另一个线程去执行。关键在于多个线程操作共享数据,即时他们不是在同一时刻操作共享数据,而是在多个时间段操作共享数据,仍然会出现线程安全问题。因为上下文切换,发生指令交错

          9. 操作共享数据的代码,即为需要被同步的代码

            共享数据:多个线程共同操作的变量。

          变量的线程安全分析

          1. 成员变量和静态变量

            • 如果他们没有被共享,则线程安全
            • 如果他们被共享
              • 如果只有读操作,则线程安全
              • 如果有读写操作,则这段代码是临界区,需要考虑线程安全问题
          2. 局部变量是线程安全的

            局部变量是在栈的栈帧里。栈是线程私有的,所以局部变量是线程安全的

            局部变量引用的对象:

            • 如果该对象没有逃离方法的作用范围,它是线程安全的
            • 如果该对象逃离方法的作用范围,需要考虑线程安全
          3. i++虽然在字节码指令层面,分为好几条字节码指令,不是原子操作,但是这几条字节码指令不被线程所共享。

          Monitor概念

          1. Java对象在堆空间中被实例化以后,主要分为两部分

            • 对象头

              • 运行时元数据(Mark Word)----hashcode,分代年龄(从幸存者区到老年代),偏向锁,加锁状态
              • 类型指针---指向方法区中这个对象的类的信息,通过这个指针可以找到类对象
              • (如果是数组,还有数组的长度的信息)

              image-20210906143610290

              运行时元数据Mark Word格式:

              image-20210906171812809

            • 实例数据(真正的有效数据,成员变量等等)

          2. 包装类型比基本类型占用的空间大。从对象头的角度就可以看出来。

          3. Monitor是非常重要的概念,也是Synchronized锁底层的原理。

            Monitor被翻译为监视器或管程

          4. 每个Java对象都可以关联一个Monitor对象,如果使用synchronized给对象上锁(重量级)之后,该对象头的Mark Word中就被设置指向Monitor对象的指针。

          5. synchronized上锁给代码块上锁,或者采用同步方法的方式,底层原理都是给对象上锁。

            image-20210906144113619

          6. 一个对象在堆空间中分为对象头和实例数据

            对象头里有运行时元数据(Mark Word)和类型指针,如果是数组还有数组的长度信息,在运行时元数据里就有hashcode,分代年龄,偏向锁和加锁状态的信息。

            给一个对象上锁之后,这个Java对象的对象头的运行时元数据(Mark Word)就指向(关联)一个Monitor对象。运行时元数据里存储了一个指向Monitor的地址指针

          7. Monitor里的属性

            • Owner,是锁的所有者

              Monitor的这个Owner只能有一个所有者。

            • EntryList,是等待队列

              比如当前Monitor的Owner,即拥有当前这个Monitor的线程是Thread1,那么当Thread2来判断是否可以访问这段临界代码时,首先判断这个锁对象obj的运行时元数据(Mark Word)有没有指向Monitor的指针,即有没有关联一个Monitor对象,如果有,再判断这个Monitor的Owner有没有所有者,如果有的话,就进入EntryList等待队列(或者叫阻塞状态),那么这个Thread2本身进入阻塞状态(BLOCKED),等待其他线程释放对Monitor的所有权。

              如果此时又有一个线程来了,也要来执行这段临界代码,首先发现obj关联了Monitor对象,然后Owner有主人,也进入EntryList阻塞队列,那么该线程,从运行状态也进入阻塞状态(BLOCKED)

              当一个线程需要某样资源继续执行的时候,但是又获取不到这样资源,那么会进入阻塞状态。

              上面说的线程进入阻塞状态的情况,是等待同步锁,然后进入阻塞状态。

              一个线程从运行状态进入阻塞状态,有以下五种情况

              • join()---由RUNNABLE到WAITING
              • sleep()----由RUNNABLE 到 TIMED_WAITING
              • wait()---由RUNNABLE到WAITING
              • suspend() (已经deprecated)
              • 等待同步锁---由RUNNABLE到BLOCKED

              BLOCKED, WAITING, TIMED_WATING三种状态在Java的线程状态这个角度来说,都叫阻塞状态

              image-20210906145616412

          8. 对synchronized对代码块或方法上锁的原理描述

            • 刚开始Monitor中Owner为null
            • 当Thread-2执行synchronized(obj)就会将Monitor的所有者Owner置为Thread-2,Monitor中只能有一个Owner
            • 在Thread-2上锁的过程中,如果Thread-3,Thread-4,Thread-5也来执行synchronized(obj),就会进入EntryList 由运行态到BLOCKED
            • Thread-2执行完同步代码块的内容,即临界区的代码,然后唤醒EntryList中等待的线程来竞争锁,竞争的时候是非公平的。
          9. JVM基于进入和退出Monitor对象来实现同步方法和同步代码块

            但两者的实现细节不一样,代码块同步是使用monitorenter和monitorexit字节码指令实现的,而方法同步是使用另外一种方式实现的,细节在JVM规范里并没有详细说明,但是,方法的同步同样可以使用这两个指令来实现。

            monitorenter指令是在编译后插入到同步代码块的开始位置,而monitorexit是插入到方法结束处和异常处

            JVM要保证每个monitorenter必须有对应的monitorexit与之配对。

            任何对象都有一个monitor与之关联,当且一个monitor被持有后,它将处于锁定状态,线程执行到monitorenter字节码指令时,将会尝试获取上锁对象所对应的monitor的所有权,即尝试获得对象的锁

          10. synchronized必须是进入同一个对象的monitor才有效果,所以一定要保证同步监视器只有一个。

          synchronized进阶原理

          1. synchronized工作方式是让对象关联monitor对象,但是monitor这个锁是由操作系统提供的,使用Monitor成本比较高,如果每次进入synchronized(xxx)都要获取Monitor锁,对程序运行的性能是有影响的。

          2. 从Java6对synchronized关键字获取锁的方式进行了改进和优化。

            从直接使用Monitor锁改成了可以使用轻量级锁和偏向锁

          3. Monitor是属于重量级锁

          4. 没有竞争的时候,就是说如果使用共享资源的时间是错开的时候,可以使用轻量级锁,如果使用共享数据的时间没有错开,那么轻量级锁也会升级为重量级锁。

          5. jdk1.6版本,为了减少获得锁和释放锁带来的性能消耗,引入了偏向锁和轻量级锁,在jdk1.6中,锁一共有4种状态,级别从低到高依次是:无锁状态、偏向锁状态、轻量级锁状态和重量级锁状态。这几个状态会随着竞争情况逐渐升级,锁可以升级但是不能降级,意味着偏向锁升级为轻量级锁之后不能降级成偏向锁。

          轻量级锁

          1. 轻量级锁的使用场景:如果一个对象虽然有多线程访问,但多线程访问的时间是错开的(也就是没有竞争),那么可以使用轻量级锁来优化。

            如果有竞争,轻量级锁会升级为重量级锁

            轻量级锁的语法仍然是synchronized

          2. 轻量级锁工作原理

            1. 在线程的虚拟机栈的栈帧创建锁记录(Lock Record)对象

              每个线程的栈帧都会包含一个锁记录的结构。

              内部可以存储锁定对象的Mark Word(运行时元数据)

              image-20210906162329611

              这个Lock Record包含了两部分

              • 一部分是对象指针,锁住哪个对象,得知道对象地址,这一部分就是指向加锁对象的对象引用
              • 另一部分是锁记录地址和后两位标识00(00代表轻量级锁),这一部分将来用来存储加锁对象的Mark Word
            2. 让锁记录中Object reference指向锁对象,并尝试用cas替换Object的Mark Word,将Mark Word的值存入锁记录(关键)。

              做这一步交换的操作就表示加锁

              image-20210906162952714

            3. 如果CAS替换成功,对象头中存储了锁记录地址和状态00表示这个对象已经加了轻量级锁

              锁记录里面存放了对象的对象头的Mark Word(运行时元数据--hashcode,分代年龄等)

              将来解锁的时候,再恢复回去

              image-20210906163537132

              上面说的是成功的情况,如果对象的对象头的Mark Word标记位是01,代表是正常情况,没有加锁,那么这种情况,交换可以成功,即加锁可以成功

            4. 如果CAS替换失败,有两种情况

              • 如果是其他线程已经持有了该Object对象的轻量级锁(Object对象对象头里标记是00),这时表明有竞争,进入锁膨胀过程

              • 如果是自己执行了synchronized锁重入,那么再添加一条Lock Record作为重入的计数。

                但是这种失败没关系,因为是同一个线程又对同一个对象加锁,也会在新的栈帧(虚拟机栈的存储单位)里创建锁记录,锁记录地址部分存为null,这种情况叫做synchronized锁重入

                image-20210906164102507

              CAS操作是原子性的,不会被打断

              总结:同一个线程对同一个对象再加锁,这种情况叫synchronized锁重入

            5. 解锁:

              • 如果有取值为null的锁记录,表示有重入,这时重置锁记录,表示重入计数减一

                image-20210906164652141

              • 当退出synchronized代码块时,锁记录的值不为null,这时使用cas将 Mark Word的值恢复给对象头

                • 成功,则解锁成功
                • 失败,说明轻量级锁进行了锁膨胀或已经升级为重量级锁,进入重量级锁解锁流程

          锁膨胀

          1. 如果在尝试加轻量级锁的过程中,CAS操作无法成功,这时一种情况就是有其他线程为此对象加上了轻量级锁(有竞争),这时需要进行锁膨胀,将轻量级锁变为重量级锁。

          2. 锁膨胀过程

            • 当Thread-1进行轻量级加锁时,Thread-0已经对该对象加了轻量级锁

              image-20210906165418735

            • 这时Thread-1加轻量级锁失败,进入锁膨胀流程

              • 即为Object对象申请Monitor锁,让Object对象指向重量级锁地址。并且Mark Word后两位会变为10,表示重量级锁。
              • 然后自己进入Monitor的EntryList 进入阻塞状态BLOCKED

              image-20210906165650753

            • 当Thread-0退出同步块解锁时,使用cas将Lock Record中Mark Word的值恢复给对象头,失败

              进入重量级锁解锁流程。即按照Monitor地址找到Monitor对象,设置Owner为null,唤醒EntryList中BLOCKED线程

          自旋优化

          1. 线程阻塞,那么就要发生一次上下文切换,这是比较耗费性能的。

            重量级锁竞争的时候,还可以使用自旋来进行优化,如果当前线程自旋成功(即这时候持锁线程已经退出了同步块,释放了锁),这时当前线程就可以避免阻塞。

            意思就是不立刻去EntryList,进入阻塞状态,而是循环几次,就是自旋

          2. 自旋要使用CPU,所以自旋优化适合多核CPU,这样才有意义,否则单核CPU,正在被持锁线程所占有,那么这个线程自旋,就没有意义。

          3. 如果持锁线程1迟迟没有释放锁,那么线程2自旋重试失败,仍然进入EntryList,进入阻塞态。

          4. 自旋会占用CPU时间,单核CPU自旋就是浪费,多核CPU自旋才能发挥优势。

          偏向锁

          1. image-20210906171021229

          2. image-20210906172322150

          3. 偏向锁的语法仍然是synchronized

            默认开启偏向锁,初始线程ID是0,上锁之后(加了synchronized),才有线程ID

            释放了锁之后,对象的对象头的Mark Word里的线程ID仍然是之前的线程ID,这就是偏向!

          4. 加锁的优先顺序是

            • 偏向锁
            • 轻量级锁
            • 重量级锁(线程2想进入临界代码,发现锁对象已经被线程1加轻量级锁,这时就通过锁膨胀,给Object对象加重量级锁)
          5. 偏向锁的撤销

            • 当一个默认打开偏向锁的对象,调用了hashcode()之后,会撤销这个对象的偏向锁状态,因为如果开了偏向锁,要存线程ID那些数据,对象头里便存不下hashcode,所以就把偏向锁状态关闭。

              轻量级锁的对象的hashcode会存在线程的栈的栈帧里的lock record的锁记录地址部分,解锁的时候会恢复给对象。

              重量级锁的对象的hashcode会存在monitor对象里,所以不会影响。

            • 偏向锁本质就是只有一个线程在使用,线程多了之后,产生竞争,锁自然会升级。

              当有其他线程使用偏向锁对象(synchronized括号内的对象)时,会将偏向锁升级为轻量级锁。

              解锁之后,这个对象就是不开启偏向锁的状态

              这也是偏向锁的撤销。

          6. 偏向锁在jdk6和7里是默认启用的,但是它在应用程序启用几秒钟后才能生效,如有必要可以使用JVM参数来关闭延迟:-XX:BiasedLockingStartupDelay = 0,如果确定应用程序里所有的锁通常情况下处于竞争状态,可以通过JVM参数关闭偏向锁,那么程序默认会进入轻量级锁状态。

          7. 批量重偏向

            过程:

            假如锁对象被两个线程访问,但是没有竞争,这时偏向了线程T1的对象仍然有机会重新偏向T2

            重偏向会重置对象的对象头里的Mark Word的线程ID

            • 线程T1,给一个对象重复上锁,线程T2调用wait(),进入阻塞态,所以此时只有T1来给对象上锁,并且在一个循环内多次上锁,那么上的是偏向锁,因为没有竞争(循环30次)
            • 循环完之后,唤醒T2线程,T2线程访问对象,此时发现对象已经被上了偏向锁,那么就如上面说的,会进行偏向锁的撤销,首先会将偏向锁升级为轻量级锁,解锁之后,这个对象就是不开启偏向锁的状态即撤销了偏向锁
            • 上面这一步要进行19次(前19次的对象都已经变成了不可偏向的状态),到第20次的时候,JVM会觉得之前偏向T1偏向错了,于是在给这些对象加锁时,重新偏向T2线程。
          8. 批量撤销

            当撤销偏向锁阈值超过40次后,JVM会觉得偏向错了,不应该采取偏向锁,于是整个类的所有对象都会变为不可偏向的,新建的对象也是不可偏向的。

          9. 批量重偏向和批量撤销,都是属于优化。

          锁消除

          1. 锁消除开关是默认打开的,JVM会自动消除掉没有意义的锁
          2. 因为上锁和解锁都是有成本的,而且上锁会导致有的线程获取不到锁进而会到阻塞状态,这个过程会引起线程的上下文切换,也要消耗成本

          wait-notify

          1. 被唤醒后的线程,是进入就绪状态,与其他线程一起等待CPU分配时间片,再执行,而不是被唤醒后马上执行

            被唤醒后的线程重新进入竞争锁的队列

          2. wait()、notify()、notifyAll()

            • 这三个方法只能出现在同步代码块和同步方法中

            • 以上这三个方法的调用者必须是同步代码块或同步方法中的同步监视器。

            • 以上这三个方法是定义在java.lang.Object中的。因为同步监视器任何一个对象都可以充当,结合第二点,任何一个对象都必须能够调用以上三个方法,说明,任何一个对象都有这三个方法,所以这三个方法是声明在Object类中。

          3. 原理

            image-20210906200431146

            • Owner线程发现条件不满足,调用wait()方法,即可进入WaitSet变为WAITING状态

            • BLOCKED和WAITING的线程都处于阻塞状态,不占用CPU时间片

            • BLOCKED线程会在Owner线程释放锁时唤醒

            • WAITING线程会在Owner线程(同步监视器锁对象)调用notify或notifyAll时唤醒。

              但是唤醒后并不意味着立刻获得锁,仍需进入EntryList(BLOCKED的对象在这里)重新竞争。

            • wait()、join()是进入waiting状态

            • yield()是从running到runnable就绪状态,让出时间片但是不阻塞

            • 时间片用完也是从running到runnable就绪状态,不阻塞,回到就绪状态等待下一次时间片分配

            • sleep是到timed_waiting状态

            • 等待同步锁是到BLOCKED状态。

              要区分WAITING状态和BLOCKED状态。

            • WAITING状态的线程通过notify()或notifyAll()唤醒,唤醒后的线程仍然要进入EntryList队列,等待CPU资源分配
            • BLOCKED状态通过线程释放锁唤醒
          4. 锁和时间片都可以理解为CPU的资源

          5. obj是同步监视器锁对象

            • obj.wait()让进入object监视器(monitor)的线程到waitSet等待
            • obj.notify()在object上正在waitSet等待的线程中挑一个唤醒
            • obj.notifyAll()在object上正在waitSet等待的线程全部唤醒

            以上三个方法都属于Object对象的方法

            要注意只有当某个线程获取到锁之后,才能调用以上这三个方法

            注意,调用wait(),是使本线程进入到WAITING状态(阻塞状态)

            而调用notify和notifyAll是唤醒别的线程

          6. image-20210906204102015

          同步模式之保护性暂停

          1. join()的实现采用的就是此模式,一个线程等另一个线程执行完之后再执行。
          2. join()使线程进入WAITING状态
          3. 这种模式是在两个线程间交互结果的模式
          4. image-20210906211624798

          join原理

          1. 保护性暂停是一个线程等待另一个线程的结果

          2. join()是一个线程等待另一个线程的结束

          3. 设置了最大等待时间

            image-20210906221104293

          异步模式之生产者消费者模式

          1. 与保护性暂停模式不同,不需要产生结果和消费结果的线程一一对应。
          2. 生产者仅负责产生结果数据,不关心数据该如何处理,而消费者专心处理结果数据
          3. 消息队列是有容量限制的,满时不会再加入数据,空时不会再消耗数据
          4. 和保护性暂停的共同点都是处理多个线程间的结果的交互

          park和unpark

          1. image-20210907152327885

          2. 原理:

            先调用park,再调用unpark

            image-20210907153022187

            image-20210907153037877

            先调用unpark,再调用park

            image-20210907153118988

          线程状态转换

          1. 情况1 NEW---> RUNNABLE

            当调用t.start() 方法时,由NEW ---> RUNNABLE

          2. 情况2 RUNNABLE ---> WAITING

            t线程用synchronized(obj)获取了对象锁后

            • 调用obj.wait() 方法时,t线程从RUNNABLE ---> WAITING
            • 调用obj.notify() , obj.notifyAll(), t.interrupt() 时
              • 竞争锁成功,t线程从WAITING --> RUNNABLE
              • 竞争锁失败, t线程从WAITING ---> BLOCKED
          3. 情况3 RUNNABLE ---> WAITING

            • 调用t线程.join()方法,要注意一定不是t线程从RUNNABLE ---> WAITING

              是当前线程进入WAITING而不是t线程,是当前线程等待t线程运行完!

              注意当前线程是在t线程对象的监视器上等待。

            • t线程运行结束,或调用了当前线程的interrupt(),会让当前线程从WAITING -- RUNNABLE

          4. 情况4 RUNNABLE ---> WAITING

            • 当前线程调用LockSuppor.park()方法会让当前线程从RUNNABLE -- WAITING (从原理上分析过了,也不一定,要看counter的状态。)
            • 调用LockSupport.unpark(目标线程)或调用了线程的interrupt(),会让目标线程从WAITING -- RUNNABLE
          5. 情况5 RUNNABLE -- > TIMED_WAITING

            • Thread.sleep(long time)

            • obj.wait(long time)

            • 当前线程调用t.join(long n)方法时,当前线程从RUNNABLE---TIMED_WAITING,当前线程等待t线程运行。

              当前线程等待时间超过了n毫秒,或t线程运行结束,或调用了当前线程的interrupt时,当前线程从TIMED_WAITING --- > RUNNABLE

          6. 情况6 RUNNBALE -- > BLOCKED

            • t线程用synchronized(obj)获取对象锁时,如果竞争失败,从RUNNABLE -- > BLOCKED

          ReentrantLock

          1. 使用jconsole可以检测死锁

          2. 饥饿,一个线程由于优先级太低,始终得不到CPU调度执行,也不能够结束

          3. 用ReentrantLock可以解决死锁和饥饿现象。

          4. ReentrantLock是可重入锁,是JUC并发工具包下的一个重要的类

          5. 相对于synchronized,它具备如下特点:

            • 可中断(synchronized加上锁之后,是不可以中断的。),加入打断机制可以防止线程等待锁时无限制地等待下去。为了避免死等。

              lock.lockInterruptibly()

            • 可以设置超时时间(规定时间内,如果获取不到锁,就放弃争这个锁了,去执行一些其他的逻辑),也是防止线程因为等待锁进入阻塞状态时,防止线程无限制地等待下去。一定时间之后,就不再阻塞了,不再无限制地等待下去。

              lock.tryLock()

              这种方式同样支持打断。括号里可以填入时间参数,表示等待多长时间,如果这段时间没有获取到锁,那么就不会再继续等待。

              用tryLock()可以解决哲学家就餐问题

            • 可以设置为公平锁(防止线程饥饿的情况)

              ReentrantLock默认是不公平的

            • 支持多个条件变量。(不像synchronized只有一个waitSet,比如要用notifyAll叫醒线程,会把等待的线程都叫醒,而ReentrantLock可以对waitSet进行细分,相当于这个意思)

            • 与synchronized一样,都支持可重入。

          6. 可重入---同一个线程对同一个锁的重复获取

            是指同一个线程如果首次获得了这把锁,那么因为它是这把锁的拥有者,因此有权利再次获得这把锁。

            如果是不可重入锁,那么第二次获得锁时,自己也会被锁挡住。

          7. Synchronized的monitor锁是不公平锁

            谁先抢到谁就拥有锁,而不会按照阻塞队列的顺序先来先得。所以是不公平的。

            **ReentrantLock默认是不公平的,**但是可以通过构造方法设置是公平还是不公平。

            公平锁一般没有必要,会降低并发度

            公平锁是按照等待队列,先入先得的方式实现的。

          8. 公平锁本意是解决饥饿问题的,但是实际上没有必要,用tryLock可以解决。

            一般都不会设置为公平锁。

          9. ReentrantLock默认是不可打断的。

          10. image-20210907164801520

          和之前的wait-notify-notifyAll相比,是根据条件变量来叫醒。

          调用await()之前,必须获得锁才有资格。(和wait,notify,notifyAll一样)

          注意调用await()和signal()方法的对象是Condition对象。

          1. ReentrantLock的lock()、unlock()必须成对出现,手动解锁,而synchronized关键字不需要

          本章小结

          1. 同步解决的问题和互斥解决的问题不一样

            互斥主要保证共享资源的互斥效果,一段临界区代码在在某一段时间内只能由一个线程去执行

            而同步指的是某个线程拿到其他线程执行代码的结果之后才可以被唤醒继续进入阻塞队列去竞争锁。也就是某个线程需要资源,但是得不到资源,于是进入阻塞队列,但是获得资源后,便被唤醒进入就绪状态,一定要注意,这里被唤醒是进入就绪状态而不是直接执行,仍然要等待CPU分配时间片。

          2. 线程获取不到锁,是进入EntryList阻塞队列

            而线程某样条件不满足,是进入WaitSet休息室,可以这么理解。

            平时都把锁和线程需要获得的其他资源都看作线程需要的资源,但是从线程差哪样东西而进入哪种状态来看,需要把锁和线程需要的某些条件分开

            线程需要锁但是没有获得,于是进入BLOCKED状态

            线程需要资源但是没有获得,进入WAITING状态。

          3. Synchronized和Lock默认都是非公平的,不过ReentrantLock可以设置公平锁。

          4. Synchronized

            • monitor,JVM层面的重量级锁
            • 轻量级锁
            • 偏向锁
          5. 互斥是指共享资源的互斥效果

            同步是指使用条件变量waitSet来达到线程间的通信效果。

          并发之共享模型

          1. JMM---Java内存模型

            • 原子性--保证指令不会收到线程上下文的切换
            • 可见性--- 保证指令不会受CPU缓存的影响
            • 有序性---保证指令不会受CPU指令并行优化的影响
          2. JMM定义了

            • 主存---成员变量等,共享数据
            • 工作内存----线程的私有数据,比如局部变量等
          3. 加了volatile的意思就是说就不能从缓存即线程的工作内存中读取了,每次都必须从主存中读取变量的最新值。

          4. volatile可以用来修饰成员变量和静态成员变量

            不能修饰局部变量,因为局部变量是线程私有的,不允许共享。

            它可以避免线程从自己的工作缓存中查找变量的值,必须到主存获取它的值

            线程操作volatile变量都是直接操作主存

          5. 可见性就是说当热点代码的变量被缓存到线程的工作内存中,而要对某个变量进行修改,是在主存中进行修改。

            那么线程能不能获取到这个主存中的修改的变量,还是继续在自己的工作缓存中找这个变量。

            就是这个修改的变量对于线程是否可见。

          6. synchronized也能保证变量的可见性,但是要创建monitor锁,也就是同步监视器锁,是比较重量级的操作

            但是volatile是比较轻量级的

            如果只是要保证可见性,那么推荐volatile

          7. 一个变量加了volatile修饰,保证的是一个线程对volatile变量的修改,对另一个线程可见,不能保证原子性。仅用在一个线程是修改变量,另外的线程只是读取变量

          8. volatile只是保证线程能看到变量的最新值,并不能解决指令交错,即并不能保证某段代码的原子性。

            synchronized既能保证代码块的原子性也能保证代码块内变量可见性。缺点就是属于重量级操作,性能更低

          9. i++,i--这种操作,在字节码指令层面,他们的指令不是原子性的。可能产生指令交错。

          10. 两个线程共享某个变量,volatile就是保证这两个线程对这个变量的可见性,即修改了之后线程也能获得这个变量的最新值。而不是获得之前线程的工作内存(缓存)的变量的值。

          指令重排序优化

          1. 在不改变程序结果的前提下,这些指令的各个阶段可以通过重排序和组合来实现指令级层面的并行。
          2. CPU在某一刻执行多条指令的不同阶段,不改变程序结果。
          3. 如果下一条指令依赖上一条指令的结果,那么这种情况就不能重排序。

          volatile原理

          1. volatile的底层实现原理是内存屏障

          2. 对volatile变量的写指令后会加入写屏障

            对volatile变量的读指令前会加入读屏障

          3. 写屏障保证在该屏障之前的,对共享变量的改动,都同步到主存当中

            读屏障保证在该屏障之后的,对共享变量的读取,加载的是主存中最新数据

          4. 写屏障之前的代码可以保证不会发生指令重排,就是写屏障之前的代码不会出现在写屏障后。

            读屏障会保证读屏障之后的指令不会因为指令重排序出现在读屏障前。

            写屏障和读屏障都是对volatile修饰的变量进行修改和读取时附带的屏障。

          5. volatile保证了共享变量的可见性和有序性,但是不能解决指令交错

            有序性的保证只是保证了本线程内相关代码不被重排序,通过写屏障和读屏障。

          6. 饿汉式单例模式,类加载就会导致该单实例对象被创建

            懒汉式,类加载不会导致该单例对象被创建,而是首次使用该对象时才会创建。

          共享模型之无锁(非阻塞)

          1. 管程也叫monitor或监视器锁

            是悲观锁

          2. CAS与volatile结合就可以实现无锁并发。

          3. CAS与volatile结合的工作方式

            image-20210908142615745

            compareAndSet比较并设置值,在CPU的指令级别或者说字节码指令级别可以实现其原子性。

          4. image-20210908143216090

            CAS可能会失败,就是如果cas的第一个参数的值和调用cas方法的对象的属性的最新值不相同(不相同是因为,在获取到“最新值”之后,执行之后的逻辑时,有其他的线程进来操作这个共享变量,导致之前获取的最新值已经不是最新了),就会失败,失败之后会继续下一次循环,继续获得最新值,再执行之后的逻辑。

          5. cas需要volatile的支持,cas必须借助volatile才能读取到共享变量的最新值来实现比较并交换的效果。

            volatile可以保证共享变量的可见性和相关代码的有序性,但是它不能解决指令交错的问题,它不能保证代码块的原子性。而CAS的操作在字节码指令层面是原子的,不可被打断。所以CAS和volatile结合起来可以实现无锁并发。

            synchronized关键字可以保证代码块的原子性和代码块内部共享变量的可见性。

            • 原子性 -- synchronized
            • 可见性--synchronized,volatile
            • 有序性---volatile
          6. cas是比较和设置,涉及到比较,指的就是即使失败,下一次进去循环,仍然能够获取到最新值,用当前最新值来进行比较,即使这个过程中,最新值被另一个线程所修改而不是最新值,在下一次循环仍然能够拿到最新值比较。那么要保证每次循环都能拿到这个最新值,就要volatile的配合。

          7. 无锁情况下,即使重试失败,线程始终在高速运行,没有停歇

            而synchronized会让线程在没有获得锁的时候,发生上下文切换,进入阻塞。

            image-20210908144636043

            无锁状态也可能会有上下文切换,只不过这里不是进入阻塞状态,而是因为没有分到时间片从运行态进入就绪状态(可运行状态),还是会导致上下文切换。

          8. 在线程数小于CPU核心数的时候,用CAS是非常合适的。

          9. CAS是基于乐观锁的思想,不怕别的线程来修改共享变量,而synchronized是拿到锁,禁止其他线程来修改共享变量,而CAS+volatile是不怕别的线程修改共享变量,大不了自己再重试几次,结合volatile每次都可以从主存拿到最新修改的值,来重试。

            乐观锁虽然有一个“锁”字,但是其实没有上锁

          10. synchronized是基于悲观锁的思想,禁止其他线程来修改共享变量,拿到锁的线程解开锁,别的线程才可以进来。

          11. CAS保证了原子性,volatile保证了共享变量的可见性,那么通过不断重试总能拿到正确的最新值,不怕别的线程对共享变量进行修改,所以说这是乐观锁。

          12. CAS体现的是无锁并发、无阻塞并发。(当线程数大于CPU核心数的时候,还是可能出现线程的上下文切换,但是不会有阻塞,这里的上下文切换是线程由运行状态到可运行状态引起的。)

            • 没有使用synchronized,线程不会陷入阻塞,这是效率提升的因素之一

            • 但是如果竞争激烈,重试必然频繁发生,反而效率会受影响。

          13. value.compareAndSet(int expect, int update)

            会把第一个参数期望值和value的最新值做对比,如果一致,那么可以用后面的update,更新value,如果更新失败则返回false

          14. ++i,i++这种操作在字节码层面不是原子性的,所以可能会出现线程安全问题,在字节码层面,会出现指令交错,比如多个线程对i这个共享变量,进行这类操作。

          15. 原子整型AtomicInteger里会维护一个value值,这个value值,就是会用CAS来保证它的线程安全,CAS保证指令的原子性,但是这个value值是用了volatile来修饰保证了它的可见性,就是它每一次修改之后,都保证能在主存拿到最新值来进行比较和设置。

            image-20210908152216836

          16. CAS应用在线程数比较少的时候,最好是不要超过CPU核心数。

          17. AtomixStampedReference可以给原子引用加上版本号,追踪原子引用整个的变化过程,可以知道引用变量中途被更改了几次

            如果只是单纯关心原子引用变量是否更改过,就用AtomicMarkableReference

          原子累加器

          1. 原子累加器 LongAdder性能提升的原因:

            在有竞争时,设置多个累加单元,最后将结果汇总,这样他们在累加时操作的不同的cell变量,因此减少了CAS重试失败。从而提高了性能。

          final原理

          1. final变量的赋值也会通过putfield指令来完成,同样在这条指令后也会加入写屏障

            写屏障就是之前的指令不会在写屏障之后执行,写屏障之前对变量的修改会同步到主存中

            加入了写屏障,保证在其他线程读到它的值时不会出现为0的情况

          2. 如果一个成员变量不加final修饰,那么相当于是给一个变量赋值。这个变量先要默认赋初始值0,然后才会显式赋值。其他线程有可能会看到这个0从而导致线程安全问题。

            在类加载过程中的链接阶段的准备阶段,会给成员变量中的静态属性默认赋初始值,然后在初始化阶段给其显式赋值。这个准备阶段,不会给成员变量中的非静态属性赋值,因为非静态属性是属于对象的变量,需要随着对象的创建而被分配在堆空间中,也不会给final修饰的静态属性赋值,因为final修饰的静态属性早在编译阶段就会进行赋值了。

            类加载过程中的初始化阶段,<clinit>,给静态属性显式赋初始值,执行静态代码块内的内容。

          自定义线程池

          1. 我们应该充分利用已有线程的潜力,不应该每次一有任务都新建新的线程,不然线程很多,会频繁地出现上下文切换,甚至是死锁,还有系统资源限制的问题,都说明了线程不是越多越好,所以要充分利用已有线程。

          2. 每创建一个线程都要占用一定内存,要分配虚拟机栈等线程私有空间

            如果创建很多线程

            • 对内存的占用大,也就是系统资源限制问题
            • 上下文切换导致效率不高
            • 死锁
          3. 线程一定不是创建得越多越好。

          4. 线程池就是创建一些线程,让线程能够得到重复的利用,线程用完了,不销毁,放进线程池。

          5. 线程池

            • jdk提供的功能完备的线程池
            • 自定义线程池
          6. 自定义线程池分成以下组件

            • 线程池,里面有可重用的线程
            • 阻塞队列,平衡生产者线程、消费者线程速度差异的组件
            • 线程的生产者

            image-20210908183204652

          jdk定义的线程池

          线程池状态

          1. image-20210908205551426

            ExecutorService是线程池的最基本的接口,提供了提交任务,关闭线程池等方法。

            ScheduledExecutorService新增了调度任务的功能,用于定时执行任务

            ThreadPoolExecutor是最基础的实现

            ScheduledThreadPoolExecutor是带有任务调度功能的线程池实现

          2. 让有限的工作线程(Worker Thread)来轮流地异步地处理无限多的任务,线程池做的就是这个事情。

          3. 线程池状态

            ThreadPoolExecutor使用int的高3位来表示线程池状态,低29位表示线程数量

            image-20210908205814692

            线程池状态和线程数量存储在一个原子变量ctl中,目的是将线程池状态与线程个数合二为一,这样就可以用一次cas原子操作进行赋值。

          构造方法

          1. 线程池的构造方法

            image-20210908210307737

            阻塞队列指的是任务阻塞队列。要清楚任务是什么,看泛型很清楚,里面写的Runnable,Runnable或Callable接口的实现类的对象就是任务对象

          核心线程和救急线程

          1. 线程池中的线程分为两种

            • 核心线程
            • 救急线程

            核心线程数 + 救急线程数 = 最大线程数

          2. 救急线程用于任务量特别大,任务如果没有核心线程来执行,那么会进入阻塞队列,当阻塞队列都放不下了,来的下一个任务会交给救急线程去执行。

            image-20210908211936243

          3. 救急线程和核心线程最大的区别是:

            救急线程有生存时间,任务执行完了,救急线程会销毁,下一次高峰期来了,才会再创建

            核心线程没有生存时间,执行完任务,仍然会保留在线程池中。

            • 线程池中刚开始没有线程,当一个任务提交给线程池后,线程池会创建一个新线程来执行任务
            • 当线程数达到corePoolSize后,并没有线程空闲,这时再加入任务,新加的任务会被加入workQueue队列排队,直到有空闲的线程。
          4. 如果线程数达到maximumPoolSize,仍然有新任务这时会执行拒绝策略,拒绝策略jdk提供了4种实现:

            image-20210908212728493

            image-20210908212946761

          5. jdk提供了Executors工具类,这个工具类提供了很多工厂方法来创建各种用途的线程池,但是内部就是调用构造方法,传递不同参数,创建线程池

          6. 总结:

            线程数达到corePoolSize:

            • 新加的任务加入任务阻塞队列排队,直到有空闲的线程
            • 若任务阻塞队列已满(即任务阻塞队列已经放不下新加的任务):
              • 救急线程来执行新加的任务
              • 若核心线程数 + 救急线程数 即最大线程数已经达到maximumPoolSize,如果仍然有新任务,执行拒绝策略(4种)

          几种类型的线程池

          1. 固定大小线程池

            newFixedThreadPool

            image-20210908213524594

            特点:

            • 核心线程数 == 最大线程数(没有救急线程被创建),因此也无需超时时间

            • 阻塞队列是无界的,可以放任意数量的任务

              适用于任务量已知,相对耗时的任务

          2. 带缓冲线程池

            newCachedThreadPool

            image-20210908214251452

            特点:

            • 核心线程数是0,最大线程数是Integer.MAX_VALUE,救急线程的空闲生存时间是60s
            • 全部都是救急线程(60s后可以回收)
            • 救急线程可以无限创建

            适用于任务密集,但是每个任务时间都很短的情况

          3. 单线程线程池

            image-20210909140256403

            使用场景:

            希望多个任务排队执行,线程数固定为1,任务数多于1时,会放入无界队列排队

            任务执行完毕,这唯一的线程也不会释放。

            只有一个核心线程,没有救急线程

            区别:

            自己创建一个单线程串行执行任务,如过任务执行失败而终止没有任何补救措施,而线程池还会新建一个线程,保证线程池的正常工作

            image-20210909141045584

            单线程执行器返回的是包装后的对象,核心线程数大小不能修改。

          提交任务

          1. 提交任务

            image-20210909141325138

            • submit

              Future用的就是保护性暂停模式来接收另一个线程返回的结果。

            • invokeAll

              image-20210909142412154

              image-20210909142301150

              意思就是说,invokeAll()方法传入的参数是任务tasks,任务的本质也是实现Callable接口的类的对象

              而创建线程池时指定的最大线程数即核心线程数(因为采用的是固定大小线程池,所以没有救急线程)是2,所以前两个任务,也就是实现Callable接口的类的对象,(我认为任务的本质就是实现Runnable或Callable接口的类的对象,把这个对象,作为哪个线程创建的构造函数的参数传入,就是任务交给哪个线程执行。

              前两个任务被线程执行了,第三个任务进入阻塞队列,前两个任务执行完后,第二个线程将第三个任务取出执行。

              任务就是实现Runnable接口或Callable接口的实现类的对象

              怎么把任务交给某个线程执行呢?我们之前说把任务和线程分开,就是采用的实现Runnable或Callable接口的方式,那么这里同样,把任务交给某个线程执行,就相当于把实现Runnable或Callable接口的对象,作为创建线程的构造函数的参数传入

            • invokeAny, 找到一个最先执行的任务,返回结果之后,其他任务就不执行了。

              返回结果类型是Object,也就是说最终只得到一个任务的结果。

          2. 任务对象:实现Runnable接口或实现Callable接口的对象叫做任务对象,交给线程执行,即作为线程创建的构造函数的参数传入

          关闭线程池

          1. shutdown---使线程池状态从RUNNING变为SHUTDOWN

            不会接收新任务

            但已提交的任务会执行完,会把阻塞队列中等待任务对象执行完毕

            此方法不会阻塞调用线程的执行,比如主线程调用了shutdown,主线程如果还有其他代码,会继续运行。

          2. shutdownNow---使线程池状态从RUNNING变为STOP

            不会接收新任务

            会抛弃阻塞队列中的任务(其实不准确,阻塞队列中没执行的任务会作为结果返回)

            会用interrupt的方式中断正在执行的任务

            队列中的任务会作为返回结果,拿到这个返回结果是重新执行,还是抛弃,由业务来决定。

            image-20210909152652554

            这里又证明了,Runnable,Callable接口实现类的对象就是任务对象

          任务调度线程池

          1. 有的时候我们希望任务延时执行,或者希望任务每隔几秒就执行一次(定时),这种情况我们就要用到任务调度线程池

            任务调度线程池是在jdk1.5加入。

          2. 在任务调度线程池加入之前,有一种java.util.Timer来实现定时功能,Timer的优点是简单易用,但由于所有的延时或定时的任务都是由同一个线程来调度执行,所以所有的任务都是串行

          3. Timer已经过时了

            Timer的这个线程很脆弱,前一个任务出现了异常,后面的任务就不能执行了。

            应该用带有任务调度功能的线程池,可以设置线程池中线程数量,就不是所有的任务都是一个线程来执行了。(多线程解决串行,实现并行(CPU多核的情况下,单核的情况下微观上仍是串行,上下文切换))

          4. image-20210909163938947

            Executors是工具类,创建各种线程池,本质上是修改构造方法的那七种参数

          5. 正确处理异常

            1. 第一种方式,自己手动在Callable实现类复写call()方法时,或在实现Runnable类复写run()时,用try-catch处理
            2. 第二种,用实现Callable接口结合Future的方式替代实现Runnable接口的方式,因为实现Callable接口结合Future的方式,重写call()方法,call()方法有返回值,这个返回值,通过Future对象的get()方法拿到,如果说call()内部有异常,那么在通过Future对象的get()方法拿返回结果时,会将异常信息打印出来。

          Fork/Join线程池实现

          1. Fork/Join线程池是jdk1.7加入的新的线程池实现

            体现的分治思想

            适用于能够进行任务拆分的cpu密集型运算

          2. 所谓任务拆分,是将一个大任务拆分为算法上相同的小任务

            这些小任务就可以交给不同的线程来完成,提升运行效率

          3. Fork\Join默认会创建与CPU核心数大小相同的线程池。(要充分利用CPU)

          4. 使用Fork\Join线程池

            • 创建任务对象,不能使用Runnable或Callable任务对象
            • 使用Fork\Join线程池执行任务对象
          5. image-20210909175235649

            如果是无参的,那么创建的线程数就等于CPU核心数

            哪种线程池用什么方法来执行任务要搞清楚。

            比如任务调度线程池用的schedule

            Fork\Join线程池用的invoke

          6. Future是一个接口,FutureTask是实现了RunnableFuture接口的实现类,RunnableFuture接口继承于Future接口和Runnable接口

          异步模式之工作线程

          定义

          1. 让有限的资源即工作线程处理无限的任务,典型实现就是线程池。而且使用线程池可以做到将线程重复使用,也不用每次新建线程或销毁线程,提高了效率,节省了时间成本。

            线程池可以设置最大线程数和核心线程数,可以通过有限的线程处理无限的任务,一个线程执行一个任务对象完成之后,并不销毁,而是放回到线程池中,进行下一个任务对象的执行。

            任务对象除了一进来就能够被线程执行以外,没有能被执行的线程都放进线程阻塞队列中。

            任务对象出队列,被线程执行,是这种流程。

            自定义线程池的时候如果已有线程数小于最大线程数,那么就创建工作线程

          2. 对应于一个业务,也可以创建多个线程池,不是只能有一个线程池。

          饥饿现象

          1. 用固定大小的线程池,会有饥饿现象,线程数不足,导致饥饿

            用带缓冲的线程池,不会有饥饿现象

            单线程线程池,会有饥饿现象。

          2. 对于不同的工作任务,应该使用不同的线程池,来避免饥饿现象。

            避免因为多个线程都去执行任务A,而没有线程去执行任务B,如果按任务来划分了线程池,那么就不存在没有线程去执行任务B的情况。

            这种方式比单纯增加线程池的容量更为重要

          3. 线程池中的线程数量过小,可能会导致饥饿

            过大的话会导致更多的线程产生上下文切换(上下文切换对于CPU来说是一种开销),并且涉及到系统资源不足的问题,线程过多也可能会发生OOM

            • CPU密集型运算

              通常采用cpu核数 + 1,能够实现最优的CPU利用率。

              +1 保证当线程由于页缺失故障或其他原因导致暂停时,额外的这个线程能顶上去,保证CPU时钟周期不被浪费,保证CPU的利用率。

            • IO密集型运算

          JUC

          AQS原理

          1. 其他的并发工具都是依赖于AQS的,抽象的基于队列的同步器。是阻塞式锁和相关的同步器工具的框架

            Synchronized锁就是阻塞式的锁,CAS+volatile就是实现的无锁并发,是乐观锁,线程不阻塞。

            但是AQS并不是Synchronized的原理,而是ReentrantLock的实现原理,ReentrantLock是阻塞式锁

            Synchronized的实现原理是Monitor,是JVM层面的,底层是用C++来实现的。

          2. AQS ---- AbstractQueuedSynchronizer,是一个抽象类,抽象的基于队列的同步器

          3. AQS的使用方式通常都是通过内部类继承AQS实现同步功能,AQS是很多同步器的基础框架,我们还可以基于AQS,定制出我们所需要的同步器

          4. 在AQS内部,通过维护一个FIFO队列,来管理多线程的排队工作,在公平竞争的情况下,无法获取锁的线程会被封装成一个节点,置于AQS队列尾部,入队的线程通过自旋的方式获取锁,若在有限次的尝试后,仍未获取成功,线程会被阻塞住,后面有具体的过程说明

          5. state属性,表示资源的状态

            • 独占模式---只有一个线程能够访问资源,比如之前的监视器锁使某一个时间段只有一个线程能够访问资源

            • 共享模式----允许多个线程访问资源,但是有上限

              子类需要定义如何维护这个状态,控制如何获取锁和释放锁

          image-20210909190349224

          ​ 用cas修改state状态,保证了修改state状态这个过程是原子性的。

          1. 提供了基于FIFO的等待队列,类似于Monitor的EntryList,Monitor是操作系统层面的,或者说是JVM层面的,EntryList是用C++来实现的,而AQS是纯Java实现的

          2. ReentrantLock是Java层面的锁

          3. 条件变量来实现等待、唤醒机制,支持多个条件变量,类似于Monitor的WaitSet

          4. Lock是一个接口,ReentrantLock是一个Lock接口的实现类。

          5. 子类(继承于AbstractQueuedSynchronizer)主要实现这样一些方法(默认抛出UnsupportedOperationException)

            • tryAcquire
            • tryRelease
            • tryAcquireShared
            • tryRealeaseShared
            • isHeldExclusively

            image-20210909191200097

            image-20210909191210548

            自定义锁或ReentrantLock里定义的上锁、上锁带超时、上锁可打断、尝试上锁、解锁、多个条件变量等方法都是通过调用继承于AQS的子类定义的方法。

          ReentrantLock原理

          1. image-20210909194450657
          2. ReentrantLock实现了Lock接口,内部也维护了继承于AQS的同步器Sync不过这个同步器Sync是抽象的还有两个继承
            • NonfairSync -- 非公平锁
            • FairSync -- 公平锁

          非公平锁实现原理

          1. 构造器:

            默认通过非公平锁来实现内部维护的Sync抽象类

            image-20210909194836695

          2. NonfairSync这个类继承于Sync(ReentrantLock内部的抽象类)

          3. 原理:

            1. 没有竞争时,Thread-0成为非公平锁的Owner

              image-20210909201243193

            2. 第一个竞争出现时,首先尝试CAS,想要通过CAS将state置为1,但是目前state已是1,而这次调用cas的参数是期望值:0,更新值:1.

              所以期望值和当前对象的state属性不一样,更新失败,进入accquire

              image-20210909201251908

              image-20210909203507236

            3. 进入accquire方法之后,首先会再次尝试,会进行tryAccquire,这时state已是1,结果仍然是false

              然后进入addWaiter逻辑

              • 如果是非公平锁,那么进入tryAccquire,会抢占锁,抢占锁失败,才会封装成节点入AQS队列
              • 公平锁的tryAccquire比非公平锁多了一个条件,即!hasQueuedPredecessors(),检查AQS队列里是否有等待时间更长的线程节点
            4. 进入addWaiter逻辑,构造Node队列

              image-20210909203742017

              第一个Node称为哑元或哨兵,用来站位,并不关联线程。

              Node队列底层是通过双向链表实现

            5. AQS维护的线程节点同步等待队列中,头节点是成功获取到同步状态的节点。

            6. 只有前驱节点是头节点的线程节点才能够尝试获取同步状态。

              如果非首节点线程前驱节点出队或者被中断,则检查自己的前驱节点是否是头节点,如果是则尝试获取同步状态,如果不是当前线程节点则阻塞(park)。可以说是阻塞,也可以说是进入等待状态。

            7. 然后进入acquireQueued逻辑

              • acquireQueued会在一个循环中不断尝试获得锁,失败后进入park阻塞

              • 如果当前Node是第二位,那么再次tryAcquire尝试获取锁,state仍是1,失败

              • 进入shouldParkAfterFailedAcquire逻辑,将前驱node即head的waitStatus改为-1,这次返回false

                image-20210909204148130

              • shouldParkAfterFailedAcquire执行完毕后,回到acquireQueued,再次tryAcquire尝试获取锁,当然这时state仍为1,失败

              • 当再次进入shouldParkAfterFailedAcquire时,这时因为前驱node的waitStatus已经是-1,这次返回true

              • 进入parkAndCheckInterrupt,进入阻塞态。

                image-20210909204356085

                可以发现除了最后一个node,前面的node的waitStatus都被改成了-1,每个node都应该由上一个节点唤醒。

                -1表示-1的node有责任唤醒后继节点

            8. Thread-0 释放锁,进入tryRelease流程,如果成功

              • 设置exclusiveOwnerThread 为null
              • state = 0
            9. 当前Node队列不为null,并且head的waitStatus = -1,进入unparkSuccessor流程

              找到队列中离head最近的一个Node,unpark恢复其运行,本例中即为Thread-1

              • head指向Thread-1所在Node
              • 原本的head Node从链表断开,被垃圾回收器回收
            10. 这时候如果有其他线程来竞争(非公平的体现),比如Thread-4

              这个Thread-4可以和Thread-1竞争,可能Thread-1竞争锁又失败了。

            11. 非公平的意思就是说,即使排在Node队列(双向链表)的头位,仍然有可能不会获得锁

          可重入原理

          1. 如果锁重入,让state++,说明同一线程获得了多次锁
          2. 释放锁的时候,也要让state减1(自减),只有state减为0,才释放成功。

          可打断原理

          1. ReentrantLock默认是不可打断的
          2. 可打断,在park过程中如果被打断,采用了抛出异常的方式,不会再次进入for(;;)去竞争锁

          公平锁原理

          1. 非公平锁只会检查state,不会检查AQS等待队列(在源码中可以发现只检查了state,没有做AQS队列的判断),不会管是否有线程对应的节点在AQS队列中等待,不会管AQS等待队列,直接就去竞争

            即使某个线程对应的节点在AQS等待队列的紧接着占位节点的下一个节点,也不一定会成功竞争到锁

          2. 而公平锁会检查AQS队列中是否有前驱节点,没有前驱节点,才去竞争。

            如果有前驱节点,该线程都不会去执行cas,都不会去比较state。

          条件变量实现原理

          1. 每个条件变量对应于一个ConditionObject

            ConditionObject也维护了一个双向链表,作为那些不满足条件,需要休息的线程

          2. await流程

            1. 调用await之前,必须拥有锁才有资格调用

              await方法是ConditionObject的方法而不是Lock的方法

            2. 开始Thread-0持有锁,有资格调用await,然后调用await(),进入ConditionObject的addConditionWaiter流程

              创建新的Node状态为-2的节点,关联Thread-0,加入等待队列尾部

              image-20210909220203679

            3. 接下来进入AQS的fullRelease()流程,释放同步监视器上的锁

              image-20210909220242221

            4. unpark AQS队列中的下一个节点,竞争锁,紧接着占位节点之后的那个节点对应的线程竞争成功(如果是非公平锁的机制,但是没有其他线程来竞争的情况,或者是公平锁的机制)

              image-20210909220502184

              Thread-1节点的前一个节点(占位节点)要断开,然后head要指向新的节点即原占位节点的下一个节点成为新的占位节点,下一个竞争锁的节点就是当前head节点的下一个节点。在图中即Thread-2

            5. 在ConditionObject等待队列的线程节点阻塞

              image-20210909220707854

          3. AQS队列和ConditionObject等待队列的线程最后阻塞,都是通过调用park()阻塞的

          4. signal流程

            1. 假设现在占有锁的Thread-1要来唤醒ConditionObject等待队列中的线程,那么Thread-1要唤醒等待队列中的Thread-0

            2. 进入ConditionObject的doSignal流程,取得等待队列中第一个Node,即Thread-0所在Node

              image-20210910125940213

            3. 执行TransferForSignal流程,将等待队列中取得的Node,加入AQS队列尾部,将Thread-0的状态由-2改为0,将AQS队列中,Thread-0的前一个线程节点的状态改为-1,表示前一个线程有资格唤醒Thread-0这个线程

              image-20210910125952369

            4. 现在占有锁的Thread-1释放锁,进入unlock流程

          公平与非公平

          1. 公平与非公平指的是线程获取锁的方式。公平模式下,线程在同步队列中通过 FIFO 的方式获取锁,每个线程最终都能获取锁。在非公平模式下,线程会通过“插队”的方式去抢占锁(也就是队列内的线程封装成的节点,就可以理解为线程,是按照队列FIFO顺序获得锁的,但是队列外的线程,就看它是否检查这个AQS队列了,如果不检查,就是非公平模式,队列外的线程就可以插队。),抢不到的则进入同步队列进行排队。默认情况下,ReentrantLock 使用的是非公平模式获取锁,而不是公平模式。不过我们也可通过 ReentrantLock 构造方法ReentrantLock(boolean fair)调整加锁的模式。

          2. 公平与非公平锁的优缺点:

            公平模式下,可保证每个线程最终都能获得锁,但效率相对比较较低,可以解决饥饿问题。

            非公平模式下,效率比较高,但可能会导致线程出现饥饿的情况。即使出现饥饿,也很少使用修改为公平锁的方式解决,而通过tryLock()的方式解决

          3. 为啥非公平模式抢了其他线程获取锁的机会,而整个程序的运行效率会更高呢?

            在激烈竞争的情况下,非公平锁的性能高于公平锁的性能的一个原因是:在恢复一个被挂起的线程与该线程真正开始运行之间存在着严重的延迟。与此同时,如果 C 也请求这个锁,那么 C 很有可能会在 B 被完全唤醒前获得、使用以及释放这个锁。这样的情况时一种“双赢”的局面:B 获得锁的时刻并没有推迟,C 更早的获得了锁,并且吞吐量也获得了提高。(吞吐量是指用户线程执行时间占比,其他时间有垃圾回收时间,线程上下文切换消耗等)

            image-20210910183523679

          4. AQS 维护了一个基于双向链表的同步队列,线程在获取同步状态失败的情况下,都会被封装成节点,然后加入队列中。加入这个队列中,不代表线程封装成的节点阻塞了,加入这个队列,还会通过自旋的方式获得锁,多次(有限次)尝试失败后,才会通过park阻塞,并不是说入队就阻塞

            • **非公平锁的 lock 方法会首先尝试去抢占设置同步状态(通过CAS),而不是直接调用 acquire()方法 将线程放入同步队列中等待获取锁。**如果设置同步状态state失败,即CAS比较不成功,那么才进入acquire()

            • 公平锁的lock()则直接调用acquire()

            • 进入acquire()之后,先进行tryAcquire()

              • 公平锁的tryAcquire 多出了一个条件,即!hasQueuedPredecessors()。这个方法的目的是判断是否有其他线程比当前线程在同步队列中等待的时间更长。
              • 如果我们把 tryAcquire 中的条件!hasQueuedPredecessors()去掉,公平锁将不再那么“谦让”,它将会像非公平锁那样抢占获取锁,抢占失败才会入队,就变成了非公平锁。

          ReentrantReadWriteLock

          1. ReentrantReadWriteLock和StampedLock都是读写锁

          2. ReentrantReadWriteLock支持重入,是可重入锁

          3. ReentrantReadWriteLock的目的是提高读操作的性能

            当读操作远远高于写操作时,这时候使用读写锁让读-读可以并发,提高性能。

            读读可以并发, 而读写互斥

          线程安全集合类概述

            • 遗留的线程安全集合如Hashtable,Vector

              Hashtable是Map接口的实现类

              Vector是List接口的实现类

            • image-20210910130603196

            • JUC安全集合

              • BLOCKING类,大部分基于锁,并提供用来阻塞的方法。(这种称为悲观锁,乐观锁其实没有锁,是实现无锁并发,CAS+volatile实现)
              • CopyOnWrite类,适用于读多写少的场景
              • Concurrent类
          1. image-20210910130839000

          2. Concurrent类型的容器

            • 大多性能都比较高

              内部很多操作使用cas优化,一般可以提高较高吞吐量,用户线程执行的时间占比高。

              因为用cas+volatile实现的无锁并发,即乐观锁

            • 弱一致性

              当利用迭代器遍历时,如果容器发生修改,迭代器仍然可以继续进行遍历(因为不阻塞,没有上锁),这时内容是旧的

              求大小,因为弱一致性,并不一定准确

              对于非安全容器来讲,遍历时如果发生了修改,使用fail-fast机制也就是让遍历立刻失败,不再继续遍历

              Concurrent类型的容器是线程安全的

          ConcurrentHashMap

          1. 内部方法跟普通HashMap方法一样,都是实现了Map接口

          2. 重要方法computeIfAbsent

            先要进行检查,如果缺少key,则计算生成一个值,然后将key value放入map

          3. HashMap在put过程中的原理

            先计算hashCode,找到底层Entry[]数组的一个位置进行存放,不同hashCode仍然可能放到一个位置

            如果此位置上的数据不为空(意味着此位置上存在一个或多个数据(多个数据以链表形式存在)),比较key1和已经存在的一个或多个数据的哈希值:

            • 如果key1的哈希值与已经存在的数据的哈希值都不相同,此时key1-value1这个Entry添加成功-----情况2
            • 如果key1的哈希值和已经存在的某一个数据的哈希值相同,那么继续比较,调用key1所在类的equals()方法:
              • 如果equals()返回false:此时key1-value1添加成功------情况3
              • 如果equals()返回true:使用value1替换相同key的value值。
          4. 要注意如果在底层Entry[]数组,元素被放在同一个位置,以链表形式存储,在JDK8,新加入的元素总是放在链表的尾部,在jdk7,新加入的元素总是放在链表的头部。

            在jdk7,新加入的元素总是放在链表的头部,这也是产生死链的重要原因,所以在jdk8进行了修改。

            死链是发生在扩容的时候

            扩容是往HashMap里put元素,当元素达到一个阈值时进行扩容,这个阈值是数组长度 * 加载因子,加载因子默认是0.75,扩容是扩容为原来的两倍底层Entry[]数组初始大小是16(或者说HashMap在底层初始大小是16,那么阈值是12,超过12时,就要开始扩容)

            ArrayList底层是Object[]数组,初始大小是10,如果不足10,第一次扩容,扩容为10,之后都扩容为原来大小的1.5倍

            而StringBuffer和StringBuilder扩容都是扩容为原来的2倍+2,底层数组初始大小是16.

            只要是数组扩容,都是会造一个新的数组,因为数组在底层的长度是创建时就确定了的,新建一个数组之后,将原来数组的数据复制过来。

            扩容之后,元素在新的数组又会分得更加均匀

          5. 扩容的时候会遍历原Entry[]数组的某个位置上的链表,遍历每一个Entry,把他们放到新的数组去

          6. HashMap在jdk7产生的死链问题:

            比如在Entry[]数组的某个下标位置,有一个链表是节点1-节点2-null,即头节点元素为节点1,下一个节点为节点2,再下一个节点为null

            此时线程Thread-0在执行put操作

            首先要明确死链是发生在扩容时,虽然JDK8改变了新节点加入链表的存储方式,解决了死链,但是还有其他问题,比如扩容丢数据,根本原因是因为在多线程环境下采用了HashMap这种不安全的集合

            那么此时如果发生扩容,并且这个扩容操作由另一个线程Thread-1来执行,假设扩容后节点1和节点2还在新数组(扩容都会造一个新数组)的同一个下标位置上,那么首先节点1会存储到这个下标位置,由于JDK7会将新加入的元素放在链表的头部而不是尾部,所以节点2会加入到链表的头部,那么在新数组的这个下标位置上,链表为节点2-节点1-null

            但是Thread-0记录了当前的e为节点1,next为节点2

            所以当前的e是节点1-null

            next是节点2-节点1-null

            所以此时Thread认为节点1指向节点2,但是实际上是节点2指向节点1,

            那么在下一次循环会发生将节点1-null移到新的数组的链表头

            e变为节点2-节点1-null

            next变为节点1-null

            再下一次循环会发生将节点2-节点1-null移到新的数组的链表头

            e变为节点1-null

            next变为null,形成死链

          7. 总结:

            jdk1.7HashMap在并发环境下,执行put操作时,会引起死循环,因为多线程会导致HashMap的Entry链表形成死链即环形数据结构,一旦形成环形数据结构,Entry的next节点永远不为空,就会产生死循环

          8. JDK8虽然将扩容算法做了调整,在扩容时,节点保持了和之前一样的顺序,新的节点被加入到链表的尾部,解决了死链问题(只有jdk7有死链问题,在扩容时会发生

            但JDK8仍不意味着在多线程环境下能够安全扩容,还会出现其他问题,在jdk8下,HashMap仍然是线程不安全的。

          重要属性和内部类

          1. image-20210910144345408

            内部类class Node是指同一个下标位置上的链表

            ForwardingNode作为旧table的头节点,代表旧Entry[]数组的这个位置上的节点是处理过的!

            TreeBin指红黑树,是jdk8对HashMap底层的优化,在hash表的长度大于64和链表的长度大于8时,会采用红黑树来代替链表,可以提高查询效率,并且可以一定程度上防止DOS攻击(恶意造大量hashcode一样的对象往hashmap填充)

            链表的长度大于8时,会尝试把链表转换成红黑树,但是在转换之前,会尝试扩容,如果哈希表的长度没有达到64时,先不会把链表变为红黑树,先会扩容。当哈希表的容量扩容到64时,那么才会将链表转换成红黑树。

          构造器

          1. image-20210910145407027

            initialCapacity是指初始容量

            • 初始容量达不到并发度时,会让初始容量 = 并发度
            • 设置的初始容量不一定是真正的初始容量,因为tableSizeFor要保证容量是2的n次方,最小是16,如果将初始容量设置为8,会通过这种计算方式将初始容量设置为16

            loadFactor是负载因子,默认为0.75

            concurrencyLevel 并发度

          2. ConcurrentHashMap有在table下标冲突的时候才会加锁,锁的不是整个table,锁的是这个链表的头节点

            这个地方保证了线程安全性。并且是细粒度的锁,保证了Entry[]数组其他元素还能被线程访问到。

            而HashMap则没有这个操作。

            在创建ConcurrentHashMap的时候也保证线程安全,只有一个线程能够创建

          jdk7 ConcurrentHashMap

          1. 维护了一个segment数组,每个segment对应一把锁(分段锁)

            jdk7是把锁加在每个segment对象上,而jdk8是把锁加在链表的头节点

            缺点:

            • 不是懒惰初始化
            • Segment数组默认大小为16,容量初始化指定后就不能改变了,但是JDK8的Hash表是有扩容机制的。
          2. 每个segment对应于一个小的Hash表(HashEntry[]数组)每个Hash表里面又是数组加链表的结构

            一个segment对应于一个数组+链表结构。数组是HashEntry[]数组,数组里每个元素是一个链表,链表里每一个元素是HashEntry

          3. jdk7的HashMap在多线程环境下,进行put操作,会产生环形链表问题,会产生死链,造成死循环,jdk8虽然改变了这种put时,将节点插入到链表的头部改为了节点插入到链表的尾部,解决了死链问题,但是并不意味着jdk8下的HashMap能够在多线程环境下安全扩容,仍然有其他线程安全问题。根本原因是因为HashMap是线程不安全的

            所以想要采用线程安全的HashMap,应该采用ConcurrentHashMap

            而ConcurrentHashMap在jdk7和jdk8实现线程安全问题的方式是不同的

          4. ConcurrentHashMap在jdk7下是采用segment分段锁的方式实现的线程安全,在jdk8中是采用的CAS+Synchronized锁的方式实现的线程安全,这里的Synchronized只有在put的时候,对链表的头部节点进行上锁,并不是对整个Map进行上锁,采用的是细粒度锁,而且在jdk6中已经添加了Synchronized从偏向锁到轻量级锁到Monitor重量级锁的升级方式,所以效率有所提升

            segment扮演的锁的角色,实际是继承的ReentrantLock的方式

          5. 为什么采用ConcurrentHashMap,而不采用HashTable?

            HashTable容器使用synchronized来保证线程安全,但在线程竞争激烈的情况下HashTable的效率很低下,因为只有一把监视器锁,当然采用synchronized本来就应该保证只有一把监视器锁,所以后面采用的分段锁的方式。HashTable对get操作和put操作都要上锁,效率低下。ConcurrentHashMap的get操作是不需要上锁的,因为采用了volatile来修饰共享变量,所有线程在get这个读操作都能从主存中获得共享变量的最新值,不会导致读取错误的情况,涉及到内存屏障,所以get操作不需要上锁。

            只有一把监视器锁,导致了当一个线程访问HashTable的同步方法的时候,其他线程也访问HashTable的同步方法时,会进入阻塞或轮询状态,既不能get也不能put。(连get()这种读操作都不可以,并且容易引起线程阻塞,进而造成线程的频繁上下文切换导致开销

          6. 所以ConcurrentHashMap在jdk7下是采用segment分段锁的方式实现的线程安全

            分段锁,通俗理解为有多个数据段,每个数据段对应一把锁,拿到某一个数据段的锁,就可以操作这个数据段的内容。

            当多个线程访问容器里不同数据段的数据时,线程间就不会产生锁竞争,提高效率

            首先将数据分成一段一段地存储,然后给每一段数据配一把锁,当一个线程占用某一段的锁访问其中一个段的数据的时候,其他段的数据也能被其他线程访问。

          7. Segment是一种可重入锁---ReentrantLock,在ConcurrentHashMap里扮演锁的角色

          8. 一个Segment包含一个HashEntry数组,每个HashEntry是一个链表结构的元素

            就相当于一个Segment对应于一个小的Hash表,是数组加链表的结构

            当对HashEntry数组的数据进行修改的时候,必须首先获得与它对应的segment锁

            image-20210910170942805

          9. segment就可以直接理解为锁,分段锁,segment就是锁

          10. 既然ConcurrentHashMap使用分段锁segment来保护不同段的数据,那么必须通过散列算法定位到Segment

            这里的通过散列算法定位,不是用hashCode通过散列算法定位,是将hashCode再散列一次后得到新的hash值,再通过散列算法或者说映射算法定位。

            ConcurrentHashMap会首先使用Wang/Jenkins hash的变种算法对元素的hashCode进行再散列

          11. 进行再散列的原因:

            减少散列冲突,使元素能够均匀地分布在不同的Segment上,加入散列的质量差到极点,那么所有的元素都在一个segment中,这样也失去了分段锁的意义。

            再散列不是指的定位的过程,是指对hashCode再散列的过程,比如int hash = hash(key.hashCode())

            通过再散列之后的hash值,去定位。定位是通过散列算法或映射算法去定位

            • 得到hashCode值
            • 再散列得到新的hash值
            • 通过新的hash值,通过散列函数或者映射算法去定位到segment
          12. get()操作

            • 得到hashCode值
            • 再散列得到新的hash值
            • 通过新的hash值,通过散列算法定位到segment
              • 定位segment使用的是hashCode通过再散列后得到的值即第二步的新的hash值的高位通过散列算法进行定位
            • 再通过散列算法定位到元素
              • 定位HashEntry,使用的是第二步的hash值去通过散列算法去定位。

            HashTable容器的get方法是需要加锁的,ConcurrentHashMap的get操作不需要加锁,共享变量都定义成volatile类型,能够在线程之间保持可见性,能够被多线程同时读,并且保证不会读到过期的值。这里的原理是内存屏障,面试的时候可以多说一说

          13. put()方法

            • 首先定位到segment,和之前get()方法的定位方式相同
            • get()可以不加锁,但是put()必须加锁,是由于put方法是对共享变量进行写入操作
            • 定位到segment之后,首先会尝试获取锁,如果获取失败肯定有其他线程竞争
            • 然后尝试自旋获取锁
              • 如果重试的次数达到了MAX_SCAN_RETRIES,则改为阻塞锁获取,保证能获取成功
            • 对定位到的segment的HashEntry判断是否需要进行扩容。(一个segment对应于一个HashEntry数组,数组的每个元素是链表结构的元素,链表的每个元素为HashEntry)

            ConcurrentHashMap只对某个Segment进行扩容而不会对整个Map进行扩容。

          14. size()方法

            ConcurrentHashMap的做法是先尝试2次通过不锁住Segment的方式来统计各个segment的大小,如果容器的count发生了变化,则再采用加锁的方式来统计所有segment的大小

          15. 用 volatile 修饰了 HashEntry 的数据 value 和 下一个节点 next,保证了多线程环境下数据获取时的可见性

            所以get操作不需要加锁,但是put操作是写操作,需要加锁,segment就是锁,需要先获得segment,才能对segment下的HashEntry进行下一步操作。

            image-20210910171404634

          jdk8 ConcurrentHashMap

          1. 在数据结构上, JDK1.8 中的ConcurrentHashMap 选择了与 HashMap 相同的Node数组+链表+红黑树结构;在锁的实现上,抛弃了原有的 Segment 分段锁,采用 CAS + synchronized实现更加细粒度的锁。

            jdk7是把锁加在每个segment对象上,而jdk8是把锁加在链表的头节点

            jdk8将锁的级别控制在了更加细粒度的元素级别,只需要锁住链表头节点(如果是红黑树,那么锁住红黑树的根节点),就不会影响其他数组元素的读写,大大提高了并发度。

          2. put()

            1. 根据 key 计算出 hash 值;
            2. 判断是否需要进行初始化;
            3. 定位到 Node,拿到首节点 f,判断首节点 f:
              • 如果为 null ,则通过 CAS 的方式尝试添加;
              • 如果为 f.hash = MOVED = -1 ,说明其他线程在扩容,参与一起扩容;
              • 如果都不满足 ,synchronized 锁住 f 节点(这个地方的级别是对链表的头节点进行加锁,并不影响Entry[]数组的其他元素,大大提高了效率),判断是链表还是红黑树,遍历插入;
            4. 当在链表长度达到 8 的时候,数组扩容或者将链表转换为红黑树(扩容还是转换为红黑树,就看当前数组的长度是否是大于64,如果没有大于64,那么扩容,大于64,便转换为红黑树)。
          3. get()

            1. 根据 key 计算出 hash 值,判断数组是否为空;
            2. 如果是首节点,就直接返回;
            3. 如果是红黑树结构,就从红黑树里面查询;
            4. 如果是链表结构,循环遍历判断。

            get 方法和jdk1.7一样,同样不需要加锁。因为 Node 的元素 value 和指针 next 是用 volatile 修饰的,保证了共享变量的可见性,在多线程环境下线程A修改节点的 value 或者新增节点的时候是对线程B可见的。

            这也是它比其他并发集合比如 Hashtable、用 Collections.synchronizedMap()包装的 HashMap 效率高的原因之一。

          4. 总结:

            jdk1.7和jdk1.8的ConcurrentHashMap的put()操作都是要加锁的,分别是分段锁(segment---ReentrantLock)和对链表头节点进行加锁。

            jdk1.7在put的时候会通过自旋获得锁,达到一定次数后,一定能获得锁

            jdk1.8在put的时候是对链表头部节点加锁,并不影响Entry[]数组的其他元素

            而get方法,在jdk1.7和1.8都不需要加锁,原因就是上面第四点说的原因

          5. JDK1.8 中为什么使用内置锁 synchronized替换 ReentrantLock?★★★★★

            • 在 JDK1.6 中,对 synchronized 锁的实现引入了大量的优化,并且 synchronized 有多种锁状态,会从无锁 -> 偏向锁 -> 轻量级锁 -> 重量级锁一步步转换。
            • 减少内存开销 。假设使用ReentrantLock来获得同步支持(ReentrantLock实现原理是AQS抽象队列同步机制),那么每个节点都需要通过继承 AQS 来获得同步支持。但并不是每个节点都需要获得同步支持的,只有链表的头节点(红黑树的根节点)需要同步,这无疑带来了巨大内存浪费。
          6. ConcurrentHashMap 不支持 key 或者 value 为 null 的原因?★★★

            我们先来说value 为什么不能为 null。因为 ConcurrentHashMap 是用于多线程的 ,如果ConcurrentHashMap.get(key)得到了 null ,这就无法判断,是映射的value是 null ,还是没有找到对应的key而为 null ,就有了二义性。

            而用于单线程状态的 HashMap 却可以用containsKey(key) 去判断到底是否包含了这个 null 。

          7. ConcurrentHashMap 的并发度是什么?★★

            并发度可以理解为程序运行时能够同时更新 ConccurentHashMap且不产生锁竞争的最大线程数。在JDK1.7中,实际上就是ConcurrentHashMap中的分段锁个数,即Segment[]的数组长度,默认是16,这个值可以在构造函数中设置。

            如果自己设置了并发度,ConcurrentHashMap 会使用大于等于该值的最小的2的幂指数作为实际并发度,也就是比如你设置的值是17,那么实际并发度是32。如果小于16,那么实际并发度是16.

          8. ConcurrentHashMap 迭代器是强一致性还是弱一致性?★★

            与 HashMap 迭代器是强一致性不同,ConcurrentHashMap 迭代器是弱一致性。

            ConcurrentHashMap 的迭代器创建后,就会按照哈希表结构遍历每个元素,但在遍历过程中,内部元素可能会发生变化,如果变化发生在已遍历过的部分,迭代器就不会反映出来,而如果变化发生在未遍历过的部分,迭代器就会发现并反映出来,这就是弱一致性。

          9. 为什么说JDK1.8 采用CAS+synchronized 保证线程安全?

            1. ConcurrentHashMap 在put时,定位到Node,如果节点为null,采用CAS的方式尝试添加
            2. put时,定位到Node,如果Node不为null,会锁住链表的头节点
            3. 定位到Node,首先需要根据key计算出hash值
          10. JDK1.7 与 JDK1.8 中ConcurrentHashMap 的区别?★★★★★

            • 数据结构:取消了 Segment 分段锁的数据结构,取而代之的是数组+链表+红黑树的结构,就没有segment分段这种说法了。

            • 保证线程安全机制:JDK1.7采用 Segment 的分段锁机制实现线程安全,其中 Segment 继承自 ReentrantLock 。JDK1.8 采用CAS+synchronized 保证线程安全。

            • 锁的粒度:JDK1.7 是对需要进行数据操作的 Segment 加锁,JDK1.8 调整为对每个数组元素加锁(Node)。

            • 链表转化为红黑树:定位节点的 hash 算法简化会带来弊端,hash 冲突加剧,因此在链表节点数量大于 8(且数据总量大于等于 64)时,会将链表转化为红黑树进行存储。

              • 将链表转换为红黑树之前,要判断能否进行扩容,如果能进行扩容,那么要先进行扩容,扩容到数组的容量是64之后,这时如果链表长度大于8,那么就将链表转换为红黑树。

                如果哈希表的长度没有达到64时,先不会把链表变为红黑树,先会扩容,扩容之后,会将原Entry[]数组的数据迁移,这个时候会根据新的容量重新进行散列存储。所以就不一定链表长度超过8,在这之后,超过8,那么转换为红黑树

            • 查询时间复杂度:从 JDK1.7的遍历链表O(n), JDK1.8 变成遍历红黑树O(logN)。

          happens-before的几种规则

          1. 程序顺序规则

          2. 监视器锁规则---对一个锁的解锁,happens-before于随后对这个锁的加锁

          3. volatile变量规则---对一个volatile变量的写,happens-before于任意后续对这个volatile变量的读,涉及到内存屏障

          4. 传递性:如果A happens-before B, 且B happens-before C, 那么A happens-before C

          Last Updated:
          Contributors: shailene
          - +

          并发编程

          进程与线程

          进程

          1. 当一个程序被运行,从磁盘加载这个程序的代码到内存,这就开启了一个进程

            进程是活动的,程序已经被CPU执行了,这就是进程

            程序是静态的,进程是动态的。

          线程

          1. 一个进程之内可以分为一到多个线程,可以认为一个进程是由多个线程组成的。
          2. 一个线程就是一个指令流,将指令流中的一条条指令以一定的顺序交给CPU执行
          3. Java中,线程作为最小的调度单位,进程作为资源分配的最小单位

          二者对比

          1. 进程基本上相互独立,而线程存在于进程内,是进程的一个子集

          2. 进程拥有共享的资源,供内部的线程共享

          3. 不同计算机之间的进程通信,比如客户端和服务器之间的通信,需要遵循共同的协议,如HTTP

            浏览器是一个进程,服务器是tomcat,他们之间的通信需要遵循http

          4. 上下文切换,就是一个任务暂停与继续的这个过程(一个任务从保存到再加载的过程)

          并行与并发

          1. 单核CPU下,线程实际还是串行执行的,只是由于CPU在线程间的切换非常快,所以感觉是并行的,总结就是微观串行,宏观并行

            一般将这种线程轮流执行的,线程轮流使用CPU的做法称为并发

            image-20210904170008584

          2. CPU多核才可以并行

            image-20210904170145964

            每个核心都可以处理一个线程的指令,只要有多个核心,那么就可以同时执行。

          3. 更多的时候是既有并发也有并行

            线程数比核心数多的时候,就是并发和并行都存在

          4. 并不是多线程执行的效率一定比单线程高

            因为有上下文切换、死锁、资源限制

          5. 并发就是同一时间应对多件事情的能力

            并行就是同一时间动手做多件事情的能力

          6. 既有并发又有并行是最常见的场景

          7. 同步:

            从方法调用的角度

            • 如果需要等待结果返回,才能继续运行,就是同步
            • 不需要等待结果返回,就能继续运行,这是异步
          8. 多线程可以让方法执行变为异步的,不需要干等着上一个方法的结果返回

            多个线程同时执行,所以才有线程安全问题,线程之间相互抢占资源

          9. 比如在项目中,视频文件格式转换比较费时,这时新开一个线程处理视频转换,避免阻塞主线程。

          10. 多线程可以充分利用多核,做到并行执行!

            单核CPU同样可以执行多线程,这就是并发,多个线程同时抢占同一份CPU资源。

            image-20210904171814442

          11. 单核是并发,在微观上是串行执行的。

            单核CPU也可以多线程,但是微观上串行,宏观上并行,并不能提高效率,多核CPU才能提高效率,单核时仍然是轮流执行

            而且还可能有死锁、资源限制、上下文切换的影响,导致多线程的执行效率并不一定就比单线程高。

            单核CPU即使用了多线程也没有办法提高效率,因为在微观上是串行的。

            单核CPU用多线程反而比单线程慢,而不是执行时间相等,因为多线程涉及到上下文切换。

            总结:多核CPU用多线程可以做到并行,可以提高执行效率,而单核CPU执行多线程,在微观上串行,并且有上下文切换,反而不能提高执行效率

          12. 并不是说单核CPU下,多线程没有意义

            多核CPU可以并行跑多个线程,但能否提高效率还是要分情况

          Java线程

          创建线程

          1. 使用Runnable接口,对比直接继承Thread的方式,改变的地方是:把任务和线程分离了,而继承Thread的方式,声明Thread对象是和任务在一起的。

          2. 如果一个接口,只有一个抽象方法,那么可以用lambda表达式来简化,接口用FunctionalInterface来修饰,如果一个接口有多个抽象方法是没法用lambda表达式来简化的。

          3. 原理之Thread和Runnable的关系

            • Thread是把线程和任务合并在了一起

              Runnable是把线程和任务分开了

            • 用Runnable更容易与线程池等高级API配合

            • 用Runnable让任务脱离了Thread继承体系,没有单继承的局限性,更灵活

          4. 用FutureTask配合Callable接口和Thread的方式创建线程

            FutureTask能够接收Callable类型的参数,用来处理有返回结果的情况

          5. Callable接口和Runnable接口的差别:

            Callable里的call()方法可以抛出异常,而且比Runnable接口里的run()方法多了一个返回值

          6. 底层是多核来对多线程进行并行的处理还是由一个单核CPU来对多线程进行并发的执行,采用时间片轮转的方式,这是我们控制不了的,是由底层的任务调度器来决定的。

          线程运行的原理

          1. JVM的虚拟机栈、本地方法栈和程序计数器是线程独有的

            虚拟机启动后,虚拟机就会为线程分配一块栈内存

          2. 每个栈由多个栈帧组成,对应着每次方法调用时所占用的内存

            一个栈帧对应着一个方法调用

            每个线程只能有一个活动栈帧,对应着当前正在执行的那个方法。

          3. 一个方法调用完毕后,即返回后,那个方法调用对应的栈帧就没有了,对应的栈帧的内存就被释放掉了,没有垃圾回收,但是存在栈溢出

            PC是两样都没有,而虚拟机栈和本地方法栈是存在栈溢出,但是没有垃圾回收,堆空间和方法区是存在OOM,也有垃圾回收机制

          4. 栈帧里有局部变量表,操作数栈,方法返回地址,动态链接,一些附加信息

          5. 每个线程拥有独立的虚拟机栈

          线程的上下文切换

          1. 线程的上下文切换,是指一个线程暂停,然后恢复执行,这是一次上下文切换
          2. 以下一些原因触发线程的上下文切换(即线程暂停就会出现上下文切换):
            • 线程的CPU时间片用完
            • 垃圾回收(用户线程暂停(stw),垃圾回收线程工作)
            • 有更高优先级的线程需要运行
            • 线程自己调用了sleep 、wait、join、yield等方法
          3. sleep和wait方法都可以使调用方法的线程进入阻塞状态,但是sleep不会释放同步监视器锁,而wait会释放同步监视器锁,而且sleep可以在任何地方调用,但是wait方法只能在同步代码块内或同步方法内调用
          4. 当上下文切换发生时,操作系统需要保存当前线程的状态,并恢复另一个线程的状态,Java中对应的概念就是程序计数器,左边是指令地址(偏移地址),右边是字节码指令,作用就是记住下一条JVM需要执行的字节码指令的指令地址。
          5. 频繁的上下文切换会影响性能,而且考虑到死锁、资源限制,并不是线程数越多越好

          start()与run()

          1. start()表示启动线程,run()表示线程启动后要执行的代码

            不能直接调用run(),因为线程没有启动,还是只有一个线程即主线程

            调用start()方法后,线程会进入就绪状态,等待CPU分配时间片即资源,就可以运行了,就绪状态和运行状态在Java里都称为RUNNABLE状态

          2. 直接调用run是在主线程中执行了run,没有启动新的线程

          3. 使用start是启动新的线程,通过新的线程间接执行run中的代码

          sleep()与yield()

          1. 调用sleep会让当前线程从Runnable进入到Timed Waiting状态(阻塞,或者说一个有时限的等待过程)

          2. 其他线程可以使用interrupt方法打断正在睡眠的线程,这是睡眠的线程会抛出InterruptedException

          3. sleep()方法写在哪个线程中,就让哪个线程睡眠,对当前线程进行睡眠操作

          4. 睡眠结束后的线程未必会立刻得到执行,也要重新等待直到得到cpu时间片分配

          5. 调用yield会让当前线程从Running进入Runnable就绪状态,然后调度执行其他线程

            具体的实现依赖于操作系统的任务调度器

          线程优先级

          1. 线程优先级会提示任务调度器优先调度该线程,但是它仅仅是一个提示,但是调度器可以忽略它。

            如果CPU比较忙,那么优先级较高的线程会获得更多的时间片,但CPU闲时,优先级几乎没有作用

          2. sleep和wait的差别

            • sleep()方法适用于无需同步锁的场景,可以应用在任何地方,而wait()则需要在同步方法或同步代码块中使用
            • sleep()和wait()都是使线程进入阻塞状态,sleep使线程进入timed waiting状态,即一个有时限的等待过程,而调用wait()的线程则需要唤醒
            • 如果两个方法都使用在同步代码块或同步方法中,sleep()不会释放同步监视器,而wait()会释放同步监视器
            • Thread类中声明sleep()方法, Object类中声明wait()
          3. 实现Runnable接口,首先避免了继承Thread类的单继承的局限性。

            并且将线程和任务分开来

          4. 实现Runnable接口和实现Callable接口的区别

            • 一个重写run(),一个重写call()

            • call()方法有返回值,并且返回值可以带泛型,而run()方法不能有返回值

            • run()方法内部有异常的话不能抛出,只能通过try-catch进行处理,但是call()方法内部有异常,可以将异常抛出

            • 实现Callable接口要配合FutureTask使用,比如获取返回值

              // FutureTask的实例化对象的get()方法的返回值即为FutureTask构造器Callable对象的实现类所重写的call()方法的返回值

          5. join()是等待调用join方法的线程运行结束

          6. sleep() 、join()、wait(),suspend()、等待同步锁这五种情况可以让线程从运行状态到阻塞状态。

          interrupt方法

          1. 线程在sleep时,被interrupt打断,会置打断标记为false

            即打断sleep的线程,会清空打断状态

            打断正常运行的线程,不会清空打断状态

            打断park线程,不会清空打断状态

            不会清空打断状态,即打断标记为真

          主线程和守护线程

          1. 有一种特殊的线程叫做守护线程,只要其他非守护线程运行结束了,即时守护线程的代码没有执行完,也会强制结束。
          2. 垃圾回收器线程就是一种守护线程。

          六种状态

          1. NEW ,线程刚被创建,但是还没有调用start()方法

            RUNNABLE当调用了start()方法之后,线程就是RUNNABLE状态,运行状态和就绪状态都是RUNNABLE状态

            从线程的生命周期图来看,是区分了就绪状态和运行状态。比如调用yield方法,会从运行状态到就绪状态。

          2. NEW RUNNABLE BLOCKED WAITING TIMED_WAITING TERMINATED

          3. BLOCKED WAITING TIMED_WAITING 这三种状态,是Java层面的阻塞

            比如sleep()对应就是进入TIMED_WAITING状态

            join(),就是进入WAITING状态

          4. join()是等待调用join()的线程运行结束!

            哪个线程去调用join(),那么这个线程还在运行中!别的线程必须等待调用join的这个线程运行结束才可以运行

            不要认为谁调用join(),谁就进入WAITING状态了

          共享模型之管程

          1. 多个线程共享内存中的资源会造成安全隐患

            如果是多核CPU,那么多个线程并行执行,如果访问内存中的同一个资源,由于线程都是做的不同的任务,肯定会出现安全问题,即结果不确定

            如果是单核CPU,采用的是时间片轮转的方式,**那么线程间仍然是可能访问同一个资源,仍然可能出现线程安全问题。**比如两个线程交替执行,采用时间片轮转的方式,但是他们每次执行都去访问一个静态变量,这个静态变量属于类的结构,随着类的加载而加载,属于共享资源,他们会出现线程安全问题。

            总结:多个线程只要访问的是同一块资源,就可能出现线程安全问题,必须采取相应的措施。

          2. 也就是说多个线程并行执行,去访问同一个资源,会造成线程安全问题。

            单核CPU,多个线程交替执行,由于上下文切换,造成的指令交错,这多个线程又访问同一个资源,出现线程安全问题。

          3. 一个程序运行多个线程本身是没有问题的

            问题出在多个线程访问共享资源

            多个线程读取共享资源其实也没有问题

            在多个线程对共享资源进行读写操作时,发生了指令交错,就会出现问题

          4. 一段代码块内,如果存在对共享资源的多线程读写操作,称这段代码块为临界区

          5. 竞态条件

            多个线程在临界区内执行,由于代码的执行序列不同而导致结果无法预测,称为发生了竞态条件

          synchronized解决方案

          1. 为了避免临界区的竞态条件发生

            阻塞式的解决方案:synchronized,Lock

            非阻塞式的解决方案:原子变量

          2. synchronized俗称对象锁,它会采用互斥的方式让同一时刻至多只有一个线程能持有对象锁。其他线程再想获取这个对象锁时就会阻塞住。

            sleep() join() 等待同步锁 wait() suspend()

            这几种会让线程从运行态到阻塞态。

            这里说的就是等待同步锁。

            一个线程需要某个资源才能执行,这里锁就是这个资源,但是获取不到这个资源,那么这个线程会进入阻塞状态。

          3. synchronized能保证拥有锁的线程可以安全地执行临界区内的代码,不用担心线程上下文切换。

            因为只要这个线程不释放监视器,其他线程就无法执行这块代码

          4. 采用继承Thread的方式创建的线程,要注意同步监视器要使用类的对象,避免直接使用线程对象,因为要保证使用的同步监视器是唯一的。所以这种情况下不能用this

          5. 不要错误理解为拥有锁的线程就能一直执行下去,因为这个线程可能会时间片用完,但是即时这个线程的时间片用完,只要它没有释放锁,其他线程仍然进不来这块代码。只有等这个线程下一次分配到时间片,才会继续进去执行。

          6. 阻塞的线程被唤醒之后也不是说就可以立即执行了,仍然要等CPU分配时间片给这个线程。

            总之线程想要执行某一段代码,除了CPU需要分配给这个线程时间片,还要这段代码的锁(这里讨论的是同步监视器锁的情况),如果获取不到锁,就相当于获取不到资源,那么就会被阻塞。

            线程需要获取到资源才能执行某段代码,如果一直获取不到资源,那么就会被阻塞。当线程执行这段代码需要的资源被释放后,那么这个线程从阻塞态被唤醒,也不能马上执行,而是进入就绪状态,等待CPU分配时间片给这个线程。

          7. synchronized实际是用对象锁保证了临界区内代码的原子性,临界区内的代码执行不会被线程切换所打断。

            比如说某个线程拥有某段代码的锁,即时这个线程时间片用完,只要它没有释放锁,其他线程仍然不能进来执行这段代码,这段代码只有等CPU下一次分配时间片给这个线程,才可以继续执行。

            但千万不要理解为一个线程拥有某段代码的锁,就可以一直执行下去,中间仍然有时间片用完的过程,仍然存在上下文切换,但是被锁住的这段代码保证了原子性。

            **即时发生了上下文切换,这段代码也不会让其他没有拥有锁的线程来执行。**只有等这个拥有锁的线程下一次分配到时间片

          8. 再一次说明了即使是单核CPU通过时间片轮转的方式交替执行线程,仍然会出现线程安全问题,不要以为在微观上是串行的,实际没有线程同一时刻去操作同一个资源,就不会存在线程安全问题,关键在于时间片会用完,结果没保存的情况下,某个资源又被另一个线程去执行。关键在于多个线程操作共享数据,即时他们不是在同一时刻操作共享数据,而是在多个时间段操作共享数据,仍然会出现线程安全问题。因为上下文切换,发生指令交错

          9. 操作共享数据的代码,即为需要被同步的代码

            共享数据:多个线程共同操作的变量。

          变量的线程安全分析

          1. 成员变量和静态变量

            • 如果他们没有被共享,则线程安全
            • 如果他们被共享
              • 如果只有读操作,则线程安全
              • 如果有读写操作,则这段代码是临界区,需要考虑线程安全问题
          2. 局部变量是线程安全的

            局部变量是在栈的栈帧里。栈是线程私有的,所以局部变量是线程安全的

            局部变量引用的对象:

            • 如果该对象没有逃离方法的作用范围,它是线程安全的
            • 如果该对象逃离方法的作用范围,需要考虑线程安全
          3. i++虽然在字节码指令层面,分为好几条字节码指令,不是原子操作,但是这几条字节码指令不被线程所共享。

          Monitor概念

          1. Java对象在堆空间中被实例化以后,主要分为两部分

            • 对象头

              • 运行时元数据(Mark Word)----hashcode,分代年龄(从幸存者区到老年代),偏向锁,加锁状态
              • 类型指针---指向方法区中这个对象的类的信息,通过这个指针可以找到类对象
              • (如果是数组,还有数组的长度的信息)

              image-20210906143610290

              运行时元数据Mark Word格式:

              image-20210906171812809

            • 实例数据(真正的有效数据,成员变量等等)

          2. 包装类型比基本类型占用的空间大。从对象头的角度就可以看出来。

          3. Monitor是非常重要的概念,也是Synchronized锁底层的原理。

            Monitor被翻译为监视器或管程

          4. 每个Java对象都可以关联一个Monitor对象,如果使用synchronized给对象上锁(重量级)之后,该对象头的Mark Word中就被设置指向Monitor对象的指针。

          5. synchronized上锁给代码块上锁,或者采用同步方法的方式,底层原理都是给对象上锁。

            image-20210906144113619

          6. 一个对象在堆空间中分为对象头和实例数据

            对象头里有运行时元数据(Mark Word)和类型指针,如果是数组还有数组的长度信息,在运行时元数据里就有hashcode,分代年龄,偏向锁和加锁状态的信息。

            给一个对象上锁之后,这个Java对象的对象头的运行时元数据(Mark Word)就指向(关联)一个Monitor对象。运行时元数据里存储了一个指向Monitor的地址指针

          7. Monitor里的属性

            • Owner,是锁的所有者

              Monitor的这个Owner只能有一个所有者。

            • EntryList,是等待队列

              比如当前Monitor的Owner,即拥有当前这个Monitor的线程是Thread1,那么当Thread2来判断是否可以访问这段临界代码时,首先判断这个锁对象obj的运行时元数据(Mark Word)有没有指向Monitor的指针,即有没有关联一个Monitor对象,如果有,再判断这个Monitor的Owner有没有所有者,如果有的话,就进入EntryList等待队列(或者叫阻塞状态),那么这个Thread2本身进入阻塞状态(BLOCKED),等待其他线程释放对Monitor的所有权。

              如果此时又有一个线程来了,也要来执行这段临界代码,首先发现obj关联了Monitor对象,然后Owner有主人,也进入EntryList阻塞队列,那么该线程,从运行状态也进入阻塞状态(BLOCKED)

              当一个线程需要某样资源继续执行的时候,但是又获取不到这样资源,那么会进入阻塞状态。

              上面说的线程进入阻塞状态的情况,是等待同步锁,然后进入阻塞状态。

              一个线程从运行状态进入阻塞状态,有以下五种情况

              • join()---由RUNNABLE到WAITING
              • sleep()----由RUNNABLE 到 TIMED_WAITING
              • wait()---由RUNNABLE到WAITING
              • suspend() (已经deprecated)
              • 等待同步锁---由RUNNABLE到BLOCKED

              BLOCKED, WAITING, TIMED_WATING三种状态在Java的线程状态这个角度来说,都叫阻塞状态

              image-20210906145616412

          8. 对synchronized对代码块或方法上锁的原理描述

            • 刚开始Monitor中Owner为null
            • 当Thread-2执行synchronized(obj)就会将Monitor的所有者Owner置为Thread-2,Monitor中只能有一个Owner
            • 在Thread-2上锁的过程中,如果Thread-3,Thread-4,Thread-5也来执行synchronized(obj),就会进入EntryList 由运行态到BLOCKED
            • Thread-2执行完同步代码块的内容,即临界区的代码,然后唤醒EntryList中等待的线程来竞争锁,竞争的时候是非公平的。
          9. JVM基于进入和退出Monitor对象来实现同步方法和同步代码块

            但两者的实现细节不一样,代码块同步是使用monitorenter和monitorexit字节码指令实现的,而方法同步是使用另外一种方式实现的,细节在JVM规范里并没有详细说明,但是,方法的同步同样可以使用这两个指令来实现。

            monitorenter指令是在编译后插入到同步代码块的开始位置,而monitorexit是插入到方法结束处和异常处

            JVM要保证每个monitorenter必须有对应的monitorexit与之配对。

            任何对象都有一个monitor与之关联,当且一个monitor被持有后,它将处于锁定状态,线程执行到monitorenter字节码指令时,将会尝试获取上锁对象所对应的monitor的所有权,即尝试获得对象的锁

          10. synchronized必须是进入同一个对象的monitor才有效果,所以一定要保证同步监视器只有一个。

          synchronized进阶原理

          1. synchronized工作方式是让对象关联monitor对象,但是monitor这个锁是由操作系统提供的,使用Monitor成本比较高,如果每次进入synchronized(xxx)都要获取Monitor锁,对程序运行的性能是有影响的。

          2. 从Java6对synchronized关键字获取锁的方式进行了改进和优化。

            从直接使用Monitor锁改成了可以使用轻量级锁和偏向锁

          3. Monitor是属于重量级锁

          4. 没有竞争的时候,就是说如果使用共享资源的时间是错开的时候,可以使用轻量级锁,如果使用共享数据的时间没有错开,那么轻量级锁也会升级为重量级锁。

          5. jdk1.6版本,为了减少获得锁和释放锁带来的性能消耗,引入了偏向锁和轻量级锁,在jdk1.6中,锁一共有4种状态,级别从低到高依次是:无锁状态、偏向锁状态、轻量级锁状态和重量级锁状态。这几个状态会随着竞争情况逐渐升级,锁可以升级但是不能降级,意味着偏向锁升级为轻量级锁之后不能降级成偏向锁。

          轻量级锁

          1. 轻量级锁的使用场景:如果一个对象虽然有多线程访问,但多线程访问的时间是错开的(也就是没有竞争),那么可以使用轻量级锁来优化。

            如果有竞争,轻量级锁会升级为重量级锁

            轻量级锁的语法仍然是synchronized

          2. 轻量级锁工作原理

            1. 在线程的虚拟机栈的栈帧创建锁记录(Lock Record)对象

              每个线程的栈帧都会包含一个锁记录的结构。

              内部可以存储锁定对象的Mark Word(运行时元数据)

              image-20210906162329611

              这个Lock Record包含了两部分

              • 一部分是对象指针,锁住哪个对象,得知道对象地址,这一部分就是指向加锁对象的对象引用
              • 另一部分是锁记录地址和后两位标识00(00代表轻量级锁),这一部分将来用来存储加锁对象的Mark Word
            2. 让锁记录中Object reference指向锁对象,并尝试用cas替换Object的Mark Word,将Mark Word的值存入锁记录(关键)。

              做这一步交换的操作就表示加锁

              image-20210906162952714

            3. 如果CAS替换成功,对象头中存储了锁记录地址和状态00表示这个对象已经加了轻量级锁

              锁记录里面存放了对象的对象头的Mark Word(运行时元数据--hashcode,分代年龄等)

              将来解锁的时候,再恢复回去

              image-20210906163537132

              上面说的是成功的情况,如果对象的对象头的Mark Word标记位是01,代表是正常情况,没有加锁,那么这种情况,交换可以成功,即加锁可以成功

            4. 如果CAS替换失败,有两种情况

              • 如果是其他线程已经持有了该Object对象的轻量级锁(Object对象对象头里标记是00),这时表明有竞争,进入锁膨胀过程

              • 如果是自己执行了synchronized锁重入,那么再添加一条Lock Record作为重入的计数。

                但是这种失败没关系,因为是同一个线程又对同一个对象加锁,也会在新的栈帧(虚拟机栈的存储单位)里创建锁记录,锁记录地址部分存为null,这种情况叫做synchronized锁重入

                image-20210906164102507

              CAS操作是原子性的,不会被打断

              总结:同一个线程对同一个对象再加锁,这种情况叫synchronized锁重入

            5. 解锁:

              • 如果有取值为null的锁记录,表示有重入,这时重置锁记录,表示重入计数减一

                image-20210906164652141

              • 当退出synchronized代码块时,锁记录的值不为null,这时使用cas将 Mark Word的值恢复给对象头

                • 成功,则解锁成功
                • 失败,说明轻量级锁进行了锁膨胀或已经升级为重量级锁,进入重量级锁解锁流程

          锁膨胀

          1. 如果在尝试加轻量级锁的过程中,CAS操作无法成功,这时一种情况就是有其他线程为此对象加上了轻量级锁(有竞争),这时需要进行锁膨胀,将轻量级锁变为重量级锁。

          2. 锁膨胀过程

            • 当Thread-1进行轻量级加锁时,Thread-0已经对该对象加了轻量级锁

              image-20210906165418735

            • 这时Thread-1加轻量级锁失败,进入锁膨胀流程

              • 即为Object对象申请Monitor锁,让Object对象指向重量级锁地址。并且Mark Word后两位会变为10,表示重量级锁。
              • 然后自己进入Monitor的EntryList 进入阻塞状态BLOCKED

              image-20210906165650753

            • 当Thread-0退出同步块解锁时,使用cas将Lock Record中Mark Word的值恢复给对象头,失败

              进入重量级锁解锁流程。即按照Monitor地址找到Monitor对象,设置Owner为null,唤醒EntryList中BLOCKED线程

          自旋优化

          1. 线程阻塞,那么就要发生一次上下文切换,这是比较耗费性能的。

            重量级锁竞争的时候,还可以使用自旋来进行优化,如果当前线程自旋成功(即这时候持锁线程已经退出了同步块,释放了锁),这时当前线程就可以避免阻塞。

            意思就是不立刻去EntryList,进入阻塞状态,而是循环几次,就是自旋

          2. 自旋要使用CPU,所以自旋优化适合多核CPU,这样才有意义,否则单核CPU,正在被持锁线程所占有,那么这个线程自旋,就没有意义。

          3. 如果持锁线程1迟迟没有释放锁,那么线程2自旋重试失败,仍然进入EntryList,进入阻塞态。

          4. 自旋会占用CPU时间,单核CPU自旋就是浪费,多核CPU自旋才能发挥优势。

          偏向锁

          1. image-20210906171021229

          2. image-20210906172322150

          3. 偏向锁的语法仍然是synchronized

            默认开启偏向锁,初始线程ID是0,上锁之后(加了synchronized),才有线程ID

            释放了锁之后,对象的对象头的Mark Word里的线程ID仍然是之前的线程ID,这就是偏向!

          4. 加锁的优先顺序是

            • 偏向锁
            • 轻量级锁
            • 重量级锁(线程2想进入临界代码,发现锁对象已经被线程1加轻量级锁,这时就通过锁膨胀,给Object对象加重量级锁)
          5. 偏向锁的撤销

            • 当一个默认打开偏向锁的对象,调用了hashcode()之后,会撤销这个对象的偏向锁状态,因为如果开了偏向锁,要存线程ID那些数据,对象头里便存不下hashcode,所以就把偏向锁状态关闭。

              轻量级锁的对象的hashcode会存在线程的栈的栈帧里的lock record的锁记录地址部分,解锁的时候会恢复给对象。

              重量级锁的对象的hashcode会存在monitor对象里,所以不会影响。

            • 偏向锁本质就是只有一个线程在使用,线程多了之后,产生竞争,锁自然会升级。

              当有其他线程使用偏向锁对象(synchronized括号内的对象)时,会将偏向锁升级为轻量级锁。

              解锁之后,这个对象就是不开启偏向锁的状态

              这也是偏向锁的撤销。

          6. 偏向锁在jdk6和7里是默认启用的,但是它在应用程序启用几秒钟后才能生效,如有必要可以使用JVM参数来关闭延迟:-XX:BiasedLockingStartupDelay = 0,如果确定应用程序里所有的锁通常情况下处于竞争状态,可以通过JVM参数关闭偏向锁,那么程序默认会进入轻量级锁状态。

          7. 批量重偏向

            过程:

            假如锁对象被两个线程访问,但是没有竞争,这时偏向了线程T1的对象仍然有机会重新偏向T2

            重偏向会重置对象的对象头里的Mark Word的线程ID

            • 线程T1,给一个对象重复上锁,线程T2调用wait(),进入阻塞态,所以此时只有T1来给对象上锁,并且在一个循环内多次上锁,那么上的是偏向锁,因为没有竞争(循环30次)
            • 循环完之后,唤醒T2线程,T2线程访问对象,此时发现对象已经被上了偏向锁,那么就如上面说的,会进行偏向锁的撤销,首先会将偏向锁升级为轻量级锁,解锁之后,这个对象就是不开启偏向锁的状态即撤销了偏向锁
            • 上面这一步要进行19次(前19次的对象都已经变成了不可偏向的状态),到第20次的时候,JVM会觉得之前偏向T1偏向错了,于是在给这些对象加锁时,重新偏向T2线程。
          8. 批量撤销

            当撤销偏向锁阈值超过40次后,JVM会觉得偏向错了,不应该采取偏向锁,于是整个类的所有对象都会变为不可偏向的,新建的对象也是不可偏向的。

          9. 批量重偏向和批量撤销,都是属于优化。

          锁消除

          1. 锁消除开关是默认打开的,JVM会自动消除掉没有意义的锁
          2. 因为上锁和解锁都是有成本的,而且上锁会导致有的线程获取不到锁进而会到阻塞状态,这个过程会引起线程的上下文切换,也要消耗成本

          wait-notify

          1. 被唤醒后的线程,是进入就绪状态,与其他线程一起等待CPU分配时间片,再执行,而不是被唤醒后马上执行

            被唤醒后的线程重新进入竞争锁的队列

          2. wait()、notify()、notifyAll()

            • 这三个方法只能出现在同步代码块和同步方法中

            • 以上这三个方法的调用者必须是同步代码块或同步方法中的同步监视器。

            • 以上这三个方法是定义在java.lang.Object中的。因为同步监视器任何一个对象都可以充当,结合第二点,任何一个对象都必须能够调用以上三个方法,说明,任何一个对象都有这三个方法,所以这三个方法是声明在Object类中。

          3. 原理

            image-20210906200431146

            • Owner线程发现条件不满足,调用wait()方法,即可进入WaitSet变为WAITING状态

            • BLOCKED和WAITING的线程都处于阻塞状态,不占用CPU时间片

            • BLOCKED线程会在Owner线程释放锁时唤醒

            • WAITING线程会在Owner线程(同步监视器锁对象)调用notify或notifyAll时唤醒。

              但是唤醒后并不意味着立刻获得锁,仍需进入EntryList(BLOCKED的对象在这里)重新竞争。

            • wait()、join()是进入waiting状态

            • yield()是从running到runnable就绪状态,让出时间片但是不阻塞

            • 时间片用完也是从running到runnable就绪状态,不阻塞,回到就绪状态等待下一次时间片分配

            • sleep是到timed_waiting状态

            • 等待同步锁是到BLOCKED状态。

              要区分WAITING状态和BLOCKED状态。

            • WAITING状态的线程通过notify()或notifyAll()唤醒,唤醒后的线程仍然要进入EntryList队列,等待CPU资源分配
            • BLOCKED状态通过线程释放锁唤醒
          4. 锁和时间片都可以理解为CPU的资源

          5. obj是同步监视器锁对象

            • obj.wait()让进入object监视器(monitor)的线程到waitSet等待
            • obj.notify()在object上正在waitSet等待的线程中挑一个唤醒
            • obj.notifyAll()在object上正在waitSet等待的线程全部唤醒

            以上三个方法都属于Object对象的方法

            要注意只有当某个线程获取到锁之后,才能调用以上这三个方法

            注意,调用wait(),是使本线程进入到WAITING状态(阻塞状态)

            而调用notify和notifyAll是唤醒别的线程

          6. image-20210906204102015

          同步模式之保护性暂停

          1. join()的实现采用的就是此模式,一个线程等另一个线程执行完之后再执行。
          2. join()使线程进入WAITING状态
          3. 这种模式是在两个线程间交互结果的模式
          4. image-20210906211624798

          join原理

          1. 保护性暂停是一个线程等待另一个线程的结果

          2. join()是一个线程等待另一个线程的结束

          3. 设置了最大等待时间

            image-20210906221104293

          异步模式之生产者消费者模式

          1. 与保护性暂停模式不同,不需要产生结果和消费结果的线程一一对应。
          2. 生产者仅负责产生结果数据,不关心数据该如何处理,而消费者专心处理结果数据
          3. 消息队列是有容量限制的,满时不会再加入数据,空时不会再消耗数据
          4. 和保护性暂停的共同点都是处理多个线程间的结果的交互

          park和unpark

          1. image-20210907152327885

          2. 原理:

            先调用park,再调用unpark

            image-20210907153022187

            image-20210907153037877

            先调用unpark,再调用park

            image-20210907153118988

          线程状态转换

          1. 情况1 NEW---> RUNNABLE

            当调用t.start() 方法时,由NEW ---> RUNNABLE

          2. 情况2 RUNNABLE ---> WAITING

            t线程用synchronized(obj)获取了对象锁后

            • 调用obj.wait() 方法时,t线程从RUNNABLE ---> WAITING
            • 调用obj.notify() , obj.notifyAll(), t.interrupt() 时
              • 竞争锁成功,t线程从WAITING --> RUNNABLE
              • 竞争锁失败, t线程从WAITING ---> BLOCKED
          3. 情况3 RUNNABLE ---> WAITING

            • 调用t线程.join()方法,要注意一定不是t线程从RUNNABLE ---> WAITING

              是当前线程进入WAITING而不是t线程,是当前线程等待t线程运行完!

              注意当前线程是在t线程对象的监视器上等待。

            • t线程运行结束,或调用了当前线程的interrupt(),会让当前线程从WAITING -- RUNNABLE

          4. 情况4 RUNNABLE ---> WAITING

            • 当前线程调用LockSuppor.park()方法会让当前线程从RUNNABLE -- WAITING (从原理上分析过了,也不一定,要看counter的状态。)
            • 调用LockSupport.unpark(目标线程)或调用了线程的interrupt(),会让目标线程从WAITING -- RUNNABLE
          5. 情况5 RUNNABLE -- > TIMED_WAITING

            • Thread.sleep(long time)

            • obj.wait(long time)

            • 当前线程调用t.join(long n)方法时,当前线程从RUNNABLE---TIMED_WAITING,当前线程等待t线程运行。

              当前线程等待时间超过了n毫秒,或t线程运行结束,或调用了当前线程的interrupt时,当前线程从TIMED_WAITING --- > RUNNABLE

          6. 情况6 RUNNBALE -- > BLOCKED

            • t线程用synchronized(obj)获取对象锁时,如果竞争失败,从RUNNABLE -- > BLOCKED

          ReentrantLock

          1. 使用jconsole可以检测死锁

          2. 饥饿,一个线程由于优先级太低,始终得不到CPU调度执行,也不能够结束

          3. 用ReentrantLock可以解决死锁和饥饿现象。

          4. ReentrantLock是可重入锁,是JUC并发工具包下的一个重要的类

          5. 相对于synchronized,它具备如下特点:

            • 可中断(synchronized加上锁之后,是不可以中断的。),加入打断机制可以防止线程等待锁时无限制地等待下去。为了避免死等。

              lock.lockInterruptibly()

            • 可以设置超时时间(规定时间内,如果获取不到锁,就放弃争这个锁了,去执行一些其他的逻辑),也是防止线程因为等待锁进入阻塞状态时,防止线程无限制地等待下去。一定时间之后,就不再阻塞了,不再无限制地等待下去。

              lock.tryLock()

              这种方式同样支持打断。括号里可以填入时间参数,表示等待多长时间,如果这段时间没有获取到锁,那么就不会再继续等待。

              用tryLock()可以解决哲学家就餐问题

            • 可以设置为公平锁(防止线程饥饿的情况)

              ReentrantLock默认是不公平的

            • 支持多个条件变量。(不像synchronized只有一个waitSet,比如要用notifyAll叫醒线程,会把等待的线程都叫醒,而ReentrantLock可以对waitSet进行细分,相当于这个意思)

            • 与synchronized一样,都支持可重入。

          6. 可重入---同一个线程对同一个锁的重复获取

            是指同一个线程如果首次获得了这把锁,那么因为它是这把锁的拥有者,因此有权利再次获得这把锁。

            如果是不可重入锁,那么第二次获得锁时,自己也会被锁挡住。

          7. Synchronized的monitor锁是不公平锁

            谁先抢到谁就拥有锁,而不会按照阻塞队列的顺序先来先得。所以是不公平的。

            **ReentrantLock默认是不公平的,**但是可以通过构造方法设置是公平还是不公平。

            公平锁一般没有必要,会降低并发度

            公平锁是按照等待队列,先入先得的方式实现的。

          8. 公平锁本意是解决饥饿问题的,但是实际上没有必要,用tryLock可以解决。

            一般都不会设置为公平锁。

          9. ReentrantLock默认是不可打断的。

          10. image-20210907164801520

          和之前的wait-notify-notifyAll相比,是根据条件变量来叫醒。

          调用await()之前,必须获得锁才有资格。(和wait,notify,notifyAll一样)

          注意调用await()和signal()方法的对象是Condition对象。

          1. ReentrantLock的lock()、unlock()必须成对出现,手动解锁,而synchronized关键字不需要

          本章小结

          1. 同步解决的问题和互斥解决的问题不一样

            互斥主要保证共享资源的互斥效果,一段临界区代码在在某一段时间内只能由一个线程去执行

            而同步指的是某个线程拿到其他线程执行代码的结果之后才可以被唤醒继续进入阻塞队列去竞争锁。也就是某个线程需要资源,但是得不到资源,于是进入阻塞队列,但是获得资源后,便被唤醒进入就绪状态,一定要注意,这里被唤醒是进入就绪状态而不是直接执行,仍然要等待CPU分配时间片。

          2. 线程获取不到锁,是进入EntryList阻塞队列

            而线程某样条件不满足,是进入WaitSet休息室,可以这么理解。

            平时都把锁和线程需要获得的其他资源都看作线程需要的资源,但是从线程差哪样东西而进入哪种状态来看,需要把锁和线程需要的某些条件分开

            线程需要锁但是没有获得,于是进入BLOCKED状态

            线程需要资源但是没有获得,进入WAITING状态。

          3. Synchronized和Lock默认都是非公平的,不过ReentrantLock可以设置公平锁。

          4. Synchronized

            • monitor,JVM层面的重量级锁
            • 轻量级锁
            • 偏向锁
          5. 互斥是指共享资源的互斥效果

            同步是指使用条件变量waitSet来达到线程间的通信效果。

          并发之共享模型

          1. JMM---Java内存模型

            • 原子性--保证指令不会收到线程上下文的切换
            • 可见性--- 保证指令不会受CPU缓存的影响
            • 有序性---保证指令不会受CPU指令并行优化的影响
          2. JMM定义了

            • 主存---成员变量等,共享数据
            • 工作内存----线程的私有数据,比如局部变量等
          3. 加了volatile的意思就是说就不能从缓存即线程的工作内存中读取了,每次都必须从主存中读取变量的最新值。

          4. volatile可以用来修饰成员变量和静态成员变量

            不能修饰局部变量,因为局部变量是线程私有的,不允许共享。

            它可以避免线程从自己的工作缓存中查找变量的值,必须到主存获取它的值

            线程操作volatile变量都是直接操作主存

          5. 可见性就是说当热点代码的变量被缓存到线程的工作内存中,而要对某个变量进行修改,是在主存中进行修改。

            那么线程能不能获取到这个主存中的修改的变量,还是继续在自己的工作缓存中找这个变量。

            就是这个修改的变量对于线程是否可见。

          6. synchronized也能保证变量的可见性,但是要创建monitor锁,也就是同步监视器锁,是比较重量级的操作

            但是volatile是比较轻量级的

            如果只是要保证可见性,那么推荐volatile

          7. 一个变量加了volatile修饰,保证的是一个线程对volatile变量的修改,对另一个线程可见,不能保证原子性。仅用在一个线程是修改变量,另外的线程只是读取变量

          8. volatile只是保证线程能看到变量的最新值,并不能解决指令交错,即并不能保证某段代码的原子性。

            synchronized既能保证代码块的原子性也能保证代码块内变量可见性。缺点就是属于重量级操作,性能更低

          9. i++,i--这种操作,在字节码指令层面,他们的指令不是原子性的。可能产生指令交错。

          10. 两个线程共享某个变量,volatile就是保证这两个线程对这个变量的可见性,即修改了之后线程也能获得这个变量的最新值。而不是获得之前线程的工作内存(缓存)的变量的值。

          指令重排序优化

          1. 在不改变程序结果的前提下,这些指令的各个阶段可以通过重排序和组合来实现指令级层面的并行。
          2. CPU在某一刻执行多条指令的不同阶段,不改变程序结果。
          3. 如果下一条指令依赖上一条指令的结果,那么这种情况就不能重排序。

          volatile原理

          1. volatile的底层实现原理是内存屏障

          2. 对volatile变量的写指令后会加入写屏障

            对volatile变量的读指令前会加入读屏障

          3. 写屏障保证在该屏障之前的,对共享变量的改动,都同步到主存当中

            读屏障保证在该屏障之后的,对共享变量的读取,加载的是主存中最新数据

          4. 写屏障之前的代码可以保证不会发生指令重排,就是写屏障之前的代码不会出现在写屏障后。

            读屏障会保证读屏障之后的指令不会因为指令重排序出现在读屏障前。

            写屏障和读屏障都是对volatile修饰的变量进行修改和读取时附带的屏障。

          5. volatile保证了共享变量的可见性和有序性,但是不能解决指令交错

            有序性的保证只是保证了本线程内相关代码不被重排序,通过写屏障和读屏障。

          6. 饿汉式单例模式,类加载就会导致该单实例对象被创建

            懒汉式,类加载不会导致该单例对象被创建,而是首次使用该对象时才会创建。

          共享模型之无锁(非阻塞)

          1. 管程也叫monitor或监视器锁

            是悲观锁

          2. CAS与volatile结合就可以实现无锁并发。

          3. CAS与volatile结合的工作方式

            image-20210908142615745

            compareAndSet比较并设置值,在CPU的指令级别或者说字节码指令级别可以实现其原子性。

          4. image-20210908143216090

            CAS可能会失败,就是如果cas的第一个参数的值和调用cas方法的对象的属性的最新值不相同(不相同是因为,在获取到“最新值”之后,执行之后的逻辑时,有其他的线程进来操作这个共享变量,导致之前获取的最新值已经不是最新了),就会失败,失败之后会继续下一次循环,继续获得最新值,再执行之后的逻辑。

          5. cas需要volatile的支持,cas必须借助volatile才能读取到共享变量的最新值来实现比较并交换的效果。

            volatile可以保证共享变量的可见性和相关代码的有序性,但是它不能解决指令交错的问题,它不能保证代码块的原子性。而CAS的操作在字节码指令层面是原子的,不可被打断。所以CAS和volatile结合起来可以实现无锁并发。

            synchronized关键字可以保证代码块的原子性和代码块内部共享变量的可见性。

            • 原子性 -- synchronized
            • 可见性--synchronized,volatile
            • 有序性---volatile
          6. cas是比较和设置,涉及到比较,指的就是即使失败,下一次进去循环,仍然能够获取到最新值,用当前最新值来进行比较,即使这个过程中,最新值被另一个线程所修改而不是最新值,在下一次循环仍然能够拿到最新值比较。那么要保证每次循环都能拿到这个最新值,就要volatile的配合。

          7. 无锁情况下,即使重试失败,线程始终在高速运行,没有停歇

            而synchronized会让线程在没有获得锁的时候,发生上下文切换,进入阻塞。

            image-20210908144636043

            无锁状态也可能会有上下文切换,只不过这里不是进入阻塞状态,而是因为没有分到时间片从运行态进入就绪状态(可运行状态),还是会导致上下文切换。

          8. 在线程数小于CPU核心数的时候,用CAS是非常合适的。

          9. CAS是基于乐观锁的思想,不怕别的线程来修改共享变量,而synchronized是拿到锁,禁止其他线程来修改共享变量,而CAS+volatile是不怕别的线程修改共享变量,大不了自己再重试几次,结合volatile每次都可以从主存拿到最新修改的值,来重试。

            乐观锁虽然有一个“锁”字,但是其实没有上锁

          10. synchronized是基于悲观锁的思想,禁止其他线程来修改共享变量,拿到锁的线程解开锁,别的线程才可以进来。

          11. CAS保证了原子性,volatile保证了共享变量的可见性,那么通过不断重试总能拿到正确的最新值,不怕别的线程对共享变量进行修改,所以说这是乐观锁。

          12. CAS体现的是无锁并发、无阻塞并发。(当线程数大于CPU核心数的时候,还是可能出现线程的上下文切换,但是不会有阻塞,这里的上下文切换是线程由运行状态到可运行状态引起的。)

            • 没有使用synchronized,线程不会陷入阻塞,这是效率提升的因素之一

            • 但是如果竞争激烈,重试必然频繁发生,反而效率会受影响。

          13. value.compareAndSet(int expect, int update)

            会把第一个参数期望值和value的最新值做对比,如果一致,那么可以用后面的update,更新value,如果更新失败则返回false

          14. ++i,i++这种操作在字节码层面不是原子性的,所以可能会出现线程安全问题,在字节码层面,会出现指令交错,比如多个线程对i这个共享变量,进行这类操作。

          15. 原子整型AtomicInteger里会维护一个value值,这个value值,就是会用CAS来保证它的线程安全,CAS保证指令的原子性,但是这个value值是用了volatile来修饰保证了它的可见性,就是它每一次修改之后,都保证能在主存拿到最新值来进行比较和设置。

            image-20210908152216836

          16. CAS应用在线程数比较少的时候,最好是不要超过CPU核心数。

          17. AtomixStampedReference可以给原子引用加上版本号,追踪原子引用整个的变化过程,可以知道引用变量中途被更改了几次

            如果只是单纯关心原子引用变量是否更改过,就用AtomicMarkableReference

          原子累加器

          1. 原子累加器 LongAdder性能提升的原因:

            在有竞争时,设置多个累加单元,最后将结果汇总,这样他们在累加时操作的不同的cell变量,因此减少了CAS重试失败。从而提高了性能。

          final原理

          1. final变量的赋值也会通过putfield指令来完成,同样在这条指令后也会加入写屏障

            写屏障就是之前的指令不会在写屏障之后执行,写屏障之前对变量的修改会同步到主存中

            加入了写屏障,保证在其他线程读到它的值时不会出现为0的情况

          2. 如果一个成员变量不加final修饰,那么相当于是给一个变量赋值。这个变量先要默认赋初始值0,然后才会显式赋值。其他线程有可能会看到这个0从而导致线程安全问题。

            在类加载过程中的链接阶段的准备阶段,会给成员变量中的静态属性默认赋初始值,然后在初始化阶段给其显式赋值。这个准备阶段,不会给成员变量中的非静态属性赋值,因为非静态属性是属于对象的变量,需要随着对象的创建而被分配在堆空间中,也不会给final修饰的静态属性赋值,因为final修饰的静态属性早在编译阶段就会进行赋值了。

            类加载过程中的初始化阶段,<clinit>,给静态属性显式赋初始值,执行静态代码块内的内容。

          自定义线程池

          1. 我们应该充分利用已有线程的潜力,不应该每次一有任务都新建新的线程,不然线程很多,会频繁地出现上下文切换,甚至是死锁,还有系统资源限制的问题,都说明了线程不是越多越好,所以要充分利用已有线程。

          2. 每创建一个线程都要占用一定内存,要分配虚拟机栈等线程私有空间

            如果创建很多线程

            • 对内存的占用大,也就是系统资源限制问题
            • 上下文切换导致效率不高
            • 死锁
          3. 线程一定不是创建得越多越好。

          4. 线程池就是创建一些线程,让线程能够得到重复的利用,线程用完了,不销毁,放进线程池。

          5. 线程池

            • jdk提供的功能完备的线程池
            • 自定义线程池
          6. 自定义线程池分成以下组件

            • 线程池,里面有可重用的线程
            • 阻塞队列,平衡生产者线程、消费者线程速度差异的组件
            • 线程的生产者

            image-20210908183204652

          jdk定义的线程池

          线程池状态

          1. image-20210908205551426

            ExecutorService是线程池的最基本的接口,提供了提交任务,关闭线程池等方法。

            ScheduledExecutorService新增了调度任务的功能,用于定时执行任务

            ThreadPoolExecutor是最基础的实现

            ScheduledThreadPoolExecutor是带有任务调度功能的线程池实现

          2. 让有限的工作线程(Worker Thread)来轮流地异步地处理无限多的任务,线程池做的就是这个事情。

          3. 线程池状态

            ThreadPoolExecutor使用int的高3位来表示线程池状态,低29位表示线程数量

            image-20210908205814692

            线程池状态和线程数量存储在一个原子变量ctl中,目的是将线程池状态与线程个数合二为一,这样就可以用一次cas原子操作进行赋值。

          构造方法

          1. 线程池的构造方法

            image-20210908210307737

            阻塞队列指的是任务阻塞队列。要清楚任务是什么,看泛型很清楚,里面写的Runnable,Runnable或Callable接口的实现类的对象就是任务对象

          核心线程和救急线程

          1. 线程池中的线程分为两种

            • 核心线程
            • 救急线程

            核心线程数 + 救急线程数 = 最大线程数

          2. 救急线程用于任务量特别大,任务如果没有核心线程来执行,那么会进入阻塞队列,当阻塞队列都放不下了,来的下一个任务会交给救急线程去执行。

            image-20210908211936243

          3. 救急线程和核心线程最大的区别是:

            救急线程有生存时间,任务执行完了,救急线程会销毁,下一次高峰期来了,才会再创建

            核心线程没有生存时间,执行完任务,仍然会保留在线程池中。

            • 线程池中刚开始没有线程,当一个任务提交给线程池后,线程池会创建一个新线程来执行任务
            • 当线程数达到corePoolSize后,并没有线程空闲,这时再加入任务,新加的任务会被加入workQueue队列排队,直到有空闲的线程。
          4. 如果线程数达到maximumPoolSize,仍然有新任务这时会执行拒绝策略,拒绝策略jdk提供了4种实现:

            image-20210908212728493

            image-20210908212946761

          5. jdk提供了Executors工具类,这个工具类提供了很多工厂方法来创建各种用途的线程池,但是内部就是调用构造方法,传递不同参数,创建线程池

          6. 总结:

            线程数达到corePoolSize:

            • 新加的任务加入任务阻塞队列排队,直到有空闲的线程
            • 若任务阻塞队列已满(即任务阻塞队列已经放不下新加的任务):
              • 救急线程来执行新加的任务
              • 若核心线程数 + 救急线程数 即最大线程数已经达到maximumPoolSize,如果仍然有新任务,执行拒绝策略(4种)

          几种类型的线程池

          1. 固定大小线程池

            newFixedThreadPool

            image-20210908213524594

            特点:

            • 核心线程数 == 最大线程数(没有救急线程被创建),因此也无需超时时间

            • 阻塞队列是无界的,可以放任意数量的任务

              适用于任务量已知,相对耗时的任务

          2. 带缓冲线程池

            newCachedThreadPool

            image-20210908214251452

            特点:

            • 核心线程数是0,最大线程数是Integer.MAX_VALUE,救急线程的空闲生存时间是60s
            • 全部都是救急线程(60s后可以回收)
            • 救急线程可以无限创建

            适用于任务密集,但是每个任务时间都很短的情况

          3. 单线程线程池

            image-20210909140256403

            使用场景:

            希望多个任务排队执行,线程数固定为1,任务数多于1时,会放入无界队列排队

            任务执行完毕,这唯一的线程也不会释放。

            只有一个核心线程,没有救急线程

            区别:

            自己创建一个单线程串行执行任务,如过任务执行失败而终止没有任何补救措施,而线程池还会新建一个线程,保证线程池的正常工作

            image-20210909141045584

            单线程执行器返回的是包装后的对象,核心线程数大小不能修改。

          提交任务

          1. 提交任务

            image-20210909141325138

            • submit

              Future用的就是保护性暂停模式来接收另一个线程返回的结果。

            • invokeAll

              image-20210909142412154

              image-20210909142301150

              意思就是说,invokeAll()方法传入的参数是任务tasks,任务的本质也是实现Callable接口的类的对象

              而创建线程池时指定的最大线程数即核心线程数(因为采用的是固定大小线程池,所以没有救急线程)是2,所以前两个任务,也就是实现Callable接口的类的对象,(我认为任务的本质就是实现Runnable或Callable接口的类的对象,把这个对象,作为哪个线程创建的构造函数的参数传入,就是任务交给哪个线程执行。

              前两个任务被线程执行了,第三个任务进入阻塞队列,前两个任务执行完后,第二个线程将第三个任务取出执行。

              任务就是实现Runnable接口或Callable接口的实现类的对象

              怎么把任务交给某个线程执行呢?我们之前说把任务和线程分开,就是采用的实现Runnable或Callable接口的方式,那么这里同样,把任务交给某个线程执行,就相当于把实现Runnable或Callable接口的对象,作为创建线程的构造函数的参数传入

            • invokeAny, 找到一个最先执行的任务,返回结果之后,其他任务就不执行了。

              返回结果类型是Object,也就是说最终只得到一个任务的结果。

          2. 任务对象:实现Runnable接口或实现Callable接口的对象叫做任务对象,交给线程执行,即作为线程创建的构造函数的参数传入

          关闭线程池

          1. shutdown---使线程池状态从RUNNING变为SHUTDOWN

            不会接收新任务

            但已提交的任务会执行完,会把阻塞队列中等待任务对象执行完毕

            此方法不会阻塞调用线程的执行,比如主线程调用了shutdown,主线程如果还有其他代码,会继续运行。

          2. shutdownNow---使线程池状态从RUNNING变为STOP

            不会接收新任务

            会抛弃阻塞队列中的任务(其实不准确,阻塞队列中没执行的任务会作为结果返回)

            会用interrupt的方式中断正在执行的任务

            队列中的任务会作为返回结果,拿到这个返回结果是重新执行,还是抛弃,由业务来决定。

            image-20210909152652554

            这里又证明了,Runnable,Callable接口实现类的对象就是任务对象

          任务调度线程池

          1. 有的时候我们希望任务延时执行,或者希望任务每隔几秒就执行一次(定时),这种情况我们就要用到任务调度线程池

            任务调度线程池是在jdk1.5加入。

          2. 在任务调度线程池加入之前,有一种java.util.Timer来实现定时功能,Timer的优点是简单易用,但由于所有的延时或定时的任务都是由同一个线程来调度执行,所以所有的任务都是串行

          3. Timer已经过时了

            Timer的这个线程很脆弱,前一个任务出现了异常,后面的任务就不能执行了。

            应该用带有任务调度功能的线程池,可以设置线程池中线程数量,就不是所有的任务都是一个线程来执行了。(多线程解决串行,实现并行(CPU多核的情况下,单核的情况下微观上仍是串行,上下文切换))

          4. image-20210909163938947

            Executors是工具类,创建各种线程池,本质上是修改构造方法的那七种参数

          5. 正确处理异常

            1. 第一种方式,自己手动在Callable实现类复写call()方法时,或在实现Runnable类复写run()时,用try-catch处理
            2. 第二种,用实现Callable接口结合Future的方式替代实现Runnable接口的方式,因为实现Callable接口结合Future的方式,重写call()方法,call()方法有返回值,这个返回值,通过Future对象的get()方法拿到,如果说call()内部有异常,那么在通过Future对象的get()方法拿返回结果时,会将异常信息打印出来。

          Fork/Join线程池实现

          1. Fork/Join线程池是jdk1.7加入的新的线程池实现

            体现的分治思想

            适用于能够进行任务拆分的cpu密集型运算

          2. 所谓任务拆分,是将一个大任务拆分为算法上相同的小任务

            这些小任务就可以交给不同的线程来完成,提升运行效率

          3. Fork\Join默认会创建与CPU核心数大小相同的线程池。(要充分利用CPU)

          4. 使用Fork\Join线程池

            • 创建任务对象,不能使用Runnable或Callable任务对象
            • 使用Fork\Join线程池执行任务对象
          5. image-20210909175235649

            如果是无参的,那么创建的线程数就等于CPU核心数

            哪种线程池用什么方法来执行任务要搞清楚。

            比如任务调度线程池用的schedule

            Fork\Join线程池用的invoke

          6. Future是一个接口,FutureTask是实现了RunnableFuture接口的实现类,RunnableFuture接口继承于Future接口和Runnable接口

          异步模式之工作线程

          定义

          1. 让有限的资源即工作线程处理无限的任务,典型实现就是线程池。而且使用线程池可以做到将线程重复使用,也不用每次新建线程或销毁线程,提高了效率,节省了时间成本。

            线程池可以设置最大线程数和核心线程数,可以通过有限的线程处理无限的任务,一个线程执行一个任务对象完成之后,并不销毁,而是放回到线程池中,进行下一个任务对象的执行。

            任务对象除了一进来就能够被线程执行以外,没有能被执行的线程都放进线程阻塞队列中。

            任务对象出队列,被线程执行,是这种流程。

            自定义线程池的时候如果已有线程数小于最大线程数,那么就创建工作线程

          2. 对应于一个业务,也可以创建多个线程池,不是只能有一个线程池。

          饥饿现象

          1. 用固定大小的线程池,会有饥饿现象,线程数不足,导致饥饿

            用带缓冲的线程池,不会有饥饿现象

            单线程线程池,会有饥饿现象。

          2. 对于不同的工作任务,应该使用不同的线程池,来避免饥饿现象。

            避免因为多个线程都去执行任务A,而没有线程去执行任务B,如果按任务来划分了线程池,那么就不存在没有线程去执行任务B的情况。

            这种方式比单纯增加线程池的容量更为重要

          3. 线程池中的线程数量过小,可能会导致饥饿

            过大的话会导致更多的线程产生上下文切换(上下文切换对于CPU来说是一种开销),并且涉及到系统资源不足的问题,线程过多也可能会发生OOM

            • CPU密集型运算

              通常采用cpu核数 + 1,能够实现最优的CPU利用率。

              +1 保证当线程由于页缺失故障或其他原因导致暂停时,额外的这个线程能顶上去,保证CPU时钟周期不被浪费,保证CPU的利用率。

            • IO密集型运算

          JUC

          AQS原理

          1. 其他的并发工具都是依赖于AQS的,抽象的基于队列的同步器。是阻塞式锁和相关的同步器工具的框架

            Synchronized锁就是阻塞式的锁,CAS+volatile就是实现的无锁并发,是乐观锁,线程不阻塞。

            但是AQS并不是Synchronized的原理,而是ReentrantLock的实现原理,ReentrantLock是阻塞式锁

            Synchronized的实现原理是Monitor,是JVM层面的,底层是用C++来实现的。

          2. AQS ---- AbstractQueuedSynchronizer,是一个抽象类,抽象的基于队列的同步器

          3. AQS的使用方式通常都是通过内部类继承AQS实现同步功能,AQS是很多同步器的基础框架,我们还可以基于AQS,定制出我们所需要的同步器

          4. 在AQS内部,通过维护一个FIFO队列,来管理多线程的排队工作,在公平竞争的情况下,无法获取锁的线程会被封装成一个节点,置于AQS队列尾部,入队的线程通过自旋的方式获取锁,若在有限次的尝试后,仍未获取成功,线程会被阻塞住,后面有具体的过程说明

          5. state属性,表示资源的状态

            • 独占模式---只有一个线程能够访问资源,比如之前的监视器锁使某一个时间段只有一个线程能够访问资源

            • 共享模式----允许多个线程访问资源,但是有上限

              子类需要定义如何维护这个状态,控制如何获取锁和释放锁

          image-20210909190349224

          ​ 用cas修改state状态,保证了修改state状态这个过程是原子性的。

          1. 提供了基于FIFO的等待队列,类似于Monitor的EntryList,Monitor是操作系统层面的,或者说是JVM层面的,EntryList是用C++来实现的,而AQS是纯Java实现的

          2. ReentrantLock是Java层面的锁

          3. 条件变量来实现等待、唤醒机制,支持多个条件变量,类似于Monitor的WaitSet

          4. Lock是一个接口,ReentrantLock是一个Lock接口的实现类。

          5. 子类(继承于AbstractQueuedSynchronizer)主要实现这样一些方法(默认抛出UnsupportedOperationException)

            • tryAcquire
            • tryRelease
            • tryAcquireShared
            • tryRealeaseShared
            • isHeldExclusively

            image-20210909191200097

            image-20210909191210548

            自定义锁或ReentrantLock里定义的上锁、上锁带超时、上锁可打断、尝试上锁、解锁、多个条件变量等方法都是通过调用继承于AQS的子类定义的方法。

          ReentrantLock原理

          1. image-20210909194450657
          2. ReentrantLock实现了Lock接口,内部也维护了继承于AQS的同步器Sync不过这个同步器Sync是抽象的还有两个继承
            • NonfairSync -- 非公平锁
            • FairSync -- 公平锁

          非公平锁实现原理

          1. 构造器:

            默认通过非公平锁来实现内部维护的Sync抽象类

            image-20210909194836695

          2. NonfairSync这个类继承于Sync(ReentrantLock内部的抽象类)

          3. 原理:

            1. 没有竞争时,Thread-0成为非公平锁的Owner

              image-20210909201243193

            2. 第一个竞争出现时,首先尝试CAS,想要通过CAS将state置为1,但是目前state已是1,而这次调用cas的参数是期望值:0,更新值:1.

              所以期望值和当前对象的state属性不一样,更新失败,进入accquire

              image-20210909201251908

              image-20210909203507236

            3. 进入accquire方法之后,首先会再次尝试,会进行tryAccquire,这时state已是1,结果仍然是false

              然后进入addWaiter逻辑

              • 如果是非公平锁,那么进入tryAccquire,会抢占锁,抢占锁失败,才会封装成节点入AQS队列
              • 公平锁的tryAccquire比非公平锁多了一个条件,即!hasQueuedPredecessors(),检查AQS队列里是否有等待时间更长的线程节点
            4. 进入addWaiter逻辑,构造Node队列

              image-20210909203742017

              第一个Node称为哑元或哨兵,用来站位,并不关联线程。

              Node队列底层是通过双向链表实现

            5. AQS维护的线程节点同步等待队列中,头节点是成功获取到同步状态的节点。

            6. 只有前驱节点是头节点的线程节点才能够尝试获取同步状态。

              如果非首节点线程前驱节点出队或者被中断,则检查自己的前驱节点是否是头节点,如果是则尝试获取同步状态,如果不是当前线程节点则阻塞(park)。可以说是阻塞,也可以说是进入等待状态。

            7. 然后进入acquireQueued逻辑

              • acquireQueued会在一个循环中不断尝试获得锁,失败后进入park阻塞

              • 如果当前Node是第二位,那么再次tryAcquire尝试获取锁,state仍是1,失败

              • 进入shouldParkAfterFailedAcquire逻辑,将前驱node即head的waitStatus改为-1,这次返回false

                image-20210909204148130

              • shouldParkAfterFailedAcquire执行完毕后,回到acquireQueued,再次tryAcquire尝试获取锁,当然这时state仍为1,失败

              • 当再次进入shouldParkAfterFailedAcquire时,这时因为前驱node的waitStatus已经是-1,这次返回true

              • 进入parkAndCheckInterrupt,进入阻塞态。

                image-20210909204356085

                可以发现除了最后一个node,前面的node的waitStatus都被改成了-1,每个node都应该由上一个节点唤醒。

                -1表示-1的node有责任唤醒后继节点

            8. Thread-0 释放锁,进入tryRelease流程,如果成功

              • 设置exclusiveOwnerThread 为null
              • state = 0
            9. 当前Node队列不为null,并且head的waitStatus = -1,进入unparkSuccessor流程

              找到队列中离head最近的一个Node,unpark恢复其运行,本例中即为Thread-1

              • head指向Thread-1所在Node
              • 原本的head Node从链表断开,被垃圾回收器回收
            10. 这时候如果有其他线程来竞争(非公平的体现),比如Thread-4

              这个Thread-4可以和Thread-1竞争,可能Thread-1竞争锁又失败了。

            11. 非公平的意思就是说,即使排在Node队列(双向链表)的头位,仍然有可能不会获得锁

          可重入原理

          1. 如果锁重入,让state++,说明同一线程获得了多次锁
          2. 释放锁的时候,也要让state减1(自减),只有state减为0,才释放成功。

          可打断原理

          1. ReentrantLock默认是不可打断的
          2. 可打断,在park过程中如果被打断,采用了抛出异常的方式,不会再次进入for(;;)去竞争锁

          公平锁原理

          1. 非公平锁只会检查state,不会检查AQS等待队列(在源码中可以发现只检查了state,没有做AQS队列的判断),不会管是否有线程对应的节点在AQS队列中等待,不会管AQS等待队列,直接就去竞争

            即使某个线程对应的节点在AQS等待队列的紧接着占位节点的下一个节点,也不一定会成功竞争到锁

          2. 而公平锁会检查AQS队列中是否有前驱节点,没有前驱节点,才去竞争。

            如果有前驱节点,该线程都不会去执行cas,都不会去比较state。

          条件变量实现原理

          1. 每个条件变量对应于一个ConditionObject

            ConditionObject也维护了一个双向链表,作为那些不满足条件,需要休息的线程

          2. await流程

            1. 调用await之前,必须拥有锁才有资格调用

              await方法是ConditionObject的方法而不是Lock的方法

            2. 开始Thread-0持有锁,有资格调用await,然后调用await(),进入ConditionObject的addConditionWaiter流程

              创建新的Node状态为-2的节点,关联Thread-0,加入等待队列尾部

              image-20210909220203679

            3. 接下来进入AQS的fullRelease()流程,释放同步监视器上的锁

              image-20210909220242221

            4. unpark AQS队列中的下一个节点,竞争锁,紧接着占位节点之后的那个节点对应的线程竞争成功(如果是非公平锁的机制,但是没有其他线程来竞争的情况,或者是公平锁的机制)

              image-20210909220502184

              Thread-1节点的前一个节点(占位节点)要断开,然后head要指向新的节点即原占位节点的下一个节点成为新的占位节点,下一个竞争锁的节点就是当前head节点的下一个节点。在图中即Thread-2

            5. 在ConditionObject等待队列的线程节点阻塞

              image-20210909220707854

          3. AQS队列和ConditionObject等待队列的线程最后阻塞,都是通过调用park()阻塞的

          4. signal流程

            1. 假设现在占有锁的Thread-1要来唤醒ConditionObject等待队列中的线程,那么Thread-1要唤醒等待队列中的Thread-0

            2. 进入ConditionObject的doSignal流程,取得等待队列中第一个Node,即Thread-0所在Node

              image-20210910125940213

            3. 执行TransferForSignal流程,将等待队列中取得的Node,加入AQS队列尾部,将Thread-0的状态由-2改为0,将AQS队列中,Thread-0的前一个线程节点的状态改为-1,表示前一个线程有资格唤醒Thread-0这个线程

              image-20210910125952369

            4. 现在占有锁的Thread-1释放锁,进入unlock流程

          公平与非公平

          1. 公平与非公平指的是线程获取锁的方式。公平模式下,线程在同步队列中通过 FIFO 的方式获取锁,每个线程最终都能获取锁。在非公平模式下,线程会通过“插队”的方式去抢占锁(也就是队列内的线程封装成的节点,就可以理解为线程,是按照队列FIFO顺序获得锁的,但是队列外的线程,就看它是否检查这个AQS队列了,如果不检查,就是非公平模式,队列外的线程就可以插队。),抢不到的则进入同步队列进行排队。默认情况下,ReentrantLock 使用的是非公平模式获取锁,而不是公平模式。不过我们也可通过 ReentrantLock 构造方法ReentrantLock(boolean fair)调整加锁的模式。

          2. 公平与非公平锁的优缺点:

            公平模式下,可保证每个线程最终都能获得锁,但效率相对比较较低,可以解决饥饿问题。

            非公平模式下,效率比较高,但可能会导致线程出现饥饿的情况。即使出现饥饿,也很少使用修改为公平锁的方式解决,而通过tryLock()的方式解决

          3. 为啥非公平模式抢了其他线程获取锁的机会,而整个程序的运行效率会更高呢?

            在激烈竞争的情况下,非公平锁的性能高于公平锁的性能的一个原因是:在恢复一个被挂起的线程与该线程真正开始运行之间存在着严重的延迟。与此同时,如果 C 也请求这个锁,那么 C 很有可能会在 B 被完全唤醒前获得、使用以及释放这个锁。这样的情况时一种“双赢”的局面:B 获得锁的时刻并没有推迟,C 更早的获得了锁,并且吞吐量也获得了提高。(吞吐量是指用户线程执行时间占比,其他时间有垃圾回收时间,线程上下文切换消耗等)

            image-20210910183523679

          4. AQS 维护了一个基于双向链表的同步队列,线程在获取同步状态失败的情况下,都会被封装成节点,然后加入队列中。加入这个队列中,不代表线程封装成的节点阻塞了,加入这个队列,还会通过自旋的方式获得锁,多次(有限次)尝试失败后,才会通过park阻塞,并不是说入队就阻塞

            • **非公平锁的 lock 方法会首先尝试去抢占设置同步状态(通过CAS),而不是直接调用 acquire()方法 将线程放入同步队列中等待获取锁。**如果设置同步状态state失败,即CAS比较不成功,那么才进入acquire()

            • 公平锁的lock()则直接调用acquire()

            • 进入acquire()之后,先进行tryAcquire()

              • 公平锁的tryAcquire 多出了一个条件,即!hasQueuedPredecessors()。这个方法的目的是判断是否有其他线程比当前线程在同步队列中等待的时间更长。
              • 如果我们把 tryAcquire 中的条件!hasQueuedPredecessors()去掉,公平锁将不再那么“谦让”,它将会像非公平锁那样抢占获取锁,抢占失败才会入队,就变成了非公平锁。

          ReentrantReadWriteLock

          1. ReentrantReadWriteLock和StampedLock都是读写锁

          2. ReentrantReadWriteLock支持重入,是可重入锁

          3. ReentrantReadWriteLock的目的是提高读操作的性能

            当读操作远远高于写操作时,这时候使用读写锁让读-读可以并发,提高性能。

            读读可以并发, 而读写互斥

          线程安全集合类概述

            • 遗留的线程安全集合如Hashtable,Vector

              Hashtable是Map接口的实现类

              Vector是List接口的实现类

            • image-20210910130603196

            • JUC安全集合

              • BLOCKING类,大部分基于锁,并提供用来阻塞的方法。(这种称为悲观锁,乐观锁其实没有锁,是实现无锁并发,CAS+volatile实现)
              • CopyOnWrite类,适用于读多写少的场景
              • Concurrent类
          1. image-20210910130839000

          2. Concurrent类型的容器

            • 大多性能都比较高

              内部很多操作使用cas优化,一般可以提高较高吞吐量,用户线程执行的时间占比高。

              因为用cas+volatile实现的无锁并发,即乐观锁

            • 弱一致性

              当利用迭代器遍历时,如果容器发生修改,迭代器仍然可以继续进行遍历(因为不阻塞,没有上锁),这时内容是旧的

              求大小,因为弱一致性,并不一定准确

              对于非安全容器来讲,遍历时如果发生了修改,使用fail-fast机制也就是让遍历立刻失败,不再继续遍历

              Concurrent类型的容器是线程安全的

          ConcurrentHashMap

          1. 内部方法跟普通HashMap方法一样,都是实现了Map接口

          2. 重要方法computeIfAbsent

            先要进行检查,如果缺少key,则计算生成一个值,然后将key value放入map

          3. HashMap在put过程中的原理

            先计算hashCode,找到底层Entry[]数组的一个位置进行存放,不同hashCode仍然可能放到一个位置

            如果此位置上的数据不为空(意味着此位置上存在一个或多个数据(多个数据以链表形式存在)),比较key1和已经存在的一个或多个数据的哈希值:

            • 如果key1的哈希值与已经存在的数据的哈希值都不相同,此时key1-value1这个Entry添加成功-----情况2
            • 如果key1的哈希值和已经存在的某一个数据的哈希值相同,那么继续比较,调用key1所在类的equals()方法:
              • 如果equals()返回false:此时key1-value1添加成功------情况3
              • 如果equals()返回true:使用value1替换相同key的value值。
          4. 要注意如果在底层Entry[]数组,元素被放在同一个位置,以链表形式存储,在JDK8,新加入的元素总是放在链表的尾部,在jdk7,新加入的元素总是放在链表的头部。

            在jdk7,新加入的元素总是放在链表的头部,这也是产生死链的重要原因,所以在jdk8进行了修改。

            死链是发生在扩容的时候

            扩容是往HashMap里put元素,当元素达到一个阈值时进行扩容,这个阈值是数组长度 * 加载因子,加载因子默认是0.75,扩容是扩容为原来的两倍底层Entry[]数组初始大小是16(或者说HashMap在底层初始大小是16,那么阈值是12,超过12时,就要开始扩容)

            ArrayList底层是Object[]数组,初始大小是10,如果不足10,第一次扩容,扩容为10,之后都扩容为原来大小的1.5倍

            而StringBuffer和StringBuilder扩容都是扩容为原来的2倍+2,底层数组初始大小是16.

            只要是数组扩容,都是会造一个新的数组,因为数组在底层的长度是创建时就确定了的,新建一个数组之后,将原来数组的数据复制过来。

            扩容之后,元素在新的数组又会分得更加均匀

          5. 扩容的时候会遍历原Entry[]数组的某个位置上的链表,遍历每一个Entry,把他们放到新的数组去

          6. HashMap在jdk7产生的死链问题:

            比如在Entry[]数组的某个下标位置,有一个链表是节点1-节点2-null,即头节点元素为节点1,下一个节点为节点2,再下一个节点为null

            此时线程Thread-0在执行put操作

            首先要明确死链是发生在扩容时,虽然JDK8改变了新节点加入链表的存储方式,解决了死链,但是还有其他问题,比如扩容丢数据,根本原因是因为在多线程环境下采用了HashMap这种不安全的集合

            那么此时如果发生扩容,并且这个扩容操作由另一个线程Thread-1来执行,假设扩容后节点1和节点2还在新数组(扩容都会造一个新数组)的同一个下标位置上,那么首先节点1会存储到这个下标位置,由于JDK7会将新加入的元素放在链表的头部而不是尾部,所以节点2会加入到链表的头部,那么在新数组的这个下标位置上,链表为节点2-节点1-null

            但是Thread-0记录了当前的e为节点1,next为节点2

            所以当前的e是节点1-null

            next是节点2-节点1-null

            所以此时Thread认为节点1指向节点2,但是实际上是节点2指向节点1,

            那么在下一次循环会发生将节点1-null移到新的数组的链表头

            e变为节点2-节点1-null

            next变为节点1-null

            再下一次循环会发生将节点2-节点1-null移到新的数组的链表头

            e变为节点1-null

            next变为null,形成死链

          7. 总结:

            jdk1.7HashMap在并发环境下,执行put操作时,会引起死循环,因为多线程会导致HashMap的Entry链表形成死链即环形数据结构,一旦形成环形数据结构,Entry的next节点永远不为空,就会产生死循环

          8. JDK8虽然将扩容算法做了调整,在扩容时,节点保持了和之前一样的顺序,新的节点被加入到链表的尾部,解决了死链问题(只有jdk7有死链问题,在扩容时会发生

            但JDK8仍不意味着在多线程环境下能够安全扩容,还会出现其他问题,在jdk8下,HashMap仍然是线程不安全的。

          重要属性和内部类

          1. image-20210910144345408

            内部类class Node是指同一个下标位置上的链表

            ForwardingNode作为旧table的头节点,代表旧Entry[]数组的这个位置上的节点是处理过的!

            TreeBin指红黑树,是jdk8对HashMap底层的优化,在hash表的长度大于64和链表的长度大于8时,会采用红黑树来代替链表,可以提高查询效率,并且可以一定程度上防止DOS攻击(恶意造大量hashcode一样的对象往hashmap填充)

            链表的长度大于8时,会尝试把链表转换成红黑树,但是在转换之前,会尝试扩容,如果哈希表的长度没有达到64时,先不会把链表变为红黑树,先会扩容。当哈希表的容量扩容到64时,那么才会将链表转换成红黑树。

          构造器

          1. image-20210910145407027

            initialCapacity是指初始容量

            • 初始容量达不到并发度时,会让初始容量 = 并发度
            • 设置的初始容量不一定是真正的初始容量,因为tableSizeFor要保证容量是2的n次方,最小是16,如果将初始容量设置为8,会通过这种计算方式将初始容量设置为16

            loadFactor是负载因子,默认为0.75

            concurrencyLevel 并发度

          2. ConcurrentHashMap有在table下标冲突的时候才会加锁,锁的不是整个table,锁的是这个链表的头节点

            这个地方保证了线程安全性。并且是细粒度的锁,保证了Entry[]数组其他元素还能被线程访问到。

            而HashMap则没有这个操作。

            在创建ConcurrentHashMap的时候也保证线程安全,只有一个线程能够创建

          jdk7 ConcurrentHashMap

          1. 维护了一个segment数组,每个segment对应一把锁(分段锁)

            jdk7是把锁加在每个segment对象上,而jdk8是把锁加在链表的头节点

            缺点:

            • 不是懒惰初始化
            • Segment数组默认大小为16,容量初始化指定后就不能改变了,但是JDK8的Hash表是有扩容机制的。
          2. 每个segment对应于一个小的Hash表(HashEntry[]数组)每个Hash表里面又是数组加链表的结构

            一个segment对应于一个数组+链表结构。数组是HashEntry[]数组,数组里每个元素是一个链表,链表里每一个元素是HashEntry

          3. jdk7的HashMap在多线程环境下,进行put操作,会产生环形链表问题,会产生死链,造成死循环,jdk8虽然改变了这种put时,将节点插入到链表的头部改为了节点插入到链表的尾部,解决了死链问题,但是并不意味着jdk8下的HashMap能够在多线程环境下安全扩容,仍然有其他线程安全问题。根本原因是因为HashMap是线程不安全的

            所以想要采用线程安全的HashMap,应该采用ConcurrentHashMap

            而ConcurrentHashMap在jdk7和jdk8实现线程安全问题的方式是不同的

          4. ConcurrentHashMap在jdk7下是采用segment分段锁的方式实现的线程安全,在jdk8中是采用的CAS+Synchronized锁的方式实现的线程安全,这里的Synchronized只有在put的时候,对链表的头部节点进行上锁,并不是对整个Map进行上锁,采用的是细粒度锁,而且在jdk6中已经添加了Synchronized从偏向锁到轻量级锁到Monitor重量级锁的升级方式,所以效率有所提升

            segment扮演的锁的角色,实际是继承的ReentrantLock的方式

          5. 为什么采用ConcurrentHashMap,而不采用HashTable?

            HashTable容器使用synchronized来保证线程安全,但在线程竞争激烈的情况下HashTable的效率很低下,因为只有一把监视器锁,当然采用synchronized本来就应该保证只有一把监视器锁,所以后面采用的分段锁的方式。HashTable对get操作和put操作都要上锁,效率低下。ConcurrentHashMap的get操作是不需要上锁的,因为采用了volatile来修饰共享变量,所有线程在get这个读操作都能从主存中获得共享变量的最新值,不会导致读取错误的情况,涉及到内存屏障,所以get操作不需要上锁。

            只有一把监视器锁,导致了当一个线程访问HashTable的同步方法的时候,其他线程也访问HashTable的同步方法时,会进入阻塞或轮询状态,既不能get也不能put。(连get()这种读操作都不可以,并且容易引起线程阻塞,进而造成线程的频繁上下文切换导致开销

          6. 所以ConcurrentHashMap在jdk7下是采用segment分段锁的方式实现的线程安全

            分段锁,通俗理解为有多个数据段,每个数据段对应一把锁,拿到某一个数据段的锁,就可以操作这个数据段的内容。

            当多个线程访问容器里不同数据段的数据时,线程间就不会产生锁竞争,提高效率

            首先将数据分成一段一段地存储,然后给每一段数据配一把锁,当一个线程占用某一段的锁访问其中一个段的数据的时候,其他段的数据也能被其他线程访问。

          7. Segment是一种可重入锁---ReentrantLock,在ConcurrentHashMap里扮演锁的角色

          8. 一个Segment包含一个HashEntry数组,每个HashEntry是一个链表结构的元素

            就相当于一个Segment对应于一个小的Hash表,是数组加链表的结构

            当对HashEntry数组的数据进行修改的时候,必须首先获得与它对应的segment锁

            image-20210910170942805

          9. segment就可以直接理解为锁,分段锁,segment就是锁

          10. 既然ConcurrentHashMap使用分段锁segment来保护不同段的数据,那么必须通过散列算法定位到Segment

            这里的通过散列算法定位,不是用hashCode通过散列算法定位,是将hashCode再散列一次后得到新的hash值,再通过散列算法或者说映射算法定位。

            ConcurrentHashMap会首先使用Wang/Jenkins hash的变种算法对元素的hashCode进行再散列

          11. 进行再散列的原因:

            减少散列冲突,使元素能够均匀地分布在不同的Segment上,加入散列的质量差到极点,那么所有的元素都在一个segment中,这样也失去了分段锁的意义。

            再散列不是指的定位的过程,是指对hashCode再散列的过程,比如int hash = hash(key.hashCode())

            通过再散列之后的hash值,去定位。定位是通过散列算法或映射算法去定位

            • 得到hashCode值
            • 再散列得到新的hash值
            • 通过新的hash值,通过散列函数或者映射算法去定位到segment
          12. get()操作

            • 得到hashCode值
            • 再散列得到新的hash值
            • 通过新的hash值,通过散列算法定位到segment
              • 定位segment使用的是hashCode通过再散列后得到的值即第二步的新的hash值的高位通过散列算法进行定位
            • 再通过散列算法定位到元素
              • 定位HashEntry,使用的是第二步的hash值去通过散列算法去定位。

            HashTable容器的get方法是需要加锁的,ConcurrentHashMap的get操作不需要加锁,共享变量都定义成volatile类型,能够在线程之间保持可见性,能够被多线程同时读,并且保证不会读到过期的值。这里的原理是内存屏障,面试的时候可以多说一说

          13. put()方法

            • 首先定位到segment,和之前get()方法的定位方式相同
            • get()可以不加锁,但是put()必须加锁,是由于put方法是对共享变量进行写入操作
            • 定位到segment之后,首先会尝试获取锁,如果获取失败肯定有其他线程竞争
            • 然后尝试自旋获取锁
              • 如果重试的次数达到了MAX_SCAN_RETRIES,则改为阻塞锁获取,保证能获取成功
            • 对定位到的segment的HashEntry判断是否需要进行扩容。(一个segment对应于一个HashEntry数组,数组的每个元素是链表结构的元素,链表的每个元素为HashEntry)

            ConcurrentHashMap只对某个Segment进行扩容而不会对整个Map进行扩容。

          14. size()方法

            ConcurrentHashMap的做法是先尝试2次通过不锁住Segment的方式来统计各个segment的大小,如果容器的count发生了变化,则再采用加锁的方式来统计所有segment的大小

          15. 用 volatile 修饰了 HashEntry 的数据 value 和 下一个节点 next,保证了多线程环境下数据获取时的可见性

            所以get操作不需要加锁,但是put操作是写操作,需要加锁,segment就是锁,需要先获得segment,才能对segment下的HashEntry进行下一步操作。

            image-20210910171404634

          jdk8 ConcurrentHashMap

          1. 在数据结构上, JDK1.8 中的ConcurrentHashMap 选择了与 HashMap 相同的Node数组+链表+红黑树结构;在锁的实现上,抛弃了原有的 Segment 分段锁,采用 CAS + synchronized实现更加细粒度的锁。

            jdk7是把锁加在每个segment对象上,而jdk8是把锁加在链表的头节点

            jdk8将锁的级别控制在了更加细粒度的元素级别,只需要锁住链表头节点(如果是红黑树,那么锁住红黑树的根节点),就不会影响其他数组元素的读写,大大提高了并发度。

          2. put()

            1. 根据 key 计算出 hash 值;
            2. 判断是否需要进行初始化;
            3. 定位到 Node,拿到首节点 f,判断首节点 f:
              • 如果为 null ,则通过 CAS 的方式尝试添加;
              • 如果为 f.hash = MOVED = -1 ,说明其他线程在扩容,参与一起扩容;
              • 如果都不满足 ,synchronized 锁住 f 节点(这个地方的级别是对链表的头节点进行加锁,并不影响Entry[]数组的其他元素,大大提高了效率),判断是链表还是红黑树,遍历插入;
            4. 当在链表长度达到 8 的时候,数组扩容或者将链表转换为红黑树(扩容还是转换为红黑树,就看当前数组的长度是否是大于64,如果没有大于64,那么扩容,大于64,便转换为红黑树)。
          3. get()

            1. 根据 key 计算出 hash 值,判断数组是否为空;
            2. 如果是首节点,就直接返回;
            3. 如果是红黑树结构,就从红黑树里面查询;
            4. 如果是链表结构,循环遍历判断。

            get 方法和jdk1.7一样,同样不需要加锁。因为 Node 的元素 value 和指针 next 是用 volatile 修饰的,保证了共享变量的可见性,在多线程环境下线程A修改节点的 value 或者新增节点的时候是对线程B可见的。

            这也是它比其他并发集合比如 Hashtable、用 Collections.synchronizedMap()包装的 HashMap 效率高的原因之一。

          4. 总结:

            jdk1.7和jdk1.8的ConcurrentHashMap的put()操作都是要加锁的,分别是分段锁(segment---ReentrantLock)和对链表头节点进行加锁。

            jdk1.7在put的时候会通过自旋获得锁,达到一定次数后,一定能获得锁

            jdk1.8在put的时候是对链表头部节点加锁,并不影响Entry[]数组的其他元素

            而get方法,在jdk1.7和1.8都不需要加锁,原因就是上面第四点说的原因

          5. JDK1.8 中为什么使用内置锁 synchronized替换 ReentrantLock?★★★★★

            • 在 JDK1.6 中,对 synchronized 锁的实现引入了大量的优化,并且 synchronized 有多种锁状态,会从无锁 -> 偏向锁 -> 轻量级锁 -> 重量级锁一步步转换。
            • 减少内存开销 。假设使用ReentrantLock来获得同步支持(ReentrantLock实现原理是AQS抽象队列同步机制),那么每个节点都需要通过继承 AQS 来获得同步支持。但并不是每个节点都需要获得同步支持的,只有链表的头节点(红黑树的根节点)需要同步,这无疑带来了巨大内存浪费。
          6. ConcurrentHashMap 不支持 key 或者 value 为 null 的原因?★★★

            我们先来说value 为什么不能为 null。因为 ConcurrentHashMap 是用于多线程的 ,如果ConcurrentHashMap.get(key)得到了 null ,这就无法判断,是映射的value是 null ,还是没有找到对应的key而为 null ,就有了二义性。

            而用于单线程状态的 HashMap 却可以用containsKey(key) 去判断到底是否包含了这个 null 。

          7. ConcurrentHashMap 的并发度是什么?★★

            并发度可以理解为程序运行时能够同时更新 ConccurentHashMap且不产生锁竞争的最大线程数。在JDK1.7中,实际上就是ConcurrentHashMap中的分段锁个数,即Segment[]的数组长度,默认是16,这个值可以在构造函数中设置。

            如果自己设置了并发度,ConcurrentHashMap 会使用大于等于该值的最小的2的幂指数作为实际并发度,也就是比如你设置的值是17,那么实际并发度是32。如果小于16,那么实际并发度是16.

          8. ConcurrentHashMap 迭代器是强一致性还是弱一致性?★★

            与 HashMap 迭代器是强一致性不同,ConcurrentHashMap 迭代器是弱一致性。

            ConcurrentHashMap 的迭代器创建后,就会按照哈希表结构遍历每个元素,但在遍历过程中,内部元素可能会发生变化,如果变化发生在已遍历过的部分,迭代器就不会反映出来,而如果变化发生在未遍历过的部分,迭代器就会发现并反映出来,这就是弱一致性。

          9. 为什么说JDK1.8 采用CAS+synchronized 保证线程安全?

            1. ConcurrentHashMap 在put时,定位到Node,如果节点为null,采用CAS的方式尝试添加
            2. put时,定位到Node,如果Node不为null,会锁住链表的头节点
            3. 定位到Node,首先需要根据key计算出hash值
          10. JDK1.7 与 JDK1.8 中ConcurrentHashMap 的区别?★★★★★

            • 数据结构:取消了 Segment 分段锁的数据结构,取而代之的是数组+链表+红黑树的结构,就没有segment分段这种说法了。

            • 保证线程安全机制:JDK1.7采用 Segment 的分段锁机制实现线程安全,其中 Segment 继承自 ReentrantLock 。JDK1.8 采用CAS+synchronized 保证线程安全。

            • 锁的粒度:JDK1.7 是对需要进行数据操作的 Segment 加锁,JDK1.8 调整为对每个数组元素加锁(Node)。

            • 链表转化为红黑树:定位节点的 hash 算法简化会带来弊端,hash 冲突加剧,因此在链表节点数量大于 8(且数据总量大于等于 64)时,会将链表转化为红黑树进行存储。

              • 将链表转换为红黑树之前,要判断能否进行扩容,如果能进行扩容,那么要先进行扩容,扩容到数组的容量是64之后,这时如果链表长度大于8,那么就将链表转换为红黑树。

                如果哈希表的长度没有达到64时,先不会把链表变为红黑树,先会扩容,扩容之后,会将原Entry[]数组的数据迁移,这个时候会根据新的容量重新进行散列存储。所以就不一定链表长度超过8,在这之后,超过8,那么转换为红黑树

            • 查询时间复杂度:从 JDK1.7的遍历链表O(n), JDK1.8 变成遍历红黑树O(logN)。

          happens-before的几种规则

          1. 程序顺序规则

          2. 监视器锁规则---对一个锁的解锁,happens-before于随后对这个锁的加锁

          3. volatile变量规则---对一个volatile变量的写,happens-before于任意后续对这个volatile变量的读,涉及到内存屏障

          4. 传递性:如果A happens-before B, 且B happens-before C, 那么A happens-before C

          Last Updated:
          Contributors: shailene
          + diff --git "a/java/\346\225\260\346\215\256\345\272\223/jdbc/\345\260\232\347\241\205\350\260\267_\345\256\213\347\272\242\345\272\267_JDBC.html" "b/java/\346\225\260\346\215\256\345\272\223/jdbc/\345\260\232\347\241\205\350\260\267_\345\256\213\347\272\242\345\272\267_JDBC.html" index 904fddb9..9134ea9f 100644 --- "a/java/\346\225\260\346\215\256\345\272\223/jdbc/\345\260\232\347\241\205\350\260\267_\345\256\213\347\272\242\345\272\267_JDBC.html" +++ "b/java/\346\225\260\346\215\256\345\272\223/jdbc/\345\260\232\347\241\205\350\260\267_\345\256\213\347\272\242\345\272\267_JDBC.html" @@ -23,7 +23,7 @@ } JDBC核心技术 | shAilene - + @@ -1246,6 +1246,6 @@ } }
    Last Updated:
    Contributors: shailene
    - + diff --git "a/java/\346\225\260\346\215\256\345\272\223/mysql/\345\237\272\347\241\200\347\257\207/MySQL\346\225\260\346\215\256\345\272\223\347\254\224\350\256\260-\347\254\254\344\270\200\351\203\250\345\210\206.html" "b/java/\346\225\260\346\215\256\345\272\223/mysql/\345\237\272\347\241\200\347\257\207/MySQL\346\225\260\346\215\256\345\272\223\347\254\224\350\256\260-\347\254\254\344\270\200\351\203\250\345\210\206.html" index 9d6b3b52..bd5503b3 100644 --- "a/java/\346\225\260\346\215\256\345\272\223/mysql/\345\237\272\347\241\200\347\257\207/MySQL\346\225\260\346\215\256\345\272\223\347\254\224\350\256\260-\347\254\254\344\270\200\351\203\250\345\210\206.html" +++ "b/java/\346\225\260\346\215\256\345\272\223/mysql/\345\237\272\347\241\200\347\257\207/MySQL\346\225\260\346\215\256\345\272\223\347\254\224\350\256\260-\347\254\254\344\270\200\351\203\250\345\210\206.html" @@ -23,7 +23,7 @@ } 第一部分 MySQL基础篇 | shAilene - + @@ -1072,6 +1072,6 @@ ) SELECT employee_id,last_name FROM cte WHERE n >= 3;

    2.3 小 结

    公用表表达式的作用是可以替代子查询,而且可以被多次引用。递归公用表表达式对查询有一个共同根节点的树形结构数据非常高效,可以轻松搞定其他查询方式难以处理的查询。

    Last Updated:
    Contributors: shailene
    - + diff --git "a/java/\346\225\260\346\215\256\345\272\223/mysql/\351\253\230\347\272\247\347\257\207/MySQL\346\225\260\346\215\256\345\272\223\347\254\224\350\256\260-\347\254\254\344\272\214\351\203\250\345\210\206.html" "b/java/\346\225\260\346\215\256\345\272\223/mysql/\351\253\230\347\272\247\347\257\207/MySQL\346\225\260\346\215\256\345\272\223\347\254\224\350\256\260-\347\254\254\344\272\214\351\203\250\345\210\206.html" index f955ed92..db7af39a 100644 --- "a/java/\346\225\260\346\215\256\345\272\223/mysql/\351\253\230\347\272\247\347\257\207/MySQL\346\225\260\346\215\256\345\272\223\347\254\224\350\256\260-\347\254\254\344\272\214\351\203\250\345\210\206.html" +++ "b/java/\346\225\260\346\215\256\345\272\223/mysql/\351\253\230\347\272\247\347\257\207/MySQL\346\225\260\346\215\256\345\272\223\347\254\224\350\256\260-\347\254\254\344\272\214\351\203\250\345\210\206.html" @@ -23,7 +23,7 @@ } 第二部分 MySQL高级特性篇 | shAilene - + @@ -510,6 +510,6 @@ LOAD DATA INFILE '/var/lib/mysql-files/account_1.txt' INTO TABLE atguigu.account FIELDS TERMINATED BY ',' ENCLOSED BY '\"';

    2. 使用mysqlimport方式导入文本文件

    mysqlimport -uroot -p atguigu '/var/lib/mysql-files/account.txt' --fields-terminated- by=',' --fields-optionally-enclosed-by='\"'
     
    Last Updated:
    Contributors: shailene
    - + diff --git "a/java/\346\225\260\346\215\256\345\272\223/redis/redis.html" "b/java/\346\225\260\346\215\256\345\272\223/redis/redis.html" index 7860b231..076001bf 100644 --- "a/java/\346\225\260\346\215\256\345\272\223/redis/redis.html" +++ "b/java/\346\225\260\346\215\256\345\272\223/redis/redis.html" @@ -23,11 +23,11 @@ } Redis | shAilene - +

    Redis

    NoSQL数据库简介

    概述

    1. 基于key-value键值对的NoSQL的高性能数据库

      提供了各种数据结构的存储,具有高性能的读写功能

    2. 关系型数据库比如mysql的数据是保存在磁盘上的,磁盘的IO性能低下。

      cpu的数据交换和高速缓存cache做,cache的数据交换和内存做,内存的数据交换和硬盘做。

    3. 关系型数据库的两个缺点

      • 性能瓶颈:磁盘IO性能低下
      • 扩展瓶颈:数据关系复杂,扩展性差,不便于大规模集群

      解决思路:

      • 降低磁盘IO次数,越低越好-----内存存储
      • 去除数据间关系,越简单越好----不存储关系,仅存储数据

      以上两点,便是NoSQL

    4. NoSQL是泛指,是作为关系型数据库的补充,内存的数据还是从硬盘来,关系型数据库还是要用的,真正的数据肯定要持久化,所以NOSQL是泛指,不仅仅是sql,Not-Only SQL,是作为关系型数据库的补充,Nosql有自己的适用场景:

      • 高并发
      • 海量用户
    5. NoSQL的特征:

      • 可扩容,可伸缩

      • 大数据量下高性能

      • 灵活的数据模型

        Nosql无需实现为要存储的数据建立字段,随时可以存储自定义的数据格式

        而在关系型数据库里增删字段是一件非常麻烦的事情。

        如果是数据量非常大的表,增加字段简直是噩梦。

      • 高可用

    6. 数据存储的瓶颈

      • 数据量的总大小
      • 数据的索引,一个机器的内存放不下时
      • 读写混合,一个数据库实例不能承受
    7. dao层不再直接和数据库进行交互,在中间挡了一层缓存

      image-20210924154657194

    8. mysql主从读写分离

      从库迅速地赋值主库的数据,为了保证数据的完整性和安全性。

      image-20210924154857485

      对于一个数据库的信息,写的操作都放在主库,读的操作都放在从库,减轻数据库的压力

      分库分离也是为了减轻数据库的压力

      mysql经过了主从读写分离,分库分表,仍然有瓶颈,不适合存储非常大的数据

      mysql也是有集群的。

    9. NoSQL数据库的产生就是为了解决大规模数据集合多重数据种类带来的挑战,包括大规模数据的存储

    10. NoSQL数据库种类繁多,但是一个共同的特点就是去掉关系型数据库的关系型特性

      数据之间无联系,这样就非常容易扩展,也在架构的层面上带来了可扩展的能力

    11. mysql也有缓存,innodb是数据和索引都要进行缓存,而myisam只缓存索引,不缓存真实数据

    12. 3V+3高

      • velocity 实时
      • variety 多样
      • volume 海量
      • 高性能
      • 高可用(高可扩展)(理论上一台机器不够,并行地再加机器,这是横向的扩展)
      • 高并发

      3V是对问题的描述

    13. 当下的应用是sql和nosql一起使用,并不是关系型数据库就不用了!

    14. 什么叫关系型数据库的IOE

      取出IBM小型机,Oracle数据库及EMC存储设备

    15. 商品的基本信息,存放在传统的关系型数据库,比如mysql

      商品描述、详情、评价信息(多文字类),存放在文档数据库mongodb

      商品的图片,存放在分布式文件系统,淘宝自己的TFS,Google的GFS,Hadoop的HDFS

      商品的关键字,搜索引擎,基于lucene、solr、elasticSearch开发的站内搜索引擎,阿里用的ISearch

      商品的波段性的热点高频信息----缓存数据库,需要高并发、高性能、高可用或者叫高可扩展,比如redis、Tair、Memcache。所谓的缓存就是在数据库外面再包一层,在dao层和数据库之间添加一层缓存

      一个查询结果是从多数据源来的。

    16. 大型互联网应用的难点:

      • 数据类型多样性
      • 数据源多样性和变化重构
      • 数据源改造而数据服务平台不需要大面积重构

      解决方案:

      • 统一数据平台服务层,通过编程语言面对接口编程,统一面对一层数据服务层,数据服务层的后面是mysql、mongodb、分布式文件系统、isearch、redis等。就类似于我们面向JDBC编程,JDBC就像一个接口,我们面向接口编程,不用管接口后面的mysql、oracle等数据库是怎么实现的,而各种数据库又是JDBC这个接口的实现!!JDBC就相当于定义了一种规范,各种数据库面对它来做具体的实现,我们面对JDBC做上层的编程业务工作。

        只需要统一连一个平台。

        我们根据统一的数据平台服务层,统一调用它提供给我们的API

    NoSQL数据模型简介

    1. 为什么要用聚合模型来处理

      表少的时候,可以用关联查询--join,一条sql就可以搞定,但是到了企业里,很多表,这样很麻烦,比如一张表在一号库,另外的表在其他库,分库分表也是为了减轻数据库的压力,这种场景下,多表的关联查询就不太方便了。

      高并发的操作是不太建议有关联查询的

    2. 非关系型数据库NoSQL的数据模型是聚合模型

      • key-value键值对
      • 图形结构
      • BSON
      • 列族
      • 。。。

    NoSQL数据库的四大分类

    1. KV键值对

      image-20210924191312786

      典型应用场景:内容缓存,主要用于处理大量数据的高访问负载,也用于一些日志系统等等。

    2. 文档型数据库,bson格式比较多

      • CouchDB

      • MongoDB

        MongoDB是一个基于分布式文件存储的数据库

        是非关系型数据库中最像关系型数据库的

    3. 列存储数据库

      • HBase
      • 分布式文件系统
    4. 图关系数据库

      专注于构建关系图谱

    5. 四者对比

    NoSQL数据库CAP原理

    1. CAP

      • Consistency (强一致性)
      • Availability (可用性)
      • Partition tolerance (分区容错性)

      这三个特性只能满足2个

      一个分布式系统不可能同时很好地满足一致性,可用性,和分区容错性三个需求

      最多只能同时满足2个

      redis是满足CP

      分区容错性是我们必须需要实现的!!

    Redis简介

    1. Redis是用C语言开发的一个开源的高性能键值对(key-value)数据库

    2. 特征:

      • 数据间没有必然的关联关系

      • 内部采用单线程机制进行工作!能保证很多安全性的问题

      • 高性能

      • 多数据类型支持

        • 字符串类型 string
        • 列表类型 list
        • 散列类型 hash
        • 集合类型 set
        • 有序集合类型 sorted_set
      • 持久化支持,可以进行数据灾难恢复,

        可能会出现断电的情况,那么在内存中存的数据需要恢复

    3. 应用:

      • 为热点数据加速查询
      • 任务队列,如秒杀、抢购、购票排队等
      • 即时信息查询,如各类排行榜、在线人数信息
      • 时效性信息控制,如验证码控制(几分钟内有效)
      • 分布式数据共享,如分布式集群架构中的session分离
      • 消息队列
      • 分布式锁

    Redis数据类型

    数据类型的介绍

    1. 作为缓存使用
      • 原始业务功能设计
        • 秒杀
        • 618活动
        • 双11活动
        • 排队购票
      • 运营平台监控到的突发高频访问数据
        • 突发时政要闻,被强势关注围观
      • 高频、复杂的统计数据,需要快速响应的数据!!
        • 直播间在线人数
        • 打榜人数
    2. 附加功能
      • 系统功能优化或升级
        • 单服务器升级集群
        • session管理
        • token管理
    3. redis数据类型
      • string
      • hash
      • list
      • set
      • sorted_set

    string

    1. redis自身是一个Map,其中所有的数据都是采用key:value的形式存储

      左边的key永远都是字符串!!

      数据类型指的是右边的,指的是value这部分数据存储!!

      数据类型指的是存储的数据的类型,也就是value的部分,key部分永远是字符串

    2. 存储的数据:单个数据,最简单的数据存储类型,也是最常用的数据存储类型

    3. 存储数据的格式:一个存储空间保存一个数据

    4. 存储内容:通常使用字符串,如果字符串以整数的形式存储,可以作为数字操作使用

    5. 有单数据操作和多数据操作

      image-20210925141942564

    6. 在大型企业级应用中,一张表保存的数据量不能让它无限制扩张,会分表,使用多张表存储同类型数据,甚至把一个库里的表分离到若干个库里

      分表操作,对应的主键id必须保证统一性,不能重复

      image-20210925142429433

      redis可以用于控制数据库表主键id,为数据库表主键提供生成策略,保障数据库表的主键唯一性

      此方案适用于所有数据库,且支持数据库集群。

    7. string类型数据的扩展操作

      • image-20210925142535610

        string在redis内部存储默认就是一个字符串,当遇到增减类操作incr,decr时会转成数值型进行计算

        redis所有的操作都是原子性的,采用单线程处理所有业务,命令都是一个一个执行的,因此无需考虑并发带来的数据影响

        注意:按数值进行操作的数据,如果原始数据不能转成数值,或超越了redis数值上限范围,将报错

      • image-20210925143336311

        redis控制数据的生命周期,通过数据是否失效控制业务行为,适用于所有具有时效性限定控制的操作

    8. string类型数据操作的注意事项

      • 数据操作不成功的反馈与数据正常操作之间的差异

        • 表示运行结果是否成功
          • (Integer)0---false 失败
          • (Integer)1----true 成功
      • 数据未获取到

        (nil) 等同于null

      • 数据最大存储量

        512MB

      • 数值计算最大范围(Java中的long的最大值)

        Java中的long的最大值

    9. string类型应用场景

      • 在redis中为大V用户设定用户信息,以用户主键和属性值作为key,后台设定定时刷新策略即可

        user:id:35035035:fans----12210947

        表名:主键名:主键值:属性名------属性值

      • image-20210925144340051

      • redis应用于各种结构型和非结构型高热度数据访问加速

    hash

    1. image-20210925144639022

    2. 存储结构:一个存储空间保存多个键值对数据

      底层使用哈希表结构实现数据存储

    3. hash存储结构优化

      • 如果field数量较少,存储结构优化为类数组结构
      • 如果field数量较多,存储结构使用HashMap结构
    4. hash类型数据扩展操作

      • image-20210925172544739
    5. hash类型数据操作的注意事项

      • hash类型下的value只能存储字符串,不允许存储其他数据类型,不存在嵌套现象,如果数据未获取到,对应的值为nil
      • 每个hash可以存储2的32次方-1个键值对
      • hash类型十分贴近对象的数据存储形式,并且可以灵活添加和删除对象属性,但hash设计初衷不是为了存储大量对象而设计的,切记不可滥用,更不可以将hash作为对象列表使用
      • hgetall操作可以获取全部属性,如果内部field过多,遍历整体数据效率就会低,就可能成为数据访问的瓶颈

    list

    1. 数据存储需求:存储多个数据,并对数据进入存储空间的顺序进行区分

    2. 需要的存储结构:一个存储空间保存多个数据,且通过数据可以体现进行顺序

    3. list类型:保存多个数据,底层使用双向链表存储结构实现。

    4. 左边是key,value是list

    5. list类型数据基本类型

      • image-20210925190441846

      • image-20210925191433375

      • image-20210925191646950

    6. list类型数据操作注意事项:

      • list中保存的数据都是string类型的,数据总容量是有限的。
      • list具有索引的概念,但是操作数据时,通常以队列的形式进行入队出队操作,或以栈的形式进行入栈出栈操作
      • 获取全部数据,结束索引设置为-1
    7. list类型应用场景

      • 微博的个人用户的关注列表,将最近关注的人排在前面
      • 管理多台服务器的日志
        • 依赖list的数据具有顺序的特征对信息进行管理
        • 使用队列模型解决多路信息汇总合并的问题
        • 使用栈模型解决最新消息的问题

    set类型

    1. 与hash存储结构完全相同,仅存储键,不存储值(nil),并且值是不允许重复的,hash结构的field本身就是不允许重复的

    2. set类型数据的基本操作

      image-20210925195502637

      image-20210925195608432

    3. set类型数据的扩展操作

      image-20210925200445682

    4. redis的set类型结构应用于随机推荐类信息检索

    5. image-20210925200905092

    6. set类型数据操作的注意事项

      • set类型不允许数据重复,如果添加的数据在set中已经存在,将只保留一份
      • set虽然与hash的存储结构相同,但是无法启用hash中存储值得的那一部分

    sorted_set

    1. 数据排序有利于数据的有效展示,需要提供一种可以根据自身特征进行排序的方式

    2. 存储结构:可以保存可排序的数据,在set的存储结构基础上添加可排序字段,有一列专门用来存排序字段。

      排序字段不是数据

    3. sorted_set类型数据的基本操作

      image-20210925204019323

      image-20210925204335000

      image-20210925210022015

    4. image-20210925205850482

    5. sorted_set类型数据操作的注意事项

      • score保存的数据存储空间是64位
      • score保存的数据也可以是一个双精度的double值,基于双精度浮点数的特征,可能会丢失精度,使用的时候要慎重
      • sorted_set底层存储还是基于set结构的,因此数据不能重复,如果重复添加相同的数据,score值将被反复覆盖,保留最后一次修改的结果。
      • sorted_set可以应用于定时任务执行顺序管理或任务过期管理
    • 对于带有权重的任务,优先处理权重高的任务,采用score记录权重即可

    持久化

    简介

    1. 将内存中的数据放到硬盘中,这叫持久化,如果内存中的数据因为断电或者其他原因丢了,再把硬盘中的数据读到内存中,这就是数据的恢复过程

    2. 利用永久性存储介质(比如硬盘)将数据进行保存,在特定的时间将保存的数据进行恢复的工作机制叫做持久化

    3. 为什么要进行持久化?

      防止数据的意外丢失,确保数据的安全性

    4. 持久化保存的东西就只有数据!

    5. 持久化的方式

      • 快照----每过一定时间,就将当前时刻的数据保存下来。关注点在数据----RDB
      • 过程-----记录整个数据的操作过程,将操作过程进行保存,日志形式,存储操作过程,存储格式复杂,关注点在数据的操作过程-----AOF

    RDB

    1. RDB启动方式1

      命令:save

      作用:每执行一次,就会保存一次数据

    2. dumb.rdb是持久化数据的文件

    3. 相关命令:

      image-20210926144517840

    4. 用RDB这种方式,在redis服务启动的时候,会把持久化的数据加载上来!

    5. save指令的执行会阻塞当前redis服务器,redis的每一条指令是原子性的,redis是单线程的!!

      那么save指令,阻塞服务器,知道当前RDB过程完成为止,有可能造成长时间阻塞

      当数据量过大的时候,单线程的这种RDB形式会造成效率的降低!

      如何处理:

      后台执行

    6. RDB启动方式2----后台执行

      命令:bgsave

      作用:手动启动后台保存数据的操作,但不是立即执行。

    7. bgsave指令工作原理:

      • 发送消息
      • 返回消息,但是并不真正执行
      • 调用fork函数,生成子进程,不参与redis的命令序列,单独生成子进程来做数据的存储!

      bgsave命令是针对save命令阻塞redis服务的这种缺点做的优化

    8. RDB启动方式3

      自动执行

      redis服务器发起指令(基于条件),而不是由用户输入指令

      配置:save second changes---是写在配置文件中的

      作用:满足限定时间范围内key的变化数量达到指定数量即进行持久化

      参数:

      • second---监控时间范围
      • changes---监控key的变化量

      比如说时间范围内,2个key发生了变化,会自动执行保存,然后接下来必须又有2个key发生变化,才会再次执行保存

      这种配置来执行RDB的方式,后台执行的是bgsave指令!

    9. image-20210926152144438

    10. RDB优点

      • RDB是一个紧凑压缩的二进制文件,存储效率较高

      • RDB内部存储的是redis在某个时间点的数据快照,非常适合用于数据备份,全量复制等场景

      • RDB恢复数据的速度要比AOF快很多

      • 应用:服务器中每X小时执行bgsave备份,并将RDB文件拷贝至远程机器中,用于灾难恢复。

      RDB缺点:

      • RDB方式无论是执行指令还是利用配置,无法做到实时持久化,是定时的! 具有较大的可能丢失数据
      • bgsave指令为了不阻塞redis服务,调用fork创建子进程来执行数据的持久化,要牺牲掉一些性能
      • redis众多版本中未进行RDB文件格式的版本统一,有可能出现各版本服务之间数据格式无法兼容的现象。
      • 基于快照思想,每次读写都是全部数据!存储数据量大,效率较低,大数据量下IO性能降低

    AOF

    1. 和RDB的区别:

      • 不写全数据,仅记录部分数据
      • 改记录数据为记录数据操作
      • 所有操作均进行记录,排除丢失数据的风险
    2. 概念

      以独立日志的方式记录每次写命令(读命令(get)是不记录的。),重启时再重新执行AOF文件中命令达到恢复数据的目的,与RDB相比可以简单描述为改记录数据为记录数据产生的过程。

    3. AOF的主要作用是解决了数据持久化的实时性,因为RDB是定时快照,不具有实时性,目前已经是Redis持久化的主流方式。

    4. 当服务器接收到一条写命令时,并没有马上记录,而是把它放到一个临时的区域,这个临时的区域,是AOF所要操作的写命令对应的存储的缓冲区指令放在缓冲区这些缓冲区的指令最终是生成AOF文件的到了一定阶段,全部将这些缓冲区的指令同步到AOF文件的。

    5. AOF写数据的三种策略

      • always

        每次写入操作均同步到AOF文件中,数据零误差,性能较低

      • everysec

        每秒将缓冲区中的指令同步到AOF文件中,数据准确性高,性能较高

        在系统突然宕机的情况下丢失1秒内的数据

      • no

        由操作系统控制每次同步到AOF文件的周期,整体过程不可控。

      everysec是默认配置

    6. AOF功能开启,配置

      image-20210926155427093

    7. AOF重写

      随着命令不断写入AOF,文件会越来越大,为了解决这个问题,Redis引入了AOF重写机制压缩文件体积

      AOF重写是将Redis进程内的数据转化为写命令同步到新AOF文件的过程。简单说就是对同一个数据的若干条命令执行结果转化成最终结果数据对应的指令进行记录

    8. AOF重写作用

      • 降低磁盘占用量,提高磁盘利用率
      • 提高持久化效率,降低持久化写时间,提高IO性能
      • 降低数据恢复用时,提高数据恢复效率
    9. AOF重写规则:

      • 进程内已超时的数据不再写入文件

      • 忽略无效指令,重写时使用进程内数据直接生成,这样新的AOF文件只保留最终数据的写入命令。

      • 对同一数据的多条写命令合并为一条命令

        image-20210926161504622

    10. AOF重写方式

      • 手动重写

        image-20210926161655374

        image-20210926162118938

      • 自动重写

        image-20210926161702323

        也是写在配置文件里

        image-20210926162329910

    11. AOF重写流程

      image-20210926175036430

    12. RDB与AOF区别

      image-20210926175243861

    事务

    1. redis的每一条指令是原子性的。

      redis事务就是一个命令执行的队列!将一系列命令看作一个整体。

      当执行时,一次性按照添加顺序依次执行,中间不会被打断或者干扰

    2. 事务的基本操作

      image-20210926182752732

      注意:加入事务的命令暂时进入到任务队列中,并没有立即执行,只有执行exec命令才开始执行

      image-20210926183819448

    3. 如果开启事务后,加入队列的命令存在语法错误,那么这个事务队列里面所有的命令都将不执行!

      如果开启事务后,加入队列的命令语法正确,但是无法正确地执行,那么这个事务队列里面,正确的命令会执行,运行错误的命令不会执行

    1. 基于特定条件的事务执行--锁

      image-20210927134852367

      必须在事务开启之前,去上监视锁--watch

    2. 基于特定条件的事务执行--分布式锁

      image-20210927135455868

      有值则设置失败,没有值则设置成功,这个值指的是指令的那个value,也就是上没上锁,如果别的客户端已经上锁了,那么value肯定有值,那么就不能够设置锁了,如果没有值,代表别的客户端没有上锁,那么此客户端就可以上锁。

      大家也必须锁同一个锁,也就是取同一个名字,和Java中的synchronized是一个意思。

    3. 死锁解决方案

      依赖分布式锁的机制,某个用户操作时,对应客户端在设置分布式锁成功之后宕机了,如何解决?

      • image-20210927140106496

      • 在获得锁之后,使用expire添加锁的时间限定。

        这个锁的时间限定一般是网络延时+业务执行时间

        image-20210927140511634

    删除策略

    1. Redis中的数据特征

      redis是一种内存级数据库,所有数据均存放在内存中,内存中的数据可以通过TTL指令获取其状态

      • XX:具有时效性的数据
      • -1:永久有效的数据
      • -2:已经过期的数据或被删除的数据或未定义的数据
    2. 已经过期的数据还是在内存中放着,并没有立即删除,redis有删除策略来控制删除过期数据

    3. 过期数据是指曾经设置了有效期的数据,到达了有效期,留下来的数据,这些内存中的过期数据不会立即删除。

    4. 数据删除策略:

      • 定时删除
      • 惰性删除
      • 定期删除
    5. redis的存储空间会开辟出一个expires空间,用于存储过期数据的数据地址和过期时间两部分

      image-20210927142714546

    6. 删除策略不是立即对过期数据进行删除,而是为了在内存占用(redis的数据都是存储在内存中的)与CPU占用之间寻找一种平衡,因为CPU还要执行很多别的指令,删除这些过期数据的指令显得没有那么重要,在CPU忙的时候,所以不会急着删除这些过期数据,就有删除数据的策略,来保持内存空间占用和CPU之间的一种平衡

    7. 定时(即时)删除---立即删除

      创建一个定时器,当key设置有过期时间,且过期时间到达时,由定时器任务立即执行对键的删除操作

      优点

      • 节约内存,到时就删除,快速释放掉不必要的内存占用

      缺点:

      • CPU压力很大,无论CPU此时负载量多高,均占用CPU来执行删除操作,会影响redis服务器响应时间和指令吞吐量

      总结:用处理器性能换取存储空间(拿时间换空间)

    8. 惰性删除

      数据到达过期时间,不做处理,等下次访问该数据时,

      • 如果未过期,返回数据

      • 如果过期,删除,返回不存在,把expires空间里的数据和内存的真正的数据都删掉

        通过expireIfNeeded()这个操作来做的。

        在任何调用获取数据的操作之前,都会执行这个操作。

      优点:

      • 节约CPU性能,发现必须删除的时候才删除

      缺点:

      • 内存空间压力很大,出现长期占用内存的数据

      总结:用存储空间换取处理器性能。

    9. 定期删除

      相对于前两种方案都是走极端,一种拿时间即效率换空间,另一种拿空间换时间即效率

      redis启动服务器初始化的时候,读取配置serve.hz的值,默认为10

      每秒钟执行server.hz次serverCron()轮询

      serverCron()继续对每一个库进行轮询databasesCron()

      databasesCron()会执行activeExpireCycle()

      activeExpireCycle()对每个expires空间进行检测

      image-20210927144420196

      image-20210927144744651

      周期性轮询redis库中的时效性数据,采用随机抽取的策略,利用过期数据占比的方式控制删除频度

      特点:

      • cpu性能占用设置有峰值,检测频度可以自定义设置
      • 内存压力不大,长期占用内存的冷数据会被持续清理

      总结:周期性抽查存储空间(随机抽查)

    逐出算法

    1. 当新数据进入redis时,可能会出现内存不足

      删除策略控制的或者说删除的是具有时效性的数据

      当前的现象是所有数据都没有带有效期,全部都长期存在,这个时候删除策略不起作用

    2. redis使用内存存储数据,在执行每一个命令前,会调用freeMemoryIfNeeded()检测内存空间是否充足,如果内存不满足新加入数据的最低存储要求,redis要临时删除一些数据为当前指令清理存储空间,清理数据的策略成为逐出算法

    3. 逐出数据的过程不是100%能清理出足够的空间供新数据存放,如果不成功则反复执行,当对所有数据尝试完毕后,如果不能达到内存清理的要求,将出现错误信息

    4. 影响数据逐出的相关配置

      最大可使用内存---maxmemory

      占用计算机物理内存的比例,默认值是0,表示不限制

      image-20210927150430020

      image-20210927150454811

    5. 逐出的数据相关配置

      • image-20210927150821002
      • image-20210927150909337
      • image-20210927150919614

    Redis集群

    主从复制

    1. 互联网三高架构

      • 高并发

      • 高性能

      • 高可用

        可用性是服务器工作时间占总时间的比例,也就是去除掉宕机时间之后,服务器正常工作时间的比例

    2. 单机redis的风险与问题

      • 机器故障,导致硬盘故障、系统崩溃,出现数据丢失,可能对业务造成灾难性打击

      • 容量瓶颈

        redis的数据是放在内存中的

      为了避免单个redis服务器故障,准备多台服务器,互相连通,将数据复制多个副本保存在不同的服务器上,连接在一起,并保证数据是同步的,这叫主从同步或者主从复制

      即使有其中一台服务器宕机,其他服务器依然可以继续提供服务,实现redis的高可用,同时实现数据的冗余备份

      image-20210927164805802

    3. 主从复制核心工作:master的数据复制到slave中

    4. 主从复制:

      将master中的数据即时、有效地复制到slave中

      特征:

      一个master可以拥有多个slave,一个slave只对应一个master

    5. master:

      • 写数据
      • 执行写操作时,将出现变化的数据自动同步到slave
      • 读数据(可忽略)

      slave:

      • 读数据
      • 写数据(禁止)
    6. 高可用集群

      假如某一台slave出问题了,其他的slave从机可以对外提供请求,增强了可用性!!

      假如master出问题了,推选一台slave来当master,增强了可用性!

      假如master压力很大,在某一个slave上,追加下面的机器,也就是一个机器既可以当master也可以当slave,master和slave是一个相对的概念

      这些都是基于主从复制的,即主机和从机里面的数据是相同的,是经过复制或者说克隆的。

      也可以准备多个master,组成一个master集群。

    7. 主从复制的作用:

      • 读写分离:master写,slave读,提高服务器的读写负载能力
      • 负载均衡:基于主从结构,配合读写分离,由slave分担master负载,并根据需求的变化,改变slave的数量,通过多个从节点分担数据读取负载,大大提高redis服务器的并发量和数据吞吐量。
      • 故障恢复:当master出现问题时,由slave提供服务,实现快速的故障恢复
      • 数据冗余:实现数据热备份,是持久化之外的一种数据冗余的方式
      • 高可用基石:基于主从复制,构建哨兵模式和集群,实现Redis的高可用方案
    8. 主从复制的工作流程

      • slave连接master,master里有数据,slave里没有数据

        image-20210927171141356

        • 状态:

          slave:保存master的地址与端口

          master:保存slave的端口

          总体:master与slave之间创建了连接的socket

        • 建立连接,第一步发送指令就有三种方式

          image-20210927171355993

          方式一的客户端指的是slave的客户端

          方式二、方式三的服务器指的都是slave服务器

      • 数据同步工作,反复同步

        image-20210927181031834

        主从复制的数据同步阶段,既要用到RDB,也要用到AOF,RDB和AOF都是数据持久化的两种方式,从机请求主机同步数据时,首先是通过RDB的方式,RDB的bgsave是通过调用fork函数另起子线程来执行数据持久化工作即生成RDB文件,那么这个过程中仍然可能有其他命令进来,因为RDB是一种当前数据库数据快照的一种方式,那么在生成RDB文件还有从机接收RDB文件的这个过程中,仍然可能有其他命令,这部分命令所执行的结果的数据没有进入RDB快照文件,所以需要单独复制,也就是部分复制。

        所以有全量复制和部分复制

        全量复制是指第一个slave连接时,主机生成RDB文件,快照文件里的数据,在从机进行一个全量的恢复

        部分复制是指在生成RDB文件和从机接收RDB文件的过程中的命令,这部分命令通过AOF的方式进行持久化并且恢复!!

        所以全量复制----RDB,部分复制----AOF

        那么有AOF,就有重写,因为aof文件的命令需要重写!!有手动重写也有自动重写,在这里就是手动重写。部分复制需要AOF,那么在第一个slave连接主机时,创建命令缓冲区,接收命令,这些命令用于生成aof文件发给从机进行数据的恢复!

        aof,接收的指令首先进入命令缓冲区,这与之前的思路也是一样的。

      • 命令传播阶段

        当master数据库状态被修改后,导致主从服务器数据库状态不一致,此时需要让主从数据同步到一致的状态,同步的动作称为命令传播

        master将接收到的数据变更命令发送给slave,slave接收命令后执行命令

    9. 主从复制的数据同步阶段的master说明:

      • 如果master数据量巨大,数据同步阶段应该流量高峰期,避免master阻塞,影响业务正常执行。
      • 复制缓冲区大小设置不合理,会导致数据溢出,如进行全量复制周期太长,进行部分复制时,发现数据已经存在丢失的情况,必须进行第二次全量复制,致使slave陷入死循环状态。
      • master建议留下30%-50%的内存用于执行bgsave命令和创建缓冲区
    10. 主从复制的数据同步阶段的slave说明:

      • 为避免slave进行全量复制、部分复制时服务器响应阻塞或数据不同步,建议关闭此期间的对外服务
      • image-20210927183727073
      • slave过多时,建议调整拓扑结构,由一主多从结构变为树状结构,中间的节点既是master,也是slave,注意使用树状结构时,由于层级深度,导致深度越高的slave与最顶层的master间数据同步延迟较大,数据一致性变差,应谨慎选择
    11. 部分复制的三个核心要素

      • 服务器的运行id

        服务器运行id是每一台服务器每次运行的身份识别码,一台服务器多次运行可以生成多个运行id

        如果想两次操作均对是由同一台主服务器进行,必须每次操作携带对应的运行id,用于对方识别

      • 主服务器的复制积压缓冲区

        复制缓冲区是一个先进先出队列,用于存储服务器执行过的命令,每次传播命令,master都会将传播的命令记录下来,并存储在复制缓冲区

        image-20210927185900890

        概念:复制缓冲区,是一个先进先出队列,用于存储服务器执行过的命令,每次传播命令,master都会将传播的命令记录下来,并存储在复制缓冲区

        每台服务器启动时,如果开启有AOF,或被连接称为master节点,即创建复制缓冲区

        作用:用于保存master服务器收到的所有修改指令(仅影响数据变更的指令,例如set

        当master服务器接收到主客户端的指令时,除了将指令执行,会将指令存储到缓冲区中!!!不是说指令仅存储到缓冲区中而不被服务器执行

      • 主从服务器的复制偏移量offset

        概念:一个数字,描述复制缓冲区中的指令字节位置

        分类:

        • master复制偏移量,记录发送给所有slave的指令字节对应的位置(多个)
        • slave复制偏移量,记录slave接收master发送过来的指令字节对应的位置(一个)
        • 数据来源,master端发送依次记录一次,slave端接收一次记录一次
        • 作用:同步信息,比对master与slave的差异,当slave断线后,恢复数据使用!!
    12. 主从复制工作流程

      image-20210927195251095

    13. 全量复制和部分复制两个阶段完之后到传播阶段,是靠心跳机制,反复执行,反复传播,使得主从同步

      image-20210927195555404

      当slave多数掉线,或延迟过高时,master为保障数据稳定性,将拒绝所有信息同步操作

      image-20210927203826475

      image-20210927204302988

    14. 主从复制常见问题

      • 频繁的全量复制---第一种情况

        随着系统的运行,master服务器的数据量会越来越大,一旦master重启,runid将发生变化,会导致全部slave的全量复制操作

        redis内部优化:

        在master关闭时,通过RDB的方式(是有命令的,一般是bgsave),进行持久化,将runid与offset保存到rdb文件中

        重启后,恢复runid与offset,使所有slave认为还是之前的master,在数据同步阶段,就不用全部slave都是全量复制操作

      • 频繁的全量复制---第二种情况

        image-20210927205344386

      • 频繁的网络中断----第一种情况

    哨兵

    1. 主机宕机之后

      • 将宕机的master下线
      • 找一个slave作为master
      • 通知所有的slave连接新的master
      • 启动新的master与slave
      • 全零复制*N + 部分复制 *N
    2. 哨兵本身是一个redis服务,多个哨兵构成一个分布式系统,做监控工作,用于对主从结构中的每台服务器进行监控,当出现故障时通过投票机制选择新的master并将所有slave连接到新的master

    3. 哨兵这个分布式系统的作用:

      • 监控

        不断地检查master和slave是否正常运行

        master存活检测,master与slave运行情况检测

      • 通知

        当被监控的服务器出现问题时,向其他哨兵(哨兵之间同步信息),客户端发送通知

      • 自动故障转移

        断开master与slave连接,选取一个slave作为master,将其他slave连接到新的master,并告知客户端新的服务器地址

    4. 哨兵也是一个redis服务只是不提供数据服务

      通常哨兵配置数量为单数

    5. 启动哨兵命令

      image-20210927210554431

    6. 哨兵的工作原理

      哨兵主要做的事情就是主从切换

      主从切换---选取slave做为新的master的过程

      • 监控

        用于同步各个节点的状态信息

        • 获取各个哨兵的状态(各个哨兵之间的状态也需要同步!!)(通过PING,是否在线)
        • 获取master的状态---master的属性(runid、role:master)以及各个slave的详细信息
        • 获取所有slave的状态(根据master中的slave信息)
          • runid
          • role:slave
          • master_host master_port
          • offset
          • ...

        image-20210927225143454

        哨兵会向master要信息,会向slave要信息,哨兵之间形成一个网络,所有哨兵在哨兵这个网络发布信息、订阅信息、接收信息

      • 通知

        维护信息对等的阶段,哨兵之间互相通知,同步信息

      • 故障转移

        • 发现问题

          比如一个哨兵发现master服务器挂掉了,会给master标记一个主观挂掉的状态S_DOWN,那么其他的哨兵也都会和master进行通信,超过半数以上的哨兵发现master挂掉了,那么就会认为master真的挂掉了,会给master标记一个客观挂掉的状态O_DOWN。

          重点:哨兵之间会进行通信,同步信息,哨兵之间会互相通知!!!

        • 竞选具有决定权的哨兵

          是通过投票机制先选取一个哨兵作为具有决定权的哨兵

          某个哨兵先接到来自其他哪个哨兵的信息,按照接收信息的顺序就会把票投给那个哨兵!----投票机制

        • 优选新master,选取slave服务器作为master的原则

          • 选取在线的
          • pass掉响应慢的。哨兵不停地在和slave服务器通信,有的slave回得块,有的slave回得慢
          • pass掉与原master断开时间久的
          • 优先原则
            • 优先级
            • offset(slave与master的offset差距小的优先)
            • runid
        • 发送指令

          • 向新的master发送slaveof no one
          • 向其他slave发送slaveof新的master IP端口
          • 原master作为slave,故障恢复后连接,slaveof新的master!!(原master如果恢复之后连接了上来是作为slave的身份!)

    集群

    1. 集群作用:

      分散单台服务器的访问压力,实现负载均衡

      分散单台服务器的存储压力,实现可扩展性

      降低单台服务器宕机带来的业务灾难

    2. 集群就是使用网络将**若干台计算机(主机)**联通起来,并提供统一的管理方式,使其对外呈现单机的服务效果

    3. 数据存储设计

      • 通过算法设计,计算出key应该保存的位置

        key先经过CRC16(key)---再%16384---得到一个值,这个值决定这个key应该放在哪个redis服务器

      • 将所有的存储空间切割成16384份,每台主机保存一部分

        每份代表的是一个存储空间,这个存储空间能存很多,这一步只是找到这个存储空间

      • 将key按照计算出的结果放到对应的存储空间

      • 一个机器持有一定的槽,加机器的时候,把他的槽分一部分给新的机器,如果去机器的话,把槽返回到现有的机器中

    4. 集群内部通讯设计

      • 不同主机会互联各个数据库相互通信,保存每个库中槽的编号数据
      • 一次命中,直接返回
      • 未命中的话,在未命中的这台机器上也能找到应该放到哪个库即哪台主机上,所以最多两次就可以命中!

      image-20210928000637897

    5. 搭建好集群后,添加数据,会自动将数据存放到应该放的槽里,这个应该放的槽,是通过我们放数据的key经过CRC16,还有对16384取模计算出来的,这个应该存储的位置即槽不一定是客户端所连接的那个服务器,所以搭建好集群后,放数据会自动进行重定向。

      image-20210928143108618

      命令:客户端连接服务器的时候 要加上 -c

    6. cluster配置

      image-20210928145104155

    缓存的问题

    缓存预热

    1. 问题:

      • 服务器启动后迅速宕机

      原因:

      • 请求数量较高
      • 主从之间数据吞吐量较大,数据同步操作频度较高
    2. 解决方案

      前置准备工作

      • 日常例行统计数据访问记录,统计访问频度较高的热点数据
      • 利用LRU数据删除策略,构建数据留存队列
      • 将统计结果中的数据分类,根据级别,redis优先加载级别较高的热点数据
      • 利用分布式多服务器同时进行数据读取,提速数据加载过程

      实施:

      • 使用脚本程序固定触发数据预热过程
    3. 总结:

      缓存预热就是系统启动前,提前将相关的缓存数据直接加载到缓存系统,避免在用户请求的时候,先查询数据库,然后再将数据缓存的问题。这样用户可以直接查询事先被预热的缓存数据!!

      避免用户直接奔着数据库来查询,所以将热点数据在系统启动前就加载到缓存系统!!用户可以直接查询缓存!

    缓存雪崩

    1. 问题:

      在一个较短的时间内,缓存中较多的key集中过期(失效)

      访问过期数据,那么在redis中无法命中,无法在redis中查询到数据,所以就会去数据库查询,大量的请求压到数据库那边,数据库不能及时处理,redis出现超时现象,redis服务器资源被严重占用,redis集群服务器崩溃,应用服务器崩溃

      image-20210928150733404

    2. 问题分析

      • 短时间内大量key集中过期
    3. 解决方案

      • 更多的页面静态化处理

      • 构建多级缓存架构

        • Nginx缓存+redis缓存+ehcache缓存
      • 检测Mysql严重耗时业务进行优化

      • 灾难预警机制

        监控redis服务器性能指标

        • cpu占用、cpu使用率
        • 内存容量
        • 查询平均响应时间
        • 线程数
      • 限流、降级

        短时间范围内牺牲一些客户体验,限制一部分请求访问,降低应用服务器压力,待业务低速运转后,再逐步放开访问

    4. 解决方案---从key过期的角度,从根本来解决

      • LRU和LFU(最近很少访问的数据)切换,本来就很少访问的数据,过期了或者被清除,那么在短时间内也不可能有大量访问都来请求这个数据

      • 数据有效期策略调整

        • 根据业务数据有效期进行分类错峰
        • 过期时间使用固定时间+随机值的形式,稀释集中到期的key的数量,让这些数据不要在同一时间到期
      • 超热数据使用永久key

      • 定期维护(自动+人工)

        对即将过期的数据做访问量分析,确认是否延时,配合访问量统计,做热点数据的延时

      • 加锁--慎用!

    5. 总结:

      缓存雪崩就是瞬间过期数据量太大,导致访问请求越过缓存对数据库服务器瞬间造成很大压力,如能够有效避免数据过期时间集中,可以有效解决雪崩现象的出现

      配合其他策略一起使用,并监控服务器的运行数据,根据运行记录快速调整。

    缓存击穿

    1. 问题

      redis中某个key过期,该key访问量巨大

      多个数据请求从服务器直接到redis,均未命中

      redis在短时间内发起了大量对数据库中同一数据的访问

    2. 分析

      • 单个key高热
      • key过期
    3. 解决方案

      • 预先设定

        以电商为例,若干款主打商品,在购物节期间,加大此类信息key的过期时长

      • 现场调整

        监控访问量,对自然流量激增的数据延长过期时间或设置为永久性key

      • 后台刷新数据

        启动定时任务,高峰期来临之前,刷新数据有效期,确保不丢失

      • 二级缓存

        设置不同的失效时间,保证不会被同时淘汰就行。设置二级缓存专门处理高热数据

      • 加锁

        分布式锁,防止被击穿,加锁的话会影响性能。加锁的话避免同一时间大量请求都来请求这个高热key,造成缓存击穿

    缓存穿透

    1. 问题

      redis中大面积出现未命中

      出现非正常URL访问

      redis中没有这个数据,数据库中也不存在这个数据

    2. 解决方案

      • 对查询结果为null的数据进行缓存,设定短时限

      • 使用布隆过滤器,将数据库中的所有key都存储在布隆过滤器中,在查询Redis前先去布隆过滤器查询key是否存在,如果不存在就直接返回,不让其访问数据库

        想办法将这些非法请求,请求不存在的数据这些请求,拦截在redis之外,那么就是通过布隆过滤器

    面试问题

    redis为什么采用单线程

    1. redis并不是真正意义上的单线程,可以通过调用fork生成子进程,在RDB,AOF持久化都有用到,这个进程下面确实是只有一个线程!

    2. redis使用单线程的原因

      • 这个问题和java为什么启用多线程连起来说。

        redis处理命令是纯内存操作,不与磁盘做IO,redis处理命令是很快的,不需要阻塞等待,redis中也就不存在单线程情况下,一个线程执行任务的时候阻塞等待(在Java中,一个线程如果做了IO操作,那么会IO阻塞等待,这是IO操作的特性,这种情况下如果是单线程CPU只能等待,如果是多线程CPU可以去干别的事情,因为这个线程IO阻塞等待了,所以提高了CPU的性能,没有浪费CPU的时间!),CPU也只能干等着的情况。

        在redis场景中,单线程执行命令很快,不需要阻塞等待,不存在cpu会因为线程的阻塞等待而干等着,浪费了时间降低了效率的情况。如果这种情况,启用多线程,反而会因为线程的上下文切换浪费cpu时间

      • redis基于Reactor模式开发了网络事件处理器、文件事件处理器,文件事件处理器是单线程的,所以redis才叫做单线程的模型(redis里面并不是只有一个线程,也有其他后台线程,通过fork),它采用IO多路复用机制来同时监听多个Socket

        多个socket可能并发地产生不同的事件,IO多路复用程序会监听多个socket,会将socket放入一个队列中排队,每次从队列中有序、同步地取出一个socket给事件分派器,事件分派器把socket给对应的事件处理器,然后一个socket的事件处理完之后,IO多路复用程序才会将队列中的下一个socket给事件分派器。文件事件分派器会根据每个socket当前产生的事件,来选择对应的事件处理器来处理。这个过程是有序地、同步地,所以说redis是单线程模型!

    3. 对于Java程序,即使是单核CPU,也要使用多线程的原因

      即使单核CPU在微观上是串行执行,在宏观上才是并行的效果,并且对于单核CPU,启用多线程反而更慢,因为会有上下文切换消耗CPU性能,而且可能出现死锁或者资源限制的问题。那么单核CPU启用多线程的原因是什么?比如线程执行了IO操作,这个线程本身就要阻塞(这个线程阻塞等待的时间往往是大于线程上下文切换所消耗的时间的),这个时候是单线程,CPU只能等着,因为线程阻塞了,如果是多线程,CPU在IO阻塞的时候可以执行另一个线程(进行上下文切换),去干别的事情,提高了CPU的利用率。 所以单核情况下启用多线程也是有意义的。并且在多核情况下,也不完全是一个核对应于一个线程,因为程序跑的线程的数量远远大于cpu的核心数量,cpu即使是多核的,仍然是有一定的调度策略去执行线程,比如先来先执行、优先策略、时间片轮转策略等。

      Java中为什么用多线程,因为Java中的线程处理任务的时间往往比较长,处理任务的时候往往有IO,或者说和下游任务打交道,总之处理时间算是比较长的,在线程做一件任务的时候,可能本身就要阻塞,当一个线程出现阻塞状态比如一个线程执行了IO操作(IO的一个特性就是阻塞等待),CPU不用等着,可以去执行另一个任务,即给到时间片给另一个线程,避免CPU时间的浪费。提高cpu的利用率

      在Java程序中,单核CPU用多线程可能比单线程还慢,因为涉及到上下文切换,资源限制,死锁的问题。单核cpu启用多线程,在微观上仍然是串行的,采用时间片轮转的机制,在宏观上看起来是并发的。多核CPU启用多线程,能实现真正并行执行任务的效果。

      阻塞的一定是线程,因为阻塞是线程的状态

    Last Updated:
    Contributors: shailene
    - + diff --git "a/java/\346\241\206\346\236\266/mybatis/Mybatis.html" "b/java/\346\241\206\346\236\266/mybatis/Mybatis.html" index b7848663..b608eb87 100644 --- "a/java/\346\241\206\346\236\266/mybatis/Mybatis.html" +++ "b/java/\346\241\206\346\236\266/mybatis/Mybatis.html" @@ -23,7 +23,7 @@ } MyBatis | shAilene - + @@ -344,6 +344,6 @@ </dataSource> </environment>

补充

使用PageHelper在mybatis来自动帮助分页

  1. 添加maven依赖

    image-20210913153350204

  2. 在主配置文件中文件中加入plugin配置

    image-20210913153406267

  3. 调用PageHelper对象的startPage方法,这是静态方法。

    image-20210913153140997

- + diff --git "a/java/\346\241\206\346\236\266/spring/spring.html" "b/java/\346\241\206\346\236\266/spring/spring.html" index 693aff4d..99eb29af 100644 --- "a/java/\346\241\206\346\236\266/spring/spring.html" +++ "b/java/\346\241\206\346\236\266/spring/spring.html" @@ -23,11 +23,11 @@ } Spring | shAilene - + -

Spring

第一章:Spring 概念

Spring框架概述

  1. Spring是轻量级的开源的JavaEE框架

    解决企业开发的难度,减轻对项目模块之间的管理,类和类之间的管理,交给Spring来处理,帮助开发人员创建对象,管理对象之间的关系

  2. spring的目的就是解耦合,让关系变得松散。一个模块的变化对另一个模块影响最小!!

  3. 依赖:类A中使用类B的属性或方法,叫做A依赖于B。

  4. 框架就是半成品,需要结合框架,加上我们自己的代码,来完成开发。

    框架提供了很多工具,现有的工具和功能,组件

    我们在框架的基础之上进行开发,自己写的项目的功能,可利用框架中已有的功能

    要用框架,那么需要进行jar包的导入,依赖的添加。而Spring框架需要我们添加的依赖很少,所以是轻量级的,同理,Mybatis也是轻量级的,因为添加的依赖很少,配置简单。

    spring框架运行占用的资源少,运行效率高,不依赖其他jar,Spring核心功能的所需jar总共在3M左右

  5. 框架要完成一个功能,需要一定的步骤支持的。

  6. Spring的目的是解决企业应用开发的复杂性。

  7. Spring有很多组成部分,但是有两个核心组成部分

    • IOC

      控制反转,之前原始方式创建对象,需要new一个类,把对象创建,或者还有反射的new Instance,反射通过构造器创建。现在通过IOC,把创建对象的过程交给Spring进行管理

    • AOP

      面向切面(面向方面),比如在程序中想加功能或者扩展功能,在不修改原代码的情况下,进行功能的增强。不改原代码

  8. Spring框架的特点

    • 轻量级

    • 方便解耦,简化开发,针对接口编程

    • AOP编程支持,不改变原代码的方式,进行功能的增强

    • 方便程序的测试

    • 方便集成各种优秀框架

  9. Spring的核心技术,ioc、aop实现模块之间、类之间的解耦合,所以aop才能支持在不改变原代码的方式进行功能增强。

  10. SpringFramework内部模块

    • 数据访问模块
    • web应用模块
    • AOP模块
    • 集成功能模块
    • IOC核心容易模块
    • 测试模块

    image-20210913172634214

第二章:IoC控制反转

概述

  1. IoC---Inversion of Control,控制反转,是一个概念,一个思想

    指将传统上由程序代码直接操控的对象调用权交给代码之外的容器(这个容器在Java代码中需要被创建出来),通过外部容器来实现对象的装配和管理。

    控制反转就是对对象控制权的转移,从程序代码本身反转到了外部容器。

    通过容器实现对象的创建,属性赋值,依赖的管理(对象之间的关系管理)

  2. IOC描述的:把对象的创建、属性赋值、管理工作都交给代码之外的容器实现。

  3. spring容器中的对象默认都是单例的,在容器中叫这个名称的对象只有一个。

  4. IoC是一种概念,一种思想,其实现方式多种多样,当前比较流行的实现方式是依赖注入

  5. 依赖:

    classA中含有classB的实例,在classA中调用classB的方法完成功能,即classA对classB有依赖。

  6. 控制反转

    控制:创建对象,对象的属性赋值,对象之间的关系管理

    反转:由代码实现控制,交给外部容器来实现控制

    正转:由开发人员,在代码中,使用new构造方法创建对象,开发人员主动管理对象。

    容器:是一个服务器软件,一个框架---spring

  7. IOC的实现

    依赖注入:DI,Dependency Injection,这些工作由容器自行完成

    依赖注入是指程序运行过程中,若需要调用另一个对象协助时,无需在代码中创建被调用者,而是依赖于外部容器,由外部容器创建后传递给程序

    Spring的依赖注入对调用者和被调用者几乎没有任何要求,完全支持对象之间依赖关系的管理

  8. 为什么要使用ioc

    目的是减少代码的改动,也能实现不同的功能,解耦合,让对象的管理更松散。

  9. Java中创建对象有哪些方式

    • new的常规方式
    • new的变形:XxxBuilder、XxxFactory的静态方法
    • 反射,调用newInstance()
    • 反射,调用无参的或带参的构造器
    • 克隆,实现Cloneable接口,实现clone()方法
    • 使用反序列化
    • 动态代理
    • IoC依赖注入,由容器创建对象,然后传递给程序

    image-20210913175809348

    在此基础上,再加一种方式:

    IoC:外部容器创建对象!

    除了IoC,其他创建对象的方式都要在我们的程序中写代码来创建对象,但是IoC不需要,由外部容器创建对象,并且IoC是一个思想,有很大的功能,他不仅仅是创建对象,还可以管理对象之间的关系(管理依赖),属性赋值

  10. ioc的体现:

    servlet:

    • 创建类继承HttpServlet

    • 在web.xml注册servlet

      image-20210913180612194

    • 但是没有创建过Servlet对象,没有MyServlet myServlet = new MyServlet();

    • Servlet类的对象是Tomcat服务器创建的

      所以Tomcat也称为容器,里面存放的有Servlet对象,监听器对象,过滤器对象,这是Tomcat的三大组件,Servlet是核心组件

      Tomcat作为容器,完成了对象的创建,我们只需要在web.xml文件中修改就可以了,不用在代码里创建对象,这就是IOC的体现。

    IOC是在程序的代码之外完成对象的创建的!!!

  11. IoC的技术实现

    DI,即依赖注入,是IoC的技术实现

    我们只需要在提供要使用的对象的名称就可以了,至于对象如何在容器中创建,给属性赋值,查找都由代码外部、容器内部实现。

    Spring是使用了DI实现了IoC的功能,Spring底层创建对象,使用的是反射机制(根本)

  12. 什么样的对象放入到容器中创建?

    dao类,service类,controller类,工具类(可知这些都是功能性类,在框架中担任一定作用的类)

    spring容器中的对象默认都是单例的,在容器中叫这个名称的对象只有一个。

    一个<bean>标签对应于一个对象。

  13. 不放入到spring容器中的对象

    • 实体类的对象,因为实体类对象的属性数据是来自于数据库的,在数据库访问过程中或者说查询过程中便可以创建对象,比如由mybatis框架完成,对应于jdbc的这个操作

      image-20210914151017506

      但是mybatis并不需要写以上这几行代码,只是对应于jdbc里是这样操作,所以我们不需要把实体类对象放到spring容器中,在查询过程中便会由mybatis来帮我们创建实体对象

    • servlet、listener、filter等,这些对象交给tomcat来创建

      所以面试的时候说到IOC,不只是出现在spring框架中,这是一种思想,可以说tomcat服务器也用到。而tomcat本身又是一个容器。

  14. 对象怎么放入spring容器中创建,并且给对象的属性赋值,即完成依赖注入操作。

    • xml配置文件方式
      • set注入
        • 简单类型
        • 引用类型
    • 注解方式
  15. ioc能够实现业务对象之间的解耦合,例如service和dao对象之间的解耦合

Spring通过IoC创建对象的实现步骤

总体步骤

  1. 创建maven项目

  2. 加入maven 依赖

    spring的依赖,版本5.2.5

    junit依赖,单元测试

  3. 创建类(可以有接口和实现类)(Spring中,实体类的对象的创建不交给容器(没有必要),而是mybatis创建,因为一个实体类是对应于数据库中一个表,一个实体类对象是对应于数据库中表的一行!!)

    交给spring容器创建的对象是service类、dao类、controller类、工具类的对象!!

    和没有使用框架一样,就是普通的类

  4. 创建spring需要使用的配置文件,把第三步创建的类的信息交给spring

    声明类的信息,这些类的对象由spring创建和管理,使用<bean>

  5. 测试spring创建的对象。

  6. 注意:

    • spring中,类不是不需要写,类是需要写的,只是类的创建交给spring容器(底层使用反射机制)

      容器对象的创建是在读取配置文件的时候,读取完,那么容器对象创建好了,并且配置文件中声明的对象也创建好了

    • mybatis中,Dao接口的实现类不需要写,也就是不仅对象直接交给mybatis创建,连类也不需要写(底层是动态代理)。mybatis通过动态代理创建接口的实现类的对象。

    • 在spring中,类得自己写(不要和之前mybatis的dao接口的实现类搞混淆,那个不需要写)!!并且要把类的信息交给容器(可以理解为配置文件。)把类的信息交给配置文件。在配置文件中声明类的信息。

创建spring需要使用的配置文件

<?xml version="1.0" encoding="UTF-8"?>
+    

Spring

第一章:Spring 概念

Spring框架概述

  1. Spring是轻量级的开源的JavaEE框架

    解决企业开发的难度,减轻对项目模块之间的管理,类和类之间的管理,交给Spring来处理,帮助开发人员创建对象,管理对象之间的关系

  2. spring的目的就是解耦合,让关系变得松散。一个模块的变化对另一个模块影响最小!!

  3. 依赖:类A中使用类B的属性或方法,叫做A依赖于B。

  4. 框架就是半成品,需要结合框架,加上我们自己的代码,来完成开发。

    框架提供了很多工具,现有的工具和功能,组件

    我们在框架的基础之上进行开发,自己写的项目的功能,可利用框架中已有的功能

    要用框架,那么需要进行jar包的导入,依赖的添加。而Spring框架需要我们添加的依赖很少,所以是轻量级的,同理,Mybatis也是轻量级的,因为添加的依赖很少,配置简单。

    spring框架运行占用的资源少,运行效率高,不依赖其他jar,Spring核心功能的所需jar总共在3M左右

  5. 框架要完成一个功能,需要一定的步骤支持的。

  6. Spring的目的是解决企业应用开发的复杂性。

  7. Spring有很多组成部分,但是有两个核心组成部分

    • IOC

      控制反转,之前原始方式创建对象,需要new一个类,把对象创建,或者还有反射的new Instance,反射通过构造器创建。现在通过IOC,把创建对象的过程交给Spring进行管理

    • AOP

      面向切面(面向方面),比如在程序中想加功能或者扩展功能,在不修改原代码的情况下,进行功能的增强。不改原代码

  8. Spring框架的特点

    • 轻量级

    • 方便解耦,简化开发,针对接口编程

    • AOP编程支持,不改变原代码的方式,进行功能的增强

    • 方便程序的测试

    • 方便集成各种优秀框架

  9. Spring的核心技术,ioc、aop实现模块之间、类之间的解耦合,所以aop才能支持在不改变原代码的方式进行功能增强。

  10. SpringFramework内部模块

    • 数据访问模块
    • web应用模块
    • AOP模块
    • 集成功能模块
    • IOC核心容易模块
    • 测试模块

    image-20210913172634214

第二章:IoC控制反转

概述

  1. IoC---Inversion of Control,控制反转,是一个概念,一个思想

    指将传统上由程序代码直接操控的对象调用权交给代码之外的容器(这个容器在Java代码中需要被创建出来),通过外部容器来实现对象的装配和管理。

    控制反转就是对对象控制权的转移,从程序代码本身反转到了外部容器。

    通过容器实现对象的创建,属性赋值,依赖的管理(对象之间的关系管理)

  2. IOC描述的:把对象的创建、属性赋值、管理工作都交给代码之外的容器实现。

  3. spring容器中的对象默认都是单例的,在容器中叫这个名称的对象只有一个。

  4. IoC是一种概念,一种思想,其实现方式多种多样,当前比较流行的实现方式是依赖注入

  5. 依赖:

    classA中含有classB的实例,在classA中调用classB的方法完成功能,即classA对classB有依赖。

  6. 控制反转

    控制:创建对象,对象的属性赋值,对象之间的关系管理

    反转:由代码实现控制,交给外部容器来实现控制

    正转:由开发人员,在代码中,使用new构造方法创建对象,开发人员主动管理对象。

    容器:是一个服务器软件,一个框架---spring

  7. IOC的实现

    依赖注入:DI,Dependency Injection,这些工作由容器自行完成

    依赖注入是指程序运行过程中,若需要调用另一个对象协助时,无需在代码中创建被调用者,而是依赖于外部容器,由外部容器创建后传递给程序

    Spring的依赖注入对调用者和被调用者几乎没有任何要求,完全支持对象之间依赖关系的管理

  8. 为什么要使用ioc

    目的是减少代码的改动,也能实现不同的功能,解耦合,让对象的管理更松散。

  9. Java中创建对象有哪些方式

    • new的常规方式
    • new的变形:XxxBuilder、XxxFactory的静态方法
    • 反射,调用newInstance()
    • 反射,调用无参的或带参的构造器
    • 克隆,实现Cloneable接口,实现clone()方法
    • 使用反序列化
    • 动态代理
    • IoC依赖注入,由容器创建对象,然后传递给程序

    image-20210913175809348

    在此基础上,再加一种方式:

    IoC:外部容器创建对象!

    除了IoC,其他创建对象的方式都要在我们的程序中写代码来创建对象,但是IoC不需要,由外部容器创建对象,并且IoC是一个思想,有很大的功能,他不仅仅是创建对象,还可以管理对象之间的关系(管理依赖),属性赋值

  10. ioc的体现:

    servlet:

    • 创建类继承HttpServlet

    • 在web.xml注册servlet

      image-20210913180612194

    • 但是没有创建过Servlet对象,没有MyServlet myServlet = new MyServlet();

    • Servlet类的对象是Tomcat服务器创建的

      所以Tomcat也称为容器,里面存放的有Servlet对象,监听器对象,过滤器对象,这是Tomcat的三大组件,Servlet是核心组件

      Tomcat作为容器,完成了对象的创建,我们只需要在web.xml文件中修改就可以了,不用在代码里创建对象,这就是IOC的体现。

    IOC是在程序的代码之外完成对象的创建的!!!

  11. IoC的技术实现

    DI,即依赖注入,是IoC的技术实现

    我们只需要在提供要使用的对象的名称就可以了,至于对象如何在容器中创建,给属性赋值,查找都由代码外部、容器内部实现。

    Spring是使用了DI实现了IoC的功能,Spring底层创建对象,使用的是反射机制(根本)

  12. 什么样的对象放入到容器中创建?

    dao类,service类,controller类,工具类(可知这些都是功能性类,在框架中担任一定作用的类)

    spring容器中的对象默认都是单例的,在容器中叫这个名称的对象只有一个。

    一个<bean>标签对应于一个对象。

  13. 不放入到spring容器中的对象

    • 实体类的对象,因为实体类对象的属性数据是来自于数据库的,在数据库访问过程中或者说查询过程中便可以创建对象,比如由mybatis框架完成,对应于jdbc的这个操作

      image-20210914151017506

      但是mybatis并不需要写以上这几行代码,只是对应于jdbc里是这样操作,所以我们不需要把实体类对象放到spring容器中,在查询过程中便会由mybatis来帮我们创建实体对象

    • servlet、listener、filter等,这些对象交给tomcat来创建

      所以面试的时候说到IOC,不只是出现在spring框架中,这是一种思想,可以说tomcat服务器也用到。而tomcat本身又是一个容器。

  14. 对象怎么放入spring容器中创建,并且给对象的属性赋值,即完成依赖注入操作。

    • xml配置文件方式
      • set注入
        • 简单类型
        • 引用类型
    • 注解方式
  15. ioc能够实现业务对象之间的解耦合,例如service和dao对象之间的解耦合

Spring通过IoC创建对象的实现步骤

总体步骤

  1. 创建maven项目

  2. 加入maven 依赖

    spring的依赖,版本5.2.5

    junit依赖,单元测试

  3. 创建类(可以有接口和实现类)(Spring中,实体类的对象的创建不交给容器(没有必要),而是mybatis创建,因为一个实体类是对应于数据库中一个表,一个实体类对象是对应于数据库中表的一行!!)

    交给spring容器创建的对象是service类、dao类、controller类、工具类的对象!!

    和没有使用框架一样,就是普通的类

  4. 创建spring需要使用的配置文件,把第三步创建的类的信息交给spring

    声明类的信息,这些类的对象由spring创建和管理,使用<bean>

  5. 测试spring创建的对象。

  6. 注意:

    • spring中,类不是不需要写,类是需要写的,只是类的创建交给spring容器(底层使用反射机制)

      容器对象的创建是在读取配置文件的时候,读取完,那么容器对象创建好了,并且配置文件中声明的对象也创建好了

    • mybatis中,Dao接口的实现类不需要写,也就是不仅对象直接交给mybatis创建,连类也不需要写(底层是动态代理)。mybatis通过动态代理创建接口的实现类的对象。

    • 在spring中,类得自己写(不要和之前mybatis的dao接口的实现类搞混淆,那个不需要写)!!并且要把类的信息交给容器(可以理解为配置文件。)把类的信息交给配置文件。在配置文件中声明类的信息。

创建spring需要使用的配置文件

<?xml version="1.0" encoding="UTF-8"?>
 <beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://www.springframework.org/schema/beans
@@ -509,6 +509,6 @@
         <aop:advisor advice-ref="myAdvice" pointcut-ref="servicePt"/>
     </aop:config>
 

第六章:在web项目中使用容器对象

  1. image-20210918171200551

  2. web项目是在tomcat服务器运行的,tomcat一启动,项目就是一直运行的。

    image-20210918174507560

  3. 每一次调用controller层的servlet类的doPost方法或者doGet方法,都会创建spring的容器对象applicationContext,如果客户端在一秒钟之内发了很多次请求,比如100次,那么一秒钟之内就要调用100次servlet类的doPost方法,就要新创建100次spring的容器对象,这显然是不合理的。

    spring容器对象只需要创建一次,是单例的!!!

  4. 需求:在web项目中,容器对象只需要创建一次,把spring容器对象放入到全局作用域ServletContext中,这样这个容器就可以在多个Servlet类中使用这个容器对象

    方法:使用监听器,当全局作用域ServletContext对象被创建时,创建容器,存入ServletContext

  5. 监听器作用:

    • 创建spring容器对象applicationContext,执行image-20210918182446699

    • 把容器对象放入到ServletContext全局作用域,ServletContext.setAttribute(key, ctx);

    监听器可以自己创建,也可以使用框架中提供好的ContextLoaderListener

  6. 一个web工程,只有一个ServletContext对象实例,不管调用几次getServletContext都是返回同一个ServletContext对象实例,说明是单例模式

    ServletContext对象是一个域对象

    域对象,是可以像Map一样存取数据的对象,叫域对象

    ServletContext对象是在web工程启动的时候创建,工程停止的时候销毁

    总结:使用监听器+ServletContext,实现spring容器的单例创建

  7. 为了使用监听器对象,需要加入如下依赖:

    image-20220103214831001

  8. image-20210918183205489

    image-20210918183317069

    image-20210918183544691

  9. image-20210918183810733

  10. 总结步骤:

    • 配置监听器,配置了就创建好了容器对象,创建好的容器对象放在ServletContext里
    • 通过调用工具类的方法,取得容器对象
Last Updated:
Contributors: shailene
- + diff --git "a/java/\346\241\206\346\236\266/springboot/springboot.html" "b/java/\346\241\206\346\236\266/springboot/springboot.html" index bdff33b2..32b29f4a 100644 --- "a/java/\346\241\206\346\236\266/springboot/springboot.html" +++ "b/java/\346\241\206\346\236\266/springboot/springboot.html" @@ -23,7 +23,7 @@ } SpringBoot | shAilene - + @@ -577,6 +577,6 @@

还可以使用@Value,获取配置文件的数据,这里的配置文件是说springboot中的application.properties/yml

@Value("${server.port}")
 private Integer port;
 
  • @Autowired

    给引用类型变量赋值自动注入的,支持byName、byType,默认是byType的,放在属性的上面,也可以放在构造方法的上面。

    @Qualifier:给应用类型赋值,使用byName方式

    以上两个注解都是来自spring框架的。

  • @Resource

    给引用类型变量赋值自动注入的,支持byName、byType,默认是byName的,如果通过byName自动注入失败,会采用byType的方式对引用类型变量赋值。

    是JDK中的定义。放在属性的上面

  • 其他注解

    1. @Configuration

      放在类的上面,表示这是个配置类,相当于配置文件的作用,这里的配置文件是指spring和springmvc的xml配置文件

    2. @Bean

      放在方法的上面,把方法的返回值对象,注入到spring容器中

    3. @ImportResource

      加载其他的xml配置文件,把文件中的对象,注入到spring容器中

    4. @PropertyResource

      读取其他的属性配置文件,可以指定要读取的配置文件在类路径下的位置。

      通过${key}可以读到配置文件中的值。

    5. @ComponentScan

      扫描器,指定包名,扫描注解,把写了对应注解的类的对象都注入到容器中。

      相当于XML配置文件中的组件扫描器

    6. @ResponseBody

      放在方法的上面,表示方法的返回值是数据,不是视图

    7. @RequestBody

      把请求体中的数据,读取出来,转为Java对象使用

    8. @ControllerAdvice

      控制器增强,放在类的上面,表示此类提供了一些方法,可以对Controller增强功能。

    9. @ExceptionHandler

      用来处理异常的,放在方法的上面

      和@ControllerAdvice经常是一起搭配使用,@ControllerAdvice是写在自定义异常类的上面。

    10. @Transactional

      处理事务的,放在service实现类的public方法上面,表示此方法有事务。

    springboot中的注解

    1. @SpringBootConfiguration

      放在启动类之上的,包含了以下三个注解的功能

      @SpringBootConfiguration---表示这是一个配置类

      @EnableAutoConfiguration---自动配置功能

      @ComponentScan---扫描器

    mybatis相关的注解

    1. @Mapper

      放在接口的上面,让mybatis找到这个接口,并创建它的代理对象。

    2. @MapperScan

      和@Mapper一样,是让mybatis找到dao接口,并创建dao接口的代理对象。

      这种方式只需要在主启动类上加上@MapperScan注解,并指定dao接口所在的包名。

    3. @Param

      放在dao接口的方法的形参前面,作为命名参数使用的。

    dubbo相关的注解

    1. @DubboService

      在提供者端使用的,是暴露dubbo服务的,是放在接口的实现类上面的。

    2. @DubboReference

      在消费者端使用的,引用远程服务的,放在属性上面使用,这个属性是dubbo创建的接口的代理对象

      通过此代理对象就能够像调用自己的方法一样,调用远程服务,即使消费者端并没有方法的实现,方法的实现在服务提供者的实现类里面。

    3. @EnableDubbo

      放在主类上面,表示当前引用启用Dubbo功能

    Last Updated:
    Contributors: shailene
    - + diff --git "a/java/\346\241\206\346\236\266/springboot\345\216\237\347\220\206/springboot.html" "b/java/\346\241\206\346\236\266/springboot\345\216\237\347\220\206/springboot.html" index e4b744a2..11e6abc9 100644 --- "a/java/\346\241\206\346\236\266/springboot\345\216\237\347\220\206/springboot.html" +++ "b/java/\346\241\206\346\236\266/springboot\345\216\237\347\220\206/springboot.html" @@ -23,7 +23,7 @@ } 一些原理 | shAilene - + @@ -111,6 +111,6 @@

    虽然127个所有场景的自动配置,启动的时候默认全部加载,但是最终会按需(条件)配置

    按需配置,就是条件装配@Condition,让配置不是完全开启

    启动的时候是全部配置都加载,最终按照条件装配,来按需配置,就是把我们需要的组件在容器中注册!!!

    虽然我们127个场景的所有自动配置启动的时候默认全部加载。xxxxAutoConfiguration
     按照条件装配规则(@Conditional),最终会按需配置。(只有条件生效的时候,我们的对应的自动配置才会生效)
     
  • 总结:

  • 自动配置从配置文件取值的步骤

  • 开发小技巧

    1. lombok

      简化JavaBean开发

    核心功能-web开发

    概述

    1. springboot是框架的框架,整合了开发所需要的框架,比如springmvc
    2. 用springboot做web开发,底层仍然使用的是springmvc
    3. springboot对springmvc做了很多自动配置

    静态资源请求

    1. 静态资源目录

      image-20211008181155963类路径下

      访问当前项目的根路径 + / + 静态资源名就能访问到了。

      映射的是/**,所以写资源名,就能自动找到静态资源

      如果动态请求名和静态资源名相同,访问的是动态请求,找@RequestMapping

    2. 静态资源访问的原理:

      静态映射 /**

      请求进来,先去找Controller能不能处理(实际是请求先要经过DispatcherServlet获取请求,然后通过server()、doServer()、doDispatch()等一系列方法将请求转发给Controller处理,涉及到处理器映射器,处理器执行链,处理器适配器,最后将请求交给处理器的方法执行),如果没有Controller能处理,那么不能处理的所有请求又都交给静态资源处理器。

      接着看静态资源能不能找到,如果静态资源能找到,就能访问,如果静态资源找不到,就会返回404

    3. 静态资源访问前缀

      image-20211008183710429

      当前项目 + static-path-pattern + 静态资源名 = 能访问到静态资源

      现在开发和之前用springmvc不同的是,根路径直接就是端口号后 + /,就是根路径,之前用springmvc,或者javaweb开发,端口号和斜杠后还有一个工程名,这叫工程路径,工程路径后才是资源路径或者动态请求!!

    4. 我们也可以改变默认的静态资源路径

      image-20211008184239530

      那么resource下的haha目录下的资源才是静态资源。这是规定了静态资源默认路径位置

    静态资源配置原理

    1. springboot启动默认加载很多xxxAutoConfiguration类,这些类是自动配置类

      当然也会加载和web开发有关的自动配置类

    2. springmvc功能的自动配置类WebMvcAutoConfiguration

      自动配置类首先全部加载,按条件@Condition相关注解生效

      image-20211008225543585

    3. image-20211008225917153

      这个自动配置类,通过注解@EnableConfigurationProperties,发现用到了WebMvcProperties和ResourceProperties这两个绑定了配置文件的JavaBean

    4. xxxAutoConfiguration才是配置类,xxxProperties是与配置文件绑定的JavaBean。配置类要用到JavaBean,通过注解@EnableConfigurationProperties

    5. 配置类如果只有一个有参构造器

      有参构造器所有参数的值都会从容器中确定。

    6. 为什么静态资源能从前面提到的那四个默认位置里面拿

      image-20211008232101965

    7. 静态资源都有缓存策略。

    欢迎页支持

    1. 给静态资源路径下,放index.html

    2. 编写controller,能处理/index请求

      这两种都会被当成欢迎页

    - + diff --git "a/java/\346\241\206\346\236\266/springmvc/springMVC.html" "b/java/\346\241\206\346\236\266/springmvc/springMVC.html" index 4b0d01cd..147a1302 100644 --- "a/java/\346\241\206\346\236\266/springmvc/springMVC.html" +++ "b/java/\346\241\206\346\236\266/springmvc/springMVC.html" @@ -23,7 +23,7 @@ } SpringMVC | shAilene - + @@ -171,6 +171,6 @@
  • 使用一个配置语句,指定多种静态资源的访问:即静态资源统一放在一个目录下即static。

    image-20220105201211270

  • 访问地址

    1. html文件或jsp文件中的访问地址或请求地址

    2. 所以最好保证工程路径永远是一致的,即使用以下两种方式

      两种方式在开头都没有单纯地加斜杠,但是却保证了访问的参考地址!!

      image-20210921000533055

    第3章 SSM整合开发

    概述

    1. SpringMVC: 视图层、界面层,负责接受请求,显示处理结果的。

      spring:业务层,管理service、dao、工具类对象的

      mybatis:持久层,访问数据库的

    2. 用户发起请求--springmvc接收请求----请求给spring的service实现类对象进行处理-----service对象调用dao,通过mybatis访问数据库,处理数据

    3. 整合中有容器

      我们要做的是把使用的对象交给合适的容器创建、管理,把Controller还有web开发的相关对象交给springmvc容器,这些web用的对象写在springmvc配置文件中

      把service、dao对象定义在spring的配置文件中,让spring管理这些对象

      这两个容器对象的职责不同,两个容器是独立的

      那么两个容器中的对象怎么互相访问到呢?

      比如Controller对象怎么访问service对象呢?一个容器中的对象怎么访问到另一个容器中的对象呢?

      如果两个容器没有任何的关联肯定不行,所以这两个容器存在关系

    4. springmvc容器和spring容器是有关系的,他们的关系已经确定好了,不需要人为去做

      springmvc容器是spring容器的子容器,类似Java中的继承

      子可以访问父的内容。

      在子容器中的Controller可以访问父容器中的Service对象,就可以实现controller使用service对象。

      这个整合开发,已经把这个关系确定好了,我们只需要确定对应的对象创建要放在对应的容器中。

    整合开发步骤

    1. 新建maven项目

    2. 加入依赖

      springmvc、spring、mybatis三个框架的依赖,jackson依赖,mysql驱动,druid连接池、jsp、servlet依赖

    3. 写web.xml

    4. 创建包,Controller包,service、dao、实体类包名创建好

    5. 写springmvc、spring、mybatis的配置文件

    6. 写代码,dao接口(不用写dao实现类),service接口和service实现类(类是要写的,对象是交给容器创建的。)controller,实体类

    7. 写jsp页面

    第4章 SpringMVC核心技术

    请求重定向和转发

    1. 在javaweb中请求转发和请求重定向的区别

      image-20210921154408642

    2. springmvc框架把原来servlet中的请求转发和重定向操作进行了封装,现在可以使用简单的方式实现转发和重定向

      forward:表示转发,实现request.getRequestDispatcher("xx.jsp").forward(request,response);

      redirect:表示重定向,实现response.sendRedirect("xxx.jsp")

      他们有一个共同的特点:就是不和视图解析器一起工作,就当项目中没有视图解析器一样

    3. forward:

      image-20220105213801557

      image-20210921155010180

      setViewName()方法的形参这样写,这种方式叫显式转发

    4. redirect

      image-20210921155520211

    异常处理

    概述

    1. springmvc框架处理异常的常用方式---统一全局异常处理---aop思想

      这样的话可以不写try-catch代码,让try-catch代码和我们的业务分离,解耦合,让方法里面只保留业务逻辑代码,让异常放到一个统一的地方处理,用的思想就是AOP,业务功能和非业务功能的解耦合!!

      叫做统一全局异常处理方案

      把controller的所有异常处理都集中到一个地方

    2. 使用两个注解

    异常处理步骤

    1. 新建maven web项目

    2. 加入依赖

    3. 新建一个自定义异常类,MyUserException,再定义它的子类NameException,AgeException

    4. 在controller抛出NameException,AgeException,抛出之后,就可以处理异常了

    5. 创建一个普通类,作为全局异常处理类

    6. 创建处理异常的视图页面

    7. 创建springmvc的配置文件

    8. 如图:

      image-20210921165533405

      image-20210921165714849

      方法体里,对异常的处理逻辑:

      1. 需要把异常记录下来,记录到数据库、日志文件

        记录异常发生的事件,哪个方法发生的,异常错误内容。

      2. 发送通知,把异常的信息通过邮件、短信或微信发送给相关人员

      3. 给用户友好的提示

    拦截器

    概述

    1. 拦截器必须实现接口HandlerInterceptor

    2. 过滤器是过滤请求参数的,拦截器是拦截请求的,对请求做预先的判断处理工作

    3. 拦截器是springmvc中的一种对象,需要实现HandlerInterceptor接口

      拦截器和过滤器类似,功能方向侧重点不同,

    4. 拦截器的特点:

      是全局的,可以对多个Controller做拦截

      一个项目中可以有0个或多个拦截器,他们在一起拦截用户的请求

      拦截器常用在用户的登陆处理,权限的检查,记录日志方面

    5. 我们需要定义类实现HandlerInterceptor接口

      需要在springmvc配置文件中声明拦截器,让springmvc框架知道拦截器的存在

    6. 拦截器的执行时间:

    拦截器的使用步骤

    1. 新建maven web项目

    2. 加入依赖

    3. 创建Controller类

    4. 创建一个普通类,作为拦截器使用

    5. 创建show.jsp结果页面

    6. 创建springmvc配置文件

    HandlerInterceptor接口的三个方法

    1. preHandle(HttpServletRequest request,HttpServletResponse response,Object handler)

      预处理方法

      这个方法很重要,是整个项目的入口、门户

      参数:HttpServletRequest request,HttpServletResponse response,Object handler

      返回值:boolean

      特点:

      示例:

      image-20220106173346685

    2. postHandle(HttpServletRequest request,HttpServletResponse response,Object handler, ModelAndView modelAndView)

      后处理方法

      参数:

      特点:

    3. afterComletion(HttpServletRequest request,HttpServletResponse response,Object handler, Exception ex)

      最后执行的方法,视图处理完成后,即请求处理完成后,给出的响应

      参数:

      特点:

    4. 拦截器看作是多个Controller中共用的功能(比如用户是否登录),集中到拦截器统一处理,仍然是aop的思想!!

    5. 一个拦截器的三个方法的执行顺序

      image-20210921183533644

    多个拦截器的三个方法执行顺序

    1. 在框架中保存多个拦截器是ArrayList

      按照声明的先后顺序放入到ArrayList,先声明的先执行,后声明的后执行。

      两个拦截器,

    2. image-20210921184643169

    3. 不管有几个拦截器,只要其中一个拦截器的preHandle方法返回了false,控制器方法一定不会执行!

    4. 我们可以有多个拦截器,每个拦截器负责不同的功能,比如第一个拦截器验证登录,第二个验证功能的用户,第三个拦截器记录用户的访问日志。

    拦截器和过滤器的区别

    1. 过滤器是servlet中的对象(是servlet的三大组件之一),拦截器是框架(springmvc)中的对象

    2. 过滤器是实现Filter接口的,拦截器是实现HandlerInterceptor接口

    3. 过滤器是用来设置request,response的参数,属性的,侧重对数据过滤的(过滤器可以解决post请求中文乱码的问题

      拦截器是用来验证请求的,能截断请求

    4. 过滤器是在拦截器之前先执行的

    5. 过滤器是tomcat服务器创建的对象

      拦截器是springmvc容器中创建的对象

    6. 过滤器是一个执行时间点

      拦截器有三个执行时间点

    7. 过滤器可以处理jsp、js、html等等

      拦截器是侧重拦截对Controller的对象,如果请求不能被DispatcherServlet接收,这个请求不会执行拦截器内容

    springmvc内部请求的处理流程

    1. springmvc内部请求的处理流程也就是springmvc接收请求,到处理完成的过程

    2. 步骤

    3. 总结:

    4. 处理器映射器:获取处理器对象

      处理器适配器:执行控制器类的方法

    5. image-20210921202019817

    - + diff --git "a/java/\346\266\210\346\201\257\351\230\237\345\210\227/Kafka/kafka.html" "b/java/\346\266\210\346\201\257\351\230\237\345\210\227/Kafka/kafka.html" index 1b2a3ff0..966b2f2b 100644 --- "a/java/\346\266\210\346\201\257\351\230\237\345\210\227/Kafka/kafka.html" +++ "b/java/\346\266\210\346\201\257\351\230\237\345\210\227/Kafka/kafka.html" @@ -23,7 +23,7 @@ } kafka | shAilene - + @@ -117,6 +117,6 @@ } }

    同步发送

    1. 同步发送指的是发送到RecordAccumulator的外部数据,这批数据必须发送到broker,发送完毕之后,外部数据才会再发送到RecordAccumulator。

      也就是消息必须成功发送到kafka broker之后,即kafka有响应之后,才会继续发送数据。

    - + diff --git "a/java/\346\266\210\346\201\257\351\230\237\345\210\227/RabbitMQ/RabbitMQ.html" "b/java/\346\266\210\346\201\257\351\230\237\345\210\227/RabbitMQ/RabbitMQ.html" index aadff71a..d197e909 100644 --- "a/java/\346\266\210\346\201\257\351\230\237\345\210\227/RabbitMQ/RabbitMQ.html" +++ "b/java/\346\266\210\346\201\257\351\230\237\345\210\227/RabbitMQ/RabbitMQ.html" @@ -23,7 +23,7 @@ } RabbitMQ | shAilene - + @@ -1038,6 +1038,6 @@ 2022-04-21 19:54:04.802 INFO 11516 --- [nectionFactory1] com.atguigu.rabbitmq.config.MyCallBack : 回退的内容:ReturnedMessage [message=(Body:'hello' MessageProperties [headers={spring_returned_message_correlation=1}, contentType=text/plain, contentEncoding=UTF-8, contentLength=0, receivedDeliveryMode=PERSISTENT, priority=0, deliveryTag=0]), replyCode=312, replyText=NO_ROUTE, exchange=confirm.exchange, routingKey=key11] 2022-04-21 19:54:04.803 INFO 11516 --- [nectionFactory1] com.atguigu.rabbitmq.config.MyCallBack : 交换机已经收到消息,id为:1

    从日志可以看到消息被回退了,但是交换机接收到了消息,但是由于routing key有错,交换机无法将消息路由到队列,于是消息被回退。

    3.3 备份交换机

    1. 无法发送给交换机的消息,发送给备份交换机

      image-20220421195852600

    2. 如果消息无法发送给普通交换机(交换机出问题)或者无法路由到队列(队列或routing key出问题),转发给备份交换机,代码如下

      image-20220421200956783

      备份交换机对象的创建,两个队列的创建,以及他们与备份交换机之间的绑定都和之前是一样的。

    4. 幂等性

    5. 优先级队列

    6. 惰性队列

    四、集群部分

    - + diff --git "a/java/\350\256\241\347\256\227\346\234\272\345\237\272\347\241\200\347\237\245\350\257\206/\346\223\215\344\275\234\347\263\273\347\273\237/\346\223\215\344\275\234\347\263\273\347\273\237.html" "b/java/\350\256\241\347\256\227\346\234\272\345\237\272\347\241\200\347\237\245\350\257\206/\346\223\215\344\275\234\347\263\273\347\273\237/\346\223\215\344\275\234\347\263\273\347\273\237.html" index fb4576c4..14ecf7f3 100644 --- "a/java/\350\256\241\347\256\227\346\234\272\345\237\272\347\241\200\347\237\245\350\257\206/\346\223\215\344\275\234\347\263\273\347\273\237/\346\223\215\344\275\234\347\263\273\347\273\237.html" +++ "b/java/\350\256\241\347\256\227\346\234\272\345\237\272\347\241\200\347\237\245\350\257\206/\346\223\215\344\275\234\347\263\273\347\273\237/\346\223\215\344\275\234\347\263\273\347\273\237.html" @@ -23,11 +23,11 @@ } 操作系统 | shAilene - +

    操作系统

    第一章

    操作系统的概念、功能和目标

    1. 操作系统的概念:

      image-20211014183700023

      操作系统是指控制和管理整个计算机系统的硬件和软件资源,并合理地组织调度计算机的工作和资源的分配。(要注意操作系统也要管理硬件资源,不只是管理软件资源,比如操作系统要管理软件即应用程序占用CPU等,相当于是要管理CPU,操作系统能够管理硬件,能够管理应用程序这种软件!!)

      image-20211215161802637

      并且操作系统给上层用户和其他应用软件提供方便的接口和环境,操作系统是计算机系统中最基本的系统软件。

      操作系统负责管理和协调硬件软件资源。

    2. 进程是一个程序的执行过程执行前需要将该程序放到内存中,才能被CPU处理

      放到内存中的程序,可以理解为进程。程序是静态的,就是存放在硬盘上的静态代码,就叫做程序,要让程序跑起来,需要通过CPU,或者说,需要CPU来对这个程序进行处理,即通过CPU让这段程序跑起来,那么这个程序会放到内存中,才能被CPU进行处理,也就是“跑起来”。

    3. 操作系统的功能和目标:

      • 操作系统作为**系统资源(硬件资源和软件资源)**的管理者:

        • 处理机管理

          进程需要等待CPU资源的分配

        • 文件管理

        • 设备管理

        • 存储器管理

      • 操作系统作为用户和计算机硬件之间的接口:

        • 命令接口

          允许用户直接使用

          • 联机命令接口
          • 脱机命令接口
        • 程序接口

          允许用户通过程序间接使用

          系统调用

        • GUI---图形用户界面

          现代操作系统中最流行的图形系统。

      • 操作系统作为最接近硬件的层次,需要在纯硬件的基础上实现什么功能:

        实现对硬件机器的拓展

        操作系统是软件,是系统软件。

    4. 操作系统作为用户和计算机硬件之间的接口

      用户接口

      • 命令接口

        • 联机命令接口

          用户说一句,系统做一句

          联机命令接口 = 交互式命令接口,例如windows系统中的命令行。

        • 脱机命令接口

          用户说一堆,系统做一堆

          相当于是批处理命令接口

      • 程序接口

        一组系统调用组成,只能通过用户程序间接使用。

        在大多数情况下,程序接口和系统调用两个名词是相等的。

    操作系统的四个特征

    1. 操作系统有并发、共享、虚拟、异步这四个特征。

      其中并发和共享是两个最基本的特征,二者互为存在条件。

    并发

    1. 指两个或多个事件在同一时间间隔内发生,这些事件宏观上是同时发生的,但微观上是交替发生的

      并行:

      指两个或多个事件在同一时刻同时发生。

    2. 一个单核处理器(CPU)在同一时刻只能执行一个程序,因此操作系统会负责协调多个程序交替执行,这些程序微观上是交替执行的,但是在宏观上看起来像是同时执行(并行)。

      这就是并发,微观上是交替执行,宏观上是并行执行,并行即同时。

      所以并不是采用多线程的方式就一定执行效率更高,执行更快,因为如果是单核CPU,那么在微观上仍然是并发执行,交替执行的,并不是真正意义上的并行执行,如果单核CPU采用多线程执行任务的方式,还存在线程的上下文切换,系统的资源限制和死锁等问题,造成多线程反而比单线程更慢。

      如果是多核CPU那么, 多线程在微观上才是真正意义上的并行执行。

      CPU密集型,那么并不是线程越多越好,因为相当于并不存在CPU会空闲的状况,所以线程数等于CPU核心数就可以,如果是IO密集型,那么就会出现大量CPU空闲的时间,为了提高CPU的执行效率,可以采用更多的线程数(CPU核心数的两倍)。

    3. 即使有多核CPU,但是操作系统的并发性依然必不可少!!除非有多少核心,就只有多少任务数,那么就只需要多少个线程就能处理了,达到真正的并行,但是任务数或者线程数比核心多是很常见的情况。(在这种场景下,将线程和任务认为是一个东西是没有问题的,在Java线程池的部分,线程和任务不要认为是一个东西,任务本质是实现了Runnable或者说Callable接口的实现类对象,任务是要交给线程来执行的,如果线程达到核心线程数量的最大值,那么会去检查任务阻塞队列是否满,如果未满,则新任务会添加进阻塞队列,如果已满,再检查此线程池的最大线程数,如果未达到最大线程数,将此任务交给非核心线程执行,非核心线程是有存活时间的,如果已达到最大线程数,说明没有多的线程能够执行此任务,那么会执行拒绝策略。)

    4. CPU有4个核心,意味着可以并行地执行4个任务,但是计算机同时运行超过4个任务的情况是存在的。所以并发必不可少,也就是微观上的并发执行,任务并发地占用CPU资源这种情况必不可少。

    共享

    1. 共享即资源共享,分为同时共享和互斥共享。

      共享是指系统中的资源可供内存中多个并发执行的进程共同使用。

    2. 互斥共享:

      系统中的某些资源,虽然可以提供给多个进程使用,但一个时间段内只允许一个进程访问该资源。

      使用QQ和微信视频,同一时间段内摄像头只能分配给其中一个进程。

      同时共享:

      系统中的某些资源,允许一个时间段内多个进程“同时”对他们进行访问(宏观上是同时的)

      所谓的同时往往是宏观上的,而在微观上,这些进程可能是交替地对该资源进行访问的。微观上交替就是并发。(同时共享,微观上多个进程可能是真的同时访问资源)

    3. 并发性是指计算机系统中同时存在着多个运行着的程序,这些程序在微观上是由CPU交替执行的(比如单核cpu,但是采用多线程的方式执行任务,那么就会出现微观上并发,宏观上并行)

      共享性是指进程可以同时访问系统资源,可以是一段时间段内只有一个进程能够访问,这叫互斥共享,可以是一段时间端内多个进程同时访问,这是同时共享。

      如果失去并发性,则系统中只有一个程序正在运行,则共享性失去存在的意义

      如果失去共享性,则多个进程不能同时访问硬盘资源,就无法实现同时发送文件,也就无法并发。

      所以共享性和并发性是相互依存的。

    虚拟

    1. 虚拟是指把一个物理上的实体变为若干个逻辑上的对应物,物理实体是实际存在的,而逻辑上对应物是用户感受到的。

      虚拟技术中的空分复用技术---虚拟存储器技术

      image-20211029171246758

    2. 虚拟技术的时分复用技术---虚拟处理器技术

      image-20211029171359873

      处理器把大的时间段分为各个很小的时间片,通过时间片轮转的机制,交替为各个进程服务,这是时分复用技术,也就是虚拟处理器技术,而空分复用技术是虚拟存储器技术。

    3. 显然,如果失去了并发性,则一个时间段内系统只需运行一道程序,那么就失去了实现虚拟性的意义了,因此没有并发性就谈不上虚拟性。

    异步

    1. 异步是指,在多道程序环境下,允许多个程序并发执行,但由于系统资源有限,进程的执行不是一贯到底的,而是走走停停,以不可预知的速度向前推进,这就是进程的异步性。

      因为并发,因为共享,多个进程同时访问某个系统资源,所以异步,不可预知的速度推进,如果同步,那么一个进程访问完此系统资源之后,才能另一个进程访问这个系统资源,接着下一个进程,这就是同步,速度是可预知的,没有共享性,没有并发,一个执行完之后下一个才执行。(这里的系统资源可以理解为CPU时间片。)

      显然,如果失去了并发性,那么系统只能串行地处理各个进程,虽然因为并发,进程在微观上仍然是被CPU串行处理的,但是有上下文切换,有程序计数器保存下一条字节码指令的执行地址,并不是一个进程完全执行完之后才会执行另一个进程,这涉及到CPU对多线程的执行策略,比如时间片轮转机制。但是串行就指的是一个进程执行完之后再执行另一个进程。

      只有系统拥有并发性,那么虚拟,共享,异步才有意义。因为正是因为并发性,使得共享性有意义,对系统资源的共享(比如CPU时间片),同时由于系统资源的限制,导致多个进程是走走停停(微观上仍是串行,但是是通过上下文切换),以不可预知的速度向前推进,导致了异步性。

      如果没有并发性,那么就是某个进程完全执行完之后(因为没有并发性!!),执行下一个进程,这就是同步的,不可能会导致异步性。一个进程的执行必须完全等上一个进程完全执行完之后才可以执行,因为没有并发,意味着没有宏观上的并行执行,必须一个接一个。

    2. 如果进程由于没有获得某个需要的系统资源,导致进程无法执行,则进程会阻塞,直到获得系统资源,进程被唤醒,进入就绪状态,获得CPU时间片之后,进程继续执行。

    3. 没有并发和共享,就谈不上虚拟和异步,因此并发和共享是操作系统两个最基本的特征。

    操作系统的发展和分类

    1. 计算机可以识别的是二进制的机器码,计算机只能之别0和1二进制数。

    2. OS的发展和分类

      image-20211215180652752

    3. 手工操作阶段

      主要缺点:用户独占全机,人机速度矛盾导致资源利用率低。

    4. 单道批处理系统

      引入脱机输入、输出技术(用磁带完成),并监督程序负责控制作业的输入、输出。

      主要缺点:内存中仅能有一道程序运行,只有该程序运行结束之后,才能调入下一道程序,CPU有大量的时间是在空闲等待IO完成,资源利用率依旧很低。从这里可以看出,单道批处理系统的缺点就是不采用多线程的缺点或者说是系统不能并发执行进程,只能串行执行进程的缺点,导致CPU大量时间处于空闲状态,因为线程或者说进程正在执行IO操作,那么会阻塞,此时CPU处于空闲状态,因为进程或者线程阻塞了,CPU不能去执行别的线程或者进程或者任务,因为,串行执行!!所以要采用多线程,或者说要多线程的好处、并发执行程序的好处,就是让提高CPU的利用率,以免当某个进程IO阻塞的时候,CPU能够执行另一个进程或线程而不是处于空闲状态,提高了利用率,提高了系统的吞吐量。

    5. 多道批处理系统

      主要优点:多道程序并发执行,共享计算机资源,资源利用率大幅提升,CPU和其他资源保持忙碌状态,提高了CPU执行效率,系统吞吐量增大。这就和前面说的单线程的缺点相对应,如果是单线程执行任务,如果执行了IO并阻塞,那么线程阻塞,CPU也只有跟着等待,如果是多线程,CPU可以把时间片分给别的线程,去执行别的任务,提高CPU的执行效率,不让CPU空闲等待,增大了系统吞吐量

      Redis是采用单线程,就是因为redis所有操作都在内存范围内,不涉及内存和磁盘之间的IO,所以不存在线程会由于IO而阻塞的情况,CPU也不会因为线程阻塞而等待,也不需要多线程来提高系统的吞吐量。

    6. 单道批处理技术

      image-20211029181727331

      多个程序串行执行,串行工作。

      多道批处理技术是多道程序并发执行。(但是并不是时间片轮转,而是一个进程的某项任务执行完之后,CPU再去执行另一个进程。)

      image-20211029181850429

      使系统资源利用率大幅度提升

      不同进程在各自的某些阶段,能够进行并行的工作,所以提高了系统资源利用率。

    7. 分时(时间片)操作系统:

      计算机以时间片为单位轮流为各个用户/作业服务,各个用户可通过终端与计算机进行交互

      主要缺点:

      不能优先处理一些紧急任务,操作系统对各个用户/作业是完全公平的,循环地位每个用户/作业服务一个时间片,不区分任务的紧急性。(在这种场景下,任务和线程可以理解为同样的。)

    8. 实时操作系统:

      优点:能够优先响应一些紧急任务,某些紧急任务不需时间片排队。

      在实时操作系统的控制下,计算机系统接收到外部信号后及时进行处理,并且要在严格的时限内处理完事件。实时操作系统的主要特点是及时性和可靠性。

      硬实时系统:必须在绝对严格的规定时间内完成处理

      软实时系统:能接收偶尔违反时间规定。

    9. image-20211029182506414

    操作系统的运行机制和体系结构

    运行机制

    1. 指令:

      特权指令:如内存清零指令,不允许用户程序使用

      非特权指令:如加减乘除指令

      问题:CPU如何判断当前是否是可以执行特权指令?

      就是通过CPU的状态,CPU有两种状态,用户态和核心态。

    2. 高级语言代码需要经过“翻译”得到机器语言指令或者说机器码,这是计算机能够识别的二进制码。这个过程在Java中是编译,但是不完全等同,因为Java是在JVM基础上运行,Java这种高级语言首先需要经过编译得到字节码文件,字节码也是二进制码,但是不等同于机器码。

      字节码虽然是二进制的,字节码文件是二进制文件,但是字节码并不能够直接运行在操作系统之上,因为字节码指令并非等价于能够被CPU所识别的机器指令(机器码),字节码文件内部包含的仅仅是一些能够被JVM识别的字节码指令、符号表,以及其他辅助信息

      那么,想让一个Java程序运行起来,JVM中执行引擎的任务就是将字节码指令解释、编译成为对应平台上的本地机器指令才可以,简单来说,JVM中的执行引擎充当了将高级语言翻译为机器语言的译者

      执行引擎部分有JIT即时编译器,还有解释器,还有垃圾回收器,其中解释器就是解释字节码指令并执行,JIT即时编译器就是将字节码指令再翻译成机器指令或者说机器码,这个机器指令是能够被计算机、CPU、或者说操作系统识别的二进制码(虽然字节码是二进制码,但是不能被操作系统识别,是能够被JVM识别,这是Java编程语言的特性),JIT即时编译器的作用就是将字节码翻译成机器码,这是一个二次编译的过程,也就是说第一次编译是从Java高级语言到字节码文件,第二次编译是在JVM的执行引擎,将字节码翻译成机器码。

    3. 一条高级语言的代码翻译过来可能回对应多条指令

      image-20211215204419631

      简单来说,“指令”就是处理器(CPU)或者广义上说操作系统能识别、执行的最基本指令。

      比如:加法指令就是让CPU进行加法运算

    4. 两种处理器状态:

      用户态(目态):此时CPU只能执行非特权指令

      核心态(管态):此时CPU可以执行特权指令和非特权指令

      用程序状态字寄存器PSW中某标志位来标识当前处理器处于什么状态,如0为用户态,1为核心态。

      有的程序需要使用特权指令,有的程序只能使用非特权指令。

    5. 两种程序:

      内核程序:操作系统的内核程序是系统的管理者,既可以执行特权指令,也可以执行非特权指令,运行在核心态。

      应用程序:为了保证系统能安全运行,普通应用程序只能执行非特权指令,运行在用户态。

    操作系统内核

    1. image-20211031173518958

      特权指令需要在核心态执行

      非特权指令既可以在核心态执行,也可以在用户态执行

      需要使用特权指令的程序称为内核程序

      只能使用非特权指令的程序称为应用程序

    2. 操作系统最接近硬件的层次是操作系统内核

      另一部分是非内核功能,所以可以把操作系统分为内核功能和非内核功能

      image-20211215205340442

      原语是一种特殊的程序,是最接近硬件的部分,这种程序的运行具有原子性。

    3. 内核是计算机上配置的底层软件(操作系统本身是系统软件,又分为内核和非内核两部分),是操作系统最基本最核心的部分,而实现操作系统内核功能的程序就是内核程序。

      image-20211031180947464

    操作系统体系结构

    1. 有的操作系统并不把对系统资源进行管理的功能划分为内核功能

      如果把对系统资源进行管理(处理器管理、存储器管理、设备管理、文件管理)的功能也划分为内核功能,则称这个内核是大内核

      如果不把系统资源管理功能划分为内核功能,则称内核是微内核。

    2. image-20211031181418067

      大内核的优点就是性能高,主要功能模块都运行在核心态,减少了处理器在核心态和用户态之间的切换!

      微内核:核心态只负责最核心的一些工作,优点是组织结构清晰,方便维护,缺点是效率低,因为微内核,并不是许多主要功能模块都在核心态,所以需要经常进行核心态和用户态之间的切换,导致效率低。

    3. 操作系统内核功能或者说内核程序一定是运行在核心态。

    4. 特权指令只能在核心态下执行

      内核程序只能在核心态下执行

    中断和异常

    中断机制的诞生

    1. 早期的计算机中,各个程序只能串行执行,就是单道批处理系统,同一时刻,处理器只能处理一道程序,系统资源利用率低

      引入中断机制,实现了多道程序并发执行

      本质:发生中断就意味着需要操作系统介入,开展管理工作

    2. CPU切换为核心态,对中断信号进行处理

      处理完后,再切换为用户态,执行进程

    3. CPU可能会收到计时部件发送的中断信号,通知CPU现在已经过了一个时间片了,当CPU收到中断信号,那么CPU会立即切换到核心态(用户态和核心态是说的CPU状态),然后把CPU的使用权限交给操作系统,操作系统的内核就会开始对中断信号进行处理,操作系统内核发现刚才的中断信号是告诉CPU时间片已到,那么操作系统会进行进程1和进程2之间的切换,进程1的时间片用完,换进程2执行,在完成这一系列的管理工作后,操作系统会把CPU的使用权交给用户进程,接下来进程2就会获得CPU时间片,CPU也由核心态切换回了用户态,进程2在用户态下进行执行。

      image-20211215211612977

      image-20211215211627172

      image-20211215211657088

      image-20211215211713943

      image-20211215211752899

      ​ 进程2在用户态下执行

    中断的概念和作用

    1. 当中断发生时,CPU会立即进入核心态

      当中断发生后,当前运行的进程暂停运行并由操作系统的内核对中断信号进行处理

      对于不同的中断信号,会进行不同的处理

      发生中断,由于操作系统的管理工作(比如进程切换、分配IO设备等)需要使用特权指令,因此CPU要从用户态转为核心态。

      中断可以使CPU从用户态切换为核心态,使操作系统获取计算机的控制权,有了中断,才能实现多道程序并发执行。

    2. CPU用户态--核心态是通过中断实现的, 并且中断是唯一途径

      核心态到用户态的切换,是通过执行一个特权指令(因为核心态下本来就可以执行特权指令),将程序状态字的标志位设置为用户态

    中断的分类

    1. 内中断(异常、例外、陷入)

    2. 外中断,也可以简单地称之为中断

    3. 内中断和外中断的本质区别在于中断信号的来源是CPU的内部还是外部

      内中断的发生和当前CPU执行指令是有关系的,外中断的发生和当前CPU执行指令是没有关系的(比如说打印机在完成输出工作之后,向CPU发送的外部中断信号)。

    4. image-20211031192224702

    5. 另一种分类方式

      image-20211031192325361

    外中断的处理过程

    1. 执行完每个指令之后,CPU都要检查当前是否有外部中断信号
    2. 如果检测到外部中断信号,则需要保护被中断进程的CPU环境(如程序状态字PSW,程序计数器PC、各种通用寄存器),可以大致理解为要保存进程当前的一些中间结果,以便恢复之后,还可以从当前状态继续往下执行,可以理解为多线程环境下线程之间的上下文切换,程序计数器的作用就是保存下一条要执行的字节码指令的地址,所以程序计数器需要保存这个地址,用于上下文切换。
    3. 根据中断信号类型转入相应的中断处理程序(内核程序,运行在CPU核心态,这是肯定的,因为中断发生时,CPU会立即进入核心态)
    4. 恢复原进程的CPU环境并执行特权指令退出中断(设置程序状态字PSW的标志位),返回原进程继续往下执行。

    系统调用

    概述

    1. 操作系统作为系统软件,管理系统资源,面向上层,对用户提供命令接口,对程序提供程序接口(其实也可以理解为对用户),程序接口就是一组系统调用组成

      可以把系统调用理解为操作系统提供给应用程序(程序员或编程人员)使用的接口,可以理解为一种可供应用程序调用的特殊函数,应用程序可以发出系统调用请求来获得操作系统的服务

    2. 操作系统为什么要提供系统调用功能?

      如果用户进程想要使用系统资源,那么通过操作系统提供的系统调用,比如用户继承想要使用打印机这种共享资源,只能通过系统调用对操作系统发出请求,操作系统会对各个请求进行协调管理

      系统调用就是程序接口,用户进程通过一组系统调用即程序接口,使用某个系统资源,因为是系统资源,所以系统调用后,CPU进入核心态,把控制权交给操作系统,操作系统对请求进行协调管理

      系统调用后,CPU会进入核心态,这是自愿中断,也就是内中断,与CPU当前执行的指令有关,是系统调用使用的访管指令或者陷入指令。

    3. 什么是系统调用?

      应用程序通过系统调用请求操作系统的服务,系统中的各种共享资源都由操作系统同一掌管,因此在用户程序中,凡是与资源有关的操作(如存储分配、IO、文件管理等),都必须通过系统调用的方式向操作系统提出服务请求,由操作系统代为完成(系统调用后,CPU会进入核心态,系统调用会使用访管指令或者说陷入指令),因为操作系统就是管理系统资源的,包括硬件资源和软件资源,这样可以保证系统的稳定性和安全性。

    系统调用分类

    1. image-20211031215805004

      系统调用相关处理涉及到对系统资源的管理,对进程的控制,这些功能需要执行一些特权指令,因此系统调用相关处理需要在核心态下进行。

    系统调用与库函数的区别

    1. 库函数的底层封装一些系统调用功能

      image-20211215214453318

      image-20211031220400682

      image-20211031220438631

    系统调用背后的过程

    1. image-20211031220738705

      write这个库函数,就涉及到了系统调用。

      当执行陷入指令之后,CPU的控制权会交给操作系统,陷入指令就是访管指令,核心态就是管态。这属于系统调用,执行陷入指令,是内中断。

      很好理解,系统调用,就是会通过操作系统来执行一些功能,必定会进入核心态,而用户态到核心态只有一种方式,就是中断,系统调用会通过访管指令,实现内中断。

      内中断分为自愿中断(也叫做指令中断,也就是系统调用时使用的访管指令)、硬件故障(缺页)、软件中断

      内终端又分为陷入、故障和终止。

      自愿中断(访管指令引起的指令中断)属于陷入,缺页属于故障,软件中断比如整数除0属于终止。

    2. int指令的参数x指明了系统的调用号,此处的int不是整数的意思,其实是interrupt的缩写

      image-20211215215539484

      传递系统调用参数 ----> 执行陷入指令(用户态)------> 执行系统调用相应服务程序(核心态)-----> 返回用户程序

      系统调用会使用访管指令(陷入指令),从而使CPU切换到核心态

    3. 注意:

      • 陷入指令是在用户态执行的,执行陷入指令之后,立即引发一个内中断,这属于自愿中断,从而CPU进入核心态
      • 发出系统调用请求是在用户态,而对系统调用的相应处理,是在核心态下进行。
      • 陷入指令是唯一一个只能在用户态执行,而不可再核心态执行的指令。因为陷入指令即访管指令的目的就是进入核心态。
      • 凡是与资源(系统资源、共享资源)有关的操作、会直接影响到其他进程的操作,一定需要操作系统介入(需要操作系统来调度,来对请求协调管理),即需要通过系统调用来实现。

    第二章

    进程

    进程的定义

    1. 程序:就是一个指令序列

      早期的计算机(只支持单道程序),因此在计算机中,同一时间段内只能有一道程序,在这段时间段内,CPU只为这道程序服务

      内存中同一个时间段内只存在一个程序相关的数据,包括程序段和数据段两个部分,程序段保存的是代码本身,数据段存放的是程序运行过程中的中间数据

      image-20211215221112255

    2. 引入多道程序技术之后

      image-20211215221415179

      为了方便操作系统管理,完成各程序并发执行,引入了进程、进程实体的概念

      操作系统为每个运行的程序(进程)配置一个数据结构,称为进程控制块(PCB),用来描述进程的各种信息(如程序代码存放位置、进程的状态)

      PCB、程序段、数据段三部分构成了进程实体(进程映像)

    3. 一般情况下,我们把进程实体就简称为进程,例如,所谓创建进程,实质上是创建进程实体中的PCB,而撤销进程,实质上是撤销进程实体中的PCB

      注意:PCB是进程存在的唯一标志。

    4. 从不同的角度,进程可以有不同的定义,比较传统典型的定义有:

      • 进程是程序的一次执行过程
      • 进程是一个程序及其数据在处理器上顺序执行时所发生的活动
      • 进程是具有独立功能的程序在数据集合上运行的过程,它是系统进行资源分配和调度的一个独立单位。

      所有的定义都强调进程是一个动态的过程

    5. 引入进程实体的概念后,可把进程定义为:

      进程是进程实体(或者说静态程序)的运行过程,是系统进行资源分配和调度的一个独立单位。

      注意:严格来说,进程实体和进程并不一样,进程实体是静态的,进程则是动态的

    进程的组成

    1. 进程(进程实体)由程序段、数据段、PCB三部分组成

      image-20211215222440380

    2. PCB的组成

      image-20211215222506062

      当进程被创建时,操作系统会为该进程分配一个唯一的、不重复的ID,用于区分不同的进程。

      当进程切换时,需要把进程当前的运行情况记录下来,保存在PCB中,如程序计数器的值表示了当前程序执行到哪一句。(在jvm中,程序计数器保存了下一条需要执行的字节码指令对应的地址!!)

      进程的管理者(操作系统)所需的数据都在PCB中!!

      程序段和数据段存放的是程序本身的运行所需的数据

    进程的组织方式

    1. 在一个系统中,通常有数十、数百乃至数千个PCB(进程控制块,描述进程的各种信息),为了能对他们加以有效的管理,应该用适当的方式把这些PCB组织起来

      进程的组成讨论的是一个进程内部由哪些部分构成的问题,而进程的组织讨论的是多个进程之间的组织方式的问题。

    2. image-20211216150358099

    3. 进程的组织---链接方式(操作系统持有指针,指向不同队列)

      执行指针指向当前处于运行态(执行态)的进程

      就绪队列指针,指向当前处于就绪态的进程

      阻塞队列指针,指向当前处于阻塞态的进程,很多操作系统还会根据阻塞原因不同,再分为多个阻塞队列

      image-20211216150733591

    4. 进程的组织---索引方式(操作系统持有指针,指向索引表,而不是队列)

      image-20211216150812905

      注意:链接方式,是指针指向队列,索引方式,是指针指向索引表

    进程的特征

    1. 进程和程序是两个截然不同的概念,相比于程序,进程拥有以下特征:

      • 动态性:进程是程序的一次执行过程,是动态地产生、变化、消亡的。(动态性也是进程最基本的特征)

      • 并发性:内存中有多个进程实体(映像),各进程可并发执行(并发就是宏观上并行,微观上串行,轮流被CPU执行,但是在宏观上,各进程好像是并行执行的。 )

      • 独立性:进程是能独立运行、独立获得资源,独立接受调度的基本单位

      • 异步性:各进程按各自独立的、不可预知的速度向前推进(因为并发性,不是被CPU完全串行执行的,所以推进的速度是未知的),操作系统要提供“进程同步机制”来解决异步问题。

        异步性有可能导致运算结果的不确定性,所以需要依靠同步机制。

      • 结构型:每个进程(进程实体)会配置一个PCB,结构上看,进程由程序段、数据段、PCB组成

    2. 在Java中,进程是作为资源分配的最小单位,线程才是接受调度的最小单位。

      对于操作系统来说,进程是资源分配和操作系统调度的一个独立单位

    3. PCB是操作系统为了管理进程所创建的数据结构,PCB存放的数据是对进程的管理数据

    进程的状态和转换

    进程的状态
    1. 进程是程序的一次执行,在这个执行过程中,有时进程正在被CPU处理,有时又需要等待CPU服务,可见,进程的状态是会有各种变化,为了方便对各个进程的管理,操作系统需要将进程合理地划分为几种状态。

    2. 三种基本状态

      • 运行态---占有CPU,并在CPU上运行。注意:单核处理机环境下,每一个时刻最多只有一个进程处于运行态(双核环境下,可以同时有两个进程处于运行态即在微观上也是并行的,单核的话,如果有多个进程,那么在微观上就是串行执行的,在宏观上是并行的。)

      • 就绪态---已经具备运行条件,但是由于没有空闲CPU,而暂时不能运行处于就绪态的进程,已经拥有了除处理器之外所有需要的资源,一旦获得处理器,即可立即进入运行态开始运行,即万事具备,只欠CPU

      • 阻塞态---因等待某一事件,而暂时不能运行(不是在等待CPU,而是等待除了CPU之外的其他事件,如果只是等待CPU,那么是就绪态)。如等待操作系统分配打印机、等待读磁盘操作的结果等,这些IO操作使得此进程阻塞,此进程必须等待IO操作完成,此时CPU处于空闲状态(这也是多线程或者说多任务的意义,在某个线程因为IO操作而阻塞的适合,不至于让CPU处于空闲状态而导致CPU利用率很低和系统吞吐量很低,如果采用多线程,这种情况下,CPU可以在某个线程因为IO操作而阻塞的时候,不处于空闲状态,而去执行其他线程,提高系统吞吐量)。

        CPU是计算机中最昂贵的部件,为了提高CPU的利用率,需要先将进程需要的其他资源分配到位,才能得到CPU的服务,也就是说,处于阻塞态的进程,是还没有获得除了CPU之外的其他资源。如果获得了除了CPU以外的其他资源,只差CPU,那么这个进程会处于就绪态。

        获得了CPU以外的其他所有需要的资源,会从阻塞态到就绪态,相当于Java中被唤醒!!

    3. 进程的另外两种状态

      • 创建态(NEW,新建态):进程正在被创建,操作系统为进程分配内存空间等系统资源,初始化PCB
      • 终止态(TERMINATED):进程正在从系统中撤销,操作系统会回收进程所拥有的资源、撤销PCB
    进程状态的转换
    1. image-20211216153719194

      注意:不能由阻塞态直接转换为运行态(必须先转换为就绪态),也不能由就绪态直接转换为阻塞态(因为进程进入阻塞态是进程主动请求的,必然需要进程在运行时才能发出这种请求。)

    2. image-20211216154057426

    进程控制

    基本概念

    1. 进程控制的主要功能是对系统中的所有进程实施有效的管理,它具有创建新进程、撤销已有进程、实现进程状态转换比如阻塞、唤醒等功能。

      简化理解:反正进程控制就是要实现进程状态转换

      image-20211216155307167

    2. 如何实现进程控制?

      image-20211216155950660

    3. PCB所处的队列和PCB里的状态标志一定要是对应的,一致的,不然会产生系统错误,于是采用原语来实现进程控制,实现进程状态的转换,原语可以理解为一气呵成。

    进程控制相关的原语

    1. 用原语实现进程控制,原语的特点是执行期间不允许中断,只能一气呵成

      这种不可被中断的操作即原子操作

      原语采用“关中断指令”和“开中断指令”实现

      image-20211216160414267

      显然,关、开中断指令的权限非常大,必然是只允许在核心态下执行的特权指令

      原语也是只能运行在核心态的。

    2. 进程控制会导致进程状态的转换

      无论哪个原语,要做的无非是三类事情:

      • 更新PCB中的信息(如修改PCB中的进程状态标志,将运行环境保存到PCB,从PCB恢复进程运行环境)
        • 所有的进程控制原语一定都会修改进程状态标志
        • 剥夺当前运行进程的CPU使用权必须需要保存其运行环境,以进行上下文切换
        • 某进程开始运行前必然要恢复其运行环境即上下文切换
      • 将PCB插入合适的队列,所插入的队列要与PCB里的信息保持一致,所以要通过原语来实现进程控制
      • 分配、回收资源,比如进程TERMINATED之后,需要回收内存这种系统资源!! 当然可能还有这个进程执行所需要的其他资源
    3. image-20211216161206697

      image-20211216161225780

      image-20211216161549508

      image-20211216161628062

      注意:一定要注意,进程转换到运行态,一定要恢复进程运行环境,如果进程从运行态转换到阻塞态,那么要保护进程运行环境,进程运行环境保存到PCB。

      进程转换到阻塞态,是主动动作,所以一定是运行态---阻塞态,因为是进程主动申请的,从阻塞态是转换到就绪态,这个过程无需恢复进程运行环境,当进程从就绪态转换到运行态时,需从PCB恢复进程运行环境。

    进程通信

    概念

    1. 进程通信指的就是进程之间的信息交换

      进程是资源分配的基本单位(包括内存地址空间),因此各进程拥有的内存地址空间相互独立

      为了保证安全,一个进程不能直接访问另一个进程的地址空间

      但是进程之间的信息交换又是必须实现的,比如说使用应用程序的时候的分享功能,将一个进程的数据信息和另一个进程进行通信,所以需要进程之间的通信

      为了保证进程间的安全通信,操作系统提供了一些方法---共享存储、消息传递和管道通信

    共享存储

    1. 两个进程不能直接访问对方的地址空间,所以操作系统会为两个进程分配一个共享空间,两个进程之间的通信就通过这个共享空间来完成。

      但是这两个进程对共享空间的访问必须是互斥的,这就是前面提到的互斥共享

      互斥共享就是系统中的某些资源,虽然可以提供给多个进程使用,但一个时间段内只允许一个进程访问该资源。

    2. 互斥访问,一般是通过操作系统提供的工具实现的,操作系统只负责提供共享空间和同步互斥工具(如P、V操作)

    3. 共享存储(共享空间)分为两种

      • 基于数据结构的共享

        共享空间中只能存放一种固定的数据结构,比如共享空间里只能放一个长度为10的数组,那么两个进程之间的通信,每一次只能通过这个长度为10的数组,这种共享方式速度慢、限制多,是一种低级通信方式。

      • 基于存储区的共享

        操作系统只负责为通信的进程提供存储空间,在内存中画出一块共享存储区,但是在这个共享空间中,两个进程交换的数据是什么形式,存放的位置都是由进程控制,而不是操作系统,相比之下,这种共享方式速度更快,是一种高级通信方式(相当于是说不会收到那么多限制)。

    消息传递

    1. 进程间的数据交换以格式化的消息为单位,进程通过操作系统提供的“发送消息/接收消息”两个原语进行数据交换。

      一个格式化的消息会包含消息头和消息体两个部分

      消息头包括:发送进程ID,接收进程ID,消息类型,消息长度等格式化的信息(计算机网络中发送的“报文”其实就是一种格式化的消息)

      image-20211216171359712

    2. 消息传递分为两种

      • 直接通信方式

        把消息直接挂到接收进程的消息缓冲队列上,每一个进程会有一个消息缓冲队列,如果有另外一个进程想给这个进程发送消息的时候,发送进程首先会创建好消息头和消息体,通过发送原语发送给目标进程,消息就会挂到目标进程的消息缓冲队列的队尾。

        目标进程通过接收原语,依次把消息缓冲队列的消息取走

      • 间接通信方式

        消息要先发送到中间实体(信箱)中,因此也称为“信箱通信方式”

        image-20211216171817705

        信箱中的消息由哪个进程发送的,由哪个进程接收,都在消息头中

        通过发送原语,发送进程发送消息到信箱中

        同样,接收进程通过接收原语,从信箱中取消息

    管道通信

    1. 所谓的管道其实是一种特殊的共享文件。

      “管道”是指用于连接读写进程的一个共享文件,又名pipe文件

      其实就是在内存中开辟一个大小固定的缓冲区

      这个缓冲区的大小一般和内存页面是一样的

      image-20211216170454485

    2. 一个管道只能采用半双工通信某一时间段只能实现单向的传输,如果要实现双向同时通信,则需要设置两个管道。

      image-20211216170707557

    3. 各个进程对管道的访问,需要互斥的进行,也是前面提到的互斥共享。

    4. 数据以字符流的形式写入管道,当管道写满时,写进程的write()系统调用将导致写进程被阻塞,等待读进程将数据取走。

      当读进程将数据全部取走后,管道变空,此时读进程的read()系统调用将导致读进程阻塞

    5. 如果没写满,就不允许读,如果没读空,就不允许写。

    6. 数据一旦被读出,就从管道中抛弃,这就意味着读进程最多只能有一个,否则可能会有读错数据的情况

    image-20211216172035502

    线程和多线程模型

    概念

    1. 在没有引入进程之前,系统中各个程序只能串行执行。

    2. 有的进程,可能需要同时做很多事,而传统的进程只能串行地执行一系列程序(多个进程之间是并发的,但是一个进程内部的程序是串行执行的。),为此,引入了“线程”,来增加并发度。

      image-20211216191425419

      同一个进程中被分为了多个线程。

      多个线程之间,可以并发地执行!!之前一直说的都是进程之间的并发,但是引入了线程之后,多个线程之间,能够并发执行,也就是在宏观上多个线程是并行执行的,在微观上,是CPU交替执行这多个线程,也就是微观上是并发的,但是如果CPU是多核的,微观上也能够实现真正意义上的并行。

    3. 引入了线程之后,线程成为了程序执行流的最小单位。进程是资源分配的最小单位,多个线程会共用进程的资源,但是线程是调度的最小单位。

      引入了线程之后,是多个线程并发地被CPU处理。

    4. 线程可以理解为是轻量级的进程。

      线程是一个基本的CPU执行单元,也是程序执行流的最小单位。引入线程之后,不仅是进程之间可以并发,进程内的各线程之间也可以并发,从而进一步提升了系统的并发度,使得一个进程内也可以并发处理各种任务

      引入线程后,进程只作为除CPU之外的系统资源的分配单元(如打印机、内存地址空间等都是分配给进程的,进程是资源分配的最小单位)

      CPU也算是系统资源,分配的最小单位是线程!!线程也需要得到CPU服务之后,才能执行。线程之间也存在上下文切换,线程的状态转换是由于CPU的轮转机制或者其他机制而导致CPU不继续服务当前线程,于是出现线程的状态转换,也存在要保存线程的运行环境,恢复运行环境这种上下文切换,和前面说的进程很类似。

    引入线程机制后的变化

    1. image-20211216193636875

    线程有哪些属性

    1. 线程是处理器调度的单位
    2. 多核CPU环境下,各个线程可占用不同的CPU
    3. 每个线程都有一个线程ID,线程控制块(TCB)
    4. 线程也有就绪、阻塞、运行三种基本状态
    5. 线程几乎不拥有系统资源
    6. 同一进程的不同线程间共享进程的资源
    7. 由于共享内存地址空间,同一进程的线程间通信甚至无需操作系统干扰(因为同一进程中的线程共享内存地址空间)
    8. 同一进程中的线程切换,不会引起进程切换
    9. 不同进程中的线程切换,会引起进程切换
    10. 切换同进程内的线程,系统开销很小
    11. 切换进程,系统开销较大。(因为切换进程还要切换页表,页表是虚拟地址到物理地址的映射,线程不涉及到页表的切换)

    线程的实现方式

    1. 用户级线程

      用户级线程由应用程序通过线程库实现,所有的线程管理工作都由应用程序负责(包括线程切换)

      用户级线程中,线程切换可以在用户态下进行,无需操作系统干预

      在用户看来,是有多个线程,但是在操作系统内核看来,意识不到线程的存在,用户级线程对用户不透明,对操作系统透明。

      用户级线程就是从用户的视角可以看到的线程

    2. 内核级线程

      内核级线程的管理工作是由操作系统内核完成,线程调度、切换等工作都由内核负责,因此内核级线程的切换必然需要在核心态下完成。

      内核级线程就是从操作系统内核视角能够看到的线程

    3. 在同时支持用户级线程和内核级线程的系统中,可采用二者组合的方式,将n个用户级线程,映射到m个内核级线程上

      重点:操作系统只看得见内核级线程,因此只有内核级线程才是处理器分配的单位。

      image-20211216203142509

    多线程模型

    1. 在同时支持用户级线程和内核级线程的系统中,由几个用户级线程映射到几个内核级线程的问题引出了“多线程模型”问题

    2. 多对一模型

      image-20211216210038328

      多个用户级线程映射到一个内核级线程。每个用户进程只对应一个内核级线程,内核级线程才是作为调度的基本单位

      优点:用户级线程的切换在用户空间即可完成,不需要切换到核心态,线程管理的系统开销小,效率高

      缺点:当一个用户级线程被阻塞后,会导致内核级线程阻塞,其他用户级线程也不能执行了, 整个进程会被阻塞,并发度不高。多个线程不可以在多核处理器上并行运行。因为内核级线程才是处理器调度的基本单位。(操作系统只看得见内核级线程)

    3. 一对一模型

      image-20211216210353349

      一个用户级线程映射到一个内核级线程,每个用户进程有与用户级线程同数量的内核级线程

      优点:当一个线程被阻塞后,别的线程还可以继续执行,并发能力强,多线程可以在多核处理器上并行执行。

      缺点:一个用户进程会占用多个内核级线程,线程切换是由操作系统内核完成,需要切换到核心态,因此线程管理的成本高,开销大。

    4. 多对多模型

      image-20211216210743381

      n个用户级线程映射到m个内核级线程,每个用户进程对应m个内核级线程

      克服了多对一模型并发度不高的缺点,又克服了一对一模型中一个用户进程占用太多内核级线程,开销太大的缺点。

    处理机调度

    基本概念

    1. 线程是调度的最小单位(内核级线程)

    2. 调度:

      当有一堆任务要处理,但由于资源有限,这些事情没法同时处理,这就需要确定某种规则来决定处理这些任务的顺序,这就是“调度”研究的问题

      这种说法下的任务也可以理解为线程。

    3. 在多道程序系统中,进程的数量(线程的数量)往往是多于处理器的核心个数的,这样不可能同时并行地处理各个进程,如果线程数量和处理器核心数相同,那么在微观上是能做到真正的并行处理线程的。

      在这句话中,就是用进程或线程的描述来作为处理器处理的对象。

      在第二点,是说的任务作为处理器处理的对象,所以,可以将进程和任务理解为相同的事物。

    4. 处理机调度,就是从就绪进程队列中按照一定的算法选择一个进程并将处理机分配给它运行,以实现进程的并发执行(微观上串行,宏观上并行,就是并发)。

    三个层次

    高级调度
    1. 高级调度(作业调度),按一定的原则从外存上处于后备队列的作业中挑选一个或多个作业,给他们分配内存等必要资源,并建立相应的进程(建立PCB(进程控制块),PCB、数据段、程序段组成一个进程实体),以使它(们)获得竞争处理机的权利。能够竞争CPU,说明处于就绪队列,说明已经获得了除CPU以外其他需要的资源,当然包括内存。

    2. 高级调度是外存和内存之间的调度。

      作业调入时会建立相应的PCB,作业调出时才撤销PCB,高级调度主要是指调入的问题。因为只有调入的时机需要操作系统来确定,但调出的时机必然是作业运行结束才调出。

    中级调度
    1. 引入了虚拟存储技术之后,可将暂时不能运行的进程调至外存等待,等它重新具备了运行条件且内存又稍有空闲时,再重新调入内存。

      这么做的目的时为了提高内存利用率和系统吞吐量。

      暂时调到外存等待的进程称为挂起状态,值得注意的是,进程控制块PCB不会一起调到外存,而是会常驻内存,PCB中会记录进程数据在外存中的存放位置,进程状态等信息,操作系统通过内存中的PCB来保持对各个进程的监控、管理。被挂起的进程PCB会被放到挂起队列中(操作系统会为处于挂起态的进程建立一个挂起队列,把这些进程的PCB用一个队列的方式组织起来)。

      在内存中才叫进程,因为这里说的内存是运行时内存,而外存是磁盘,可以理解为静态的,但是为什么又能存放到外存呢,就是虚拟存储技术,也就是虚拟技术中的空分复用技术

      就绪队列、阻塞队列存放的也是PCB

    2. 中级调度(内存调度),就是要决定将哪个处于挂起状态的进程重新调入内存

      一个进程可能会被多次调出、调入内存,因此中级调度的发生频率要比高级调度更高。

    3. 暂时调到外存等待的进程状态为挂起状态

      挂起态又可以分为就绪挂起、阻塞挂起两种状态

      就绪态的进程可能会由于内存空间不足,而被移到外存挂起,这叫就绪挂起

      阻塞态的进程同样可能会由于内存空间不足,被移到外存挂起,叫阻塞挂起

      image-20211216222006381

    4. 注意:

      挂起和阻塞的区别,两种状态都是暂时不能获得CPU的服务,但是挂起态是将进程实体(映像)调到外存中去了,而阻塞态下的进程映像还在内存中。

      有的操作系统会把就绪挂起,阻塞挂起分为两个挂起队列,甚至会根据阻塞原因不同再把阻塞挂起进程进一步细分为多个队列。

    低级调度
    1. 低级调度(进程调度),其主要任务是按照某种方法和策略从就绪队列中选取一个进程,将处理器分配给它

    2. 进程调度是操作系统中最基本的一种调度,在一般的操作系统中都必须配置进程调度。

      进程调度的频率很高,一般几十毫秒一次,只有这样,才能在宏观上看起来是并行执行的,实际上微观上是这些进程之间交替执行。

    联系

    1. image-20211216222809386

    进程调度

    进程调度的时机

    1. 进程调度就是低级调度,就是按照某种算法从就绪队列中选择一个进程为其分配处理机。

    2. 什么时候需要进行进程调度和切换?

      • 当前运行的进程主动放弃处理机
        • 进程正常终止
        • 运行过程中发生异常而终止
        • 进程主动请求阻塞,通过系统调用,系统调用时会执行陷入指令或者说访管指令,从而进入核心态,这是内中断中的自愿中断,进程由运行态到阻塞态是主动行为。
      • 当前运行的进程被动放弃处理机
        • 分给进程的时间片用完
        • 有更紧急的事需要处理(如IO中断)
        • 有更高优先级的进程进入就绪队列
    3. 不能进行进程调度和切换的情况

      • 在处理中断的过程中,中断处理过程复杂,与硬件密切相关,很难做到在中断处理过程中进行进程切换
      • 进程在操作系统内核程序临界区中(但是进程在普通临界区中是可以进行调度、切换的)
      • 在原子操作过程中(原语),原子操作不可中断,要一气呵成(原子操作是通过中断来完成的,所以一定是在核心态进行。)
    4. 临界资源:一个时间段内只允许一个进程使用的资源,各进程需要互斥地访问临界资源

      临界区:访问临界资源那段代码

    5. 内核程序临界区访问的临界资源,如果不尽快释放的话,极有可能映像到操作系统内核的其他管理工作,因此在访问内核程序临界区期间不能进行调度与切换

      普通临界区访问的临界资源不会直接影响操作系统内核的管理工作,因此在访问普通临界区时可以进行调度和切换,而且是很有必要进行进程的调度和切换来提高CPU的利用率和系统吞吐量。

    进程调度的方式

    1. 非剥夺调度方式,又称为非抢占方式,即只允许进程主动放弃处理机,在运行过程中即便有更紧迫的任务到达,当前进程依然会继续使用处理机,直到该进程终止或主动要求进入阻塞态。
    2. 剥夺调度方式,又称抢占方式,当一个进程正在处理机上执行时,如果有一个更重要或更紧迫的进程需要使用处理机,则立刻暂停当前正在执行的进程,将处理机分配给更重要紧迫的进程。

    进程的切换和过程

    1. 狭义的进程调度指的是从就绪队列中选中一个要运行的进程

      进程切换是指一个进程让出处理机,由另一个进程占用处理机的过程。

      广义的进程调度包含了选择一个进程和进程切换两个步骤

    2. 进程切换的过程主要完成了:

      • 对原来运行进程各种数据的保存,保存到PCB中

      • 对新的进程的各种数据的恢复

        这些进程的信息,运行环境的信息一般保存在进程控制块PCB中。

    3. 不能简单地认为进程切换越频繁,并发度就越高

      进程切换是有代价的,因此如果过于频繁地进行进程调度、切换,必然会使整个系统的效率降低,使系统大部分时间都花在了进程切换上。

    进程同步、互斥

    概念

    1. 进程具有异步性的特征,异步性是指,各并发执行的进程各自以独立的、不可预知的速度向前推进

    2. 进程同步:

      并发性带来了异步性,有时需要通过进程同步解决这种异步问题

      有的进程之间需要相互配合地完成工作,各进程的工作推进需要遵循一定的先后顺序,就是通过同步,同步锁的实现通过同步代码块和同步方法, 也正是这个意思。

    3. 我们把一个时间段内只允许一个进程使用的资源称为临界资源,对临界资源的访问,必须互斥地进行。

    4. image-20211217163414696

      注意:

      临界区是进程中访问临界资源的代码段

      进入区和退出区是负责实现互斥的代码段

    5. 为了实现对临界资源的互斥访问,同时保证系统整体性能,需要遵循以下原则:

      • 空闲让进。临界区空闲时,可以允许一个请求进入临界区的进程立即进入临界区
      • 忙则等待。当已有进程进入临界区时,其他试图进入临界区的进程必须等待。
      • 有限等待(保证不会饥饿)。对请求访问的进程,应保证能在有限时间内进入临界区(保证不会饥饿)
      • 让权等待。当进程不能进入临界区时,应立即释放处理机,防止进程忙等待。

    信号量机制

    1. 用户进程可以通过使用操作系统提供的一对原语来对信号量进行操作,从而很方便地实现了进程互斥、进程同步。

      信号量其实就是一个变量(可以是一个整数,也可以是更复杂的记录型变量),可以用一个信号量来表示系统中某种资源的数量。

      image-20211217172238888

    2. 整型信号量

      与普通整数变量的区别:对信号量的操作只有三种,即初始化,P操作、V操作

      image-20211217173250040

      也就是说,在进入区和退出区这两个代码区,分别使用P操作和V操作这两个原语操作来上锁和解锁。

      检查和上锁一气呵成,避免了并发、异步导致的问题。

      存在的问题:不满足让权等待的原则,会发生忙等。

    3. 记录型信号量

      image-20211217173913631

      wait(S)和signal(S)可用于实现对系统资源的申请和释放

      S.value的初值表示系统中某种资源的数目

      对信号量S的一次P操作意味着进程请求一个单位的该资源,因此需要执行S.value--,表示该资源数减1,当S.value<0时,表示该类资源已分配完毕,因此进程应调用block原语进行自我阻塞,当前运行的进程从运行态到阻塞态,主动放弃处理机,并插入该类资源的等待队列,可见,该机制遵循了让权等待的原则,不会出现忙等现象,只要发现资源分配完毕,那么主动进入阻塞态,相当于是等待IO,进程进入阻塞态,都是主动的,是运行态主动到阻塞态,通过系统调用的访管指令或陷入指令,执行中断,于是阻塞,操作权限交给操作系统。

      对信号量S的一次V操作,意味着进程释放一个单位的该类资源,因此需要执行S.value++,表示资源数+1,若加1后仍然是小于等于0,说明仍然有进程因为等待该资源而处于阻塞态,因此应调用wakeup原语唤醒等待队列中的第一个进程(被唤醒进程从阻塞态到就绪态,等待CPU时间片,即可被CPU执行。)

    4. 用信号量机制实现进程互斥

      • 分析并发进程的关键活动,划定临界区(如:对临界资源打印机的访问就应该放在临界区,临界区是代码)
      • 设置互斥信号量mutex,初值为1,临界区可以理解为是一种特殊的系统资源,因为要实现互斥,所以设置这种“系统资源”的数量初值为1,相当于是上锁
      • 在临界区之前执行P(mutex)
      • 在临界区之后执行V(mutex)

      注意:对不同的临界资源需要设置不同的互斥信号量,可以从Java多线程的角度来理解,同步锁对象一定要是同一个,多个线程要获得的是同一把锁,这样才有上锁的意义

      PV操作必须成对出现(上锁和解锁必须成对出现),缺少P就不能保证临界资源的互斥访问,因为P操作相当于是上锁,缺少V会导致资源永不被释放,V操作相当于是解锁

    5. 用信号量实现进程同步:

      • 分析什么地方需要实现同步关系,找到需要执行同步关系的代码
      • 设置同步信号量S,初始值设置为0
      • 在“前操作”之后执行V(S)
      • 在“后操作”之前执行P(S)

      image-20211217182011808

    管程

    概念

    1. 管程是一种高级同步机制,和之前学过的PV操作一样,也是用来实现进程的互斥和同步的
    2. 引入管程的目的是为了更方便地实现进程互斥和同步

    死锁

    概念

    1. 死锁:在并发环境下,**各进程(发生死锁一定是两个或以上)**因竞争资源而造成的一种互相等待对方手里的资源,导致各进程都阻塞,都无法向前推进的现象,就是“死锁”。发生死锁后若无外力干涉,这些进程都将无法向前推进。

    进程死锁、饥饿、死循环的区别

    1. 死锁:各进程互相等待对方手里的资源,导致各进程都阻塞,无法向前推进的现象。
    2. 饥饿:由于长期得不到想要的资源,某进程无法向前推进的现象,比如:在短进程优先算法中,若有源源不断的短进程到来,则长进程将一直得不到处理机,从而发生长进程饥饿现象
    3. 死循环:某进程执行过程中一直跳不出某个循环的现象。

    image-20211217200059209

    死锁产生的必要条件

    1. 互斥条件:只有对必须互斥使用的资源的争抢才会导致死锁(比如IO设备),像内存、扬声器这样可以同时让多个进程使用的资源是不会导致死锁的(因为进程不用阻塞等待这种资源)

    2. 不可剥夺条件:进程所获得的资源在未使用完之前,不能由其他进程强行夺走,只能主动释放。

    3. 请求保持条件:进程已经保持了至少一个资源,但又提出了新的资源请求,而该资源又被其他进程占有,此时请求进程被阻塞,但又对自己已有的资源保持不放。

    4. 循环等待条件:存在一种进程资源的循环等待链,链中的每一个进程已获得的资源同时被下一个进程所请求。

      注意:发生死锁时,一定有循环等待,但是发生循环等待时未必死锁

      如果同类资源数大于1,则即使有循环等待,也未必发生死锁,但如果系统中每类资源都只有1个,那循环等待就是死锁的充分必要条件了。

    什么时候会发生死锁

    1. 对不可剥夺的资源的不合理分配,可能导致死锁。

    死锁的处理策略

    1. 预防死锁。破坏死锁产生的四个必要条件中的一个或几个
    2. 避免死锁。用某种方法防止系统进入不安全状态,从而避免死锁(银行家算法)
    3. 死锁的检测和解除。允许死锁的发生,不过操作系统会负责检测出死锁的发生,然后采取某种措施解除死锁。

    死锁的处理

    不允许死锁发生

    静态策略:预防死锁
    1. 死锁的产生必须满足四个必要条件,只要其中一个或几个条件不成立,死锁就不会发生

    2. 破坏互斥条件

      互斥条件:只有对必须互斥使用的资源(互斥共享)的争抢,才会导致死锁

      如果把只能互斥使用的资源改造为允许共享使用(同时共享,宏观上并行,微观上仍然是串行的,是并发。),则系统不会进入死锁状态,比如:SPOOLing技术。操作系统可以采用SPOOLing技术将独占设备在逻辑上改为共享设备。

      缺点:并不是所有的资源都可以改造成可共享使用的资源,并且为了系统安全,很多地方必须保持这种互斥性。因此,很多时候都无法破坏互斥条件。

    3. 破坏不剥夺条件

      方案一:当某个进程请求新的资源得不到满足时,它必须立即释放保持的所有资源,待以后需要时再重新申请。

      方案二:当某个进程需要的资源被其他进程所占有的时候,可以由操作系统协助,将想要的资源强行剥夺,这种方式一般考虑各进程的优先级(比如剥夺调度方式就是将处理机资源强行剥夺给优先级更高的进程使用)

      一种是自愿放弃,导致不用剥夺,一种是强行剥夺。

    4. 破坏请求和保持条件

      可以采用静态分配方法,即进程在运行前一次性申请完它所需要的全部资源,在它的资源未满足前,不让它投入运行,一旦投入运行后,这些资源就一直归它所有,该进程就不会再请求别的资源了。

      缺点:有些资源可能只需要用很短的时间,因此如果进程的整个运行期间都一直保持着所有资源,就会造成严重的资源浪费,资源利用率极低。另外,该策略也有可能导致某些进程饥饿。

    5. 破坏循环等待条件

      image-20211217204429202

      image-20211217204620460

    6. image-20211217204757093

    动态策略:避免死锁
    1. 安全序列,就是指如果系统按照这种序列分配资源,则每个进程都能顺利完成,只要能找出一个安全序列,系统就是安全状态,当然安全序列可能有多个。

    2. 如果系统处于安全状态,就一定不会发生死锁,如果系统进入不安全状态,就可能发生死锁(处于不安全状态未必是发生了死锁,但发生死锁时,一定是在不安全状态)

      因此可以在资源分配之前预先判断这次分配是否会导致系统进入不安全状态(能否找到一个安全序列),以此决定是否答应资源分配请求。这是银行家算法的核心思想。

    允许死锁发生

    1. 如果系统中既不采取预防死锁的措施,也不采取避免死锁的措施,系统就很可能发生死锁,在这种情况下,系统应当提供两个算法:

      • 死锁检测算法:用于检测系统状态,以确定系统中是否发生了死锁
      • 死锁解除算法:当认定系统中已经发生了死锁,利用该算法可将系统从死锁状态中解脱出来。
    2. 死锁的检测

      死锁定理:如果某时刻系统的资源分配图是不可完全简化的,那么此时系统死锁

    3. 死锁的解除

      并不是系统中所有的进程都是死锁状态,用死锁检测算法化简资源分配图后,还连着边的那些进程就是死锁进程

      解除死锁的主要方法有:

      • 资源剥夺法:挂起(暂时放到外存上)某些死锁进程,并抢占它的资源,将这些资源分配给其他的死锁进程。但是应防止被挂起的进程长时间得不到资源而饥饿。
      • 撤销进程法(终止进程法):强制撤销部分甚至全部死锁进程,并剥夺这些进程的资源。
      • 进程回退法。让一个或多个死锁进程回退到足以避免死锁的地步。

      如何决定对哪个进程进行资源剥夺或撤销或回退:

      • 进程优先级
      • 已执行多长时间
      • 还有多久能完成
      • 进程已经使用了多少资源
      • 进程是交互式的还是批处理式的
    4. image-20211217213054745

    第三章

    内存

    概念

    1. 内存是用于存放数据的硬件,程序执行前需要先放到内存中才能被CPU处理
    2. 外存就是硬盘或者叫辅存
    3. 硬盘是慢速的设备,而CPU是超快速的设备,所以CPU要处理的数据直接从外存中读取,CPU需要大量时间都在等待,CPU直接和外存的数据进行交互,会产生速度上的矛盾
    4. 内存可以理解为是一种更快速地存放数据的硬件。
    5. 内存地址从0开始,每个地址对应一个存储单元。

    进程的运行原理---指令

    1. 我们写的代码要翻译成CPU能识别的指令,这些指令会告诉CPU应该去内存的哪个地址存、取数据,这个数据应该做什么样的处理。但是对于Java来说,我们写的Java代码会编译成字节码文件,字节码也是二进制码,但是却不是CPU能够直接识别的二进制机器码,字节码对应于字节码指令,所以在JVM中的执行引擎部分,解释器会解释字节码指令并执行,同时JIT即时编译器会将字节码再次编译成CPU能直接识别的机器码,这是二次编译,所以说Java是半解释半编译的语言,解释器存在的原因是为了保证响应速度,因为编译是需要时间的,在JIT即时编译器编译热点代码的时候,解释器就能够直接解释字节码指令并执行了,保证了响应速度。

    2. 实际上,编译时,指令中给出的地址参数都是逻辑地址,或者说相对地址。

      绝对地址又称物理地址

      编译:由编译程序将用户源代码编译成若干个目标模块(编译就是把高级语言翻译成机器语言)

      链接:由链接程序将编译后形成的一组目标模块,以及所需库函数链接在一起,形成一个完整的装入模块

      装入:由装入程序将装入模块装入内存运行。

    3. 装入的三种方式

      • 绝对装入

        在编译时,如果直到程序将放到内存中的哪个位置,编译程序将产生绝对地址的目标代码,装入程序按照装入模块中的地址,将程序和数据装入内存

        绝对装入只适用于单道程序环境

      • 静态重定位

        由装入程序把逻辑地址转换为物理地址。

        静态重定位的特点是在一个作业装入内存时,必须分配其要求的全部内存空间,如果没有足够的内存,就不能装入该作业。作业一旦进入内存后,在运行期间就不能再移动,也不能再申请内存空间。

      • 动态重定位

        又称动态运行时装入。这种方式需要一个重定位寄存器支持

        重定位寄存器:存放装入模块存放的起始位置。

        允许程序在内存中发生移动。

        并且可将程序分配到不连续的存储区中:在程序运行前,只需装入它的部分代码即可投入运行,然后在程序运行期间,根据需要动态申请分配内存

    4. 链接的三种方式

      image-20211217222113746

    内存管理

    概念

    1. 操作系统作为系统资源的管理者,当然也需要对内存进行管理

    2. 各种进程想要运行的时候,进程相关的数据都要放入内存当中,或者说进程实体要放入内存中,进程实体是由PCB、程序段和数据段组成。

    3. 操作系统在内存管理的作用:

      • 操作系统需要负责内存空间的分配和回收

      • 操作系统需要提供某种技术(虚拟技术或者说空分复用技术)从逻辑上对内存空间进行扩充

        image-20211220143402386

      • 操作系统需要提供地址转换功能,负责程序的逻辑地址和物理地址的转换。

      • 操作系统需要提供内存保护功能,保证各进程在各自存储空间内的运行,互不干扰。

    4. 逻辑地址到物理地址的转换,就是前面提到的装入的三种方式。

    5. 内存保护可采取两种方法:

      • 在CPU中设置一对上下限寄存器,存放进程的上下限地址,进程的指令要访问某个地址时,CPU检查是否越界。
      • 采用重定位寄存器(又称基址寄存器)和界地址寄存器(又称限长寄存器)进行越界检查,重定位寄存器中存放的是进程的起始物理地址,界地址寄存器中存放的是进程的最大逻辑地址。进程的指令要访问某个地址时,CPU检查是否越界。

    覆盖和交换

    1. 覆盖技术,用来解决“程序大小超过物理内存总和”的问题

      覆盖技术的思想:将程序分为多个段(多个模块),常用的段常驻内存,不常用的段在需要时调入内存。

    2. 程序一定要调入内存才能够被运行,进程就是一个程序的运行期,程序可以理解为静态的,必须调入内存才能够被CPU所执行,因为CPU是高速计算设备,而硬盘的IO速度很慢,这中间存在矛盾,所以一个程序在运行前必须被调入内存才能够被CPU执行,调入内存的程序可以说是程序的运行态,也就是进程。

    3. 内存中分为一个固定区和若干个覆盖区

      需要常驻内存的段放在固定区中,调入后就不再调出

      不常用的段放在覆盖区,需要用到时调入内存,用不到时调出内存

      按照自身逻辑结构,让那些不可能同时被访问的程序段共享同一个覆盖区

      image-20211220145412455

      覆盖技术只用于早期的操作系统中,现在已经成为历史!!!

    4. 交换技术

      当内存空间紧张时,系统将内存中某些进程暂时换出外存,把外存中某些已具备运行条件的进程换入内存(进程在内存与磁盘间动态调度。)

      处理机调度中的中级调度就是为了实现交换技术的调度策略。

      进程的PCB会保留在内存中,插入到挂起队列

      PCB一定是保留在内存中,因为挂起的进程在磁盘的什么位置在PCB有记录。

    5. 具有对换功能的操作系统中,通常把磁盘空间分为对换区和文件区两部分。文件区主要用于存放文件,主要追求存储空间的利用率,因此对文件区空间的管理采用离散分配方式

      对换区空间只占磁盘的小部分,被换出的进程数据就存放在对换区,主要追求换入换出速度,采用连续分配方式。

      对换区的IO速度比文件区的更快

    6. 什么时候应该交换内存中的进程到外存中,把外存中具备运行条件的进程交换进内存中?

      交换通常在许多进程运行且内存吃紧时进行,例如:在发现许多进程运行时经常发生缺页时,说明内存紧张,此时可以换出一些进程,如果缺页率明显下降,就可以暂停换出。

    7. 可优先换出阻塞进程,可换出优先级低的进程,为了防止优先级低的进程在被调入内存后很快又被换出,有的系统还会考虑进程在内存中的驻留时间。

      PCB会常驻内存,不会被换出外存

    8. 覆盖和交换的区别:

      • 覆盖是在同一个程序或进程中的
      • 交换是在不同进程或作业之间的。

    连续分配管理方式

    1. 单一连续分配

      在单一连续分配方式中,内存被分为系统区和用户区。

      系统区通常位于内存的低地址部分,用于存放操作系统的相关数据。

      用户区用于存放用户进程相关数据

      内存中只能有一道用户程序,用户程序独占整个用户区空间。

      不支持多个进程并发运行。

      没有外部碎片,有内部碎片

    2. 固定分区分配

      将整个用户空间划分为若干个固定大小的分区,在每个分区中只装入一道作业

      没有外部碎片,有内部碎片

      • 分区大小相等

        image-20211220153145382

      • 分区大小不等

        image-20211220153203225

    3. 动态分区分配

      又称可变分区分配,这种分配方式不会预先划分内存分区,而是在进程装入内存时,根据进程的大小动态地建立分区,并使分区的大小正好适合进程的需要。因此系统分区的大小和数目是可变的

      • 系统用什么样的数据结构记录内存的使用情况

        image-20211220154132962

      • 把一个新作业放入内存时,必须按照一定的动态分区分配算法,从空闲分区表(或空闲分区链)中选出一个分区分配给该作业

    4. 动态分区分配没有内部碎片,但是有外部碎片

      内部碎片,分配给某进程的内存区域中,如果有些部分没有用上

      外部碎片,是指内存中的某些空闲分区由于太小而难以利用,即没有分配给进程的内存空间

      如果内存中空闲空间的综合本来可以满足某进程的要求,但由于进程需要的是一整块连续的内存空间,因此这些碎片不能满足进程的需求

      可以通过紧凑技术来解决外部碎片

    动态分区分配算法

    1. 首次适应算法

      每次都从低地址开始查找,找到第一个能满足大小的空闲分区

      如何实现:空闲分区以地址递增的次序排序,每次分配内存时从头(从低地址)顺序查找空闲分区链(或空闲分区表),找到大小能满足要求的第一个空闲分区。

    2. 最佳适应算法

      为各进程分配的空间必须是连续的一整片区域,因此为了保证当大进程到来时能有连续的大片空间,可以尽可能多地留下大片的空闲区,即,优先使用更小的空闲区

      如何实现:空闲分区按容量递增次序链接,每次分配内存时顺序查找空闲分区链(或空闲分区表),找到大小能满足要求的第一个空闲分区。

      更小的空闲分区会移到链头的位置。

      缺点:每次都选最小的分区进行分配,会留下越来越多的、很小的、难以利用的内存块,因此这种方法会产生很多的外部碎片

    3. 最坏适应算法

      和最佳适应算法相反

      算法思想:优先使用最大的连续空闲区,这样分配后剩余的空闲区就不会太小,更方便使用

      如何实现:空闲分区按容量递减次序链接,每次分配内存时顺序查找空闲分区链(或空闲分区表),找到大小能满足要求的第一个空闲分区。

      缺点:这种方式会导致较大的连续空闲区被迅速用完,如果之后有大进程到达,就没有内存分区可用了。

    4. 邻近适应算法

      算法思想:首次适应算法每次都从链头开始查找的,这可能会导致低地址部分出现很多小的空闲分区(难以利用的分区),而每次分配查找时,都要经过这些分区,因此也增加了查找的开销,如果每次都从上次查找结束的位置开始检索,就能解决上述问题。

    基本分页存储管理

    介绍
    1. 连续分配方式的缺点:

      固定分区分配,会产生大量的内部碎片,内存的利用率很低

      动态分区分配,会产生很多外部碎片

      如果允许将一个进程分散地装入到许多不相邻的分区中,便可充分地利用内存,而无需再进行“紧凑”(内存整理)

    2. 非连续分配管理方式

      • 基本分页存储管理
      • 基本分段存储管理
      • 段页式存储管理
    3. 基本分页存储管理的思想:

      把内存分为一个个相等的小分区,再按照分区大小把进程拆分成一个个小部分

    4. 将内存空间分为一个个大小相等的分区,每个分区就是一个“页框”或页帧。

      每个页框有一个编号,即页框号。页框号从0开始。

      把用户进程的地址空间也分为与页框大小相等的一个个区域,称为页或页面,每个页面也有一个编号,即“页号”,页号也是从0开始

      也就是页或页面是进程分的,页框或者说页帧是内存分的。

      注:进程的最后一个页面可能没有一个页框那么大,因此,页框不能太大,否则可能产生过大的内部碎片

      操作系统以页框为单位,为各个进程分配内存空间,进程的每个页面分别放入一个页框中,也就是说,进程的页面与内存的页框有一一对应的关系。

      进程的各个页面不必连续存放,也不必按照先后顺序来,可以放到不相邻的各个页框中。

    5. 如何实现逻辑地址到物理地址的转换?

      • 要算出逻辑地址对应的页号----逻辑地址 / 页面大小
      • 要知道该页号对应页面再内存中的起始地址----得到页号之后,根据页表的表项,找到块号,块号 * 内存块大小,得到对应页面在内存中的起始地址。
      • 要算出逻辑地址在“页面内”的偏移量----逻辑地址 % 页面大小
      • 物理地址 = 页面地址 + 页内偏移量
    6. 为了能直到进程的每个页面在内存中存放的起始位置,操作系统要为每个进程建立一张页表。

      页面内的地址是连续的,各页面之间是离散的。

      一个进程对应一张页表

      一个进程的每一个页面,对应一个页表项

      每个页表项由页号和块号组成

      页表记录进程页面和**实际存放的内存块(块号)**之间的对应关系!!

      image-20211220175427142

      M号内存块的起始地址就是M * 内存块大小

      各块之间是离散的,但是每一块内是连续的。

    基本地址变换机构
    1. 基本地址变换机构---用于实现逻辑地址到物理地址转换的一组硬件机构。

      页表寄存器的作用:

      • 存放页表起始地址
      • 存放页表长度
    2. image-20211220183023318

    具有快表的地址变换机构
    1. 时间局部性:

      如果执行了程序中的某条指令,那么不久后这条指令很可能再次执行;如果某个数据被访问过,不久之后该数据很可能再次被访问

      空间局部性:

      一旦程序访问了某个存储单元,在不久之后,其附近的存储单元也很有可能被访问(因为很多数据在内存中都是连续存放的。 )

    2. 每次要访问一个逻辑地址,都需要查询内存中的页表(根据逻辑地址可以得到页号和页内偏移量,根据页号、页表起始地址和页表项长度可以得到页号对应的页表项地址,得到页号对应的内存块号,根据内存块号和页面大小即每一个内存块的大小,可以得到该内存块在内存中的起始地址,根据起始地址和偏移量便可以得到物理地址)。

      由于局部性原理,可能连续很多次查到的都是同一个页表项地址。既然如此,能否利用这个特性减少访问页表的次数呢?

    3. 快表,又称TLB即联想寄存器,是一种访问速度比内存快很多的高速缓冲存储器,用来存放当前访问的若干页表项,以加速地址变换的过程,与此对应,内存中的页表常称为慢表。

      页号、页表起始地址和页表项大小可以得到页号P对应的页表项地址!

    4. 在查询慢表即内存中的页表之前,会先查询快表,理解为缓存

      image-20211220184619310

      若快表命中,就不需要再访问内存了,查询快表比内存快

    5. 引入快表后,地址的变换过程

      image-20211220184944890

    6. 由于查询快表的速度比查询页表(慢表)的速度快很多,因此只要快表命中,就可以节省很多时间,由于局部性原理,一般来说快表的命中率可以达到90%以上。

    7. 对比

      image-20211220185327397

    两级页表
    1. 单级页表存在的问题

      • 问题1:页表必须连续存放,因此当页表很大时,需要占用很多个连续的页框---采用两级页表解决
      • 问题2:没有必要让整个页表常驻内存,因为进程在一段时间内可能只需访问某几个特定的页面。

      我们是如何解决进程在内存中必须连续存储的问题的?

      将一个进程分散地装入到许多不相邻的分区中,便可充分地利用内存

      同样,我们可以将很长的页表分组,使每一个内存块刚好可以放入一个分组,之前是将进程分成很多个页面,相当于将进程分组,现在页表太长了,那么就将页表分组。

      另外,要为离散分配的页表再建立一张页表,称为页目录表,或称外层页表,或称顶层页表。

      通过页目录表和页号,找到内存块号,通过此内存块号得到此内存块对应的二级页表的起始地址

    2. 慢表也就是内存中的页表,当然是存储在内存中的,页表起始地址和页表长度存在页表寄存器中,进程运行的时候存储在页表寄存器中,没有被CPU执行的时候,存储在PCB中,所以页表存储在内存中,当然涉及到起始地址,这个地址存储在页表寄存器。

      快表不是存储在内存中的,访问快表的速度比内存快很多,是高速缓冲存储器。

    3. 问题2的解决:

      可以在需要访问页面时才把页面调入内存(虚拟存储技术,页面是由进程分割而来的,把进程分成很多个部分),相当于需要进程某个部分时,才把这部分调入内存,进程分的部分就叫页面,内存分的部分就叫页框,可以在页表项中增加一个标志位,用于表示该页面是否已经调入内存。

      若想访问的页面不在内存中,则产生缺页中断(内中断,内中断分为自愿中断、硬件故障、软件中断),然后将目标页面从外存调入内存。

    4. 两级页表的访存次数分析:(假设没有快表机构)

      • 第一次访存:访问内存中的页目录表
      • 第二次访存:访问内存中的二级页表
      • 第三次访存:访问目标内存单元
    5. 如何实现地址变换

      • 按照地址结构将逻辑地址分为三部分
      • 从PCB中读出页目录表起始地址(页目录表也是在内存中的,当然有起始地址),根据一级页号查找到块号,根据内存块号找到下一级页表在内存中的存放位置(起始地址)
      • 根据二级页号查表,找到最终想访问的内存块号
      • 结合页内偏移量得到物理地址。

    基本分段存储管理

    介绍
    1. 分段:

      进程的地址空间,按照程序自身的逻辑关系划分为若干个段,每个段都有一个段名

    2. 内存分配规则:以段为单位进行分配,每个段在内存中占据连续空间,但各段之间可以不相邻

    3. 分段系统的逻辑地址结构由段号(段名)和段内地址(段内偏移量)组成

      段号的位数决定了每个进程最多可以分为几个段

      段内地址位数决定了每个段的最大长度是多少

    4. 操作系统需要为每个进程建立一张段映射表,简称段表

    5. 在分页存储管理当中,每个页面的长度都是一样的,但是分段存储管理中,每个段的长度是不一样的,所以段表项比页表项多了一个段长

    6. 每个段对应一个段表项,就像一个进程对应于一个页表,进程的每一页对应于一个页表项!!

      一个段表项,记录了该段在内存中的起始位置(基址)和段的长度

    7. 各个段表项和各个页表项的长度是相同的。

      因此段号和页号可以是隐含的,不占存储空间。

    8. 地址变换的过程:

      image-20211220210600944

    9. 分页的主要目的是为了实现离散分配,提高内存利用率,分页仅仅是系统管理上的需要,完全是系统行为,对用户是不可见的。

      分段的主要目的是为了更好地满足用户需求,一个段通常包含着一组属于一个逻辑模块的信息,分段对用户是可见的,用户编程时需要显式地给出段名。

      页的大小固定,段的长度不固定,决定于用户编写的程序。

    10. 不能被修改的代码称为纯代码或可重入代码,不属于临界资源,这样的代码是可以共享的,相当于只读。

      可修改的代码是不能共享的

      分段比分页更容易实现信息的共享和保护。

    11. 与分页系统类似,分段系统中页可以引入快表机构,将近期访问过的段表项放到快表中

    段页式管理方式

    1. 分页、分段的优缺点分析

      缺点优点
      分页管理不方便按照逻辑模块实现信息的共享和保护内存空间利用率高,不会产生外部碎片,只有少量的内部碎片
      分段管理如果段长过大,为其分配很大的连续空间会很不方便,另外,段式管理会产生外部碎片很方便按照逻辑模块实现信息的共享和保护
    2. image-20211220212626340

    3. 分段系统的逻辑地址结构由段号和段内地址(段内偏移量)组成

      image-20211220212723931

      段页式系统的逻辑地址结构由段号、页号、页内地址(页内偏移量)组成

      image-20211220212746790

      段号的位数决定了每个进程最多可以分几个段

      页号位数决定了每个段最大有多少页

    4. 逻辑地址到物理地址的转换

      image-20211220213646069

    虚拟内存

    概念

    1. 内存空间的扩充:

      • 覆盖技术

      • 交换技术(通过处理机调度的中级调度实现)

      • 虚拟存储技术(用到进程的某一部分,才调入内存,按页调入内存)

        可以在需要访问页面时,才把页面调入内存。

    2. 传统存储管理方式

      image-20211221154032346

      特征:

      • 一次性:作业必须一次性全部装入内存后才能开始运行

        作业很大时,不能全部装入内存,导致大作业无法运行;

        当大量作业要求运行时,由于内存无法容纳所有作业,因此只有少量作业能运行,导致多道程序并发度下降。

      • **驻留性:一旦作业被装入内存,就会一直驻留在内存中,直至作业运行结束。**事实上,在一个时间段内,只需要访问作业的一小部分数据即可正常运行,这就导致了内存中会驻留大量的、暂时用不到的数据。

    3. 高速缓冲技术的思想:

      将近期会频繁访问到的数据放到更高速的存储器中,暂时用不到的数据放在更低速存储器中

      image-20211221154907782

      快表机构就是将近期常访问的页表项副本放到更高速的高速缓冲寄存器中

    4. 基于局部性原理,在程序装入时,可以将程序中很快会用到的部分装入内存,暂时用不到的部分留在外存,就可以让程序开始执行。

      在程序执行过程中,当所访问的信息不在内存时,由操作系统负责将所需信息从外存调入内存,然后继续执行程序。(当所访问的信息不在内存时,说明缺页,就是缺少进程的某一部分,进程分割为页面,缺少就时缺页,那么会发生缺页中断,这是内中断,属于硬件中断,中断之后,会使CPU立即进入内核态,将执行权由用户进程交给操作系统,操作系统把需要的页面即进程的某一部分调入内存,这就是中断,中断就是将执行权交给操作系统,操作系统执行相应的过程来满足程序运行。像进程运行时执行陷入指令发生自愿中断,因为涉及到系统调用,需要操作系统来完成某些事情,也是同理。原语是通过关中断和开中断来完成,级别很高,必须在内核态进行。)

      若内存空间不够,由操作系统负责将内存中暂时用不到的信息换出到外存。就是挂起,之前讲的中级调度,就是完成交换。交换出的进程会放到磁盘的交换区而不是文件区。内存又分为系统区和用户区。但是交换技术,讲的是进程之间,交换的是进程,这里的讲内存中暂时用不到的信息换出,指的是进程内部的页面,是属于进程内而不是进程间。

      在操作系统的管理下,在用户看来似乎有一个比实际内存大得多的内存,这就是虚拟内存。

      操作系统虚拟性,就是实际的物理内存大小没有变,只是在逻辑上进行了扩充。

      也就是内存中的进程只是这个进程的某一些页面,而不是一个完整的进程,通过调入调出页面来完成整个进程的执行。

    5. 虚拟内存的特征:

      • 多次性:无需在作业运行时,一次性全部装入内存,而是允许被分成多次调入内存
      • 对换性:在作业运行时无需一直常驻内存,而是允许在作业(进程)运行过程中,将作业(进程的某些暂时用不到的页面)换入、换出。
      • 虚拟性:从逻辑上扩充内存的容量,使用户看到的内存容量远大于实际的容量。
    6. 虚拟内存技术,允许一个作业分多次调入内存,如果采用连续分配方式,会不方便实现,因此,虚拟内存的实现需要建立在离散分配的内存管理方式基础上。

    7. 操作系统需要提供请求调页(请求调段)功能

      操作系统需要提供页面置换(或段置换)功能

    请求分页存储管理方式

    1. 请求分页存储管理与基本分页存储管理的主要区别:

      在程序执行过程中,当所访问的信息不在内存时,由操作系统负责将所需信息(进程的页面)从外存调入内存,然后继续执行程序。

      若内存空间不够,由操作系统负责将内存中暂时用不到的信息换出到外存。

    2. 页表机制:

      与基本分页管理相比,请求分页管理中,为了实现“请求调页”,操作系统需要知道每个页面是否已经调入内存;如果还没调入,那么也需要知道该页面在外存中存放的位置。

      当内存空间不够时,要实现页面置换,操作系统要通过**某些指标(页面置换算法)**知道该换出哪个页面,有的页面没有被修改过,就不需要浪费时间再写回外存,有的页面修改过,就需要将外存中的旧数据覆盖,因此操作系统也需要记录各个页面是否被修改的信息。

      image-20211221163750995

      请求页表项增加了四个字段

    3. 缺页中断机构

      在请求分页系统中,每当要访问的页面不在内存时,便产生一个缺页中断,然后由操作系统的缺页中断处理程序处理中断。此时是发生IO操作,因为要将页面从外存调入内存。

      此时缺页的进程阻塞,放入阻塞队列,调页完成后,再将其唤醒,放回就绪队列。这里说的插入到队列里的都是PCB

      如果内存中有空闲块,则为进程分配一个空闲块,将所缺页面装入该块,并修改页表中相应的页表项。

      如果内存中没有空闲块,则由页面置换算法选择一个页面淘汰(从内存调到外存),若该页面在内存期间被修改过,则要将其写回外存,在内存期间未修改过的页面不用写回外存。

    4. 缺页中断是因为当前执行的指令想要访问的目标页面未调入内存而产生的,因此属于内中断。

      一条指令在执行期间,可能产生多次缺页中断。

      image-20211221173752429

    5. image-20211221174313529

      • 只有写指令才需要修改修改位,并且,一般来说只需修改快表中的数据,只有要将快表项删除时才需要写回内存中的慢表,这样可以减少访存次数
      • 和普通的中断处理一样,缺页中断处理依然需要保留CPU现场
      • 需要用某种页面置换算法,来决定换出哪个页面
      • 换出、换入都需要启动慢速的IO操作。
      • 页面调入内存后,需要修改慢表的相应页表项,同时,需要将表项复制到快表中。

      请求调页时通过缺页中断进行!!缺页中断的目的就是请求操作系统调页。

    页面置换算法

    1. 用页面置换算法决定应该换出哪个页面

    2. 页面换入换出需要磁盘IO,会有较大的开销,因此好的页面置换算法应该追求更少的缺页率

    3. 页面置换算法

      • 最佳置换算法
      • 先进先出置换算法
      • 最近最久未使用置换算法
      • 时钟置换算法
      • 改进型的时钟置换算法
    4. 最佳置换算法OPT

      每次选择淘汰的页面将是以后永不使用,或者在最长时间内不再被访问的页面,这样可以保证最低的缺页率。

      注意:发生了缺页中断,未必会发生页面置换,若还有可用的空闲内存块,就不用进行页面置换。只有内存不够用了才需要进行页面置换

      实际:操作系统无法提前预判页面访问序列,因此,最佳置换算法是无法实现的。 这是理想化的算法。

    5. 先进先出置换算法FIFO

      每次选择淘汰的页面是最早进入内存的页面

      实现方法:把调入内存的页面根据调入的先后顺序排成一个队列,需要换出页面时,选择对头的页面即可。

      贝拉迪异常:当为进程分配的物理块数增大时,缺页次数不减反增的异常现象。

      只有FIFO算法会产生贝拉迪异常,另外,FIFO算法虽然实现简单,但是该算法与进程实际运行时的规律不适应,因为先进入的页面也有可能最经常被访问,因此算法性能差。

    6. 最近最久未使用置换算法LRU

      每次淘汰的页面是最近最久未使用的页面

      实现方法:此进程对应的页表的页表项中,用访问字段记录该页面自上次被访问以来所经历的时间t

      当需要淘汰一个页面时,选择现有页面中t值最大的,即最近最久未使用的页面。

      image-20211221185055893

      此算法性能最接近最佳置换算法

      需要专门的硬件支持,算法开销大

    7. 时钟置换算法CLOCK

      LRU算法是最接近OPT算法性能的,但是需要专门的硬件支持,算法开销大

      时钟置换算法是一种性能和开销比较均衡的算法

      image-20211221185458329

      image-20211221185505869

    8. 改进型的时钟置换算法

      简单的时钟置换算法仅考虑到一个页面最近是否被访问过,事实上,如果被淘汰的页面没有被修改过,就不需要执行IO操作写回外存,只有被淘汰的页面被修改过时,才需要写回外存。

      因此,除了考虑一个页面最近有没有被访问过之外,操作系统还应考虑页面有没有被修改过,在其他条件都相同时,应优先淘汰没有被修改过的页面,避免IO操作。这就是改进型的时钟置换算法的思想。

      image-20211221185940035

      image-20211221190423652

      每一轮分别代表一个优先级

      第一优先级:最近没访问,且没修改过的页面

      第二优先级:最近没访问,但是修改过的页面

      第三优先级:最近访问过,没修改过的页面

      第四优先级:最近访问过,且修改过的页面。

    9. image-20211221190938925

    页面分配策略

    1. 驻留集:请求分页存储管理中,给进程分配的内存块(页框)的集合

      在采用了虚拟存储技术的系统中,驻留集的大小一般小于进程的总大小。

    2. 驻留集大小

      固定分配:操作系统为每个进程分配一组固定数目的内存块,在进程运行期间不再改变

      可变分配:先为每个进程分配一定数目的物理块,在进程运行期间,可根据情况做适当的增加或减少。

    3. 局部置换:发生缺页时只能选进程自己的物理块进程置换

      全局置换:可以将操作系统保留的空闲物理块分配给缺页进程,也可以将别的进程持有的物理块置换到外存,再分配给缺页进程。

      image-20211221205210092

    4. 固定分配局部置换:

      系统为每个进程分配一定数量的物理块,在整个运行期间都不改变,若进程在运行中发生缺页,则只能从该进程在内存中的页面中选出一页换出,然后再调入需要的页面。

      这种策略的缺点是:很难在刚开始就确定应为每个进程分配多少个物理块才算合理

    5. 可变分配全局置换:

      刚开始会为每个进程分配一定数量的物理块。操作系统会保持一个空闲物理块队列。当某进程发生缺页时,从空闲物理块中取出一块分配给该进程;若已无空闲物理块,则可选择一个未锁定的页面换出,再将该物理块分配给缺页的进程。

      采用这种策略时,只要某进程发生缺页,都将获得新的物理块,仅当物理块用完时,系统才选择一个未锁定的页面换出,被选择调出的页可能时系统中任何一个进程的页,因此这个被选中的进程拥有的物理块会减少,缺页率会增加。

    6. 可变分配局部置换:

      刚开始会为每个进程分配一定数量的物理块,当某进程发生缺页的时候,只允许从该进程自己的物理块中选出一个进行换出。如果进程在运行中频繁地缺页,系统会为该进程多分配几个物理块,直至该进程缺页率趋于适当程度,反之,如果该进程缺页率很低,则会减少分配给该进程的物理块。

    7. 何时调入页面

      image-20211221210739713

    8. 从何处调入页面

      image-20211221211043210

    9. 抖动现象:

      刚刚换出的页面马上又要换入内存,刚刚换入的页面马上又要换出内存,这种频繁的页面调度行为称为抖动。

      产生抖动的主要原因是进程频繁访问的页面数目高于可用的物理块数。

    10. 工作集:

      指在某段时间间隔内,进程实际访问页面的集合。

      一般来说,驻留集的大小不能小于工作集的大小,否则进程运行过程中将频繁缺页(抖动)

    Last Updated:
    Contributors: shailene
    - + diff --git "a/mw/Flink/Flink\345\237\272\346\234\254\347\257\207/flink\345\237\272\346\234\254\347\257\2072.html" "b/mw/Flink/Flink\345\237\272\346\234\254\347\257\207/flink\345\237\272\346\234\254\347\257\2072.html" index 1ce22aa9..9e09d433 100644 --- "a/mw/Flink/Flink\345\237\272\346\234\254\347\257\207/flink\345\237\272\346\234\254\347\257\2072.html" +++ "b/mw/Flink/Flink\345\237\272\346\234\254\347\257\207/flink\345\237\272\346\234\254\347\257\2072.html" @@ -23,7 +23,7 @@ } Flink基本篇2 | shAilene - + @@ -810,6 +810,6 @@ } } - + diff --git a/mw/elasticsearch/ES.html b/mw/elasticsearch/ES.html index c2e58ae8..187ce7f9 100644 --- a/mw/elasticsearch/ES.html +++ b/mw/elasticsearch/ES.html @@ -23,7 +23,7 @@ } elastic search简介 | shAilene - + @@ -823,6 +823,6 @@ # 初始化数据恢复时,并发恢复线程的个数,默认4个 cluster.routing.allocation.node_initial_primaries_recoveries: 16

    其余两个服务器节点也按照此配置,要修改端口,节点名称等

    六、ES进阶

    核心概念

    1. 索引(Index)

      一个索引就是一个拥有几分相似特征的文档的集合,或者说数据集合,一个索引就对应于关系型数据库的一个数据库或者一个数据表,索引中的文档就是一条数据。

      一个索引由一个名字来标识,必须全是小写字母,并且当我们对这个索引中的文档即数据进行CRUD时,都要用到这个名字。

      能搜索的数据必须索引,这样的好处是提高查询速度。

    2. 类型(Type)

      Type的概念原先可以理解为对应于关系型数据库的数据表,但是现在已经弃用这个概念了,因为索引能直接和数据关联,倒排索引也是Lucene这个全文检索引擎的特性,keyword索引能和文档关联起来,也就是数据,所以在索引和数据之间不应该再多一个概念。

    3. 文档(Document)

      一个文档就是一条数据

      在一个index(数据库)里能存储任意多的文档

      一个文档为一条数据,也就是MySQL中的一行数据,一个表中有多行数据,而ES中,一个索引中有多条数据,所以表对应于索引。

      表能和对象进行映射,在ES中,Index和对象进行映射,一个Index中的数据的字段结构都是相同的。

    4. 分片(shards)

      一个索引可以存储超过单个节点硬件限制的大量数据。ES提供了将索引划分成多份的能力,每一份索引就成为分片,shard。

      当你创建一个索引的时候,你可以指定你想要的分片的数量。每一个分片放在不同的服务器节点上提供服务。

      至于一个分片怎样分布,它的文档怎样聚合和搜索请求,是完全由ES管理的,对用户透明,无需过分关心。

    5. 副本(Replicas)

      在一个网络/云的环境里,失败随时都可能发生,在某个分片/节点由于故障处于离线状态,这种情况下有一个故障转移机制是非常有用的。ES允许你创建分片的一份或多份拷贝,这些拷贝叫做副本。

      作用:

    - + diff --git a/mw/index.html b/mw/index.html index 1c0a9ffc..703d7652 100644 --- a/mw/index.html +++ b/mw/index.html @@ -23,11 +23,11 @@ } shAilene - +
    Last Updated:
    Contributors: shailene
    - + diff --git "a/\345\211\215\347\253\257/index.html" "b/\345\211\215\347\253\257/index.html" index a961e95b..7cf20f1b 100644 --- "a/\345\211\215\347\253\257/index.html" +++ "b/\345\211\215\347\253\257/index.html" @@ -23,11 +23,11 @@ } shAilene - +
    Last Updated:
    Contributors: shailene
    - + diff --git "a/\345\211\215\347\253\257/vue\345\237\272\347\241\200/vue\345\237\272\347\241\200.html" "b/\345\211\215\347\253\257/vue\345\237\272\347\241\200/vue\345\237\272\347\241\200.html" index bcbc861c..85bd7674 100644 --- "a/\345\211\215\347\253\257/vue\345\237\272\347\241\200/vue\345\237\272\347\241\200.html" +++ "b/\345\211\215\347\253\257/vue\345\237\272\347\241\200/vue\345\237\272\347\241\200.html" @@ -23,7 +23,7 @@ } vue学习笔记 | shAilene - + @@ -791,6 +791,6 @@ </html>

    生命周期:

    1. 又名:生命周期回调函数、生命周期函数、生命周期钩子

    2. 生命周期函数是什么?

      Vue在关键时候帮我们调用的一些特殊名称的函数

    3. 生命周期函数的名字不可以更改,但函数的具体内容是程序员根据需求编写的。

    4. 生命周期函数中的this指向是vm或组件实例对象。

    生命周期到mounted时,页面中呈现的是经过Vue编译的DOM。

    至此初始化过程结束,一般在此进行:开启定时器、发送网络请求、订阅消息、绑定自定义事件等初始化操作。

    8个生命周期函数:

    - + diff --git "a/\345\211\215\347\253\257/vue\347\273\204\344\273\266/vue\347\273\204\344\273\266.html" "b/\345\211\215\347\253\257/vue\347\273\204\344\273\266/vue\347\273\204\344\273\266.html" index 48b20c96..81ff441a 100644 --- "a/\345\211\215\347\253\257/vue\347\273\204\344\273\266/vue\347\273\204\344\273\266.html" +++ "b/\345\211\215\347\253\257/vue\347\273\204\344\273\266/vue\347\273\204\344\273\266.html" @@ -23,7 +23,7 @@ } Vue学习笔记 | shAilene - + @@ -343,6 +343,6 @@ this.$refs.demo.$on('cy', this.test); }

    test是自定义事件绑定的回调方法。

  • 若想让自定义事件只触发一次,可以使用once修饰符,或$once方法。

  • 触发自定义事件:

    this.$emit('cy',数据)

  • 解绑自定义事件:

    this.$off('cy')

  • 组件上也可以绑定原生DOM事件,需要使用.native修饰符

  • - + diff --git "a/\350\256\241\347\256\227\346\234\272\345\237\272\347\241\200/index.html" "b/\350\256\241\347\256\227\346\234\272\345\237\272\347\241\200/index.html" index 1ee989ee..77c54441 100644 --- "a/\350\256\241\347\256\227\346\234\272\345\237\272\347\241\200/index.html" +++ "b/\350\256\241\347\256\227\346\234\272\345\237\272\347\241\200/index.html" @@ -23,11 +23,11 @@ } shAilene - +

    操作系统

    Last Updated:
    Contributors: shailene
    - +