This article explains why multi‑level caching is needed, outlines design challenges of combining Redis and Caffeine, provides step‑by‑step integration instructions for Spring Boot, and presents performance benchmarks demonstrating the speed advantage of the multi‑level approach.
This article explains how to build a Spring Boot starter that automatically registers XXL‑Job executors and job handlers by logging into the admin center, invoking the necessary REST APIs, and using custom annotations to capture job metadata, eliminating manual configuration for large numbers of scheduled tasks.
This article explains how to build a highly extensible, modular backend service using Spring Cloud, demonstrates practical module composition and separation, discusses RESTful API design principles, presents concrete Java code examples for commands, controllers and pagination, and reviews popular API documentation tools such as Swagger, SpringDoc and Knife4j.
This article explains the causes of duplicate message consumption in RabbitMQ, demonstrates how to reproduce the issue with a 10,000‑message test, and provides three practical solutions using unique IDs stored in Redis to ensure idempotent processing in Java Spring applications.
This article explains why zero‑downtime releases are essential for modern services, defines three maturity levels, compares common release patterns, outlines the required technical components, and provides step‑by‑step Spring Boot/Eureka procedures—including configuration and graceful‑shutdown scripts—to keep applications available during deployment.
This comprehensive tutorial walks you through designing a simple front‑back separation microservice project, implementing it with Spring Boot, deploying it on a Kubernetes cluster using K8seasy, and adding essential features such as service registration, multi‑instance high availability, monitoring with Prometheus and Grafana, logging via Kafka, tracing with Zipkin, and flow control with Sentinel, all verified through dashboards and tracing tools.
This article explains how Spring Boot’s auto‑configuration works, covering the role of application properties, the @EnableAutoConfiguration annotation, condition annotations, the spring.factories mechanism, and how configuration properties are bound to beans such as ServerProperties to make settings like server.port effective.
This article explains how to integrate Logback with SLF4J in Spring Boot, covering dependency setup, default and custom configurations via logback‑spring.xml, detailed element descriptions, and best‑practice logging code examples, including file rolling policies and performance considerations.
This tutorial walks through setting up Docker's remote API, installing and configuring the IDEA Docker plugin, creating a Spring Boot Eureka project, adding the docker‑maven‑plugin, building a Docker image, and running the container with one‑click deployment for Java backend services.
This article shares sixteen practical Spring Boot best‑practice recommendations—ranging from custom BOMs and automatic configuration to clean controller design, constructor injection, externalized configuration, and comprehensive testing—to help developers create maintainable, scalable Java microservices.
This article provides a comprehensive guide to using Spring Retry and Guava Retry in Java applications, covering dependency setup, basic and annotation-based usage, various retry and back‑off policies, code examples, and a comparison of both frameworks to help developers implement robust retry mechanisms.
This article explains the fundamentals of Spring transactions, demonstrates how to set up a Spring Boot project with MySQL and MyBatis, walks through declarative transaction usage, compares REQUIRED, REQUIRES_NEW, and NESTED propagation behaviors with code examples, and highlights common pitfalls and best‑practice steps.
This article explains various web message‑push techniques—including short and long polling, iframe streaming, Server‑Sent Events, MQTT and WebSocket—detailing their principles, advantages, drawbacks, and providing complete Spring Boot and JavaScript code examples for real‑time notification badges.
This article explains how Spring Application Events can decouple complex business logic, demonstrates creating custom events, listeners, and publishers, shows both synchronous and asynchronous handling with @EventListener and @Async, and provides complete code examples and test results for a Spring Boot application.
This article explains that Spring Boot 3.0 requires Java 17 and Spring Framework 6, outlines the 14 new features of Java 17, and presents benchmark results showing Java 17's performance advantages over Java 11 and Java 16 with different garbage collectors.
This article explains why, in Spring Boot 2.0.3, a bean defined with @Configuration + @Bean replaces a @Component‑annotated bean of the same type, shows how to verify which bean is instantiated, and describes the framework’s evolution—including the allowBeanDefinitionOverriding setting—that gives developers control over bean overriding behavior.
Learn how to configure Logback in Spring Boot to separate logs by level, implement asynchronous logging for reduced I/O latency, and verify performance gains—up to tenfold throughput improvement—using JMeter tests on a six‑core, 8 GB server, with detailed XML snippets and code explanations.
This comprehensive guide explains the most commonly used Spring Boot annotations—including MVC mapping, bean definitions, dependency injection, scope management, container configuration, and bootstrapping—providing clear examples and visual diagrams to help developers write cleaner, more efficient Java code.
This article compares three request‑merging approaches—Hystrix Collapser, a custom BatchCollapser implementation, and Guava’s ConcurrentHashMultiset—explaining their configurations, code examples, and suitable scenarios for reducing downstream load and improving system throughput while also highlighting performance trade‑offs and practical tips for integration in Spring‑Boot services.
This guide walks you through upgrading to Spring Boot 3.0 by adopting Java 17, moving to Spring Boot 2.7 first, cleaning deprecated APIs, adjusting configuration files, handling profile activation, and addressing compatibility and performance changes such as the new PathPatternParser.
The article presents kk-anti-reptile, a Spring Boot‑based anti‑crawler filter that uses a servlet Filter with a rule‑chain architecture, details its system requirements, configuration, integration steps for backend and frontend, and provides code examples and deployment notes.
This article walks readers through the complete lifecycle of a microservice system—from architectural design and Java Spring Boot implementation to Kubernetes deployment, high‑availability setup, monitoring with Prometheus/Grafana, tracing with Zipkin, and flow‑control with Sentinel—providing practical code snippets and step‑by‑step instructions.
This article introduces the open‑source mall‑tiny rapid‑development scaffold, explains its core features and integration with the mall‑admin‑web front‑end, and provides a step‑by‑step guide to upgrading it to Spring Boot 2.7.0, covering Swagger, Spring Security, MyBatis‑Plus, circular‑dependency resolution, and CORS configuration.
This guide explains the upcoming Spring Boot 3.0 release, the need for Java 17, step‑by‑step upgrade to Spring Boot 2.7, removal of deprecated APIs, configuration file changes, new path‑parsing strategy, Jakarta EE 9 compatibility, and tips for trying Spring 6.
This article provides an in‑depth tutorial on Spring Validation, covering basic usage, dependency configuration, requestBody and requestParam validation, unified exception handling, advanced techniques such as group, nested, and collection validation, custom validators, programmatic validation, fail‑fast mode, and the underlying implementation mechanisms.
This guide explains how to implement observability in cloud‑native Spring Boot applications by collecting business metrics with Micrometer, storing them in Prometheus, visualizing with Grafana, and configuring accurate alerts through custom annotations, ServiceMonitors, and Alibaba Cloud ARMS, while providing code examples and deployment steps.
This article explains Spring Web MVC's functional programming model (WebMvc.fn), covering immutable request/response handling, RouterFunction routing, HandlerFunction implementation, validation, nested routes, filters, and provides comprehensive code examples for Spring Boot 2.4.12.
This article demonstrates how to package a Spring Boot application using Maven profiles and the assembly plugin to create a zip distribution, and provides a reusable shell script (shenniu_publish.sh) for extracting, starting, stopping, and restarting the service on Linux environments.
This article introduces FastMyBatis, a zero‑configuration MyBatis extension that simplifies CRUD operations in Spring Boot projects, provides code examples for quick start, outlines service and mapper implementations, lists available mapper methods, and shows how to build query objects for flexible data access.
This tutorial walks you through creating a full‑stack food‑delivery application using Spring Boot for the backend, Vue.js for the frontend, MySQL and MongoDB for data storage, and provides detailed setup commands, module descriptions, and launch instructions.
This article explains why upgrading Spring is the official fix for the recent RCE vulnerability, and provides two practical workarounds—extending RequestMappingHandlerAdapter and mitigating exploitation conditions—for projects stuck on older Spring or Spring Boot versions.
This article introduces Super‑Scheduled, a Spring Boot starter that enhances native @Scheduled tasks by enabling dynamic runtime management, explains quick integration steps, and details the underlying implementation using configuration components, post‑processors, CGLIB proxies, and a flexible execution chain.
Learn how to enable and use Spring Boot Actuator's monitoring features—including HTTP and JMX endpoints—configure built‑in endpoints, expose custom metrics, dynamically adjust log levels, and manually register JMX MBeans, with code examples and integration tips for Prometheus and Grafana.
This article explains why Spring Cloud Gateway can return duplicate Access‑Control‑Allow‑Origin and Vary headers during CORS handling, analyzes the underlying processing flow, and provides two practical solutions—using DedupeResponseHeader configuration or implementing a custom GlobalFilter—to ensure a single, correct header is sent to the client.
This article introduces two Spring Boot based workflow solutions—Spring‑boot‑activiti and RuoYi‑vue 4.x + Flowable—detailing their architecture, key features, deployment steps, and available resources to help developers understand and experiment with workflow engines.
This article explains the differences between ApplicationStartedEvent and ContextStartedEvent in Spring Boot, clarifies their inheritance hierarchy, and lists the key events provided by Spring Boot, highlighting that ContextStartedEvent is not used in the framework.
This article explains the differences between kill -9 and kill -15 signals for Spring Boot, demonstrates how to use shutdown hooks, the Actuator endpoint, and proper thread‑pool termination to achieve an orderly application shutdown without data loss or resource leaks.
On February 14, the Keycloak team announced the deprecation of most adapters—including Spring Security and Spring Boot integrations—detailing which adapters will be discontinued, which will remain, and a timeline for the phase‑out, while noting the rise of Spring Authorization Server as a replacement.
This article explains how to replace the default Swagger‑UI with Knife4j, outlines the problems of using Swagger in a microservice environment, and presents two documentation aggregation patterns—gateway aggregation and a centralized registration mode—detailing the architecture, database schema, and Spring Boot starter implementation for a reusable Swagger registration server.
The article outlines the major updates in Spring Boot 3.0.0 M1, including the shift to Java 17, migration from Java EE to Jakarta EE, removed and upgraded dependencies, and the roadmap for upcoming milestone releases.
This tutorial walks through downloading Flowable 6.6.0, deploying the flowable‑ui web app on Tomcat, configuring a Spring Boot backend, modeling a leave‑approval BPMN process, explaining Flowable database tables, and providing Java code to deploy, start, and manage workflow instances.
Spring Boot 2.6.0 introduces several important backend enhancements, including mandatory circular‑dependency detection, custom sanitizing rules, default Redis connection‑pool activation, WebTestClient MVC testing support, a new path‑matching strategy, enriched /info endpoint data, and various other improvements.
This article explains how to secure sensitive Spring Boot configuration properties such as database credentials by integrating the Jasypt library, adding the Maven dependency, configuring an encryption password, generating encrypted values via tests, and applying them in YAML files with optional runtime salt handling.
This article explains how to configure Logback in Spring Boot to separate logs by level, use asynchronous appenders to reduce I/O latency, and demonstrates a performance test showing a ten‑fold throughput increase, while also detailing the underlying async logging mechanism.
This article explains how to use Spring's Java Validation to check configuration properties at application startup, demonstrates the required annotations, lists supported validation constraints, and shows how to implement and register custom validators to enforce business rules early in the boot process.
This guide explains how Spring Boot handles logging through Commons Logging, recommends using SLF4J as a facade, shows code examples, details log elements, demonstrates how to enable DEBUG, configure console colors, file output, rolling policies, level control, and custom formats for effective backend logging.
This article introduces Caffeine Cache as a high‑performance replacement for Guava Cache, explains its W‑TinyLFU eviction algorithm, demonstrates various loading and eviction strategies with code examples, and shows how to integrate and configure it in Spring Boot applications.
This article explains the concepts of token, timestamp, and sign, describes how they are used together to secure API calls, shows how to prevent duplicate submissions, and provides complete Spring Boot code examples—including Redis configuration, interceptors, utilities, and ThreadLocal handling—for building a robust backend authentication system.
This article explains how Caffeine Cache improves on Guava Cache with the modern W‑TinyLFU algorithm, details its eviction strategies, shows how to configure it in Spring Boot, and provides code examples for manual, synchronous, and asynchronous loading, as well as annotation‑driven usage.
Jeepay is an open‑source, Spring Boot‑based payment platform that supports multiple channels such as WeChat Pay, Alipay, and UnionPay, offering distributed deployment, high concurrency, secure signing, and a modular front‑back separation with comprehensive management and merchant interfaces.
Spring Cloud 2020.0.5, a bug‑fix release compatible with Spring Boot 2.4.x and 2.5.x, introduces updated components such as Netflix/Eureka 1.10.17, new Config support for HTTPS proxy and AWS/Redis/CredHub, enhanced Gateway metrics, Kubernetes client proxy, OpenFeign pagination, and Vault token handling, with a full component version list.
This article explains the recent Log4j2 critical vulnerability, shows the official patch, and provides the simplest Spring Boot configuration change—adding a property in pom.xml—to upgrade Log4j2 safely while highlighting why the default logging component is Logback and offering advice on avoiding unnecessary third‑party replacements.
This tutorial walks through creating a leave‑approval process in Spring Boot 2.3.12 with Activiti 7.1, illustrating how an Exclusive Gateway routes requests based on leave days, how flags control loop‑back or completion, and provides full BPMN, service, and controller code examples.
The article outlines the upcoming Spring Boot 3.0 milestone, highlighting major changes such as removal of deprecated APIs, a minimum Java 17 requirement, migration to Jakarta EE 9, discontinued support for several libraries, and offers practical advice for developers planning the upgrade.
This article introduces Knife4j, a lightweight Java MVC Swagger enhancement, explains its core features and UI improvements, and provides a step‑by‑step guide with Maven dependencies, configuration classes, model definitions, and controller code to quickly set up interactive API documentation in a Spring Boot project.
This article reviews four Spring‑Boot techniques—traditional AOP, HandlerInterceptor, custom ArgumentResolver, and Servlet Filter—to implement a reusable app‑key whitelist authentication, provides complete code examples for each, and explains their execution order within the request processing chain.
This tutorial walks through designing a QR‑code login flow using Spring Boot, detailing the required database schema, roles, API endpoints, server‑side WebSocket setup, and front‑end JavaScript to fetch the QR image, extract the UUID, and establish a real‑time connection for authentication.
This article provides an in‑depth overview of microservice concepts, motivations, architectural principles, design patterns, service splitting strategies, essential infrastructure, popular frameworks such as Spring Boot, Spring Cloud, Dubbo, and Service Mesh, and practical recommendations for adopting microservices in real‑world projects.
Spring Cloud 2020.0.4, a bug‑fix release compatible with Spring Boot 2.4.x and 2.5.x, introduces updated dependencies, new configuration capabilities, enhanced circuit‑breaker support, and a comprehensive list of module version upgrades for cloud‑native microservice development.
Jeepay is an open‑source payment system for internet businesses that supports multiple channels like WeChat Pay, Alipay and UnionPay, offers a Spring Boot backend with Spring Security, Ant Design Vue frontend, and provides comprehensive documentation, architecture diagrams, and deployment guides.
Jeepay is an enterprise‑grade open‑source payment platform built with Spring Boot, Ant Design Vue and Spring Security, supporting multiple channels such as WeChat Pay, Alipay and UnionPay, and offering distributed deployment, high concurrency, secure transaction signing, and comprehensive operation and merchant modules.
This article explains how to package a Spring Boot application using Maven profiles and the maven‑assembly‑plugin, generate a zip deployment package, and manage the deployment with a custom shell script that supports unzip, start, stop, and restart operations across different environments.
Jeepay is an open‑source, multi‑channel payment system for internet companies that combines Spring Boot backend services, Ant Design Vue front‑end, Spring Security permission control, and supports WeChat Pay, Alipay and UnionPay with distributed, high‑concurrency architecture.
This article introduces the Mica microservice component suite, outlines its latest versions and compatibility with Spring Boot and Spring Cloud, details recent updates—including Prometheus support, Swagger enhancements, and dependency upgrades—and provides Maven, Gradle, and configuration examples for integrating Mica-prometheus, alert webhooks, and custom event handling.
This tutorial demonstrates how to add Actuator dependencies to a Spring Boot 1.5.7 application, expose Prometheus‑compatible metrics, collect them with a Dockerized Prometheus instance, and visualize the data using Grafana, including all required configuration files and code snippets.
This article explains how the spring-boot-maven-plugin creates an executable JAR, details the internal JAR structure, the role of the JarLauncher and Spring Boot Loader classes, and shows how the custom class loader loads classes at runtime.
This tutorial explains how to protect sensitive Spring Boot configuration values—such as database passwords and service keys—by encrypting them using the Jasypt library, covering setup, Maven integration, encryption/decryption commands, and best security practices.
This article explains how to achieve dynamic creation, removal, activation, and deactivation of scheduled tasks in a Spring Boot application by customizing the ScheduledTaskRegistrar and related components, providing a lightweight alternative to integrating the Quartz framework.
This article explains why Elastic Job tasks can clash in ZooKeeper when they share the same name but different classes, and shows how using the namespace property—especially tying it to the Spring Boot application name—effectively isolates jobs and prevents such conflicts.
This article explains why CORS problems arise in front‑end/back‑end separation, introduces the CORS standard and request types, details the required response headers, and provides three concrete Spring Boot solutions—including global configuration, filter‑based handling, and the @CrossOrigin annotation—complete with code examples and migration notes.
This article explains how to integrate the kk‑anti‑reptile anti‑crawler component into a Spring Boot application, covering system requirements, filter workflow, rule configuration, Maven setup, Redis and Apollo settings, as well as front‑end handling of the 509 response and captcha verification.
This article explains why dynamic configuration is needed for Spring Boot applications, compares three mainstream microservice configuration centers (Nacos, Config+Bus, Apollo), and provides step‑by‑step tutorials for two Spring Boot‑specific solutions with complete code examples.
This article introduces a GitHub repository that documents 16 Spring Boot vulnerabilities, detailing information leakage and remote code execution cases, providing step‑by‑step exploitation guides, underlying principles, and analysis for security research and authorized testing.
This article introduces Apache Kafka, explains its publish‑subscribe and point‑to‑point models, outlines why it is used for decoupling and high‑availability, and provides a step‑by‑step Spring Boot integration guide with configuration, producer and consumer code samples.
This article explains how Spring Boot’s @SpringBootApplication annotation combines several meta‑annotations, how auto‑configuration is loaded from META‑INF/spring.factories, and how the framework creates and refreshes the application context, including the embedded Tomcat server and custom starter creation.
This article explains several ways to obtain a Spring Boot application's version number at runtime, including reading the MANIFEST.MF, loading pom.properties, using configuration files, and leveraging Spring Boot's built‑in BuildProperties via the spring‑boot‑maven‑plugin.
This tutorial explains how to install Docker, pull and run a FastDFS Docker image, verify the service, add the fastdfs-client dependency to a Spring Boot project, configure the client, implement a utility class for file operations, and test the integration with sample code.
This article explains the differences between Spring Boot’s CommandLineRunner and ApplicationRunner, illustrates common pitfalls when using CommandLineRunner—such as blocking startup and causing exceptions—and shows how to run tasks in a separate thread to avoid startup failures.
This article explains how to shrink large Spring Boot fat JARs and microservice deployment packages by separating dependencies into a shared lib directory, using Maven plugins and manifest configuration across four progressive levels, ultimately achieving kilobyte‑scale business JARs and faster deployments.
This tutorial walks you through Sentinel's lightweight console, showing how to view machine health, monitor real‑time metrics, configure flow, degrade, hotspot, and system rules, handle exceptions with custom handlers, enable authentication, and push rules in a Spring Boot microservice environment.
This guide walks you through setting up RocketMQ Console 2.0 on a RocketMQ 4.8.0 cluster, configuring its properties, building and running the service, and testing message sending and receiving using a Spring Boot application, including topic creation tips.
This article explains the main components of a Spring Cloud‑Nginx architecture, version compatibility between Spring Cloud and Spring Boot, essential middleware such as Eureka, Nacos, Zuul and Redis, environment preparation on CentOS, and the structure of the crazy‑springcloud scaffolding used for a high‑performance seckill demo.
This article introduces Sentinel, a Java‑based library that safeguards microservice stability through traffic shaping, circuit breaking, and system‑level protection, compares it with Hystrix and resilience4j, explains core concepts, usage patterns, annotation support, and dashboard monitoring, and provides practical code examples.
This guide explains how to integrate Logback with Spring Boot, use MDC to generate and propagate a requestId across services, and implement filters and Feign interceptors for end‑to‑end log traceability in microservice architectures.
This article walks readers through the complete lifecycle of designing, implementing, deploying, and validating a simple Java Spring‑Boot microservice system on Kubernetes, covering service design, registration, monitoring, tracing, traffic control, high‑availability deployment, and practical verification steps.
This article explains why Spring Security redirects to the login page after 30 minutes of inactivity in a NW.js application, examines the underlying session handling code, and shows how to implement a custom success handler to preserve the user's original page.
This guide explains how Spring Boot 2.4 and later deprecates the traditional spring.profiles.active property, introduces the new spring.config.activate.on-profile mechanism, and shows step‑by‑step YAML and command‑line examples for single‑file, multi‑file, and legacy configuration styles.
This tutorial walks through Spring Security's authentication flow in a Spring Boot 2.2.11 application, detailing filter execution, token creation, provider verification, custom DaoAuthenticationProvider configuration, and session management with code examples and diagrams.
The XueZhiSi online exam system is a Java + Vue full‑stack solution offering easy deployment, friendly UI, clear code structure, and features for both students and administrators across web and WeChat mini‑program platforms, with detailed technology stacks and setup instructions.
This article introduces the Mica microservice framework, covering its origin, version matrix, recent updates—including a QR‑code module and revamped logging configuration—along with usage examples, ecosystem components, and documentation links for developers.
This guide shows how to add Spring Boot Actuator dependencies, enable Prometheus endpoints, configure security, run the application, collect metrics with a Prometheus Docker container, and visualize the data through Grafana dashboards.
This article provides a comprehensive interview‑style walkthrough of Redis, covering its definition, data types, caching strategies with Spring Boot, performance characteristics, eviction policies, persistence mechanisms, master‑slave replication, and Sentinel high‑availability architecture.
TLog provides a non‑intrusive, storage‑free solution for microservice log tracing by automatically tagging logs with a TraceId that propagates across services, supporting major logging and RPC frameworks and enabling rapid integration with Spring Boot in about ten minutes.
This guide walks you through setting up Spring Authorization Server 0.1.0 on Spring Boot 2.4.2, covering Maven dependencies, bean configurations, token customization, and testing with curl commands for authorization code flow, token issuance, refresh, and revocation.
This tutorial explains how to add Actuator and Prometheus dependencies to a Spring Boot application, configure security, expose metrics endpoints, run Prometheus and Grafana via Docker, and set up Grafana dashboards for real‑time monitoring of Spring Boot services.
This tutorial explains how to add Actuator and Prometheus dependencies to a Spring Boot application, configure security, run the app to expose Prometheus‑format metrics, and then set up Docker‑based Prometheus and Grafana containers to collect and visualize those metrics.
This article explains the risks of using the Linux kill -9 command to terminate Spring Boot applications, demonstrates how it can cause data inconsistency and thread interruptions, and provides several graceful shutdown techniques—including SIGTERM, Spring's ConfigurableApplicationContext, Actuator endpoints, and custom Tomcat shutdown hooks—to safely stop services and optionally perform data backup.
This article introduces FastDFS as a lightweight distributed file system, explains its tracker and storage components, provides step‑by‑step Docker installation commands, demonstrates how to integrate FastDFS with Spring Boot using Maven dependencies and configuration, and includes sample code for uploading, downloading, and deleting files.
A Spring Boot service experienced an unexplained 100 ms extra latency per request, which was traced using the Arthas Java diagnostic tool to reveal a Tomcat embed bug caused by repeated loading of Swagger UI resources, and the issue is resolved by upgrading the embedded Tomcat version.
The retrofit-spring-boot-starter library provides a Spring Boot‑compatible, type‑safe HTTP client built on Retrofit, offering easy integration, customizable OkHttpClient injection, annotation‑based interceptors, connection‑pool management, logging, retry, error decoding, circuit‑breaker support, and flexible call adapters and converters for modern Java backend development.