Tagged articles

Spring

1874 articles · Page 13 of 19
JavaEdge
JavaEdge
Mar 29, 2022 · Information Security

How to Detect and Fix the Spring SPEL Remote Code Execution Vulnerability

This guide explains the Spring SPEL injection flaw, how to determine if your Java application is affected by checking JDK version and Spring usage in WAR or JAR packages, and provides official upgrade steps along with temporary WAF and code‑level mitigations.

DetectionJavaRCE
0 likes · 5 min read
How to Detect and Fix the Spring SPEL Remote Code Execution Vulnerability
IT Services Circle
IT Services Circle
Mar 27, 2022 · Backend Development

Resolving OpenFeign Asynchronous Call Failures by Propagating Request Context

This article explains why OpenFeign asynchronous calls fail due to lost request context, demonstrates a RequestInterceptor to propagate JWT tokens, and shows how to capture and set RequestAttributes in CompletableFuture tasks so that async Feign calls succeed without triggering Sentinel degradation.

JavaOpenFeignRequestContextHolder
0 likes · 5 min read
Resolving OpenFeign Asynchronous Call Failures by Propagating Request Context
Selected Java Interview Questions
Selected Java Interview Questions
Mar 26, 2022 · Backend Development

Comparison of @Resource and @Autowired for Bean Injection in Spring

This article explains the similarities and differences between Spring's @Autowired and the JSR‑250 @Resource annotations, covering their packages, injection mechanisms, usage on fields and setters, configuration options, IDE warnings, and best‑practice recommendations for bean injection in Java backend development.

Dependency InjectionSpringannotations
0 likes · 6 min read
Comparison of @Resource and @Autowired for Bean Injection in Spring
Yang Money Pot Technology Team
Yang Money Pot Technology Team
Mar 25, 2022 · Backend Development

Why WebSocket? Advantages, Comparison, and STOMP on Spring WebSocket

This article explains the limitations of HTTP for real‑time communication, compares WebSocket with polling, long‑polling, streaming and SSE, outlines WebSocket's benefits and typical use cases, and then details how STOMP complements WebSocket within Spring's messaging framework, including configuration and message flow.

MessageBrokerSTOMPSpring
0 likes · 27 min read
Why WebSocket? Advantages, Comparison, and STOMP on Spring WebSocket
Sohu Tech Products
Sohu Tech Products
Mar 23, 2022 · Backend Development

Building a Simple Spring IOC Container: XML and Annotation‑Based Bean Assembly

This article demonstrates how to create a lightweight Spring‑style IoC container in Java by parsing a properties file for XML‑like configuration, implementing annotation‑driven bean registration with a custom @Bean annotation, and adding automatic field injection using a custom @Autowired annotation, complete with full source code examples.

Dependency InjectionIOCJava
0 likes · 11 min read
Building a Simple Spring IOC Container: XML and Annotation‑Based Bean Assembly
Top Architect
Top Architect
Mar 21, 2022 · Backend Development

How Spring Resolves Bean Circular Dependencies with a Three‑Level Cache

This article explains Spring's bean lifecycle, the three‑level cache mechanism (singletonObjects, earlySingletonObjects, singletonFactories) used to break circular dependencies, the role of Aware interfaces and BeanPostProcessor, and why a second‑level cache is essential when AOP proxies are involved.

AOPBackend DevelopmentBean Lifecycle
0 likes · 9 min read
How Spring Resolves Bean Circular Dependencies with a Three‑Level Cache
Java High-Performance Architecture
Java High-Performance Architecture
Mar 21, 2022 · Backend Development

Boost Spring Cache Performance with Custom Annotations and a SCAN‑Based RedisCacheWriter

This article explains how to enhance Spring Cache by creating custom cache annotations, replacing the costly KEYS command with SCAN in a rewritten DefaultRedisCacheWriter, and dynamically registering RedisCacheManager beans to support per‑module TTL and transaction‑aware caching, all illustrated with full Java code examples.

BackendJavaRedis
0 likes · 28 min read
Boost Spring Cache Performance with Custom Annotations and a SCAN‑Based RedisCacheWriter
Top Architect
Top Architect
Mar 20, 2022 · Backend Development

Understanding Spring's @Transactional Annotation and Its AOP Implementation

This article explains how Spring's @Transactional annotation works by leveraging AOP and dynamic proxies, detailing the bean post‑processor, pointcut definition, proxy creation, interceptor chain, TransactionInterceptor logic, and the transaction commit/rollback process with illustrative code snippets and diagrams.

@TransactionalAOPJava
0 likes · 9 min read
Understanding Spring's @Transactional Annotation and Its AOP Implementation
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Mar 20, 2022 · Backend Development

Java News: JDK 18/19 Updates, Spring Framework Releases, New Value Objects JEP

This roundup covers recent Java ecosystem developments, including the promotion of the Value Objects (Preview) JEP to candidate status, release notes for JDK 18 and early‑access JDK 19 builds, multiple Spring project updates such as Spring Boot 2.7.0‑M1, Spring Data 3.0‑M2 with ListCrudRepository, Spring Security enhancements, as well as Quarkus 2.7.2.Final and a new early‑access version of JReleaser adding Windows resources to jpackage.

BackendJDKJava
0 likes · 7 min read
Java News: JDK 18/19 Updates, Spring Framework Releases, New Value Objects JEP
macrozheng
macrozheng
Mar 18, 2022 · Backend Development

How Spring Solves Circular Dependencies: Deep Dive into Three-Level Caches

