This article explains why microservice calls can block threads when downstream services become unresponsive, and demonstrates how to configure Resilience4j time‑limit policies in a Spring Boot project to protect against cascading failures while keeping response times predictable.
Learn how to design resilient microservices by implementing retry mechanisms using Resilience4j, including configuration, code examples for order and product services, handling exceptions, and testing the automatic retry behavior to improve system availability while noting limitations for non‑idempotent APIs.
This article explains how to use Spring Boot 2.4's actuator startup endpoint to monitor and analyze application initialization time, offering practical steps, configuration examples, code snippets, and a test case to identify and optimize slow components such as database pools and custom beans.
This article explains the concept of idempotency, its importance in distributed systems, and demonstrates a practical implementation in Spring Boot using a token-based annotation, Redis configuration, and sample code, along with testing results that show only one successful response among concurrent requests.
This article explains how to configure Maven profiles for different environments, use the maven‑assembly‑plugin to create a zip deployment package, and employ a custom shell script (shenniu_publish.sh) to unzip, start, stop, and restart a Spring Boot jar on Linux, streamlining the build‑and‑deploy workflow.
This article explains why Maven is essential for Java projects, describes its lifecycle and standard directory layout, shows how to install and configure Maven, create a project in IntelliJ, manage dependencies, use plugins, build multi‑module projects, and package Spring Boot applications.
This guide walks through the fundamentals and advanced usage of Logback in Spring Boot, covering its architecture, default integration, Maven dependencies, XML and property configurations, custom appenders, asynchronous logging, MDC for distributed tracing, and ELK integration with practical code examples.
This article provides a comprehensive overview of common Spring Boot annotations, including @SpringBootApplication, @RestController, @RequestMapping, and JPA annotations, explaining their purposes, usage, and example code snippets for building Java backend applications effectively.
This article explains the origins, principles, advantages, disadvantages, adoption criteria, architectural stages, required infrastructure, design patterns, service splitting methods, and popular frameworks for building cloud‑native microservices, helping engineers decide when and how to transition from monoliths to microservice‑based systems.
This article presents a comprehensive collection of Spring Boot best practices—ranging from custom BOM dependency management and auto‑configuration to project initialization, code organization, controller and service design, database isolation, concurrency handling, externalized configuration, logging, and testing—to help developers create maintainable, high‑quality microservice applications.
This article explains that Spring Boot controllers are singleton by default, why that makes them unsafe when using non‑static fields, demonstrates the problem with sample code, and provides practical solutions such as using prototype scope or ThreadLocal variables.
This article explains how Spring Boot launches its embedded Tomcat server, covering Maven dependencies, the main application class, production packaging, the SpringApplication.run workflow, context creation, refresh mechanics, TomcatWebServer initialization, and the internal Tomcat component hierarchy.
Spring Boot 2.3.3 has been released, offering initial support for JDK 15, a Maven parent pom snippet, 67 bug fixes and enhancements—including HTTP/2 improvements, configuration fixes, and numerous dependency upgrades—along with updated documentation and a link to the full release notes.
This article introduces Spring Cloud as a Spring Boot‑based microservice framework, explains the fundamentals of service architecture through an illustrative story, and details essential components such as service registry, discovery, load balancing, circuit breaking, configuration management, messaging bus, and tracing, accompanied by practical code examples.
Spring Boot 2.3.3 stable release brings 67 improvements including HTTP/2 support without mandatory Jetty/Conscrypt, numerous bug fixes such as handling null values in SPRING_APPLICATION_JSON, endpoint ID migration, Reactor debug issues, OCI image build failures, and upgraded dependencies, with full details on the GitHub release page.
Spring Boot 2.4 introduces a major overhaul of how application.properties and application.yml files are processed, adding deterministic document ordering, new profile activation keys, support for multi‑document properties, profile groups, import of external configuration, and Kubernetes‑aware volume mounts, while preserving backward compatibility through a legacy mode.
This article explains how to use the retrofit‑spring‑boot‑starter library to seamlessly combine Square's Retrofit HTTP client with Spring Boot, covering dependency setup, annotation configuration, interface definition, injection, annotation‑based interceptors, connection‑pool management, logging, exception formatting, call adapters, converters, and global interceptors.
This tutorial explains why in‑process caches like EhCache can cause consistency problems in clustered environments and demonstrates step‑by‑step how to replace EhCache with Redis in a Spring Boot 2.x application, including dependency setup, configuration, and a unit test that verifies caching behavior.
Spring Boot Admin 2.3.0, built on Spring Boot 2.3.x and Spring Cloud Hoxton.SR7, introduces i18n support, metadata configuration, request‑body caching, a new ApplicationRegistrator interface, MBean name display improvements, and enhanced alarm notifications, with full dependency details and demo screenshots provided.
This article explains Spring's event mechanism, covering the ApplicationEvent API, built‑in events, listener registration via @EventListener, the internal processing flow, SimpleApplicationEventMulticaster broadcasting, and the specific event types and listeners used in Spring Boot.
This tutorial walks through setting up a Spring Boot and MyBatis multi‑module backend project in IntelliJ IDEA, covering environment preparation, directory layout, parent and sub‑module creation, code examples, dependency configuration, MyBatis integration, and final verification of the running service.
This guide explains how the kk-anti-reptile component protects Spring‑Boot distributed systems from crawlers by using a servlet filter, configurable IP and User‑Agent rules, captcha challenges, Maven integration, and required Redis and Apollo settings, with full code examples.
This article explains Spring Boot's global lazy initialization feature, showing how to enable it, the code changes required, its benefits for reducing startup time, and the trade‑offs such as longer first request latency and delayed error detection.
This guide explains how to use Spring Boot's Actuator /actuator/configprops endpoint to track and retrieve real-time configuration property values across multiple environments, handle profile-specific settings, customize sensitive data masking, and integrate checks into CI pipelines.
This article explains why a MySQL repeatable‑read transaction can produce an incorrect negative balance, then shows how to prevent such anomalies by implementing a reliable, re‑entrant distributed lock using Redis commands, Lua scripts, and Java/Spring‑Boot code, while also covering lock expiration, atomicity, and the RedLock algorithm.
Learn how Spring Boot 2.3’s built-in graceful shutdown works, configure it with server.shutdown=graceful, understand shutdown phases, timeout settings, and see code examples for handling shutdown hooks and actuator endpoints, ensuring active requests finish without data inconsistency across Tomcat, Jetty, Netty, and Undertow.
This article provides a comprehensive overview of the Spring framework, explaining what it is, why it became popular, its ecosystem—including Spring Boot, Spring Cloud, and Spring Cloud Data Flow—while also tracing the evolution of Java web architectures from early JSP/Servlet models to modern MVC and micro‑service designs.
Spring Boot 2.3.0 introduces upgraded core and third‑party dependencies, adds Java 14 support, enhances Docker image building, provides graceful shutdown and service‑availability probes, and includes numerous other improvements, with full release notes and extensive community contributions.
This guide explains how multipart/form-data enables sending JSON and binary data together, outlines its essential specifications, demonstrates front‑end FormData usage, and details Spring Boot back‑end handling with @RequestParam and @RequestPart annotations.
This tutorial walks you through converting a Spring Boot MyBatis integration from annotation‑based configuration to XML‑based mapper files, covering scanner setup, interface definition, XML mapper creation, property configuration, and a unit test to verify database read/write operations.
Spring Cloud Hoxton.SR2 was released on February 19, 2020, bringing updates to Spring Cloud Stream and Spring Cloud Function, with a new Maven BOM dependency snippet, but without associated issue numbers, bug fixes, or a detailed release log.
This article explains the common misunderstanding of JdbcTemplate's queryForList method, shows the resulting IncorrectResultSetColumnCountException, clarifies the method's intended use for single‑column results, and walks through Spring Boot's JdbcTemplate auto‑configuration source code and its key annotations.
This guide explains the STOMP protocol, its frame structure, and how to integrate it with Spring Boot to build a real‑time chat application, covering server‑side configuration, message broker setup, as well as the client‑side HTML and JavaScript needed for sending and receiving messages.
This article explains how Spring Data JPA streamlines CRUD operations in Spring Boot by configuring dependencies, defining entity classes and repository interfaces, leveraging method‑name query derivation and @Query annotations, and validating functionality with comprehensive unit tests.
This guide explains how Spring Boot handles favicon across versions, how to disable the default icon, and provides step‑by‑step instructions for adding a custom favicon—including Thymeleaf integration, cache clearing tips, and troubleshooting common issues.
Spring Cloud Greenwich SR5, the final release of the Greenwich train based on Spring Boot 2.1.12, introduces bug fixes, minor enhancements, updated modules, and Maven/Gradle integration guidance, while recommending an upgrade to the Hoxton release for optimal cloud-native development.
This article demonstrates how to design and implement a high‑frequency like/unlike functionality in a Spring Cloud application by using Redis as a cache, persisting data to MySQL at two‑hour intervals, and automating the sync with Quartz scheduled jobs.
This article walks through using Spring Boot Actuator to monitor micro‑service applications, covering quick project setup, essential endpoints such as health, metrics, loggers and shutdown, custom health indicator implementation, dynamic log level changes, and securing actuator endpoints with Spring Security.
This article presents a complete Spring Boot solution for sending emails via RabbitMQ, covering message confirmation, consumer idempotency, retry mechanisms, manual acknowledgments, configuration details, code implementation, testing procedures, and an optional dynamic‑proxy extension for clean business logic.
This article explains how to disable template caching in Spring Boot for Thymeleaf, FreeMarker, Groovy, and Velocity, and compares several hot‑deployment methods including Debug mode, spring-boot-devtools, Spring Loaded, and JRebel, providing configuration snippets and practical guidance.
Spring Boot 2.2.2 introduces ConstructorBinding enhancements, Gradle 6 support, and a series of bug fixes ranging from @SpyBean scope issues to Liquibase endpoint inaccuracies, providing developers with clearer configuration handling and improved stability across the framework.
This tutorial explains why persisting a Spring Boot application's Process ID (PID) is useful, how to use the built‑in ApplicationPidFileWriter to write the PID to a file, and how to customize the file location via configuration properties.
This article explains the purpose of ApplicationContextInitializer in Spring Boot, shows how to implement custom conditions and initializers for environment‑specific configuration, and investigates why the initializer may execute twice when Spring Cloud Context is added, leading to bean duplication and port conflicts.
This guide explains how to add Spring Boot Actuator to a project, configure security, enable and customize monitoring endpoints, and use the built‑in REST APIs such as health, info, beans, metrics, and shutdown for production‑grade application observability.
The article presents a curated list of the ten most starred Java open‑source repositories on GitHub for October, covering algorithms, backend frameworks, design‑pattern libraries, e‑commerce platforms, cloud‑native demos, and a popular open‑source game, each with brief descriptions and star counts.
Spring Cloud Hoxton RC2, built on Spring Boot 2.2.1, introduces upgraded Vault, CircuitBreaker, Gateway, Config, OpenFeign, and Netflix components with new properties for disabling auto‑configurations and enabling encrypted value decryption, guiding developers on migration and usage.
Spring Boot 2.2.0 has been officially released, offering faster startup, lower memory usage, optional lazy initialization via the spring.main.lazy-initialization property, full Java 13 compatibility, immutable @ConfigurationProperties through constructor binding, and extensive RSocket auto‑configuration with a new starter.
After discovering misconfigurations in a Spring Boot project’s QuartzJobBean implementation, this article examines the root causes, compares legacy and modern Spring solutions—including custom JobFactory, AutowireCapableBeanFactory, and the spring-boot-starter-quartz starter—and provides detailed code examples to correctly integrate Quartz with Spring’s IoC container.
This guide explains how to prepare a Spring Boot application, set up a Debian server with Java, UFW and NGINX, configure the app as a systemd service, create an NGINX reverse‑proxy, and enable HTTPS using Certbot, providing a lightweight alternative to embedded Tomcat.
This article explains the concept of idempotency in programming, outlines common causes of duplicate submissions, and presents multiple solutions—including frontend button disabling, PRG pattern, session tokens, database constraints, local locks using ConcurrentHashMap, AOP interceptors, and distributed Redis locks—complete with Java code examples.
This guide lists the essential server and frontend component versions—including JDK, Maven, Spring Boot, Spring Cloud, Node, and Npm—explains special considerations for Spring milestone releases, and provides ready-to-use Maven repository and pluginRepository XML snippets for proper dependency management.
This tutorial explains how Spring Boot loads configuration files, compares properties and YAML formats, shows how to define custom parameters, use random values, switch environments via profiles, and leverage the new Binder API with practical code examples for Java developers.
This article curates thirteen notable open‑source Spring Boot projects—including e‑commerce platforms, micro‑service scaffolds, payment solutions, and ERP systems—providing brief overviews, star counts, repository links, and demo screenshots to help Java developers discover useful resources for learning and building applications.
This article explains how to build a front‑back end separated application using Spring Boot for the backend and Vue.js for the frontend, covering JSON APIs, CORS interception, Shiro security integration, custom session management, and two deployment strategies with code examples.
This tutorial explains the limitation of Sentinel Dashboard rule persistence, analyzes the data flow, and provides a step‑by‑step solution using DynamicRuleProvider and DynamicRulePublisher to read and write flow rules in Apollo, complete with code examples and configuration details.
This article explains why a Spring Cloud application cannot register with multiple service registries by default, analyzes the startup failure caused by duplicate AutoServiceRegistration beans, and provides a step‑by‑step solution using configuration and auto‑configuration exclusion to enable successful multi‑registry registration.
This guide explains how to add the Mica‑Captcha library to a Spring Boot project, covering Maven/Gradle dependencies, configuration options, cache setup, servlet and WebFlux usage, and generating both image and Base64 captchas for secure, attractive verification.
This article walks through a real‑world investigation of excessive native memory usage in a Spring Boot application, detailing JVM settings, Linux‑level tracing, custom memory allocators, and the root cause in Spring Boot’s ZipInflaterInputStream, ultimately providing a fix and best‑practice recommendations.
This article explains Spring Cloud Stream’s default retry mechanism, demonstrates a complete example of producing and consuming messages with intentional failures, shows how to configure retry attempts, and discusses what happens when retries succeed or ultimately fail, providing practical guidance for reliable message processing.
This article explains why duplicate message consumption occurs when using Spring Cloud Stream with RabbitMQ or Kafka, introduces the concept of consumer groups, and provides a step‑by‑step Java example showing how to configure and use consumer groups to ensure each message is processed by only one instance.
Spring Cloud Alibaba, an open‑source project from Alibaba, has launched its first preview version, offering Java developers integrated service discovery, configuration management, high‑availability protection, and seamless Alibaba Cloud product components, all built on Spring Boot and Spring Cloud patterns.
This tutorial explains how to configure the spotify/docker-maven-plugin in a Spring Boot project's pom.xml, build Docker images with Maven commands, run containers, optionally use a custom Dockerfile, push images to DockerHub, and bind the build goal to the Maven package phase for automated container creation.
This step‑by‑step guide shows how to set up a RabbitMQ server, create a Spring Boot project with Gradle or Maven, define a message receiver, configure queues, exchanges and bindings, and send and receive text messages using RabbitTemplate and a CommandLineRunner.
This tutorial walks through adding Spring Security to a Spring Boot web application, covering Maven dependencies, unsecured home page creation, MVC view‑controller setup, detailed security configuration, login and hello pages with Thymeleaf, the main application class, and testing the protected endpoints.
This guide walks you through constructing a Spring Cloud Zuul gateway, covering the shortcomings of exposing services directly, the required preparations, Maven dependencies, application code, YAML configuration, automatic route creation, and how to verify the gateway’s behavior.
This guide walks you through creating a basic Spring Boot project with Maven, adding the web starter, implementing a simple Hello World REST controller, and writing unit tests using MockMvc, providing step‑by‑step instructions, code snippets, and project structure details to help Java developers quickly get started with lightweight Spring applications.
This guide walks through creating a Spring Cloud Hystrix Dashboard application, configuring its Maven dependencies, enabling the Hystrix stream on a service instance, and using the dashboard’s controls to monitor real‑time circuit‑breaker metrics such as health, traffic volume, and latency.
This guide shows how to enable the Spring Boot 1.5.x /loggers actuator endpoint, configure a simple application, and use POST and GET requests to modify and inspect log levels at runtime without restarting the service.