摘要: 百万数据量SQL,在进行分页查询时会出现性能问题,例如我们使用PageHelper时,由于分页查询时,PageHelper会拦截查询的语句会进行两个步骤 1.添加 select count(*)from (原查询sql) ,用于统计查询的总数 2.拼接 limit startPage,number 阅读全文
posted @ 2020-01-29 16:17 听风是雨 阅读(1694) 评论(0) 推荐(1)
摘要: 自定义异常 /** * @author: Gabriel * @date: 2020/1/17 14:56 * @description 自定义异常 */ @Data public class BusinessException extends RuntimeException { /** 状态码 阅读全文
posted @ 2020-01-29 14:15 听风是雨 阅读(484) 评论(0) 推荐(0)
摘要: /** * @author: Gabriel * @date: 2020/1/17 15:00 * @description 响应体结果封装 */ public class Result<T> implements Serializable { private int status; private 阅读全文
posted @ 2020-01-29 14:13 听风是雨 阅读(648) 评论(0) 推荐(0)
摘要: <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-aop</artifactId> </dependency> /** * @author: Gabriel * @date 阅读全文
posted @ 2020-01-29 14:10 听风是雨 阅读(426) 评论(0) 推荐(0)
/* 看板娘 */