Tagged articles
1744 articles
Page 10 of 18
IT Architects Alliance
IT Architects Alliance
Dec 8, 2022 · Backend Development

Understanding Spring Transaction Management: @EnableTransactionManagement, Propagation, and Synchronization

This article explains how Spring enables transaction management with @EnableTransactionManagement, details the underlying beans and proxy mechanisms, describes the basic execution flow, explores transaction propagation scenarios, shows how to force rollbacks, and demonstrates using TransactionSynchronization for lifecycle callbacks.

Synchronizationjavapropagation
0 likes · 11 min read
Understanding Spring Transaction Management: @EnableTransactionManagement, Propagation, and Synchronization
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Dec 7, 2022 · Backend Development

Master Bean Validation in Spring 5: From Basics to Custom Constraints

Learn how to integrate Bean Validation with Spring 5.2.23, configure the validator, inject it, create custom constraints, and enable method‑level validation using MethodValidationPostProcessor, with complete code examples and execution results, including handling of constraint violations and bean registration steps.

BackendBean ValidationCustom Constraints
0 likes · 7 min read
Master Bean Validation in Spring 5: From Basics to Custom Constraints
IT Architects Alliance
IT Architects Alliance
Dec 4, 2022 · Backend Development

Mastering Retry Logic in Java: Spring‑Retry vs Guava‑Retry

This guide explains how to implement declarative retry mechanisms in Java using Spring‑Retry and Guava‑Retry, covering dependency setup, template and annotation usage, various retry and back‑off policies, test examples, and a comparative analysis of their flexibility and configuration options.

BackendBackoffGuava
0 likes · 17 min read
Mastering Retry Logic in Java: Spring‑Retry vs Guava‑Retry
Architect's Tech Stack
Architect's Tech Stack
Dec 4, 2022 · Backend Development

Unified Exception Handling in Spring Boot Using @ControllerAdvice, Assert, and Enum‑Based Business Errors

This article explains how to replace repetitive try‑catch blocks in Java Spring applications with a unified exception handling strategy that leverages @ControllerAdvice, custom Assert utilities, enum‑based error codes, and standardized response objects to improve code readability, maintainability, and internationalisation.

AssertMyBatisenum
0 likes · 21 min read
Unified Exception Handling in Spring Boot Using @ControllerAdvice, Assert, and Enum‑Based Business Errors
Code Ape Tech Column
Code Ape Tech Column
Nov 28, 2022 · Backend Development

Resolving Long Transactions and Connection‑Closed Issues in Spring with Druid

This article analyzes why a Spring service encounters "connection closed" errors during long‑running transactions, explains how MyBatis and Druid manage connections, and provides a programmatic‑transaction solution that splits large operations into smaller units to prevent connection leaks and timeouts.

Database ConnectionDruidLong Transaction
0 likes · 11 min read
Resolving Long Transactions and Connection‑Closed Issues in Spring with Druid
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Nov 28, 2022 · Backend Development

Understanding Spring’s Parent and Child Container Initialization in XML Config

This article explains how Spring configures its parent and child application contexts using web.xml, ContextLoaderListener, and DispatcherServlet, detailing the loading of configuration files, context class determination, bean definition processing, and the refresh cycle that ultimately stores the WebApplicationContext in the ServletContext.

ContextLoaderListenerDispatcherServletWeb Application
0 likes · 12 min read
Understanding Spring’s Parent and Child Container Initialization in XML Config
Selected Java Interview Questions
Selected Java Interview Questions
Nov 27, 2022 · Backend Development

Strategy Pattern in Java: Theory, Advantages, Drawbacks, and Practical Payment Service Implementation

This article explains the Strategy design pattern, its structure, advantages and drawbacks, and demonstrates a practical Java implementation for payment processing using Spring beans, including interface definitions, concrete payment strategies, and a controller that selects the appropriate strategy at runtime.

Design PatternsStrategy Patterndependency-injection
0 likes · 6 min read
Strategy Pattern in Java: Theory, Advantages, Drawbacks, and Practical Payment Service Implementation
Sanyou's Java Diary
Sanyou's Java Diary
Nov 24, 2022 · Backend Development

Why Does Redis Increment Return Null Inside @Transactional? The Hidden Interaction Explained

This article investigates a production issue where Redis increment operations return null each morning, explores hypotheses about Redis pipelines, transactions, and Spring @Transactional interaction, reproduces the bug, analyzes the source code, and proposes two practical solutions to prevent null returns.

Redis Transactionbackend-developmentredis
0 likes · 10 min read
Why Does Redis Increment Return Null Inside @Transactional? The Hidden Interaction Explained
Su San Talks Tech
Su San Talks Tech
Nov 24, 2022 · Backend Development

Master Spring Validation: From Basic to Advanced Parameter Checks

This article explains how to use Spring Validation for automatic request parameter checks in Java web applications, covering basic setup, DTO annotations, requestBody and requestParam validation, unified exception handling, and advanced features like group, nested, collection, custom, and fail‑fast validation.

BackendHibernate ValidatorParameter Validation
0 likes · 18 min read
Master Spring Validation: From Basic to Advanced Parameter Checks
dbaplus Community
dbaplus Community
Nov 23, 2022 · Backend Development

