mybatis-plus-generator模版

使用代码生成器生成代码,默认模版位置

复制代码
/templates/entity.java

默认使用库包中的模版文件,需要使用自定义模版时,在resources目录下定义同名模版文件可替换

某次运行时一直无法找到模版文件,之后发现是项目结构错误

错误的项目结构如下

原来只有code模块,代码生成器可正常运行,后来新增了两个子模块,code打包方式改为pom,因此运行时/无法映射resources目录

更改为以下结构可正常运行

相关推荐
cyforkk7 小时前
MyBatis Plus 字段自动填充:生产级实现方案与原理分析
mybatis
九皇叔叔7 小时前
【03】SpringBoot3 MybatisPlus BaseMapper 源码分析
java·开发语言·mybatis·mybatis plus
马猴烧酒.12 小时前
【Mybatis出现bug】应为 <statement> 或 DELIMITER,得到 ‘id‘
java·bug·mybatis
一只程序熊13 小时前
SpringBoot class java.lang.String cannot be cast to class java.lang.Long
spring·mybatis
赵得C14 小时前
Tauri 中嵌入百度网页:从 iframe 到 Webview 的迁移实践
spring boot·mybatis·tauri·桌面开发
小北方城市网15 小时前
MyBatis-Plus 生产级深度优化:从性能到安全的全维度方案
开发语言·redis·分布式·python·缓存·性能优化·mybatis
信码由缰15 小时前
MyBatis Dynamic SQL 入门指南
python·sql·mybatis
九皇叔叔16 小时前
【04】SpringBoot3 MybatisPlus 查询(Mapper)
java·mybatis·mybatis plus
SamRol18 小时前
达梦数据库指令 及 在Spring Boot + MyBatis-Plus上的使用
java·数据库·spring boot·mybatis·达梦·intellij idea