https://baomidou.com/
pom 依赖必选:
com.baomidou mybatis-plus-boot-starter
可选:代码生成器可选(用图形化则可以不用这个依赖)
com.baomidou mybatis-plus-generator
版本:
yaml配置3.4.2 3.5.1
mybatis-plus:
mapper-locations:
- classpath:mapper/*.xml #只会到你的class路径中查找找文件
#- classpath*:commapper); // 设置过滤表前缀
})
.templateEngine(new FreemarkerTemplateEngine()) // 使用Freemarker引擎模板,默认的是Velocity引擎模板
.execute();
图形化界面方式
- 在idea中连接数据库,选自己要自动生成代码的表,右键,选第一个,如图:
配置路径、包名其他配置



