Tagged articles
5000 articles
Page 36 of 50
Architect
Architect
Jul 22, 2024 · Fundamentals

Understanding and Using Java BigDecimal for Precise Arithmetic

This article introduces Java's BigDecimal class, explains its purpose for high-precision arithmetic beyond double's limits, details constructors, common methods, formatting, comparison, and exception handling, and provides practical code examples and a utility class for accurate mathematical operations.

ArithmeticBigDecimalNumberFormat
0 likes · 15 min read
Understanding and Using Java BigDecimal for Precise Arithmetic
Sanyou's Java Diary
Sanyou's Java Diary
Jul 22, 2024 · Backend Development

Why Does My ThreadPool Freeze? Uncovering the Hidden Deadlock Pitfall

This article explains a subtle thread‑pool deadlock caused by parent‑child task interactions, demonstrates the issue with a reproducible demo, analyzes why the latch logic fails, and provides a practical solution of isolating thread pools to avoid false‑deadlock behavior in microservices.

CountDownLatchMicroservicesdeadlock
0 likes · 11 min read
Why Does My ThreadPool Freeze? Uncovering the Hidden Deadlock Pitfall
DaTaobao Tech
DaTaobao Tech
Jul 22, 2024 · Backend Development

Spring Bean Injection Issues and Dependency Injection Priorities

In a project with two applications, a Tair bean defined via JavaConfig works in one app but fails in the other because Spring’s injection rules prioritize type over name, causing ambiguity; using explicit bean naming with XML, adding @Qualifier, or switching to @Resource resolves the issue.

Bean Configurationannotationsdependency-injection
0 likes · 12 min read
Spring Bean Injection Issues and Dependency Injection Priorities
JD Cloud Developers
JD Cloud Developers
Jul 22, 2024 · Backend Development

Building a Custom RPC Framework with Netty: A Step‑by‑Step Guide

This article introduces the fundamentals and key features of Remote Procedure Call (RPC), explores common use cases and popular frameworks, then walks through the design and implementation of a custom RPC system using Netty, covering protocol design, client‑server communication, serialization, encoding, decoding, and result handling.

NettyRPCcustom protocol
0 likes · 23 min read
Building a Custom RPC Framework with Netty: A Step‑by‑Step Guide
Selected Java Interview Questions
Selected Java Interview Questions
Jul 22, 2024 · Backend Development

Using a Database as a Central Configuration Center in SpringBoot

This article analyzes the problems of scattered property configuration in SpringBoot projects, designs a database table to store configuration items, implements a configuration loader that injects database values into the Spring environment, and demonstrates testing and best‑practice considerations for a robust backend configuration solution.

BackendConfigurationPropertyInjection
0 likes · 11 min read
Using a Database as a Central Configuration Center in SpringBoot
macrozheng
macrozheng
Jul 22, 2024 · Backend Development

Mastering MapStruct: Boost Java Object Mapping Beyond BeanUtils

MapStruct is a powerful Java annotation‑based mapper that outperforms BeanUtils by generating compile‑time mapping implementations without reflection, supporting simple, nested, collection, and custom mappings, dependency injection, constants, expressions, and error handling, making object‑DTO conversions efficient and maintainable in Spring Boot projects.

Object Mappingjavamaven
0 likes · 19 min read
Mastering MapStruct: Boost Java Object Mapping Beyond BeanUtils
Architect's Tech Stack
Architect's Tech Stack
Jul 22, 2024 · Backend Development

Using MapStruct for Efficient Bean Copying in Java

This article explains why manual property copying in layered Java applications is inefficient, compares runtime copiers like BeanUtils and BeanCopier, and demonstrates how MapStruct provides compile‑time, type‑safe, high‑performance bean mapping with support for deep copy, collection mapping, field ignoring, and Lombok integration.

backend-developmentbean-mappingcode-generation
0 likes · 10 min read
Using MapStruct for Efficient Bean Copying in Java
Su San Talks Tech
Su San Talks Tech
Jul 21, 2024 · Backend Development

8 Effective Retry Strategies for Java APIs

This article presents eight practical retry mechanisms for Java applications—including loop, recursion, HttpClient configuration, Spring Retry, Resilience4j, custom utilities, asynchronous thread‑pool retries, and message‑queue based retries—along with code examples, configuration snippets, and best‑practice guidelines to help developers handle transient network failures reliably.

HttpClientRetrybest practices
0 likes · 17 min read
8 Effective Retry Strategies for Java APIs
Top Architect
Top Architect
Jul 20, 2024 · Backend Development

Understanding ForkJoinPool: Theory, Implementation, and Performance in Java

This article explains the limitations of ThreadPoolExecutor, introduces the Fork/Join model and ForkJoinPool in Java, demonstrates how to implement custom RecursiveTask and RecursiveAction classes with code examples, discusses pool construction, task submission, work‑stealing, monitoring methods, performance testing, and cautions about using the common pool.

ForkJoinPoolThreadPoolconcurrency
0 likes · 29 min read
Understanding ForkJoinPool: Theory, Implementation, and Performance in Java
Top Architect
Top Architect
Jul 20, 2024 · Backend Development

Spring Framework Utility Classes Overview and Usage

