Tagged articles

Spring

1874 articles · Page 11 of 19
Code Ape Tech Column
Code Ape Tech Column
Jan 31, 2023 · Backend Development

Applying the Service Locator Pattern to Decouple File Parsers in Java

This article explains how to replace tightly‑coupled if‑else or switch‑case logic for selecting file parsers (JSON, CSV, XML) with a Service Locator Pattern using Spring's ServiceLocatorFactoryBean, demonstrating a clean, extensible solution that follows the Open/Closed principle.

BackendDependency InjectionDesign Pattern
0 likes · 8 min read
Applying the Service Locator Pattern to Decouple File Parsers in Java
Sanyou's Java Diary
Sanyou's Java Diary
Jan 30, 2023 · Backend Development

Mastering Spring Bean Injection: 5 Ways to Register Beans in the Container

This article comprehensively reviews the various techniques for injecting beans into the Spring container—including XML and properties configuration files, annotation-based declarations, manual BeanDefinition registration, direct singleton registration, and FactoryBean usage—providing code examples, underlying principles, and practical guidance for each method.

Backend DevelopmentDependency InjectionSpring
0 likes · 18 min read
Mastering Spring Bean Injection: 5 Ways to Register Beans in the Container
Ubiquitous Tech
Ubiquitous Tech
Jan 28, 2023 · Backend Development

Decoupling Java Business Logic with Spring Event: A Hands‑On Example

Learn how to use Spring's Application Event mechanism to separate main and sub‑processes in Java applications, covering custom event and listener creation, publishing events, abstract base event design, singleton manager, and a real‑world order‑cancellation SMS notification case.

BackendDesign PatternJava
0 likes · 10 min read
Decoupling Java Business Logic with Spring Event: A Hands‑On Example
IT Architects Alliance
IT Architects Alliance
Jan 27, 2023 · Backend Development

Mastering Session Management and SSO: From Cookies to CAS with Redis

This article analyzes the limitations of traditional HTTP session mechanisms in single‑server and clustered environments, explains why session sharing is essential for multi‑system products, and presents practical solutions such as session replication and centralized Redis storage, followed by a detailed walkthrough of CAS‑based single sign‑on implementation with Java Spring code examples and a comparison to OAuth2.

CASJavaRedis
0 likes · 15 min read
Mastering Session Management and SSO: From Cookies to CAS with Redis
Code Ape Tech Column
Code Ape Tech Column
Jan 18, 2023 · Backend Development

Eight Ways to Implement Asynchronous Execution in Java

This article introduces eight practical techniques for achieving asynchronous processing in Java—including raw threads, Future, CompletableFuture, Spring @Async, ApplicationEvent, message queues, Hutool ThreadUtil, and Guava ListenableFuture—complete with code examples and discussion of their advantages and limitations.

FutureGuavaJava
0 likes · 14 min read
Eight Ways to Implement Asynchronous Execution in Java
Java Architect Essentials
Java Architect Essentials
Jan 12, 2023 · Backend Development

How to Eliminate Repetitive Java Code with Design Patterns, Annotations, and Bean Mapping

This article examines why duplicate code harms maintainability, then demonstrates three practical techniques—using factory and template method patterns, leveraging custom annotations with reflection, and applying bean‑copy utilities—to refactor Java business logic and dramatically reduce redundancy.

Design PatternsJavaReflection
0 likes · 29 min read
How to Eliminate Repetitive Java Code with Design Patterns, Annotations, and Bean Mapping
Sohu Tech Products
Sohu Tech Products
Jan 11, 2023 · Backend Development

Understanding ThreadPoolExecutor in Java: Usage, Implementation Details, and Practical Scenarios

This article provides an in‑depth overview of Java's ThreadPoolExecutor, covering why thread pools are needed, various creation methods via Executors, core parameters, internal workflow, source‑code analysis, monitoring, shutdown procedures, and real‑world applications such as Spring @Async and Dubbo integration.

DubboExecutorServiceSpring
0 likes · 34 min read
Understanding ThreadPoolExecutor in Java: Usage, Implementation Details, and Practical Scenarios
Selected Java Interview Questions
Selected Java Interview Questions
Jan 10, 2023 · Backend Development

Hot Deployment of Java Interface Implementations Using Reflection and Spring

This article explains how to let users upload a JAR that implements a predefined Java interface, then dynamically load, register, and switch the implementation at runtime using both reflection‑based and Spring‑annotation‑based hot‑deployment techniques, complete with code examples and utility methods.

