Tagged articles

spring

1855 articles · Page 16 of 19
Top Architect
Top Architect
Jan 12, 2021 · Backend Development

Introduction to Mock Testing with Spring MVC and MockMvc

This article introduces mock testing for Spring MVC controllers, explains why mocks are useful, describes the main MockMvc components, shows required Maven dependencies, and provides complete example test cases for both view‑returning and JSON‑returning endpoints using JUnit and MockMvc.

JUnitJavaMockMvc
0 likes · 8 min read
Introduction to Mock Testing with Spring MVC and MockMvc
Code Ape Tech Column
Code Ape Tech Column
Jan 12, 2021 · Backend Development

Master MyBatis Streaming Queries: Avoid Cursor Closure Errors with Three Simple Solutions

This article explains the concept of streaming queries in MyBatis, describes the Cursor interface and its methods, demonstrates common pitfalls that cause cursor closure errors, and provides three practical solutions—using SqlSessionFactory, TransactionTemplate, or @Transactional—to keep the database connection open during iteration.

JavaMyBatisStreaming Query
0 likes · 8 min read
Master MyBatis Streaming Queries: Avoid Cursor Closure Errors with Three Simple Solutions
Architect's Tech Stack
Architect's Tech Stack
Jan 11, 2021 · Backend Development

Commonly Used Spring Framework Annotations and Their Usage

This article introduces the most commonly used Spring framework annotations—including core, MVC/REST, Boot, stereotype, data access, scheduling, and testing annotations—explains their purposes, usage scenarios, and provides Java code examples illustrating how to apply them in typical Spring applications.

DependencyInjectionSpringBootannotations
0 likes · 12 min read
Commonly Used Spring Framework Annotations and Their Usage
Architecture Digest
Architecture Digest
Jan 10, 2021 · Backend Development

Designing Unified API Response Wrappers with @ResponseResult in Spring

This article explains how to design a consistent JSON response structure for Spring-based micro‑service APIs, introduces a Result wrapper class, demonstrates annotation‑driven response handling, and shows controller, interceptor, and advice implementations to produce clean, maintainable backend responses.

APIJavaResponseWrapper
0 likes · 6 min read
Designing Unified API Response Wrappers with @ResponseResult in Spring
Java Captain
Java Captain
Jan 9, 2021 · Backend Development

Do Service and DAO Layers Need Interfaces? When to Use Them in Spring Projects

This article examines whether Service and DAO layers in Java Spring projects should always have interfaces, discusses the arguments for and against using interfaces, and proposes practical structuring and dependency‑injection techniques to decide when interfaces are truly necessary.

DAOJavaService Layer
0 likes · 8 min read
Do Service and DAO Layers Need Interfaces? When to Use Them in Spring Projects
Architect's Tech Stack
Architect's Tech Stack
Jan 8, 2021 · Backend Development

Comprehensive Guide to Spring Kafka: Integration, Advanced Features, and Usage

This article provides a detailed tutorial on integrating Kafka with Spring using Spring‑Kafka, covering simple setup, embedded Kafka testing, topic creation, message sending and receiving, transaction support, listener configurations, manual acknowledgment, error handling, retry and dead‑letter queues, and related code examples.

KafkaSpring Kafkamessaging
0 likes · 21 min read
Comprehensive Guide to Spring Kafka: Integration, Advanced Features, and Usage
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Jan 7, 2021 · Backend Development

Overview of Spring Core Components, IOC, AOP, and Related Technologies

This article provides a comprehensive guide to the Spring framework, covering its core modules, the concepts of Inversion of Control and Aspect‑Oriented Programming, various container implementations, proxy mechanisms, bean lifecycle, design patterns, MVC architecture, Spring Boot, Spring Cloud, and common annotations for Java backend development.

AOPJavabackend
0 likes · 31 min read
Overview of Spring Core Components, IOC, AOP, and Related Technologies
Code Ape Tech Column
Code Ape Tech Column
Jan 7, 2021 · Backend Development

How Spring Solves Circular Dependencies: Inside the Three‑Cache Mechanism

This article explains how Spring resolves circular dependencies for singleton beans using a three‑level cache, contrasts it with prototype limitations, provides a minimal container implementation that mimics the mechanism, and draws an analogy to the classic two‑sum algorithm to illustrate the core caching principle.

