03 2022 档案

摘要:防止resolv.conf被修改,删除 chattr +i /etc/resolv.conf 让resolv.conf只能被追加 chattr +a /etc/resolv.conf 查看resolv.conf的属性 lsattr /etc/resolv.conf 得到的结果为 i /etc/res 阅读全文
posted @ 2022-03-15 09:07 bert_qin 阅读(468) 评论(0) 推荐(0)
摘要:public static boolean writeObject(String filePath, Object object){ try{ File file = new File(filePath); file.createNewFile();//noly create when the fi 阅读全文
posted @ 2022-03-14 23:09 bert_qin 阅读(1322) 评论(0) 推荐(0)
摘要:1. 嵌套打开的流只需关闭最后打开的流,先打开的会自动关闭; 2. 打开的流可以多次关闭不会出错; 3. 后面尝试打开流时可能会发生异常,此时要考虑关闭前面已经打开的流。 下面是一种可行的方法: public static Object read(String filePath){ File fil 阅读全文
posted @ 2022-03-14 21:11 bert_qin 阅读(1268) 评论(0) 推荐(0)
摘要:MANIFEST.MF的路径要设置为main\resources,不是默认的main\java,否则找不main方法 阅读全文
posted @ 2022-03-09 15:07 bert_qin 阅读(333) 评论(0) 推荐(0)