Best of Awesome Java NewsletterAugust 2024

  1. 1
    Article
    Avatar of java_libhuntAwesome Java Newsletter·2y

    Structured logging in Spring Boot 3.4

    Structured logging in Spring Boot 3.4 allows logs to be written in well-defined, machine-readable formats such as JSON. This enables powerful search and analytics capabilities. It supports the Elastic Common Schema (ECS) and Logstash formats and allows for custom formats. Developers can add additional fields to logs for better filtering and analysis. Logs can be output to the console or written to a file for different use cases.

  2. 2
    Article
    Avatar of java_libhuntAwesome Java Newsletter·2y

    Generating Java Test Data With Instancio

    Manual test data creation in Java can lead to boilerplate code and limited test coverage. Instancio is a Java library designed to automate test data generation with a fluent API, reducing verbosity and enhancing test reliability by incorporating randomized data. Instancio allows customization of fields, exclusion of specific properties, and enables reproducible tests through seed values. It also supports Bean Validation for generating constraint-compliant test data and integrates seamlessly with JUnit and Spring Boot. Instancio simplifies creating JSON request bodies for `@WebMvcTest` and promotes reusable test data templates to further enhance test clarity and maintainability.

  3. 3
    Article
    Avatar of java_libhuntAwesome Java Newsletter·2y

    A Guide to CompletableFuture – Concurrency Deep Dives

    The guide provides an in-depth look at Java's CompletableFuture, exploring its usage, internal workings, and differentiating it from Future. Key topics include creation methods, chaining, handling exceptions, and the lifecycle of CompletableFutures. It also covers advanced concepts such as async execution, thread safety, and solving concurrency problems with CompletableFutures in practical scenarios.

  4. 4
    Article
    Avatar of java_libhuntAwesome Java Newsletter·2y

    pure Java build tool

    bld is a new build system designed to write build logic in pure Java, tailored for modern Java (Java 17). It ensures tasks are explicit and managed by the user. This build system incorporates common Java-based tasks and provides automatic integration with IDEs like IntelliJ IDEA. Key features include support for JUnit 5 testing, intuitive use of Java libraries, and seamless distribution via a single jar. Installation is possible through Homebrew, SDKMAN!, and JBang.