Skip to content

Stay curious. Build better.

Appearance

Choose how BestHub looks on this device.

Changes apply immediately.

Search articles

Open Discover with these filters

Suggested searches

Backend Development

15 min read

Spring Boot Logging: Initialization Order & Config Priority Explained

This article dissects Spring Boot's logging system initialization sequence, the two-phase LoggingSystem setup, and the four-tier configuration priority chain from explicit logging.config down to application.yml logging.* properties, with source-code walkthroughs and practical logback-spring.xml examples.

13 min read

FlowMQ Kafka: Compute-Storage Separation Cuts Cloud Costs 94% and Removes Rebalancing

FlowMQ Kafka implements the Kafka protocol with compute-storage separation, offering S3 for low-cost cloud storage and RLog for low-latency on-prem deployments, using segment-level replication and Flexible Quorum to enable seamless scaling and fast failure recovery without data rebalancing.

11 min read

Dynamic JSON Field Control in Spring Boot Without Code Changes: Jackson + ByteBuddy Mixin Composition

This article demonstrates how to dynamically control JSON serialization in Spring Boot 3.5.0 by combining Jackson mixins with ByteBuddy-generated interfaces, enabling per-class and global serialization rules without modifying DTOs or writing repetitive configuration.

21 min read

Why Snowflake IDs Change in the Browser: JavaScript's 53-bit Integer Limit

This article explains how Snowflake IDs exceeding JavaScript's MAX_SAFE_INTEGER (2^53-1) lose precision when parsed as JSON numbers, causing silent bugs like 'record not found', and recommends returning IDs as strings via Jackson's ToStringSerializer or a custom @JsonId annotation, while keeping numeric fields as numbers, aligning API contracts, OpenAPI specs, and frontend types.

12 min read

30 IntelliJ IDEA Plugins That Boost Java Productivity

This article reviews 30 IntelliJ IDEA plugins grouped into essential, decorative, and convenience categories, showcasing features such as smart code completion, Alibaba code guidelines, sequence diagram generation, rainbow brackets, log highlighting, and bytecode inspection with visual demos and shortcut keys.

20 min read

Arthas 4 Deep Dive: JDK 25, Wall-Clock Flame Graphs, and AI-Powered Diagnostics

This article explores Arthas 4, a Java diagnostic tool that attaches to running JVMs without restart, detailing its core capabilities (thread, method, class inspection, hot-swapping, profiling), new features in version 4 (JDK 25 support, wall-clock flame graphs, MCP Server for AI-driven command execution), practical usage scenarios with commands, pros/cons, and ideal use cases.

38 min read

Spring Boot 3 JWT Authentication with Spring Security 6: RBAC, Refresh Tokens & Blacklist

This tutorial builds a production-ready JWT authentication system using Spring Boot 3 and Spring Security 6, covering RBAC database design, token issuance and validation, method-level permission annotations, refresh-token rotation, and Redis-based logout blacklisting with complete code examples.

7 min read

Spring-Smart-DI: Dynamic @Autowired Implementation Switching at Runtime

This article introduces spring-smart-di, a library that extends Spring's @Autowired with @AutowiredProxySPI to dynamically switch service implementations (e.g., SMS providers) via configuration without restart, using proxies that resolve the active bean at each invocation.

16 min read

Magpie: Local Gateway Pools AI Subscriptions Across Coding Agents

This article analyzes Magpie, a local gateway that pools AI model subscriptions across coding agents like Claude Code and Codex, detailing its architecture, protocol translation, routing strategies, secret masking, and how it differs from configuration tools like CC Switch.

5 min read

llama.cpp 1.0 Drops 35 Deprecated APIs, Adopts Semantic Versioning

llama.cpp 1.0.0 removes 35 deprecated functions from its public C API, adopts semantic versioning where only breaking API changes trigger major versions, adds FP8 KV cache support, MoE CPU offloading, new model integrations including Kimi-K3.1-Pro and drama-3, and provides pre-built binaries for 150+ architecture variants across major platforms.

21 min read

Nacos Service Registration & Discovery: Source Code Deep Dive with Spring Cloud Integration

This article analyzes Nacos service registration and discovery internals, covering architecture, Spring Cloud Commons integration, heartbeat-based health checks, OpenAPI registration flow, and the HostReactor's three-map caching mechanism with 10-second periodic updates and failover support.

17 min read

Spring Boot Collection Injection & @Order Sorting: Source Code Analysis & Patterns

This article explains how Spring Boot injects multiple beans into collections (List, Set, Map, arrays), details the @Order, Ordered, and PriorityOrdered sorting mechanisms with source code analysis of DefaultListableBeanFactory and OrderComparator, and demonstrates practical applications in Strategy and Chain of Responsibility patterns.

19 min read

Java 27 LazyConstant: Fix 6s Startup Delay Caused by Eager static final Initialization

The author traces a 6-second Java service startup delay to eager initialization of large objects via static final fields, demonstrates how Java 27's LazyConstant API enables thread-safe, one-time lazy initialization with constant semantics, and explains when to use it versus Spring @Lazy, caches, or double-checked locking.

4 min read

Why Java Developers Prefer Lombok Over Public Fields: Dogmatism's Toll

This article argues that Java developers adopt Lombok as a compromise against dogmatic encapsulation that mandates getters/setters for fields rarely needing custom logic, while also criticizing unnecessary interface/impl splits and DTO naming conventions, illustrated by a case where a getter enabled quick refactoring across hundreds of call sites.

13 min read

How I Replaced 16 If-Else Blocks with Spring Boot Strategy Pattern (And Why It Works)

This tutorial demonstrates how to refactor a 16-branch if-else chain in a Spring Boot order service using the Strategy Pattern, showing interface definition, strategy implementations, auto-registration via Spring's List injection, factory pattern for O(1) lookup, and common pitfalls to avoid.

52 min read

Kafka Producer Internals: Batching, Compression, Idempotence & Transactions Deep Dive

This article dissects Kafka producer internals through real incidents, covering async send mechanics, memory management, idempotence via PID/epoch/sequence numbers, transaction semantics, configuration trade-offs, source code walkthroughs of doSend/append/Sender/idempotence validation, and 20 interview Q&As with practical tuning guidelines.