芳華Youthred

Just writing

在Java通配符匹配任意字符串

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 public class MatchUtil { /** * 通配符匹配 * * @param input 待匹配字符串 * @param p...

xargs+rsync并行断点续传自动增量同步

rsync原生不支持多线程 rsync可以被注册为systemctl服务,但本篇不做讨论,代码越简单越好 直接贴代码 1 2 3 4 5 6 7 8 9 10 11 12 13 # 本地 find /local_path -type f -print0 | xargs -0 -I% -P5 rsync -avP % /local_path2 # 远程 find /local_path...

ApacheMime4j解析.eml

所需依赖 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 <dependency> <groupId>cn.hutool</groupId> <artifactId>hutool-all</artifactI...

Springboot Servlet 工具

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 package spring.util; import org.springframework.web.context.request.RequestAttributes; import org.springframework.web.context.requ...

Github PUSH 443 设置代理

Git上传push报错:Failed to connect to github.com port 443 after 21097 ms: Timed out 如果使用了代理 查看代理IP和端口(代理软件或者 WINDOWS 网络和Internet - 代理 - 手动设置代理) 1 2 git config --global http.proxy http://<ip>:&l...

Springboot自定义URL接口权限拦截管理

// todo

JSch多层跳板机执行远程命令

仿照 JSch官网JumpHosts示例代码 编写工具类 POM dependencies 需要注意的是,至本片文章编写之日,JSch 版本 0.1.53 及以下都已发现 漏洞 。最新 0.1.55 无漏洞。 1 2 3 4 5 6 7 8 9 10 11 12 13 <dependency> <groupId>org.apache.comm...

SpringCloudGateway+Nacos+OAuth2

POM 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 ...

使事务注解@Transactional和MybatisPlus的@DS多数据源切换同时生效

之前做项目的时候使用MyBatisPlus的多数据源dynamic-datasource-spring-boot-starter,发现无法使事务@Transactional和多数据源@DS注解同时生效。 查阅文档后得知须在事务注解上指定事务传播方式: 1 2 3 4 5 // org.springframework.transaction.annotation.Transactional...

FilesPaths操作大文本文件

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69...