Hexo 中有两种形式的插件:脚本(Scripts)、插件(Packages)。脚本及插件具体编写、发布流程请查看官方文档Hexo 插件。本文仅总结 hexo 插件编写。
创建自己的 spring-boot-starter
在系统架构中,可以将通用业务和公共组件,抽取出来,做成一个 Spring Boot Starter 以便于所有系统使用
Spring Boot Starter 特性
- 提供统一 dependency 版本管理。导入 starter 即可自动引入相关 library 或者中间件,并且保证各 dependency 之间不冲突
- 向 Spring 容器中自动注入所需要的 Bean,并完成对应配置。依赖 Spring Boot autoconfigure 模块
- 提供 properties 外部配置的能力,方便用户引入 starter 后,根据情况配置 starter 配置信息
自定义一个最简洁的 spring boot starter
基本信息
- artifactId 命名
官方包 artifactId 命名格式为:spring-boot-starter-{name}
自定义 starter 包 artifactId 官方推荐命名方式:{name}-spring-boot-starter
Git 常见问题处理
常见问题处理
Git 克隆仓库异常
- 异常情况
1
2
3
4
5
6
7
8
9git clone https://github.com/LLK/scratch-gui.git
Cloning into 'scratch-gui'...
remote: Enumerating objects: 42, done.
remote: Counting objects: 100% (42/42), done.
remote: Compressing objects: 100% (41/41), done.
error: RPC failed; curl 18 transfer closed with outstanding read data remaining
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed
SSH 配置管理
SSH 配置
- 生成 ssh key, 开启 ssh-agent
1
2
3
4# 生成 ssh key
ssh-keygen -t rsa -b 4096 -C "[email protected]"
# 开启 ssh-agent
eval "$(ssh-agent -s)"
Dokku 详解
Dokku 安装
Github: https://github.com/dokku/dokku
Document: http://dokku.viewdocs.io/dokku/getting-started/installation/
1 | # 脚本下载 |
Ubuntu 日常使用
制作 U 盘安装盘
制作工具: Rufus
https://tutorials.ubuntu.com/tutorial/tutorial-create-a-usb-stick-on-windows#6
Ubuntu 设置(基于16.04)
1 | # 设置 root 密码, 启用 root 用户 |