GithubHelp home page GithubHelp logo

Comments (4)

davidfantasy avatar davidfantasy commented on September 29, 2024

从图上看不出来报的是什么错,看起来是因为类文件名称和类名不一致导致的,你在自定义输出文件的时候,模板是使用的entity的模板,如果没有在模板中修改类名的生成规则,DTO名称还是会延用的Entity的名称规则,导致和你定义的DTO文件的命名规则不一致。

from mybatis-plus-generator-ui.

xyhuangjia avatar xyhuangjia commented on September 29, 2024

从图上看不出来报的是什么错,看起来是因为类文件名称和类名不一致导致的,你在自定义输出文件的时候,模板是使用的entity的模板,如果没有在模板中修改类名的生成规则,DTO名称还是会延用的Entity的名称规则,导致和你定义的DTO文件的命名规则不一致。

很多同学是没时间和精力或者能力去自定义模版的,我个人觉得我们可以提供一套基于五个基础模版快速生成代码的方式

from mybatis-plus-generator-ui.

davidfantasy avatar davidfantasy commented on September 29, 2024

mybatis-plus-generator框架内置的支持也只有Entity,Mapper,Mapper.xml,Service,Controller这五种,单独为数据表生成一个DTO对象不是普遍的需求,1.1.0版本加上了可以根据SQL查询结果自动生成DTO对象的功能我觉得基本就够了。后续如果有更多人提出再考虑增加内置模板。

from mybatis-plus-generator-ui.

xyhuangjia avatar xyhuangjia commented on September 29, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.