Renaissance Artwork

Spring

Modern enterprise tools designed for building resilient cloud architecture and getting that scale.

VOLUME IFRAMEWORK MODULES

Spring Framework Ecosystem

Curated deep dives into the essential blocks powering modern production systems.

SECTION IFramework Core

Spring Boot 3.3 & Core Framework

The backbone of modern enterprise Java applications, offering opinionated auto-configuration, GraalVM native image generation, Ahead-Of-Time (AOT) processing, and comprehensive Actuator telemetry.

  • GraalVM Native Compilation
  • Virtual Thread Execution
  • Structured Logging & Metrics
  • Custom Starters & Auto-config
Java SnippetSpring 6+
@SpringBootApplication
public class PrimaveraApplication {
    public static void main(String[] args) {
        SpringApplication.run(PrimaveraApplication.class, args);
    }
}
Explore Architecture Specs
SECTION IIIdentity & Access

Spring Security 6.3

Enterprise-grade authorization and authentication framework. Provides seamless integration for OAuth2 Resource Servers, OIDC, Passkeys, JWT validation, and Method Security annotations.

  • OAuth2 / OpenID Connect
  • Passkey & WebAuthn Support
  • Reactive Security WebFilter
  • CSRF & CORS Controls
Java SnippetSpring 6+
@Bean
public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
    return http
        .authorizeHttpRequests(auth -> auth
            .requestMatchers("/api/public/**").permitAll()
            .anyRequest().authenticated())
        .oauth2ResourceServer(oauth -> oauth.jwt(Customizer.withDefaults()))
        .build();
}
Explore Architecture Specs
SECTION IIIMicroservices

Spring Cloud Native

Architectural tooling for microservice patterns: API Gateway routing, Resilience4j circuit breakers, distributed tracing with Micrometer, and declarative REST clients with OpenFeign.

  • Spring Cloud Gateway
  • Resilience4j Circuit Breakers
  • Distributed Tracing (Zipkin/OTel)
  • Eureka & Consul Discovery
Java SnippetSpring 6+
@Bean
public RouteLocator customRoutes(RouteLocatorBuilder builder) {
    return builder.routes()
        .route("payment_route", r -> r.path("/payments/**")
            .filters(f -> f.circuitBreakers(c -> c.setName("payCB")))
            .uri("lb://PAYMENT-SERVICE"))
        .build();
}
Explore Architecture Specs
SECTION IVPersistence Layer

Spring Data JPA & R2DBC

Unified repository abstractions for both synchronous relational databases via Hibernate 6 and asynchronous non-blocking storage via R2DBC and Spring Data Redis.

  • Derived Query Methods
  • R2DBC Reactive Storage
  • Redis & Mongo Aggregations
  • Auditing & Entity Callbacks
Java SnippetSpring 6+
@Repository
public interface OrderRepository extends JpaRepository<Order, UUID> {
    @Query("SELECT o FROM Order o WHERE o.status = :status")
    List<Order> findActiveOrders(@Param("status") OrderStatus status);
}
Explore Architecture Specs
SECTION VHigh Throughput

Reactive WebFlux & Netty

Non-blocking event-loop architecture powered by Project Reactor. Enables extreme throughput and concurrency handling with Mono and Flux reactive publishers on top of Netty.

  • Publisher (Mono & Flux)
  • Backpressure Management
  • Server-Sent Events (SSE)
  • Non-blocking HTTP Client
Java SnippetSpring 6+
@GetMapping(value = "/stream", produces = MediaType.TEXT_EVENT_STREAM_VALUE)
public Flux<TelemetryEvent> getLiveStream() {
    return telemetryService.getEventStream()
        .delayElements(Duration.ofMillis(100));
}
Explore Architecture Specs
SECTION VIGenerative AI

Spring AI Ecosystem

Portable AI abstractions for integrating Large Language Models (LLMs), Vector Databases (PgVector, Pinecone), RAG workflows, and Function Calling with Java safety.

  • Multi-Model Portability
  • Vector Store Embeddings
  • Retrieval-Augmented Generation
  • Tool & Function Calling
Java SnippetSpring 6+
@RestController
public class AIController {
    private final ChatClient chatClient;
    
    public AIController(ChatClient.Builder builder) {
        this.chatClient = builder.build();
    }
    
    @GetMapping("/ai/prompt")
    public String ask(@RequestParam String query) {
        return chatClient.prompt().user(query).call().content();
    }
}
Explore Architecture Specs
VOLUME II — LANGUAGE INNOVATION

Modern Java 21+ Platform

Open Full Java 21+ Portal
SECTION VIIJava 21 LTS

Virtual Threads (Project Loom)

High-throughput, lightweight threads managed by the JVM instead of OS threads. Million-thread concurrency with traditional synchronous thread-per-request code.

Code SpecificationJava 21 LTS
try (var executor = Executors.newVirtualThreadPerTaskExecutor()) {
    IntStream.range(0, 10_000).forEach(i -> {
        executor.submit(() -> {
            Thread.sleep(Duration.ofSeconds(1));
            return i;
        });
    });
}
SECTION VIIIJava 21 LTS

Generational ZGC (Low-Latency)

Scalable zero-pause garbage collector capable of handling terabyte heaps with sub-millisecond maximum pause times.

Code SpecificationJava 21 LTS
# Enable Generational ZGC in Java 21+
java -XX:+UseZGC -XX:+ZGenerational -jar primavera-app.jar
SECTION IXJava 21 LTS

Pattern Matching & Record Patterns

Deconstruct records directly in switch expressions with guards, enabling safe functional programming and algebraic type handling.

Code SpecificationJava 21 LTS
static String formatValue(Object obj) {
    return switch (obj) {
        case Point(int x, int y) -> "Point at (%d, %d)".formatted(x, y);
        case String s when s.length() > 5 -> "Long string: " + s;
        case Integer i -> "Number: " + i;
        default -> "Unknown";
    };
}
SECTION XJava 17 / 21

Sealed Classes & Exhaustive Switches

Restrict subclassing to known permits, guaranteeing compile-time safety and eliminating the need for fallback default cases in switch statements.

Code SpecificationJava 21 LTS
public sealed interface PaymentMethod permits CreditCard, Crypto, BankTransfer {}

public record CreditCard(String cardNumber) implements PaymentMethod {}
public record Crypto(String walletAddress) implements PaymentMethod {}
public record BankTransfer(String iban) implements PaymentMethod {}