上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 49 下一页
摘要: 在http 同级添加红色部分即可 #tcp配置 stream { server { listen 9101; proxy_pass 127.0.0.1:8080; } }.........http{ ......} stream的端口不可与http共用,需要单独占用一个新的 阅读全文
posted @ 2023-04-24 19:41 岑惜 阅读(44) 评论(0) 推荐(0)
摘要: 1. 背景 在idea Terminal 栏执行 go build xxx.go 打包的是exe 文件 交叉编译 配置 SET CGO_ENABLE=0 SET GOOS=linux SET GOARCH=arm64go build xxx.go 发现编译文件仍然是exe 2.解决 需要切换为cmd 阅读全文
posted @ 2023-04-24 13:48 岑惜 阅读(170) 评论(0) 推荐(0)
摘要: 1.背景 golang是跨平台语言,但是打包的二进制文件不适配各个环境 怎么办? 可以交叉编译 win系统打包为exe执行文件, linux则是无后缀的执行文件,但是linux的cpu架构不同,二进制文件也是不同的,因此打包时需要指定cpu架构 2.解决 linux执行指令 lscpu 查看cpu信 阅读全文
posted @ 2023-04-24 13:29 岑惜 阅读(595) 评论(0) 推荐(0)
摘要: echo y | pkg install golang 配置go mod 代理 export GOPROXY="https://goproxy.io" 检查设置有没有生效 go env 阅读全文
posted @ 2023-04-24 13:09 岑惜 阅读(603) 评论(0) 推荐(0)
摘要: <view wx:else style="height: 80vh;" class="viewVcenter"> <div style="width: 100%;text-align: center;"> <p> 哈哈哈哈666 </p> </div> .viewVcenter{ align-ite 阅读全文
posted @ 2023-04-21 16:46 岑惜 阅读(75) 评论(0) 推荐(0)
摘要: /** * 缩放新的图片 */ public static String scaleImg(String waterLogoPath, String waterLogoPathTmp, String suffix, ImgWH wh) { try { suffix = suffix.replace( 阅读全文
posted @ 2023-04-20 13:11 岑惜 阅读(40) 评论(0) 推荐(0)
摘要: 导入依赖 <dependency> <groupId>com.drewnoakes</groupId> <artifactId>metadata-extractor</artifactId> <version>2.15.0</version> </dependency> 获取图片宽高 public 阅读全文
posted @ 2023-04-20 13:06 岑惜 阅读(539) 评论(0) 推荐(0)
摘要: 1.获取系统的临时文件夹地址 System.getProperty("java.io.tmpdir") 打印结果 C:\Users\cenxi\AppData\Local\Temp\ 2.获取java项目的根文件夹上一级文件夹地址 System.getProperty("user.dir") 打印结 阅读全文
posted @ 2023-04-20 10:47 岑惜 阅读(117) 评论(0) 推荐(0)
摘要: pb.command不可使用一个长字符串指令command,需要把每个指令参数分开,放入集合中 Process process = null; ProcessBuilder pb = new ProcessBuilder(); //指令太长会导致无法找到文件,被视为一个完整的指令,应该每个空格都是为 阅读全文
posted @ 2023-04-19 18:59 岑惜 阅读(362) 评论(0) 推荐(0)
摘要: 方法1 try { Process process = Runtime.getRuntime().exec(command); int resultCode = process.waitFor(); System.out.println(resultCode); } catch (Exception 阅读全文
posted @ 2023-04-19 18:49 岑惜 阅读(133) 评论(0) 推荐(0)
上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 49 下一页