Giter VIP home page Giter VIP logo

swiftech / swiftboot Goto Github PK

View Code? Open in Web Editor NEW
9.0 3.0 1.0 1.63 MB

基于Spring Boot,Spring MVC,Spring Data 的企业Web应用快速开发开发框架。A rapid development framework based on Spring Boot, Spring MVC and Spring Data for enterprise

License: Apache License 2.0

Java 98.33% HTML 1.62% Shell 0.05%
java spring jpa restful mvc rad spring-boot spring-mvc spring-data redis shiro excel-export excel-import authentication poi

swiftboot's Introduction

SwiftBoot

A lightweight rapid development framework based on Spring Boot, Spring MVC and Spring Data for enterprise

基于 Spring Boot,Spring MVC,Spring Data 的企业Web应用快速开发框架。

为什么要有 SwiftBoot

  • 虽然用 SpringBoot 搭建框架进行开发已经简化了很多配置的工作,但是对于大多数中小型的项目来说来,还是有一些重复性的工作。
  • 开源社区中已经有很多快速开发框架,它们功能很多但是太过于臃肿并且侵入性很强。
  • SwiftBoot 采用一种折中的理念,它并不会覆盖到开发的方方面面,但是它提供必要的和常见的功能支持,以减少重复性的工作和提高开发质量。

特性

  • 开箱即用,只需要很少的配置即可使用,用更少的代码完成更多的工作。
  • 无侵入性,你可以只使用其中的一部分功能,也可以随时去掉它或者切换为别的框架。
  • 统一的接口格式(JSON)和错误代码,默认采用前后端分离。
  • 接口的返回值对象,实体对象自动填充。
  • 自动验证输入参数并自动转换为统一的返回格式。
  • 主键ID自动生成,字段自动填充机制。
  • 提供常见的服务(例如 Redis服务,用户认证等等),减少不必要的重复开发工作,关注核心业务逻辑。
  • 提供基本的用户认证(基于 Redis),可用于 Web 和移动应用的用户认证。
  • 提供基于 Shiro 框架的用户认证和授权,简化 Shiro 框架的使用。
  • 表格数据模版化导入导出,支持 Excel, CSV。
  • 企业 Web 开发常用的工具类和集合类。

模块

基础模块:
扩展模块:
Demo:
  • swiftboot-demo:演示项目,可以作为脚手架快速搭建新项目

版本

Stable: v2.3.1
  • [utils] Add CalcUtils for calculating.
  • [utils] Add support for Reader to IoUtils.
  • [utils] Add readAllAsString() method to BufferedIoUtils.
  • [collections] Improve the CollectionUtils.toLinkedList() method.
  • Dependencies update:
    • SpringBoot 2.7.12
    • SpringDataJPA 2.7.9
    • Hibernate 5.6.14.Final
    • Jedis 4.3.1
    • Poi 5.2.3
    • JSON 20220320
    • etc.
Unstable: v2.4.7

v2.4.7

  • [utils] add getPreferenceAlias() methods to PreferenceManager for migrating preferences.

完整更新记录

概览

  • 入参自动填充

    • 从接口的 Command 对象创建 Entity 实例并自动填充传递进来的值:
    OrderEntity p = orderCommand.createEntity();
    orderRepository.save(p);
    • 编辑实体对象时调用 populateEntity() 方法,此实体类一对一、一对多关联的实体类(集合)也会被自动创建和填充 :
    orderEntity.getDetails().clear();
    orderCommand.populateEntity(orderEntity);
    orderRepository.save(p);

一对一,一对多关联的实体类(集合)也会被自动创建和填充 详细参考: swiftboot-web

  • 从 Entity 实例创建返回值对象并自动填充值:

    OrderResult r = OrderResult.createResult(OrderResult.class, orderEntity);

    一对一或一对多关联的实体类(集合)也会自动填充返回值对象的关联类(集合) 详细参考: swiftboot-web

  • 字段自动填充

    • ID 自动填充,创建 Entity 实例时无需调用生成器生成 ID,SwiftBoot 会自动创建并填充。
    • 全局 ID 生成器,生成如 order20191231000850307uxplsioasi 的长度为 32 字节的全局ID,比 UUID 有更好的插入性能且易于识别出所对应的业务对象以及创建时间。
    • 保存实体类时创建时间和修改时间自动填充。

详细参考: swiftboot-data

  • 认证和授权:

    • 如果仅需要认证机制,那么集成 swiftboot-auth 模块
    • 如果不仅需要认证,还需要授权,那么集成 swiftboot-shiro 模块

    两个模块不能同时启用,且他们的认证实现机制不同

swiftboot's People

Contributors

allenwang-minglabs avatar dependabot[bot] avatar swiftech avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

missaouib

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.