会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
GetcharZp
菜到安详
博客园
首页
新随笔
联系
订阅
管理
2022年3月15日
Golang 基于excelize实现Excel表格的解析、导出
摘要: 参考文档: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
阅读(1084)
评论(0)
推荐(0)
2022年3月13日
Golang 通过Image包实现图片处理、二维码生成
摘要: 首先准备一个简单的图片 qrcode.png 了解下几个处理图片的方法 image.Decode() // 得到文件的图片对象 image.NewRGBA() // 创建一个真彩色的图像对象 *RGBA func (p *RGBA) Bounds() Rectangle { return p.Rec
阅读全文
posted @ 2022-03-13 16:26 GetcharZp
阅读(1148)
评论(0)
推荐(0)
2022年2月10日
golang对struct排序的方法
摘要: 方法一:使用 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
阅读(1315)
评论(0)
推荐(0)
2022年2月9日
GRPC的配置,基于Golang的快速入门
摘要: 参考文档:https://www.grpc.io/docs/languages/go/quickstart/ 环境配置 一、安装protobuf编译器 在 https://github.com/protocolbuffers/protobuf/releases 这个网址中根据自己的操作系统下载对应的
阅读全文
posted @ 2022-02-09 22:32 GetcharZp
阅读(159)
评论(0)
推荐(0)
2022年2月8日
怎么实现Docker容器之间通讯
摘要: 参考文档: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
阅读(91)
评论(0)
推荐(0)
2022年1月24日
Golang中通过go-redis操作Redis
摘要: 参考地址: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
阅读(442)
评论(0)
推荐(0)
2022年1月6日
springboot 项目中通过 mybatis-spring-boot-starter 来使用mybatis
摘要: 官方参考文档: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
阅读(559)
评论(0)
推荐(0)
2022年1月5日
SpringBoot 项目中引入Swagger (Springfox)
摘要: 当前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
阅读(347)
评论(0)
推荐(0)
2021年12月31日
使用 io.jsonwebtoken 实现token的生成与解码
摘要: 通过 jsonwebtoken 能够方便的生成token和进行token相关解码,参考文档:https://github.com/jwtk/jjwt#base64 ,详细的操作流程如下所示 导入io.jsonwebtoken依赖: <dependency> <groupId>io.jsonwebto
阅读全文
posted @ 2021-12-31 16:58 GetcharZp
阅读(1689)
评论(0)
推荐(0)
2021年12月28日
spring-boot 使用 spring-boot-starter-mail 发送邮件
摘要: 参考文档 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
阅读(430)
评论(0)
推荐(0)
下一页
公告