Why Redis Increment Returns Null with @Transactional and How to Fix It

A production microservice failed each morning because Redis's increment operation returned null when generating IDs, and restarting the service temporarily fixed it; the article investigates the root cause—Redis transaction support combined with Spring @Transactional—and presents two concrete remediation strategies.

redisspringtransactional
0 likes · 10 min read
Why Redis Increment Returns Null with @Transactional and How to Fix It
Java Captain
Java Captain
Nov 23, 2022 · Backend Development

Best Practices for Designing an Excellent Controller Layer in Spring MVC

The article presents comprehensive best‑practice guidelines for building a clean, maintainable Controller layer in Spring MVC, covering its essential responsibilities, common pitfalls, unified response structures, parameter validation with JSR‑303, custom validators, and centralized exception handling to improve code simplicity and robustness.

BackendControllerexceptionhandling
0 likes · 19 min read
Best Practices for Designing an Excellent Controller Layer in Spring MVC
Java Captain
Java Captain
Nov 23, 2022 · Backend Development

Free Comprehensive Collection of Big‑Tech Interview Questions and Answers (Java, Spring, Redis, MyBatis, etc.)

This post shares a free, extensive compilation of interview questions and detailed explanations covering Java fundamentals, multithreading, Spring framework, Redis, MyBatis and other backend technologies, encouraging systematic preparation and offering a QR‑code method to obtain the full document.

MyBatisbackend-developmentinterview-questions
0 likes · 8 min read
Free Comprehensive Collection of Big‑Tech Interview Questions and Answers (Java, Spring, Redis, MyBatis, etc.)
Su San Talks Tech
Su San Talks Tech
Nov 22, 2022 · Backend Development

Deep Dive into Spring Transaction: Source Code Walkthrough and Execution Flow

This article walks through the fundamentals of Spring's transaction management, presenting a practical example, detailed execution workflow, and step‑by‑step source‑code analysis—including bean creation, AOP proxy generation, transaction attribute retrieval, transaction start, commit, and rollback – to help developers master Spring transaction internals.

aopbackend-developmentjava
0 likes · 12 min read
Deep Dive into Spring Transaction: Source Code Walkthrough and Execution Flow
Architecture Digest
Architecture Digest
Nov 16, 2022 · Backend Development

Comprehensive Collection of Interview Questions and Answers for Major Tech Companies (Java, Spring, Redis, MyBatis, etc.)

This article compiles over a thousand interview questions and detailed explanations covering core Java fundamentals, multithreading, Spring framework, Redis, MyBatis, and related backend technologies, offering a free downloadable resource to help candidates prepare effectively for major tech company interviews.

MyBatisinterview-questionsjava
0 likes · 8 min read
Comprehensive Collection of Interview Questions and Answers for Major Tech Companies (Java, Spring, Redis, MyBatis, etc.)
Zhuanzhuan Tech
Zhuanzhuan Tech
Nov 16, 2022 · Backend Development

Design and Implementation of HunterConsumer and HunterProducer Components for RocketMQ Integration

This article explains the background of RocketMQ clusters, demonstrates typical Java consumer and producer usage, and introduces the AOP‑based HunterConsumer and HunterProducer components that simplify lifecycle management, configuration, and code reuse for backend developers working with messaging systems.

Component DesignRocketMQaop
0 likes · 15 min read
Design and Implementation of HunterConsumer and HunterProducer Components for RocketMQ Integration
Java Architect Essentials
Java Architect Essentials
Nov 15, 2022 · Backend Development

Spring Framework Utility Classes Overview: Assertions, ObjectUtils, StringUtils, CollectionUtils, and More

This article provides a comprehensive overview of Spring Framework utility classes, covering assertion methods, object and collection utilities, string manipulation, file and resource handling, reflection, and AOP helpers, with code examples illustrating their usage for robust backend development.

Reflectionassertionsspring
0 likes · 10 min read
Spring Framework Utility Classes Overview: Assertions, ObjectUtils, StringUtils, CollectionUtils, and More
Programmer DD
Programmer DD
Nov 14, 2022 · Fundamentals

What’s New in Java: JDK 20, Loom Updates, and Upcoming JEPs

This roundup covers the latest Java developments, including JEP 434’s move to candidate status, second‑preview updates for virtual threads and structured concurrency, the JDK 20 release schedule, and new releases across Spring, GraalVM, Open Liberty, Vert.x, TomEE, JReleaser, Hibernate, PrimeFaces, JDKMon, and EclipseCon.

JEPLoomOpenJDK
0 likes · 11 min read
What’s New in Java: JDK 20, Loom Updates, and Upcoming JEPs
Architect's Guide
Architect's Guide
Nov 11, 2022 · Databases

Database Sharding: Table Partitioning, Horizontal and Vertical Splitting, and Implementation with Sharding-JDBC and Mycat

This article explains why high‑concurrency big‑data systems need database sharding, describes table‑level partitioning methods (modulus and range), shows how to implement them with MySQL and Java code, compares vertical and horizontal database splitting, and evaluates middleware solutions such as Sharding‑JDBC and Mycat.

