Git Product home page Git Product logo

free_generator's Introduction

free_generator

a free code-generator for spring MVC. automatic create dao/model/mapper. you can custom everything you need

HOW TO BEGIN

git clone xxxxx
cd free_generator
mvn clean package

after build success,then:

cd target

then vim yourself config.properties follow next;

cd free_generator-release
java -jar free_generator.jar

then here come files now!

CONFIG.PROPERTIES

config.properties the mainly config file

config.properties:
------------------

### some default config,most of time you don't need to change this,however,except you really need.

#default file suffix,don't add fileType here
model_suffix=               //the suffix of model,default null
mapper_xml_suffix=Mapper    //the suffix of xml,default Mapper,for e.g.,StudentMapper
dao_suffix=Dao              //the suffix of dao,default Dao,for e.g.,StudentDao, someone maybe still need Mapper

#use lombok or not
is_lombok=false             //if use lombok,default false

#is hump name style
is_hump_model_class=true    //is a hump name stylefor model class
is_hump_column=true         //is a hump name style for column in model

#is there a init sql in dao and xml,do it for get all columns as a string show.
is_init_query=true          //is a default query in xxxDao and xxMapper
init_query_name=select      //method name in xxxDao

--------------------

##### write
##### your
##### config
##### next

#show in comment
author=lousama      //show in comment

# model/mapper/mapperXml/dao package path
# is wrapper class in model,example:Integer/int,default false
is_wrapper=false    //is wrapper class type to modified column in model,e.g.,Integer/Long,or int/long
# prefix of package path
package_prefix=com.lousama.generator    //prefix of the package

# package_path = {package_prefix} + next value,set {package_prefix} null if you wanna define next
package_model=model         //last package name of class
package_mapper_xml=mapper
package_dao=dao

# jdbc info,support mysql and oracle now
jdbc_database=mysql         //mysql or oracle
jdbc_url=localhost:3306/config      //ip:port/dbname
jdbc_username=root
jdbc_password=root
jdbc_table=     //table schema you want to generator,get all tables if be null

SUPPORT COLUMN TYPE

the next database column type can be parse correctly

  • int/integer/smallint/tinyint
  • bigint/long
  • varchar/varchar2
  • number/numeric/decimal/double/float
  • timestamp/datetime/date

##TIPS

Better not connect database on product enviroment!

free_generator's People

Contributors

lousama avatar

Stargazers

 avatar

Watchers

 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.