摘要:方法一(推荐): 1、文件处理 效果图: 说明:列表头部必须加标记如{{wordList}},子项必须是[xx];图片必须是{{@xx}} 所有的标签都是以 {{开始,以}} 结束。 {{template}} 文本 {{@template}} 图片 {{#template}} 表格 {{*templ
阅读全文
摘要:excel模板 方式一(推荐方式二): 部分代码片段 <!--导出导入 excel--> <dependency> <groupId>org.apache.poi</groupId> <artifactId>poi-ooxml</artifactId> <version>3.12</version>
阅读全文
摘要:这篇文章我会简单总结一下我了解的使用线程池的时候应该注意的坑以及一些优秀的实践。拿来即用,美滋滋! 内容概览: Java指南:https://java-family.cn 1、正确声明线程池 线程池必须手动通过 ThreadPoolExecutor 的构造函数来声明,避免使用Executors 类创
阅读全文
摘要:/** * 分批次批量插入 * @throws IOException */ @Test public void testBatchInsertUser() throws IOException { InputStream resourceAsStream = Resources.getResour
阅读全文
摘要:package org.example.a; import java.util.ArrayList; import java.util.List; class Outer{ private int[] data; public Outer(int size) { this.data = new in
阅读全文
摘要:sqlserver批量导出视图 select text from syscomments s1 join sysobjects s2 on s1.id=s2.id where xtype = 'V' sqlserver批量导出存储过程 select text from syscomments s1
阅读全文
摘要:1、导出 @RequestMapping("/export") public void export1(HttpServletResponse response){ List<UserEntity> list = new ArrayList<>(); //传入数据 List<UserEntity>
阅读全文
摘要:1、根据身份证获取出生日期,LocalDateTime /** * 根据身份证获取出生日期 * @param idCard * @return * @throws ParseException */ public static LocalDateTime GetBirthByIdCard(Strin
阅读全文