随笔分类 - JAVA代码记录
摘要:1.类 public class PollingDataDTO { private Integer pointId; private byte[] image; public Integer getPointId() { return pointId; } public void setPointI
阅读全文
摘要:import com.ax.service.pay.OrderService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.ApplicationArguments; import org.springframework.boot.Application
阅读全文
摘要:1.前端 前端监听地址:ip:webSocket服务的端口号/webSocket/参数 mounted() {// 初始化WebSocket this.initWebSocket(); },methods: { // WebSocket相关 initWebSocket: function() { i
阅读全文
摘要:1、List<对象>根据对象的某个属性,提取重复 List<String> listDetail = list.stream(). collect(Collectors.groupingBy(item -> item.getIdCard(), Collectors.counting())) .ent
阅读全文
摘要:通过set的方式去重 针对String[]数组中第二各元素的去重 通过LinkedHashSet方式去重 对象中的某个元素去重,并提取该元素组成新的List
阅读全文
摘要:1.pom依赖 2.MultipartSupportConfig配置类 3.后端接口改造 关键字consumes = MULTIPART_FORM_DATA_VALUE 4.FeignClient接口改造 引入配置类MultipartSupportConfig,和接口注解consumes = MUL
阅读全文
摘要:pom依赖 1.工具类方法,检测上传目录,若不存在则创建 private void judgeDirExists(String uoloadPath) { try { File targetPatchFile = new File(uploadPath); if (!targetPatchFile.
阅读全文
摘要:1.map遍历entrySet()优于keySet()
阅读全文
摘要:记录系统内用户的操作日志。 1.日志类 public class SysLog { /** * 主键 */ private String id; /** * 操作开始时间 */ private Date createTime; /** * 操作结束时间 */ private Date endTime
阅读全文
摘要:public Integer checkExpertAge(String idCard) { // 1. 获取身份证中的出生年、月、日 Integer personYear = Integer.parseInt(idCard.substring(6, 10)); Integer personMonth = Integer.parseInt(idCard.substring(10, 12)); In
阅读全文