This article explains why Spring’s circular dependency problem only occurs with singleton beans, how constructor versus setter injection affects resolution, and why Spring uses a three‑level cache (singletonObjects, earlySingletonObjects, singletonFactories) to expose incomplete beans and support proxy creation without breaking the bean lifecycle.

SpringThree-Level Cachesingleton
0 likes · 12 min read
How Spring Solves Circular Dependencies: Deep Dive into Three-Level Caches
Meituan Technology Team
Meituan Technology Team
Mar 17, 2022 · Backend Development

Sonic: Meituan's Hot Deployment IDEA Plugin – Architecture and Implementation

The article details Meituan's internal Sonic IDEA plugin for remote and local hot deployment, explaining why hot deployment is needed, its architecture, instrumentation techniques, DCEVM integration, file‑watching, class reloading, and support for Spring Bean, Spring XML and MyBatis, along with adoption statistics and performance benefits.

DCEVMHot DeploymentIDEA Plugin
0 likes · 19 min read
Sonic: Meituan's Hot Deployment IDEA Plugin – Architecture and Implementation
Java High-Performance Architecture
Java High-Performance Architecture
Mar 17, 2022 · Backend Development

Mastering MyBatis Streaming Queries: Reduce Memory Usage and Avoid Cursor Closure Errors

This article explains what streaming queries are, why they save memory compared to pagination, details the MyBatis Cursor interface and its methods, demonstrates how to implement streaming queries with code examples, and presents three solutions—using SqlSessionFactory, TransactionTemplate, and @Transactional—to keep the database connection open and prevent cursor‑closed errors.

CursorJavaMyBatis
0 likes · 7 min read
Mastering MyBatis Streaming Queries: Reduce Memory Usage and Avoid Cursor Closure Errors
Sohu Tech Products
Sohu Tech Products
Mar 16, 2022 · Backend Development

Enabling Spring @Async to Support Placeholders and SpEL Expressions

This article explains how to modify Spring's @Async annotation so that its value attribute can resolve placeholders or SpEL expressions, demonstrates a working demo, shows the required code changes using EmbeddedValueResolver, and shares debugging tricks and related Java language features.

@AsyncJDKJava
0 likes · 14 min read
Enabling Spring @Async to Support Placeholders and SpEL Expressions
macrozheng
macrozheng
Mar 16, 2022 · Backend Development

Build a Mini Spring IoC Container in 5 Minutes: Hands‑On Tutorial

This article walks through the fundamentals of Spring’s IoC container by manually implementing a lightweight version, covering concepts such as IOC, DI, bean definitions, resource loading, bean registration, and a simple BeanFactory with example code and a test demonstrating singleton caching.

Backend DevelopmentBeanFactoryDependency Injection
0 likes · 10 min read
Build a Mini Spring IoC Container in 5 Minutes: Hands‑On Tutorial
Java Captain
Java Captain
Mar 15, 2022 · Backend Development

Why Enterprise Java Projects Turn Into Over‑Engineered Monsters

The article sarcastically critiques the over‑engineered nature of enterprise Java projects, illustrating how simple tasks become tangled in excessive classes, interfaces, factories, dependency‑injection frameworks, XML configurations, massive JARs, and IDE bloat, ultimately leading to deployment failures due to environment mismatches.

Dependency InjectionDesign PatternsJava
0 likes · 5 min read
Why Enterprise Java Projects Turn Into Over‑Engineered Monsters
Top Architect
Top Architect
Mar 14, 2022 · Backend Development

Understanding Spring Controller Scope: Singleton vs Prototype and Best Practices

This article explains why Spring MVC controllers are singleton by default, demonstrates the thread‑unsafe behavior of using instance fields, shows how applying @Scope("prototype") changes the behavior, and provides practical recommendations such as avoiding mutable fields, using prototype scope or ThreadLocal for safe controller design.

ControllerJavaSpring
0 likes · 6 min read
Understanding Spring Controller Scope: Singleton vs Prototype and Best Practices
Cognitive Technology Team
Cognitive Technology Team
Mar 13, 2022 · Backend Development

Understanding Synchronous vs Asynchronous Event Execution in Spring's SimpleApplicationEventMulticaster

After upgrading a core component, a previously synchronous domain event in Spring became asynchronous, causing runtime errors; this article explains the underlying mechanism, shows the relevant source code of SimpleApplicationEventMulticaster, and clarifies how the presence or absence of a configured thread pool determines whether events are processed synchronously or asynchronously.

EventJavaSpring
0 likes · 3 min read
Understanding Synchronous vs Asynchronous Event Execution in Spring's SimpleApplicationEventMulticaster
转转QA
转转QA
Mar 10, 2022 · Backend Development

Automated Post‑Deployment Interface Testing Using TestNG, Spring and MQ Integration

The article describes a solution that automatically triggers interface test cases after a service deployment by listening to deployment‑success MQ messages, dynamically invoking TestNG with service‑specific IPs, and integrating Spring bean registration to simplify test code while handling dynamic nodes, reporting, and common pitfalls.

BeanFactoryJavaMQ
0 likes · 11 min read
Automated Post‑Deployment Interface Testing Using TestNG, Spring and MQ Integration
macrozheng
macrozheng
Mar 10, 2022 · Backend Development

Master Spring Annotations: @Component vs @Bean, @Autowired vs @Resource, @ControllerAdvice

This article explains several often‑confused Spring annotations—including the differences between @Component and @Bean, the injection behaviors of @Autowired versus @Resource, the roles of @Component, @Repository, @Service, and @Controller, the purpose of @Configuration and @ControllerAdvice, and provides practical code examples for each.

