Recently due to business needs, go to the dynamic page research, because our system is divided into five subsystems, in line with the principle of flexible, efficient, thinking of the front page this piece out, different from the previous JSP form, control write dead, but in a flexible and configurable way, so that each system efficient operation. May later also think with the permission to combine, let the authority to control each resource's call, of course, that is something, may not take much time will begin to do this matter.
In the dynamic page this piece, we finally want to achieve the effect is not in front of the JSP to write dead, but by dynamic binding way to generate the system desired page. I am responsible for the creation of the form this piece, the specific business requirements are the other subsystems to make their own entities into jar package, throw to me, I put the jar package parsing processing, read out the class name and attribute name, length, memo information, and then add to the database for use, In this way, it is not necessary to put the entities that are not related to your system into your own system, and to take a step towards the efficient, flexible and configurable direction of the system.
In my responsible part, the preliminary study is to check the data, how to parse the jar package, read out the Jar package class name, property name, class name description and field name description and length and other information. But this is puzzled, and later consulted Daniel, Daniel gives the idea is to use the reflection mechanism of Java, in the next blog I will focus on the Java reflection mechanism. Determined to use the Java reflection mechanism to parse the jar package, the following begins to study and then parse the jar package. In this case, it involves the reading of the annotation in the way the properties, but also related to the meta-annotations, we will take out a separate one or two blog dedicated to the meta-annotations and how to customize the annotations read jar package. In the back is generated by the entity form this part of the function seems very simple, but the logic is very complex, at the end of the successful completion, I will also in the back of this part of the logic to everyone.
In the next few blogs I will focus on the dynamic page, the above I have just talked about the content to share with you. Long time did not write a series of blog, the next article, we start from the Java reflection mechanism, please look forward to it!
"Dynamic Page" (a) premise