Best of BaeldungAugust 2025

  1. 1
    Article
    Avatar of baeldungBaeldung·41w

    Implementing CQRS with Spring Modulith

    CQRS (Command Query Responsibility Segregation) separates write operations from read operations using different optimized models. Spring Modulith helps structure applications into loosely coupled modules organized by business capability rather than technical concerns. The implementation uses domain events for asynchronous communication between modules, with the command side handling ticket booking/cancellation and the query side managing movie searches and seat availability. Spring Modulith's @ApplicationModuleListener enables eventual consistency through the transactional outbox pattern, while jMolecules annotations clarify architectural roles.

  2. 2
    Article
    Avatar of baeldungBaeldung·40w

    Debugging Spring Boot Applications With IntelliJ IDEA

    The Spring Debugger plugin for IntelliJ IDEA enhances debugging capabilities for Spring Boot applications by providing runtime insights directly in the IDE. It displays loaded beans with visual indicators, shows effective property values and their sources, reveals active database connections, displays transaction metadata and JPA entity states. The plugin works with various run configurations including native Spring Boot, Maven, and Gradle tasks, requiring no special setup beyond installation and running in debug mode.

  3. 3
    Article
    Avatar of baeldungBaeldung·39w

    MCP Authorization With Spring AI and OAuth2

    Demonstrates how to secure Model Context Protocol (MCP) servers and clients using Spring AI and OAuth2. The tutorial builds a complete system with three components: an OAuth2 authorization server for issuing JWT tokens, a protected MCP server with calculator tools that validates tokens, and a client that handles both user and system authentication flows. The implementation uses Spring Security's OAuth2 support to separate security concerns from business logic, with the MCP server acting as an OAuth2 Resource Server that validates JWT tokens before processing operations.