Programmer XiaoFu
Author

Programmer XiaoFu

xiaofucode.com – a programmer learning guide driven by the pursuit of profit

108
Articles
0
Likes
140
Views
0
Comments
Recent Articles

Latest from Programmer XiaoFu

100 recent articles max
Programmer XiaoFu
Programmer XiaoFu
Dec 18, 2025 · Fundamentals

How to Roll Back Pushed Git Commits: Practical Methods

The article explains four ways to undo code that has already been pushed to a remote Git repository—including manual diff deletion, using git revert, creating a new branch, and resetting the current branch—detailing each method’s steps, trade‑offs, and safety considerations.

IDEAbranchgit
0 likes · 7 min read
How to Roll Back Pushed Git Commits: Practical Methods
Programmer XiaoFu
Programmer XiaoFu
Nov 14, 2025 · Information Security

Why This Permission System Is So Elegant: A Comprehensive Guide to RBAC Design

The article walks through the motivations for strict permission management, explains how to structure menus, buttons, and roles into a tree, explores classic RBAC, role inheritance, constrained RBAC, user groups, organizations and positions, and finally shows how to model these concepts in database tables.

Permission ModelRBACSecurity Design
0 likes · 17 min read
Why This Permission System Is So Elegant: A Comprehensive Guide to RBAC Design
Programmer XiaoFu
Programmer XiaoFu
Nov 10, 2025 · Backend Development

Why Ignoring SpringBoot’s Default Settings Guarantees Trouble

SpringBoot’s out‑of‑the‑box defaults—such as Tomcat’s tiny connection pool, HikariCP’s 10‑thread limit, lazy‑loaded JPA entities, system‑timezone JSON serialization, un‑rolled Logback files, unlimited in‑memory cache, exposed Actuator endpoints, tiny file‑upload limits, per‑task thread creation for @Async, and unlimited transaction timeouts—can silently cripple production systems, so each must be reviewed and tuned for real‑world workloads.

ActuatorAsyncCaffeine
0 likes · 11 min read
Why Ignoring SpringBoot’s Default Settings Guarantees Trouble
Programmer XiaoFu
Programmer XiaoFu
Oct 28, 2025 · Backend Development

6 Ways to Measure API Response Time in Java

This article examines six practical techniques for measuring the latency of online interfaces in Java, from simple System.currentTimeMillis() calls to advanced AOP, interceptors, filters, and production‑grade monitoring tools like Micrometer and APM, comparing their precision, intrusiveness, and suitable scenarios.

AOPJavaPerformance
0 likes · 23 min read
6 Ways to Measure API Response Time in Java
Programmer XiaoFu
Programmer XiaoFu
Oct 16, 2025 · Operations

Stop Guessing: Kafka Message Backlog, Duplicates, and Loss Are Usually Caused by Rebalance

Kafka consumer issues such as message backlog, duplicate processing, and data loss often stem from consumer group rebalances triggered by changes in consumer count, partition count, subscription topics, or heartbeat and poll timeouts, and can be mitigated by tuning timeout settings, managing offset commits, and using sticky partition assignment.

KafkaMessage DuplicationMessage Loss
0 likes · 13 min read
Stop Guessing: Kafka Message Backlog, Duplicates, and Loss Are Usually Caused by Rebalance
Programmer XiaoFu
Programmer XiaoFu
Oct 15, 2025 · R&D Management

Why GitButler’s Modern Visual Git Management Boosts Developer Productivity

GitButler introduces virtual branches that let developers work on multiple features simultaneously without switching physical branches, offering parallel development, smart change attribution, real-time conflict detection, AI-assisted commit generation, drag-and-drop commit management, seamless conversion to real branches, deep GitHub integration, and workflow optimizations for faster bug fixes and exploratory coding.

AI-assisted commitsDeveloper WorkflowGitButler
0 likes · 5 min read
Why GitButler’s Modern Visual Git Management Boosts Developer Productivity
Programmer XiaoFu
Programmer XiaoFu
Oct 11, 2025 · Backend Development

How a Single Nacos Setting Crashed Our Payment Service—and What It Teaches About Instance Types

A mis‑configured Nacos registration flag turned a payment service into a persistent instance, preventing unhealthy nodes from being removed and causing the entire payment chain to fail; the article explains the fundamental differences between registration and configuration centers and when to use temporary versus persistent instances.

Ephemeral InstanceNacosPersistent Instance
0 likes · 7 min read
How a Single Nacos Setting Crashed Our Payment Service—and What It Teaches About Instance Types
Programmer XiaoFu
Programmer XiaoFu
Sep 25, 2025 · Databases

Redis LRU vs Classic LRU: Differences, LFU Comparison, and How to Choose

Redis implements an approximate LRU using random sampling and timestamps, while classic LRU relies on exact access order; the article explains both LRU and LFU fundamentals, their Java implementations, Redis-specific variants, trade‑offs, use‑case recommendations, and configuration tips for selecting the optimal eviction policy.

Cache EvictionJavaLFU
0 likes · 21 min read
Redis LRU vs Classic LRU: Differences, LFU Comparison, and How to Choose
Programmer XiaoFu
Programmer XiaoFu
Sep 15, 2025 · Information Security

SSO vs OAuth2.0: Key Differences Explained for Interviews

This article compares Single Sign‑On (SSO) and OAuth2.0, detailing their conceptual distinctions, token‑based workflows, implementation frameworks like CAS, the four OAuth2.0 grant types, and how each can be used to achieve seamless authentication across applications.

AuthenticationAuthorizationCAS
0 likes · 8 min read
SSO vs OAuth2.0: Key Differences Explained for Interviews
Programmer XiaoFu
Programmer XiaoFu
Sep 8, 2025 · Backend Development

Why My Spring Cloud Gateway Returns 404 After Nacos Config Changes – A Year-Long Debugging Tale

The article walks through a year‑long investigation of a 404 error that appears after updating Nacos dynamic routing in Spring Cloud Gateway 3.0.1, explains how stale weight caches cause the failure, and presents a custom event‑listener solution that synchronizes the gateway's weight cache with the latest Nacos configuration.

404JavaNacos
0 likes · 12 min read
Why My Spring Cloud Gateway Returns 404 After Nacos Config Changes – A Year-Long Debugging Tale