Best of BaeldungJune 2024

  1. 1
    Article
    Avatar of baeldungBaeldung·2y

    Vertical Slice Architecture

    Learn about Vertical Slice Architecture and how it addresses the limitations of Layered Architecture by organizing code by business capabilities. This approach improves code expressiveness, coupling, and cohesion, while providing flexibility for diverse design paradigms. Examples using Spring Boot demonstrate the application of this architecture.

  2. 2
    Article
    Avatar of baeldungBaeldung·2y

    HTTP Request and Response Logging Using Logbook in Spring

    Logbook is an extensible Java library that enables complete request and response logging for various technologies. By adding a Logbook Maven dependency and configuring logback-spring.xml and application.properties files, HTTP requests and responses can be logged in a Spring Boot application. The library supports filtering and formatting logs, and provides different sinks like the ChunkingSink and LogstashLogbackSink for advanced logging needs. Custom sink implementations and JSON formatting are also possible.

  3. 3
    Article
    Avatar of baeldungBaeldung·2y

    The Difference Between JUnit and Mockito

    This post explores the differences between JUnit and Mockito, two popular testing frameworks in the Java ecosystem. JUnit is focused on creating the testing structure and environment, while Mockito complements JUnit by helping test individual components through mocking and controlling their behavior.

  4. 4
    Article
    Avatar of baeldungBaeldung·2y

    Java Weekly, Issue 548

    The issue covers topics including getting started with Jakarta Data and Hibernate, simplifying Java with module import declarations in JDK 23, and mapping Java Enum to custom values with JPA and Hibernate. Also features guides on securing Jakarta EE applications with OIDC and Keycloak, and insights into Kubernetes debugging. Various Spring and Java updates are highlighted alongside technical musings and thought-provoking reads.

  5. 5
    Article
    Avatar of baeldungBaeldung·2y

    Implement Bulk and Batch API in Spring

    Learn how to implement bulk and batch operations in a Spring application, including the differences between the two. Implement bulk operations using existing endpoints and implement batch operations for creating and updating multiple resource types.

  6. 6
    Article
    Avatar of baeldungBaeldung·2y

    Using Enum in Spring Data JPA Queries

    Learn how to query enum fields in entity classes using Spring Data JPA. Explore standard JPA methods and native queries for querying enum fields.

  7. 7
    Article
    Avatar of baeldungBaeldung·2y

    Introduction to Apache Pinot

    Apache Pinot is a real-time distributed OLAP datastore designed for low latency and high throughput analytical queries. It supports real-time and batch data ingestion, offers low latency queries, and can scale horizontally. The architecture includes components like the cluster, controller, broker, server, minion, tenant, and segments. Installation can be done via Docker. Apache Pinot is a top choice for businesses in need of real-time analytics.

  8. 8
    Article
    Avatar of baeldungBaeldung·2y

    @Valid Annotation on Child Objects

    Learn how to use the @Valid annotation to validate nested child objects in Spring Boot.

  9. 9
    Article
    Avatar of baeldungBaeldung·2y

    Avoid Inserting Duplicates in ArrayList in Java

    Learn different ways to avoid inserting duplicates in ArrayList in Java using Set class, List#contains method, and Stream#anyMatch method.

  10. 10
    Article
    Avatar of baeldungBaeldung·2y

    Find the Index of the Largest Value in an Array

    Learn efficient methods to find the index of the largest value in a Java array. Explore techniques using conversion to a List, traditional looping, and the Stream API, with detailed code examples and unit tests for each approach.

  11. 11
    Article
    Avatar of baeldungBaeldung·2y

    How to Remove Digits From a String

    Explore various methods to remove digits from Strings using regular expressions, Pattern and Matcher classes, Apache Commons Lang, loop and StringBuilder, and Character Streams.

  12. 12
    Article
    Avatar of baeldungBaeldung·2y

    Java Weekly, Issue 546

    This post discusses the complexities of flattening data structures on the heap in Java, optimizing configuration management in Spring Boot applications, and the concept of Data-Oriented Programming.

  13. 13
    Article
    Avatar of baeldungBaeldung·2y

    Guide to Finding Min and Max by Group Using Stream API

    Guide to group elements by value, find their minimum and maximum values in each group using the Stream API in Java.

  14. 14
    Article
    Avatar of baeldungBaeldung·2y

    Embedded PostgreSQL for Spring Boot Tests

    Learn how to use Embedded PostgreSQL for Spring Boot tests and explore alternatives, including Flyway integration and the Zonky Embedded Database.