Code Monkey home page Code Monkey logo

nownew / plasticene-boot-starter-parent Goto Github PK

View Code? Open in Web Editor NEW

This project forked from plasticene/plasticene-boot-starter-parent

0.0 0.0 0.0 270 KB

基于SpringBoot2.x、SpringCloud和SpringCloudAlibaba企业级系统架构底层框架封装,解决业务开发时常见的非功能性需求,防止重复造轮子,方便业务快速开发和企业技术栈框架统一管理。引入组件化的**实现高内聚低耦合并且高度可配置化,做到可插拔。严格控制包依赖和统一版本管理,做到最少化依赖。注重代码规范和注释,非常适合个人学习和企业使用

Home Page: https://github.com/plasticene/plasticene-boot-starter-parent/wiki

License: Apache License 2.0

Java 100.00%

plasticene-boot-starter-parent's Introduction

plasticene-boot-starter-parent

1.项目介绍

  • 基于SpringBoot2.x、SpringCloud和SpringCloudAlibaba企业级系统架构底层框架封装
  • 解决业务开发时常见的非功能性需求,防止重复造轮子,方便业务快速开发和企业技术栈框架统一管理。
  • 引入组件化的**实现高内聚低耦合并且高度可配置化,做到可插拔
  • 严格控制包依赖和统一版本管理,做到最少化依赖
  • 注重代码规范和注释,非常适合个人学习和企业使用。

实现功能概述:

  • 整合redis+caffeine实现多级缓存
  • 基于mybatis-plus封装实现分页、多租户插件,公共属性自动填充,复杂字段类型处理,字段数据加密,逻辑删除等。
  • 基于redis实现分布式限流注解,基于Redisson实现分布式锁注解,以及对redis常用命令和组件的封装
  • 实现license证书生成与检验,只需引入依赖,开箱即用
  • 实现web设置接口traceId实现链路追踪接口访问日志打印全局异常和响应结果统一处理封装,整合接口文档knife框架等
  • 自定义启动banner图案和控制台打印
  • 基于TransmittableThreadLocal封装线程池实现父子线程之间的数据传递
  • 封装公共pojo类、业务异常类、工具类

开发文档https://github.com/plasticene/plasticene-boot-starter-parent/wiki

Github地址https://github.com/plasticene/plasticene-boot-starter-parent

Gitee地址https://gitee.com/plasticene3/plasticene-boot-starter-parent

2.项目结构

模块结构

plasticene-boot-starter-parent -- 父项目
│  ├─plasticene-boot-starter-banner -- 图案
│  │─plasticene-boot-starter-cache -- 多级缓存
│  ├─plasticene-boot-starter-mybatis -- mybatis starter
│  ├─plasticene-boot-starter-redis -- redis starter
│  ├─plasticene-boot-starter-web -- web starter
│  ├─plasticene-boot-starter-license -- license starter
│  ├─plasticene-common -- 公共、基础

代码结构:

每个starter组件,包含两部分:

  1. core 包:组件的核心封装,拓展相关的功能。
  2. autoconfigure 包:组件的 Spring Boot 自动配置。

模块说明

模块 功能 文档
🚀 plasticene-boot-starter-parent 父项目,统一依赖版本管理 plasticene-parent
🚀 plasticene-boot-starter-banner 自定义项目启动图案,配置控制台打印相关信息等等
🚀 plasticene-boot-starter-cache 基于spring cache实现多级缓存 cache
🚀 plasticene-boot-starter-mybatis 基于mybatis-plus进行二次封装整合 mybatis
🚀 plasticene-boot-starter-redis 实现常规redis操作封装,基于redis实现分布式限流,基于redisson实现分布式锁 redis
🚀 plasticene-boot-starter-web 实现链路追踪traceId、接口请求日志打印、统计返回结构封装、全局异常处理、swagger配置等 web
🚀 plasticene-boot-starter-license license版权证书生成与验证 license
🚀 plasticene-common 定义公共pojo类、业务异常类、工具类,枚举,线程池等等

3.技术选型

框架 说明 版本
Spring Boot 应用开发框架 2.7.0
Spring Cloud 微服务开发框架 2021.0.3
Spring Cloud Alibaba 微服务开发框架 2021.0.1.0
Openfeign 声明式 REST 客户端 3.1.3
MySQL 数据库服务器 5.7
Druid JDBC 连接池、监控组件 1.2.8
MyBatis Plus MyBatis 增强工具包 3.5.2
Redis key-value 数据库 5.0
Redisson Redis 客户端 3.17.4
Spring MVC MVC 框架 5.3.20
Hibernate Validator 参数校验组件 6.1.5.Final
Knife4j Swagger 增强 UI 实现 3.0.2
Jackson JSON 工具库 2.11.2
Lombok 消除冗长的 Java 代码 1.16.14
JUnit Java 单元测试框架 5.8.2
Mockito Java Mock 框架 4.0.0
Hutool 常用工具类框架 5.7.20
transmittable-thread-local 线程池异步上下文传递 2.12.2
caffeine 高性能本地缓存之王 2.8.5
slf4j 日志框架 1.7.36
aspectj 切面框架 1.9.6
truelicense license证书管理引擎 1.33
jdk Java 开发工具包 >=1.8
maven Java 管理与构建工具 >=3.5.0

4.使用示例

当前组件依赖暂时还未上传到maven**仓库,所以需要自行克隆代码到本地install

在业务团队项目服务的工程中按下面引入plasticene-boot-starter-parent相关依赖即可:

   <!-- 使用plasticene-boot-starter-parent代替spring boot官方parent,统一依赖版本管理 -->
   <parent>
        <artifactId>plasticene-boot-starter-parent</artifactId>
        <groupId>com.plasticene.boot</groupId>
        <version>1.0-SNAPSHOT</version>
    </parent>
    
    <!-- 引入相关依赖 -->
    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>com.plasticene.boot</groupId>
                <artifactId>plasticene-boot-starter-banner</artifactId>
                <version>1.0-SNAPSHOT</version>
            </dependency>

            <dependency>
                <groupId>com.plasticene.boot</groupId>
                <artifactId>plasticene-boot-starter-mybatis</artifactId>
                <version>1.0-SNAPSHOT</version>
            </dependency>

            <dependency>
                <groupId>com.plasticene.boot</groupId>
                <artifactId>plasticene-boot-starter-web</artifactId>
                <version>1.0-SNAPSHOT</version>
            </dependency>

            <dependency>
                <groupId>com.plasticene.boot</groupId>
                <artifactId>plasticene-boot-starter-redis</artifactId>
                <version>1.0-SNAPSHOT</version>
            </dependency>

            <dependency>
                <groupId>com.plasticene.boot</groupId>
                <artifactId>plasticene-boot-starter-cache</artifactId>
                <version>1.0-SNAPSHOT</version>
            </dependency>

        </dependencies>
    </dependencyManagement>

完整项目服务整合代码示例请看:https://github.com/plasticene/fast-api

5. 交流反馈

plasticene-boot-starter-parent's People

Contributors

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