database partitioninghorizontal scalingjava
0 likes · 11 min read
Database Sharding: Table Partitioning, Horizontal and Vertical Splitting, and Implementation with Sharding-JDBC and Mycat
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Nov 10, 2022 · Backend Development

Designing a Modular Backend Service with DDD, Caching, Dynamic Proxies and Extensible Configuration

This article explains how to build a modular backend service in Java using domain‑driven design, configurable modules, dynamic proxies, cache adapters, lambda‑based query conditions, and Spring‑based conditional bean loading to enable flexible extensions without altering existing code.

BackendDomain-Driven DesignDynamic Proxy
0 likes · 25 min read
Designing a Modular Backend Service with DDD, Caching, Dynamic Proxies and Extensible Configuration
Code Ape Tech Column
Code Ape Tech Column
Nov 10, 2022 · Backend Development

Designing an Excellent Controller Layer in Spring MVC

This article explains how to improve the Controller layer in Spring applications by separating responsibilities, implementing unified response structures with Result wrappers, handling String response issues via ResponseBodyAdvice, applying parameter validation with JSR‑303, customizing validators, and centralizing exception handling for cleaner, more maintainable backend code.

Controllerexceptionhandlingjava
0 likes · 18 min read
Designing an Excellent Controller Layer in Spring MVC
Selected Java Interview Questions
Selected Java Interview Questions
Nov 7, 2022 · Backend Development

Comprehensive Guide to Spring Validation: RequestBody, RequestParam, and Advanced Techniques

This article provides a detailed tutorial on using Spring Validation in Spring Boot applications, covering simple and advanced usage such as requestBody and requestParam parameter checks, group validation, nested and collection validation, custom constraints, programmatic validation, fail‑fast mode, and the underlying implementation mechanisms.

Hibernate ValidatorSpring Bootjava
0 likes · 16 min read
Comprehensive Guide to Spring Validation: RequestBody, RequestParam, and Advanced Techniques
Code Ape Tech Column
Code Ape Tech Column
Nov 7, 2022 · Information Security

Understanding Session-Based Authentication and Single Sign-On (SSO) with CAS and OAuth2

This article explains the challenges of multiple product systems, reviews traditional session mechanisms and their limitations in clustered environments, compares session replication and centralized storage using Redis, and details the design and implementation of Single Sign-On using CAS and OAuth2 with Java Spring code examples.

CASOAuth2SSO
0 likes · 13 min read
Understanding Session-Based Authentication and Single Sign-On (SSO) with CAS and OAuth2
Cognitive Technology Team
Cognitive Technology Team
Oct 31, 2022 · Backend Development

Analysis of MyBatis First-Level and Second-Level Caches and Their Configuration

This article explains MyBatis's first-level (SqlSession-scoped) and second-level (Mapper-scoped) caching mechanisms, their default behaviors, key generation, configuration options, and the impact of Spring integration, and provides recommendations for disabling caches in distributed environments to avoid data inconsistency.

CacheMyBatisbackend-development
0 likes · 9 min read
Analysis of MyBatis First-Level and Second-Level Caches and Their Configuration
Architect's Guide
Architect's Guide
Oct 31, 2022 · Databases

Robustdb: A Client‑Side Read‑Write Splitting Solution for MySQL

This article introduces Robustdb, a lightweight client‑side read‑write splitting framework built with only a dozen classes, explains its architecture, routing logic, method‑level transaction handling, dynamic data‑source management, and presents performance comparisons with the legacy Atlas proxy.

database routingdynamic-datasourcejava
0 likes · 17 min read
Robustdb: A Client‑Side Read‑Write Splitting Solution for MySQL
Top Architect
Top Architect
Oct 27, 2022 · Backend Development

Redis Cache Expiration Avalanche and Mitigation Strategies

The article explains how Redis cache expiration can cause a request avalanche that overloads databases, and presents mitigation techniques such as semaphore rate limiting, per‑key locking, fault‑tolerant cache rebuilding, and example Java code using Spring and Redis.

Cacheavalanchejava
0 likes · 8 min read
Redis Cache Expiration Avalanche and Mitigation Strategies
DaTaobao Tech
DaTaobao Tech
Oct 27, 2022 · Backend Development

Applying the Strategy Pattern in Java Backend Development: Best Practices and Iterations

The article demonstrates how to replace fragile if‑else shop‑ranking logic in a Java backend with the Strategy pattern, progressing from simple factories and enums to Spring‑auto‑wired and generic factories, highlighting improved extensibility, reduced coupling, Open‑Closed compliance, and the trade‑off of added abstraction complexity.

Factory PatternGenericsbackend-development
0 likes · 16 min read
Applying the Strategy Pattern in Java Backend Development: Best Practices and Iterations
Java High-Performance Architecture
Java High-Performance Architecture
Oct 26, 2022 · Information Security

How to Build a Secure High‑Performance User Login System with Token Management

This article walks through the complete design and implementation of a high‑performance user login system, covering client‑side verification, server‑side token generation, token expiration strategies, gateway authentication, logout handling, anonymous request allowances, rate‑limited auth tokens, and blacklist management, illustrated with diagrams and Java Spring code examples.

Backendspring
0 likes · 9 min read
How to Build a Secure High‑Performance User Login System with Token Management
DaTaobao Tech
DaTaobao Tech
Oct 25, 2022 · Backend Development

