Basic Spring annotation method to build architecture and query data

1. Annotation (1) Traditional annotation Annotation Description @Component Used on classes to instantiate Beans @Controller Used on web layer classes to instantiate Beans @Service Used on the service layer class to instantiate Bean @Repository Used on dao layer classes to instantiate beans @Autowired Used on fields for type dependency injection @Qualifer Used in conjunction with […]

Mybatis creation return object exception caused by Lombok’s @Builder annotation

Mybatis creation return object exception caused by Lombok’s @Builder annotation **Conclusion:** After using the Bbuilder annotation, a fully parameterized constructor will be produced based on the current class (excluding the attributes of the parent class). Mybaitis will cause many strange exceptions when it attributes the returned data, so it is best not to use it. […]

Develop using annotations in spring

Foreword: In Java, annotation is a special annotation that provides a metadata mechanism that can be used to describe information and instructions in the code and can be used by compilers, development tools, and runtime environments. Commonly used annotations in the Spring framework include: @Controller: used to mark a class as a SpringMVC Controller object. […]

Euler angles (roll angle, pitch angle, yaw angle), rotation matrix, quaternion conversion and solution to universal joint deadlock

1. Overview The description method of the pose (position and direction) of an object is generally represented by two coordinate systems. One is the world coordinate system or the ground coordinate system. Here I call it the ground coordinate system, which belongs to the reference coordinate system; the other is its own Coordinate system, it […]

CSS Special Effect 001: Put the mouse on the div to achieve effects such as rotation, amplification, and movement.

100 common CSS examples + column directory This column records frequently used CSS examples and techniques, mainly including CSS layout, CSS special effects, and CSS lace information. Among them, CSS layout mainly lists some commonly used CSS layout information points, CSS special effects mainly include some animation examples, and CSS lace describes some CSS-related libraries, […]

Java custom annotations to achieve data desensitization

Foreword: To achieve log desensitization, annotation desensitization can also be achieved! 1. Annotations import com.fasterxml.jackson.annotation.JacksonAnnotationsInside; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** * @program: sxsoft_expert * @ClassName DataMasking * @description: Data desensitization custom annotation * @author: handsome boy * @create: 2023-11-10 09:00 * @Version 1.0 **/ @Target(ElementType.FIELD) @Retention(RetentionPolicy.RUNTIME) @JacksonAnnotationsInside public @interface DataMasking { […]

Which one is better? Fluent Validation and Data Annotations

Table of Contents What is smooth verification Introduction benefit Common scenarios What is data annotation A brief introduction to data annotation Advantages of data annotation Advanced usage of data annotations Use cases for data annotation Compare the difference Code Organization Complexity Handling Customizability Complexity Comparison: Ease of Use vs. Flexibility Smooth verification Data annotation Performance […]

Application example of upgrading related functions based on ESP32 development board using MiSiQi application WIFI (key/advanced)+EEPROM+MQTT+OTA

I am an amateur electronics enthusiast and can use Chinese programming such as Yi Language and e4a. I have recently played with several microcontroller development boards and used MiSiQi for programming. I found that MiSiQi is good at simple programming but has more complex functions. Programming is difficult to use, especially for friends like me […]

Project actual combat: Central controller implementation (4) – implement the function of RequestBody annotation – obtain request body parameters

1. DispatcherServlet package com.csdn.mymvc.core; import com.csdn.fruit.dto.Result; import com.csdn.fruit.util.RequestUtil; import com.csdn.fruit.util.ResponseUtil; import com.csdn.mymvc.annotation.RequestBody; import jakarta.servlet.RequestDispatcher; import jakarta.servlet.ServletContext; import jakarta.servlet.ServletException; import jakarta.servlet.annotation.WebServlet; import jakarta.servlet.http.HttpServlet; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; import org.junit.Test; import java.io.IOException; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.lang.reflect.Parameter; import java.util.Arrays; import java.util.Map; @WebServlet(“/*”) public class DispatcherServlet extends HttpServlet { private final String BEAN_FACTORY = “beanFactory”; private final […]

Use reflection to dynamically construct wrapper conditions (use reflection to obtain annotation values and entity class values)

Use reflection to dynamically construct wrapper conditions Entity class /** * api list query entity class * *@authorwys */ @Data public class SysApiQuery { private Long id; /** * api name */ @Query(type = QueryTypeEnum.EQUAL) private String apiName; /** * api path */ @Query(type = QueryTypeEnum.EQUAL) private String apiUrl; /** Starting time */ @JsonIgnore private […]