Best of Spring BootAugust 2024

  1. 1
    Article
    Avatar of freecodecampfreeCodeCamp·2y

    Build a Shopping Cart Backend with Spring Boot and Spring Security

    Master Spring Boot and Spring Security by developing a fully functional shopping cart backend application. This course covers project setup, entity class creation, CRUD operations, service and controller development, and security integration using JWT. Suitable for both beginners and experienced developers, it provides practical insights and skills for backend development.

  2. 2
    Article
    Avatar of javarevisitedJavarevisited·2y

    Top 5 Websites to Learn Spring Framework in Depth

    Spring Framework is a popular tool in the Java ecosystem for building robust and scalable applications. To help learners, the post lists five websites that offer comprehensive Spring tutorials and courses: Udemy, Spring Framework Official Documentation, Baeldung, Java Brains, and Spring Framework Guru. These platforms provide resources for both beginners and advanced developers, covering topics from dependency injection to Spring Boot, AOP, and data access.

  3. 3
    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.

  4. 4
    Article
    Avatar of baeldungBaeldung·2y

    Changing Spring Boot Properties at Runtime

    Discover how to dynamically manage Spring Boot application configurations at runtime using various methods. Learn about creating prototype-scoped beans, utilizing Spring Cloud's @RefreshScope and /actuator/refresh endpoint, and managing external configuration files. These techniques allow for on-the-fly changes without restarting the application, providing flexibility and enhancing maintainability.

  5. 5
    Article
    Avatar of javarevisitedJavarevisited·2y

    Creating Locally-Running LLM Chatbot using Java and Spring Boot

    Learn how to create a locally-running chatbot using a pre-trained LLM model with Java and Spring Boot. The tutorial guides you through using the llama.cpp library ported to Java and setting up necessary components like the model and prompt, as well as handling the chatbot's main service. Detailed code snippets are provided for a comprehensive understanding.

  6. 6
    Article
    Avatar of baeldungBaeldung·2y

    Java Virtual Machine Tutorials

    Java applications often face slow startup and warmup times. The CRaC project from OpenJDK addresses this by creating a performance checkpoint and restoring the JVM at that point. BellSoft offers optimized containers for Java applications, packaging Alpaquita Linux and Liberica JDK, enabling easy integration of CRaC in Spring Boot applications.

  7. 7
    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.

  8. 8
    Article
    Avatar of itnextITNEXT·2y

    Hexagonal Architecture — A Favorite Lyrics Spring Boot — Java Example

    Hexagonal Architecture, introduced by Alistair Cockburn in 2005, aims to mitigate issues in object-oriented programming through Ports and Adapters. It separates application components into three parts: core (business logic), primary ports and adapters (driving interaction), and secondary ports and adapters (interfacing with external systems). This example demonstrates managing a lyrics storage system using Spring Boot, JPA for persistence, and an H2 in-memory database. The architecture ensures clear separation between business logic and external dependencies, promoting interchangeability and modularity.

  9. 9
    Article
    Avatar of semaphoreSemaphore·2y

    Securing a Spring Boot Application with Cerbos

    Access control is crucial for application security, especially within microservices architectures where managing authorization logic can become complex. Cerbos, an open-source tool, helps centralize and simplify access control policies. This tutorial guides you through securing a Spring Boot application with Cerbos policies, detailing how to create, test, and manage policies using Cerbos Playground and integrate it with Semaphore CI for automated testing. It also includes instructions on setting up Docker for local development and configuring a Spring Boot application to implement these policies effectively.

  10. 10
    Article
    Avatar of baeldungBaeldung·2y

    Dynamic Client Registration in Spring Authorization Server

    Spring Authorization Server provides sensible defaults suitable for client applications with minimal configuration. However, dynamic client registration is not enabled by default. Follow these steps to enable and use dynamic client registration in a Spring Boot application, ensuring proper authentication using bearer tokens and configuring the necessary endpoints. The tutorial includes both server and client implementations, detailing how to register clients dynamically using a custom `RegisteredClientRepository` and integrating the process into a Spring Security-based application for dynamic OAuth2 client management.