-
IDEA 调试 Java 多线程代码
版本 基于IDEA Community 2021.1.3。 打开 Threads 标签页 Debug面板中,点击右上角的Layout Settings,勾选Th
-
IDEA 远程 Debug Tomcat
Tomcat 在Tomcat的启动参数中添加如下参数后重启。 -agentlib:jdwp=transport=dt_socket,server=y,suspe
-
Arthas 监控安装成 Windows 服务的 Tomcat
需求 需要使用Arthas监测安装成Windows Services的Tomcat服务。 java -jar 命令 java --add-opens=jdk.a
-
Arthas 启动报 ClassNotFoundException com.sun.tools.attach.VirtualMachine
问题 使用Java11命令行方式java -jar启动Arthas,报错找不到VirtualMachine,具体信息如下: PS C:\arthas-bin&g
-
Go 解决 HTTP 请求跨域问题
解决 请求头中添加Access-Control-Allow-Origin和Access-Control-Allow-Headers。 func CustomRe
-
Go 定时任务
周期性任务 每5秒执行一次。 func main() { ticker := time.NewTicker(time.Second * 5) g
2021-07-20, Views: 2808 , Topics: Go
-
Go 数字转字符串
int 类型 使用strconv.Itoa转换。 var age = 18 fmt.Println(strconv.Itoa(age)) int64 类型 使用
2021-07-19, Views: 2434 , Topics: Go
-
Go 加密算法之 sha1
代码 func main() { // 0f9de62fce790f9a083d5c99e95740ceb90c27ed data := []
2021-07-18, Views: 3651 , Topics: Go
-
Go 加密算法之 md5
代码 func main() { arr := md5.Sum([]byte("hello world")) // 乱码 log.Pr
2021-07-18, Views: 2562 , Topics: Go
-
Java 中判断奇偶性的方法
%2 与2取模。 System.out.println(0%2); // 0 System.out.println(1%2); // 1 System.out.
2021-07-16, Views: 3040 , Topics: Java
-
wget ERROR The certificate was signed using an insecure algorithm
错误信息 --2021-05-27 13:16:43-- https://www.php.net/distributions/php-7.3.24.tar.g
2021-07-16, Views: 3315 , Topics: wget
-
javac 错误: 编码 GBK 的不可映射字符
原因 Windows平台下PowerShell默认的编码为GBK。 解决 指定编码格式为UTF-8。 javac -encoding UTF-8 Test.ja
-
AWS 更换 SSH 登陆密钥对
生成公钥 根据pem生成 ssh-keygen -f test.pem -y 输出 ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQ
-
SpringMVC 中的 redirect 和 forward 区别
代码 @Controller public class RedirectForwardController { @GetMapping("/test1
-
Windows 使用 Wireshark 抓取本地数据包
说明 Wireshark需安装Npcap后,才能抓取本地数据包。 安装 Npcap Npcap 1.20下载地址:https://nmap.org/npcap/
-
只有一部分接口跨域问题
现象 已经配置了Nginx,使其拦截OPTIONS请求,解决跨域问题。 大部分接口可以跨域访问了,但有一个接口还是提示跨域请求。 排查 查看Nginx的acce
-
IDEA jclasslib 插件改为英文
原因 jclasslib插件做了本地化功能,因此在中文电脑中显示为中文。 修改 点击Help,点击Edit Custom Vm Options…,增加以下配置后
-
SQL Server 修改计算机名后修改服务名
版本 基于SQL Server 2012。 说明 修改计算机名,使用SQL Server Management Studio登录时服务名就要改为新的计算机名。
2021-07-09, Views: 2701 , Topics: SQL Server
-
Test.class found in top-level directory (unnamed package not allowed in module)
具体错误 Error occurred during initialization of boot layer java.lang.module.FindExc
2021-07-08, Views: 5577 , Topics: Java
-
IDEA java: package is not visible
错误信息 java: package jdk.nashorn.internal.runtime.regexp.joni.constants is not vis