Next I wrote, note: database course design (2)
After a dayCodeWriting and page design have basically completed the page design and background code, and some small problems have been encountered in the middle. Here I will share with you,
Login Page and home page design (for those who are not yet proficient in CSS, refer to some style on the network ):
Login Page:
Home Page:
This is the first draft,Will be modified later
The preparation of background code is also relatively easy, because the logic of this project is not complex, because it is a database curriculum design, and my code uses hibernate-like object-oriented code, therefore, the corresponding SQL statement is written below in the form of annotation, which is like this:
Directory structure of the implementation class (basically corresponds to the model ):
It is worth mentioning that,
<1> the password is encrypted with MD5. I originally wanted to simply save a string, but after all, although the sparrow is small, it simply uses MD5 encryption;
<2> all of the above implementation classes use spring's automatic Injection Technology (and @ autowired shown in Annotation)
<3> User Logon does not involve cookies, but simply uses session for storage.
<4> the small problem described earlier is that the sessionfactory cannot be loaded due to package conflicts, because the model is generated using hibernate reverse engineering, so I introduced several packages in the core stack of hibernate, which conflicted with the hibernate package I added myself.
After all, there are too many codes to post them all here. After the younger brother completes, he will upload them to share with you. OK, go for lunch ~