maven打jar包时配置文件打到包里并读取 有需求需要用jar包运行程序,但是在正常时候配置文件还可以找到,在jar包中则不能找到后来发现原因,配置文件要放到resources下 ,这样maven打包时才会把jar包打进去目录结构:导入配置文件代码:... 个人总结 2024-07-25 34 点赞 0 评论 51 浏览
nginx 404 跳转到自定义的页面 1. 自己写了一个error.html页面2. 更改nginx.conf在http定义区域加入: fastcgi_intercept_errors on;3. 更改nginx.conf中在server 区域加入: error_page 404 /404.html 4. 重启ngnix另外,有一个8000端口的错误页面也要跳转到80的erro Other 2023-12-13 49 点赞 0 评论 74 浏览
【HDU - 2717】【POJ - 3278】Catch That Cow (经典bfs,类似dp) 题干:Farmer John has been informed of the location of a fugitive cow and wants to catch her immediately. He starts at a point N (0 ≤ N ≤ 100,000) on a number line and the cow is at a point K (0 ≤ K ≤ ... bfs 2023-09-24 48 点赞 0 评论 72 浏览
图解JVM 对象是否存活 (三) finalize方法 解析一. finalize的作用finalize()是Object的protected方法,子类可以覆盖该方法以实现资源清理工作,GC在回收对象之前调用该方法。finalize()与C++中的析构函数不是对应的。C++中的析构函数调用的时机是确定的(对象离开作用域或delete掉),但Java中的finalize的调用具有不确定性不建议用finalize方法完成“非内存资源”的清理工作,... 图解JVM 2023-08-30 57 点赞 0 评论 86 浏览
浅谈python socket函数中,send与sendall的区别与使用方法 在python socket编程中,有两个发送TCP的函数,send()与sendall(),区别如下: socket send(string[, flags]) python编程 2022-04-08 106 点赞 1 评论 160 浏览