This article presents a comprehensive guide to Spring's core utility classes—including Assert, ObjectUtils, StringUtils, CollectionUtils, FileCopyUtils, ResourceUtils, StreamUtils, ReflectionUtils, and AopUtils—showing their purpose, typical use‑cases, and code examples, while also containing promotional material for related services.

CodeExamplesReflectionjava
0 likes · 13 min read
Spring Framework Utility Classes Overview and Usage
Selected Java Interview Questions
Selected Java Interview Questions
Jul 20, 2024 · Backend Development

Introduction and Usage Guide for MyBatis-Mate: Enterprise Features for MyBatis-Plus

This article introduces MyBatis-Mate, an official MyBatis‑Plus extension offering enterprise‑level capabilities such as dictionary binding, field encryption, data masking, dynamic DDL maintenance, sharding, multi‑datasource switching, performance logging, and data permission control, with detailed Spring Boot integration examples.

Backenddata encryptiondata masking
0 likes · 15 min read
Introduction and Usage Guide for MyBatis-Mate: Enterprise Features for MyBatis-Plus
Architect's Guide
Architect's Guide
Jul 20, 2024 · Backend Development

Spring Controller Scope: Singleton vs Prototype and Concurrency Safety

The article explains that Spring MVC controllers are singleton by default, which makes mutable instance fields unsafe for concurrent requests, demonstrates the issue with sample code, and shows how applying @Scope("prototype") or using ThreadLocal resolves the thread‑safety problem.

Singletonconcurrencyjava
0 likes · 4 min read
Spring Controller Scope: Singleton vs Prototype and Concurrency Safety
IT Services Circle
IT Services Circle
Jul 19, 2024 · Backend Development

Comprehensive Backend Interview Guide: MySQL Indexes, Redis Architecture, Java SpringBoot Auto‑Configuration, and JVM Memory Management

This article provides an in-depth overview of common backend interview topics, covering MySQL index structures and storage engines, Redis single‑threaded design and persistence mechanisms, Java transaction ACID properties, SpringBoot auto‑configuration principles, JVM memory regions, class loading, and garbage‑collection algorithms, all illustrated with code examples.

JVMMySQLSpringBoot
0 likes · 40 min read
Comprehensive Backend Interview Guide: MySQL Indexes, Redis Architecture, Java SpringBoot Auto‑Configuration, and JVM Memory Management
Alibaba Cloud Native
Alibaba Cloud Native
Jul 19, 2024 · Cloud Native

Implement Distributed Scheduled Tasks with Spring Cloud Alibaba SchedulerX

This guide explains why traditional Java timers fail in microservice clusters, introduces Spring Cloud Alibaba's SchedulerX module with high‑availability and lock features, and provides step‑by‑step Maven setup, configuration, and code examples for both Alibaba SchedulerX and the open‑source ShedLock approach.

Distributed SchedulingMicroservicesSchedulerX
0 likes · 10 min read
Implement Distributed Scheduled Tasks with Spring Cloud Alibaba SchedulerX
macrozheng
macrozheng
Jul 19, 2024 · Backend Development

Master Java Obfuscation: 5 Crazy Tricks to Write Unreadable Code

This article reveals five advanced Java tricks—using Unicode escapes in comments, over‑complicating simple logic with bitwise shifts, tampering with Boolean.TRUE via reflection, forcing both branches of an if‑else to run, and leveraging the Unsafe class for low‑level memory manipulation—to deliberately make code hard to understand.

ReflectionUnicodebitwise
0 likes · 12 min read
Master Java Obfuscation: 5 Crazy Tricks to Write Unreadable Code
Code Ape Tech Column
Code Ape Tech Column
Jul 19, 2024 · Backend Development

Common Pitfalls and Best Practices for Using Java Thread Pools

This article summarizes the common pitfalls, monitoring techniques, configuration guidelines, naming conventions, and practical code examples for safely using Java ThreadPoolExecutor, helping developers avoid OOM, deadlocks, and performance issues while optimizing thread‑pool usage.

BestPracticesThreadPoolThreadPoolExecutor
0 likes · 17 min read
Common Pitfalls and Best Practices for Using Java Thread Pools
Java Architect Essentials
Java Architect Essentials
Jul 19, 2024 · Backend Development

Unified TreeNode Utility Class for Multi‑Level Menus, Comments, Departments, and Categories in SpringBoot

This article explains how to create a unified SpringBoot utility class that builds hierarchical structures such as multi‑level menus, comments, departments, and categories, discusses database design choices like the optional tree_path field, provides a detailed ITreeNode interface, implementation of TreeNodeUtil with code examples, and demonstrates testing and filtering scenarios.

Multi-level MenuSpringBootTree Path
0 likes · 12 min read
Unified TreeNode Utility Class for Multi‑Level Menus, Comments, Departments, and Categories in SpringBoot
IT Services Circle
IT Services Circle
Jul 18, 2024 · Artificial Intelligence

Insights on Baidu’s “Robo Fast Run” Autonomous Driving Initiative and Related Career Opportunities

The article discusses Baidu’s new autonomous‑driving service “Robo Fast Run,” its potential impact on ride‑hailing jobs, the technical challenges involved, and provides detailed guidance on the qualifications and learning paths for engineers seeking positions in Baidu’s intelligent‑driving divisions.

