1
0
mirror of https://github.com/Snailclimb/JavaGuide synced 2025-08-14 05:21:42 +08:00

Compare commits

..

No commits in common. "a271e56e636c4c59880e9ee89f1e54d8e80b2389" and "d2cf1701beb56bfd3f9e100c8369cf8d872dc231" have entirely different histories.

8 changed files with 131 additions and 86 deletions

View File

@ -1,30 +1,59 @@
import { defineUserConfig } from "vuepress"; const { defineHopeConfig } = require("vuepress-theme-hope");
import { themeConfig } from "./themeConfig"; import themeConfig from "./themeConfig";
import { searchPlugin } from "@vuepress/plugin-search";
export default defineUserConfig({ module.exports = defineHopeConfig({
port: "8080",
title: "JavaGuide",
description:
"「Java学习指北+Java面试指南」一份涵盖大部分 Java 程序员所需要掌握的核心知识。准备 Java 面试,复习 Java 知识点,首选 JavaGuide ",
//指定 vuepress build 的输出目录
dest: "./dist", dest: "./dist",
theme: themeConfig, head: [
shouldPrefetch: false, // meta
["meta", { name: "robots", content: "all" }],
["meta", { name: "author", content: "Guide" }],
[
"meta",
{
"http-equiv": "Cache-Control",
content: "no-cache, no-store, must-revalidate",
},
],
["meta", { "http-equiv": "Pragma", content: "no-cache" }],
["meta", { "http-equiv": "Expires", content: "0" }],
[
"meta",
{
name: "keywords",
content:
"Java基础, 多线程, JVM, 虚拟机, 数据库, MySQL, Spring, Redis, MyBatis, 系统设计, 分布式, RPC, 高可用, 高并发",
},
],
["meta", { name: "apple-mobile-web-app-capable", content: "yes" }],
// 添加百度统计
[
"script",
{},
`var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?5dd2e8c97962d57b7b8fea1737c01743";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();`,
],
[
"link",
{
rel: "stylesheet",
href: "/iconfont/iconfont.css",
},
],
],
locales: { locales: {
"/": { "/": {
lang: "zh-CN", lang: "zh-CN",
} },
}, },
plugins: [ themeConfig,
searchPlugin({
// https://v2.vuepress.vuejs.org/zh/reference/plugin/search.html
// 排除首页
isSearchable: (page) => page.path !== "/",
maxSuggestions: 10,
hotKeys: ["s", "/"],
// 用于在页面的搜索索引中添加额外字段
getExtraFields: () => [],
locales: {
"/": {
placeholder: "搜索",
},
},
}),
],
}); });

View File

