Git Product home page Git Product logo

create-all's Introduction

create-all

代码生成器,想你所想

简介

这是一个代码生成器,基于Blade MVC框架编写,可生成dao、service、controller各层的基础框架,目前生成的代码只支持MySQL。

打包

mvn clean package -DskipTests

部署

java -jar create-all.jar

效果图

生成的代码

举个controller层的代码实例

/**
 *
 * @author YI
 * @date 2018-11-16 16:04:48
 */
@RestController
@RequestMapping("/baike")
public class BaikeController {
    @Resource
    private BaikeService baikeService;

    @PostMapping("/add")
    public MessageResult add(Baike baike) {
        baikeService.save(baike);
        return MessageResult.ok();
    }

    @PostMapping("/delete")
    public MessageResult delete(Integer id) {
        baikeService.deleteById(id);
        return MessageResult.ok();
    }

    @PostMapping("/update")
    public MessageResult update(Baike baike) {
        baikeService.update(baike);
        return MessageResult.ok();
    }

    @PostMapping("/detail")
    public MessageResult detail(Integer id) {
        Baike baike = baikeService.findById(id);
        return MessageResult.ok(baike);
    }

    @PostMapping("/list")
    public MessageResult list(Integer page, Integer size) {
        PageHelper.startPage(page, size);
        List<Baike> list = baikeService.findAll();
        PageInfo pageInfo = new PageInfo(list);
        return MessageResult.ok(pageInfo);
    }
}

问题建议

create-all's People

Contributors

dependabot[bot] avatar hwywl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  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.