Comments (4)
从图上看不出来报的是什么错,看起来是因为类文件名称和类名不一致导致的,你在自定义输出文件的时候,模板是使用的entity的模板,如果没有在模板中修改类名的生成规则,DTO名称还是会延用的Entity的名称规则,导致和你定义的DTO文件的命名规则不一致。
from mybatis-plus-generator-ui.
从图上看不出来报的是什么错,看起来是因为类文件名称和类名不一致导致的,你在自定义输出文件的时候,模板是使用的entity的模板,如果没有在模板中修改类名的生成规则,DTO名称还是会延用的Entity的名称规则,导致和你定义的DTO文件的命名规则不一致。
很多同学是没时间和精力或者能力去自定义模版的,我个人觉得我们可以提供一套基于五个基础模版快速生成代码的方式
from mybatis-plus-generator-ui.
mybatis-plus-generator框架内置的支持也只有Entity,Mapper,Mapper.xml,Service,Controller这五种,单独为数据表生成一个DTO对象不是普遍的需求,1.1.0版本加上了可以根据SQL查询结果自动生成DTO对象的功能我觉得基本就够了。后续如果有更多人提出再考虑增加内置模板。
from mybatis-plus-generator-ui.
mybatis-plus-generator框架内置的支持也只有Entity,Mapper,Mapper.xml,Service,Controller这五种,单独为数据表生成一个DTO对象不是普遍的需求,1.1.0版本加上了可以根据SQL查询结果自动生成DTO对象的功能我觉得基本就够了。后续如果有更多人提出再考虑增加内置模板。
OK,目前我们公司中台要求内部数据要求全是以DTO结尾,里面实质是还是Entity的内容。
from mybatis-plus-generator-ui.
Related Issues (20)
- 希望支持boot3.0 的druid
- 启动报错 HOT 1
- 请问下 为什么不以starter的形式使用呢
- 启动后访问首页报错,table表格无数据 HOT 1
- 能不能实现修改entity类名称后不影响其他类
- 启动报错 HOT 3
- 访问根路径显示hello word HOT 2
- SQL代码生成:只能通过查询语句生成DTO对象,请检查SQL HOT 1
- 能否实现动态连接数据库,生成的文件支持下载形式
- springboot3.0.x该怎么使用 HOT 1
- 启动报错 HOT 2
- 打不开页面 HOT 1
- 配置实体类自定义映射不生效
- 建议:最好封装一个jar包到release里面,降低与项目的耦合度。
- 下载btl模板文件报错
- 系统发生内部错误,请联系管理员 HOT 3
- 提示找不到模板
- 能放到idea插件中吗
- 生成代码时报错
- 是否考虑支持swagger2切换springdoc注解
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mybatis-plus-generator-ui.