摘要: tar -c: 建立压缩档案-x:解压-t:查看内容-r:向压缩归档文件末尾追加文件-u:更新原压缩包中的文件 这五个是独立的命令,压缩解压都要用到其中一个,可以和别的命令连用但只能用其中一个。下面的参数是根据需要在压缩或解压档案时可选的。 -z:有gzip属性的-j:有bz2属性的-Z:有comp 阅读全文
posted @ 2021-03-07 19:20 790021521 阅读(237) 评论(0) 推荐(0) 编辑
摘要: 在JDK1.8中,Collection以及其子类新加入了removeIf方法,作用是按照一定规则过滤集合中的元素。这里给读者展示removeIf的用法。 首先设想一个场景,你是公司某个岗位的HR,收到了大量的简历,为了节约时间,现需按照一点规则过滤一下这些简历。比如这个岗位是低端岗位,只招30岁以下 阅读全文
posted @ 2020-11-30 10:57 790021521 阅读(134) 评论(0) 推荐(0) 编辑
摘要: @Configuration //1.主要用于标记配置类,兼备Component的效果。@EnableScheduling // 2.开启定时任务public class OrderCancelTask { Logger logger = LoggerFactory.getLogger(OrderC 阅读全文
posted @ 2020-11-24 10:38 790021521 阅读(949) 评论(0) 推荐(0) 编辑
摘要: @PostMapping("/getTime")public ResponseData getTime() throws IOException { String webUrl = "http://www.baidu.com"; URL url=new URL(webUrl); URLConnect 阅读全文
posted @ 2020-11-24 10:04 790021521 阅读(302) 评论(0) 推荐(0) 编辑
摘要: 设置模板 /** *功能:导出xxx * *@param targetFilePath 目标路径 *@param templatePath 模板路径 *@param map 数据 *return File *throws IOException */ public File exportWord(S 阅读全文
posted @ 2020-09-16 16:43 790021521 阅读(400) 评论(0) 推荐(0) 编辑
摘要: Excel里面单元格是日期的会解析出来数字,比如2024年6月10(2024-06-10)会解析为45453。 解决方法一: Excel单元格格式设置为文本格式。解决方法二: 使用代码处理,把解析出来的45453转换为2024-06-10。 public static String ExcelDou 阅读全文
posted @ 2020-09-02 17:29 790021521 阅读(764) 评论(0) 推荐(0) 编辑
摘要: //前台JSON数据传到后台一般以int和String类型或者其他类型可以自动转化 但是如果遇到了list属性或者对象属性那么就会产生此问题。 //如: public class CiTiaoDuanLuoTLVo{ private integer id; private String neiRon 阅读全文
posted @ 2020-07-22 16:58 790021521 阅读(241) 评论(0) 推荐(0) 编辑
摘要: 一: Witelist addTogs = new Witelist(); String text = Jsoup.clean(bodyHtml,addTogs);//bodyHtml是带html标签的字符串。 二: String text = Jsoup.parse(bodyHtml).text( 阅读全文
posted @ 2020-07-15 11:17 790021521 阅读(869) 评论(0) 推荐(0) 编辑
摘要: 一:导入aspose.words.jar 二:在word里要导出字段的位置,用书签标记,给一个key。将word放入需要获取模板的位置。 三: /** *功能:导出xxx * *@param targetFilePath 目标路径 *@param templatePath 模板路径 *@param 阅读全文
posted @ 2020-07-13 16:13 790021521 阅读(536) 评论(0) 推荐(0) 编辑
摘要: public Map getWeekDate (){ Map map = new HashMap(); Date date = new Date(); Calendar cal = Calendar.getInstance(); int dayWeek = cal.get(Calendar.DAY_ 阅读全文
posted @ 2020-07-02 15:56 790021521 阅读(703) 评论(0) 推荐(0) 编辑