Circular DependencyJavaThree Cache
0 likes · 11 min read
How Spring Solves Circular Dependencies: Inside the Three‑Cache Mechanism
Su San Talks Tech
Su San Talks Tech
Jan 3, 2021 · Backend Development

Eliminate Long if‑else Chains in Java: Design Patterns & Spring Solutions

This article examines the drawbacks of lengthy if‑else statements in Java payment services, explains how they violate the Open/Closed and Single Responsibility principles, and presents multiple refactoring techniques—including custom annotations, dynamic bean naming, template methods, strategy‑factory, and chain‑of‑responsibility patterns—to produce cleaner, more maintainable backend code.

if-elsespringstrategy
0 likes · 17 min read
Eliminate Long if‑else Chains in Java: Design Patterns & Spring Solutions
Programmer DD
Programmer DD
Jan 3, 2021 · Backend Development

Why Spring Ecosystem Dominates Java: Surprising Top200 Rankings Unveiled

An in‑depth look at the latest Java Top‑200 project rankings reveals Spring’s ecosystem as the de‑facto standard, while contrasting tools such as Gradle versus Maven, Kafka versus Pulsar, Spring Security versus Shiro, and many others, highlighting performance, adoption and community strength across the backend landscape.

FrameworksJavabackend
0 likes · 4 min read
Why Spring Ecosystem Dominates Java: Surprising Top200 Rankings Unveiled
Java Backend Technology
Java Backend Technology
Dec 27, 2020 · Backend Development

Do You Really Need Interfaces for Service and DAO Layers in Spring?

This article examines whether Service and DAO layers in Spring projects truly require interfaces, debunks common justifications, explores alternative project structures for single and multiple implementations, and offers practical guidelines on when to use or omit interfaces.

DAOService Layerdependency injection
0 likes · 8 min read
Do You Really Need Interfaces for Service and DAO Layers in Spring?
21CTO
21CTO
Dec 24, 2020 · Backend Development

Why Java Isn’t Dead: A Developer’s Take on Spring, Microservices, and KISS

The author reflects on returning to Java after three years, arguing that despite the rise of containers and micro‑services, Java’s performance, threading model, and mature ecosystem keep it relevant, while criticizing Spring’s complexity and advocating a simple, KISS‑driven approach.

ContainersJavaKISS
0 likes · 8 min read
Why Java Isn’t Dead: A Developer’s Take on Spring, Microservices, and KISS
Senior Brother's Insights
Senior Brother's Insights
Dec 24, 2020 · Backend Development

Spring Filter vs Interceptor: When to Use Each in Java Web Apps

This guide explains the concepts, implementation steps, configuration examples, and key differences between Servlet Filters and Spring MVC Interceptors, helping developers choose the right tool for request preprocessing, logging, and access control in Java web applications.

InterceptorJavabackend development
0 likes · 12 min read
Spring Filter vs Interceptor: When to Use Each in Java Web Apps
Architecture Digest
Architecture Digest
Dec 21, 2020 · Backend Development

Do You Need an Interface for the Service Layer? A Critical Examination

This article examines whether a Service layer in a Spring‑based backend project truly requires an interface, debunks common justifications, proposes practical development workflows, and outlines the advantages and drawbacks of using or omitting interfaces in various architectural scenarios.

Service Layerbackend architecturedependency injection
0 likes · 8 min read
Do You Need an Interface for the Service Layer? A Critical Examination
Selected Java Interview Questions
Selected Java Interview Questions
Dec 11, 2020 · Databases

Implementing MyBatis Streaming Queries in Spring: Concepts, API, and Three Practical Solutions

This article explains the concept of streaming queries, introduces MyBatis's Cursor interface, demonstrates how to use it in Spring MVC controllers, and provides three concrete solutions—using SqlSessionFactory, TransactionTemplate, and @Transactional—to keep the database connection open and avoid cursor‑closed errors.

DatabaseJavaMyBatis
0 likes · 7 min read
Implementing MyBatis Streaming Queries in Spring: Concepts, API, and Three Practical Solutions
Top Architect
Top Architect
Dec 8, 2020 · Backend Development

Understanding Thread Safety of Spring Beans: Singleton vs Prototype Scope

This article explains why Spring beans are not inherently thread‑safe, compares the singleton and prototype scopes, shows how stateless beans can be safe, demonstrates the impact of static fields and injected beans, and provides practical code examples and recommendations for achieving thread safety in Spring applications.

