- 博客(22)
- 资源 (1)
- 收藏
- 关注
原创 java 通过模版生成word
System.out.println("生成新的 Word 文档失败:" + e.getMessage());data.put("{k}", "北京丰台万达广场销售明细");data.put("{name}", "张三");data.put("{a}", "北京市");data.put("{e}", "面包");data.put("{h}", "历史");data.put("{b}", "男");// 替换文档中的占位符。// 准备要替换的数据。// 遍历文档中的每个段落。// 遍历文档中的每个表格。
2025-02-27 10:56:33
930
原创 JAVA cron转中文
sBuffer.append(getPeriod(tmpCorns[3], "日"));sBuffer.append(getPeriod(tmpCorns[2], "时"));sBuffer.append(getPeriod(tmpCorns[1], "分"));sBuffer.append(getPeriod(tmpCorns[0], "秒"));stringBuffer.append("每").append(period);sBuffer.append("星期天");
2024-01-27 14:34:53
696
原创 java 动态读取数据库执行定时任务
System.out.println("开始执行业务:" + LocalDateTime.now());//2.3 返回执行周期(Date)//2.1 从数据库获取执行周期。//2.2 合法性校验.//1.添加任务内容。//2.设置执行周期。
2024-01-19 13:43:28
993
原创 解决 Cannot call getReader(), getInputStream() already called
result = R.failed(0, "失败");result = R.failed(0, "失败");1 新建类继承HttpServletRequestWrappe。* @description :复制入参。
2023-06-17 11:45:48
922
原创 java 下划线转驼峰,驼峰转下划线
public static void main(String[] args) { String str="{\"user_id\":\"121\",\"userName\":22,\"data\":[{\"user_id\":\"122\",\"userName\":34}]"; System.out.println(lineToHump(str)); System.out.println(humpToLine(str));}private static final Pat
2023-06-14 13:51:04
138
原创 java 图片转base64
import org.apache.commons.codec.binary.Base64;public static void main(String[] args) throws IOException { File file = new File("d:\\ha/kfc.jpg"); FileInputStream fileInputStream = new FileInputStream(file); byte [] bytes = new byte[fileInp
2023-05-30 15:16:51
166
原创 java中 AES/CBC/PKCS7Padding加密解密十六进制或base64
java中 AES/CBC/PKCS7Padding加密解密十六进制或base64
2023-05-12 17:03:40
1039
原创 SpringBoot 使用ElasticsearchRestTemplate
SpringBoot 使用ElasticsearchRestTemplate 简单使用
2022-09-05 14:08:09
2513
原创 java8对JSONArray过滤排序
public static void main(String[] args) { JSONArray result = new JSONArray(); for (int i = 0; i < 10; i++) { JSONObject jsonObject = new JSONObject(); jsonObject.put("price", i); jsonObject.put("name", i); result..
2021-12-16 15:20:46
5864
原创 java使用hutool的dfa过滤敏感词
public int keyWordsFind(String content) { List<String> list = null; list = redisTemplate.opsForList().range("words_filter", 0, -1); if (CollectionUtils.isEmpty(list)) { try { org.springframework.core.io.Resource resou.
2020-11-13 12:02:35
2417
原创 java 一级一级的找
public static void main(String[] args) { List<String> list =new ArrayList<>(); list.add("CDHE"); list.add("AB"); list.add("CD"); list.add("CDA"); list.add("IP:"); list.add("IP"); List<String> a = list.strea...
2020-10-28 16:05:11
174
原创 java敏感词过滤
public class wordsUtil { public static ArrayList thesaurus = new ArrayList(); public static boolean hit = false; public static void main(String[] args) { try { Resource resource = new ClassPathResource("data/words.txt");.
2020-10-28 16:00:08
188
原创 ngrok+springboot配置微信测试号url和token
1.双击ngrok输入一下两个命名ngrok authtoken 1SrN4UVVNLBWIVM0s9ldraS65wOqrewrqjnNNEWngrok http 80802.URL配置https://www.ngrok.io/wx/userAccount/getCode 和 token3.java代码如下private static String token = "legalminer";@RequestMapping(value = "/getCode", meth...
2020-10-16 17:34:50
352
原创 微信扫码登录
微信公众号扫码登录1.打开http://mp.weixin.qq.com/debug/cgi-bin/sandboxinfo?action=showinfo&t=sandbox/index2.配置回调地址切记不要加http3.生成链接https://open.weixin.qq.com/connect/oauth2/authorize?appid=youappidca&redirect_uri=https://www.you.com&response_type=c
2020-10-16 17:26:29
1803
rtmp播放器
2016-08-24
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人