- 博客(112)
- 收藏
- 关注
原创 字段脱敏统一框架
方案一:对需要脱敏的接口统一使用切面进行处理,需要找到接口脱敏字段,根据字段和枚举维护的规则进行脱敏处理优点:可以控制哪个接口哪个方法进行脱敏缺点:找到需要脱敏属性字段需要递归遍历较为复杂,对象是l数组和对象组合、同名属性字段多以及层数深都会提高复杂度方案二:利用fastjson序列化过滤器+自定义注解实现,在需要脱敏字段打上注解,然后在自定义fastjson序列化过滤器中对打上自定义注解属性进行脱敏,脱敏规则也维护在枚举中优点:通用性强、实现简单缺点:对于所有接口和字...
2021-05-28 13:32:09
559
原创 消息中间件学习
消息中间件概念 利用高效可靠的消息传递机制进行平台无关的数据交流,并基于数据通信进行分布式系统的集成,通过提供消息传递和消息排队模型,它可以在分布式环境下扩展进程间的通信。消息中间件应用场景 跨系统数据传递、高并发流量削峰、数据异步处理...等等常用消息中间件 ActiveMQ、RabbitMQ、Kafka、RocketMQ消息中间件...
2019-10-28 16:00:23
545
1
原创 树莓派3b+ 环境搭建
我的树莓派3b+ 没有买HDMI 屏,利用网线与电脑主机相连操纵树莓派。如果买回来接上电,电源灯在闪,表明板子有问题,赶快换。 第一步,给SD卡烧系统。3b+需要的系统要求比较新,不然插上SD卡,网口灯也不会亮,系统也不会启动,版本是2018-03-13-raspbian-stretch.img 和2018-04-18-raspbian-stretch.img就可以,官网htt...
2019-10-09 13:05:32
17893
14
原创 缓存学习
为什么使用缓存? 缓存能够提高应用程序性能,降低数据库成本,减少后端负载,增加可预测性能,消除数据库热点,提高读取吞吐量。 在Java应用中,对于访问频率高,更新少的数据,通常的方案是将这类数据加入缓存中。相对从数据库中读取来说,读取缓存效率会有效提升。 在集群环境下,常用分布式缓存有Redis、Memcached等。但在某些业务场景下,可能不需要去...
2019-09-10 21:30:31
319
原创 LeetCode146 LRU Cache
题目: Design and implement a data structure forLeast Recently Used (LRU) cache. It should support the following operations:getandput. get(key)- Get the value (will always be positiv...
2019-08-16 21:38:21
179
原创 LeetCode233 Number of Digit One
题目: Given an integer n, count the total number of digit 1 appearing in all non-negative integers less than or equal to n. Example: Input: 13 Output: 6 Explanati...
2019-08-16 10:22:34
185
原创 LeetCode25 Reverse Nodes in k-Group
题目: Given a linked list, reverse the nodes of a linked listkat a time and return its modified list. kis a positive integer and is less than or equal to the length of the linked list...
2019-08-13 21:51:02
220
原创 LeetCode24 Swap Nodes in Pairs
题目: Given alinked list, swap every two adjacent nodes and return its head. You maynotmodify the values in the list's nodes, only nodes itself may be changed. Example: ...
2019-08-13 17:08:34
188
原创 LeetCode21 Merge Two Sorted Lists
题目: Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists. Example: Input: 1->2->4,...
2019-08-13 17:04:05
181
原创 LeetCode82 Remove Duplicates from Sorted List II
题目: Given a sorted linked list, delete all nodes that have duplicate numbers, leaving onlydistinctnumbers from the original list. Example 1: Input: 1->2->3->3->4-...
2019-08-13 16:40:14
255
原创 LeetCode203
题目: Remove all elements from a linked list of integers that have valueval. Example: Input: 1->2->6->3->4->5->6, val = 6 Output: 1->2->3->4-&...
2019-08-13 15:51:56
158
原创 LeetCode445 Add Two Numbers II
题目: You are given twonon-emptylinked lists representing two non-negative integers. The most significant digit comes first and each of their nodes contain a single digit. Add the two numbers ...
2019-08-13 15:43:29
218
原创 LeetCode2 Add Two Numbers
题目: You are given twonon-emptylinked lists representing two non-negative integers. The digits are stored inreverse orderand each of their nodes contain a single digit. Add the two numbers ...
2019-08-13 14:19:57
259
原创 LeetCode328 Odd Even Linked List
题目: Given a singly linked list, group all odd nodes together followed by the even nodes. Please note here we are talking about the node number and not the value in the nodes. You shoul...
2019-08-13 14:00:28
164
原创 LeetCode86 Partition List
题目: Given a linked list and a valuex, partition it such that all nodes less thanxcome before nodes greater than or equal tox.You should preserve the original relative order of the nodes in ...
2019-08-07 16:04:19
245
原创 LeetCode83 Remove Duplicates from Sorted List
题目: Given a sorted linked list, delete all duplicates such that each element appear onlyonce. Example 1: Input: 1->1->2 Output: 1->2 Example 2: ...
2019-08-07 13:59:14
241
原创 LeetCode92 Reverse Linked List II
题目: Reverse a linked list from positionmton. Do it in one-pass. Note:1 ≤m≤n≤ length of list. Example: Input: 1->2->3->4->5->NULL, m = 2, n = 4...
2019-08-06 14:02:48
137
原创 Git SSH免密登陆设置
Windows 安装完Git后需要设置ssh免密登陆 打开Git Bash终端 输入命令生成密钥此时默认密钥保存路径会有私钥和公钥两个文件 然后登陆到GitHub,打开settings,然后找到SSH keys and GPG keys,点击New SSH Key 打开生成的id_rsa...
2019-08-04 16:06:32
501
1
原创 CentOS安装Nginx
Nginx是一个轻量级的、高性能的、基于Http的、反向代理服务器,同时还是一个电子邮件服务器。 官网地址:nginx.org/ 下载地址:http://nginx.org/en/download.html 需要下载稳定版本stable version 在CentOS下直接下载 wget http://n...
2019-07-29 17:07:09
188
原创 LeetCode49 Group Anagrams
题目: Given an array of strings, group anagrams together. Example: Input: ["eat", "tea", "tan", "ate", "nat", "bat"], Output: [ ["ate","eat","tea"], ...
2019-07-28 23:29:58
140
原创 LeetCode16 3Sum Closest
题目: Given an arraynumsofnintegers and an integertarget, find three integers innumssuch that the sum is closest totarget. Return the sum of the three integers. You may assume that each ...
2019-07-27 23:43:40
160
原创 SpringBoot学习
Spring Boot是由Pivotal团队提供的全新框架,其设计目的是用来简化新 Spring 应用的初始搭建以及开发过程。该框架使用了特定的方式来进行配置,从而使开发人员不再需要定义样板化的配置。 Java一直被人诟病的一点就是臃肿、麻烦。主要体现在两点: 复杂的配置 项目各种配置其实是开发时的损耗, 因为在思考 Spring 特性...
2019-07-27 15:12:16
246
原创 LeetCode206 Reverse Linked List
题目: Reverse a singly linked list. Example: Input: 1->2->3->4->5->NULL Output: 5->4->3->2->1->NULL Follow up: A linked list...
2019-07-23 16:41:01
139
原创 LeetCode18 4Sum
题目: Given an arraynumsofnintegers and an integertarget, are there elementsa,b,c, anddinnumssuch thata+b+c+d=target? Find all unique quadruplets in the array which gives th...
2019-07-23 15:55:04
141
原创 LeetCode15 3Sum
题目: Given an arraynumsofnintegers, are there elementsa,b,cinnumssuch thata+b+c= 0? Find all unique triplets in the array which gives the sum of zero. Note: The ...
2019-07-23 15:21:10
124
原创 LeetCode149 Max Points on a Line
题目: Givennpoints on a 2D plane, find the maximum number of points that lie on the same straight line. Example 1: Input: [[1,1],[2,2],[3,3]] Output: 3 Explana...
2019-07-23 09:44:44
242
原创 LeetCode447 Number of Boomerangs
题目: Givennpoints in the plane that are all pairwise distinct, a "boomerang" is a tuple of points(i, j, k)such that the distance betweeniandjequals the distance betweeniandk(the orde...
2019-07-23 09:23:47
179
原创 LeetCode454 4Sum II
题目: Given four lists A, B, C, D of integer values, compute how many tuples(i, j, k, l)there are such thatA[i] + B[j] + C[k] + D[l]is zero. To make problem a bit easier, all A, B, C...
2019-07-23 09:17:56
115
原创 LeetCode219 Contains Duplicate II
题目: Given an array of integers and an integerk, find out whether there are two distinct indicesiandjin the array such thatnums[i] = nums[j]and theabsolutedifference betweeniandjis ...
2019-07-23 09:07:58
133
原创 LeetCode220 Contains Duplicate III
题目: Given an array of integers, find out whether there are two distinct indicesiandjin the array such that theabsolutedifference betweennums[i]andnums[j]is at mosttand theabsolute...
2019-07-23 08:58:25
139
原创 LeetCode1 Two Sum
题目: Given an array of integers, returnindicesof the two numbers such that they add up to a specific target. You may assume that each input would haveexactlyone solution, and you ma...
2019-07-20 21:39:16
106
原创 LeetCode451 Sort Characters By Frequency
题目: Given a string, sort it in decreasing order based on the frequency of characters. Example 1: Input: "tree" Output: "eert" Explanation: ...
2019-07-20 14:12:39
140
原创 LeetCode205 Isomorphic Strings
题目: Given two stringssandt, determine if they are isomorphic. Two strings are isomorphic if the characters inscan be replaced to gett. All occurrences of a character must...
2019-07-19 09:00:08
120
原创 leetCode290 Word Pattern
题目: Given apatternand a stringstr, find ifstrfollows the same pattern. Herefollowmeans a full match, such that there is a bijection between a letter inpatternand anon-emptyw...
2019-07-17 13:08:56
161
原创 LeetCode202 Happy Number
题目: Write an algorithm to determine if a number is "happy". A happy number is a number defined by the following process: Starting with any positive integer, replace the number by the s...
2019-07-12 14:38:28
177
原创 LeetCode242 Valid Anagram
题目: Given two stringssandt, write a function to determine iftis an anagram ofs. Example 1: Input: s = "anagram", t = "nagaram" Output: true Example 2:...
2019-07-11 22:57:25
318
原创 LeetCode136 Single Number
题目: Given anon-emptyarray of integers, every element appearstwiceexcept for one. Find that single one. Note: Your algorithm should have a linear runtime complexity. Could y...
2019-07-08 23:16:23
114
原创 LeetCode350 Intersection of Two Arrays II
题目: Given two arrays, write a function to compute their intersection. Example 1: Input: nums1 = [1,2,2,1], nums2 = [2,2] Output: [2,2] Example 2: Input:...
2019-07-07 14:41:43
127
原创 图论基础学习
图论〔Graph Theory〕是数学的一个分支。它以图为研究对象。图论中的图是由若干给定的点及连接两点的线所构成的图形,这种图形通常用来描述某些事物之间的某种特定关系,用点代表事物,用连接两点的线表示相应两个事物间具有这种关系。图的分类 无向图(Undirected Graph) 有向图(Directed Graph)...
2019-07-06 20:43:13
1037
原创 LeetCode349 Intersection of Two Arrays
题目: Example 1: Input: nums1 = [1,2,2,1], nums2 = [2,2] Output: [2] Example 2: Input: nums1 = [4,9,5], nums2 = [9,4,9,8,4] Output: [9,4] Note:...
2019-07-06 16:55:40
178
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人