BeanJavaPrototype
0 likes · 11 min read
Understanding Thread Safety of Spring Beans: Singleton vs Prototype Scope
Code Ape Tech Column
Code Ape Tech Column
Dec 7, 2020 · Backend Development

Unlock Spring’s Power: 9 Design Patterns Every Java Developer Should Master

This article explores nine core design patterns implemented in Spring—simple factory, factory method, singleton, adapter, decorator, proxy, observer, strategy, and template method—detailing their implementation mechanisms, underlying principles, code examples, and practical significance for building loosely coupled, extensible Java applications.

AOPDesign PatternsJava
0 likes · 16 min read
Unlock Spring’s Power: 9 Design Patterns Every Java Developer Should Master
Architect
Architect
Dec 6, 2020 · Backend Development

Do Service Layers Need Interfaces? A Critical Discussion on Spring‑Based Projects

This article examines whether a Service layer in a Spring‑based application truly requires an interface, analyzes common arguments for and against using interfaces, explores project structuring options, and offers practical recommendations based on real‑world development experience.

AOPService Layerarchitecture
0 likes · 7 min read
Do Service Layers Need Interfaces? A Critical Discussion on Spring‑Based Projects
Programmer DD
Programmer DD
Dec 5, 2020 · Backend Development

Mastering Spring Retry: Deep Dive into Retry and Back‑off Strategies

This article explains Spring Retry's architecture, how @EnableRetry, @Retryable, @Backoff and @Recover work together, details the available retry and back‑off policies, and walks through the core implementation using RetryTemplate and interceptors to provide flexible, AOP‑based retry handling in Java backend applications.

AOPBackoffJava
0 likes · 20 min read
Mastering Spring Retry: Deep Dive into Retry and Back‑off Strategies
Top Architect
Top Architect
Nov 30, 2020 · Backend Development

Understanding AOP in Spring: Concepts, Annotations, and Practical Examples

This article explains the fundamentals of Aspect‑Oriented Programming (AOP) in Spring, describes its core concepts and terminology, and provides step‑by‑step code examples for creating pointcuts, advices, and custom annotations, while also detailing the use of common AOP annotations such as @Pointcut, @Around, @Before, @After, @AfterReturning and @AfterThrowing.

AOPJavaaspect-oriented-programming
0 likes · 19 min read
Understanding AOP in Spring: Concepts, Annotations, and Practical Examples
Su San Talks Tech
Su San Talks Tech
Nov 30, 2020 · Backend Development

How to Tame Large Transactions in Spring: 6 Proven Strategies

This article shares practical techniques for handling large transactions in Spring-based backend systems, covering why @Transactional can cause issues, how to use programmatic transactions, move queries outside transactions, avoid remote calls, limit data volume, execute non‑transactional operations, and leverage asynchronous processing.

Declarative TransactionLarge TransactionsProgrammatic Transaction
0 likes · 10 min read
How to Tame Large Transactions in Spring: 6 Proven Strategies
Top Architect
Top Architect
Nov 25, 2020 · Databases

Understanding MyBatis Transaction Mechanisms and JDBC Transaction Behavior

This article explains the real JDBC transaction methods, clarifies common misconceptions about transaction states in MyBatis, details the MyBatis Transaction and TransactionFactory interfaces, and explores special scenarios such as auto‑commit false, missing commit or close, with concrete code examples.

DatabaseJDBCJava
0 likes · 10 min read
Understanding MyBatis Transaction Mechanisms and JDBC Transaction Behavior
Top Architect
Top Architect
Nov 22, 2020 · Backend Development

Spring vs Spring Boot: Core Differences, Configuration, and Deployment Guide

This article compares Spring and Spring Boot, explaining their fundamental concepts, Maven dependencies, MVC and security configurations, template engine setup, startup mechanisms, and packaging options, while providing practical code examples to help Java developers choose and migrate between the two frameworks.

ConfigurationJavaMaven
0 likes · 12 min read
Spring vs Spring Boot: Core Differences, Configuration, and Deployment Guide
JavaEdge
JavaEdge
Nov 20, 2020 · Backend Development

Why Java Annotations Don't Inherit to Subclass Methods and How to Work Around It

This article explains the limits of annotation inheritance in Java, demonstrates why subclass methods cannot automatically inherit parent annotations, and shows how to use @Inherited, Spring's AnnotatedElementUtils, and find/get semantics to retrieve inherited annotations effectively.

