11 2021 档案

摘要:id的三种算法: 1:简单的自增 2:UUID 3:雪花算法 类名:SnowFlake 使用雪花算法的时候会产生前后端交互long类型丢失问题 方法一: @JsonSerialize(using= ToStringSerializer.class)private Long id; 方法二: impo 阅读全文
posted @ 2021-11-17 15:13 somky 阅读(559) 评论(0) 推荐(0)
摘要:<!-- pagehelper 插件--><dependency> <groupId>com.github.pagehelper</groupId> <artifactId>pagehelper-spring-boot-starter</artifactId> <version>1.2.13</ve 阅读全文
posted @ 2021-11-17 14:35 somky 阅读(53) 评论(0) 推荐(0)
摘要:作用:也是用来打印接口耗时 类名:LoginInterceptor /** * 拦截器:Spring框架特有的,常用于登录校验,权限校验,请求日志打印 */@Componentpublic class LoginInterceptor implements HandlerInterceptor { 阅读全文
posted @ 2021-11-17 12:37 somky 阅读(126) 评论(0) 推荐(0)