Dynamic LoadingHot DeploymentJava
0 likes · 8 min read
Hot Deployment of Java Interface Implementations Using Reflection and Spring
DaTaobao Tech
DaTaobao Tech
Dec 30, 2022 · Backend Development

Practical Guide to Upgrading Java 8 to JDK 11 with G1 GC: Benefits, Steps, and New Features

The article provides a hands‑on migration guide for moving an internal gateway service from Java 8 to JDK 11 with the G1 garbage collector, detailing a checklist of tool and dependency updates, showcasing up to 105 % performance gains, outlining new language features, virtual‑thread usage, and best‑practice recommendations for a smooth, cost‑effective upgrade.

G1GCJDK11Java
0 likes · 32 min read
Practical Guide to Upgrading Java 8 to JDK 11 with G1 GC: Benefits, Steps, and New Features
Code Ape Tech Column
Code Ape Tech Column
Dec 26, 2022 · Backend Development

Applying the Chain of Responsibility Pattern for Multi‑Level Product Validation and Workflow in Java

This article explains the Chain of Responsibility design pattern, demonstrates its use in multi‑step product creation validation and expense‑approval workflows with concrete Java/Spring code, and discusses configuration, dynamic composition, advantages, drawbacks, and testing scenarios.

BackendChain of ResponsibilityDesign Pattern
0 likes · 21 min read
Applying the Chain of Responsibility Pattern for Multi‑Level Product Validation and Workflow in Java
macrozheng
macrozheng
Dec 17, 2022 · Fundamentals

Master 9 Essential Design Patterns for Cleaner Java Code

This article explains nine widely used design patterns—Singleton, Builder, Factory, Strategy, Template Method, Chain of Responsibility, Proxy, Adapter, and Observer—detailing their concepts, typical use‑cases, and concrete Java code examples drawn from popular open‑source projects such as Spring, Dubbo, MyBatis and Guava.

BuilderJavaSpring
0 likes · 27 min read
Master 9 Essential Design Patterns for Cleaner Java Code
Architecture Digest
Architecture Digest
Dec 16, 2022 · Backend Development

PowerJob: A Next‑Generation Distributed Task Scheduling and Computing Framework – Introduction and Quick‑Start Guide

PowerJob is a third‑generation distributed job scheduler that adds workflow orchestration, map‑reduce style computation and rich execution modes to traditional CRON‑based scheduling, and this guide explains its advantages, core features, architecture, and provides step‑by‑step instructions with code samples to get started quickly.

JavaMapReducePowerJob
0 likes · 11 min read
PowerJob: A Next‑Generation Distributed Task Scheduling and Computing Framework – Introduction and Quick‑Start Guide
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Dec 16, 2022 · Backend Development

Key Spring Filters: FormContent, ForwardedHeader, Shallow ETag, CORS & Encoding

This guide explains Spring 5.3’s built‑in servlet filters—including FormContentFilter for handling form data in PUT/PATCH/DELETE, ForwardedHeaderFilter for adjusting request URLs behind proxies, ShallowEtagHeaderFilter for lightweight caching, the CORS filter for cross‑origin requests, and CharacterEncodingFilter for enforcing request/response encoding—along with configuration tips and security considerations.

BackendJavaServlet Filters
0 likes · 7 min read
Key Spring Filters: FormContent, ForwardedHeader, Shallow ETag, CORS & Encoding
IT Architects Alliance
IT Architects Alliance
Dec 13, 2022 · Backend Development

Understanding Spring Transaction Management: @EnableTransactionManagement, Execution Principles, Propagation Mechanisms, and Forced Rollback

This article explains how Spring's @EnableTransactionManagement activates transaction support by registering advisors and proxy beans, details the core execution flow of transactional methods, explores various propagation scenarios with code examples, and demonstrates forced rollback and transaction synchronization techniques.

@TransactionalAOPJava
0 likes · 10 min read
Understanding Spring Transaction Management: @EnableTransactionManagement, Execution Principles, Propagation Mechanisms, and Forced Rollback
Su San Talks Tech
Su San Talks Tech
Dec 9, 2022 · Backend Development

Master Asynchronous Java: Threads, Futures, CompletableFuture & Spring @Async

This article introduces asynchronous programming concepts in Java, explaining the shift from synchronous to asynchronous execution, and demonstrates practical implementations using raw threads, ThreadPoolExecutor, Future, FutureTask, CompletableFuture, and Spring's @Async annotation, along with event handling and message queue integration for high‑throughput systems.

CompletableFutureJavaSpring
0 likes · 16 min read
Master Asynchronous Java: Threads, Futures, CompletableFuture & Spring @Async
转转QA
转转QA
Dec 8, 2022 · Backend Development

