LibraryActive

Spring Cloud Commons

Spring Cloud Commons provides bootstrap application context, refresh scope, encryption, and context services for Spring Cloud applications.

Open source page

Field note

What it does

Spring Cloud builds on Spring Boot and adds features many components use, including a bootstrap context, context hierarchies, refresh scope, health indicator, and encryption/decryption.

Capabilities

Available capabilities

Tags

Tags

Ways to use it

Ways to use it

other

java / org.springframework.cloud:spring-cloud-commons

sdk

java / org.springframework.cloud:spring-cloud-commons

sdk

Java / Not filed

sdk

Java / Not filed

sdk

Not filed / Not filed

other

Not filed / Not filed

rest

java / Not filed

oauth

Java / https://docs.spring.io/spring-cloud-commons/reference/spring-cloud-commons/security.html

Product features

Product features

AccessTokenContextRelay

Relay used with a custom filter or AOP interceptor when not using Spring MVC.

Application Context Hierarchies

Bootstrap context is added as parent to the main context, sharing an Environment.

Application Context Services

Services related to the Spring application context.

CachedRandomPropertySource

Provides a PropertySource that caches random values based on a key, consistent across context restarts.

Circuit Breaker Metrics

Metrics spring.cloud.circuitbreaker and spring.cloud.circuitbreaker.active declared by the project.

Circuit Breaker Observation

Observation created when wrapping a Function or Supplier passed to the CircuitBreaker.

Circuit Breaker Spans

Span spring.cloud.circuitbreaker declared by the project.

CircuitBreakerFactory API

Creates CircuitBreaker instances with run(Supplier, Function) and optional fallback.

Common Application Properties

Common Spring Cloud Commons properties and references to the underlying classes that consume them.

Compatibility Verifier

Enables Spring Cloud compatibility verification with configurable accepted Spring Boot versions.

Customizer Beans

Configure circuit breakers by creating beans of type Customizer.

Customizing Bootstrap Property Sources

Customize contents of bootstrap property sources via PropertySourceLocators.

DiscoveryClientHealthIndicator

Auto-configured Spring Boot health indicator based on the registered DiscoveryClient.

Eager loading of LoadBalancer contexts

Pre-initialize per-service load balancer contexts via eager-load clients property.

@EnableDiscoveryClient Annotation

Enables DiscoveryClient implementations found via META-INF/spring.factories.

Environment Changes

Support for environment changes and refresh scope on restart.

Features Endpoint

Enables the features endpoint.

Feign Token Relay

Feign clients pick up an interceptor using OAuth2ClientContext to relay tokens.

Spring HTTP Service Clients Support

Configurers add CircuitBreaker support for Spring HTTP Service Client Groups.

@HttpServiceFallback Annotations

Declares fallback implementation class, supported service interfaces, and group.

InetUtils

Network interface utilities with default hostname, IP address, and ignored interfaces.

Load-Balanced RestTemplate

Spring RestTemplate usable as a LoadBalancer client via @LoadBalanced.

Load-Balanced WebClient

Spring WebClient usable as a LoadBalancer client.

LoadBalancer Cache

Spring Cloud LoadBalancer caching mechanism with configurable capacity and TTL.

LoadBalancer Caching

Caffeine-backed or default cache for load balancer instances.

Logging Configuration

Logging configuration support in the application context services.

OAuth2RestTemplate

Rest template that forwards and refreshes access tokens from an OAuth2ClientContext.

RandomLoadBalancer

Alternative ReactiveLoadBalancer implementation selecting instances randomly.

ReactiveCircuitBreakerFactory

Wraps Mono or Flux in a circuit breaker when Project Reactor is on the classpath.

RoundRobinLoadBalancer

Default ReactiveLoadBalancer implementation using round-robin selection.

ServiceInstanceListSupplier

Reactive supplier of service instances, with discovery-based implementation.

ServiceRegistry

Interface with register(Registration) and deregister(Registration) methods.

SimpleDiscoveryClient

Property-based DiscoveryClient used when no service-registry-backed client is present.

Spring Framework Documentation

UserInfoRestTemplateFactory

Factory to obtain an OAuth2RestTemplate sharing the authentication filter's OAuth2ClientContext.