@InheritedAnnotatedElementUtilsJava
0 likes · 6 min read
Why Java Annotations Don't Inherit to Subclass Methods and How to Work Around It
Java Backend Technology
Java Backend Technology
Nov 19, 2020 · Backend Development

Why Long Database Transactions Crash Services and How to Prevent Them

The article explains how long‑running database transactions can exhaust connection pools, block threads, and cause widespread service failures, then offers practical strategies—including keeping transactions short, removing RPC calls, enhancing monitoring, and reviewing code—to detect and prevent these high‑risk issues.

Backend Performancedatabase-connection-poollong transactions
0 likes · 7 min read
Why Long Database Transactions Crash Services and How to Prevent Them
IT Xianyu
IT Xianyu
Nov 18, 2020 · Backend Development

Understanding Spring Framework: Core Concepts, Advantages, and Bean Management

This article provides a comprehensive overview of the Spring framework, explaining its IoC and AOP core, architectural layers, key advantages such as decoupling and declarative transactions, bean scopes, lifecycle settings, and practical object‑creation methods for Java backend development.

Bean ScopeIoCJava
0 likes · 7 min read
Understanding Spring Framework: Core Concepts, Advantages, and Bean Management
Programmer DD
Programmer DD
Nov 11, 2020 · Backend Development

BeanFactory vs ApplicationContext: When to Choose Each in Spring

Spring provides two IoC containers—BeanFactory and ApplicationContext—each with distinct loading strategies, features, and registration behaviors; this article demonstrates their differences through practical code examples, highlighting lazy versus eager loading, automatic post‑processor registration, and why ApplicationContext is generally preferred for enterprise applications.

ApplicationContextBeanFactoryIoC
0 likes · 9 min read
BeanFactory vs ApplicationContext: When to Choose Each in Spring
Xianyu Technology
Xianyu Technology
Nov 5, 2020 · Backend Development

Accelerating Build, Deployment, and Startup for Java Backend Applications

By profiling the idle‑local Java backend, the author cut build, deployment, and startup times by over 30 seconds per cycle through asynchronous Spring bean initialization, selective dependency pruning, layered Docker image construction, and streamlined shutdown, demonstrating a comprehensive, reusable optimization strategy for faster releases.

Build OptimizationCI/CDDocker
0 likes · 13 min read
Accelerating Build, Deployment, and Startup for Java Backend Applications
Top Architect
Top Architect
Nov 3, 2020 · Backend Development

Do Service and DAO Layers Need Interfaces? When to Use Them in Spring Projects

This article examines whether every Service and DAO class in a Spring‑based backend should implement an interface, evaluates the common arguments for using interfaces, explains why they often do not hold up, and proposes practical structuring and development approaches for projects that may or may not need multiple implementations.

DAOJavaService Layer
0 likes · 9 min read
Do Service and DAO Layers Need Interfaces? When to Use Them in Spring Projects
Java Backend Technology
Java Backend Technology
Oct 31, 2020 · Backend Development

Mastering Java Exceptions and @Transactional: When Do Transactions Roll Back?

This article explains Java exception categories, distinguishing checked from unchecked exceptions, and shows how Spring's @Transactional annotation controls transaction rollbacks, including configurations for rolling back on checked exceptions, preventing rollback on unchecked ones, and best practices for applying @Transactional in backend services.

Javaexception handlingspring
0 likes · 5 min read
Mastering Java Exceptions and @Transactional: When Do Transactions Roll Back?
Laravel Tech Community
Laravel Tech Community
Oct 28, 2020 · Backend Development

Grails 4.0.5 Release: New Features, Updates, and Improvements

Grails 4.0.5 has been released, introducing new features such as enhanced REST API configuration, plugin.groovy loading, performance optimizations, and updates to Micronaut, Spring, SpringBoot, and GORM Datastore, along with improved documentation and resolved issues.

GrailsGroovyhibernate
0 likes · 2 min read
Grails 4.0.5 Release: New Features, Updates, and Improvements
Architect's Tech Stack
Architect's Tech Stack
Oct 27, 2020 · Backend Development

Differences Between Spring and Spring Boot: Configuration, MVC, Security, and Deployment

This article explains the fundamental differences between Spring and Spring Boot, covering their core concepts, configuration methods, MVC setup, template engine integration, security configuration, bootstrapping mechanisms, and packaging/deployment options, with detailed code examples for each aspect.

