Design of Staff Management System Based on SSM (including source files)

Welcome to add WeChat to communicate with each other and learn!

QR code

Project source code: https://gitee.com/oklongmm/biye

  First of all, the UI of the page is quickly built using the Bootstrap framework. This framework is still relatively easy to use, not only fast, but also beautiful, and the style is flat. And for my kind of English scum, there is a Chinese help document, it is not too easy to get started, and then the general rendering of the built is as shown in 1-1, of course, the built is only a static page, the following data, The button_click event of the button is written later.

Picture 1-1

  Then we will introduce the specific process of introducing the SSM framework. Because it is accessed locally and not placed on a networked server, Tomcat is used as the server. The project front-end initiates a request, sends it to the SpringMVC front-end controller, and then is controlled by the SpringMVC front-end The server judges whether it can be processed, and if it can be processed, it will be sent to the Controller. If it cannot process static pages, it will be sent directly to the Tomcat server for analysis by the server. The data sent to the Controller calls the business logic of the Service layer. If you want to interact with the database layer, hand it over to the components of the Dao layer, and the components of the Dao layer are written in MyBatis, and a certain Mapper of MyBatis then interacts with the database. At the same time, these Mapper files and The interfaces are all automatically generated by MyBatis Generator (MBG), but because there are multiple table joint queries when querying, two new methods have been written in the xml file to implement multi-table joint queries. At the same time, basic additions, deletions, and changes are implemented through Ajax. Ajax sends a request, then returns to Json, and uses JS to parse the Json and display it on the page.

  The project uses Maven for dependency management. Simply put, it is to download the jar package required by the project through Maven. At the same time, after the project is completed, you can use Maven to build the war package so that the project is deployed on the real server instead of in Eclipse. Mirror server.

  The general construction is over, let’s talk about the points of attention in the actual use of the project. When adding new employees, the front-end and back-end verification methods can be used to greatly avoid the addition of dirty data. At the same time, some Regular expressions to determine whether the name and mailbox are legal. To pass the Ajax request sent by the front end to the background for processing, you only need to add @ResponseBody and @RequestMapping ("path suffix") to the method.

  Finally, the realization of the legend demonstration.

  Implementation of employee addition function:

  The realization of the modification function:

  Implementation of single deletion:  

  batch deletion:

  

 

Guess you like

Origin blog.csdn.net/weixin_55459367/article/details/114103935