Spring 6 IoC Container Deep Dive
IoC Container
Inversion of Control
The IoC container serves as the practical implementation of the IoC design pattern in Spring. Components managed by the IoC container are referred to as beans. Before creating a bean, the IoC container must be instantiated first. Spring provides two primary implementations:
① BeanFactory
The fundamental implem ...
Posted on Thu, 17 Sep 2026 16:55:10 +0000 by Travis Estill
MyBatis Development: XML vs Annotations and Underlying Implementation
MyBatis supports two development approaches: XML-based and annotation-based. The annotation approach further splits into two variants, resulting in three distinct writing styles.
Three Implementation Approaches
1. XML-Based Approach
Define the mapper interface:
public interface UserMapper {
Integer queryAgeByName(String name);
}
Correspond ...
Posted on Sun, 06 Sep 2026 16:12:39 +0000 by nadeauz
Designing Clean and Elegant API Response Wrappers in Spring Boot
In modern distributed systems and microservice architectures, the separation of frontend and backend is common. The overall system architecture is typically structured as follows:
Note: This article focuses on API interface design. Other components like gateways, caches, and message queues are omitted for clarity.
Interface Interaction
The fr ...
Posted on Fri, 28 Aug 2026 16:52:30 +0000 by jimdy
Implementing CRUD Operations with MyBatis Annotations
While XML configuration remains the predominant approach in MyBatis, annotation-based development offers a streamlined alternative that is widely adopted across other frameworks in the ecosystem.
Defining Mapper Interfaces with Annotations
Annotate methods directly on the interface to specify SQL queries:
public interface UserDao {
@Se ...
Posted on Wed, 26 Aug 2026 16:12:43 +0000 by brokenshadows
Integrating Ehcache and Cache Annotations in Spring Boot Applications
Core Cache Annotations
Spring Boot simplifies data caching through a declarative approach. To utilize the cache abstraction, ensure the @EnableCaching annotation is present on a configuration class. The framework manages storage based on method-level annotations.
Retrieving Cached Results
The @Cacheable annotation applies to read operations. Wh ...
Posted on Sat, 25 Jul 2026 16:43:23 +0000 by ns1025
Configuring Declarative Transactions with Spring @Transactional
Transaction management belongs logically in the service layer. Spring supports two primary approaches:
Programmatic transaction management (for advanced use cases)
Declarative transaction management (recommended for most applications)
Declarative transactions can be implemented either via XML configuration or annotations — the latter being th ...
Posted on Fri, 15 May 2026 08:25:08 +0000 by hcdarkmage
Servlet Development Guide: Hello World Example
Creating a Basic Servlet
To begin learning Servlet development, we start with a simple Hello World example. Create a dynamic web project in you're IDE, then define a new Servlet class.
package com.example.demo;
import java.io.*;
import javax.servlet.*;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.*;
@WebServlet(" ...
Posted on Sun, 10 May 2026 09:41:30 +0000 by cvincent