Dependency InjectionJavaSpring
0 likes · 11 min read
Master Spring Annotations: @Component vs @Bean, @Autowired vs @Resource, @ControllerAdvice
Code Ape Tech Column
Code Ape Tech Column
Mar 10, 2022 · Backend Development

10 Common Pitfalls in Java Concurrency and How to Avoid Them

This article outlines ten typical concurrency pitfalls in Java—including SimpleDateFormat thread‑safety, double‑checked locking flaws, volatile atomicity limits, deadlocks, lock release issues, HashMap race conditions, default thread‑pool misuse, @Async thread explosion, spin‑lock CPU waste, and ThreadLocal memory leaks—providing explanations, code examples, and practical solutions for each.

JavaSpringThread Safety
0 likes · 20 min read
10 Common Pitfalls in Java Concurrency and How to Avoid Them
Sohu Tech Products
Sohu Tech Products
Mar 9, 2022 · Backend Development

Understanding the Spring Transaction Rollback Bug and Its Resolution

This article analyzes a Spring transaction rollback issue caused by the use of pattern‑based exception matching, explains why certain custom exceptions trigger unexpected rollbacks, traces the problem through source code and GitHub issues, and describes how the Spring team fixed it with type‑safe rollback rules and documentation updates.

BackendJavaSpring
0 likes · 22 min read
Understanding the Spring Transaction Rollback Bug and Its Resolution
Top Architect
Top Architect
Mar 9, 2022 · Backend Development

Deep Dive into Spring Bean Lifecycle and Initialization Process

This article provides a comprehensive analysis of Spring's bean lifecycle, detailing the refresh method steps, post‑processor ordering, bean creation, dependency injection via @Autowired and @Resource, Aware callbacks, and initialization hooks such as @PostConstruct and init‑method.

Bean LifecycleDependency InjectionJava
0 likes · 24 min read
Deep Dive into Spring Bean Lifecycle and Initialization Process
Java Tech Enthusiast
Java Tech Enthusiast
Mar 9, 2022 · Backend Development

Annotation‑Based Bean Management and Dependency Injection in Spring

Spring’s annotation‑based bean registration and dependency injection replace verbose XML by using component scanning with @Component, @Controller, @Service, and @Repository, while @Autowired (or @Qualifier/@Primary) injects beans by type, @Resource supports name‑based injection, and @Value together with @PropertySource loads external configuration, though developers must handle issues such as NoUniqueBeanDefinitionException when multiple candidates exist.

@QualifierDependency InjectionJava
0 likes · 8 min read
Annotation‑Based Bean Management and Dependency Injection in Spring
Code Ape Tech Column
Code Ape Tech Column
Mar 9, 2022 · Backend Development

Eliminating Code Duplication in Business Logic with Design Patterns, Annotations, Reflection, and Bean Mapping

This article explains how to reduce repetitive business‑level Java code by applying the Template Method and Factory patterns, leveraging custom annotations with reflection, and using bean‑mapping utilities, thereby improving maintainability, extensibility, and overall code quality.

Design PatternsJavaReflection
0 likes · 20 min read
Eliminating Code Duplication in Business Logic with Design Patterns, Annotations, Reflection, and Bean Mapping
JavaEdge
JavaEdge
Mar 8, 2022 · Backend Development

Spring Framework 6.x Release: Key Changes and Migration Guide

Spring Framework 6.x has been officially released, introducing Jakarta EE‑based packages for core annotations, requiring Hibernate‑Core‑Jakarta upgrades, updating servlet containers to Tomcat 10/Jetty 11/Undertow 2.2.14, and altering Web MVC/WebFlux behavior, with detailed migration steps and reference links.

BackendJakarta EEJava
0 likes · 4 min read
Spring Framework 6.x Release: Key Changes and Migration Guide
macrozheng
macrozheng
Mar 8, 2022 · Backend Development

Master Spring RestTemplate: Simplify HTTP Calls and File Transfers in Java

This tutorial walks through using Spring's RestTemplate to replace complex HttpURLConnection and Apache HttpClient code, covering environment setup, bean configuration, GET/POST/PUT/DELETE operations, file upload/download, and advanced exchange usage with clear Java examples.

APIHTTPJava
0 likes · 19 min read
Master Spring RestTemplate: Simplify HTTP Calls and File Transfers in Java
NiuNiu MaTe
NiuNiu MaTe
Mar 8, 2022 · Backend Development

How a Junior Engineer Landed a Tencent Backend Offer: Interview Experience & Tips

This article shares a junior engineer's detailed journey of securing a backend engineering offer at Tencent, covering three interview rounds, key technical topics like Spring, HashMap, Elasticsearch, Redis, and personal reflections on strengths, weaknesses, and preparation strategies.

Backend DevelopmentElasticsearchInterview Experience
0 likes · 5 min read
How a Junior Engineer Landed a Tencent Backend Offer: Interview Experience & Tips
Top Architect
Top Architect
Mar 1, 2022 · Backend Development

Spring Framework Utility Classes Overview: Assert, ObjectUtils, StringUtils, CollectionUtils, FileCopyUtils, ResourceUtils, StreamUtils, ReflectionUtils, AopUtils

This article provides a comprehensive reference of Spring Framework utility classes—including Assert, ObjectUtils, StringUtils, CollectionUtils, FileCopyUtils, ResourceUtils, StreamUtils, ReflectionUtils, and AopUtils—detailing their purpose, typical usage scenarios, and full method signatures for Java backend development.

