GithubHelp home page GithubHelp logo

lishiyu / microservice-scaffold Goto Github PK

View Code? Open in Web Editor NEW

This project forked from biiliwuiid/microservice-scaffold

0.0 1.0 0.0 1.2 MB

基于Spring Cloud(Greenwich.SR2)搭建的微服务脚手架(适用于在线系统),已集成注册中心(Nacos Config)、配置中心(Nacos Discovery)、认证授权(Oauth 2 + JWT)、日志处理(ELK + Kafka)、限流熔断(AliBaba Sentinel)、应用指标监控(Prometheus + Grafana)、调用链监控(Pinpoint)、以及Spring Boot Admin。

Java 49.82% TSQL 5.64% Dockerfile 8.67% Shell 35.57% Go 0.30%

microservice-scaffold's Introduction

microservice-scaffold

Build Status codecov

基于Spring Cloud(Greenwich.SR2)搭建的微服务脚手架,已集成注册中心(Nacos Config)、配置中心(Nacos Discovery)、认证授权(Oauth 2 + JWT)、日志处理(ELK + Kafka)、限流熔断(AliBaba Sentinel)、应用指标监控(Prometheus + Grafana)、调用链监控(Pinpoint)、以及Spring Boot Admin。

快速开始

依赖环境:

启动

基础环境搭建

nacos

当前应用配置文件在config/example下,需要导入到nacos中,nacos官方文档

elk + kafka

进入config/docker-env/kafka-docker目录下,执行:docker-compose up -d;进入config/docker-env/docker-elk目录下,执行:docker-compose up -d即可。 可参考:Spring Cloud日志集中化处理:ELK + Kafka

prometheus + grafana

进入config/docker-env/prometheus目录下,执行:docker-compose up -d即可。 可参考:Spring Cloud应用指标监控:Prometheus + Grafana

pinpoint

进入config/docker-env/prometheus目录下,执行:docker-compose pull && docker-compose up -d即可。 可参考:Spring Cloud链路追踪:Pinpoint

创建数据库及表

导入根路径db/目录下各模块下数据库脚本,可创建一个库或者分模块创建。

启动应用

将工程导入idea,逐个启动SpringBoot应用即可。所依赖的基础服务如下:

基础服务 服务名 端口 说明
KV缓存 redis 6379 目前用于存储JWT生成的access_token
数据库 mysql 3306
消息中间件 kafka 9092 与ELK集成
注册与配置中心 nacos 8848
日志处理 elk es:9200,kibana:5601,logstash:5000
应用指标监控 prometheus 9090 共用
数据可视化工具 grafana 3000
调用链路监控 pinpoint 8079
限流熔断 alibaba sentinel 8858
spring boot admin pinpoint 8100

各模块依赖服务:

服务名称 说明 依赖 服务端口
auth 认证服务器 mysql、redis 8190
api-gateway api网关 redis 8088
web-app 服务聚合层 alibaba sentinel 8087
user-svc 用户服务 mysql 8000
springboot admin 应用监控 8100

目前,仅完成基础框架搭建和统一报文、统一异常处理,暂未确定做什么业务。

microservice-scaffold's People

Contributors

jackson-zb 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.