会员
商店
众包
新闻
博问
闪存
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
我没有出家
博客园
首页
新随笔
联系
管理
订阅
随笔- 61 文章- 0 评论- 0 阅读-
15911
随笔分类 -
java
1
2
下一页
poi 两个excel对比,输出到新的excel
摘要: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)
编辑
java 策略模式解决if-else ,函数式接口解决编写多个子类的问题
摘要:/** * @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)
编辑
double 四舍五入和去尾
摘要:// 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)
编辑
java 操作PDF (spire.pdf)api
摘要: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)
编辑
获得mysql数据库信息 (字段名、字段类型、字段注释)工具类
摘要:public class DbInfoUtil { /** * 根据数据库的连接参数,获取指定表的基本信息:字段名、字段类型、字段注释 * @param driver 数据库连接驱动 * @param url 数据库连接url * @param user 数据库登陆用户名 * @param pwd
阅读全文
posted @
2021-05-20 10:44
我没有出家
阅读(441)
评论(0)
推荐(0)
编辑
redis操作工具类
摘要: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)
编辑
java爬取https上的图片
摘要:/** * @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)
编辑
java实现https爬取
摘要:来自: 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)
编辑
遍历文件夹创表入库csv文件,直接使用
摘要: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)
编辑
zip 通过 response 下载 (多级文件夹压缩)
摘要:@ResponseBody @RequestMapping("/szctest2") public void zip(HttpServletResponse response) throws Exception { String sourceFileName = "D:\\test"; //要压缩的
阅读全文
posted @
2021-01-28 16:54
我没有出家
阅读(1589)
评论(0)
推荐(0)
编辑
zip 通过response 下载,不足 多级目录目录的文件只会压缩到一个文件夹中
摘要:@ResponseBody @RequestMapping("/szctest1") public void zip1(HttpServletResponse response,HttpServletRequest request) throws IOException { String path
阅读全文
posted @
2021-01-28 16:34
我没有出家
阅读(226)
评论(0)
推荐(0)
编辑
zip 文件导出 main(多级目录压缩)
摘要: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)
编辑
poi xls文件导出,分多个sheet
摘要: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)
编辑
向txt中简单写
摘要: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)
编辑
1
2
下一页
公告
昵称:
我没有出家
园龄:
4年5个月
粉丝:
0
关注:
0
+加关注
<
2025年3月
>
日
一
二
三
四
五
六
23
24
25
26
27
28
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
1
2
3
4
5
搜索
常用链接
我的随笔
我的评论
我的参与
最新评论
我的标签
更多链接
随笔分类
git(1)
java(26)
linux(2)
mysql(10)
nginx(1)
oracle(5)
springboot(2)
基础面试(6)
其他(1)
前端(8)
设计模式(1)
锁(1)
随笔档案
2025年1月(1)
2024年11月(1)
2024年4月(2)
2024年3月(4)
2023年12月(2)
2023年11月(1)
2023年8月(5)
2022年3月(4)
2022年2月(1)
2021年11月(1)
2021年6月(2)
2021年5月(5)
2021年4月(7)
2021年3月(4)
2021年2月(3)
2021年1月(11)
2020年12月(5)
2020年9月(2)
阅读排行榜
1. zip 通过 response 下载 (多级文件夹压缩)(1589)
2. 判断值是否在list中(1251)
3. java读取图片中文字(1187)
4. java 操作PDF (spire.pdf)api(1117)
5. shiro获取当前登录的用户名(1069)
推荐排行榜
1. shiro获取当前登录的用户名(2)
点击右上角即可分享