MavenSpring BootWeb Development
0 likes · 10 min read
Differences Between Spring and Spring Boot: Configuration, MVC, Security, and Deployment
Top Architect
Top Architect
Oct 24, 2020 · Backend Development

Designing a Unified API Response Format for Java Backend Services

This article explains how to create a consistent JSON response structure for Java backend APIs, covering status‑code conventions, a Result wrapper class, static helper methods, a custom @ResponseResult annotation, response‑body advice, and tips for simplifying controller code and handling exceptions.

API designJavaannotations
0 likes · 7 min read
Designing a Unified API Response Format for Java Backend Services
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Oct 20, 2020 · Backend Development

Programmatic vs Declarative Transactions in Spring: Advantages, Pitfalls, and Recommendations

This article compares Spring's programmatic and declarative transaction management, explains how each works with code examples, outlines the benefits and limitations of declarative transactions—including granularity and failure scenarios—and argues why developers should consider programmatic transactions for clearer control and fewer hidden bugs.

AOPDeclarative TransactionJava
0 likes · 8 min read
Programmatic vs Declarative Transactions in Spring: Advantages, Pitfalls, and Recommendations
Top Architect
Top Architect
Oct 18, 2020 · Backend Development

Understanding Spring @Enable Annotation Logic and the Role of ConfigurationClassPostProcessor

This article explains how Spring's @Enable annotations are driven by @Import, walks through the entry points in spring.handlers, details the processing flow of ConfigurationClassPostProcessor, distinguishes full and lightweight configuration modes, and describes the CGLIB enhancement that ensures proper @Bean method semantics.

BeanDefinitionCGLIBJava
0 likes · 10 min read
Understanding Spring @Enable Annotation Logic and the Role of ConfigurationClassPostProcessor
Top Architect
Top Architect
Oct 12, 2020 · Backend Development

Comprehensive Guide to Common Spring Framework Annotations

This article provides a comprehensive overview of the most commonly used Spring Framework annotations, including core, stereotype, Spring Boot, MVC/REST, data access, scheduling, and testing annotations, with explanations and code examples illustrating their usage in Java backend development.

DependencyInjectionJavaSpringBoot
0 likes · 12 min read
Comprehensive Guide to Common Spring Framework Annotations
JavaEdge
JavaEdge
Oct 10, 2020 · Fundamentals

Why High‑Level Modules Should Depend on Abstractions: Mastering Dependency Inversion

This article explains the Dependency Inversion Principle, shows why traditional layered architectures suffer from maintenance and reuse problems, provides concrete Java and web examples, and demonstrates how refactoring to abstract interfaces resolves these issues for more flexible, decoupled software design.

Dependency InversionDesign PrinciplesJava
0 likes · 9 min read
Why High‑Level Modules Should Depend on Abstractions: Mastering Dependency Inversion
IT Xianyu
IT Xianyu
Oct 8, 2020 · Backend Development

Overview of Spring, Spring MVC, Spring Boot, and Spring Cloud

This article introduces Spring as a lightweight IoC and AOP container, explains Spring MVC as its web framework, describes Spring Boot's convention‑over‑configuration approach to simplify setup, and outlines how Spring Cloud builds on Spring Boot to provide micro‑service governance.

JavaSpringCloudSpringMVC
0 likes · 3 min read
Overview of Spring, Spring MVC, Spring Boot, and Spring Cloud
Top Architect
Top Architect
Oct 5, 2020 · Backend Development

Deep Dive into Spring Framework Container Startup: Constructor, BeanFactory, Reader, and Scanner Initialization

This article walks through the Spring Framework container startup process, explaining how the AnnotationConfigApplicationContext constructor prepares the environment, registers readers and scanners, initializes the BeanFactory, sets up condition evaluators and post‑processors, and outlines the default filters used for component scanning.

AnnotationConfigApplicationContextBeanFactoryJava
0 likes · 15 min read
Deep Dive into Spring Framework Container Startup: Constructor, BeanFactory, Reader, and Scanner Initialization
ITPUB
ITPUB
Sep 29, 2020 · Backend Development

Why Spring WebFlux Matters: Moving Beyond Servlet‑Based MVC

This article explains how Spring WebFlux, built on the Reactor project, provides a reactive, non‑blocking alternative to traditional Servlet‑based Spring MVC, detailing its advantages, limitations, and the considerations developers must evaluate before adopting it.

