![7d351d2428d6fd9934f8bdb2cd867171.png](https://img-blog.csdnimg.cn/img_convert/7d351d2428d6fd9934f8bdb2cd867171.png)
1.新建子模块entity
1.1右键—>New—>Module
![fdbd8f4f71aee722afd63c456aaee433.png](https://img-blog.csdnimg.cn/img_convert/fdbd8f4f71aee722afd63c456aaee433.png)
1.2选择Maven—>Next
![384bb6a773145a9841f5008ea530af84.png](https://img-blog.csdnimg.cn/img_convert/384bb6a773145a9841f5008ea530af84.png)
1.3 输入GroupId(com.dyp.entity),ArtifactId(dyp-entity)—>Next
![0cd1c11a9b69b75ab9df4f3f195b48b2.png](https://img-blog.csdnimg.cn/img_convert/0cd1c11a9b69b75ab9df4f3f195b48b2.png)
1.4 输入Module name(dyp-entity)—>Finish
![54711f84c18af332445ac033a6dbb8a0.png](https://img-blog.csdnimg.cn/img_convert/54711f84c18af332445ac033a6dbb8a0.png)
1.5 Entity新建完成
![16fd151928590c12e7b3a754dd5cff5c.png](https://img-blog.csdnimg.cn/img_convert/16fd151928590c12e7b3a754dd5cff5c.png)
1.6 选择java--> New --> Package (com.dyp.entity)
![b4a271daa4c776620ba2a83b643dac7f.png](https://img-blog.csdnimg.cn/img_convert/b4a271daa4c776620ba2a83b643dac7f.png)
![05063947cfbac9c085848b7d42bb3e88.png](https://img-blog.csdnimg.cn/img_convert/05063947cfbac9c085848b7d42bb3e88.png)
1.7 打开dyp-entity --> pom.xml 添加mybatis-plus包
<dependencies>
<dependency>
<groupId>com.baomidougroupId>
<artifactId>mybatis-plusartifactId>
<version>2.0.7version>
dependency>
dependencies>
![22942bb6fcca7f319a07873d2a5d512a.png](https://img-blog.csdnimg.cn/img_convert/22942bb6fcca7f319a07873d2a5d512a.png)
1.8 把生成的实体类放进entity下
![646d4e77ef352a340d914614f2820241.png](https://img-blog.csdnimg.cn/img_convert/646d4e77ef352a340d914614f2820241.png)
![f6ee86944cb298e75bd6dbbd7bd215cc.png](https://img-blog.csdnimg.cn/img_convert/f6ee86944cb298e75bd6dbbd7bd215cc.png)
![150de00bd5b502280fe15f6ec4a5ecd9.png](https://img-blog.csdnimg.cn/img_convert/150de00bd5b502280fe15f6ec4a5ecd9.png)
2.新建子模块dao
2.1 右键—>New—>Module
![115677c7a94dd04940b9f7507c097b77.png](https://img-blog.csdnimg.cn/img_convert/115677c7a94dd04940b9f7507c097b77.png)
2.2 选择Maven—>Next
![c90aa475d288f75ef04bae2ace51e17f.png](https://img-blog.csdnimg.cn/img_convert/c90aa475d288f75ef04bae2ace51e17f.png)
2.3输入GroupId,ArtifactId—>Next
![95aef6336c86eb51b01b170571ee1404.png](https://img-blog.csdnimg.cn/img_convert/95aef6336c86eb51b01b170571ee1404.png)
2.4输入Module name—>Finish
![e41146081d856a69d0fa4070665d2701.png](https://img-blog.csdnimg.cn/img_convert/e41146081d856a69d0fa4070665d2701.png)
2.5 子模块dao创建完成
![e815bb2d5bc66a6baed5e5dd910440c6.png](https://img-blog.csdnimg.cn/img_convert/e815bb2d5bc66a6baed5e5dd910440c6.png)
2.6 导入相关的包pom.xml
<dependencies>
<dependency>
<groupId>com.dyp.entitygroupId>
<artifactId>dyp-entityartifactId>
<version>1.0-SNAPSHOTversion>
dependency>
<dependency>
<groupId>com.baomidougroupId>
<artifactId>mybatis-plusartifactId>
<version>2.0.7version>
dependency>
dependencies>
![bf480ca863aa3ee398014b347bca3e9e.png](https://img-blog.csdnimg.cn/img_convert/bf480ca863aa3ee398014b347bca3e9e.png)
![21b03c63e00787fd3f1108ab0008d894.png](https://img-blog.csdnimg.cn/img_convert/21b03c63e00787fd3f1108ab0008d894.png)
2.7 把生成的dao类复制到dao包下
![4c9de2e24bdf0a8cac80e76c8a94fad3.png](https://img-blog.csdnimg.cn/img_convert/4c9de2e24bdf0a8cac80e76c8a94fad3.png)
![af7e1a04c14a5dc0ce969019983079b9.png](https://img-blog.csdnimg.cn/img_convert/af7e1a04c14a5dc0ce969019983079b9.png)
![0de578d734464e581869b84dfb8137ea.png](https://img-blog.csdnimg.cn/img_convert/0de578d734464e581869b84dfb8137ea.png)
3.新建子模块service
3.1右键—>New—>Module
![6168ef3d607b1e34556c070f932edf03.png](https://img-blog.csdnimg.cn/img_convert/6168ef3d607b1e34556c070f932edf03.png)
3.2选择Maven—>Next
![324b91c13ab7da1b16cc7480283b7008.png](https://img-blog.csdnimg.cn/img_convert/324b91c13ab7da1b16cc7480283b7008.png)
3.3输入GroupId,ArtifactId—>Next
![187559424587cb3ae5eabdfdf2859460.png](https://img-blog.csdnimg.cn/img_convert/187559424587cb3ae5eabdfdf2859460.png)
3.4 输入Module name—>Finish
![beb1f24eabe3da1385f9cbb32432f4cf.png](https://img-blog.csdnimg.cn/img_convert/beb1f24eabe3da1385f9cbb32432f4cf.png)
3.5 子模块service创建完成
![40ffb5941552205e92221cc678921de7.png](https://img-blog.csdnimg.cn/img_convert/40ffb5941552205e92221cc678921de7.png)
3.6 添加包引用
<dependencies>
<dependency>
<groupId>com.dyp.entitygroupId>
<artifactId>dyp-entityartifactId>
<version>1.0-SNAPSHOTversion>
dependency>
<dependency>
<groupId>com.baomidougroupId>
<artifactId>mybatis-plusartifactId>
<version>2.0.7version>
dependency>
dependencies>
![663dbe6349a43c5f0acf406a0a2ce806.png](https://img-blog.csdnimg.cn/img_convert/663dbe6349a43c5f0acf406a0a2ce806.png)
3.7 java右键-->New --> 添加package
![91817aa50ad64260d7e14e65e986862f.png](https://img-blog.csdnimg.cn/img_convert/91817aa50ad64260d7e14e65e986862f.png)
![e0666ea61856e951907246fd17e01b55.png](https://img-blog.csdnimg.cn/img_convert/e0666ea61856e951907246fd17e01b55.png)
3.8 把生成的代码复制到service包下
![db06c3be0c073412b0b1413f69e743fb.png](https://img-blog.csdnimg.cn/img_convert/db06c3be0c073412b0b1413f69e743fb.png)
![7d7b34945f27d9fe0149d23ccc616b01.png](https://img-blog.csdnimg.cn/img_convert/7d7b34945f27d9fe0149d23ccc616b01.png)
![7b1c1e274cc6ed96d7f22b7e86d2e5d4.png](https://img-blog.csdnimg.cn/img_convert/7b1c1e274cc6ed96d7f22b7e86d2e5d4.png)
1. 新建子模块serviceImpl
4.1右键—>New—>Module
![bf190d14e3248bf263991efd6aaf11d8.png](https://img-blog.csdnimg.cn/img_convert/bf190d14e3248bf263991efd6aaf11d8.png)
4.2 Maven—>Next
![9c1a2eefe818009346f504d06f3d5f60.png](https://img-blog.csdnimg.cn/img_convert/9c1a2eefe818009346f504d06f3d5f60.png)
4.3 输入GroupId,ArtifactId 点击 Next
![02d307d72e793ca1e13292c688538f95.png](https://img-blog.csdnimg.cn/img_convert/02d307d72e793ca1e13292c688538f95.png)
4.4 输入Module name点击 Finish
![2747e5f86d337034e2239fd6aca88133.png](https://img-blog.csdnimg.cn/img_convert/2747e5f86d337034e2239fd6aca88133.png)
4.5 导入相关的包索引 pom.xml
<dependencies>
<dependency>
<groupId>com.dyp.servicegroupId>
<artifactId>dyp-serviceartifactId>
<version>1.0-SNAPSHOTversion>
dependency>
<dependency>
<groupId>com.dyp.daogroupId>
<artifactId>dyp-daoartifactId>
<version>1.0-SNAPSHOTversion>
dependency>
<dependency>
<groupId>com.dyp.entitygroupId>
<artifactId>dyp-entityartifactId>
<version>1.0-SNAPSHOTversion>
dependency>
<dependency>
<groupId>com.baomidougroupId>
<artifactId>mybatis-plusartifactId>
<version>2.0.7version>
dependency>
<dependency>
<groupId>com.baomidougroupId>
<artifactId>mybatisplus-spring-boot-starterartifactId>
<version>1.0.4version>
dependency>
dependencies>
![e306e4fcf250401668dccd4ed4cf16a1.png](https://img-blog.csdnimg.cn/img_convert/e306e4fcf250401668dccd4ed4cf16a1.png)
4.6 java右键-->New --> 添加package
![e41942c1bab6736b42d52a9e4fb1cf86.png](https://img-blog.csdnimg.cn/img_convert/e41942c1bab6736b42d52a9e4fb1cf86.png)
![60a6364ff2c4d5964b2961706ea0787a.png](https://img-blog.csdnimg.cn/img_convert/60a6364ff2c4d5964b2961706ea0787a.png)
4.7 把生成的代码复制到serviceImpl包下
![a1ff705365895e26d3083d068f7daa2e.png](https://img-blog.csdnimg.cn/img_convert/a1ff705365895e26d3083d068f7daa2e.png)
![f4da2f660e27a8dfb91ce774f386c8a1.png](https://img-blog.csdnimg.cn/img_convert/f4da2f660e27a8dfb91ce774f386c8a1.png)
![2544186dd58996827cf54da28932e671.png](https://img-blog.csdnimg.cn/img_convert/2544186dd58996827cf54da28932e671.png)