This repository contains the source code of the book "Spring Microservices in Action (John Carnell)" and the personal summary of technical essentials about Spring Boot for microservices.
This source code was re-organized by the original source code of the book and I make sure each module is runnable.
There are the differences between this source code and the original source code:
- Use Gradle as Java build automation tool rather than Maven.
- Use MySQL as database rather than PostgreSQL.
- Change the port of the organization service to 8060 to avoid the address conflict with the licensing service.
- Change the port of the special routes service to 8040 to avoid the address conflict with the licensing service.
- Change the port of the authentication service to 8901 to make it same with the example in the book.
- Add the integration of Splunk for log aggregation locally (use both local Splunk and remote Papertrail).
- Use the original functionality in Logback for sending the log to the log servers (Splunk & Papertrail) rather than the solution in the Book (use Logspout to direct the docker output to the log servers).
- Replace the user_roles table by the authorities table for storing users' credentials to DB.
- Change the column name from user_name to username for the user_orgs table and the users table.
- Add comments to make the code easy to read.
This microservices project is based on
- Core
- Message Queue
- Cache
- Database
- Security
- Log
- Trace
- Overview
- Getting Started
- Technical Essentials
- Autowired
- SpringData JPA
- Configuration File Auto-loading
- Configuration Encryption
- Service Discovery with Eureka
- Resiliency Patterns with Hystrix
- Configure Hystrix
- Service Gateway with Zuul
- Zuul Filters
- Protect Service with Spring Security and OAuth2
- Use JWT as Access Token
- Store Clients and Users' Credentials to DB
- Integrate with Message Queue (Kafka)
- Integrate with Redis
- Tune Logging
- Log Aggregation
- Send Trace to Zipkin
- Build Runnable Jar
- Core Application Logic
- Components