随笔分类 -  java

摘要:List<String> ips1 = new ArrayList<>(); List<String> ips2 = new ArrayList<>(); File file1 = new File("C:\\Users\\Administrator\\Desktop\\20241224.xlsx" 阅读全文
posted @ 2025-01-14 10:52 我没有出家 阅读(5) 评论(0) 推荐(0) 编辑
摘要:// 获取对象中属性的值 public String getFieldValue(String attrName) throws NoSuchMethodException, InvocationTargetException, IllegalAccessException { // 转驼峰 Str 阅读全文
posted @ 2024-03-21 15:37 我没有出家 阅读(20) 评论(0) 推荐(0) 编辑
摘要:/** * @author: szc * @date: 2023/9/2 22:45 * @version: 1.0 * @description: 从map中获取函数式接口,解决if-else 多个子类问题 */ @Service public class MapToInterface { @Au 阅读全文
posted @ 2023-12-10 20:09 我没有出家 阅读(22) 评论(0) 推荐(0) 编辑
摘要:private String getTimeOutStr(long nowDate, long lastTime) { String str =""; long minute = 1000 * 60 ; long hour = 1000 * 60 * 60 ; long day = 1000 * 6 阅读全文
posted @ 2023-11-10 16:51 我没有出家 阅读(16) 评论(0) 推荐(0) 编辑
摘要:// import java.math.RoundingMode;// import java.text.NumberFormat; double d= 1.345233; //四舍五入 保留两位小数 System.out.println(String.format("%.2f",d)); //不四 阅读全文
posted @ 2022-03-30 22:00 我没有出家 阅读(82) 评论(0) 推荐(0) 编辑
摘要:https://www.e-iceblue.cn/pdf_java_image_shapes/replace-image-with-new-image-in-pdf-in-java.html maven依赖 <repositories> <repository> <id>com.e-iceblue< 阅读全文
posted @ 2021-06-01 17:29 我没有出家 阅读(1117) 评论(0) 推荐(0) 编辑
摘要:public class DbInfoUtil { /** * 根据数据库的连接参数,获取指定表的基本信息:字段名、字段类型、字段注释 * @param driver 数据库连接驱动 * @param url 数据库连接url * @param user 数据库登陆用户名 * @param pwd 阅读全文
posted @ 2021-05-20 10:44 我没有出家 阅读(441) 评论(0) 推荐(0) 编辑
摘要:package com.szc.demo.redis_demo.utils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.redis.core.Redis 阅读全文
posted @ 2021-05-18 18:55 我没有出家 阅读(137) 评论(0) 推荐(0) 编辑
摘要:/** * @author szc * @date 2021/4/21 - 16:42 */ public class test4 { public static void main(String[] args) throws IOException { String strUrl = "https 阅读全文
posted @ 2021-04-21 16:52 我没有出家 阅读(745) 评论(0) 推荐(0) 编辑
摘要:来自: https://blog.csdn.net/Sakuraaaaaaa/article/details/107280162 HttpsUtil 工具类 import org.apache.http.config.Registry; import org.apache.http.config.R 阅读全文
posted @ 2021-04-21 09:56 我没有出家 阅读(539) 评论(0) 推荐(0) 编辑
摘要:import net.sourceforge.pinyin4j.PinyinHelper; import net.sourceforge.pinyin4j.format.HanyuPinyinCaseType; import net.sourceforge.pinyin4j.format.Hanyu 阅读全文
posted @ 2021-03-31 13:08 我没有出家 阅读(95) 评论(0) 推荐(0) 编辑
摘要:<!-- 判断文件编码格式 --> <dependency> <groupId>org.apache.any23</groupId> <artifactId>apache-any23-encoding</artifactId> <version>1.1</version> </dependency> 阅读全文
posted @ 2021-03-31 10:06 我没有出家 阅读(150) 评论(0) 推荐(0) 编辑
摘要:import net.sourceforge.pinyin4j.PinyinHelper; import net.sourceforge.pinyin4j.format.HanyuPinyinCaseType; import net.sourceforge.pinyin4j.format.Hanyu 阅读全文
posted @ 2021-03-30 15:48 我没有出家 阅读(46) 评论(0) 推荐(0) 编辑
摘要:https://www.cnblogs.com/menmenz/p/11649613.html 阅读全文
posted @ 2021-02-01 14:32 我没有出家 阅读(25) 评论(0) 推荐(0) 编辑
摘要:@ResponseBody @RequestMapping("/szctest2") public void zip(HttpServletResponse response) throws Exception { String sourceFileName = "D:\\test"; //要压缩的 阅读全文
posted @ 2021-01-28 16:54 我没有出家 阅读(1589) 评论(0) 推荐(0) 编辑
摘要:@ResponseBody @RequestMapping("/szctest1") public void zip1(HttpServletResponse response,HttpServletRequest request) throws IOException { String path 阅读全文
posted @ 2021-01-28 16:34 我没有出家 阅读(226) 评论(0) 推荐(0) 编辑
摘要:package com.ruoyi.web.controller.test; import java.io.BufferedInputStream; import java.io.BufferedOutputStream; import java.io.File; import java.io.Fi 阅读全文
posted @ 2021-01-28 16:32 我没有出家 阅读(301) 评论(0) 推荐(0) 编辑
摘要:package test; import org.apache.poi.ss.usermodel.Cell; import org.apache.poi.ss.usermodel.Row; import org.apache.poi.ss.usermodel.Sheet; import org.ap 阅读全文
posted @ 2021-01-28 10:36 我没有出家 阅读(300) 评论(0) 推荐(0) 编辑
摘要:File file1 = new File("e://异常.txt"); BufferedWriter out = new BufferedWriter(new FileWriter(file1,true)); out.write(file2.getAbsolutePath()); out.newL 阅读全文
posted @ 2021-01-26 17:50 我没有出家 阅读(47) 评论(0) 推荐(0) 编辑
摘要:public void traverseFolder2(String path) { File file = new File(path); if (file.exists()) { File[] files = file.listFiles(); if (null == files || file 阅读全文
posted @ 2021-01-26 17:41 我没有出家 阅读(100) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示