摘要: 一.环境 maven springboot版本2.x <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.0.3.REL 阅读全文
posted @ 2020-02-05 21:27 听风是雨 阅读(2704) 评论(0) 推荐(0)
摘要: 一.为什么要使用jasypt库? 目前springboot单体应用项目中,甚至没有使用外部配置中心的多服务的微服务架构的项目,开发/测试/生产环境中的密码往往是明文配置在yml或properties文件中, 这样就会导致密码泄露的安全隐患,被不法人员利用从而泄露公司数据信息 因此,jasypt库能通 阅读全文
posted @ 2020-02-01 14:58 听风是雨 阅读(2525) 评论(0) 推荐(0)
摘要: 百万数据量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)
摘要: 一.OAuth2是什么?OAuth2解决了什么问题 1.OAuth2是第三方授权协议,用于支撑认证和授权 2.OAuth2中的角色划分: 资源拥有者 客户端 资源服务器 授权服务器 二.OAuth2怎么用? 三.OAuth2和Spring Security OAuth2 ,以及Shiro的关系 Sp 阅读全文
posted @ 2020-01-26 00:28 听风是雨 阅读(181) 评论(0) 推荐(0)
摘要: 在上周在的微供有数项目中(数据产品),需要对接企业微信中第三方应用,在使用Feign的去调用微服务的用户模块用微信的code获取access_token以及用户工厂信息时出现Feign重试超时报错的情况,通过此篇文章记录问题解决的过程。 一.问题重现: 1.SpringCloud部分依赖如下 <pa 阅读全文
posted @ 2020-01-21 15:34 听风是雨 阅读(1310) 评论(0) 推荐(0)
摘要: 1.CompletableFuture是什么? CompletableFuture是JDK8的新特性之一,是异步调用相关的API,用于简化异步调用,提高异步调用的效率 2.CompletableFuture有什么用? CompletableFuture 是对 Future对象的增强(JDK1.5), 阅读全文
posted @ 2020-01-08 12:00 听风是雨 阅读(9972) 评论(0) 推荐(2)
摘要: public class IpAddressUtil { public static String getIpAddr(HttpServletRequest request){ String ipAddress = request.getHeader("x-forwarded-for"); if(i 阅读全文
posted @ 2019-12-17 21:57 听风是雨 阅读(590) 评论(0) 推荐(0)
/* 看板娘 */