AIBaiduautonomous driving
0 likes · 5 min read
Insights on Baidu’s “Robo Fast Run” Autonomous Driving Initiative and Related Career Opportunities
Selected Java Interview Questions
Selected Java Interview Questions
Jul 18, 2024 · Backend Development

Exploring Nine Design Patterns in MyBatis: Builder, Factory, Singleton, Proxy, Decorator, Adapter, Composite, Template Method, and Iterator

This article examines nine design patterns employed within MyBatis—Builder, Factory, Singleton, Proxy, Decorator, Adapter, Composite, Template Method, and Iterator—detailing their roles, source code examples, and how they facilitate configuration parsing, SQL execution, and caching in the framework.

Builder PatternDesign PatternsFactory Pattern
0 likes · 18 min read
Exploring Nine Design Patterns in MyBatis: Builder, Factory, Singleton, Proxy, Decorator, Adapter, Composite, Template Method, and Iterator
Java Backend Technology
Java Backend Technology
Jul 18, 2024 · Databases

How to Accurately Track Online Users with Redis Sorted Sets

This guide explains how to implement an online user counting feature using Redis sorted sets, covering user identification methods, the essential zadd, zrangeByScore, zremrangeByScore, and zrem commands, along with code examples and a concise summary of the overall approach.

Online UsersSorted Setjava
0 likes · 7 min read
How to Accurately Track Online Users with Redis Sorted Sets
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Jul 18, 2024 · Backend Development

6 Proven Strategies to Eliminate if‑else in Spring Boot Projects

This article explains why excessive if‑else statements hurt Spring Boot code and presents six practical techniques—including strategy pattern, enums, polymorphism, lambda expressions, command pattern, and guard clauses—along with complete Java examples to make your backend more modular, readable, and maintainable.

Backenddesign-patternsjava
0 likes · 10 min read
6 Proven Strategies to Eliminate if‑else in Spring Boot Projects
Sohu Tech Products
Sohu Tech Products
Jul 17, 2024 · Backend Development

Java Thread Pool: Working Mechanism, States, and Rejection Policies

Java thread pools efficiently manage and reuse threads by applying a producer‑consumer model, transitioning through RUNNING, SHUTDOWN, STOP, and TERMINATED states, handling task queues, and employing configurable rejection policies such as Abort, CallerRuns, Discard, and DiscardOldest, while improving performance, resource utilization, and stability across web servers, asynchronous processing, and other concurrent workloads, distinct from connection pools which manage database connections.

Java concurrencyThreadPoolExecutorconcurrency
0 likes · 12 min read
Java Thread Pool: Working Mechanism, States, and Rejection Policies
DeWu Technology
DeWu Technology
Jul 17, 2024 · Backend Development

BPMN Overview and SmartEngine Implementation for Workflow Optimization

Covering workflow history, this article explains BPMN standards, outlines core modeling concepts, and demonstrates a practical SmartEngine integration that deploys BPMN 2.0 XML, highlights visual execution benefits, notes limitations in error handling and concurrency, and advises its use for moderately complex, frequently changing processes.

BPMNSmartEnginejava
0 likes · 24 min read
BPMN Overview and SmartEngine Implementation for Workflow Optimization
ITPUB
ITPUB
Jul 17, 2024 · Backend Development

10 Proven Techniques to Slash Java Bugs and Boost Code Quality

This guide presents ten practical strategies—including IDE selection, static analysis tools, unit testing, code reviews, and learning from others' post‑mortems—to help developers dramatically reduce bugs, improve code quality, and increase overall productivity.

Code reviewbug reductioncode quality
0 likes · 10 min read
10 Proven Techniques to Slash Java Bugs and Boost Code Quality
Top Architect
Top Architect
Jul 17, 2024 · Backend Development

Integrating Spring Boot with XXL‑Job for Distributed Task Scheduling

This article provides a step‑by‑step guide on combining Spring Boot with the open‑source XXL‑Job platform, covering its features, comparison with other schedulers, configuration of the admin console and executor, code examples, @XxlJob annotation parameters, and best practices for reliable distributed task management.

DistributedXXL-JOBjava
0 likes · 17 min read
Integrating Spring Boot with XXL‑Job for Distributed Task Scheduling
Architect
Architect
Jul 16, 2024 · Backend Development

Design and Implementation of a FIFO Export Queue for Large Data Exports in Java

This article explains how to handle massive MySQL export operations by introducing a fixed‑size FIFO queue, detailing the Java classes ExportQueue, AbstractExport, and ExportImpl, and showing a test controller that demonstrates queue limits, concurrency handling, and future considerations.

BackendExport QueueFIFO
0 likes · 11 min read
Design and Implementation of a FIFO Export Queue for Large Data Exports in Java
Top Architect
Top Architect
Jul 16, 2024 · Backend Development

Plugin Architecture in Java: SPI, ServiceLoader, and Spring Boot Implementations

This article explains the concept of plugin‑based development, outlines its benefits such as modular decoupling and extensibility, and provides detailed Java implementations using ServiceLoader, custom configuration loading, and Spring Boot’s spring.factories mechanism with complete code examples and practical deployment steps.

SPIbackend-developmentjava
0 likes · 23 min read
Plugin Architecture in Java: SPI, ServiceLoader, and Spring Boot Implementations
Top Architect
Top Architect
Jul 16, 2024 · Operations

