加载中
nginx 从源码编译安装

1. 去nginx官网 https://nginx.org/en/download.html 下载 Stable version 版本的, nginx 的历史版本可以在这里下载 https://nginx.org/download 例如: https://nginx.org/download/nginx-1....

CentOS 中将程序设置为系统服务并设置开机启动

例如: 一个 golang 编译好的程序 test, 放在 /opt/test 目录下 1. 在 /opt/test 目录下创建 test-start.sh #!/bin/sh /opt/test/test 2. 在 /opt/test 目录下创建 test-stop.sh #!/bin/sh i...

2024/01/17 16:45
73
Rocky Linux 常用命令

# 列出所有服务 systemctl list-unit-files # 将硬件时钟调整为与目前的系统时钟一致 hwclock --systohc

2023/01/16 22:48
110
使用 openPDF 创建带目录的文档时候, 使用如下方式, 可以保证目录页码准确

public static void main(String[] args) throws Exception { pdfboxTest5(); } private static void pdfboxTest5() throws DocumentException, IOException { File file = new File("E:\\ss...

2022/12/27 15:35
166
解决:[HikariPool-1 housekeeper] but has failed to stop it. This is very likely to create a memory leak

最近在用 SpringBoot 2.7.3 写 demo 的时候发现, 如果请求查询数据库之后, 停止服务时就会报一个警告, 好像说是 HikariPool 资源没有释放 [HikariPool-1 housekeeper] but has failed to sto...

Spring Tools (STS) 的 mybatis 的 mapper 的 xml 文件的代码提示失效

Help --> Eclipse Marketplace 在 Eclipse Marketplace 中安装 Eclipse XML Editors and Tools 完美解决! 另外, 使用 STS 开发 mybatis 相关, 可以选择安装 MyBatipse, 但是安装之后会对 Ma...

2022/06/26 23:27
474
RockyLinux 8 网络设置

1. 配置 ifcfg vim /etc/sysconfig/network-scripts/ifcfg-ens160 2. 使用 nmcli 重新加载网络配置 nmcli c reload nmcli c up ens160......

2022/04/25 16:00
1.7K
Golang 时间处理

golang 时间处理 t := time.Now() fmt.Println("获取秒", t.Unix()) fmt.Println("获取毫秒", t.UnixNano()/1000/1000) fmt.Println("获取微妙", t.UnixNano()/1000) fmt.Println("获取纳秒"...

2022/03/01 11:50
126
缓存穿透, 缓存击穿, 缓存雪崩

缓存穿透 缓存穿透是指请求一个缓存和数据库都不存在的数据值, 导致每次都直接穿透缓存层, 大并发流量全部打到DB数据库层, 造成系统问题 缓存击穿 缓存击穿是指大量请求打到缓存时, 缓存值刚...

2021/11/29 18:27
182
Mac 安装 VMware 之后 NAT 网络设置

1. 修改如下 vim /Library/Preferences/VMware\ Fusion/networking 2. 修改如下 vim /Library/Preferences/VMware\ Fusion/vmnet8/nat.conf......

2021/11/14 18:08
124
Linux 常用命令

# 递归列出目录和文件,大小 ll -hR # 列出文件目录,大小 tree -h

2021/11/13 23:17
90
SpringBoot 引用不同环境的配置文件, 放在外部的配置文件

SpringBoot 项目配置文件可以放在外部 application-prod.properties application-test.properties application-dev.properties 这三种环境, 生产, 测试, 开发 环境的配置文件放在所在服务器的...

2021/10/29 18:29
154
使用带缓冲区的 channel 控制 goroutine 协程的并发量

func cc() { c := make(chan struct{}, 2) // 带缓冲区的channel var wg sync.WaitGroup wg.Add(10) for i := 0; i < 10; i++ { go func(i int) { defer func() { ......

2021/09/14 14:32
204

没有更多内容

加载失败,请刷新页面

返回顶部
顶部