JavaReactive ProgrammingWebFlux
0 likes · 9 min read
Why Spring WebFlux Matters: Moving Beyond Servlet‑Based MVC
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Sep 26, 2020 · Fundamentals

Understanding Factory Patterns: Simple Factory, Factory Method, and Abstract Factory with Spring Dependency Injection

This article explains the three common factory design patterns—simple factory, factory method, and abstract factory—illustrates their Java implementations with product and factory classes, demonstrates client usage, and shows how Spring's dependency injection can replace manual factory instantiation, providing a comprehensive guide for developers.

Abstract FactoryDesign PatternsFactory Pattern
0 likes · 7 min read
Understanding Factory Patterns: Simple Factory, Factory Method, and Abstract Factory with Spring Dependency Injection
Selected Java Interview Questions
Selected Java Interview Questions
Sep 21, 2020 · Backend Development

Understanding Spring Framework Core Interfaces and Bean Lifecycle from Source Code

This article explains the core interfaces of the Spring Framework, such as BeanDefinition, BeanFactory, ApplicationContext, and BeanPostProcessor, and walks through the bean creation process—including refresh, preInstantiateSingletons, getBean, and the three‑level singleton caches—providing detailed code examples and insights into how Spring resolves circular dependencies.

Bean LifecycleJavadependency injection
0 likes · 28 min read
Understanding Spring Framework Core Interfaces and Bean Lifecycle from Source Code
JavaEdge
JavaEdge
Sep 19, 2020 · Backend Development

Mastering Spring Bean Definitions: Naming, Aliases, and Instantiation

Learn how Spring stores bean metadata, the structure of BeanDefinition, naming conventions, alias configuration, and various bean instantiation methods—including constructors, static and instance factory methods—while also discovering how to determine a bean's runtime type using BeanFactory.getType.

BeanDefinitionJavabackend
0 likes · 11 min read
Mastering Spring Bean Definitions: Naming, Aliases, and Instantiation
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Sep 14, 2020 · Backend Development

Implementing Spring Event‑Driven Architecture with Asynchronous Listeners

This article explains how to use Spring's event‑driven mechanism to decouple business operations such as saving a product and sending notifications, showing step‑by‑step code for custom events, publishing, asynchronous listeners, and custom thread‑pool configuration to improve resilience and maintainability.

Javabackendevent-driven
0 likes · 5 min read
Implementing Spring Event‑Driven Architecture with Asynchronous Listeners
Top Architect
Top Architect
Sep 12, 2020 · Backend Development

Key Considerations for Building a Generic TCC Distributed Transaction Framework

This article explains the essential design principles of a TCC (Try‑Confirm‑Cancel) distributed transaction framework, covering the necessity of RM local transactions, integration with Spring's TransactionManager, fault‑recovery mechanisms, idempotency guarantees, and handling of parallel Try/Confirm/Cancel operations.

Distributed TransactionsTCCTransactionManager
0 likes · 22 min read
Key Considerations for Building a Generic TCC Distributed Transaction Framework
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Sep 9, 2020 · Fundamentals

Understanding the Template Method Design Pattern with Java Examples

This article explains the Template Method design pattern, illustrating its structure with Java code examples—including an abstract Drinks class, concrete Tea and Coffee subclasses, hook methods, and real‑world usages in JDK sorting and Spring's application context—while highlighting advantages, drawbacks, and typical scenarios.

Design PatternHook MethodJava
0 likes · 12 min read
Understanding the Template Method Design Pattern with Java Examples
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Sep 7, 2020 · Backend Development

Understanding and Resolving Circular Dependencies in Spring Framework

This article explains the concept of circular dependencies in Spring, reviews related fundamentals, demonstrates how Spring's three-level cache resolves singleton circular references, discusses limitations with prototype and constructor injection, and provides code examples and detailed source analysis for developers.

AOPBeanCircular Dependency
0 likes · 22 min read
Understanding and Resolving Circular Dependencies in Spring Framework
Top Architect
Top Architect
Sep 6, 2020 · Backend Development

Understanding Spring @Transactional: Common Pitfalls and Proper Usage

This article explains how Spring's @Transactional annotation works, common pitfalls such as using it on private methods, and the correct ways to configure propagation, isolation, and bean injection to ensure proper transaction rollback and non‑rollback behavior.

