diff --git a/README.md b/README.md
index 0841d736..c3f25c8e 100644
--- a/README.md
+++ b/README.md
@@ -1,11 +1,12 @@
-
+
+
JavaTutorial
diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js
index 5d3766dc..8ed2745b 100644
--- a/docs/.vuepress/config.js
+++ b/docs/.vuepress/config.js
@@ -2,62 +2,147 @@
* @see https://vuepress.vuejs.org/zh/
*/
module.exports = {
- port: "4000",
- dest: "dist",
- base: "/java-tutorial/",
- title: "JAVA-TUTORIAL",
- description: "Java 教程",
- head: [["link", {rel: "icon", href: `/favicon.ico`}]],
+ port: '4000',
+ dest: 'dist',
+ base: '/java-tutorial/',
+ title: 'JAVA-TUTORIAL',
+ description: 'Java 教程',
+ head: [['link', { rel: 'icon', href: `/favicon.ico` }]],
markdown: {
externalLinks: {
- target: "_blank", rel: "noopener noreferrer"
- }
+ target: '_blank',
+ rel: 'noopener noreferrer',
+ },
},
themeConfig: {
- logo: "images/dunwu-logo-100.png",
- repo: "dunwu/java-tutorial",
- repoLabel: "Github",
- docsDir: "docs",
- docsBranch: "master",
+ logo: 'https://raw.githubusercontent.com/dunwu/images/dev/common/dunwu-logo-200.png',
+ repo: 'dunwu/java-tutorial',
+ repoLabel: 'Github',
+ docsDir: 'docs',
+ docsBranch: 'master',
editLinks: true,
smoothScroll: true,
locales: {
- "/": {
- label: "简体中文", selectText: "Languages", editLinkText: "帮助我们改善此页面!", lastUpdated: "上次更新", nav: [{
- text: "工具", link: "/javatool/", items: [{
- text: "构建", link: "/javatool/build/"
- }, {
- text: "IDE", link: "/javatool/ide/"
- }, {
- text: "监控", link: "/javatool/monitor/"
- }]
- }, {
- text: "JavaEE", link: "/javaee/"
- }, {
- text: "✨ Java系列", ariaLabel: "Java", items: [{
- text: "Java 教程 📚", link: "https://dunwu.github.io/java-tutorial/", target: "_blank", rel: ""
- }, {
- text: "JavaCore 教程 📚", link: "https://dunwu.github.io/javacore/", target: "_blank", rel: ""
- }, {
- text: "JavaTech 教程 📚", link: "https://dunwu.github.io/javatech/", target: "_blank", rel: ""
- }, {
- text: "Spring 教程 📚", link: "https://dunwu.github.io/spring-tutorial/", target: "_blank", rel: ""
- }, {
- text: "Spring Boot 教程 📚", link: "https://dunwu.github.io/spring-boot-tutorial/", target: "_blank", rel: ""
- }]
- }, {
- text: "🎯 博客", link: "https://github.com/dunwu/blog", target: "_blank", rel: ""
- }], sidebar: "auto", sidebarDepth: 2
- }
- }
+ '/': {
+ label: '简体中文',
+ selectText: 'Languages',
+ editLinkText: '帮助我们改善此页面!',
+ lastUpdated: '上次更新',
+ nav: [
+ {
+ text: '工具',
+ link: '/javatool/',
+ items: [
+ {
+ text: '构建',
+ link: '/javatool/build/',
+ },
+ {
+ text: 'IDE',
+ link: '/javatool/ide/',
+ },
+ {
+ text: '监控',
+ link: '/javatool/monitor/',
+ },
+ ],
+ },
+ {
+ text: 'JavaEE',
+ link: '/javaee/',
+ },
+ {
+ text: '✨ Java系列',
+ ariaLabel: 'Java',
+ items: [
+ {
+ text: 'Java 教程 📚',
+ link: 'https://dunwu.github.io/java-tutorial/',
+ target: '_blank',
+ rel: '',
+ },
+ {
+ text: 'JavaCore 教程 📚',
+ link: 'https://dunwu.github.io/javacore/',
+ target: '_blank',
+ rel: '',
+ },
+ {
+ text: 'JavaTech 教程 📚',
+ link: 'https://dunwu.github.io/javatech/',
+ target: '_blank',
+ rel: '',
+ },
+ {
+ text: 'Spring 教程 📚',
+ link: 'https://dunwu.github.io/spring-tutorial/',
+ target: '_blank',
+ rel: '',
+ },
+ {
+ text: 'Spring Boot 教程 📚',
+ link: 'https://dunwu.github.io/spring-boot-tutorial/',
+ target: '_blank',
+ rel: '',
+ },
+ ],
+ },
+ {
+ text: '🎯 博客',
+ link: 'https://github.com/dunwu/blog',
+ target: '_blank',
+ rel: '',
+ },
+ ],
+ sidebar: 'auto',
+ sidebarDepth: 2,
+ },
+ },
},
- plugins: [["@vuepress/active-header-links", {
- sidebarLinkSelector: ".sidebar-link", headerAnchorSelector: ".header-anchor"
- }], ["@vuepress/back-to-top", true], ["@vuepress/pwa", {
- serviceWorker: true, updatePopup: true
- }], ["@vuepress/medium-zoom", true], ["container", {
- type: "vue", before: '', after: "
"
- }], ["container", {
- type: "upgrade", before: info => ``, after: ""
- }], ["flowchart"]]
-};
+ plugins: [
+ [
+ '@vuepress/active-header-links',
+ {
+ sidebarLinkSelector: '.sidebar-link',
+ headerAnchorSelector: '.header-anchor',
+ },
+ ],
+ ['@vuepress/back-to-top', true],
+ [
+ '@vuepress/pwa',
+ {
+ serviceWorker: true,
+ updatePopup: true,
+ },
+ ],
+ [
+ '@vuepress/last-updated',
+ {
+ transformer: (timestamp, lang) => {
+ // 不要忘了安装 moment
+ const moment = require('moment')
+ moment.locale(lang)
+ return moment(timestamp).fromNow()
+ },
+ },
+ ],
+ ['@vuepress/medium-zoom', true],
+ [
+ 'container',
+ {
+ type: 'vue',
+ before: '',
+ after: '
',
+ },
+ ],
+ [
+ 'container',
+ {
+ type: 'upgrade',
+ before: (info) => ``,
+ after: '',
+ },
+ ],
+ ['flowchart'],
+ ],
+}
diff --git a/docs/README.md b/docs/README.md
index d73c10ce..01306570 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -1,12 +1,15 @@
---
home: true
-heroImage: http://dunwu.test.upcdn.net/common/logo/dunwu-logo.png
+heroImage: https://raw.githubusercontent.com/dunwu/images/dev/common/dunwu-logo-200.png
heroText: JAVA-TUTORIAL
tagline: ☕ java-tutorial 是一个 Java 教程,汇集一个老司机在 Java 领域的十年积累。
actionLink: /
footer: CC-BY-SA-4.0 Licensed | Copyright © 2018-Now Dunwu
---
+![license](https://badgen.net/github/license/dunwu/java-tutorial)
+![build](https://travis-ci.com/dunwu/java-tutorial.svg?branch=master)
+
> ☕ **java-tutorial** 是一个 Java 教程,汇集一个老司机在 Java 领域的十年积累。
>
> - 🔁 项目同步维护:[Github](https://github.com/dunwu/java-tutorial/) | [Gitee](https://gitee.com/turnon/java-tutorial/)
diff --git a/docs/javaee/javaee-filter-listener.md b/docs/javaee/javaee-filter-listener.md
index 250fd9a0..0abf6400 100644
--- a/docs/javaee/javaee-filter-listener.md
+++ b/docs/javaee/javaee-filter-listener.md
@@ -24,7 +24,7 @@
Filter 提供了过滤链(Filter Chain)的概念,一个过滤链包括多个 Filter。客户端请求 request 在抵达 Servlet 之前会经过过滤链的所有 Filter,服务器响应 response 从 Servlet 抵达客户端浏览器之前也会经过过滤链的所有 FIlter。
-![img](http://dunwu.test.upcdn.net/snap/1559054413341.png)
+![img](https://raw.githubusercontent.com/dunwu/images/dev/snap/1559054413341.png)
### 1.1. 过滤器方法
diff --git a/docs/javatool/build/maven/maven-action.md b/docs/javatool/build/maven/maven-action.md
index c010a1cf..82d16c3b 100644
--- a/docs/javatool/build/maven/maven-action.md
+++ b/docs/javatool/build/maven/maven-action.md
@@ -53,21 +53,21 @@ maven 的 JDK 源与指定的 JDK 编译版本不符。
Project SDK 是否正确
-![img](http://dunwu.test.upcdn.net/snap/20181127203324.png!zp)
+![img](https://raw.githubusercontent.com/dunwu/images/dev/snap/20181127203324.png)
SDK 路径是否正确
-![img](http://dunwu.test.upcdn.net/snap/20181127203427.png!zp)
+![img](https://raw.githubusercontent.com/dunwu/images/dev/snap/20181127203427.png)
- **查看 Settings > Maven 的配置**
JDK for importer 是否正确
-![img](http://dunwu.test.upcdn.net/snap/20181127203408.png!zp)
+![img](https://raw.githubusercontent.com/dunwu/images/dev/snap/20181127203408.png)
Runner 是否正确
-![img](http://dunwu.test.upcdn.net/snap/20181127203439.png!zp)
+![img](https://raw.githubusercontent.com/dunwu/images/dev/snap/20181127203439.png)
### 重复引入依赖
diff --git a/docs/javatool/build/maven/maven-deploy.md b/docs/javatool/build/maven/maven-deploy.md
index ba18d389..e4fece0e 100644
--- a/docs/javatool/build/maven/maven-deploy.md
+++ b/docs/javatool/build/maven/maven-deploy.md
@@ -33,7 +33,7 @@
注册账号成功后,根据你 Java 包的功能分别写上`Summary`、`Description`、`Group Id`、`SCM url`以及`Project URL`等必要信息,可以参见我之前创建的 Issue:[OSSRH-36187](https://issues.sonatype.org/browse/OSSRH-36187)。
-![img](http://dunwu.test.upcdn.net/snap/20181106143734.png!zp)
+![img](https://raw.githubusercontent.com/dunwu/images/dev/snap/20181106143734.png)
创建完之后需要等待 Sonatype 的工作人员审核处理,审核时间还是很快的,我的审核差不多等待了两小时。当 Issue 的 Status 变为`RESOLVED`后,就可以进行下一步操作了。
@@ -309,7 +309,7 @@ gpg: unchanged: 1
进入[官方下载地址](https://www.sonatype.com/download-oss-sonatype),选择合适版本下载。
-![img](http://dunwu.test.upcdn.net/snap/20181127203029.png!zp)
+![img](https://raw.githubusercontent.com/dunwu/images/dev/snap/20181127203029.png)
本人希望将 Nexus 部署在 Linux 机器,所以选用的是 Unix 版本。
@@ -341,13 +341,13 @@ Usage: ./nexus {start|stop|run|run-redirect|status|restart|force-reload}
启动成功后,在浏览器中访问 `http://:8081`,欢迎页面如下图所示:
-![img](http://dunwu.test.upcdn.net/snap/20181127203131.png!zp)
+![img](https://raw.githubusercontent.com/dunwu/images/dev/snap/20181127203131.png)
点击右上角 Sign in 登录,默认用户名/密码为:admin/admin123。
有必要提一下的是,在 Nexus 的 Repositories 管理页面,展示了可用的 maven 仓库,如下图所示:
-![img](http://dunwu.test.upcdn.net/snap/20181127203156.png!zp)
+![img](https://raw.githubusercontent.com/dunwu/images/dev/snap/20181127203156.png)
> 说明:
>
diff --git a/docs/javatool/build/maven/maven-quickstart.md b/docs/javatool/build/maven/maven-quickstart.md
index 63e69fcf..8e455d21 100644
--- a/docs/javatool/build/maven/maven-quickstart.md
+++ b/docs/javatool/build/maven/maven-quickstart.md
@@ -150,9 +150,9 @@ export PATH=$MAVEN_HOME/bin:$PATH
右键 "计算机",选择 "属性",之后点击 "高级系统设置",点击"环境变量",来设置环境变量,有以下系统变量需要配置:
-![img](http://dunwu.test.upcdn.net/snap/20200108143017.png)
+![img](https://raw.githubusercontent.com/dunwu/images/dev/snap/20200108143017.png)
-![img](http://dunwu.test.upcdn.net/snap/20200108143038.png)
+![img](https://raw.githubusercontent.com/dunwu/images/dev/snap/20200108143038.png)
### 检测安装成功
@@ -280,15 +280,15 @@ java -cp target/my-app-1.0-SNAPSHOT.jar com.mycompany.app.App
依次点击 File -> New -> Project 打开创建工程对话框,选择 Maven 工程。
-![img](http://dunwu.test.upcdn.net/snap/1555414103572.png!zp)
+![img](https://raw.githubusercontent.com/dunwu/images/dev/snap/1555414103572.png)
(2)输入项目信息
-![img](http://dunwu.test.upcdn.net/snap/1555415549748.png!zp)
+![img](https://raw.githubusercontent.com/dunwu/images/dev/snap/1555415549748.png)
(3)点击 Intellij 侧边栏中的 Maven 工具界面,有几个可以直接使用的 maven 命令,可以帮助你进行构建。
-![img](http://dunwu.test.upcdn.net/snap/1555415806237.png!zp)
+![img](https://raw.githubusercontent.com/dunwu/images/dev/snap/1555415806237.png)
### 在 Eclipse 中创建 Maven 工程
@@ -300,7 +300,7 @@ java -cp target/my-app-1.0-SNAPSHOT.jar com.mycompany.app.App
点击 Help -> Eclipse Marketplace,搜索 maven 关键字,选择安装红框对应的 Maven 插件。
-![img](http://dunwu.test.upcdn.net/snap/20181127195117.png!zp)
+![img](https://raw.githubusercontent.com/dunwu/images/dev/snap/20181127195117.png)
(2)Maven 环境配置
@@ -308,7 +308,7 @@ java -cp target/my-app-1.0-SNAPSHOT.jar com.mycompany.app.App
如下图所示,配置 settings.xml 文件的位置
-![img](http://dunwu.test.upcdn.net/snap/20181127195128.png!zp)
+![img](https://raw.githubusercontent.com/dunwu/images/dev/snap/20181127195128.png)
(3)创建 Maven 工程
@@ -316,7 +316,7 @@ File -> New -> Maven Project -> Next,在接下来的窗口中会看到一大
接下来设置项目的参数,如下:
-![img](http://dunwu.test.upcdn.net/snap/20181127195151.png!zp)
+![img](https://raw.githubusercontent.com/dunwu/images/dev/snap/20181127195151.png)
**groupId**是项目组织唯一的标识符,实际对应 JAVA 的包的结构,是 main 目录里 java 的目录结构。
@@ -330,11 +330,11 @@ Eclipse 中构建方式:
在 Elipse 项目上右击 -> Run As 就能看到很多 Maven 操作。这些操作和 maven 命令是等效的。例如 Maven clean,等同于 mvn clean 命令。
-![img](http://dunwu.test.upcdn.net/snap/20181127195208.png!zp)
+![img](https://raw.githubusercontent.com/dunwu/images/dev/snap/20181127195208.png)
你也可以点击 Maven build,输入组合命令,并保存下来。如下图:
-![img](http://dunwu.test.upcdn.net/snap/20181127195219.png!zp)
+![img](https://raw.githubusercontent.com/dunwu/images/dev/snap/20181127195219.png)
Maven 命令构建方式:
@@ -342,7 +342,7 @@ Maven 命令构建方式:
进入工程所在目录,输入 maven 命令就可以了。
-![img](http://dunwu.test.upcdn.net/snap/20181127195243.png!zp)
+![img](https://raw.githubusercontent.com/dunwu/images/dev/snap/20181127195243.png)
## 四、使用说明
diff --git a/docs/javatool/monitor/cat.md b/docs/javatool/monitor/cat.md
index 3769221d..59a129e1 100644
--- a/docs/javatool/monitor/cat.md
+++ b/docs/javatool/monitor/cat.md
@@ -22,7 +22,7 @@ CAT监控系统将每次URL、Service的请求内部执行情况都封装为一
- **Heartbeat** 表示程序内定期产生的统计信息, 如 CPU 利用率, 内存利用率, 连接池状态, 系统负载等
- **Metric** 用于记录业务指标、指标可能包含对一个指标记录次数、记录平均值、记录总和,业务指标最低统计粒度为 1 分钟
-![img](http://dunwu.test.upcdn.net/snap/20200211174235.png)
+![img](https://raw.githubusercontent.com/dunwu/images/dev/snap/20200211174235.png)
## CAT 部署
@@ -57,7 +57,7 @@ CAT 主要分为三个模块:
在实际开发和部署中,cat-consumer 和 cat-home 是部署在一个 jvm 内部,每个 CAT 服务端都可以作为 consumer 也可以作为 home,这样既能减少整个 CAT 层级结构,也可以增加整个系统稳定性。
-![img](http://dunwu.test.upcdn.net/snap/20200211174001.png)
+![img](https://raw.githubusercontent.com/dunwu/images/dev/snap/20200211174001.png)
上图是 CAT 目前多机房的整体结构图:
diff --git a/docs/javatool/monitor/monitor-summary.md b/docs/javatool/monitor/monitor-summary.md
index 1b5b809e..3149c6de 100644
--- a/docs/javatool/monitor/monitor-summary.md
+++ b/docs/javatool/monitor/monitor-summary.md
@@ -2,17 +2,17 @@
## 监控工具发展史
-![img](http://dunwu.test.upcdn.net/snap/20200211165813.png)
+![img](https://raw.githubusercontent.com/dunwu/images/dev/snap/20200211165813.png)
## 监控工具比对
### 特性对比
-![img](http://dunwu.test.upcdn.net/snap/20200211171551.png)
+![img](https://raw.githubusercontent.com/dunwu/images/dev/snap/20200211171551.png)
### 生态对比
-![img](http://dunwu.test.upcdn.net/snap/20200211172631.png)
+![img](https://raw.githubusercontent.com/dunwu/images/dev/snap/20200211172631.png)
## 技术选型
diff --git a/docs/javatool/monitor/skywalking.md b/docs/javatool/monitor/skywalking.md
index 50aa54d1..f8012e0b 100644
--- a/docs/javatool/monitor/skywalking.md
+++ b/docs/javatool/monitor/skywalking.md
@@ -8,7 +8,7 @@ SkyWalking 是观察性分析平台和应用性能管理系统。
提供分布式追踪、服务网格遥测分析、度量聚合和可视化一体化解决方案。
-![img](http://dunwu.test.upcdn.net/snap/20200211152235.png)
+![img](https://raw.githubusercontent.com/dunwu/images/dev/snap/20200211152235.png)
### SkyWalking 特性
@@ -29,7 +29,7 @@ SkyWalking 是观察性分析平台和应用性能管理系统。
从逻辑上讲,SkyWalking 分为四个部分:探针(Probes),平台后端,存储和 UI。
-![SkyWalking 架构](http://dunwu.test.upcdn.net/snap/20200211153516.png)
+![SkyWalking 架构](https://raw.githubusercontent.com/dunwu/images/dev/snap/20200211153516.png)
- **探针(Probes)** - 探针是指集成到目标系统中的代理或SDK库。它们负责收集数据(包括跟踪数据和统计数据)并将其按照 SkyWalking 的要求重新格式化为。
- **平台后端** - 平台后端是一个提供后端服务的集群。它用于聚合、分析和驱动从探针到 UI 的流程。它还为传入格式(如 Zipkin 的格式),存储实现程序和集群管理提供可插入功能。 您甚至可以使用 Observability Analysis Language 自定义聚合和分析。
@@ -40,7 +40,7 @@ SkyWalking 是观察性分析平台和应用性能管理系统。
进入 [Apache SkyWalking 官方下载页面](http://skywalking.apache.org/downloads/),选择安装版本,下载解压到本地。
-![SkyWalking 组件](http://dunwu.test.upcdn.net/snap/20200211154612.png)
+![SkyWalking 组件](https://raw.githubusercontent.com/dunwu/images/dev/snap/20200211154612.png)
安装分为三个部分:
diff --git a/docs/javatool/monitor/zipkin.md b/docs/javatool/monitor/zipkin.md
index e7c76a94..0b9792b2 100644
--- a/docs/javatool/monitor/zipkin.md
+++ b/docs/javatool/monitor/zipkin.md
@@ -14,7 +14,7 @@ Zipkin 基于 Google Dapper 的论文设计而来,由 Twitter 公司开发贡
Zipkin UI 还提供了一个依赖关系图,该关系图显示了每个应用程序中跟踪了多少个请求。这对于识别聚合行为(包括错误路径或对不赞成使用的服务的调用)很有帮助。
-![Zipkin UI](http://dunwu.test.upcdn.net/snap/20200211161706.png)
+![Zipkin UI](https://raw.githubusercontent.com/dunwu/images/dev/snap/20200211161706.png)
### 多平台
@@ -32,7 +32,7 @@ Zipkin 服务器捆绑了用于采集和存储数据的扩展。
数据以 json 形式存储,可以参考:[Zipkin 官方的 Swagger API](https://zipkin.io/zipkin-api/#/default/post_spans)
-![Zipkin Swagger API](http://dunwu.test.upcdn.net/snap/20200211162055.png)
+![Zipkin Swagger API](https://raw.githubusercontent.com/dunwu/images/dev/snap/20200211162055.png)
## 二、Zipkin 安装
@@ -78,7 +78,7 @@ ZipKin 可以分为两部分,
架构如下:
-![Zipkin 架构](http://dunwu.test.upcdn.net/snap/20200211155836.png)
+![Zipkin 架构](https://raw.githubusercontent.com/dunwu/images/dev/snap/20200211155836.png)
### Zipkin Server
diff --git a/docs/package.json b/docs/package.json
index a5efdc14..fec8bc57 100644
--- a/docs/package.json
+++ b/docs/package.json
@@ -12,16 +12,19 @@
"view-info": "vuepress view-info ./ --temp .temp"
},
"devDependencies": {
- "@vuepress/plugin-active-header-links": "^1.5.2",
- "@vuepress/plugin-back-to-top": "^1.5.0",
- "@vuepress/plugin-medium-zoom": "^1.5.0",
- "@vuepress/plugin-pwa": "^1.5.0",
- "@vuepress/theme-vue": "^1.5.0",
- "markdownlint-cli": "^0.23.1",
+ "@vuepress/plugin-active-header-links": "^1.8.2",
+ "@vuepress/plugin-back-to-top": "^1.8.2",
+ "@vuepress/plugin-medium-zoom": "^1.8.2",
+ "@vuepress/plugin-pwa": "^1.8.2",
+ "@vuepress/theme-vue": "^1.8.2",
+ "markdownlint-cli": "^0.25.0",
"markdownlint-rule-emphasis-style": "^1.0.1",
"rimraf": "^3.0.1",
"vue-toasted": "^1.1.25",
- "vuepress": "^1.5.0",
+ "vuepress": "^1.8.2",
"vuepress-plugin-flowchart": "^1.4.2"
+ },
+ "dependencies": {
+ "moment": "^2.29.1"
}
}