MapStruct and Lombok Integration: Maven Dependency Order and Advanced Usage

The article explains that when using MapStruct with Lombok, Maven must list Lombok before MapStruct (or define annotationProcessorPaths) so Lombok’s annotation processor runs first, and then demonstrates basic and advanced mapping techniques, Spring integration, and singleton caching strategies.

Annotation ProcessingLombokjava
0 likes · 17 min read
MapStruct and Lombok Integration: Maven Dependency Order and Advanced Usage
Top Architect
Top Architect
Oct 24, 2022 · Backend Development

Comprehensive Overview of Spring and Spring Boot Extension Points and Bean Lifecycle

This article provides a detailed walkthrough of Spring and Spring Boot's bean lifecycle, explaining each extension point—from ApplicationContextInitializer to CommandLineRunner—illustrating their usage with code examples and describing practical scenarios for customizing bean creation, initialization, and destruction.

Extension PointsSpring Bootbean-lifecycle
0 likes · 17 min read
Comprehensive Overview of Spring and Spring Boot Extension Points and Bean Lifecycle
Top Architect
Top Architect
Oct 22, 2022 · Backend Development

Unified Exception Handling in Spring Using @ControllerAdvice and Custom Assertions

This article explains how to replace repetitive try‑catch blocks in Spring applications with a unified exception handling mechanism based on @ControllerAdvice, custom assertion utilities, and enum‑driven business exceptions, while also showing how to standardize response structures and integrate internationalization.

ControllerAdviceassertionsenum
0 likes · 11 min read
Unified Exception Handling in Spring Using @ControllerAdvice and Custom Assertions
Architect's Guide
Architect's Guide
Oct 15, 2022 · Information Security

Understanding Session Mechanisms, Cluster Session Challenges, and SSO Solutions with a CAS Implementation

This article explains traditional HTTP session handling, the problems of session sharing in clustered and multi‑service environments, and presents practical SSO solutions—including session replication, centralized Redis storage, and a complete CAS‑based single sign‑on implementation with Java code examples.

CASSessionSingle Sign-On
0 likes · 14 min read
Understanding Session Mechanisms, Cluster Session Challenges, and SSO Solutions with a CAS Implementation
Top Architect
Top Architect
Oct 14, 2022 · Backend Development

Spring Annotation Development and MyBatis Integration Guide

This article provides a comprehensive tutorial on using Spring annotations for pure annotation‑based development, defining beans, managing bean scopes, performing various injection techniques, reading configuration properties, and integrating Spring with MyBatis, complete with code examples and best‑practice tips.

MyBatisannotationsbackend-development
0 likes · 10 min read
Spring Annotation Development and MyBatis Integration Guide
Java Backend Technology
Java Backend Technology
Oct 10, 2022 · Backend Development

8 Hidden Spring Transaction Pitfalls That Can Break Your Java Apps

This article reveals ten common Spring transaction pitfalls—including private methods, final modifiers, self‑invocation, missing @Service, wrong propagation, non‑transactional databases, swallowed or wrong exceptions, multi‑threaded calls, and nested transaction rollbacks—that can silently disable transaction management in Java backend projects.

PitfallsSpringBootaop
0 likes · 9 min read
8 Hidden Spring Transaction Pitfalls That Can Break Your Java Apps
macrozheng
macrozheng
Oct 10, 2022 · Backend Development

Unlock Spring’s Power: 11 Essential Extension Points You Must Master

This article walks through the eleven most commonly used Spring extension points—including custom interceptors, bean retrieval methods, global exception handling, type converters, import configurations, startup runners, bean definition tweaks, post‑processing, initialization and destruction callbacks, and custom scopes—providing clear explanations and code samples for each.

Extension PointsIoCjava
0 likes · 16 min read
Unlock Spring’s Power: 11 Essential Extension Points You Must Master
Selected Java Interview Questions
Selected Java Interview Questions
Oct 9, 2022 · Backend Development

Various Ways to Register Beans in the Spring IoC Container

This article explains six common techniques for adding beans to the Spring IoC container, including @Configuration with @Bean, @Component with @ComponentScan, various @Import approaches, FactoryBean, and BeanDefinitionRegistryPostProcessor, providing code examples and usage details for each method.

Configurationbeandependency-injection
0 likes · 9 min read
Various Ways to Register Beans in the Spring IoC Container
Su San Talks Tech
Su San Talks Tech
Oct 4, 2022 · Backend Development

11 Must‑Know Spring Extension Points to Supercharge Your Java Backend

Explore the 11 most commonly used Spring extension points—from custom interceptors and bean factories to global exception handling, type converters, import mechanisms, startup runners, bean lifecycle processors, and custom scopes—complete with clear code examples and practical guidance for enhancing Java backend applications.

BackendConfigurationExtension Points
0 likes · 11 min read
11 Must‑Know Spring Extension Points to Supercharge Your Java Backend
Java Architect Essentials
Java Architect Essentials
Sep 30, 2022 · Backend Development

Comprehensive Guide to Spring Annotation Development and MyBatis Integration

This article provides a step‑by‑step tutorial on using Spring annotations for bean definition, component scanning, scope management, autowiring, qualifier usage, simple value injection, property file loading, and finally demonstrates how to integrate Spring with MyBatis for streamlined data access in Java backend projects.

