SpringCloud Tutorial 4, the usage of Spring Cloud Config;SpringCloud系列教程4,Spring Cloud Config的使用

显然,在分布式系统中,为了方便修改程序的属性,我们需要一个配置中心,Spring Cloud提供了一个解决方案——Spring Cloud Config.
Obviously, in distributed systems, we need a config center to change the properties easily. Spring Cloud provides a solution, Spring Cloud Config.
Spring Cloud Config包含两个部分,服务端和客户端.
Spring Cloud Config has two parts, th[……]

Read more

SpringCloud Tutorial 1,Eureka Server;SpringCloud系列教程1,Eureka Server

Spring Cloud是一个基于Springboot项目开发的,它为开发者快速开发分布式系统提供了一系列通用的工具。
Spring Cloud is built on Springboot, and it provides tools for the common patterns in distributed systems.
Eureka Server是Spring Cloud推荐的服务注册中心,本文介绍Eureka Server的搭建。
Eureka Server is the recommended Service Registration. This[……]

Read more

SpringCloud Tutorial 5, the usage of Spring Cloud Gateway;SpringCloud系列教程5,Spring Cloud Gateway的使用

显然,在分布式系统中,为了将业务暴露给终端用户,同时平衡服务器压力,我们需要一个服务网关,Spring Cloud提供了一个解决方案—— Spring Cloud Gateway.
Obviously, in distributed systems, we need a gateway to expose services to terminal users and balance the pressure of the back-end servers. Spring Cloud provides a solution, Spring Cloud Gateway.
首先,新建一个子模[……]

Read more

VUE的SSR部署–deploy SSR of VUE

官方推荐使用这两个命令完成服务端渲染
the official recommended commands are the following two,
1
2
nuxt build
nuxt start
官方推荐的 package.json 配置如下:
here is the recommended package.json,
1
2
3
4
5
6
7
8
{
  "name": "my-app",
  "dependencies": {
    "nuxt": "latest"
  },
  "scripts": {
    "dev": "nuxt",
    "build": "nuxt bui[......]<p class="read-more"><a href="https://www.gerrytang.top/?p=10">Read more</a></p>

通过SMTP发送e-mail–Use SMTP to send emails

经常,我们需要在代码中实现发送邮件功能,我们可以通过SMTP连接邮件服务器,然后发送邮件,具体工具类如下:
Usually, we need to send e-mails in projects, we can use SMTP to connect to the mail server to send the email. Here is the tool class
1
2
3
4
5
6
package net.gerry.util;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.mail.*;[......]<p class="read-more"><a href="https://www.gerrytang.top/?p=8">Read more</a></p>

Nginx开启Gzip–Open Gzip in Nginx

为了节约流量,我们可以在Nginx上配置如下,
To save the flow, we can configure the Nginx like this,
1
2
3
gzip on;#开启Gzip--open the Gzip
gzip_min_length 1k;#1k以上开启Gzip--only open the Gzip to the files whose size are above 1k
gzip_buffers 4 16k;#每次以原始数据以16k为单位的4倍申请内存--allocate the memory in the size of 4 times of the si[......]<p class="read-more"><a href="https://www.gerrytang.top/?p=6">Read more</a></p>