Bootiful Spring Boot 3.x by Josh Long

Ai

Learn how Spring Boot 3.x leverages Java 21's virtual threads, AI integration, modular design & GraalVM native images to build modern, scalable microservices & applications.

Key takeaways
  • Java 21 is considered the most technologically important Java release, offering significant improvements in performance, syntax features like virtual threads, records, sealed types and pattern matching

  • Spring Boot 3.x requires Java 17 minimum, but Java 21+ is recommended for best performance and newer language features

  • Virtual threads in Java 21 significantly improve application scalability and throughput by allowing more efficient handling of blocking operations

  • Spring AI provides easy integration with various AI models (OpenAI, Ollama, Hugging Face) and supports RAG (Retrieval Augmented Generation) patterns for building AI-powered applications

  • Spring Modulith helps build modular monoliths by enforcing architectural boundaries, validating module dependencies, and providing event-driven communication between modules

  • Event-driven patterns like event notification, event-carried state transfer, and event sourcing help build decoupled, scalable systems

  • Package-private visibility should be preferred over public to maintain modularity and reduce coupling between components

  • Spring Data JDBC combined with vector databases (like PG Vector) enables efficient similarity searches and AI/ML integrations

  • GraalVM native image compilation produces more efficient executables but requires handling reflection and other dynamic features

  • Modern Spring applications should embrace modular design, event-driven architectures, and newer Java features while limiting public APIs