HelloWood

Kubenetes 部署 Dashboard

Kubernetes
Kubenetes 部署 Dashboard Kubenestes Dashboard 是提供 Kubernetes信息可视化的 Web 插件 部署1kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboar ...
Read more

Spring Cloud 使用 Kubernetes 作为配置中心 - 使用加密配置

Kubernetes SpringCloud
Spring Cloud 使用 Kubernetes 作为配置中心 - 使用加密配置 Spring Cloud 可以通过使用 Kubernetes 的 Secrets 作为加密配置 创建应用添加依赖 build.gradle 123dependencies { implemen ...
Read more

Spring Cloud 使用 Kubernetes 作为配置中心

Kubernetes SpringCloud
Spring Cloud 使用 Kubernetes 作为配置中心 Spring Cloud 可以通过使用 Kubernetes 的 ConfigMap 作为配置中心,实现配置的拉取和刷新 创建应用添加依赖 build.gradle 123dependencies { imp ...
Read more

Spring Cloud 使用 Kubernetes 作为注册中心

Kubernetes SpringCloud
Spring Cloud 使用 Kubernetes 作为注册中心 Spring Cloud 可以使用 Kubernetes 作为注册中心,实现服务注册和发现 创建两个应用,Consumer 和 Provider,Provider 提供一个 REST 接口供 Consumer 调用 Pro ...
Read more

Kubenetes 中使用 Traefik 作为 Ingress 转发流量

Kubernetes Helm Traefik Ingress
Kubenetes 中使用 Traefik 作为 Ingress 转发流量Ingress 就是 Kubernetes 机器外访问集群的入口,将请求的 URL 转发到不同的 Service 上,相当于 Nginx 等代理服务器路由信息由 Ingress Controller 提供,Ingres ...
Read more

Kubernetes 中使用 Helm 部署应用

Kubernetes Helm
Kubernetes 中使用 Helm 部署应用创建应用创建一个简单的应用,提供一个 REST 接口;使用 Golang 编写,然后将镜像 push 到 Docker Hub go.mod 123module github.com/helloworlde/restgo 1.12 ma ...
Read more

Kubernetes 中安装 Helm

Kubernetes Helm
Kubernetes 中安装 Helm Helm 是构建于 Kubernetes 之上的包管理器,可以理解为 yum,homebrew 或者 pip,用于简化包分发,安装,版本管理等操作流程 基本概念 Chart chart 就是 Helm 所管理的包,包含着一个应用要部署至 Kuber ...
Read more

Go 开发命令行工具-OSS文件上传

Go Cobra
使用 Go 开发命令行工具-OSS 文件上 使用 Go 语言开发一个命令行工具,用于向 OSS 文件上传文件命令行工具有很多框架,选择使用 Cobra 准备 安装 Cobra 1go get -u github.com/spf13/cobra/cobra 初始化项目 创建项目 123 ...
Read more

Spring Boot 中使用Spring Cloud Stream

SpringBoot Java Stream
Spring Boot 中使用Spring Cloud Stream Spring Cloud Stream 用于构建高可扩展的使用消息系统连接的事件驱动服务的框架 Binder: 负责提供与外部消息系统集成的组件 Binding: 提供外部消息系统与应用之间桥接的生产者和消费者 Mes ...
Read more

Spring Boot 中使用 WebSocket

SpringBoot Java WebSocket
Spring Boot 中使用 WebSocket WebSocket 是一种长连接技术,可以实现服务端和客户端的双向通信,服务端可以主动推送信息给客户端 构建应用添加依赖 build.gradle 12345678910dependencies { compile(& ...
Read more

Spring Boot 中自定义异常处理

SpringBoot Java Exception
Spring Boot 中自定义异常处理 项目地址https://github.com/helloworlde/SpringBootCollection/tree/master/SpringBoot-Exception Spring Boot 中提供了默认的异常处理,但是对于应用来说,这 ...
Read more

Spring Boot 中自定义接口返回格式

SpringBoot Java
Spring Boot 中自定义接口返回格式 Spring Boot 项目中提供的 REST 接口往往需要封装状态或者其他附加的内容返回给客户端,如果每个接口都用一些工具类来处理很繁琐,会增加很多重复代码,还有可能漏掉导致客户端无法解析;用切面也可以实现,但是 SpringBoot 提供了处 ...
Read more

Ubuntu/Docker 替换软件源

Docker Ubuntu
Ubuntu/Docker 替换软件源Ubuntu使用 sed 命令1sudo sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apt/sources.list/ 手动修改12345cd /etc/ ...
Read more

Google Cloud Run 部署 Knative Serverless 应用

Serverless Go Google Cloud Run
Google Cloud Run 部署Knative Serverless 应用 Google Cloud Run 是 Google 最近推出的基于容器运行的支持 Serverless 应用的服务,是 Knative 的Google Cloud 托管版本;和其他的 Serverless 如G ...
Read more

AWS Lambda 部署 SpringBoot 应用

Serverless SpringBoot Lambda AWS
AWS Lambda 部署 SpringBoot 应用配置 AWS CLI 和 SeverlessAWS CLI 和 Serverless 都可以用于部署 Serverless 应用 获取密钥 登录 AWS, 在服务中搜索并选择 IAM,之后选择用户,添加用户 输入用户名,选择编程访 ...
Read more

MyBatis 查询错误:java.lang.IllegalArgumentException: invalid comparison: java.util.Date and java.lang.String

SpringBoot Java MyBatis
MyBatis 查询错误:java.lang.IllegalArgumentException: invalid comparison: java.util.Date and java.lang.String项目中用 MyBatis Plus 替换了 MyBatis,原来的 MyBatis版 ...
Read more

微服务网关 Traefik - Docker Swarm 使用

Docker Traefix
微服务网关 Traefik - Docker Swarm 使用traefik 是一个用 Go 开发的适用于微服务的反向代理和负载均衡的网关;可以自动发现并代理服务,可以用 Kubernetes 或 Docker Swarm 等方式,支持使用 Eureka,Consul,Etcd,ZooKee ...
Read more

GraphQL Spring Boot 使用

SpringBoot GraphQL
GraphQL Spring Boot 使用项目地址 https://github.com/helloworlde/spring-boot-graphql-demo 使用 SpringBoot 和 GraphQL 创建一个最简单的增删改查接口应用,使用 MongoDB 存储数据 创建应用 ...
Read more

MySQL 中关于gap lock / next-key lock 的一个问题

MySQL
MySQL 中关于gap lock / next-key lock 的一个问题 在学习 MySQL 的过程中遇到的一个关于锁的问题,包含多个 MySQL 相关的知识;相关资料在文章末尾 问题描述 表初始化 1234567891011121314CREATE TABLE z ( id I ...
Read more

SpringBoot 使用 MySQL保存emoji 表情

SpringBoot MySQL
SpringBoot 使用 MySQL保存emoji 表情 在使用 SpringBoot 开发的应用中,有表单提交的内容中含有 emoji 表情,导致保存失败;这是因为MySQL 默认的 utf8 长度为3位,emoji 表情有4位 更改表的字符集为utf8mb4 1ALTER TAB ...
Read more
Prev Next