be used for 2 Time of day , Integrating the framework , There are many small problems in the process , They don't come together .
To build this framework, I used a little tool , It's called generator. This tool is to cooperate with MyBatis With , It's really nice , Can help you automatically generate a lot of code , It greatly reduces your workload .
generator You can download it in the link below .
The method is simple to use , The generated statements are also there. A file has . Modify that generator.xml, There are detailed explanations in it 、 Then run the generated statement .
I won't introduce it here .
In this project , I just want to integrate a framework , It is convenient to use when setting up projects in the future .
sql Statement in project /src/main/ Under the table of contents — It uses MySQL.
function generator Before automatically generating code , You need to build the database first .
The framework has been queried , Insert the test ,SpringMVC Also tested , No problem .
For enquiries , It's written in association query . You can refer to it , There are detailed explanations ！ Inside SpringMVC,Spring,MyBatis,log4j All the configuration files have detailed comments ！
This project has written 2 A version , The first is easy to learn , The association query inside uses 3 Chinese style writing .
The second version is convenient for you to modify , Only one version of the associated query is left .
Project links :
This article is written by [ Familiar with memory ] To write , All rights reserved . Welcome to reprint , Sharing is the source of progress .
Participation of this paper Tencent cloud media sharing plan , You are welcome to join us , share .