AOPAnnotationJava
0 likes · 8 min read
Understanding Spring @Transactional: Common Pitfalls and Proper Usage
The Dominant Programmer
The Dominant Programmer
Sep 4, 2020 · Backend Development

Using SpringBoot’s MessageSource.getMessage for Easy i18n Localization

SpringBoot supports internationalization out of the box; by creating a messages.properties file under resources, configuring the basename in application.yml, and using a MessageUtils wrapper that retrieves MessageSource via SpringUtils, developers can fetch localized messages with a single method call.

Utilityi18nlocalization
0 likes · 6 min read
Using SpringBoot’s MessageSource.getMessage for Easy i18n Localization
Top Architect
Top Architect
Aug 30, 2020 · Backend Development

Using Spring Cache with Redis for Efficient Data Caching in Java Applications

This article explains how to accelerate service response by integrating Redis as a key‑value cache with Spring Cache, covering the three‑step implementation, required Maven dependencies, XML configuration, property settings, a custom Cache implementation class, and common Spring Cache annotations.

AOPCacheJava
0 likes · 12 min read
Using Spring Cache with Redis for Efficient Data Caching in Java Applications
Programmer DD
Programmer DD
Aug 28, 2020 · Backend Development

Master Spring Validation: Best Practices and Advanced Techniques

This article provides a comprehensive guide to Spring Validation, covering basic usage, dependency setup, requestBody and requestParam validation, group and nested validation, collection checks, custom constraints, programmatic validation, fail‑fast configuration, and the underlying implementation mechanisms within Spring MVC and Hibernate Validator.

Validationbackendhibernate
0 likes · 17 min read
Master Spring Validation: Best Practices and Advanced Techniques
Su San Talks Tech
Su San Talks Tech
Aug 27, 2020 · Backend Development

Unveiling Spring Transaction Mechanics: From Annotations to Core Interceptors

This article dives deep into Spring's transaction infrastructure, explaining how @EnableTransactionManagement activates transaction support, detailing the roles of key configuration classes, core interceptors, transaction attribute resolution, propagation behaviors, and the commit‑and‑rollback processes that power reliable data operations in Spring and Spring Boot applications.

AOPSpringBootbackend
0 likes · 32 min read
Unveiling Spring Transaction Mechanics: From Annotations to Core Interceptors
Top Architect
Top Architect
Aug 22, 2020 · Backend Development

Comprehensive Guide to Spring Validation: Usage, Advanced Features, and Implementation Principles

This article provides a thorough tutorial on Spring Validation, covering basic usage with requestBody and requestParam, dependency setup, group, nested, collection and custom validations, programmatic validation, fail‑fast mode, differences between @Valid and @Validated, as well as the underlying implementation mechanisms in Spring MVC and method‑level AOP validation.

APIHibernate ValidatorJava
0 likes · 17 min read
Comprehensive Guide to Spring Validation: Usage, Advanced Features, and Implementation Principles
Programmer DD
Programmer DD
Aug 19, 2020 · Backend Development

Unlocking Spring’s @Async: Deep Dive into Mechanics, Pitfalls, and Solutions

This article explores Spring’s @Async annotation in depth, detailing its basic usage, underlying proxy creation, pointcut logic, and asynchronous execution, while highlighting common issues such as circular dependencies and inefficient default thread pools, and providing practical solutions like lazy injection and custom executors.

AOPDependencyInjectionThreadPool
0 likes · 15 min read
Unlocking Spring’s @Async: Deep Dive into Mechanics, Pitfalls, and Solutions
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Aug 18, 2020 · Backend Development

Implementing Scheduled Tasks in Java: Timer, ScheduledExecutorService, Spring Task, and Distributed Approaches

This article explains several ways to implement scheduled tasks in Java, covering the simple Timer class, the more robust ScheduledExecutorService, Spring's @Scheduled annotation, and distributed solutions using Redis ZSet and key‑space notifications, with code examples and practical considerations.

JavaRedisScheduled Tasks
0 likes · 16 min read
Implementing Scheduled Tasks in Java: Timer, ScheduledExecutorService, Spring Task, and Distributed Approaches
Java Backend Technology
Java Backend Technology
Aug 18, 2020 · Backend Development

Why Spring Controllers Are Not Thread‑Safe and How to Fix Them

Spring MVC controllers are singleton by default, which can cause thread‑unsafe behavior when using non‑static member variables; this article demonstrates the issue with example endpoints, shows how prototype scope resolves it, and outlines best practices such as avoiding stateful fields or using ThreadLocal.