FileIOJavaReflection
0 likes · 14 min read
Spring Framework Utility Classes Overview: Assert, ObjectUtils, StringUtils, CollectionUtils, FileCopyUtils, ResourceUtils, StreamUtils, ReflectionUtils, AopUtils
Java High-Performance Architecture
Java High-Performance Architecture
Mar 1, 2022 · Backend Development

Unlocking Spring: Core Principles, Design Patterns, and IoC Explained

This comprehensive guide walks through Spring's lightweight Java framework, covering its core principles, key features, advantages and drawbacks, the design patterns it employs, core modules, IoC container mechanics, bean scopes, lifecycle, dependency injection techniques, and AOP fundamentals, all illustrated with diagrams and code snippets.

AOPDependency InjectionDesign Patterns
0 likes · 48 min read
Unlocking Spring: Core Principles, Design Patterns, and IoC Explained
Top Architect
Top Architect
Feb 27, 2022 · Backend Development

Why Field Injection Is Discouraged in Spring and Preferred Alternatives

The article explains Spring's warning against field injection, compares constructor‑based, setter‑based, and field‑based dependency injection with code examples, outlines the drawbacks of field injection, and recommends using constructor or setter injection for safer, more maintainable backend Java applications.

Constructor InjectionDependency InjectionField Injection
0 likes · 7 min read
Why Field Injection Is Discouraged in Spring and Preferred Alternatives
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Feb 25, 2022 · Backend Development

Latest Java & Framework Releases: JDK 18/19, Spring, Quarkus, Micronaut

Recent Java news highlights early‑access builds of JDK 18 and JDK 19, the 2022 Java roadmap, Spring Framework 5.3.15 and 6.0.0‑M2 releases, Spring Data milestones, Quarkus 2.6.2.Final, Micronaut 3.2.5/3.2.6, Piranha 22.1.0, JobRunr 4.0.6, Eclipse Jifa, Micrometer 2.0.0‑M1 and Tracing 1.0.0‑M1, plus the Foojay mid‑year status report.

Framework ReleasesJDKJava
0 likes · 9 min read
Latest Java & Framework Releases: JDK 18/19, Spring, Quarkus, Micronaut
Java Captain
Java Captain
Feb 24, 2022 · Backend Development

How Spring Solves Bean Circular Dependencies Using a Three-Level Cache

This article explains how Spring's bean lifecycle and its three-level caching mechanism—singletonObjects, earlySingletonObjects, and singletonFactories—work together to resolve circular dependencies, especially when AOP proxies are involved, highlighting why a three‑cache approach is necessary.

AOPBackend DevelopmentBean Lifecycle
0 likes · 9 min read
How Spring Solves Bean Circular Dependencies Using a Three-Level Cache
Java Backend Technology
Java Backend Technology
Feb 24, 2022 · Backend Development

Master Spring’s Core Utility Classes: Assertions, ObjectUtils, StringUtils, and More

This article provides a comprehensive overview of Spring Framework’s core utility classes—including Assert, ObjectUtils, StringUtils, CollectionUtils, FileCopyUtils, ResourceUtils, StreamUtils, ReflectionUtils, and AOP helpers—detailing their purpose and key method signatures for developers working on Java backend projects.

AOPJavaReflection
0 likes · 13 min read
Master Spring’s Core Utility Classes: Assertions, ObjectUtils, StringUtils, and More
Java Architect Essentials
Java Architect Essentials
Feb 20, 2022 · Backend Development

Common Spring Utility Classes: Assertions, ObjectUtils, StringUtils, CollectionUtils, FileCopyUtils, ResourceUtils, ReflectionUtils, AopUtils Overview

This article consolidates frequently used Spring utility classes—such as Assert, ObjectUtils, StringUtils, CollectionUtils, FileCopyUtils, ResourceUtils, ReflectionUtils, and AopUtils—explaining their purpose, typical usage patterns, and providing code snippets to help developers avoid redundant implementations and leverage built‑in Spring functionality.

FileIOReflectionSpring
0 likes · 14 min read
Common Spring Utility Classes: Assertions, ObjectUtils, StringUtils, CollectionUtils, FileCopyUtils, ResourceUtils, ReflectionUtils, AopUtils Overview
Selected Java Interview Questions
Selected Java Interview Questions
Feb 16, 2022 · Backend Development

Java Backend Development Best Practices and Tips

This article presents a collection of practical Java backend development guidelines, covering configuration management with @ConfigurationProperties, constructor injection via @RequiredArgsConstructor, code modularization, exception handling, database query reduction, null avoidance, strategic use of design patterns, IDE assistance, source code reading, and fundamental coding techniques such as map traversal and collection choice.

ConfigurationSpringbest practices
0 likes · 7 min read
Java Backend Development Best Practices and Tips
Top Architect
Top Architect
Feb 16, 2022 · Backend Development

Understanding Spring AOP Annotations and Their Execution Order

This article explains the common Spring AOP annotations such as @Before, @After, @AfterReturning, @AfterThrowing and @Around, demonstrates how to set up a Spring Boot project, write an interface, implementation, aspect, and discusses execution order, multiple aspects, and proxy‑failure scenarios.

AOPAspectJJava
0 likes · 8 min read
Understanding Spring AOP Annotations and Their Execution Order
Top Architect
Top Architect
Feb 14, 2022 · Backend Development

Common Spring Framework Utility Classes: Assertions, ObjectUtils, StringUtils, CollectionUtils, File/Resource IO, Reflection and AOP Helpers

