Building RESTful CRUD Services with Spring Boot and MyBatis
Environment Setup
Database Schema
Create a MySQL database named springboot and a table t_user to hold user records.
CREATE DATABASE `springboot`;
USE `springboot`;
DROP TABLE IF EXISTS `t_user`;
CREATE TABLE `t_user` (
`id` INT(11) NOT NULL AUTO_INCREMENT COMMENT 'Primary Key',
`name` VARCHAR(10) DEFAULT NULL COMMENT 'User name',
`age` ...
Posted on Fri, 04 Sep 2026 16:48:03 +0000 by krishnam1981
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
Integrating Swagger 2 with Spring Boot for API Documentation and Testing
1. Project Dependencies
Add the following coordinates to your pom.xml to enable Swagger 2 and the enhanced Bootstrap UI theme:
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
<version>2.9.2</version>
</dependency>
<dependency>
<grou ...
Posted on Thu, 09 Jul 2026 17:07:41 +0000 by LacOniC
Invoking REST Endpoints That Return JSON Arrays with Spring RestTemplate
Setting Up the HTTP Client
A customized RestTemplate bean provides fine-graineed control over connection behavior. The configuration below binds a request factory with a timeout setting.
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.client.SimpleC ...
Posted on Wed, 10 Jun 2026 18:20:25 +0000 by jdh
User Management API Documentation
User Count Retrieval
Endpoint
POST /api/users/count
Parameters
Name
Type
Required
Description
query
string
No
Search by username or phone
active
string
No
Filter: all, true, false
Response
{
"status": 200,
"result": {
"totalUsers": 150
}
}
User List Retrieval
Endpoint
POST /api/users
Parame ...
Posted on Thu, 04 Jun 2026 18:26:50 +0000 by racing_fire
Data Storage and Microservices in ASP.NET Core
Understanding HTTP
Before diving into REST, you should have a solid understanding of the Hypertext Transfer Protocol (HTTP). HTTP was created in 1989 by Tim Berners-Lee at CERN, the European Organization for Nuclear Rseearch. In the early days of computing, researchers would publish their findings in physical journals, which meant lengthy turna ...
Posted on Wed, 20 May 2026 19:06:03 +0000 by joix
Essential Spring MVC Annotations for Web Development
@Controller
Applied at the class level, @Controller marks a class as a Spring MVC controller and registers it as a Spring bean. The DispatcherServlet automatically detects such classes and routes incoming HTTP requests to methods annotated with @RequestMapping. This annotation is specifically intended for web controllers—use @Component or other ...
Posted on Fri, 08 May 2026 21:44:59 +0000 by weiwei
Comparing HttpClient and WebRequest for HTTP Requests in C#
API Design
HttpClient provides a cleaner, more intuitive API compared to WebRequest. The framework encapsulates HTTP request components—methods, URLs, headers, and body content—into dedicated objects, streamlining development.
Sending a GET request with HttpClient requires a single call to GetAsync(url), while POST requests use PostAsync(url, c ...
Posted on Fri, 08 May 2026 14:27:25 +0000 by james_holden