Jpom – Lightweight Java‑Based Online Build, Deployment, and Operations Tool

Jpom is a simple, low‑intrusion Java‑based platform that provides online project building, automatic deployment, daily operations, and monitoring features, offering node management, SSH terminal, Docker handling, and a one‑click installation process suitable for individuals and small enterprises.

Build AutomationDevOpsJpom
0 likes · 9 min read
Jpom – Lightweight Java‑Based Online Build, Deployment, and Operations Tool
Architect's Guide
Architect's Guide
Jul 16, 2024 · Backend Development

Refactoring Spring Boot Controllers: From Messy to Elegant

The article critiques overly complex Spring Boot controllers filled with repetitive validation and business logic, demonstrates cleaner implementations using @Valid, Assert, and global exception handling, and provides practical code examples and guidelines for building maintainable backend controllers.

@ValidBackendSpringBoot
0 likes · 10 min read
Refactoring Spring Boot Controllers: From Messy to Elegant
FunTester
FunTester
Jul 16, 2024 · Backend Development

Mastering JDBC: Best Practices for Secure and Efficient Java Database Access

This guide explains how to set up JDBC drivers, construct connection URLs, use PreparedStatement instead of Statement, iterate ResultSet safely, manage resources with try‑with‑resources, handle transactions, employ connection pools, and properly process SQLExceptions for robust Java database applications.

Connection PoolJDBCPreparedStatement
0 likes · 15 min read
Mastering JDBC: Best Practices for Secure and Efficient Java Database Access
Java Tech Enthusiast
Java Tech Enthusiast
Jul 15, 2024 · Fundamentals

James Gosling's Career Journey and Retirement

James Gosling, the Canadian creator of Java, announced his retirement after a five‑decade career that spanned IBM, Sun, Oracle, Google, Liquid Robotics and Amazon, highlighted by pioneering the Java language and virtual machine, earning prestigious awards and widespread admiration from the developer community.

James GoslingRetirementcareer
0 likes · 12 min read
James Gosling's Career Journey and Retirement
FunTester
FunTester
Jul 15, 2024 · Backend Development

Comparison and Practical Guide to Java etcd Clients

This article compares popular Java etcd client libraries, evaluates their features, performance, and suitability, and provides a hands‑on tutorial using jetcd with Maven dependencies, code examples for watching and reading keys, and discusses runtime considerations such as thread handling.

Distributedetcdjava
0 likes · 10 min read
Comparison and Practical Guide to Java etcd Clients
Java Tech Enthusiast
Java Tech Enthusiast
Jul 13, 2024 · Backend Development

Implementing Captcha Login with Spring Boot and Redis

The guide demonstrates how to build a front‑end/back‑end separated captcha login using Spring Boot, Kaptcha and Redis, showing Redis‑based captcha storage with a unique key, Base64 image delivery, and verification logic that replaces traditional session‑based approaches.

APICaptchaSpringBoot
0 likes · 12 min read
Implementing Captcha Login with Spring Boot and Redis
Su San Talks Tech
Su San Talks Tech
Jul 13, 2024 · Backend Development

Master PowerJob: A Modern Java Distributed Task Scheduling Framework

PowerJob is a Java‑based, enterprise‑grade distributed task scheduling platform offering a web UI, multiple scheduling strategies (CRON, fixed rate, delay, API), diverse execution modes, workflow support, and high‑availability, with detailed installation steps via Docker or JAR, configuration guidance, and sample code.

Distributed Schedulingbackend-developmentjava
0 likes · 12 min read
Master PowerJob: A Modern Java Distributed Task Scheduling Framework
JD Tech
JD Tech
Jul 12, 2024 · Backend Development

Dynamic Thread Pool: Monitoring, Alerting, and Runtime Parameter Adjustment

The article explains the concept of a dynamic thread pool, identifies common pain points such as invisible runtime status, hard‑to‑trace rejections, and slow parameter tuning, and presents a comprehensive solution that includes monitoring, alerting, automatic stack dumping, and live parameter refresh for Java backend services.

Dynamic Configurationjavamonitoring
0 likes · 20 min read
Dynamic Thread Pool: Monitoring, Alerting, and Runtime Parameter Adjustment
macrozheng
macrozheng
Jul 12, 2024 · Information Security

Understanding JWT: Secure Token-Based Authentication for Modern Apps

This article explains the evolution from traditional cookie‑session authentication to token‑based JWT, detailing its structure, security mechanisms, implementation steps, advantages, limitations, and practical Java code examples, while also comparing it with modern authentication challenges in web and mobile environments.

AuthenticationJWTToken
0 likes · 15 min read
Understanding JWT: Secure Token-Based Authentication for Modern Apps
Java Backend Technology
Java Backend Technology
Jul 12, 2024 · Backend Development

Designing a Clean API Response Wrapper in Java Spring

This article explains how to standardize API responses in a micro‑service architecture by defining a JSON result format with code, message, and data fields, using HTTP‑like status code ranges, and automatically wrapping controller outputs with a custom @ResponseResult annotation and Spring's ResponseBodyAdvice.