Applying AOP to Reduce Coupling in a Data Construction Platform

This article explains how Aspect‑Oriented Programming (AOP) was introduced into a data construction platform to address high development effort, strong business coupling, and maintenance difficulty by isolating cross‑cutting concerns such as logging, thereby improving modularity, development speed, and code maintainability.

AOPSpringaspect-oriented-programming
0 likes · 5 min read
Applying AOP to Reduce Coupling in a Data Construction Platform
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.

JavaSpringpropagation
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.

BackendCustom ConstraintsJava
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.

BackendGuavaJava
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.

EnumExceptionHandlingJava
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.

Backend DevelopmentDatabase ConnectionDruid
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.

Backend DevelopmentContextLoaderListenerDispatcherServlet
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.

Dependency InjectionDesign PatternsJava
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.

@TransactionalBackend 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 ValidatorJava
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.

@TransactionalRedisSpring
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.

Backend DevelopmentJavaMyBatis
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.

JavaMyBatisRedis
0 likes · 8 min read
Comprehensive Collection of Interview Questions and Answers for Major Tech Companies (Java, Spring, Redis, MyBatis, etc.)
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.

ReflectionSpringassertions
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.

GraalVMJEPLoom
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.

JavaMySQLSpring
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 DesignSpring
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 ValidatorJavaSpring
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.

CASJavaOAuth2
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.

Backend DevelopmentJavaMyBatis
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.

JavaRead-Write SplittingSpring
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.

JavaRedisSemaphore
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.

Backend DevelopmentFactory PatternJava
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 ProcessingJavaLombok
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.

Bean LifecycleDependency InjectionJava
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.

ControllerAdviceEnumExceptionHandling
0 likes · 11 min read
Unified Exception Handling in Spring Using @ControllerAdvice and Custom Assertions
Architect's Tech Stack
Architect's Tech Stack
Oct 21, 2022 · Backend Development

Unified Exception Handling in Spring: @ControllerAdvice, Assert, and Enum‑Based Business Exceptions

This article explains how to centralize exception handling in Spring applications using @ControllerAdvice, replace repetitive null‑checks with Assert utilities, and combine enums with custom BusinessException classes to create a clean, maintainable backend error‑handling strategy.

ControllerAdviceEnumExceptionHandling
0 likes · 10 min read
Unified Exception Handling in Spring: @ControllerAdvice, Assert, and Enum‑Based Business Exceptions
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.

CASJavaRedis
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.

Backend DevelopmentDependency InjectionJava
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.

AOPJavaSpring
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.

IOCJavaSpring
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.

@BeanConfigurationDependency 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.

@BeanBackendConfiguration
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.

ConfigurationDependency InjectionMyBatis
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.

Bean LifecycleDependency InjectionIOC
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 ScopeSpring
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 PatternsSpringStrategy Pattern
0 likes · 13 min read
Applying the Strategy Pattern in Java with Spring Integration
Shepherd Advanced Notes
Shepherd Advanced Notes
Sep 15, 2022 · Backend Development

Understanding the Difference Between @Configuration and @Component in Spring

This article explains how Spring treats @Component and @Configuration annotations, distinguishes their LITE and FULL modes, demonstrates the proxy behavior with concrete code examples, and details the role of ConfigurationClassPostProcessor and CGLIB enhancement in implementing FULL configuration.

ComponentConfigurationDependencyInjection
0 likes · 15 min read
Understanding the Difference Between @Configuration and @Component in Spring
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.

Dependency InjectionJavaSpring
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.

Dependency InjectionJavaSpring
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.

DependencyInjectionJavaSpring
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
Java Captain
Java Captain
Sep 7, 2022 · Backend Development

Understanding Spring Core Concepts and Building a Minimal Servlet‑Based Framework

This article explains Spring's core features such as IoC, DI, and AOP, demonstrates a simple Hello World application with Spring Boot, then shows how to implement the same functionality using raw Servlets and a handcrafted mini‑Spring framework, complete with code examples and deployment steps.

Dependency InjectionIOCJava
0 likes · 23 min read
Understanding Spring Core Concepts and Building a Minimal Servlet‑Based Framework
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.

BackendBean LifecycleDependency Injection
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 CommonsBackend DevelopmentCode Timing
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.

CronJavaSpring
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 RegistrationDependency InjectionIOC
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.

DubboJavaSPI
0 likes · 14 min read
Master Java SPI: From JDK to Dubbo & Spring – Extend Your Apps Easily