This article presents a curated collection of Spring Framework utility classes—including assertion helpers, object/array/collection utilities, file and resource IO tools, as well as reflection and AOP utilities—providing ready‑to‑use methods that replace many custom helper functions in Java backend development.

AOPBackend DevelopmentJava
0 likes · 13 min read
Common Spring Framework Utility Classes: Assertions, ObjectUtils, StringUtils, CollectionUtils, File/Resource IO, Reflection and AOP Helpers
Architecture Digest
Architecture Digest
Feb 12, 2022 · Backend Development

Understanding RPC Implementation Principles and a Basic Java RPC Framework Example

This article explains the fundamentals of Remote Procedure Call (RPC), detailing the end‑to‑end workflow from defining service interfaces and implementations, registering services in a Zookeeper registry, handling network communication with Netty, and generating client‑side proxies using Spring and JDK dynamic proxies, all illustrated with complete Java code examples.

JavaRPCSpring
0 likes · 19 min read
Understanding RPC Implementation Principles and a Basic Java RPC Framework Example
Code Ape Tech Column
Code Ape Tech Column
Feb 8, 2022 · Backend Development

Refactoring Long if...else Chains in Java Using Design Patterns and Spring

This article explains why lengthy if...else statements in Java payment services violate the Open‑Closed and Single‑Responsibility principles and demonstrates several refactoring techniques—including annotations, dynamic bean naming, template methods, strategy‑factory, and chain‑of‑responsibility patterns—using Spring to eliminate the conditional logic.

Design PatternsJavaSpring
0 likes · 15 min read
Refactoring Long if...else Chains in Java Using Design Patterns and Spring
Programmer DD
Programmer DD
Feb 7, 2022 · Backend Development

Master Spring’s Core Utility Classes: Assertions, Collections, IO, and Reflection

This article provides a comprehensive guide to Spring's built‑in utility classes—including Assert, ObjectUtils, StringUtils, CollectionUtils, FileCopyUtils, ResourceUtils, StreamUtils, ReflectionUtils, and AOP helpers—explaining their purpose, common methods, and usage examples to replace redundant custom code.

BackendJavaReflection
0 likes · 16 min read
Master Spring’s Core Utility Classes: Assertions, Collections, IO, and Reflection
21CTO
21CTO
Jan 28, 2022 · Backend Development

How Does RPC Work? A Deep Dive into Java RPC Implementation with Netty and Zookeeper

This article explains the fundamentals of Remote Procedure Call (RPC), walks through the complete request‑response flow, and provides a step‑by‑step Java implementation using Spring, custom XML namespaces, Netty for network communication, and Zookeeper for service registration and discovery.

JavaNettyRPC
0 likes · 17 min read
How Does RPC Work? A Deep Dive into Java RPC Implementation with Netty and Zookeeper
NetEase Smart Enterprise Tech+
NetEase Smart Enterprise Tech+
Jan 21, 2022 · Backend Development

Mastering SPI: Build Extensible Java, Spring, and Dubbo Applications

This article explains the Service Provider Interface (SPI) mechanism across JDK, Spring, and Dubbo, showing how to create modular, maintainable code through interface definitions, configuration files, and ServiceLoader or ExtensionLoader usage, with detailed examples, code snippets, and analysis of advantages and drawbacks.

DubboJavaSPI
0 likes · 17 min read
Mastering SPI: Build Extensible Java, Spring, and Dubbo Applications
Java Captain
Java Captain
Jan 18, 2022 · Backend Development

Best Practices for Java Backend Development: Configuration, Lombok, Modular Code, Exception Handling, and More

This article shares a collection of practical Java backend development habits, covering configuration with @ConfigurationProperties, Lombok's @RequiredArgsConstructor, code modularization, exception throwing, reducing DB queries, avoiding null returns, simplifying if‑else, keeping controllers thin, IDE tips, source code reading, design patterns, and fundamental coding techniques.

BackendConfigurationDesign Patterns
0 likes · 6 min read
Best Practices for Java Backend Development: Configuration, Lombok, Modular Code, Exception Handling, and More
Sanyou's Java Diary
Sanyou's Java Diary
Jan 18, 2022 · Backend Development

Deep Dive into Spring Bean Lifecycle: Property Assignment, Aware Callbacks, Initialization & Destruction

This article continues the Spring bean lifecycle series by explaining the property‑assignment stage, Aware interface callbacks, bean initialization phases, and the destruction process, illustrating each step with source‑code diagrams and highlighting how BeanPostProcessor extensions drive the lifecycle.

Backend DevelopmentDependency InjectionSpring
0 likes · 9 min read
Deep Dive into Spring Bean Lifecycle: Property Assignment, Aware Callbacks, Initialization & Destruction
Top Architect
Top Architect
Jan 14, 2022 · Backend Development

Understanding Exception Types and @Transactional Usage in Spring

This article explains Java exception classification, distinguishes checked and unchecked exceptions, and demonstrates how to configure Spring's @Transactional annotation to control rollback behavior, including examples of rollbackFor, notRollbackFor, and propagation settings, while highlighting common pitfalls with try‑catch blocks.

@TransactionalBackend DevelopmentJava
0 likes · 5 min read
Understanding Exception Types and @Transactional Usage in Spring
Programmer DD
Programmer DD
Jan 12, 2022 · Backend Development

Mastering Spring’s HttpMessageConverter: Elegant Request/Response Handling

