2021年12月16日

摘要: //获取本机桌面目录File desktopDir = FileSystemView.getFileSystemView().getHomeDirectory();String desktopPath = desktopDir.getAbsolutePath(); 阅读全文
posted @ 2021-12-16 15:51 搬砖小将 阅读(129) 评论(1) 推荐(1)
 
摘要: class path resource [classpath:xxx.docx] cannot be opened because it does not exist 这个报错是文件读取不到。 解决办法: //本地读取: File tmpFile = null; try { tmpFile = Re 阅读全文
posted @ 2021-12-16 15:50 搬砖小将 阅读(487) 评论(0) 推荐(0)
 
摘要: 使用场景:基于.docx模板进行内容写入,内容替换 一、pom导入 <dependency> <groupId>org.apache.poi</groupId> <artifactId>poi</artifactId> <version>4.0.0</version> </dependency> < 阅读全文
posted @ 2021-12-16 14:48 搬砖小将 阅读(4575) 评论(0) 推荐(0)