SpringCloud-based Microservice Architecture Practical Case Project

QuickStart

Based on SpringCloud system implementation, simple shopping process is realized, and basic functions are met: registration, login, product list display, product details display, order creation, details view, order payment, inventory update, etc.

github source address: https://github.com/backkoms/simplemall

Each business service uses an independent MYSQL database, and the following components are initially considered:

  1. Service registration, discovery: eureka
  2. Configuration management: spring config , spring security
  3. Cluster fault tolerance: hystrix (to be implemented)
  4. API Gateway: zuul (to be implemented)
  5. Service load: feign+ribbon
  6. api documentation output: swagger2
  7. Code simplification: lombok
  8. Message queue: rabbitmq
  9. Distributed lock: redis (to be implemented)
  10. Link tracking: spring cloud sletuh -> zipkin
  11. Security authentication: oauth2/JWT (to be implemented)
  12. Service monitoring: spring-boot-admin

Introduction to each module

Module Name Port Introduction
admin-server 9002 Service monitoring center, monitoring all service modules
conf-server 9004 Distributed configuration center, used in combination with spring-security/rabbitmq
eureka-server 9003 Service registry, providing service registration and discovery functions
sleuth-server 9001 A distributed tracing solution implemented by SpringCloud, compatible with Zipkin
zuul-server 9005 API Gateway Module
account-service 8080 User services, providing registration, login, address and other services
product-service 8081 Product services, providing product listings, details, inventory updates and other services
payment-service 8082 payment services, payment records
order-service 8083 Order service, providing order creation, details, status changes
msg-service 8084 message processing service
front-app 8088 Front-end service, combined with swagger2 to provide API management

Get started quickly

  • 1. First start the three basic services of admin-server, eureka-server, and conf-server
  • 2. Start payment/order/product/account basic business services in turn
  • 3. Finally start the front-app service, open the browser, enter http://localhost:8088/swagger-ui.html  , and the functions can be used in sequence according to the process API
  • 4. There will be time to provide the page later, based on VUE2+BOOTSTRAP, the process will be linked together

Release Version

v2.1

Release Date : 2017-08-29

1. Introduce swagger2 to complete API interface document management and complete the flow of overall business data process
2. Complete the overall business data through the API interface
3. Based on Spring-cloud-config, the configuration center is introduced, combined with security to strengthen the security configuration, and at the same time, bus-amqp (rabbitmq) is introduced to efficiently update the configuration content [the configuration center data is used in conjunction with the sc-cloud-repo project]
4. Introduce feign to satisfy the client's call to the server's service
5. The introduction of ribbon can satisfy the load balancing of the client and call back-end services

v1.0

Release Date : 2017-08-17

1. Complete the construction of basic services and business sub-module services, and the business sub-module can run normally
2. Complete the operation monitoring of the SpringBootAdmin business module and the operation of the Eureka service to meet the registration and discovery functions of various business basic services
3. Simple test operation of login/signup and other functions can be initiated through the Front-app side with the help of Feign components.
The next version will continue to improve the complete shopping implementation based on this version, including simple pages, api management/calling, etc.

Follow more

image

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326433600&siteId=291194637