Coder Social home page Coder Social logo

mybatisdaogenerator's Introduction

MyBatisDaoGenerator

描述

根据数据库元数据,为使用 Mybatis 的项目生成 MappperDaoDaoTestModel 等代码文件。

使用

将该项目作为 Maven 项目导入到 IDE 中,修改 Launcher 类中的各项参数,然后运行。

实现

一般来说,Java Web 项目的 Dao 层比较固定。当数据库模型建立好之后,实体类和 Dao 等可以按照一定的约定被自动创建。当我们使用 Mybatis 作为数据持久化框架时,往往需要些写大量的字段映射和基础的增删改查。这部分工作可以由代码帮助我们完成。

该项目从数据库元数据获取数据库表信息,按照常见的约定对获取的信息进行处理,将处理后的数据渲染到事先定义好的模版中生成代码文件。

可以修改模版文件以应对实际的需求。

示例

sample 目录中包含了一个示例, db 目录下包含了使用的数据库,generated code 是根据这个数据库自动生成的代码。

mybatisdaogenerator's People

Contributors

lucas-su-dev avatar

Stargazers

 avatar

Watchers

 avatar  avatar

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.