Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Spring Cloud Alibaba | 26,466 | 36 | 2 days ago | 36 | July 25, 2023 | 416 | apache-2.0 | Java | ||
Spring Cloud Alibaba provides a one-stop solution for application development for the distributed solutions of Alibaba middleware. | ||||||||||
Springall | 25,866 | 2 months ago | 29 | mit | Java | |||||
循序渐进,学习Spring Boot、Spring Boot & Shiro、Spring Batch、Spring Cloud、Spring Cloud Alibaba、Spring Security & Spring Security OAuth2,博客Spring系列源码:https://mrbird.cc | ||||||||||
Kuboard Press | 19,085 | a month ago | 365 | JavaScript | ||||||
Kuboard 是基于 Kubernetes 的微服务管理界面。同时提供 Kubernetes 免费中文教程,入门教程,最新版本的 Kubernetes v1.23.4 安装手册,(k8s install) 在线答疑,持续更新。 | ||||||||||
Springboot Learning | 15,344 | 19 days ago | 69 | Java | ||||||
《Spring Boot基础教程》,2.x版本持续连载中!点击下方链接直达教程目录! | ||||||||||
Springcloudlearning | 15,253 | 2 years ago | 45 | Java | ||||||
《史上最简单的Spring Cloud教程源码》 | ||||||||||
Mall Learning | 12,336 | 13 days ago | 27 | apache-2.0 | Java | |||||
mall学习教程,架构、业务、技术要点全方位解析。mall项目(50k+star)是一套电商系统,使用现阶段主流技术实现。涵盖了SpringBoot 2.3.0、MyBatis 3.4.6、Elasticsearch 7.6.2、RabbitMQ 3.7.15、Redis 5.0、MongoDB 4.2.5、Mysql5.7等技术,采用Docker容器化部署。 | ||||||||||
Mall Swarm | 10,654 | a month ago | 41 | apache-2.0 | Java | |||||
mall-swarm是一套微服务商城系统,采用了 Spring Cloud 2021 & Alibaba、Spring Boot 2.7、Oauth2、MyBatis、Docker、Elasticsearch、Kubernetes等核心技术,同时提供了基于Vue的管理后台方便快速搭建系统。mall-swarm在电商业务的基础集成了注册中心、配置中心、监控中心、网关等系统功能。文档齐全,附带全套Spring Cloud教程。 | ||||||||||
Activiti | 9,624 | 1,969 | 60 | 3 days ago | 50 | February 06, 2020 | 562 | apache-2.0 | Java | |
Activiti is a light-weight workflow and Business Process Management (BPM) Platform targeted at business people, developers and system admins. Its core is a super-fast and rock-solid BPMN 2 process engine for Java. It's open-source and distributed under the Apache license. Activiti runs in any Java application, on a server, on a cluster or in the cloud. It integrates perfectly with Spring, it is extremely lightweight and based on simple concepts. | ||||||||||
Awesome Architecture | 8,359 | 3 years ago | 7 | |||||||
架构师技术图谱,助你早日成为架构师 | ||||||||||
Springcloud Learning | 7,097 | 7 months ago | 22 | Java | ||||||
Spring Cloud基础教程,持续连载更新中 |
This microservices branch was initially derived from AngularJS version to demonstrate how to split sample Spring application into microservices. To achieve that goal, we use Spring Cloud Gateway, Spring Cloud Circuit Breaker, Spring Cloud Config, Micrometer Tracing, Resilience4j, Open Telemetry and the Eureka Service Discovery from the Spring Cloud Netflix technology stack.
Every microservice is a Spring Boot application and can be started locally using IDE (Lombok plugin has to be set up) or ../mvnw spring-boot:run
command. Please note that supporting services (Config and Discovery Server) must be started before any other application (Customers, Vets, Visits and API).
Startup of Tracing server, Admin server, Grafana and Prometheus is optional.
If everything goes well, you can access the following services at given location:
You can tell Config Server to use your local Git repository by using native
Spring profile and setting
GIT_REPO
environment variable, for example:
-Dspring.profiles.active=native -DGIT_REPO=/projects/spring-petclinic-microservices-config
In order to start entire infrastructure using Docker, you have to build images by executing ./mvnw clean install -P buildDocker
from a project root. Once images are ready, you can start them with a single command
docker-compose up
. Containers startup order is coordinated with dockerize
script.
After starting services, it takes a while for API Gateway to be in sync with service registry,
so don't be scared of initial Spring Cloud Gateway timeouts. You can track services availability using Eureka dashboard
available by default at http://localhost:8761.
The master
branch uses an Eclipse Temurin with Java 17 as Docker base image.
NOTE: Under MacOSX or Windows, make sure that the Docker VM has enough memory to run the microservices. The default settings
are usually not enough and make the docker-compose up
painfully slow.
If you experience issues with running the system via docker-compose you can try running the ./scripts/run_all.sh
script that will start the infrastructure services via docker-compose and all the Java based applications via standard nohup java -jar ...
command. The logs will be available under ${ROOT}/target/nameoftheapp.log
.
Each of the java based applications is started with the chaos-monkey
profile in order to interact with Spring Boot Chaos Monkey. You can check out the (README)[scripts/chaos/README.md] for more information about how to use the ./scripts/chaos/call_chaos.sh
helper script to enable assaults.
See the presentation of the Spring Petclinic Framework version
A blog post introducing the Spring Petclinic Microsevices (french language)
You can then access petclinic here: http://localhost:8080/
Architecture diagram of the Spring Petclinic Microservices
Our issue tracker is available here: https://github.com/spring-petclinic/spring-petclinic-microservices/issues
In its default configuration, Petclinic uses an in-memory database (HSQLDB) which gets populated at startup with data.
A similar setup is provided for MySql in case a persistent database configuration is needed.
Dependency for Connector/J, the MySQL JDBC driver is already included in the pom.xml
files.
You may start a MySql database with docker:
docker run -e MYSQL_ROOT_PASSWORD=petclinic -e MYSQL_DATABASE=petclinic -p 3306:3306 mysql:5.7.8
or download and install the MySQL database (e.g., MySQL Community Server 5.7 GA), which can be found here: https://dev.mysql.com/downloads/
To use a MySQL database, you have to start 3 microservices (visits-service
, customers-service
and vets-services
)
with the mysql
Spring profile. Add the --spring.profiles.active=mysql
as programm argument.
By default, at startup, database schema will be created and data will be populated.
You may also manually create the PetClinic database and data by executing the "db/mysql/{schema,data}.sql"
scripts of each 3 microservices.
In the application.yml
of the Configuration repository, set the initialization-mode
to never
.
If you are running the microservices with Docker, you have to add the mysql
profile into the (Dockerfile)[docker/Dockerfile]:
ENV SPRING_PROFILES_ACTIVE docker,mysql
In the mysql section
of the application.yml
from the Configuration repository, you have to change
the host and port of your MySQL JDBC connection string.
Grafana and Prometheus are included in the docker-compose.yml
configuration, and the public facing applications
have been instrumented with MicroMeter to collect JVM and custom business metrics.
A JMeter load testing script is available to stress the application and generate metrics: petclinic_test_plan.jmx
Spring Petclinic Metrics
Dashboard is available at the URL http://localhost:3000/d/69JXeR0iw/spring-petclinic-metrics.
You will find the JSON configuration file here: docker/grafana/dashboards/grafana-petclinic-dashboard.json.4701
.Spring Boot registers a lot number of core metrics: JVM, CPU, Tomcat, Logback...
The Spring Boot auto-configuration enables the instrumentation of requests handled by Spring MVC.
All those three REST controllers OwnerResource
, PetResource
and VisitResource
have been instrumented by the @Timed
Micrometer annotation at class level.
customers-service
application has the following custom metrics enabled:
petclinic.owner
petclinic.pet
visits-service
application has the following custom metrics enabled:
petclinic.visit
Spring Cloud components | Resources |
---|---|
Configuration server | Config server properties and Configuration repository |
Service Discovery | Eureka server and Service discovery client |
API Gateway | Spring Cloud Gateway starter and Routing configuration |
Docker Compose | Spring Boot with Docker guide and docker-compose file |
Circuit Breaker | Resilience4j fallback method |
Grafana / Prometheus Monitoring | Micrometer implementation, Spring Boot Actuator Production Ready Metrics |
The Spring Petclinic main
branch in the main spring-projects
GitHub org is the "canonical" implementation, currently based on Spring Boot and Thymeleaf.
This spring-petclinic-microservices project is one of the several forks hosted in a special GitHub org: spring-petclinic. If you have a special interest in a different technology stack that could be used to implement the Pet Clinic then please join the community there.
The issue tracker is the preferred channel for bug reports, features requests and submitting pull requests.
For pull requests, editor preferences are available in the editor config for easy use in common text editors. Read more and download plugins at http://editorconfig.org.