diff --git a/docs/.vuepress/themeConfig.ts b/docs/.vuepress/themeConfig.ts index c358e845..f472c739 100644 --- a/docs/.vuepress/themeConfig.ts +++ b/docs/.vuepress/themeConfig.ts @@ -40,7 +40,7 @@ export default defineThemeConfig({ autoExcerpt: true, }, mdEnhance: { - enableAll: false, + enableAll: true, presentation: { plugins: ["highlight", "math", "search", "notes", "zoom"], }, @@ -62,64 +62,64 @@ export default defineThemeConfig({ }, }, }, - pwa: { - favicon: "/favicon.ico", - cachePic: true, - apple: { - icon: "/assets/icon/apple-icon-152.png", - statusBarColor: "black", - }, - msTile: { - image: "/assets/icon/ms-icon-144.png", - color: "#ffffff", - }, - manifest: { - icons: [ - { - src: "/assets/icon/chrome-mask-512.png", - sizes: "512x512", - purpose: "maskable", - type: "image/png", - }, - { - src: "/assets/icon/chrome-mask-192.png", - sizes: "192x192", - purpose: "maskable", - type: "image/png", - }, - { - src: "/assets/icon/chrome-512.png", - sizes: "512x512", - type: "image/png", - }, - { - src: "/assets/icon/chrome-192.png", - sizes: "192x192", - type: "image/png", - }, - ], - shortcuts: [ - { - name: "Guide", - short_name: "Guide", - url: "/guide/", - icons: [ - { - src: "/assets/icon/guide-maskable.png", - sizes: "192x192", - purpose: "maskable", - type: "image/png", - }, - { - src: "/assets/icon/guide-monochrome.png", - sizes: "192x192", - purpose: "monochrome", - type: "image/png", - }, - ], - }, - ], - }, - }, + // pwa: { + // favicon: "/favicon.ico", + // cachePic: true, + // apple: { + // icon: "/assets/icon/apple-icon-152.png", + // statusBarColor: "black", + // }, + // msTile: { + // image: "/assets/icon/ms-icon-144.png", + // color: "#ffffff", + // }, + // manifest: { + // icons: [ + // { + // src: "/assets/icon/chrome-mask-512.png", + // sizes: "512x512", + // purpose: "maskable", + // type: "image/png", + // }, + // { + // src: "/assets/icon/chrome-mask-192.png", + // sizes: "192x192", + // purpose: "maskable", + // type: "image/png", + // }, + // { + // src: "/assets/icon/chrome-512.png", + // sizes: "512x512", + // type: "image/png", + // }, + // { + // src: "/assets/icon/chrome-192.png", + // sizes: "192x192", + // type: "image/png", + // }, + // ], + // shortcuts: [ + // { + // name: "Guide", + // short_name: "Guide", + // url: "/guide/", + // icons: [ + // { + // src: "/assets/icon/guide-maskable.png", + // sizes: "192x192", + // purpose: "maskable", + // type: "image/png", + // }, + // { + // src: "/assets/icon/guide-monochrome.png", + // sizes: "192x192", + // purpose: "monochrome", + // type: "image/png", + // }, + // ], + // }, + // ], + // }, + // }, }, }); diff --git a/docs/high-performance/message-queue/message-queue.md b/docs/high-performance/message-queue/message-queue.md index 161bd5a0..b632a004 100644 --- a/docs/high-performance/message-queue/message-queue.md +++ b/docs/high-performance/message-queue/message-queue.md @@ -48,7 +48,7 @@ 生产者(客户端)发送消息到消息队列中去,接受者(服务端)处理消息,需要消费的系统直接去消息队列取消息进行消费即可而不需要和其他系统有耦合,这显然也提高了系统的扩展性。 -**消息队列使利用发布-订阅模式工作,消息发送者(生产者)发布消息,一个或多个消息接受者(消费者)订阅消息。** 从上图可以看到**消息发送者(生产者)和消息接受者(消费者)之间没有直接耦合**,消息发送者将消息发送至分布式消息队列即结束对消息的处理,消息接受者从分布式消息队列获取该消息后进行后续处理,并不需要知道该消息从何而来。**对新增业务,只要对该类消息感兴趣,即可订阅该消息,对原有系统和业务没有任何影响,从而实现网站业务的可扩展性设计**。 +**消息队列使用发布-订阅模式工作,消息发送者(生产者)发布消息,一个或多个消息接受者(消费者)订阅消息。** 从上图可以看到**消息发送者(生产者)和消息接受者(消费者)之间没有直接耦合**,消息发送者将消息发送至分布式消息队列即结束对消息的处理,消息接受者从分布式消息队列获取该消息后进行后续处理,并不需要知道该消息从何而来。**对新增业务,只要对该类消息感兴趣,即可订阅该消息,对原有系统和业务没有任何影响,从而实现网站业务的可扩展性设计**。 消息接受者对消息进行过滤、处理、包装后,构造成一个新的消息类型,将消息继续发送出去,等待其他消息接受者订阅该消息。因此基于事件(消息对象)驱动的业务架构可以是一系列流程。 diff --git a/docs/java/concurrent/java-concurrent-questions-01.md b/docs/java/concurrent/java-concurrent-questions-01.md index 212af7a2..a6922958 100644 --- a/docs/java/concurrent/java-concurrent-questions-01.md +++ b/docs/java/concurrent/java-concurrent-questions-01.md @@ -207,9 +207,9 @@ Thread[线程 1,5,main]waiting get resource2 Thread[线程 2,5,main]waiting get resource1 ``` -线程 A 通过 `synchronized (resource1)` 获得 `resource1` 的监视器锁,然后通过`Thread.sleep(1000);`让线程 A 休眠 1s 为的是让线程 B 得到执行然后获取到 resource2 的监视器锁。线程 A 和线程 B 休眠结束了都开始企图请求获取对方的资源,然后这两个线程就会陷入互相等待的状态,这也就产生了死锁。上面的例子符合产生死锁的四个必要条件。 +线程 A 通过 `synchronized (resource1)` 获得 `resource1` 的监视器锁,然后通过`Thread.sleep(1000);`让线程 A 休眠 1s 为的是让线程 B 得到执行然后获取到 resource2 的监视器锁。线程 A 和线程 B 休眠结束了都开始企图请求获取对方的资源,然后这两个线程就会陷入互相等待的状态,这也就产生了死锁。 -学过操作系统的朋友都知道产生死锁必须具备以下四个条件: +上面的例子符合产生死锁的四个必要条件: 1. 互斥条件:该资源任意一个时刻只由一个线程占用。 2. 请求与保持条件:一个线程因请求资源而阻塞时,对已获得的资源保持不放。 diff --git a/docs/java/jvm/memory-area.md b/docs/java/jvm/memory-area.md index 1a038636..98053435 100644 --- a/docs/java/jvm/memory-area.md +++ b/docs/java/jvm/memory-area.md @@ -27,7 +27,7 @@ Java 虚拟机在执行 Java 程序的过程中会把它管理的内存划分成 ![](./pictures/java内存区域/JVM运行时数据区域.png) -**JDK 1.8 ** : +**JDK 1.8** : ![](./pictures/java内存区域/Java运行时数据区域JDK1.8.png) @@ -197,14 +197,14 @@ JDK 1.8 的时候,方法区(HotSpot 的永久代)被彻底移除了(JDK1 运行时常量池是方法区的一部分。Class 文件中除了有类的版本、字段、方法、接口等描述信息外,还有常量池表(用于存放编译期生成的各种字面量和符号引用) -既然运行时常量池是方法区的一部分,自然受到方法区内存的限制,当常量池无法再申请到内存时会抛出 OutOfMemoryError 错误。 +既然运行时常量池是方法区的一部分,自然受到方法区内存的限制,当常量池无法再申请到内存时会抛出 `OutOfMemoryError` 错误。 ~~**JDK1.7 及之后版本的 JVM 已经将运行时常量池从方法区中移了出来,在 Java 堆(Heap)中开辟了一块区域存放运行时常量池。**~~ > **🐛 修正(参见:[issue747](https://github.com/Snailclimb/JavaGuide/issues/747),[reference](https://blog.csdn.net/q5706503/article/details/84640762))** : > -> 1. JDK1.7 之前运行时常量池逻辑包含字符串常量池存放在方法区, 此时 hotspot 虚拟机对方法区的实现为永久代 -> 2. **JDK1.7 字符串常量池被从方法区拿到了堆中, 这里没有提到运行时常量池,也就是说字符串常量池被单独拿到堆,运行时常量池剩下的东西还在方法区, 也就是 hotspot 中的永久代 。** +> 1. JDK1.7 之前,运行时常量池包含的字符串常量池和静态变量存放在方法区, 此时 hotspot 虚拟机对方法区的实现为永久代。 +> 2. JDK1.7 字符串常量池和静态变量被从方法区拿到了堆中, 这里没有提到运行时常量池,也就是说字符串常量池被单独拿到堆,运行时常量池剩下的东西还在方法区, 也就是 hotspot 中的永久代 。 > 3. JDK1.8 hotspot 移除了永久代用元空间(Metaspace)取而代之, 这时候字符串常量池还在堆, 运行时常量池还在方法区, 只不过方法区的实现从永久代变成了元空间(Metaspace) 相关问题:[JVM 常量池中存储的是对象还是引用呢? - RednaxelaFX - 知乎](https://www.zhihu.com/question/57109429/answer/151717241) diff --git a/docs/readme.md b/docs/readme.md index 87f2061a..2d24b7e0 100644 --- a/docs/readme.md +++ b/docs/readme.md @@ -39,9 +39,3 @@ actions: 最新更新会第一时间同步在公众号,强烈推荐大家关注一波!另外,公众号上有很多干货不会同步在线阅读网站。 ![我的公众号](https://cdn.jsdelivr.net/gh/javaguide-tech/blog-images/2020-08/167598cd2e17b8ec.png) - -## 联系我 - -交流/加群/互看朋友圈,欢迎添加我的微信(备注“Github”即可)。 - -![](../media/pictures/weixin.jpeg) \ No newline at end of file diff --git a/package.json b/package.json index 576b42b8..8a060218 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "webpack-serve": "vuepress-webpack dev docs" }, "devDependencies": { - "vuepress-theme-hope": "2.0.0-beta.13", + "vuepress-theme-hope": "2.0.0-beta.28", "vuepress-vite": "2.0.0-beta.36", "vuepress-webpack": "2.0.0-beta.36", "@vuepress/plugin-search": "^2.0.0-beta.36"