ConfigurationMyBatisannotations
0 likes · 9 min read
Comprehensive Guide to Spring Annotation Development and MyBatis Integration
IT Services Circle
IT Services Circle
Sep 20, 2022 · Backend Development

Understanding the Spring Bean Lifecycle: From Instantiation to Destruction

This article explains the complete Spring Bean lifecycle—including IoC fundamentals, bean creation, property injection, initialization callbacks, custom init/destroy methods, and post‑processor hooks—by walking through detailed source‑code examples and step‑by‑step execution traces for a sample bean.

IoCbean-lifecycledependency-injection
0 likes · 10 min read
Understanding the Spring Bean Lifecycle: From Instantiation to Destruction
DaTaobao Tech
DaTaobao Tech
Sep 16, 2022 · Databases

Investigation of Hanging Transactions and Lock Wait Timeout in MySQL InnoDB

The article investigates MySQL InnoDB lock‑wait timeouts caused by hanging transactions that lack proper commit or rollback, explains ACID and lock mechanisms, shows how stale ThreadLocal bindings let pooled threads reuse unfinished transactions, and recommends using @Transactional with robust try‑catch handling to prevent such deadlocks.

HangingTransactionInnoDBLock
0 likes · 14 min read
Investigation of Hanging Transactions and Lock Wait Timeout in MySQL InnoDB
Code Ape Tech Column
Code Ape Tech Column
Sep 16, 2022 · Backend Development

Ensuring Thread Safety for Spring Singleton Beans: Problems and Solutions

This article explains why Spring singleton beans can be unsafe in concurrent scenarios, demonstrates the issue with a controller example, and presents multiple solutions including changing bean scope, using ThreadLocal, avoiding member variables, employing concurrent collections, and leveraging distributed caches.

BackendBean ScopeSingleton
0 likes · 8 min read
Ensuring Thread Safety for Spring Singleton Beans: Problems and Solutions
Selected Java Interview Questions
Selected Java Interview Questions
Sep 15, 2022 · Fundamentals

Applying the Strategy Pattern in Java with Spring Integration

This article explains the Strategy design pattern in Java, demonstrates its integration with Spring using custom annotations, enums, and a context manager, provides complete code examples, discusses its advantages over traditional conditional logic, and shows how to easily add new strategies.

Design PatternsStrategy Patternspring
0 likes · 13 min read
Applying the Strategy Pattern in Java with Spring Integration
macrozheng
macrozheng
Sep 15, 2022 · Backend Development

When to Use @Autowired vs @Resource in Spring? 5 Key Differences Explained

This article compares Spring’s @Autowired and Java’s @Resource annotations, detailing five key differences—including their origins, lookup order, supported parameters, injection styles, and IDE warnings—while providing code examples and diagrams to help developers choose the appropriate annotation.

annotationsdependency-injectionjava
0 likes · 9 min read
When to Use @Autowired vs @Resource in Spring? 5 Key Differences Explained
Code Ape Tech Column
Code Ape Tech Column
Sep 10, 2022 · Backend Development

Differences Between @Autowired and @Resource in Spring Dependency Injection

This article explains why IntelliJ IDEA warns about @Autowired field injection but not @Resource, compares the two annotations, outlines Spring's common DI methods, discusses the pros and cons of constructor, setter, and field injection, and provides guidance on choosing the appropriate approach.

Autowireddependency-injectionjava
0 likes · 7 min read
Differences Between @Autowired and @Resource in Spring Dependency Injection
Java Backend Technology
Java Backend Technology
Sep 9, 2022 · Backend Development

How to Refactor Spring Controllers for Clean, Unified Responses

This article explains how to improve Spring MVC controller logic by separating responsibilities, introducing a unified response structure, handling String return types with ResponseBodyAdvice, applying JSR‑303 validation, creating custom validators, and using custom exceptions with global exception handling to produce concise and maintainable backend code.

Controllerexceptionhandlingjava
0 likes · 18 min read
How to Refactor Spring Controllers for Clean, Unified Responses
Top Architect
Top Architect
Sep 8, 2022 · Backend Development

Commonly Used Spring Framework Annotations Explained

This article provides a comprehensive overview of the most frequently used Spring and Spring Boot annotations, explaining their purposes, usage scenarios, and includes practical Java code examples for core, MVC/REST, stereotype, data access, scheduling, asynchronous, and testing annotations.

DependencyInjectionSpringBootannotations
0 likes · 13 min read
Commonly Used Spring Framework Annotations Explained
IT Architects Alliance
IT Architects Alliance
Sep 7, 2022 · Backend Development

Improving Spring MVC Controller Logic: Unified Response, Validation, and Exception Handling

This article explains how to refactor Spring MVC controller code by introducing a unified response structure, handling String response issues with ResponseBodyAdvice, applying JSR‑303 validation, creating custom validation annotations, and implementing custom exceptions with global exception handling to produce cleaner, more maintainable backend services.

Controllerexceptionhandlingjava
0 likes · 18 min read
Improving Spring MVC Controller Logic: Unified Response, Validation, and Exception Handling
Top Architect
Top Architect
Sep 7, 2022 · Backend Development

