教程

vue3 watch

在 Vue 3 中,watch 的用法有所改变。以下是将 watch 转换为 Vue 3 的写法: const updateButtonSize = () => { const actions = actions.value; if (actions.length > 0) { let limitMovePositi...

java List转换为字符串的几种方法

在 Java 中,将 List 转换为字符串有几种方法,以下是其中几种常见的方法: 使用循环和字符串拼接: java List list = Arrays.asList("apple", "banana", "orange"); StringBuilder sb = new StringBuild...

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....