This article explains how Spring's HttpMessageConverter abstracts HTTP message conversion, shows how to read request bodies via HttpInputMessage and ServletServerHttpRequest, demonstrates a practical filter using FormHttpMessageConverter, and illustrates writing JSON responses with MappingJackson2HttpMessageConverter, all with concise code examples.

BackendHttpMessageConverterJava
0 likes · 6 min read
Mastering Spring’s HttpMessageConverter: Elegant Request/Response Handling
IT Architects Alliance
IT Architects Alliance
Jan 10, 2022 · Backend Development

How RPC Works: Build a Simple RPC Framework with Spring, Netty, and Zookeeper

This article explains the fundamentals of Remote Procedure Call (RPC), detailing the end‑to‑end workflow—from interface definition and dynamic proxy generation on the client, through service registration in ZooKeeper, to server‑side handling with Spring and Netty—accompanied by complete Java code snippets and configuration examples.

JavaNettyRPC
0 likes · 17 min read
How RPC Works: Build a Simple RPC Framework with Spring, Netty, and Zookeeper
Top Architect
Top Architect
Jan 8, 2022 · Backend Development

Comprehensive Guide to Spring MVC and Spring Boot Annotations

This article provides a detailed overview of Spring MVC request‑mapping annotations, Spring Bean and dependency‑injection annotations, and essential Spring Boot configuration annotations, illustrating their usage with code examples and explaining how they work together to build robust backend applications.

Backend DevelopmentSpringSpring Boot
0 likes · 13 min read
Comprehensive Guide to Spring MVC and Spring Boot Annotations
Architect's Journey
Architect's Journey
Jan 5, 2022 · Backend Development

Why @Transactional Can Trigger Production Outages: Lessons from a Long‑Transaction Failure

The author recounts a real‑world incident where a Spring @Transactional annotation caused database connection exhaustion, deadlocks, and a production outage, explains how long‑running transactions arise from holding a single connection during costly operations, and offers practical ways to avoid them by splitting methods or using programmatic transactions.

@TransactionalDatabase DeadlockJava
0 likes · 10 min read
Why @Transactional Can Trigger Production Outages: Lessons from a Long‑Transaction Failure
Top Architect
Top Architect
Jan 2, 2022 · Backend Development

Debugging Redis Connection Pool Blocking Issues in a Spring Backend Application

The article details a step‑by‑step investigation of a Spring‑based backend where API requests hung due to Redis connection pool misconfiguration, showing how thread dumps, jstack, and Arthas were used to pinpoint blocking in Jedis pool acquisition, and provides corrected configuration and proper connection handling recommendations.

JedisRedisSpring
0 likes · 9 min read
Debugging Redis Connection Pool Blocking Issues in a Spring Backend Application
Top Architect
Top Architect
Dec 28, 2021 · Backend Development

Using @PathVariable for RESTful API Parameters in Spring MVC

This article explains how to use the @PathVariable annotation in Spring MVC to handle required and optional parameters in RESTful URLs, illustrates the syntax with image-based examples, discusses the complexity of multiple parameters, and advises using POST for more intricate cases, while also offering promotional links and giveaways.

API DesignJavaPathVariable
0 likes · 4 min read
Using @PathVariable for RESTful API Parameters in Spring MVC
Top Architect
Top Architect
Dec 23, 2021 · Backend Development

Implementing Custom Logging with Spring AOP and Annotations

This article explains how to create a custom logging solution in Spring by defining annotation-based AOP aspects, configuring pointcuts, handling various advice types, and persisting log details such as user, operation, parameters, and results into a database using Java code examples.

AOPAspectJCustom Annotation
0 likes · 14 min read
Implementing Custom Logging with Spring AOP and Annotations
Architect's Tech Stack
Architect's Tech Stack
Dec 21, 2021 · Backend Development

Using @Async Annotation in Spring: Application Scenarios, Built‑in Thread Pools, and Custom Thread‑Pool Configuration

This article explains the @Async annotation in Spring, how it enables asynchronous method execution, compares the built‑in executors, shows how to configure custom thread pools via AsyncConfigurer or AsyncConfigurerSupport, and provides code examples for void, Future and CompletableFuture based async methods.

@AsyncJavaSpring
0 likes · 12 min read
Using @Async Annotation in Spring: Application Scenarios, Built‑in Thread Pools, and Custom Thread‑Pool Configuration
Java Interview Crash Guide
Java Interview Crash Guide
Dec 21, 2021 · Backend Development

How to Implement Custom Logging with Spring AOP and Annotations

This guide explains how to create a custom Spring AOP logging solution by defining a @SystemCrmlog annotation, extracting its parameters via pointcuts, and persisting detailed log entries—including user, method, parameters, and execution results—to a database using aspect advice methods.

AOPCustom AnnotationJava
0 likes · 15 min read
How to Implement Custom Logging with Spring AOP and Annotations
Su San Talks Tech
Su San Talks Tech
Dec 15, 2021 · Backend Development

Top 18 Spring Interview Questions and Answers You Must Know

Explore a comprehensive list of 18 essential Spring interview questions covering design patterns, core modules, IoC, DI, AOP, proxy types, bean lifecycle, circular dependency resolution, transaction management, and Spring Boot auto‑configuration, complete with concise explanations and illustrative diagrams to help you ace your interview.

AOPBackendIOC
0 likes · 17 min read
Top 18 Spring Interview Questions and Answers You Must Know
macrozheng
macrozheng
Dec 13, 2021 · Backend Development

Master Spring Validation: From Simple Use to Advanced Techniques and Internals

