MyBatisPlus常用配置
基础配置
configLocation
指定Mybatis配置文件的位置
mybatis-plus.config-location = classpath:mybatis-config.xml
mapperLocations
指定MybatisMapper对应的XML文件的位置
Maven 多模块项目的扫描路径需以 classpath: 开头 (即加载多个 jar 包下的 XML 文件)*
mybatis-plus.mapper-locations = classpath*:mapper/*.xml
typeAliasesPackage
指定Mybatis别名包扫描路径,可以给包中的类注册别名为类名,XML中即可不写全限定类名
mybatis-plus.type-aliases-package = ltd.lccyj.domain
进阶配置
以下配置大多为Mybatis原