SpringOne 2020
Unleash the True Power of Spring Cloud: Learn How to Customize Spring Cloud
Olga Maciaszek-Sharma, Member of Technical Staff 3 at VMware
Ryan Baxter, Software Engineer at VMware
2. About Us
Ryan Baxter
Spring Cloud Software Engineer
VMware
github.com/ryanjbaxter
@ryanjbaxter
Olga Maciaszek-Sharma
Spring Cloud Software Engineer
VMware
github.com/OlgaMaciaszek
@olga_maciaszek
3. Spring Cloud
Spring Cloud is the de facto standard in cloud-native Java. It
includes cloud-ready solutions for your cloud-native
challenges and improves the performance, reliability,
management, and security of your cloud-based applications.
➔ API Gateway
➔ Service registry
➔ Configuration server
➔ Distributed Tracing
➔ Circuit Breakers
➔ Load Balancer
➔ API Contract Definition & Testing
➔ Cloud Service Connectors (AWS, etc.)
➔ Streaming Data
➔ Serverless & Functions
Spring Cloud has everything you need to build robust, reliable cloud-native applications...
Introduction To Spring Cloud: 12:05 PM EST
4. Config
It delivers config straight to your apps and offers integration
with multiple version control systems to keep your config safe
You can customize where the config server retrieves
configuration from
Implement the EnvironmentRepository interface
Create a bean for your custom EnvironmentRepository
5. Gateway
Spring Cloud Gateway puts developers in control of APIs
● Securing and hiding services
● Routing and filtering messages
● Handling load
Spring Cloud Gateway can be customized by adding
● Custom filters
● Custom predicates
● Custom RouteDefinitionLocator
○ Where route definitions are stored
● Transforming payloads
● and much more...
6. Circuit Breaker
Circuit breakers mitigate this problem using sensible defaults
and reliable fallbacks in case of emergency
Spring Cloud CircuitBreaker gives you the choice of three
popular open-source options: Resilience4J, Sentinel, or Hystrix.
You can provide your own circuit breaker implementations for
other libraries
Spring Cloud CircuitBreaker offers the developer the ability to
customize the configuration of the underlying implementation
7. Bus
Spring Cloud Bus links nodes of a distributed system with a
lightweight message broker
You can use Bus to publish your own events and target your
own services
8. Spring Cloud LoadBalancer
Great UXs need great responses. When your apps are under
pressure, spreading the load helps smooth things out
● Pluggable ServiceInstanceListSupplier and
ReactiveServiceInstanceLoadBalancer implementations
● Configuring load-balancing zones
● Configuring the caching mechanism and switching
between different cache implementations
● Configuring LoadBalancer to run health checks
● Configuration (context) per target service
● Implement LoadBalancerLifecycle
9. Spring Cloud OpenFeign
Dynamically created HTTP clients with minimum overhead
and maximum readability
● Switching to a different HTTP client
● Switching to a custom bean (for example, a Decoder) via a
configuration class and via properties
● Setting custom timeouts
● Configuring inheriting beans from the parent context
● Creating Feign Clients manually
● Configuring compression
● Pagination with @CollectionFormat
10. Spring Cloud Contract
Users, customers, and partners need reliable, trustworthy, APIs
● Configuring the Verifier Plugin (Maven and Gradle)
● Contracts on the Producer Side, pushed to Git or an external
Git or artifact repository
● Configuring REST Docs support
● Messaging with different Messaging implementations
● Setting contracts to `inProgress`
● Client-side runtime stubs generation
● Contract Metadata
11. Spring Cloud Sleuth
Debugging distributed applications is a complex and time
consuming chore
● Using Brave Tracer to manually configure Span lifecycles
● Declaratively configuring Spans with annotations
● Naming spans
● Manually instrument Sleuth for Project Reactor