1. Copy the following items into the project, or a certain folder.
2. Change generator.xml
(1) Change the location of the data driver package and select the directory you installed:
(2) Change the name of the database you want to connect to, the user and password of the database
(3) Change the place where the targetPakage is in the figure below, the place where the targetProject is located must exist, otherwise an error will be reported
(4) Fill in the tableName you want to fill in. domainObjectName fill in the name you want to generate.
3. Enter the command line window to run:
1. Enter the root directory of the project, or the folder created during the first step of operation.
Run the following command:
Normal results:
The above is the method of generating mapper, Dao, mapper.xml through generator in Mybatis introduced to you. I hope it will be helpful to you. If you have any questions, please leave me a message and the editor will reply to you in time. Thank you very much for your support to Wulin.com website!