APIResponse wrapperannotations
0 likes · 8 min read
Designing a Clean API Response Wrapper in Java Spring
Programmer DD
Programmer DD
Jul 12, 2024 · Backend Development

What’s New in VS Code for Java June 2024? Project Settings, Spring & Gradle Updates

The June 2024 VS Code for Java update introduces enhanced project settings with new compiler, Maven, and formatter tabs, easier access via the status bar, test coverage improvements, Gradle Build Server projects, Spring feature upgrades including @DependsOn support and Spring Boot 3.3 compatibility, and new extension packs for Java development.

Extension PackGradleVS Code
0 likes · 8 min read
What’s New in VS Code for Java June 2024? Project Settings, Spring & Gradle Updates
Architecture Digest
Architecture Digest
Jul 11, 2024 · Backend Development

MyBatis-Plus Data Permission Interceptor: Annotation, Interceptor, and Role-Based Scope Implementation

This guide explains how to implement data permission control in MyBatis-Plus by creating a custom annotation, an interceptor that modifies SQL before execution, a handler that builds WHERE clauses based on user roles, and how to register the interceptor in the MyBatis-Plus plugin, covering both basic and advanced versions.

BackendData PermissionInterceptor
0 likes · 13 min read
MyBatis-Plus Data Permission Interceptor: Annotation, Interceptor, and Role-Based Scope Implementation
Zhuanzhuan Tech
Zhuanzhuan Tech
Jul 11, 2024 · Fundamentals

Using Java Topology Suite (JTS) for Spatial Geometry Operations and Fast Point‑in‑Polygon Checks

This article introduces the Java Topology Suite (JTS), explains its core geometry models, WKT format, spatial relations, and operations, and demonstrates how to efficiently determine whether a point lies within service coverage polygons using MBR filtering, spatial indexes such as R‑tree and Quadtree, and geometry repair techniques.

Geometry RepairJTSSpatial Geometry
0 likes · 17 min read
Using Java Topology Suite (JTS) for Spatial Geometry Operations and Fast Point‑in‑Polygon Checks
21CTO
21CTO
Jul 11, 2024 · Fundamentals

James Gosling Announces Retirement: The Story Behind Java’s Creation

James Gosling, the creator of Java, has announced his retirement, prompting a look back at his life, the birth of Java from the Green project, its evolution, and his post‑Sun career moves through Oracle, Google, a robotics startup, and finally AWS.

James GoslingProgramming Language HistoryRetirement
0 likes · 8 min read
James Gosling Announces Retirement: The Story Behind Java’s Creation
Top Architect
Top Architect
Jul 11, 2024 · Backend Development

Implementing Fuzzy Company Name Matching with MySQL REGEXP and Java

This article describes a backend solution for a company approval workflow that extracts key information from company names, tokenizes them using IKAnalyzer, applies MySQL REGEXP for fuzzy matching, and sorts results by match degree, complete with code examples and deployment tips.

fuzzy-matchingjavaregex
0 likes · 17 min read
Implementing Fuzzy Company Name Matching with MySQL REGEXP and Java
php Courses
php Courses
Jul 11, 2024 · Fundamentals

Understanding SOLID Principles with Java Examples

This article explains the five SOLID design principles—SRP, OCP, LSP, ISP, and DIP—detailing their definitions, common violations, and Java code examples that demonstrate how to refactor classes for better modularity, extensibility, and maintainability.

Object-OrientedSOLIDSoftware Architecture
0 likes · 7 min read
Understanding SOLID Principles with Java Examples
High Availability Architecture
High Availability Architecture
Jul 11, 2024 · Backend Development

AutoMQ Memory Cache Design and Mitigating Netty PooledByteBufAllocator Memory Fragmentation

The article explains AutoMQ's memory‑cache architecture, compares LogCache and BlockCache designs, analyzes Netty's internal and external memory fragmentation caused by the Buddy and PageRun/PoolSubpage allocators, and presents mitigation techniques such as ByteBufSeqAlloc to reduce OOM risks.

CacheDesignDirectMemoryMemoryFragmentation
0 likes · 14 min read
AutoMQ Memory Cache Design and Mitigating Netty PooledByteBufAllocator Memory Fragmentation
Java Backend Technology
Java Backend Technology
Jul 11, 2024 · Backend Development

Master Distributed Locking in Java with Lock4j: A Complete Guide

This article introduces Lock4j, a versatile Java distributed‑lock component supporting RedisTemplate, Redisson and Zookeeper, explains its key features, shows how to add dependencies and configure Redis, details the @Lock4j annotation attributes, provides simple and advanced usage examples with code snippets, and demonstrates custom executors, key builders, failure strategies, and manual lock handling.

Lock4jjavaredis
0 likes · 6 min read
Master Distributed Locking in Java with Lock4j: A Complete Guide
Architect's Guide
Architect's Guide
Jul 11, 2024 · Backend Development

Using Spring Transaction Hooks to Send Kafka Messages After Commit

This article demonstrates how to leverage Spring's TransactionSynchronizationManager to detect active transactions and register synchronization callbacks that asynchronously push payment‑ledger messages to Kafka only after the transaction successfully commits, ensuring data consistency and minimal impact on the main business flow.

BackendKafkaTransactionSynchronizationManager
0 likes · 9 min read
Using Spring Transaction Hooks to Send Kafka Messages After Commit
Alibaba Cloud Developer
Alibaba Cloud Developer
Jul 11, 2024 · Backend Development

