(Comprehension of full annotations) Explanation of verification business based on AOP + custom annotations

Directory Quote: final effect: Implementation steps Customize two annotations Define a regular enumeration class Define the aspect class (important!) Validation class: Quotation: This technical solution can be used for many verification types of businesses (login status, permissions…), here we start with the parameter verification business (the specific implementation is relatively simple, it is important to […]

Single sign-on 3: Add RBAC permission verification model function understanding and implementation demo

1. RBAC authority model RBAC (Role-Based Access Control) is a role-based access control model, which is used to manage user permissions and access control in the system. It clearly defines the relationship among users, roles and permissions to achieve flexible permission management and control. 1.1. The RBAC model mainly includes the following core concepts: 1. […]

Spring Validated verification framework makes your project more concise and improves development efficiency

Spring Framework provides a set of frameworks that can easily verify the parameters received in the Controller layer, including the @Validated annotation. Using the @Validated annotation in a Spring project allows us to perform parameter validation more conveniently, avoiding the trouble of manual validation, and making the code more elegant and easy to maintain. This […]

Springboot custom annotations implement data uniqueness and data existence verification

1. Write a custom annotation CommonFieldValidate that needs to be validated import com.anglin.common.validate.CommonFieldValidator; import com.anglin.common.validate.enums.CommonFieldValidateOperatesEnum; import com.anglin.common.validate.enums.CommonFieldValidateOptionEnum; import javax.validation.Constraint; import javax.validation.Payload; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** * Custom Annotation–Field Validation * * @author zhuzhibin * @date 2023/5/16 14:25 **/ @Target({ElementType. TYPE}) //Must be added when using validator, specified to be used […]

How SpringBoot elegantly implements parameter verification

Nawking part When we design the interface, parameter verification is an essential part. Strict parameter verification can ensure the rigor of the data. So in the SpringBoot project, how do you verify the parameters? First let’s describe the requirements User class, including username, user avatar, email address, age, mobile phone number, date of birth, requirements: […]

Install python-pcl in Jetson nano NX board virtual environment for point cloud verification

Test environment: python3.6 Ubunut18.04 1. Because the jetsonnano nx board belongs to the ubuntu system under the ARM architecture and the pcl method installed in the ordinary virtual machine or ubuntu system is different, so in order to avoid some unknown problems when following the tutorial, this pitfall , Writing it down is also convenient […]

Simple implementation of JWT verification in SpringBoot project

Simple implementation of JWT verification in SpringBoot project When using SpringBoot to provide api, I prefer to use jwt for verification. There are many Spring Security integration jwt on the Internet, and Shiro integration jwt, which feels a bit complicated. Here I share my simple implementation in the project. Dependent Package In addition to the […]