Understanding @Transactional Rollback Behavior in Spring: When Exceptions Trigger Rollback

This article demonstrates how Spring's @Transactional annotation rolls back only for RuntimeException subclasses, explains why checked exceptions like Exception do not trigger rollback by default, and shows how to configure rollbackFor to handle custom exceptions, illustrated with SQL updates and Java code examples.

exceptionhandlingjavarollback
0 likes · 5 min read
Understanding @Transactional Rollback Behavior in Spring: When Exceptions Trigger Rollback
Su San Talks Tech
Su San Talks Tech
Sep 7, 2022 · Backend Development

Demystifying Spring Bean Lifecycle: From Creation to Destruction

This article explains the Spring Bean lifecycle in depth, covering IoC fundamentals, each lifecycle stage, extension points such as Aware interfaces and BeanPostProcessor, and provides a step‑by‑step code walkthrough that maps the execution flow from bean creation to destruction.

BackendIoCSpring Framework
0 likes · 12 min read
Demystifying Spring Bean Lifecycle: From Creation to Destruction
Java Architect Essentials
Java Architect Essentials
Sep 4, 2022 · Backend Development

Mastering Code Timing in Java: Spring and Apache StopWatch Deep Dive

This article explains why manual timestamp logging is cumbersome, introduces Spring's org.springframework.util.StopWatch and Apache Commons Lang's StopWatch, provides Maven dependencies, detailed usage examples, key methods, and important cautions for accurate performance measurement in Java applications.

Apache CommonsCode TimingPerformance Monitoring
0 likes · 11 min read
Mastering Code Timing in Java: Spring and Apache StopWatch Deep Dive
Java Backend Technology
Java Backend Technology
Sep 3, 2022 · Backend Development

Mastering Java Scheduling: 10 Powerful Ways to Automate Your Tasks

This comprehensive guide explores ten practical Java scheduling techniques—from Linux crontab and JDK Thread/Timer to Spring Task, Quartz, and distributed solutions like XXL‑Job and Elastic‑Job—detailing their usage, code examples, advantages, and drawbacks for robust backend automation.

Schedulingcronjava
0 likes · 21 min read
Mastering Java Scheduling: 10 Powerful Ways to Automate Your Tasks
Top Architect
Top Architect
Aug 29, 2022 · Backend Development

Ways to Register Beans into the Spring Container

This article explains various methods to add beans to the Spring IoC container, including @Configuration with @Bean, component scanning, @Import with selectors or registrars, FactoryBean usage, and BeanDefinitionRegistryPostProcessor, providing code examples and detailed explanations for each approach.

Bean RegistrationIoCdependency-injection
0 likes · 9 min read
Ways to Register Beans into the Spring Container
Java Backend Technology
Java Backend Technology
Aug 29, 2022 · Backend Development

Master Java SPI: From JDK to Dubbo & Spring – Extend Your Apps Easily

This article explains the concept and usage of Service Provider Interface (SPI) in Java, demonstrating how JDK’s ServiceLoader, Dubbo’s enhanced SPI, and Spring’s SPI mechanisms enable flexible extension of logging frameworks and other components, while comparing their features, configuration files, and limitations.

DubboSPIServiceLoader
0 likes · 14 min read
Master Java SPI: From JDK to Dubbo & Spring – Extend Your Apps Easily
Top Architect
Top Architect
Aug 28, 2022 · Backend Development

Spring Boot Parameter Validation with javax.validation and Custom Annotations

This tutorial demonstrates how to replace verbose manual checks in Java services with Spring's javax.validation annotation‑based validation, covering built‑in constraints, Maven setup, DTO annotations, validation groups, custom validators, and a global exception handler for unified error responses.

annotationsexceptionhandlingjava
0 likes · 13 min read
Spring Boot Parameter Validation with javax.validation and Custom Annotations
Top Architect
Top Architect
Aug 25, 2022 · Backend Development

Building a Custom RPC Spring Starter: Architecture, Principles, and Code Walkthrough

This article explains the fundamentals of remote procedure call (RPC), presents a complete system architecture diagram, and provides a step‑by‑step implementation of a custom rpc‑spring‑starter using Java, Spring, Zookeeper for service registration, Netty for network communication, and dynamic proxy techniques for client‑side invocation.

Dynamic ProxyNettyRPC
0 likes · 18 min read
Building a Custom RPC Spring Starter: Architecture, Principles, and Code Walkthrough
Code Ape Tech Column
Code Ape Tech Column
Aug 25, 2022 · Backend Development

Using Guava‑Retrying for Flexible Retry Strategies in Java

This article introduces the Guava‑Retrying library for Java, explains how to add its Maven dependency, demonstrates building a Retryer with customizable retry conditions, stop strategies, wait strategies, and listeners, and provides detailed code examples illustrating each component.

Guava-RetryingRetrybackend-development
0 likes · 14 min read
Using Guava‑Retrying for Flexible Retry Strategies in Java
Su San Talks Tech
Su San Talks Tech
Aug 25, 2022 · Backend Development

Mastering Spring Transactions: From Basics to Advanced Propagation Types

