Git Product home page Git Product logo

weenong / taroco Goto Github PK

View Code? Open in Web Editor NEW

This project forked from chenry123156/taroco

0.0 2.0 0.0 3.74 MB

整合了Spring Cloud的配置中心、注册中心、服务网关,提供了一系列starter组件, 同时提供服务治理、服务监控、auth2权限认证,支持服务降级/熔断、基于标签(x-label)的路由、服务权重,前端采用vue+elementUI+webpack,可以很好的解决转向Spring Cloud的一系列问题。

License: Apache License 2.0

Java 81.82% CSS 2.24% JavaScript 0.15% FreeMarker 0.57% Lua 0.09% Shell 0.64% TSQL 14.50%

taroco's Introduction

Taroco

PRs Welcome Total lines License Codacy Badge

前言

'Taroco' 是一套基于 Spring Cloud 的微服务开发脚手架。具有简单、易用、通用等特点。

近期开发计划

  1. 优化项目结构,主要是做简化操作。删除一下不必要的东西,使脚手架尽量简洁、易用
  2. 计划使用 Nacos 替换 服务发现和配置管理组件
  3. 计划使用 Spring Cloud Gateway 替换 Spring Cloud Zuul

项目介绍

Spring Cloud 是一个微服务框架,相比 Dubbo 等 RPC 框架, Spring Cloud 提供更全面的分布式系统解决方案。Spring Cloud 对微服务基础框架 Netflix 的多个开源组件进行了封装,同时又实现了和云端平台以及和 Spring Boot 开发框架的集成。 Spring Cloud 为微服务架构开发涉及的统一认证,配置管理,服务治理,熔断机制,动态路由等提供了一种简单的开发方式。

Spring Cloud 本身已经封装得足够简单,也够丰富。也许正是因为这种简单而丰富,使得想要使用它的团队望而却步。学习成本太高,历史包袱太重,维护成本太高等等一系列原因。

Taroco 就是为了解决这一问题而诞生的。 Taroco 整合了 Spring Cloud 的配置中心注册中心服务网关,提供了一系列starter组件, 同时提供服务治理服务监控OAuth2 权限认证,支持服务降级/熔断基于标签(x-label) 的路由服务权重,前端采用vue+elementUI,可以很好的解决技术转向 Spring Cloud 的一系列问题,努力打造全方位的微服务敏捷开发解决方案。

Taroco 提供了基于 Docker Compose 的部署方式。配置文件统一放置在docs目录中,运行脚本案例在根目录中查找。

主要实现功能

  • Spring Cloud Eureka 注册中心
  • Spring Cloud Config Server 配置中心,统一管理配置信息
  • Spring Cloud Zuul Gateway 统一微服务网关配置,支持动态路由配置
  • 基于 spring-boot-starter-actuator 的自实现的服务治理。包括日志、变量、映射等情况。
  • 基于 Hystrix 的聚合监控页面,包括单个服务和服务多个实例的监控。
  • 基于 Spring Security OAuth2 的权限认证系统。采用JWT RSA非对称加密的形式进行 token 加密解密。
  • 支持基于权重以及基于标签的服务路由,支持动态配置服务权重及标签信息。通过控制用户标签以及动态路由的配置,满足各种各样请求策略。
  • 基于角色的RBAC权限控制(用户、部门、角色、菜单、日志、字典、动态路由、oauth2 客户端),支持按钮级别的权限控制以及数据权限控制(DataScope)。
  • 基于Zipkin的调用链追踪(如果生产上使用,还需要把监控内容持久化比,如采用ElasticSearch,把监控内容从发送http请求切换到MQ等改造)。

分支版本

  • Branch 1.5.12:基于 Spring Boot 1.5.12.RELEASE + Spring Cloud Edgware.SR4,是Taroco最初的版本。
  • Branch 2.x:基于 Spring Boot 2.0.5.RELEASE + Spring Cloud Finchley.SR1 是当前维护的版本。
  • Master 分支已经改为从2.x merge代码,今后更新的中心也会放在2.x分支上。

整体架构

架构图

项目目录结构

├── taroco-cloud  --微服务相关组件
│   ├── cloud-admin --服务治理相关
│   ├── cloud-config  --服务配置中心
│   ├── cloud-monitor --服务监控
│   ├── cloud-registry  --服务注册中心
├── taroco-common-starter --自定义spring boot starter
│   ├── taroco-common-spring-boot-starter --公共依赖模块(全局异常、常量、通用类)
│   ├── taroco-log-spring-boot-starter --通用logback-spring、自定义banner
│   ├── taroco-redis-spring-boot-starter --通用redis配置
│   ├── taroco-ribbon-spring-boot-starter --基于ribbon的服务治理扩展
│   ├── taroco-swagger2-spring-boot-starter --自定义封装swagger2配置
├── taroco-demo --demo案例
├── taroco-docs --文档、截图、docker文件、初始化脚本
├── taroco-gateway --微服务网关
├── taroco-oauth2 --认证中心
│   ├── authentication-server --统一认证服务
│   ├── oauth2-config --oauth2抽象封装
│   ├── sso-demo1 --sso案例
│   ├── sso-demo1 --sso案例
├── taroco-rbac --基于角色的权限控制服务

项目截图

login menu route monitor servers api zipkin

后端环境

  • JDK1.8+
  • Spring Boot 1.5.12
  • Spring Cloud Edgware.SR4
  • Maven 3.0+
  • Redis 3.0+
  • MySQL 5.7
  • IDEA

前端

Taroco 前端基于开源项目 D2Admin 构建。

D2Admin 中文文档:D2Admin Document

链接推荐

资源下载

友情链接

LICENSE

MIT

taroco's People

Contributors

liuht777 avatar weenong avatar codacy-badger avatar

Watchers

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