Best of BaeldungSeptember 2025

  1. 1
    Article
    Avatar of baeldungBaeldung·37w

    Spring Boot 4 & Spring Framework 7 – What’s New

    Spring Boot 4 and Spring Framework 7 introduce significant modernization updates including Java 17 baseline with Java 21/25 support, Jakarta EE 11 alignment, and Kotlin 2.2+ compatibility. Key features include enhanced GraalVM native image support, built-in API versioning, declarative HTTP clients with @HttpServiceClient, resilience annotations for retry logic, improved observability with Micrometer 2 and OpenTelemetry, modular architecture for better performance, and JSpecify null safety adoption. The releases also bring testing improvements with context pausing and RestTestClient, while removing deprecated javax.* packages and Jackson 2.x support.

  2. 2
    Article
    Avatar of baeldungBaeldung·38w

    How to Reduce Spring Boot Memory Usage?

    Spring Boot applications typically consume significant memory (150+ MB) due to JVM architecture, embedded server threads, and framework overhead. Memory usage can be reduced through JVM tuning (serial garbage collector, reduced thread stack size, RAM limits), configuring web server thread pools, container-aware deployment practices, and removing unused dependencies. Key techniques include using -XX:+UseSerialGC, -Xss512k for thread stacks, setting MaxRAM limits, reducing Tomcat threads to 20, and matching JVM flags to container limits.

  3. 3
    Article
    Avatar of baeldungBaeldung·35w

    Stable Values in Java 25

    Java 25 introduces the Stable Value API (JEP 502) to solve the trade-off between immutability and delayed initialization. StableValue acts as a thread-safe wrapper that guarantees single initialization while enabling deferred computation of expensive objects. The API includes StableSupplier for lazy initialization, StableList and StableMap for collections with on-demand element computation, and StableFunction for memoized function calls. This approach maintains immutability benefits and JVM optimization opportunities while avoiding upfront initialization costs that can slow application startup.

  4. 4
    Article
    Avatar of baeldungBaeldung·37w

    PartitionKey in Hibernate: A Practical Guide for Spring Boot

    Database partitioning improves query performance for large datasets by splitting tables into smaller, manageable segments. Hibernate 6.2+ introduces the @PartitionKey annotation to optimize queries on partitioned tables. The tutorial demonstrates setting up PostgreSQL table partitions, configuring Spring Boot with Hibernate entities using @PartitionKey, and creating REST endpoints to interact with partitioned data. Key benefits are realized when queries include the partition key in WHERE clauses, allowing the database to target specific partitions rather than scanning all data.

  5. 5
    Article
    Avatar of baeldungBaeldung·38w

    Introduction to RDF and Apache Jena

    RDF (Resource Description Framework) is a W3C standard for storing and exchanging graph data, particularly useful for describing interrelated data and relationships. Apache Jena is an open-source Java framework for building Semantic Web applications that work with RDF models. The tutorial covers creating RDF models programmatically, working with resources and properties, extracting values, and serializing/deserializing models in formats like N-Triples and RDF-XML. Key concepts include using URIs for unique resource identification, RDF statements (triples) with subject-predicate-object structure, and standard vocabularies like Schema.org for consistent data representation.