Java-12 enumeration classes and annotations

Java-12 enumeration classes and annotations 1, Enum class (enum) 1. Use of enumeration class 1. Understanding of enumerating classes: there are only a limited number of objects in a class, which is uncertain. We call this class enumeration class 2. When you need to define a set of constants, it is strongly recommended to use enumeratio ...

Posted by frosty1433 on Fri, 04 Mar 2022 14:40:52 +0100

Detailed explanation of Java annotation and annotation processor

preface Annotations are labels that are inserted into the source file. Javac will generate the same bytecode for the code with or without annotations. If you want to use annotations, you must provide annotation processing tools. These tools can process annotations at run time (reflection), at compile time (language model) or at bytecode le ...

Posted by gasper000 on Wed, 26 Jan 2022 19:09:18 +0100

Request parameter processing in spring MVC

Main knowledge points The servlet API gets the request parameters using request getParameter("xxx")In spring MVC, you only need to declare the parameter with the corresponding name in the processing method to automatically match the parameter passed in by the request and perform the corresponding type conversion (the servlet API also ...

Posted by usefulphp on Mon, 03 Jan 2022 23:26:34 +0100

Custom annotation and its application in reflection

catalogue 1, Annotation (also annotated) ■ comments and meta comments acting on the code: □ comments applied to the code: □ meta annotation (annotation applied to other annotations): □ highlight @ Retention and @ Target: ❀ important application of Annotation: using Annotation in reflection (1) Annotation on class name: (2) ...

Posted by Piranha on Mon, 03 Jan 2022 17:48:18 +0100

Using annotations - contains cases junit and jpa

Annotation overview What is annotation The most common annotations are those in the Spring framework, such as @ RequestMapping @Controller. What is the role of annotations? Why use annotations? Annotation is like a label, which can mark classes, attributes and methods. The marked content can use the getannotation (class < T >) method of t ...

Posted by dolphinsnot on Sun, 02 Jan 2022 17:45:20 +0100

Common Spring Boot Notes

Preface Spring Boot Common Annotations Tip: The following is the main body of this article. The following cases can be used as reference. 1. @SpringBootApplication          This note is the cornerstone of the Spring Boot project, which is added by default when creating the Application for the ...

Posted by louisA2A on Mon, 06 Dec 2021 00:19:45 +0100

You must learn [Java annotation] to assist the code

What is annotation 👻 Annotation is a special "Annotation" placed in front of classes, methods, fields and parameters of Java source code. Some meta information attached to the code is used for parsing and using some tools during compilation and running, and plays the function of description and configuration. Annotations do not ...

Posted by GarroteYou on Sun, 28 Nov 2021 10:41:14 +0100