Git Product home page Git Product logo

springboot-mybatis-demo's Introduction

Licence

简介

基于Spring Boot & MyBatis的项目,用于快速构建中小型Restful API项目,减少重复劳动,专注于业务代码的编写。

特征 & 提供

  • 代码生成器(一键生成代码)
  • 集成MyBatis、通用Mapper插件、PageHelper分页插件,实现单表零SQL
  • 集成Druid数据库连接池与监控
  • 日志拦截、登录拦截
  • 统一异常处理
  • 统一响应结果封装
  • 统一的API接口文档
  • 常用工具类
  • 其他

快速开始

  1. 克隆项目
  2. 执行 db/data.sql
  3. 修改 application-local.yml、 config.properties中数据库用户、密码
  4. 运行CodeGenerator.main()方法生成代码
  5. 启动项目 访问 http://localhost/doc.html

效果

开发建议

  • 表名小写,多个单词使用下划线分隔
  • Model内成员变量DO与表字段对应,VO对外展示,DTO用于项目中信息的传输,之间使用dozer转换
  • 业务失败直接抛出BizException("message"),由统一异常处理器来封装业务失败的响应结果,比如throw new BizException("该手机号已被注册")
  • 需要工具类的话先从apache-commons-*guava中找,没有再造轮子或引入类库,尽量精简项目
  • 开发规范遵循阿里巴巴Java开发手册(最新版下载)
  • 使用Swagger2(官网简介) 管理API文档

技术选型 & 文档

其他

springboot-mybatis-demo's People

Contributors

duanxq1994 avatar

Watchers

James Cloos 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.