RESTful web service based on JAX-WS returns xml document generated through JAXB annotations

A RESTful web service written based on JAX-WS that returns xml documents. This xml document can be generated based on JAXB annotations, simplifying xml generation. In order to use the dependent libraries, you can add the following dependencies in the pom.xml file of the maven project: <dependency> <groupId>jakarta.xml.ws</groupId> <artifactId>jakarta.xml.ws-api</artifactId> <version>4.0.0</version> </dependency> <dependency> <groupId>com.sun.xml.ws</groupId> <artifactId>jaxws-rt</artifactId> <version>4.0.0</version> […]

mybatis handles one-to-many, many-to-one, many-to-many relationships, annotations and xml file writing

Zero, Preface This article is used to study one-to-many, many-to-one, and many-to-many relationships between tables and objects. Two methods of xml file configuration and annotation configuration were studied Super complete~ The entities used for research are students, teachers, courses Note: The relationship between students and teachers should be many-to-many. This article uses many-to-one, that is, […]

Spring-Anotion-(Spring configures beans based on annotations)

1. Basic introduction and introductory cases of Spring’s annotation-based bean configuration 1. Basic introduction: Configure beans based on annotations, mainly components in project development, such as Action, Service, and Dao. 2. Commonly used component annotation forms are: @Component indicates that the current annotation identifies a component. @Controller indicates that the current annotation identifies a controller, […]

Chapter 16 Reflections and Annotations

Through the Java reflection mechanism, you can access the description of the Java object that has been loaded into the JVM in the program, and realize the function of accessing, detecting and modifying the information describing the Java object itself. The Java reflection mechanism is very powerful, and support for this function is provided in […]

[Springboot] Based on annotation development Springboot-Vue3 integrates Mybatis-plus to implement paging query (2) – front-end el-pagination implementation

Series of articles [Springboot] Based on annotation development Springboot-Vue3 integrates Mybatis-plus to implement paging query – back-end implementation Article directory Series of articles system version Implement function Implementation ideas Data format passed in from backend frontendel-table Encapsulate axois interface Introducing the el-pagination paging component of Element-plus Axois gets background data System version Backend: Springboot 2.7, […]

Custom annotations prevent forms from submitting code repeatedly

/** * Custom annotations to prevent repeated submission of forms * * @author LZJ */ @Inherited @Target(ElementType.METHOD) @Retention(RetentionPolicy.RUNTIME) @Documented public @interface RepeatSubmit { /** * Interval time (ms), less than this time is considered a repeated submission */ int interval() default 3000; /** * Interval time unit (milliseconds) */ TimeUnit timeUnit() default TimeUnit.MILLISECONDS; /** * […]

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. […]

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 { […]