SpringBoot + Redis solve the problem of repeated submission (idempotent)
In development, an exposed interface may face a large number of repeated requests in an instant. If you want to filter out repeated requests and cause damage to the business, you need to implement idempotent
Idempotent:
Any number of executions has the same impact as a single execution. The final meani ...
Posted by sdi126 on Wed, 10 Jun 2020 22:41:29 -0700
Development of plug-ins for automatically generating getter and setter methods based on annotation processor
The copyright of this article belongs to the official account of WeChat public code ID:onblog. If it is reproduced, please keep the original statement of the paragraph, and the offender will investigate it. If there are any shortcomings, please welcome the official account of WeChat public. ]
Yesterday, I found out by accident lombok The auth ...
Posted by daedlus on Tue, 02 Jun 2020 22:56:22 -0700
Extensible Use of COLA and Source Code Research
A Preliminary Study on the Use and Design of cola Extension Points
Packaging changes provide flexibility to respond to changes in program requirements.
Extension point use
Steps:
Defines an extension point interface, which can be a validator, converter, entity; must end with ExtPt to represent an extension point.
For example, I define an exten ...
Posted by web_noob on Mon, 25 May 2020 10:01:16 -0700
Spring Boot email
How to use Spring Boot to send mail?
Spring Boot provides a starter: Spring Boot starter mail for sending mail.
Next, let's see how to send mail using Spring Boot.
1, Configure mailbox
Here we use 163 Netease email
1. Open SMTP service
2. Set / reset client authorization password
2, Coding implementation
1. Add dependency
1 <!--mail-- ...
Posted by ComputerChip on Sun, 17 May 2020 08:10:16 -0700
Spring verification annotation exception unified processing class
@ControllerAdvice
This annotation is the core of unified exception handling
Is an Advice that acts on the control layer. This annotation can collect common @ ExceptionHandler, @ InitBinder and @ ModelAttributes methods into one type and apply to all controllers
Design ideas in this category:
Use the @ ExceptionHandler annotation to c ...
Posted by niekos on Tue, 05 May 2020 12:04:34 -0700
Database design and implementation of comment system
requirement analysis
Generally, when we browse the website, we can often see the effect as shown in the figure below (the picture comes from CSDN)
This kind of comment is nested layer by layer, and there are several replies to the comment under each comment.
This kind of structure is similar to the tree structure. Users can see it at a gla ...
Posted by andco on Mon, 04 May 2020 23:32:08 -0700
Java Implementation of AES ECP PKCS5Padding Encryption and Decryption Tool Class
Java implements an AES/ECB/PKCS5Padding encryption and decryption algorithm tool class
Encryption algorithm: AES
Mode: ECB
Complement method: PKCS5Padding
<!-- more -->
1. Tool Classes
import lombok.Getter;
import lombok.Setter;
import lombok.extern.slf4j.Slf4j;
import org.springframework.util.Base64Utils;
import javax.crypto.Cipher;
i ...
Posted by sundawg on Sat, 02 May 2020 22:16:45 -0700
Dragon slaying in Java: how to modify syntax tree
stay Lombok is often used, but do you know how it works? , and Lombok is often used, but do you know how it works? (two) In the two articles, the underlying principle of Lombok is introduced. In fact, it is summed up as a sentence that is realized by changing the abstract syntax tree during compilation. The above two articles have talked about ...
Posted by lemming_ie on Thu, 26 Mar 2020 01:00:48 -0700
Wechat service number silent authorization calling procedure record
Wechat silent authorization process related problem process record
Related tools
Intranet penetration tool
Peanut hull
There is free 1G traffic per month, but I need to hold my ID card to take photos and upload. It's too troublesome to use.
natapp
Easy to use, you need to scan the real name with Alipay.
other... Other friends also ...
Posted by farkewie on Wed, 25 Mar 2020 21:04:12 -0700
Exception handling thrown by Spring security oauth2 ExceptionTranslationFilter
The core of Spring security is a set of filter chains. Project launch on autoconfig.
The core is the Basic Authentication Filter used to authenticate the user's identity;
One filter handles one authentication mode;
For the username password authentication filter,
Will check if it is a login requ ...
Posted by sharpmac on Mon, 16 Mar 2020 04:37:29 -0700