随笔分类 -  JAVA代码记录

摘要:1.类 public class PollingDataDTO { private Integer pointId; private byte[] image; public Integer getPointId() { return pointId; } public void setPointI 阅读全文
posted @ 2020-02-21 16:34 幻月hah 阅读(2724) 评论(0) 推荐(0) 编辑
摘要:对接支付平台时常使用 阅读全文
posted @ 2019-12-26 13:43 幻月hah 阅读(1620) 评论(0) 推荐(0) 编辑
摘要:import com.ax.service.pay.OrderService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.ApplicationArguments; import org.springframework.boot.Application 阅读全文
posted @ 2019-12-24 10:00 幻月hah 阅读(1423) 评论(0) 推荐(0) 编辑
摘要:1.前端 前端监听地址:ip:webSocket服务的端口号/webSocket/参数 mounted() {// 初始化WebSocket this.initWebSocket(); },methods: { // WebSocket相关 initWebSocket: function() { i 阅读全文
posted @ 2019-12-20 17:29 幻月hah 阅读(1424) 评论(2) 推荐(0) 编辑
摘要:1、List<对象>根据对象的某个属性,提取重复 List<String> listDetail = list.stream(). collect(Collectors.groupingBy(item -> item.getIdCard(), Collectors.counting())) .ent 阅读全文
posted @ 2019-11-25 10:07 幻月hah 阅读(166) 评论(0) 推荐(0) 编辑
摘要:通过set的方式去重 针对String[]数组中第二各元素的去重 通过LinkedHashSet方式去重 对象中的某个元素去重,并提取该元素组成新的List 阅读全文
posted @ 2019-11-20 16:46 幻月hah 阅读(1088) 评论(0) 推荐(0) 编辑
摘要:1.pom依赖 2.MultipartSupportConfig配置类 3.后端接口改造 关键字consumes = MULTIPART_FORM_DATA_VALUE 4.FeignClient接口改造 引入配置类MultipartSupportConfig,和接口注解consumes = MUL 阅读全文
posted @ 2019-11-19 11:51 幻月hah 阅读(2994) 评论(0) 推荐(0) 编辑
摘要:pom依赖 1.工具类方法,检测上传目录,若不存在则创建 private void judgeDirExists(String uoloadPath) { try { File targetPatchFile = new File(uploadPath); if (!targetPatchFile. 阅读全文
posted @ 2019-11-19 11:41 幻月hah 阅读(593) 评论(0) 推荐(0) 编辑
摘要:Date时区转换工具方法 阅读全文
posted @ 2019-11-14 10:41 幻月hah 阅读(19582) 评论(0) 推荐(0) 编辑
摘要:1.map遍历entrySet()优于keySet() 阅读全文
posted @ 2019-10-31 15:35 幻月hah 阅读(148) 评论(0) 推荐(0) 编辑
摘要:记录系统内用户的操作日志。 1.日志类 public class SysLog { /** * 主键 */ private String id; /** * 操作开始时间 */ private Date createTime; /** * 操作结束时间 */ private Date endTime 阅读全文
posted @ 2019-10-17 15:21 幻月hah 阅读(2072) 评论(0) 推荐(0) 编辑
摘要:public Integer checkExpertAge(String idCard) { // 1. 获取身份证中的出生年、月、日 Integer personYear = Integer.parseInt(idCard.substring(6, 10)); Integer personMonth = Integer.parseInt(idCard.substring(10, 12)); In 阅读全文
posted @ 2019-09-30 16:07 幻月hah 阅读(441) 评论(0) 推荐(0) 编辑

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