Why Your logback-spring.xml Isn’t Working and How to Fix It

This article walks through the complete troubleshooting process for a non‑functional logback‑spring.xml in a Spring Boot application, covering background, configuration steps, common pitfalls such as variable resolution and dependency conflicts, remote debugging techniques, and final recommendations to ensure proper log output.

Configurationdebuggingjava
0 likes · 9 min read
Why Your logback-spring.xml Isn’t Working and How to Fix It
Programmer Null's Self-Cultivation
Programmer Null's Self-Cultivation
Jul 10, 2024 · Information Security

Master Shiro Security: From Basics to CAS SSO Integration with SpringBoot

This comprehensive guide walks you through Shiro's core concepts, authentication and authorization mechanisms, various realm implementations, session management, distributed session handling with Redis, caching strategies, and step‑by‑step integration of CAS single sign‑on using SpringBoot and pac4j, complete with code samples.

CASShiroSpringBoot
0 likes · 34 min read
Master Shiro Security: From Basics to CAS SSO Integration with SpringBoot
Top Architect
Top Architect
Jul 10, 2024 · Backend Development

Optimizing a High-Concurrency Interface: Reducing Response Time from 30 s to 0.8 s with SQL Refactoring and Caffeine Caching

This article presents a real‑world case of optimizing a high‑concurrency transaction‑statistics API, detailing diagnosis of a 30‑second latency, SQL refactoring with array_agg and unnest, Java‑level improvements, and Caffeine caching, while also sharing promotional offers for ChatGPT services and a developer community.

Caffeinejavaperformance optimization
0 likes · 13 min read
Optimizing a High-Concurrency Interface: Reducing Response Time from 30 s to 0.8 s with SQL Refactoring and Caffeine Caching
Selected Java Interview Questions
Selected Java Interview Questions
Jul 10, 2024 · Information Security

Symmetric and Asymmetric Encryption, Digital Signatures, HTTPS, and Secure URL Handling with Spring Cloud Gateway

This article explains the fundamentals of symmetric and asymmetric encryption, how digital signatures and HTTPS work with certificate authorities, and demonstrates a practical implementation of secure URL encryption, key exchange, and request validation using custom Spring Cloud Gateway filters written in Java.

HTTPSSpring Cloud Gatewaydigital signature
0 likes · 22 min read
Symmetric and Asymmetric Encryption, Digital Signatures, HTTPS, and Secure URL Handling with Spring Cloud Gateway
IT Architects Alliance
IT Architects Alliance
Jul 10, 2024 · Backend Development

Mastering Distributed Locks with Redis: From Basic SETNX to RedLock and Redisson

This article explains how to implement distributed locks using Redis, starting with a simple SETNX approach, identifying its shortcomings, and then presenting solutions such as thread‑identifiers, Lua scripts for atomicity, handling TTL with watchdogs, the RedLock algorithm, and practical usage via the Redisson Java client.

LuaRedlockdistributed-lock
0 likes · 18 min read
Mastering Distributed Locks with Redis: From Basic SETNX to RedLock and Redisson
JD Tech
JD Tech
Jul 10, 2024 · Artificial Intelligence

Implementing Retrieval‑Augmented Generation (RAG) with LangChain4j in Java

This article provides a step‑by‑step guide for Java engineers on building a Retrieval‑Augmented Generation (RAG) application using the LangChain4j framework, covering RAG fundamentals, environment setup, Maven integration, document loading, splitting, embedding with OpenAI, vector store management with Chroma, and prompt‑based LLM interaction.

EmbeddingLLMRAG
0 likes · 35 min read
Implementing Retrieval‑Augmented Generation (RAG) with LangChain4j in Java
Architect
Architect
Jul 9, 2024 · Backend Development

Mastering Distributed Locks with Redis: From Simple SETNX to RedLock and Redisson

This article explains how to implement distributed locks using Redis, starting with a basic SETNX approach, identifying its shortcomings, and then presenting robust solutions such as identifier‑based unlocking, Lua scripts for atomicity, the RedLock algorithm, and Redisson’s advanced features including a watchdog mechanism.

BackendRedlockconcurrency
0 likes · 19 min read
Mastering Distributed Locks with Redis: From Simple SETNX to RedLock and Redisson
Architecture Digest
Architecture Digest
Jul 9, 2024 · Backend Development

Designing a Unified API Response Structure for Backend Services

This article explains how to design a unified API response format for backend services, covering JSON structure, status code conventions, message handling, data payload, a Result wrapper class, controller simplifications, custom annotations, interceptors, and global exception handling to achieve clean and maintainable code.

BackendDesignStatusCode
0 likes · 7 min read
Designing a Unified API Response Structure for Backend Services
Top Architect
Top Architect
Jul 9, 2024 · Backend Development

Replacing Tomcat with Undertow in Spring Boot: Configuration, Performance Comparison, and Benefits

This article explains how to replace Spring Boot's default embedded Tomcat with the high‑performance Undertow server, detailing Undertow's features, providing Maven dependency changes, showing configuration steps, and presenting benchmark results that compare QPS and memory usage, concluding that Undertow is preferable for high‑concurrency Java backend applications.

