ihoney / dew

基于Spring Cloud的服务封装

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Dew

基于Spring Cloud的服务封装

dew

Codacy code quality Apache License 2

设计理念

从企业内部框架到开源的 EZ-Framework,亲历过架构从单体到SOA再到微服务的演进, 这也体现在EZ-F的各个主线版本中, EZ-F与Dew的共同点都是力求提供一个完备的生产级微服务架构,最小化的学习成本,快速上手, 区别在于,EZ-F是基于Scala从零构建的,Dew主要是对Spring Cloud做一层薄的封装,在不改变Spring Cloud的开发模式下做简洁明了的扩展。

模块与功能

com.ecfront.dew:parent Dew 父工程 Maven Central

  1. 提供了Spring Boot & Spring Cloud 的基础pom结构

  2. 通过 `maven clean package -P package`来生成fatjar

com.ecfront.dew:boot-core Dew Spring Boot 封装 Maven Central

  1. 常用分布式服务(Cache、Lock、Map、MQ)

  2. 常用实体模型

  3. 服务脚手架(CRUDS,针对实体的创建、查询、更新、删除、启用禁用)

  4. 基于Spring Data JPA的常用方式扩展

  5. 统一返回信息格式(Resp<E>)

  6. 可跟踪日志支持(请求级ID)

  7. 通用拦截器栈

  8. Swagger文档

可选功能
<!-- 启用对应的分布式服务支持 -->
 <dependency>
    <groupId>com.ecfront.dew</groupId>
    <artifactId>cluster-spi-redis</artifactId>
    <version>${dew.version}</version>
</dependency>
<dependency>
    <groupId>com.ecfront.dew</groupId>
    <artifactId>cluster-spi-hazelcast</artifactId>
    <version>${dew.version}</version>
</dependency>
<dependency>
    <groupId>com.ecfront.dew</groupId>
    <artifactId>cluster-spi-ignite</artifactId>
    <version>${dew.version}</version>
</dependency>
<!-- 启用web支持 -->
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-web</artifactId>
</dependency>
<!-- 启用关系型数据支持(如MySQL) -->
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
    <groupId>mysql</groupId>
    <artifactId>mysql-connector-java</artifactId>
    <version>5.1.41</version>
</dependency>
<!-- 启用Swagger日志 -->
<dependency>
    <groupId>io.springfox</groupId>
    <artifactId>springfox-swagger2</artifactId>
    <version>2.6.1</version>
</dependency>
<dependency>
    <groupId>io.springfox</groupId>
    <artifactId>springfox-swagger-ui</artifactId>
    <version>2.6.1</version>
</dependency>

com.ecfront.dew:cloud-core Dew Spring Cloud 封装 Maven Central

  1. 引入Spring Cloud常用依赖

com.ecfront.dew:auth 多租户的RBAC权限服务 Maven Central

com.ecfront.dew:config 配置中心服务 Maven Central

  1. 集成Spring Config和Spring Security

com.ecfront.dew:gateway 网关服务 Maven Central

  1. 集成Zuul网关

  2. 与Auth配合,支持权限认证

com.ecfront.dew:gateway Websocket网关服务 Maven Central

  1. 支持Websocket的网关

com.ecfront.dew:logger 日志服务 Maven Central

  1. 集成Zipkin

com.ecfront.dew:monitor 集群监控服务 Maven Central

  1. 集成Turbine和Hystrix Dashboard

com.ecfront.dew:registry 注册中心服务 Maven Central

  1. 集成Eureka Server和Spring Security

运行环境

Java8以上、可选:Redis、Hazcelcast、Ignite、RabbitMQ、关系型数据库(默认MySQL)

About

基于Spring Cloud的服务封装

License:Apache License 2.0


Languages

Language:Java 97.6%Language:Shell 2.0%Language:HTML 0.4%Language:Batchfile 0.0%