2022年1月25日

摘要: 最近使用javafx制作小工具,很多时候我们可能需要再表格中进行点击操作,javafx目前只能自定义事件 老规矩,直接上代码 //自定义控制器 class TableRowControl extends TableRow<XXXTableColumn> { public TableRowContro 阅读全文
posted @ 2022-01-25 15:36 搬砖小将 阅读(709) 评论(0) 推荐(0) 编辑

2022年1月24日

摘要: 软链接 现在大家都用在docker,之后会继续补充。 最早大家都使用nohup nohup java -jar web-0.0.1-SNAPSHOT.jar -server -Xms1g -Xmx1g -XX:+UseG1GC -XX:MaxGCPauseMillis=200 -XX:+Unlock 阅读全文
posted @ 2022-01-24 21:26 搬砖小将 阅读(307) 评论(0) 推荐(0) 编辑
 
摘要: java poi向excel中追加内容 .xlsx使用HSSFWorkbook .xls使用XSSFWorkbook 导入 import org.apache.poi.hssf.usermodel.HSSFRow; import org.apache.poi.hssf.usermodel.HSSFS 阅读全文
posted @ 2022-01-24 16:31 搬砖小将 阅读(873) 评论(0) 推荐(0) 编辑

2022年1月19日

摘要: nginx版本太低,需要升级。以前也搞过联网的,这次都整理一下 一、联网 #安装依赖包 sudo yum -y install gcc zlib zlib-devel pcre-devel openssl openssl-devel #下载tar包 cd /usr/local/ #下载nginx t 阅读全文
posted @ 2022-01-19 20:15 搬砖小将 阅读(644) 评论(0) 推荐(0) 编辑

2021年12月23日

摘要: java swing 本地目录或文件选择 直接上代码 JButton fileChoose = new JButton("选择文件或目录"); fileChoose.addActionListener(new ActionListener() { public void actionPerforme 阅读全文
posted @ 2021-12-23 13:50 搬砖小将 阅读(811) 评论(0) 推荐(0) 编辑
 
摘要: 关于swing窗口问题 叉关闭子窗口并关闭所有窗口 JFrame f_2 = new JFrame("XXX"); f_2.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); 叉关闭子窗口不关闭其他窗口 JFrame f_2 = new JFrame("X 阅读全文
posted @ 2021-12-23 13:47 搬砖小将 阅读(417) 评论(0) 推荐(0) 编辑

2021年12月16日

摘要: //获取本机桌面目录File desktopDir = FileSystemView.getFileSystemView().getHomeDirectory();String desktopPath = desktopDir.getAbsolutePath(); 阅读全文
posted @ 2021-12-16 15:51 搬砖小将 阅读(108) 评论(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 搬砖小将 阅读(414) 评论(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 搬砖小将 阅读(2773) 评论(0) 推荐(0) 编辑