01 2020 档案
摘要:百万数据量SQL,在进行分页查询时会出现性能问题,例如我们使用PageHelper时,由于分页查询时,PageHelper会拦截查询的语句会进行两个步骤 1.添加 select count(*)from (原查询sql) ,用于统计查询的总数 2.拼接 limit startPage,number
阅读全文
摘要:自定义异常 /** * @author: Gabriel * @date: 2020/1/17 14:56 * @description 自定义异常 */ @Data public class BusinessException extends RuntimeException { /** 状态码
阅读全文
摘要:/** * @author: Gabriel * @date: 2020/1/17 15:00 * @description 响应体结果封装 */ public class Result<T> implements Serializable { private int status; private
阅读全文
摘要:<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-aop</artifactId> </dependency> /** * @author: Gabriel * @date
阅读全文
摘要:一.OAuth2是什么?OAuth2解决了什么问题 1.OAuth2是第三方授权协议,用于支撑认证和授权 2.OAuth2中的角色划分: 资源拥有者 客户端 资源服务器 授权服务器 二.OAuth2怎么用? 三.OAuth2和Spring Security OAuth2 ,以及Shiro的关系 Sp
阅读全文
摘要:在上周在的微供有数项目中(数据产品),需要对接企业微信中第三方应用,在使用Feign的去调用微服务的用户模块用微信的code获取access_token以及用户工厂信息时出现Feign重试超时报错的情况,通过此篇文章记录问题解决的过程。 一.问题重现: 1.SpringCloud部分依赖如下 <pa
阅读全文
摘要:1.CompletableFuture是什么? CompletableFuture是JDK8的新特性之一,是异步调用相关的API,用于简化异步调用,提高异步调用的效率 2.CompletableFuture有什么用? CompletableFuture 是对 Future对象的增强(JDK1.5),
阅读全文