golang 自己重启自己

如果你想要实现在不同时存在两个程序实例的情况下重启程序自身,可以使用以下方法: package main import ( "fmt" "os" "os/exec" "syscall" ) func main() { fmt.Printl...

CentOS7防火墙

好久不用忘记了,特此记录下 1.查看防火墙状态 systemctl status firewalld 2.开启防火墙 systemctl start firewalld 3.关闭防火墙 systemctl stop firewalld 4.防火墙开启5432端口 firewa...

springboot与mongodb之事务管理

一、事务说明 1、在4.0版本中,MongoDB支持副本集上的多文档事务,分片集群是不支持事务的,会报以下异常 Transactions are not supported by the MongoDB cluster to which this client is connected 2、...

springboot与mongodb整合

一、添加maven依赖 org.springframework.boot spring-boot-starter-data-mongodb 2.6.7 二、配置properties文件 1、mongodb无密码方式: spring.data.mongodb.uri=mongodb://192.168.78....

Python:将私密信息隐藏到图像中

隐写术是一门关于信息隐藏的技巧与科学,不让除预期的接收者之外的任何人知晓信息的传递事件或者信息的内容。在 Python 中,我们可以使用图像隐写术,将私密信息写入到图像。 实现图像隐写术,需要安装 pillow...