This article explains the origins and purpose of Spring transactions, demonstrates how to quickly set them up with code examples, explores key features and common pitfalls, and provides an in‑depth comparison of the REQUIRED, REQUIRES_NEW, and NESTED propagation types for robust backend development.

BackendMyBatisaop
0 likes · 21 min read
Mastering Spring Transactions: From Basics to Advanced Propagation Types
Cognitive Technology Team
Cognitive Technology Team
Aug 20, 2022 · Backend Development

Common Pitfalls of Spring Transaction Management and How to Avoid Them

This article explains common pitfalls of Spring's transaction management—including AOP proxy limitations, unchecked exception handling, self‑invocation, asynchronous execution, multiple data sources, and large transaction issues—and provides practical solutions such as using class‑based proxies, configuring rollback rules, and splitting transactions into smaller units.

aopbackend-developmentdatabase
0 likes · 6 min read
Common Pitfalls of Spring Transaction Management and How to Avoid Them
Programmer DD
Programmer DD
Aug 18, 2022 · Backend Development

How to Build a Clean, Robust Spring Controller Layer with Unified Responses and Validation

This article explains why the Controller layer is essential, identifies common pitfalls such as tangled validation and inconsistent responses, and demonstrates how to refactor Spring MVC controllers using a unified Result wrapper, ResponseBodyAdvice, proper String handling, JSR‑303 validation, custom validators, and global exception handling to produce clean, maintainable backend code.

BackendControllerexception-handling
0 likes · 21 min read
How to Build a Clean, Robust Spring Controller Layer with Unified Responses and Validation
Top Architect
Top Architect
Aug 17, 2022 · Backend Development

Using Spring Application Events for Synchronous and Asynchronous Business Logic

This article demonstrates how to leverage Spring's ApplicationEvent mechanism to decouple business logic, showing both synchronous and asynchronous event publishing, custom event definitions, listener implementations, unit testing, and enabling async processing with @EnableAsync and @Async annotations.

ApplicationEventAsyncEventListener
0 likes · 9 min read
Using Spring Application Events for Synchronous and Asynchronous Business Logic
Architecture & Thinking
Architecture & Thinking
Aug 16, 2022 · Backend Development

Unveiling Spring AOP: A Deep Dive into Source Code and Proxy Mechanics

This article provides a comprehensive analysis of Spring AOP, covering its core concepts, configuration parsing, BeanFactoryPostProcessor and BeanPostProcessor mechanisms, namespace handling, the creation of advisors and advice from @Aspect annotations, and the proxy generation process that enables method interception.

aopaspectjbackend-development
0 likes · 32 min read
Unveiling Spring AOP: A Deep Dive into Source Code and Proxy Mechanics
Selected Java Interview Questions
Selected Java Interview Questions
Aug 16, 2022 · Backend Development

Spring Framework Design Patterns Overview

This article explains how Spring implements various design patterns—including Simple Factory, Factory Method, Singleton, Adapter, Decorator, Proxy, Observer, Strategy, and Template Method—detailing their implementation approaches, underlying principles, and practical code examples within the Spring container.

Design PatternsFactoryaop
0 likes · 13 min read
Spring Framework Design Patterns Overview
Java Baker
Java Baker
Aug 13, 2022 · Fundamentals

Unlock Java’s Power: Mastering Reflection for Dynamic Code

This article explains Java reflection’s core concepts, how the JVM dynamically loads Class objects, and provides practical examples—including field retrieval, caching strategies, and integration with Spring—to help developers harness reflection for dynamic code manipulation while avoiding common pitfalls.

BackendReflectiondynamic
0 likes · 12 min read
Unlock Java’s Power: Mastering Reflection for Dynamic Code
Java Architect Essentials
Java Architect Essentials
Aug 11, 2022 · Backend Development

Mastering Spring Events: Synchronous & Asynchronous Usage with Code Samples

This article explains how to use Spring ApplicationEvent to decouple business logic, showing step‑by‑step code for defining custom events, creating listeners with both ApplicationListener and @EventListener, publishing events synchronously and asynchronously, enabling async processing, and verifying behavior with unit tests.

ApplicationEventAsynchronousBackend
0 likes · 10 min read
Mastering Spring Events: Synchronous & Asynchronous Usage with Code Samples
Top Architect
Top Architect
Aug 10, 2022 · Backend Development

Understanding Spring @Transactional Rollback Behavior and Exception Handling

This article demonstrates how Spring's @Transactional annotation rolls back transactions only for RuntimeException subclasses, shows practical MySQL update tests that trigger ArithmeticException, and explains how to configure rollback for checked exceptions using rollbackFor, with complete code examples.

Exception Handlingjavamysql
0 likes · 5 min read
Understanding Spring @Transactional Rollback Behavior and Exception Handling
Top Architect
Top Architect
Aug 6, 2022 · Backend Development

Practical Coding Techniques: Kafka Transaction Commit, Redis Distributed Lock Simplification, and Business Log Decoupling

This article shares several practical coding techniques for backend development, including how to commit Kafka transactions safely, simplify Redis distributed lock usage with Redisson, implement AOP-based method locking, and decouple business logging using thread pools and asynchronous processing.