Bean ScopeControllerJava
0 likes · 5 min read
Why Spring Controllers Are Not Thread‑Safe and How to Fix Them
Programmer DD
Programmer DD
Aug 11, 2020 · Backend Development

Mastering Spring’s Circular Dependency: How the Three-Level Cache Solves Bean Loops

This article explains Spring's circular dependency problem, the conditions under which it can be resolved, and how Spring's three‑level cache—combined with AOP proxy handling—enables beans to reference each other without causing creation failures, providing a comprehensive answer for interview scenarios.

AOPBean LifecycleCircular Dependency
0 likes · 18 min read
Mastering Spring’s Circular Dependency: How the Three-Level Cache Solves Bean Loops
Programmer DD
Programmer DD
Aug 6, 2020 · Backend Development

When to Use @Validated vs @Valid for Nested Validation in Spring

This article explains the differences between Spring's @Validated and the standard @Valid annotations, covering grouping support, where each can be applied, and how to enable nested validation for complex objects in controller parameters.

Nested ValidationValidationannotations
0 likes · 6 min read
When to Use @Validated vs @Valid for Nested Validation in Spring
Programmer DD
Programmer DD
Aug 6, 2020 · Backend Development

Mastering Spring @Transactional: Exception Types and Rollback Strategies

This article explains Java exception classifications, how Spring's @Transactional handles checked and unchecked exceptions, and provides practical configurations to control transaction rollbacks, while offering best‑practice notes on annotation placement and method design.

Transactionalexception handlingspring
0 likes · 6 min read
Mastering Spring @Transactional: Exception Types and Rollback Strategies
Programmer DD
Programmer DD
Jul 30, 2020 · Backend Development

When to Use Apache vs Spring BeanUtils for Java Object Copying

This article explains the differences between Apache BeanUtils and Spring BeanUtils for copying Java objects, covering shallow vs deep copy concepts, performance drawbacks of Apache's implementation, usage examples, and recommendations for alternative tools like CGLIB BeanCopier and Orika.

ApacheBeanUtilsDeepCopy
0 likes · 9 min read
When to Use Apache vs Spring BeanUtils for Java Object Copying
Selected Java Interview Questions
Selected Java Interview Questions
Jul 27, 2020 · Backend Development

Understanding Spring Controller Scope and Thread Safety

The article explains why Spring MVC controllers are singleton by default, demonstrates the resulting thread‑unsafe behavior with example code, shows how applying @Scope("prototype") makes them prototype scoped, and provides best‑practice recommendations and a summary of Spring bean scopes.

BeanControllerPrototype
0 likes · 5 min read
Understanding Spring Controller Scope and Thread Safety
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Jul 27, 2020 · Backend Development

Detailed Guide to Using @EnableAsync and @Async for Asynchronous Bean Method Execution in Spring

This article provides a comprehensive explanation of Spring's @EnableAsync and @Async annotations, covering their purpose, usage steps, handling of return values, custom thread‑pool configuration, exception handling, thread‑pool isolation, and the underlying AOP mechanism, supplemented with complete code examples.

JavaThreadPoolasync
0 likes · 18 min read
Detailed Guide to Using @EnableAsync and @Async for Asynchronous Bean Method Execution in Spring
Programmer DD
Programmer DD
Jul 27, 2020 · Backend Development

Why MyBatis Outperforms Hibernate for Modern Java Back‑End Projects

The article examines a Spring‑related Twitter poll, Google Trends, and Stack Overflow statistics to compare MyBatis, Hibernate, and JPA, then argues that MyBatis’ simplicity and flexibility make it better suited for today’s fast‑paced backend development.

MyBatisORMhibernate
0 likes · 5 min read
Why MyBatis Outperforms Hibernate for Modern Java Back‑End Projects
Programmer DD
Programmer DD
Jul 26, 2020 · Backend Development

How Does Spring Parse @Component and @Service Annotations? A Deep Dive

This article explains the internal workflow of Spring's annotation processing, detailing how @Component and its specializations like @Service are discovered through XML namespace handlers, classpath scanning, metadata readers, and meta‑annotation handling, complete with code excerpts and step‑by‑step analysis.

Annotation Processingcomponent scanningspring
0 likes · 12 min read
How Does Spring Parse @Component and @Service Annotations? A Deep Dive