随笔分类 -  java

摘要:https://zzpc.net/content/206150.html 前言 这几天在学习如何使用自定义注解实现Excel格式数据导入导出,参考的还是若依框架里面的代码,由于是初学,所以照猫画虎呗,但是难受的是需要复制并根据自己项目修改作者自定义的工具类以及导入这些工具类的依赖包。由于吃了这个苦, 阅读全文
posted @ 2023-04-21 20:18 binbinx
摘要:https://www.cnblogs.com/SjhCode/p/SpringSecurity.html permitAll() :无条件允许任何形式访问,不管你登录还是没有登录。 anonymous() :允许匿名访问,也就是没有登录才可以访问。 denyAll() :无条件决绝任何形式的访问。 阅读全文
posted @ 2023-04-21 20:17 binbinx
摘要:前一篇文章讲述了单线程处理大文件的方法,虽然解决了内存装不下的问题但是依然存在效率不高的问题。这篇文章介绍的是Java中多线程处理大文件的一种方法,如有疑问欢迎各位大神垂询,我们相互帮助、共同学习。 如果想看单线程处理大文件的那边文章请移步:Java 按行处理大文件的方法 [单线程] 一、问题的提出 阅读全文
posted @ 2023-04-21 20:15 binbinx
摘要:https://www.cnblogs.com/SjhCode/p/17314622.html 使用扁平化前 @Getter @Setter @ToString public class Account { private Location location; private PersonInfo 阅读全文
posted @ 2023-04-21 20:13 binbinx
摘要:https://www.cnblogs.com/SjhCode/p/thread.html Synchronized 原文:http://blog.csdn.net/luoweifu/article/details/46613015作者:luoweifu 同步线程 1.一个线程访问一个对象中的syn 阅读全文
posted @ 2023-04-21 20:10 binbinx 阅读(11) 评论(0) 推荐(0)
摘要:负数转正整数 Long user = ~(Long.parseLong(userId)-1); Math.abs(userId) Enum枚举 几种常用的枚举 一、直接写成员 public enum EnumResultType { ex,notMatch,success,busy } 成员取出是用 阅读全文
posted @ 2023-04-21 20:09 binbinx
摘要:https://www.cnblogs.com/SjhCode/p/excelAndPic.html 批量导入图片--Excel与zip压缩包 导入excel和图片其实很简单,就是导入包与调用几个简单的方法,主要对接业务操作比较繁琐。 在excel中填入图片的名称(不用带后缀) 对应的zip包 导入 阅读全文
posted @ 2023-04-21 20:07 binbinx
摘要:https://www.cnblogs.com/SjhCode/p/WebSocketClient.html 注意事项: 1.@Scheduled(fixedDelay = 5000) 2.心跳检测 3.导入依赖与导包 <dependency> <groupId>org.java-websocket 阅读全文
posted @ 2023-04-21 20:04 binbinx
摘要:https://www.cnblogs.com/SjhCode/p/Iterator.html java 迭代器使用 原文链接:https://blog.csdn.net/ACE_kk/article/details/126182500 一、前言在迭代器(Iterator)没有出现之前,如果要遍历数 阅读全文
posted @ 2023-04-21 19:56 binbinx
摘要:https://www.cnblogs.com/SjhCode/p/instanceof.html 引用原文链接:https://blog.csdn.net/YXXXYX/article/details/120205124 概念:instanceof 概念在多态中引出,因为在多态发生时,子类只能调用 阅读全文
posted @ 2023-04-21 19:55 binbinx 阅读(62) 评论(0) 推荐(0)
摘要:https://www.cnblogs.com/SjhCode/p/TODO.html 在注释中加入TODO,来标注为待开发。我们用来快速标注BUG,测试类,未完成内容,错误代码 //TODO 在这里输入标注 /** * TODO 在这里输入标注 * */ 在IDEA左下角这里的TODO可以看到项目 阅读全文
posted @ 2023-04-21 19:52 binbinx 阅读(153) 评论(0) 推荐(0)
摘要:https://www.cnblogs.com/SjhCode/p/time.html 时间格式这个是通过Calendar 做时间滚动 //开始时间yyyy-MM-dd HH:mm:ss @Value("${StartTime}") @JsonFormat(timezone = "GMT+8", p 阅读全文
posted @ 2023-04-21 19:49 binbinx
摘要:AES加解密 https://www.cnblogs.com/SjhCode/p/AES.html AES加解密工具类 import javax.crypto.Cipher; import javax.crypto.spec.IvParameterSpec; import javax.crypto. 阅读全文
posted @ 2023-04-21 19:34 binbinx 阅读(51) 评论(0) 推荐(0)
摘要:https://www.cnblogs.com/SjhCode/p/mask.html /** * @author * @date 2022/8/31 13:50 * @description TODO 信息脱敏工具类 */public class MaskUtil { /** * 手机号显示首3末 阅读全文
posted @ 2023-04-21 19:32 binbinx
摘要:https://www.cnblogs.com/SjhCode/p/sqlserverToMysql.html 定时同步数据,从sqlserver到mysql 注意事项: 一.primary: master #设置默认的数据源或者数据源组,默认值即为master 二.@Scheduled() 和 @ 阅读全文
posted @ 2023-04-21 19:30 binbinx
摘要: 阅读全文
posted @ 2023-04-09 15:30 binbinx 阅读(11) 评论(0) 推荐(0)