aopdistributed-lockredis
0 likes · 13 min read
Practical Coding Techniques: Kafka Transaction Commit, Redis Distributed Lock Simplification, and Business Log Decoupling
IT Architects Alliance
IT Architects Alliance
Aug 6, 2022 · Backend Development

Practical Coding Tips: Kafka Transaction Commit, Redis Distributed Lock Simplification, AOP Lock Annotation, and Business Log Decoupling

This article shares practical development techniques, including how to safely commit Kafka messages within transactions, simplify Redis distributed locks with Redisson, implement an AOP‑based lock annotation for method-level locking, and decouple business logging using asynchronous thread pools and helper utilities.

Kafkaaopdistributed-lock
0 likes · 14 min read
Practical Coding Tips: Kafka Transaction Commit, Redis Distributed Lock Simplification, AOP Lock Annotation, and Business Log Decoupling
IT Architects Alliance
IT Architects Alliance
Aug 4, 2022 · Information Security

Understanding Session Mechanisms, Distributed Session Challenges, and SSO Solutions with CAS Implementation

This article explains traditional session and authentication mechanisms, the problems of session sharing in clustered and multi‑service environments, and presents practical SSO solutions—including CAS‑based single sign‑on and its differences from OAuth2—accompanied by complete Java Spring code examples.

AuthenticationCASSSO
0 likes · 16 min read
Understanding Session Mechanisms, Distributed Session Challenges, and SSO Solutions with CAS Implementation
Top Architect
Top Architect
Aug 2, 2022 · Backend Development

Best Practices for API Design and Controller Standards in Java Backend Development

The article explains why a unified response format like ResultBean is essential for Java backend APIs, outlines common interface design mistakes, provides concrete coding guidelines for controllers, and demonstrates how to use AOP for exception handling and logging, all illustrated with practical code examples.

aopjavaspring
0 likes · 10 min read
Best Practices for API Design and Controller Standards in Java Backend Development
Selected Java Interview Questions
Selected Java Interview Questions
Jul 31, 2022 · Backend Development

Understanding Spring IoC, Bean Instantiation, and Dependency Injection

This article explains the concepts of coupling, Inversion of Control, and Dependency Injection in the Spring framework, demonstrates various bean instantiation methods—including no‑arg constructors, static and instance factory methods—and provides a complete example of configuring and using Spring beans in a Java application.

IoCbeandependency-injection
0 likes · 9 min read
Understanding Spring IoC, Bean Instantiation, and Dependency Injection
Top Architect
Top Architect
Jul 28, 2022 · Backend Development

Spring @Transactional: Propagation Behaviors, Rollback Mechanism, and Self‑Invocation Pitfalls

This article explains Spring's @Transactional annotation, detailing the various transaction propagation options, the default rollback behavior for unchecked exceptions, common pitfalls such as self‑invocation and non‑public methods, and how to use AOP proxies like AopContext.currentProxy and @EnableAspectJAutoProxy to ensure proper transaction management.

Proxyaoppropagation
0 likes · 9 min read
Spring @Transactional: Propagation Behaviors, Rollback Mechanism, and Self‑Invocation Pitfalls
Top Architect
Top Architect
Jul 26, 2022 · Backend Development

Stock Deduction Strategies: Database vs Redis Implementations

This article compares three stock‑deduction approaches—single‑record MySQL, sharded MySQL, and Redis with Lua scripts—analyzes their performance and concurrency issues, and provides complete Java/Spring code for a Redis‑based solution including distributed locking and initialization callbacks.

distributed-lockinventoryspring
0 likes · 10 min read
Stock Deduction Strategies: Database vs Redis Implementations
政采云技术
政采云技术
Jul 26, 2022 · Backend Development

Deep Dive into MyBatis: Architecture, Execution Flow, Plugins, Caching, and Spring Integration

This article provides a comprehensive analysis of MyBatis, covering its core architecture, the process of obtaining SqlSessionFactory and SqlSession, the dynamic proxy mechanism for mappers, the execution flow of SQL statements, the plugin system, first‑ and second‑level caching strategies, and how Spring manages MyBatis mappers through factory beans and import registrars.

MyBatisORMPlugins
0 likes · 39 min read
Deep Dive into MyBatis: Architecture, Execution Flow, Plugins, Caching, and Spring Integration
Architect
Architect
Jul 25, 2022 · Backend Development

Stock Deduction Strategies: Database vs Redis and a Spring‑Based Implementation

This article compares three stock‑deduction approaches—single‑record MySQL, multi‑record MySQL, and Redis incrby—analyzes their concurrency drawbacks, and provides a complete Spring Java implementation using a Lua script, distributed lock, and callback for initializing inventory.

springstock management
0 likes · 11 min read
Stock Deduction Strategies: Database vs Redis and a Spring‑Based Implementation
Java Architect Essentials
Java Architect Essentials
Jul 22, 2022 · Backend Development

Using Spring Application Events for Synchronous and Asynchronous Processing

This article demonstrates how to leverage Spring Application Events to decouple business logic, showing step‑by‑step examples of defining custom events, listeners, publishing events synchronously, and enabling asynchronous handling with @EnableAsync and @Async annotations, complete with code snippets and test results.

ApplicationEventAsynchronousspring
0 likes · 9 min read
Using Spring Application Events for Synchronous and Asynchronous Processing