Java student information management system design (2)
The student information of this example is added to the transaction entering the database (the transaction can be committed and rolled back, which can be improved with local threads)
Main page index jsp
tool kit
Tool for obtaining database connection connutils5 java
agent
Agent 2: there is no need for forced transfer, but it represents all
annotation
Agent 3: implement transactions with annotations, and use transactions if necessary
Resource file JDBC properties
The servlet layer of the study layer cqueryservlet java
Service layer C interface of study layer:
Implementation class
The Dao layer C of the study layer is separated from the study interface C. one table corresponds to one Dao to prepare for the framework
Student implementation class
Book interface
Book implementation class
Value object Student object
Book object
Display the student information page JSP / show jsp
design sketch:
The above is the whole content of this article. I hope it will be helpful to your study, and I hope you can support programming tips.