@ -1,6 +1,6 @@
import { navbar } from "vuepress-theme-hope"; import { defineNavbarConfig } from "vuepress-theme-hope";
export const navbarConfig = navbar([ export const navbarConfig = defineNavbarConfig([
{ text: "面试指南", icon: "java", link: "/home.md" }, { text: "面试指南", icon: "java", link: "/home.md" },
{ text: "开源项目", icon: "github", link: "/open-source-project/" }, { text: "开源项目", icon: "github", link: "/open-source-project/" },
{ text: "技术书籍", icon: "book", link: "/books/" }, { text: "技术书籍", icon: "book", link: "/books/" },

View File

@ -1,10 +1,10 @@
import { sidebar } from "vuepress-theme-hope"; import { defineSidebarConfig } from "vuepress-theme-hope";
import { highQualityTechnicalArticles } from "./sidebar/high-quality-technical-articles"; import { highQualityTechnicalArticles } from "./sidebar/high-quality-technical-articles";
import { aboutTheAuthor } from "./sidebar/about-the-author"; import { aboutTheAuthor } from "./sidebar/about-the-author";
import { books } from "./sidebar/books"; import { books } from "./sidebar/books";
import { openSourceProject } from "./sidebar/open-source-project"; import { openSourceProject } from "./sidebar/open-source-project";
export const sidebarConfig = sidebar({ export const sidebarConfig = defineSidebarConfig({
// 应该把更精确的路径放置在前边 // 应该把更精确的路径放置在前边
"/open-source-project/": openSourceProject, "/open-source-project/": openSourceProject,
"/books/": books, "/books/": books,
@ -21,8 +21,8 @@ export const sidebarConfig = sidebar({
{ {
text: "面试准备", text: "面试准备",
icon: "interview", icon: "interview",
collapsible: true,
prefix: "interview-preparation/", prefix: "interview-preparation/",
collapsable: true,
children: [ children: [
"teach-you-how-to-prepare-for-the-interview-hand-in-hand", "teach-you-how-to-prepare-for-the-interview-hand-in-hand",
"project-experience-guide", "project-experience-guide",
@ -33,13 +33,14 @@ export const sidebarConfig = sidebar({
{ {
text: "Java", text: "Java",
icon: "java", icon: "java",
collapsible: true,
prefix: "java/", prefix: "java/",
collapsable: true,
children: [ children: [
{ {
text: "基础", text: "基础",
prefix: "basis/", prefix: "basis/",
icon: "basic", icon: "basic",
collapsable: true,
children: [ children: [
"java-basic-questions-01", "java-basic-questions-01",
"java-basic-questions-02", "java-basic-questions-02",
@ -47,7 +48,7 @@ export const sidebarConfig = sidebar({
{ {
text: "重要知识点", text: "重要知识点",
icon: "star", icon: "star",
collapsible: true, collapsable: true,
children: [ children: [
"why-there-only-value-passing-in-java", "why-there-only-value-passing-in-java",
"serialization", "serialization",
@ -66,14 +67,15 @@ export const sidebarConfig = sidebar({
text: "集合", text: "集合",
prefix: "collection/", prefix: "collection/",
icon: "container", icon: "container",
collapsable: true,
children: [ children: [
"java-collection-questions-01", "java-collection-questions-01",
"java-collection-questions-02", "java-collection-questions-02",
"java-collection-precautions-for-use", "java-collection-precautions-for-use",
{ {
text: "源码分析", text: "源码分析",
collapsable: true,
icon: "star", icon: "star",
collapsible: true,
children: [ children: [
"arraylist-source-code", "arraylist-source-code",
"hashmap-source-code", "hashmap-source-code",
@ -87,12 +89,14 @@ export const sidebarConfig = sidebar({
text: "IO", text: "IO",
prefix: "io/", prefix: "io/",
icon: "code", icon: "code",
collapsable: true,
children: ["io-basis", "io-design-patterns", "io-model"], children: ["io-basis", "io-design-patterns", "io-model"],
}, },
{ {
text: "并发编程", text: "并发编程",
prefix: "concurrent/", prefix: "concurrent/",
icon: "et-performance", icon: "et-performance",
collapsable: true,
children: [ children: [
"java-concurrent-questions-01", "java-concurrent-questions-01",
"java-concurrent-questions-02", "java-concurrent-questions-02",
@ -100,7 +104,7 @@ export const sidebarConfig = sidebar({
{ {
text: "重要知识点", text: "重要知识点",
icon: "star", icon: "star",
collapsible: true, collapsable: true,
children: [ children: [
"jmm", "jmm",
"java-thread-pool-summary", "java-thread-pool-summary",
@ -118,7 +122,7 @@ export const sidebarConfig = sidebar({
text: "JVM", text: "JVM",
prefix: "jvm/", prefix: "jvm/",
icon: "virtual_machine", icon: "virtual_machine",
collapsible: true, collapsable: true,
children: [ children: [
"memory-area", "memory-area",
"jvm-garbage-collection", "jvm-garbage-collection",
@ -134,7 +138,7 @@ export const sidebarConfig = sidebar({
text: "新特性", text: "新特性",
prefix: "new-features/", prefix: "new-features/",
icon: "featured", icon: "featured",
collapsible: true, collapsable: true,
children: [ children: [
"java8-common-new-features", "java8-common-new-features",
"java8-tutorial-translate", "java8-tutorial-translate",
@ -156,20 +160,20 @@ export const sidebarConfig = sidebar({
text: "计算机基础", text: "计算机基础",
icon: "computer", icon: "computer",
prefix: "cs-basics/", prefix: "cs-basics/",
collapsible: true, collapsable: true,
children: [ children: [
{ {
text: "网络", text: "网络",
prefix: "network/", prefix: "network/",
icon: "network", icon: "network",
collapsible: true, collapsable: true,
children: [ children: [
"other-network-questions", "other-network-questions",
"computer-network-xiexiren-summary", "computer-network-xiexiren-summary",
{ {
text: "重要知识点", text: "重要知识点",
icon: "star", icon: "star",
collapsible: true, collapsable: true,
children: [ children: [
"osi&tcp-ip-model", "osi&tcp-ip-model",
"application-layer-protocol", "application-layer-protocol",
@ -187,7 +191,7 @@ export const sidebarConfig = sidebar({
text: "操作系统", text: "操作系统",
prefix: "operating-system/", prefix: "operating-system/",
icon: "caozuoxitong", icon: "caozuoxitong",
collapsible: true, collapsable: true,
children: [ children: [
"operating-system-basic-questions-01", "operating-system-basic-questions-01",
"linux-intro", "linux-intro",
@ -198,7 +202,7 @@ export const sidebarConfig = sidebar({
text: "数据结构", text: "数据结构",
prefix: "data-structure/", prefix: "data-structure/",
icon: "people-network-full", icon: "people-network-full",
collapsible: true, collapsable: true,
children: [ children: [
"linear-data-structure", "linear-data-structure",
"graph", "graph",
@ -212,7 +216,7 @@ export const sidebarConfig = sidebar({
text: "算法", text: "算法",
prefix: "algorithms/", prefix: "algorithms/",
icon: "suanfaku", icon: "suanfaku",
collapsible: true, collapsable: true,
children: [ children: [
"string-algorithm-problems", "string-algorithm-problems",
"linkedlist-algorithm-problems", "linkedlist-algorithm-problems",
@ -226,26 +230,26 @@ export const sidebarConfig = sidebar({
text: "数据库", text: "数据库",
icon: "database", icon: "database",
prefix: "database/", prefix: "database/",
collapsible: true, collapsable: true,
children: [ children: [
{ {
text: "基础", text: "基础",
icon: "basic", icon: "basic",
collapsible: true, collapsable: true,
children: ["basis", "character-set"], children: ["basis", "character-set"],
}, },
{ {
text: "MySQL", text: "MySQL",
prefix: "mysql/", prefix: "mysql/",
icon: "mysql", icon: "mysql",
collapsible: true, collapsable: true,
children: [ children: [
"mysql-questions-01", "mysql-questions-01",
"mysql-high-performance-optimization-specification-recommendations", "mysql-high-performance-optimization-specification-recommendations",
{ {
text: "重要知识点", text: "重要知识点",
icon: "star", icon: "star",
collapsible: true, collapsable: true,
children: [ children: [
"mysql-index", "mysql-index",
"mysql-logs", "mysql-logs",
@ -262,7 +266,7 @@ export const sidebarConfig = sidebar({
text: "Redis", text: "Redis",
prefix: "redis/", prefix: "redis/",
icon: "redis", icon: "redis",
collapsible: true, collapsable: true,
children: [ children: [
"cache-basics", "cache-basics",
"redis-questions-01", "redis-questions-01",
@ -270,7 +274,7 @@ export const sidebarConfig = sidebar({
{ {
text: "重要知识点", text: "重要知识点",
icon: "star", icon: "star",
collapsible: true, collapsable: true,
children: [ children: [
"3-commonly-used-cache-read-and-write-strategies", "3-commonly-used-cache-read-and-write-strategies",
"redis-data-structures-01", "redis-data-structures-01",
@ -287,18 +291,20 @@ export const sidebarConfig = sidebar({
text: "开发工具", text: "开发工具",
icon: "tool", icon: "tool",
prefix: "tools/", prefix: "tools/",
collapsible: true, collapsable: true,
children: [ children: [
{ {
text: "Git", text: "Git",
icon: "git", icon: "git",
prefix: "git/", prefix: "git/",
collapsable: true,
children: ["git-intro", "github-tips"], children: ["git-intro", "github-tips"],
}, },
{ {
text: "Docker", text: "Docker",
icon: "docker1", icon: "docker1",
prefix: "docker/", prefix: "docker/",
collapsable: true,
children: ["docker-intro", "docker-in-action"], children: ["docker-intro", "docker-in-action"],
}, },
{ {
@ -312,11 +318,12 @@ export const sidebarConfig = sidebar({
text: "常用框架", text: "常用框架",
prefix: "system-design/framework/", prefix: "system-design/framework/",
icon: "framework", icon: "framework",
collapsible: true, collapsable: true,
children: [ children: [
{ {
text: "Spring&Spring Boot", text: "Spring&Spring Boot",
prefix: "spring/", prefix: "spring/",
collapsable: true,
children: [ children: [
"spring-knowledge-and-questions-summary", "spring-knowledge-and-questions-summary",
"springboot-knowledge-and-questions-summary", "springboot-knowledge-and-questions-summary",
@ -324,7 +331,7 @@ export const sidebarConfig = sidebar({
{ {
text: "重要知识点", text: "重要知识点",
icon: "star", icon: "star",
collapsible: true, collapsable: true,
children: [ children: [
"spring-transaction", "spring-transaction",
"spring-design-patterns-summary", "spring-design-patterns-summary",
@ -341,7 +348,7 @@ export const sidebarConfig = sidebar({
text: "系统设计", text: "系统设计",
icon: "xitongsheji", icon: "xitongsheji",
prefix: "system-design/", prefix: "system-design/",
collapsible: true, collapsable: true,
children: [ children: [
"system-design-questions", "system-design-questions",
"design-pattern", "design-pattern",
@ -349,7 +356,7 @@ export const sidebarConfig = sidebar({
text: "基础", text: "基础",
prefix: "basis/", prefix: "basis/",
icon: "basic", icon: "basic",
collapsible: true, collapsable: true,
children: [ children: [
"RESTfulAPI", "RESTfulAPI",
"naming", "naming",
@ -364,7 +371,7 @@ export const sidebarConfig = sidebar({
text: "安全", text: "安全",
prefix: "security/", prefix: "security/",
icon: "security-fill", icon: "security-fill",
collapsible: true, collapsable: true,
children: [ children: [
"basis-of-authority-certification", "basis-of-authority-certification",
"jwt-intro", "jwt-intro",
@ -383,12 +390,12 @@ export const sidebarConfig = sidebar({
text: "分布式", text: "分布式",
icon: "distributed-network", icon: "distributed-network",
prefix: "distributed-system/", prefix: "distributed-system/",
collapsible: true, collapsable: true,
children: [ children: [
{ {
text: "理论&算法&协议", text: "理论&算法&协议",
prefix: "theorem&algorithm&protocol/", prefix: "theorem&algorithm&protocol/",
collapsible: true, collapsable: true,
children: ["cap&base-theorem", "paxos-algorithm", "raft-algorithm"], children: ["cap&base-theorem", "paxos-algorithm", "raft-algorithm"],
}, },
"api-gateway", "api-gateway",
@ -399,13 +406,13 @@ export const sidebarConfig = sidebar({
{ {
text: "RPC远程调用详解", text: "RPC远程调用详解",
prefix: "rpc/", prefix: "rpc/",
collapsible: true, collapsable: true,
children: ["rpc-intro", "dubbo"], children: ["rpc-intro", "dubbo"],
}, },
{ {
text: "ZooKeeper 详解", text: "ZooKeeper 详解",
prefix: "distributed-process-coordination/", prefix: "distributed-process-coordination/",
collapsible: true, collapsable: true,
children: [ children: [
"zookeeper/zookeeper-intro", "zookeeper/zookeeper-intro",
"zookeeper/zookeeper-plus", "zookeeper/zookeeper-plus",
@ -418,7 +425,7 @@ export const sidebarConfig = sidebar({
text: "高性能", text: "高性能",
icon: "et-performance", icon: "et-performance",
prefix: "high-performance/", prefix: "high-performance/",
collapsible: true, collapsable: true,
children: [ children: [
"read-and-write-separation-and-library-subtable", "read-and-write-separation-and-library-subtable",
"load-balancing", "load-balancing",
@ -428,7 +435,7 @@ export const sidebarConfig = sidebar({
text: "消息队列", text: "消息队列",
prefix: "message-queue/", prefix: "message-queue/",
icon: "MQ", icon: "MQ",
collapsible: true, collapsable: true,
children: [ children: [
"message-queue", "message-queue",
"kafka-questions-01", "kafka-questions-01",
@ -444,7 +451,7 @@ export const sidebarConfig = sidebar({
text: "高可用", text: "高可用",
icon: "highavailable", icon: "highavailable",
prefix: "high-availability/", prefix: "high-availability/",
collapsible: true, collapsable: true,
children: [ children: [
"high-availability-system-design", "high-availability-system-design",
"redundancy", "redundancy",

View File

@ -1,10 +1,8 @@
import { hopeTheme } from "vuepress-theme-hope"; import { defineThemeConfig } from "vuepress-theme-hope";
import { searchPlugin } from "@vuepress/plugin-search";
import { navbarConfig } from "./navbar"; import { navbarConfig } from "./navbar";
import { sidebarConfig } from "./sidebar"; import { sidebarConfig } from "./sidebar";
export const themeConfig = hopeTheme({ export default defineThemeConfig({
logo: "/logo.png", logo: "/logo.png",
hostname: "https://javaguide.cn/", hostname: "https://javaguide.cn/",
author: { author: {
@ -13,19 +11,11 @@ export const themeConfig = hopeTheme({
}, },
repo: "https://github.com/Snailclimb/JavaGuide", repo: "https://github.com/Snailclimb/JavaGuide",
docsDir: "docs", docsDir: "docs",
iconAssets: "//at.alicdn.com/t/c/font_2922463_bcn6tjuoz8b.css", iconPrefix: "iconfont icon-",
pure: true,
navbar: navbarConfig, navbar: navbarConfig,
sidebar: sidebarConfig, sidebar: sidebarConfig,
pageInfo: [ pageInfo: ["Author", "Category", "Tag", "Date", "Original", "Word"],
"Author",
"Category",
"Tag",
"Date",
"Original",
"Word",
"ReadingTime",
],
blog: { blog: {
intro: "/about-the-author/", intro: "/about-the-author/",
sidebarDisplay: "mobile", sidebarDisplay: "mobile",
@ -39,15 +29,35 @@ export const themeConfig = hopeTheme({
'<a href="https://beian.miit.gov.cn/" target="_blank">鄂ICP备2020015769号-1</a>', '<a href="https://beian.miit.gov.cn/" target="_blank">鄂ICP备2020015769号-1</a>',
displayFooter: true, displayFooter: true,
plugins: { plugins: {
blog: true, blog: {
copyright: true, autoExcerpt: true,
},
mdEnhance: { mdEnhance: {
codetabs: true,
container: true,
tasklist: true, tasklist: true,
}, },
feed: { feed: {
json: true, json: true,
}, },
// comment: {
// type: "giscus",
// repo: "Snailclimb/JavaGuide",
// repoId: "MDEwOlJlcG9zaXRvcnkxMzI0NjQzOTU=",
// category: "Announcements",
// categoryId: "DIC_kwDOB-U_C84COYQF",
// },
search: {
// https://v2.vuepress.vuejs.org/zh/reference/plugin/search.html
// 排除首页
isSearchable: (page) => page.path !== "/",
maxSuggestions: 10,
hotKeys: ["s", "/"],
// 用于在页面的搜索索引中添加额外字段
getExtraFields: () => [],
locales: {
"/": {
placeholder: "搜索",
},
},
},
}, },
}); });

View File

@ -60,7 +60,7 @@ icon: "distributed-network"
![](https://guide-blog-images.oss-cn-shenzhen.aliyuncs.com/github/javaguide/books/f5bec14d3b404ac4b041d723153658b5.png) ![](https://guide-blog-images.oss-cn-shenzhen.aliyuncs.com/github/javaguide/books/f5bec14d3b404ac4b041d723153658b5.png)
**[《凤凰架构》](https://book.douban.com/subject/35492898/)** 这本书是周志明老师多年架构和研发经验的总结,内容非常干货,深度与广度并存,理论结合实践! **[《凤凰架构》](https://book.douban.com/subject/35492898/)**这本书是周志明老师多年架构和研发经验的总结,内容非常干货,深度与广度并存,理论结合实践!
正如书名的副标题“构建可靠的大型分布式系统”所说的那样,这本书的主要内容就是讲:“如何构建一套可靠的分布式大型软件系统” ,涵盖了下面这些方面的内容: 正如书名的副标题“构建可靠的大型分布式系统”所说的那样,这本书的主要内容就是讲:“如何构建一套可靠的分布式大型软件系统” ,涵盖了下面这些方面的内容:

View File

@ -179,7 +179,7 @@ InnoDB 引擎中,其数据文件本身就是索引文件。相比 MyISAM
## MySQL 索引 ## MySQL 索引
MySQL 索引相关的问题比较多,对于面试和工作都比较重要,于是,我单独抽了一篇文章专门来总结 MySQL 索引相关的知识点和问题: [MySQL索引详解](./mysql-index.md) 。 MySQL 索引相关的问题比较多,对于面试和工作都比较重要,于是,我单独抽了一篇文章专门来总结 MySQL 索引相关的知识点和问题: [MySQL索引详解](./mysql-index) 。
## MySQL 查询缓存 ## MySQL 查询缓存

View File

@ -13,11 +13,10 @@
"webpack-clean-serve": "vuepress-webpack dev docs --clean-cache", "webpack-clean-serve": "vuepress-webpack dev docs --clean-cache",
"webpack-serve": "vuepress-webpack dev docs" "webpack-serve": "vuepress-webpack dev docs"
}, },
"dependencies": { "devDependencies": {
"vuepress": "^2.0.0-beta.53", "@vuepress/plugin-search": "^2.0.0-beta.38",
"vuepress-theme-hope": "^2.0.0-beta.122", "vuepress-theme-hope": "^2.0.0-beta.36",
"vuepress-vite": "2.0.0-beta.53", "vuepress-vite": "2.0.0-beta.38",
"vuepress-webpack": "2.0.0-beta.53", "vuepress-webpack": "2.0.0-beta.38"
"@vuepress/plugin-search": "^2.0.0-beta.53"
} }
} }