Best of BaeldungJune 2025

  1. 1
    Article
    Avatar of baeldungBaeldung·48w

    Introduction to DiceDB

    DiceDB is an open-source, high-performance in-memory database that offers Redis-like commands with modern features such as reactive queries. The tutorial covers installation via Docker, connecting through the DiceDB CLI, and performing basic operations like SET, GET, DEL, PING, ECHO, TYPE, and EXISTS commands. DiceDB runs on port 7379 by default and provides a developer-friendly experience for real-time applications with familiar key-value operations.

  2. 2
    Article
    Avatar of baeldungBaeldung·49w

    Cleaning Spring Properties Files

    Spring Properties Cleaner is a Maven plugin that automatically cleans up Spring application properties files by removing duplicates, standardizing formatting, sorting keys, and extracting common properties across multiple profile-specific files. The plugin can be configured to detect issues during builds, sort properties in clustered or alphabetical order, inline prefixes for better commonality extraction, and manage vertical whitespace. It supports three extraction modes (full, consistent, multiple) for promoting properties to a common application.properties file, helping maintain cleaner and more organized configuration files in Spring projects.

  3. 3
    Article
    Avatar of baeldungBaeldung·51w

    Event-Driven LISTEN/NOTIFY Support in Java using PostgreSQL

    PostgreSQL's LISTEN and NOTIFY commands enable asynchronous communication between database server and clients, creating a simple messaging system. The LISTEN command registers interest in receiving events on specific channels, while NOTIFY broadcasts messages to all listeners. Java applications can raise notifications using standard JDBC with either NOTIFY commands or pg_notify() function. Listening for notifications requires driver-specific functionality - the official PostgreSQL JDBC driver requires polling with getNotifications(), while PGJDBC-NG provides callback-based listeners for more efficient event handling. This mechanism supports real-time dashboards, cache invalidation, and data auditing use cases.

  4. 4
    Article
    Avatar of baeldungBaeldung·49w

    Introduction to Ambassador Design Pattern

    The Ambassador Design Pattern acts as a network proxy between clients and servers, encapsulating networking components like retry logic, caching, timeouts, and circuit breakers in a reusable component. It can be implemented as a library dependency within the same container or as a separate sidecar container exposing REST APIs. The pattern promotes code reusability and maintainability by centralizing network communication logic, but introduces potential latency and availability concerns when deployed as a separate service.

  5. 5
    Article
    Avatar of baeldungBaeldung·51w

    Authorize Request for Certain URL and HTTP Method in Spring Security

    Spring Security provides flexible mechanisms to authorize requests based on URLs, HTTP methods, and user roles. The tutorial demonstrates implementing role-based access control in a blogging platform where users can manage their own posts while admins have broader permissions. Key concepts include configuring SecurityFilterChain for URL-based authorization, using @PreAuthorize for method-level security, implementing custom UserDetailsService for database authentication, and creating service layers that enforce business logic with proper access controls. The implementation covers user registration, authentication, and CRUD operations with appropriate security constraints.