springweb flux intercepts requests to obtain parameters and methods for interface signature anti-replay verification

When doing interface signature and anti-replay for spring webflux, it is often necessary to obtain request parameters, request methods, etc., but spring webflux cannot be obtained as easily as spring mvc. Here is a special explanation based on previous practice: general idea: 1. Use filters to obtain information from the original request, cache it in […]

Preventing repeated submission of requests: Implementation plan of annotations + interceptors

Article directory Learn about requesting duplicate submissions Solutions Implementation Learn about repeated submissions Repeated submission of requests means that the user repeatedly submits the same request before a request is processed. This situation usually occurs due to network delay, user misoperation or poor system performance. Requesting duplicate submissions may cause the following issues and impacts: […]

MybatisPlus interceptor + annotation to implement data permissions

Data permission notes It is best to place it under Mapper to avoid problems with queries in Service/Controller that do not require increased data permissions. @Target(ElementType.METHOD) @Retention(RetentionPolicy.RUNTIME) @Documented public @interface DataScope { /** * Main table alias associated with the user table */ String mainTableAlias() default “”; /** * Alias of user table */ String […]

XMLHttpRequest intercepts requests and responses

Environment: angular Implementation: Interception of requests and adding fields to request information Intercept response and filter return value Response interception: According to the XMLHttpRequest used by angular, the original request will be transferred to another XML that will listen to the return event and send the request in another century Use get set to return […]

Interception points and scenario applications in the spring bean life cycle

Overview There are multiple customizable extension points in the process of creating a bean to perform custom operations during the bean life cycle. The following are examples of customizable points and scenarios throughout the bean life cycle. BeanDefinitionRegistryPostProcessor Bean definition registration post-processor allows you to modify or register bean definitions before the Spring container is […]

Custom MyBatis interceptor to change table name

by emanjusaka from ? https://www.emanjusaka.top/2023/10/mybatis-interceptor-update-tableName What can I do if the flowers on the other side bloom? This article welcomes sharing and aggregation. Please leave the original address for reprinting the full text. Directory @Intercepts Implementation steps Code operation result Custom MyBatis interceptors can insert their own logic before and after method execution, which is […]

Analysis of SpringMVC custom interceptor principle

Analysis on the principle of SpringMVC custom interceptor 1. Concept Interceptor is a mechanism that dynamically intercepts method calls. In Dynamically intercept the execution of controller methods in SpringMVC. 2. Function Execute preset code before and after calling the specified method to enhance requests and responses. Prevent execution of the original method 3. Custom interceptor […]

spring-boot-starter-validation data verification global exception interception processing

1. Why use Validation to verify parameters Usually when we use the spring framework to write interfaces, we need to perform null checking or format verification on some interface parameters to avoid program exceptions. That is, we usually use if-else to verify parameters one by one. There is no problem with this method logically, and […]