As mentioned above: After copying the project, it should be no problem to directly import it with idea (the project's folder and package structure must be correct). After modifying the mysql driver and database resource files in the pom according to your needs, you can deploy it to tomcat to run!
Student Information Management System ( layUI + servlet + jdbc )
Development using native servlets as backend
- The backend uses pure servlets for development, and is also paired with native jdbc. The entire architecture does not use any framework, which can be said to be very primitive;
- The verification code tool class can return the verification code picture and verification code content. The database connection tool class can return a method to connect the database and close the database connection (but the encapsulation and design pattern are not good. Although it is thread-safe, it will frequently create database connections, which is very expensive). There is also a tool class that uses gson to convert the request data into a json string;
- The Dao layer is a single table CURD, so there is no complicated business, so there is no transaction processing;
- The business layer and the control layer here are almost coupled together. The method of one business and one servlet causes serious code redundancy and resource waste. The correct method is to use path matching and if-else method matching in a servlet respectively;
- Typical front-end and back-end projects are not separated. The front-end integrates layui and jquery to achieve very exquisite and pleasing effects, especially the login module and the entire back-end module are relatively exquisite, but during the development process, you can clearly feel that the front-end development is difficult than the back-end!
- The use of util.date and sql.date at the same time is a big failure, which has caused problems in many places to convert formats (you can change them to util.date and then use @JsonFormat and @DateTimeFormat annotation, and use datetime in the database field). The latter is a subclass of the former.
- This is my corporate homework for the first semester of my junior year. The whole project is original. As you can see, except for the slightly better front-end, it has no advantages. Even the CURD, which has the largest number of codes, is popular in frameworks. Now, it can be quickly implemented with mybatis reverse engineering or MP, so the teacher also has a low evaluation of the project (but he teaches servlets and jsp. He said that using spring can add points, so I went to learn the framework from the beginning. I was so angry! Just kidding!). At that time, I was so obsessed with trying hard to do the front-end. I even forgot that I should focus on the back-end. I didn’t do much in complex business (that kind of multi-table joint checking). I saw other classmates starting to use spring and mybatis at that time. In comparison, I was too low! Haha, but I don’t regret it. After all, servlets are more biased towards the underlying level than springmvc. As an introductory learning, using servlets in the entire project can also lay the foundation for the subsequent framework learning. However, it is still not appropriate to spend a lot of time on the front end. Although the front end has learned a lot, you must always serve the back end. Working hard is important, choice is even more important!
Note: MySQL5 to mySQL8 have made many improvements, not only installation and configuration, but also many changes in their connection driver packages.




