1.1 introduction to notes
Annotation is a new technology introduced by JDK 5.0. Its main functions are:
Explain the procedure and it is not a procedure itself (this function is the same as that of annotation);
It can be read by other programs (such as compiler, etc.).
Annotation format: annotations exist in the code in the format o ...
Posted by lip9000 on Tue, 24 May 2022 19:24:08 +0300
In the advanced feature of Java - reflection mechanism (Part 1), many examples of reflection are written, and the understanding of Class may still be a little confused. Let's try to analyze it from the perspective of memory.
As can be seen from the above figure, Java divides memory into heap, stack and method area, of which the m ...
Posted by fme on Mon, 23 May 2022 15:18:03 +0300
It can be seen from the literal meaning that the function of this is to initialize the Binder, and the method annotated by this can initialize the WebDataBinder. webDataBinder is for form to method data binding!
@InitBinder only annotates methods in @Controller to register a binder initialization method for this controller, and t ...
Posted by microthick on Wed, 18 May 2022 13:04:15 +0300
Do you know the charm of custom annotations?Do you know how to use custom annotations?These two questions at the beginning of this article need you to think carefully, and then read the following contents in combination with these two questions; If you have a clear understanding of these two questions after reading the article, please u ...
Posted by google_man2000 on Sat, 07 May 2022 13:15:52 +0300
1. Definition: Annotation, also called metadata. A code-level description. It is a feature introduced by JDK1.5 and later versions, and it is at the same level as classes, interfaces, and enumerations. It can be declared in front of packages, classes, fields, methods, local variables, method parameters, etc., to describe and annotate these ele ...
Posted by gilliat on Sat, 30 Apr 2022 09:40:15 +0300
JAVA ANNOTATION PROCESSING
Source level annotation processing first appeared in JAVA 5, which provides a mechanism to generate additional "source files" during compilation Please note that this "source file" can not even be a java file. Developers can use this mechanism to generate any file, such as a desc ...
Posted by Gomesh on Thu, 28 Apr 2022 12:39:04 +0300
After the preliminary understanding of the Spring framework in the previous article, this paper uses Java annotation to get a new understanding of the IOC of the Spring framework.
1. Build the project environment
Open the IEDA development software, create a web application project, import the jar package of the Spring framework into ...
Posted by anthony88guy on Tue, 05 Apr 2022 14:54:25 +0300
Custom class 1. Enumeration
Enumeration is a set of constants, belonging to a special class, which contains only a limited set of specific objectsCustom enumeration class: the constructor is privatized, the setXxx() method is not provided, and the enumeration attribute is decorated with statc + final to realize the underlying ...
Posted by mosherben on Fri, 01 Apr 2022 14:37:52 +0300
1.1 reflection introduction
• when compiling, you know the specific information of the class or object. At this time, you can directly operate the class and object without reflection • if the compiler does not know the specific information of the class or object, what should be done at this time? Use reflection ...
Posted by polarbear66 on Thu, 31 Mar 2022 04:46:02 +0300