睿虎的博客

建立文章草稿

1
$ hexo new draft <title>

或者

1
$ hexo n draft <title>

本机预览草稿

1
$ hexo S --draft

将草稿发布为正式文章

1
$ hexo P <filename>

或者

1
$ hexo p <filename>

其中 <filename> 为不包含 md 后缀的文章名称,包含会出错。它的原理只是将文章从 source/_drafts 移动到 source/_posts 而已。

若日后想将正式文章转为为草稿,只需手动将文章从 source/_posts 目录移动到 source/_drafts 目录即可。

SpringBoot基础教程

1.SpringBoot快速入门

2.SpringBoot使用Thymeleaf

3.SpringBoot使用MyBatis连接MySQL

4.SpringBoot使用MongoDB

5.SpringBoot使用Redis

SpringBoot干货

1.SpringBoot使用ObjectMapper

2.SpringBoot使用热部署

3.SpringBoot使用Session

Spring Cloud Alibaba基础教程

1.Spring Cloud Alibaba安装NACOS

2.Spring Cloud Alibaba项目创建

3.Spring Cloud Alibaba创建服务提供者

4.Spring Cloud Alibaba创建服务消费者

5.Spring Cloud Alibaba创建服务消费者Feign(负载均衡)

6.Spring Cloud Alibaba添加熔断机制Sentinel

[!NOTE]

本篇内容需要在上一篇的基础上进行。

请找到上一篇的项目代码,本篇在上一篇的源代码上进行编写。

本系列教程目录:https://laisc7301.github.io/blog/2024/01/29/202401290001SpringBoot%E7%B3%BB%E5%88%97%E5%9F%BA%E7%A1%80%E6%95%99%E7%A8%8B/

打开上一个模块的源代码(my-consumer-feign),我们继续进行。

整个项目的文件结构如下图所示:

Read more »

[!NOTE]

本教程是《SpringBoot系列基础教程》之一,教程目录:https://laisc7301.github.io/blog/2024/01/29/202401290001SpringBoot%E7%B3%BB%E5%88%97%E5%9F%BA%E7%A1%80%E6%95%99%E7%A8%8B/

首先先去GitHub下载NACOS:https://github.com/alibaba/nacos/releases

下载后解压,打开cmd并进入bin文件夹,运行命令:startup.cmd -m standalone

然后打开 http://localhost:8848/nacos/index.html

默认账号:nacos
默认密码:nacos

登录后看到下面页面:

搞定!

下一篇:Spring Cloud Alibaba项目创建: https://laisc7301.github.io/blog/2024/01/27/202401270000SpringCloudAlibaba%E9%A1%B9%E7%9B%AE%E5%88%9B%E5%BB%BA/

[!NOTE]

本教程是《SpringBoot系列基础教程》之一,教程目录:https://laisc7301.github.io/blog/2024/01/29/202401290001SpringBoot%E7%B3%BB%E5%88%97%E5%9F%BA%E7%A1%80%E6%95%99%E7%A8%8B/

找到项目的pom.xml文件,向里面添加下面内容:

找到<dependencies>标签向里面添加内容:

1
2
3
4
5
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
</dependency>

找到<plugin>标签向里面添加内容:

1
2
3
4
<!--没有该项配置,热部署不会起作用-->
<configuration>
<fork>true</fork>
</configuration>
0%