摘要: 参考文档:https://github.com/qax-os/excelize 安装 excelize包 go get github.com/xuri/excelize/v2 创建电子表格 func TestCreateSpreadsheet(t *testing.T) { f := exceliz 阅读全文
posted @ 2022-03-15 23:07 GetcharZp 阅读(806) 评论(0) 推荐(0) 编辑
摘要: 首先准备一个简单的图片 qrcode.png 了解下几个处理图片的方法 image.Decode() // 得到文件的图片对象 image.NewRGBA() // 创建一个真彩色的图像对象 *RGBA func (p *RGBA) Bounds() Rectangle { return p.Rec 阅读全文
posted @ 2022-03-13 16:26 GetcharZp 阅读(913) 评论(0) 推荐(0) 编辑
摘要: 方法一:使用 sort.Slice() 进行排序 package main import ( "fmt" "sort" ) type myStruct struct { name string score int } func main() { s1 := []myStruct{ {name: "m 阅读全文
posted @ 2022-02-10 12:47 GetcharZp 阅读(1158) 评论(0) 推荐(0) 编辑
摘要: 参考文档:https://www.grpc.io/docs/languages/go/quickstart/ 环境配置 一、安装protobuf编译器 在 https://github.com/protocolbuffers/protobuf/releases 这个网址中根据自己的操作系统下载对应的 阅读全文
posted @ 2022-02-09 22:32 GetcharZp 阅读(132) 评论(0) 推荐(0) 编辑
摘要: 参考文档:https://blog.csdn.net/u013355826/article/details/84987233 通过 --link的方式把不同的容器连接起来,如下所示(不推荐): # 启动mysql容器 docker run -d --name test-mysql -e MYSQL_ 阅读全文
posted @ 2022-02-08 19:59 GetcharZp 阅读(81) 评论(0) 推荐(0) 编辑
摘要: 参考地址:https://github.com/go-redis/redis 定义上下文以及连接的相关信息 var ctx = context.Background() var rdb = redis.NewClient(&redis.Options{ Addr: "localhost:6379", 阅读全文
posted @ 2022-01-24 14:23 GetcharZp 阅读(411) 评论(0) 推荐(0) 编辑
摘要: 官方参考文档:http://mybatis.org/spring-boot-starter/mybatis-spring-boot-autoconfigure/ 当前版本说明:SpringBoot : 2.6.2 导入依赖 <dependency> <groupId>org.mybatis.spri 阅读全文
posted @ 2022-01-06 17:52 GetcharZp 阅读(520) 评论(0) 推荐(0) 编辑
摘要: 当前springboot版本为2.6.2 ,springfox-boot-stater版本为3.0.0,本文通过springfox-boot-stater 来实现对springboot接口的管理, 参考文档: 默认访问地址修改的文档说明:http://springfox.github.io/spri 阅读全文
posted @ 2022-01-05 21:31 GetcharZp 阅读(301) 评论(0) 推荐(0) 编辑
摘要: 通过 jsonwebtoken 能够方便的生成token和进行token相关解码,参考文档:https://github.com/jwtk/jjwt#base64 ,详细的操作流程如下所示 导入io.jsonwebtoken依赖: <dependency> <groupId>io.jsonwebto 阅读全文
posted @ 2021-12-31 16:58 GetcharZp 阅读(1084) 评论(0) 推荐(0) 编辑
摘要: 参考文档 https://docs.spring.io/spring-framework/docs/5.3.10/reference/html/integration.html#mail-usage-simple 在pom.xml文件中引入mail启动器 <dependency> <groupId> 阅读全文
posted @ 2021-12-28 18:35 GetcharZp 阅读(397) 评论(0) 推荐(0) 编辑