Best of Spring FrameworkDecember 2024

  1. 1
    Article
    Avatar of baeldungBaeldung·1y

    Dynamic Spring Data JPA Repository Query With Arbitrary AND Clauses

    This tutorial explores three approaches to creating dynamic queries in Spring Data JPA repositories: Query by Example, Query by Specification, and QueryDSL. The post provides a detailed setup for each method, including code examples for entity classes, repository definitions, and querying logic. It compares these methods based on their complexity and suitability for different types of queries.

  2. 2
    Article
    Avatar of baeldungBaeldung·1y

    What Is chain.doFilter() Doing in Spring Filter?

    This tutorial explains the purpose and importance of the chain.doFilter() method in the Spring framework. It covers the concepts of filters and filter chains, outlining common use cases for filters like authentication and logging. The article also connects the chain.doFilter() method to the Chain of Responsibility design pattern. Step-by-step guidance on creating and registering custom filters in Spring is provided.

  3. 3
    Article
    Avatar of springSpring·1y

    This Year in Spring - December 31st, 2024

    Spring fans are greeted with a Happy New Year message and a review of notable achievements in 2024. Highlights include the advancements in Spring AI, which offers robust support for building AI-powered systems; Spring Modulith, which improves modular coding; the experimental Spring gRPC project for easy setup of GraalVM-ready gRPC services; and enhancements in Spring Security, including full OAuth suite support and WebAuthn/Passkeys. The post emphasizes the ongoing improvements and optimizations within the Spring framework.

  4. 4
    Article
    Avatar of baeldungBaeldung·1y

    JSON Unit Test Assertions Using JsonUnit

    Explore the JsonUnit library for creating expressive JSON assertions. Learn about its smooth integration with AssertJ, the use of custom placeholders, and features like navigating JSON paths and ignoring fields or values. JsonUnit simplifies JSON validation through a fluent API, enabling comparisons with templated Strings and use of various configuration options.

  5. 5
    Article
    Avatar of foojayioFoojay.io·1y

    Speed up your Spring Batch with Native Image and GraalVM

    Learn how to enhance the performance of Spring Batch applications by compiling them into Native Images using GraalVM. This method drastically reduces startup time and resource usage, making it ideal for batch jobs. The post includes steps to create a Spring Batch application, compile it into a Native Image, and benchmark its performance against traditional JAR execution.

  6. 6
    Article
    Avatar of springSpring·1y

    Extending Spring Data Repositories Just Got Easier

    The 2024.1 release of Spring Data Repositories makes it easier to extend repositories with custom functionality, allowing for broad reusability across different projects. This post discusses using MongoDB’s Atlas vector search in a generic manner and streamlining the implementation through shared fragments. Specific examples demonstrate making repository components more generic and reusable without being tightly coupled to a single domain type.