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!
CRM Customer Management System ( spring + springMVC + mybatis )
Upgraded the original project using SSM
- Since spring-mybatis and spring-tx have ensured the thread safety and transaction processing of SQLSession, related tool classes such as dynamic proxy and transaction rollback have been cancelled. At the same time, spring-mybatis has implemented the Dao layer using dynamic proxy and reflection, and can directly inject the Dao layer into the business;
- The enhanced controller class GlobalExceptionResolver using @ControllerAdvice can catch all exceptions of ordinary controllers and return the relevant exception information according to the original request path;
- While using spring annotations in the business layer and control layer, it greatly reduces the coupling and redundancy of codes, reflecting the IOC and dependency injection ideas of spring;
- The reason why spring interceptor is not used here is that the spring interceptor only intercepts the classes annotated by @Controller, and does not intercept jsp. Therefore, spring advocates putting jsp files in the WEB-INF folder, so the original servlet filter is used here;
- WebApplicationContextUtils can easily remove spring containers from servlet containers;
- Writing configurations of some objects that will not be created repeatedly (somewhat singleton means) in spring's configuration files is a typical IOC idea. Of course, you can also use configuration classes without the configuration files;
- Here, you need to configure the relevant configuration in the mybatis configuration file before you can output the mybatis log;
- SSM-based test classes also need to perform related configurations, which is closely related to spring containers. Fortunately, there are related dependencies to support this configuration. This situation is much better in springboot, and springboot is almost done in one go;
- Although the front-end uses JSTL and EL expressions and even java scripts, it is still a project that does not separate the front-end and back-end. During development, you will obviously feel that front-end development is more difficult than back-end. This is also one of the reasons why we advocate the separation of front-end and back-end. The combination of Vue and springbooot can significantly alleviate this difference;
- In general, the whole project is a very good project. The details from in-depth MVC ideas to front-end and back-end to databases are very good. Unfortunately, the use of spring-AOP is not involved (because the project does not need this overall, if you force it to be used, you can do your own logs). Although some companies are still using SSM, the mainstream of spring today is springboot + various middleware and application layers. The main benefit of learning SSM now is to understand some of the underlying layers and ideas of spring, because springMVC simplifies servlets, springboot simplifies springMVC, and the powerful function of springboot is to encapsulate the underlying layers. OK, I won’t talk nonsense. It took almost 21 days to build the environment to the final Echarts, and it took about 4 hours a day on average (the time to learn new things is not included). SSM was learned from Mr. Wang He (a very good teacher) last year, and his courseware played a big role. There are many problems in the entire project that are late to realize. For example, there are many connection methods for the control layer to receive front-end parameters. It was not until the end that I realized, "Oh, it can be used like this..." Finally, the entire project is equivalent to one-third of the original project. The core development idea is from the teacher. I just use SSM and some of my ideas to improve it. Since it focuses on learning, some small problems such as naming, paths, etc. will inevitably arise in the project. Fortunately, it will not affect the general use in the end. OK, let's see you in the next springboot distributed project! (If there is something wrong with the above, please feel free to correct me!)”
Note: After completing the "marketing activities" module, students will definitely find that the remaining business needs to be rewrite a large number of additions, deletions, modifications and checks are very troublesome. If you don't write it, you will just write data directly into the database like a teacher (I feel very uncomfortable). Therefore, I aim to implement the core business and write the addition, deletions, modifications and checks that best show the core business implementation process. Because I need to deploy to the server for everyone to operate, I deleted all controls and pages that were not available on the front end. The whole project is very refreshing and only the core business is left.
Power node offline information
Bilibili online courses