This guide thoroughly explores Spring Validation, covering basic and advanced usage such as requestBody and requestParam checks, grouping, nested and collection validation, custom constraints, programmatic validation, fail-fast configuration, and the underlying implementation mechanisms within Spring MVC and Hibernate Validator.

Hibernate ValidatorJavaSpring
0 likes · 17 min read
Master Spring Validation: From Simple Use to Advanced Techniques and Internals
Top Architect
Top Architect
Dec 11, 2021 · Backend Development

Proxy vs. Decorator Patterns and DIY Spring AOP Implementation in Java

This article explains the proxy and decorator design patterns using a coffee analogy, provides complete Java code examples for static and dynamic proxies, discusses their differences, and shows how to implement a Spring‑like AOP mechanism with JDK InvocationHandler and cglib, while also warning about their limitations.

AOPCGLIBDecorator
0 likes · 11 min read
Proxy vs. Decorator Patterns and DIY Spring AOP Implementation in Java
Architect's Tech Stack
Architect's Tech Stack
Dec 10, 2021 · Backend Development

2021 JVM Ecosystem Report Highlights Java Version Adoption, IDE Preferences, Build Tools, and Framework Dominance

The 2021 JVM Ecosystem Report, based on responses from over 2,000 Java developers, reveals a shift from Java 8 to Java 11, widespread use of AdoptOpenJDK and Oracle builds, dominant IDEs like IntelliJ IDEA, Maven as the primary build system, and Spring as the leading framework in the Java ecosystem.

Build ToolsIDEJVM
0 likes · 4 min read
2021 JVM Ecosystem Report Highlights Java Version Adoption, IDE Preferences, Build Tools, and Framework Dominance
Top Architect
Top Architect
Dec 8, 2021 · Backend Development

Do You Need Interfaces in the Service Layer? A Top Architect’s Perspective

The article examines whether the Service layer in a Spring‑based Java project truly requires interfaces, debunks common justifications, proposes practical development workflows, and outlines project structures for both single and multiple implementations, concluding with recommendations on when to use interfaces.

Dependency InjectionJavaService Layer
0 likes · 8 min read
Do You Need Interfaces in the Service Layer? A Top Architect’s Perspective
Selected Java Interview Questions
Selected Java Interview Questions
Dec 4, 2021 · Backend Development

Common Scenarios Where Spring @Transactional Does Not Take Effect

This article explains eight typical situations—such as using non‑transactional storage engines, missing Spring bean registration, non‑public methods, self‑invocation, absent transaction manager, incorrect propagation settings, swallowed exceptions, and wrong exception types—that cause the @Transactional annotation in Spring to appear ineffective, and provides practical solutions for each.

@TransactionalBackendJava
0 likes · 7 min read
Common Scenarios Where Spring @Transactional Does Not Take Effect
Programmer DD
Programmer DD
Dec 2, 2021 · Backend Development

Explore IntelliJ IDEA 2021.3: Remote Development, Smart Refactoring, and New Spring Support

IntelliJ IDEA 2021.3 introduces a beta remote development mode, enhanced IDE repair tools, convenient font scaling, streamlined Markdown table creation, advanced unsafe string checks, improved refactoring shortcuts, and multiple Spring framework enhancements, all illustrated with screenshots and GIFs for developers.

IDE FeaturesIntelliJ IDEAJava
0 likes · 6 min read
Explore IntelliJ IDEA 2021.3: Remote Development, Smart Refactoring, and New Spring Support
Java Architect Essentials
Java Architect Essentials
Nov 30, 2021 · Backend Development

How Spring Solves Circular Dependencies and the Underlying Essence

This article explains Spring's three‑level cache mechanism for breaking circular dependencies in singleton beans, demonstrates a simplified implementation with Java code, draws an analogy to the classic Two‑Sum algorithm, and highlights the core idea behind dependency injection.

SpringTwo Sumcircular dependency
0 likes · 9 min read
How Spring Solves Circular Dependencies and the Underlying Essence
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Nov 29, 2021 · Backend Development

Master Spring’s ObjectFactory & FactoryBean: Real-World Usage

This article explains the differences between Spring’s ObjectFactory and FactoryBean interfaces, demonstrates how they are used internally for bean creation, dependency injection, and servlet API injection, and shows how to customize ObjectFactory behavior to resolve bean conflicts and inject specific implementations.

Backend DevelopmentDependency InjectionFactoryBean
0 likes · 9 min read
Master Spring’s ObjectFactory & FactoryBean: Real-World Usage
Architect
Architect
Nov 29, 2021 · Backend Development

Common Scenarios Where Spring Transactions Fail and How to Fix Them

This article explains why Spring's @Transactional annotation can silently fail in many typical situations—such as incorrect method visibility, final methods, self‑invocation, unmanaged beans, multithreading, non‑transactional tables, missing configuration, wrong propagation or rollback settings, nested transaction behavior, and oversized transaction scopes—and provides practical solutions to ensure reliable transaction management.

AOPSpringexception-handling
0 likes · 16 min read
Common Scenarios Where Spring Transactions Fail and How to Fix Them
macrozheng
macrozheng
Nov 29, 2021 · Backend Development

Why Constructor Injection Outperforms Field and Setter Injection in Spring

This article explains Spring's three dependency injection methods—field, constructor, and setter—examines why IntelliJ IDEA warns against field injection, and compares them across reliability, maintainability, testability, flexibility, cycle detection, and performance, concluding that constructor injection is generally the preferred approach.

