Code Monkey home page Code Monkey logo

codefactory's Introduction

codeFactory

概述:

  • 1.codeFactory: Java代码生成,依赖rapid-generator.4.0.6.jar, 支持自定义模板生成代码, 弱业务下完全解放体力劳动.集成分页插件.
  • 2.ssm模板实现:pojo,dao,daoimpl,service,serviceimpl,controller,各mapper.xml 代码自动生成.
  • 3.配置文件自动生(含:spring,springMVC,mybatis,web.xml); 代码完美运行.

使用:

  • 1.配置generator.xml(key):

    basepackage
    namespace
    outRoot
    jdbc_username,jdbc_password,jdbc_url(默认MySQL库)
    
  • 2.CodeGenerator类

     g.generateByTable("tb_admin","tb_city");//方法传参(table表名),支持批量传参和单表操作)
    
  • 3.main方法运行CodeGenerator类,在配置的outRoot输出路径找到生成代码,复制到对应项目包下.页面${page.list}获取绑定值, (page是controller绑定的参 数, 分页插件写法)

注:如果数据库字段类型为decimal,但无小数位(如decimal(10,0) ),rapid-framework在生成javabean时该字段会使用Long而非BigDecimal

codefactory's People

Contributors

liuzhongpo avatar

Stargazers

Leeyom Wang avatar

Watchers

James Cloos avatar

codefactory's Issues

README.md 写的不是很详细~

README.md 感觉写的不是很详细, 看了让人不知所以然~建议可以写的更完善一点哦~另外还有个问题是,我配置好后,运行CodeGenerator.java报错:

[delete dir]    target/generator-output
Exception in thread "main" cn.org.rapid_framework.generator.provider.db.table.TableFactory$NotFoundTableException: not found table with give name:push_message
 current DataSource: url=jdbc:mysql://127.0.0.1:3306/springboot-shiro-demo?useUnicode=true&characterEncoding=UTF-8 username=root current schema:null current catalog:null
	at cn.org.rapid_framework.generator.provider.db.table.TableFactory.getTable(TableFactory.java:134)
	at cn.org.rapid_framework.generator.provider.db.table.TableFactory.getTable(TableFactory.java:115)
	at cn.org.rapid_framework.generator.provider.db.table.TableFactory.getTable(TableFactory.java:111)
	at cn.org.rapid_framework.generator.GeneratorFacade$ProcessUtils.processByTable(GeneratorFacade.java:241)
	at cn.org.rapid_framework.generator.GeneratorFacade.generateByTable(GeneratorFacade.java:122)
	at codefactory.CodeGenerator.main(CodeGenerator.java:18)

Process finished with exit code 1
// 通过数据库表生成文件
g.generateByTable("push_message");

这一句的作用是?

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.