SpringBootTomcatjava
0 likes · 8 min read
Replacing Tomcat with Undertow in Spring Boot: Configuration, Performance Comparison, and Benefits
IT Xianyu
IT Xianyu
Jul 9, 2024 · Information Security

Encrypting Plaintext Passwords in SpringBoot Configuration Using Jasypt

This article explains how to protect sensitive database credentials in SpringBoot applications by encrypting passwords in configuration files, leveraging Jasypt and a custom BeanFactoryPostProcessor to transparently decrypt values at runtime.

Configuration SecurityJasyptPassword Encryption
0 likes · 8 min read
Encrypting Plaintext Passwords in SpringBoot Configuration Using Jasypt
JavaEdge
JavaEdge
Jul 8, 2024 · Backend Development

Master Java Metaspace: Tuning Metadata GC Threshold and JVM Flags

This article explains Java Metaspace and metadata GC thresholds, compares PermGen with Metaspace, and provides detailed JVM flag configurations—including size settings and compressed pointer options—to help developers optimize memory usage and garbage‑collection performance.

Garbage CollectionMemory ManagementMetaspace
0 likes · 8 min read
Master Java Metaspace: Tuning Metadata GC Threshold and JVM Flags
Top Architect
Top Architect
Jul 8, 2024 · Backend Development

Using Java 8 Stream API for Collection Processing with Practical Examples

This article introduces Java 8 Stream API, explaining its declarative approach to processing collections, and demonstrates common operations such as filter, map, sorted, forEach, collect, statistics, and parallelStream with a PO class example, while also including full source code and brief promotional notes.

CollectionsLambdaStream API
0 likes · 11 min read
Using Java 8 Stream API for Collection Processing with Practical Examples
Architecture Digest
Architecture Digest
Jul 8, 2024 · Backend Development

Introducing Easy-Query: A High‑Performance Java ORM with Fluent Query API

This article explains the motivation behind creating the Easy-Query ORM for Java, demonstrates its fluent query capabilities—including single‑record, list, pagination, joins, sub‑queries, group‑by, native SQL and dynamic condition features—provides extensive code examples, and shares repository links for further exploration.

Easy-QueryORMbackend-development
0 likes · 10 min read
Introducing Easy-Query: A High‑Performance Java ORM with Fluent Query API
IT Architects Alliance
IT Architects Alliance
Jul 7, 2024 · Backend Development

Java Backend Performance Optimization: Parallel Processing, Thread Pools, Caching, and Concurrency Techniques

This article presents a comprehensive guide to improving Java backend performance by using parallel processing with CompletableFuture, minimizing transaction scope, applying effective caching strategies, configuring thread pools, reducing object creation, and employing various concurrency controls such as volatile, CAS, and read‑write locks.

ThreadPoolconcurrencyjava
0 likes · 34 min read
Java Backend Performance Optimization: Parallel Processing, Thread Pools, Caching, and Concurrency Techniques
Selected Java Interview Questions
Selected Java Interview Questions
Jul 7, 2024 · Backend Development

Understanding Thread Pool Shutdown and Garbage Collection in Java

This article explains why a Java thread pool with many waiting threads does not release resources, how calling shutdown or shutdownNow interrupts idle workers, how the ThreadPoolExecutor internals handle interruptions, and why proper shutdown is essential to allow both threads and the pool itself to be garbage‑collected.

ExecutorServiceGarbageCollectionShutdown
0 likes · 11 min read
Understanding Thread Pool Shutdown and Garbage Collection in Java
Top Architect
Top Architect
Jul 7, 2024 · Backend Development

Backend Request Debounce and Distributed Lock Implementation in Java

This article explains the concept of request debouncing, outlines ideal debounce component characteristics, identifies which API endpoints need debouncing, and provides detailed Java implementations using shared Redis cache and Redisson distributed locks, including custom annotations, key generation, and practical testing results.

Debounceannotationdistributed-lock
0 likes · 18 min read
Backend Request Debounce and Distributed Lock Implementation in Java
Cognitive Technology Team
Cognitive Technology Team
Jul 7, 2024 · Backend Development

Understanding TCP Packet Framing Issues and Netty Decoder Solutions

This article explains the TCP packet fragmentation and aggregation problems, introduces Netty's various decoder mechanisms such as FixedLengthFrameDecoder, LineBasedFrameDecoder, DelimiterBasedFrameDecoder, LengthFieldPrepender, and LengthFieldBasedFrameDecoder, and provides detailed configuration examples and code snippets for implementing robust TCP protocols.

DecoderFramingNetty
0 likes · 7 min read
Understanding TCP Packet Framing Issues and Netty Decoder Solutions
Architecture Digest
Architecture Digest
Jul 7, 2024 · Backend Development

Hot Deployment of Custom Interface Implementations in Java Using Reflection and Spring

This article demonstrates how to define a simple Calculator interface, provide both annotation‑based and reflection‑based implementations, and dynamically hot‑deploy user‑supplied JAR files by loading them with URLClassLoader, registering Spring beans, and handling bean removal on JAR deletion.

Hot DeploymentReflectionbackend-development
0 likes · 8 min read
Hot Deployment of Custom Interface Implementations in Java Using Reflection and Spring
Top Architect
Top Architect
Jul 6, 2024 · Backend Development