Constructor InjectionDependency InjectionField Injection
0 likes · 7 min read
Why Constructor Injection Outperforms Field and Setter Injection in Spring
Senior Brother's Insights
Senior Brother's Insights
Nov 28, 2021 · Backend Development

Why @Transactional Fails with parallelStream and How to Fix It

An Excel import that partially succeeds reveals a hidden bug where Spring’s @Transactional annotation doesn’t roll back when using Java 8’s parallelStream, and the article explains the underlying thread‑local transaction mechanics, demonstrates the issue with code, and offers practical solutions and best‑practice guidelines.

JavaSpringbug
0 likes · 8 min read
Why @Transactional Fails with parallelStream and How to Fix It
Architects Research Society
Architects Research Society
Nov 25, 2021 · Backend Development

Practical Implementation of Domain‑Driven Design with a Loan Processing Sample Application

This article provides a comprehensive, practical guide to applying Domain‑Driven Design (DDD) in enterprise Java projects, covering architectural principles, project management steps, design patterns, code generation, testing, deployment, and a detailed loan‑processing example that demonstrates how to model, implement, and evolve a rich domain model using Spring, DI, AOP, and related technologies.

ArchitectureDDDDomain-Driven Design
0 likes · 39 min read
Practical Implementation of Domain‑Driven Design with a Loan Processing Sample Application
Architecture Digest
Architecture Digest
Nov 25, 2021 · Backend Development

Performance Optimization of a Java Backend Service: Reducing CPU Load, Improving Hystrix Circuit Breaking, and Fixing Spring Data Binding Issues

This article details a two‑week effort to diagnose and resolve high CPU usage, server load, Hystrix circuit‑breaker inefficiencies, and Spring data‑binding exceptions in a Java backend service, resulting in doubled QPS capacity, stable circuit breaking under heavy traffic, and significant performance gains.

BackendCircuit BreakerHystrix
0 likes · 16 min read
Performance Optimization of a Java Backend Service: Reducing CPU Load, Improving Hystrix Circuit Breaking, and Fixing Spring Data Binding Issues
macrozheng
macrozheng
Nov 25, 2021 · Backend Development

Why @Transactional Can Crash Production and How to Prevent Long Transactions

This article recounts a production incident caused by using Spring's @Transactional annotation, explains how long-running transactions exhaust database connections, and provides practical strategies—including method splitting, programmatic transactions, and proper AOP proxy usage—to prevent such failures in backend Java applications.

JavaLong TransactionSpring
0 likes · 10 min read
Why @Transactional Can Crash Production and How to Prevent Long Transactions
Selected Java Interview Questions
Selected Java Interview Questions
Nov 20, 2021 · Backend Development

Design Pattern Summary in the Spring Framework

This article provides a comprehensive overview of the design patterns used in Spring, including Simple Factory, Factory Method, Singleton, Adapter, Decorator, Proxy, Observer, Strategy, and Template Method, with explanations of their implementation, principles, and practical code examples.

BeanFactoryDesign PatternsSpring
0 likes · 13 min read
Design Pattern Summary in the Spring Framework
Programmer DD
Programmer DD
Nov 16, 2021 · Backend Development

Why @Transactional Might Fail in Spring and How to Fix It

This article explains common reasons why Spring's @Transactional annotation can become ineffective—such as self‑invocation, non‑public methods, multiple data sources, incorrect rollback settings, and unsupported database engines—and provides concrete code examples and solutions to ensure proper transaction management.

@TransactionalAOPBackend
0 likes · 7 min read
Why @Transactional Might Fail in Spring and How to Fix It
Top Architect
Top Architect
Nov 14, 2021 · Backend Development

Implementing a Request Logging Aspect with Spring AOP

This article demonstrates how to create a Spring AOP request‑logging aspect that captures request details, parameters, results, execution time, and error information, and discusses enhancements for high‑concurrency environments by aggregating log data into a single JSON object.

AOPAspectJJava
0 likes · 12 min read
Implementing a Request Logging Aspect with Spring AOP
Top Architect
Top Architect
Nov 13, 2021 · Backend Development

Parameter Validation in the Controller Layer Using Hibernate Validator

This article explains how to cleanly perform parameter validation in Java backend applications by placing business‑independent checks in the Controller layer with Hibernate Validator and optional custom annotations, while business‑related checks belong to the Service layer.

ControllerHibernate ValidatorJava
0 likes · 6 min read
Parameter Validation in the Controller Layer Using Hibernate Validator
Code Ape Tech Column
Code Ape Tech Column
Nov 13, 2021 · Backend Development

Spring Framework Interview Questions and Answers Overview

This article compiles a comprehensive set of Spring interview questions covering design patterns, core modules, IoC, DI, AOP, proxy mechanisms, bean lifecycle, circular dependency resolution, transaction isolation and propagation, as well as Spring Boot auto‑configuration principles, providing concise explanations for each topic.

AOPDependency InjectionDesign Patterns
0 likes · 16 min read
Spring Framework Interview Questions and Answers Overview
Programmer DD
Programmer DD
Nov 12, 2021 · Information Security

Master Spring Authorization Server: Build a Production-Ready OAuth2 Flow

This guide walks you through replacing Spring Security OAuth2.0 with the production-ready Spring Authorization Server, showing how to add OAuth2 client, resource server, and authorization server dependencies, and demonstrating a complete authorization‑code flow demo with detailed request/response examples and configuration snippets.

JavaOAuth2Spring
0 likes · 7 min read
Master Spring Authorization Server: Build a Production-Ready OAuth2 Flow