Improving Controller Layer Logic, Unified Response Structure, and Parameter Validation in Spring Boot

This article explains how to design a clean Controller layer in Spring Boot, introduces a unified response format with Result and ResponseBodyAdvice, demonstrates parameter validation using JSR‑303 and Spring Validation, and shows custom validation annotations and global exception handling to keep controller code concise and maintainable.

ControllerException Handlingjava
0 likes · 18 min read
Improving Controller Layer Logic, Unified Response Structure, and Parameter Validation in Spring Boot
JD Tech
JD Tech
Jul 6, 2024 · Backend Development

Investigation of JSF Thread‑Pool Exhaustion During R2M Redis Upgrade

This article details a step‑by‑step investigation of a JSF thread‑pool exhaustion error that occurred when upgrading the Redis version of JD's internal R2M distributed cache, analyzing stack traces, lock contention, ForkJoinPool behavior, and the eventual remediation steps.

JSFR2MThreadPool
0 likes · 7 min read
Investigation of JSF Thread‑Pool Exhaustion During R2M Redis Upgrade
DaTaobao Tech
DaTaobao Tech
Jul 5, 2024 · Backend Development

Introduction to the Java Module System (Project Jigsaw)

The Java Module System (Project Jigsaw) introduced in Java 9 defines uniquely named modules with descriptors that declare dependencies, exported and opened packages, and services, enabling clear dependency management, smaller custom runtimes, stronger encapsulation, improved performance, security, and easier maintenance, while supporting migration strategies and best‑practice guidelines.

JDKjavajigsaw
0 likes · 21 min read
Introduction to the Java Module System (Project Jigsaw)
Top Architect
Top Architect
Jul 5, 2024 · Information Security

Deep Dive into Spring Security Architecture: Authentication, Authorization, and Filter Chains

This article explains the core architecture of Spring Security 6.x, detailing how a chain of servlet Filters implements authentication and authorization, the role of DelegatingFilterProxy, SecurityFilterChain, and the extensible components such as AuthenticationManager, UserDetailsService, and PasswordEncoder.

AuthenticationAuthorizationWeb Security
0 likes · 31 min read
Deep Dive into Spring Security Architecture: Authentication, Authorization, and Filter Chains
Top Architect
Top Architect
Jul 5, 2024 · Databases

Efficient Insertion of 300,000 Records Using MyBatis and JDBC

This article demonstrates how to insert 300,000 rows into a MySQL table efficiently by defining a User entity, configuring MyBatis and JDBC, comparing direct batch insertion, row‑by‑row insertion, and optimized batch strategies with configurable batch sizes and wait times, and provides performance results and best‑practice recommendations.

JDBCjavamybatis
0 likes · 15 min read
Efficient Insertion of 300,000 Records Using MyBatis and JDBC
Architecture Digest
Architecture Digest
Jul 5, 2024 · Backend Development

Implementing Data Permission Interceptor in MyBatis-Plus with Custom Annotations

This tutorial explains how to globally enforce data‑permission filtering in MyBatis‑Plus by creating a custom @UserDataPermission annotation, implementing an InnerInterceptor that modifies SQL WHERE clauses based on user roles, and configuring the interceptor within the MyBatis‑Plus plugin system.

Custom AnnotationData PermissionInterceptor
0 likes · 11 min read
Implementing Data Permission Interceptor in MyBatis-Plus with Custom Annotations
JD Retail Technology
JD Retail Technology
Jul 5, 2024 · Backend Development

Dynamic Thread Pool: Monitoring, Alerting, and Runtime Parameter Adjustment

The article explains the concept of dynamic thread pools, analyzes common pain points such as invisible runtime status, hard‑to‑locate rejections, and slow parameter tuning, and presents a comprehensive solution that includes monitoring, alerting, automatic stack tracing, and on‑the‑fly parameter refresh using Java code.

Dynamic Configurationjavamonitoring
0 likes · 19 min read
Dynamic Thread Pool: Monitoring, Alerting, and Runtime Parameter Adjustment
Dangbei Technology Team
Dangbei Technology Team
Jul 5, 2024 · Backend Development

Master Maven Archetype: Quickly Bootstrap Consistent Java Projects

Learn how to use Maven Archetype to create standardized project skeletons, customize templates, generate and share archetypes, and integrate them into IDEs, streamlining Java project initialization, reducing manual setup errors, and improving development efficiency across teams.

ArchetypeBuild Automationjava
0 likes · 6 min read
Master Maven Archetype: Quickly Bootstrap Consistent Java Projects
Java Architect Essentials
Java Architect Essentials
Jul 5, 2024 · Backend Development

Unlock Java 17: Hands‑On Guide to New Syntax, Records, Switch Expressions and More

This article walks through Java 17’s most useful language upgrades—including text blocks, enhanced NullPointerException messages, records, switch expressions, private interface methods, pattern matching, collection factories, Stream API extensions, the new HttpClient, JShell, direct file execution, and ZGC—showing why upgrading from Java 8 can boost code clarity and productivity.

BackendDevelopmentCodeExamplesLanguageFeatures
0 likes · 16 min read
Unlock Java 17: Hands‑On Guide to New Syntax, Records, Switch Expressions and More