Fading Coder

One Final Commit for the Last Sprint

Performing All DML Operations with SqlSession

Mapper Mapping File <?xml version="1.0" encoding="UTF-8" ?> <mapper namespace="EmployeeMapper"> <!-- Return type for insert/update/delete is `int`, so `resultType` is not needed. `insert`, `update`, `delete` tags don't have `resultType` but support `param...

Building a Smart Study Space: Developing a Seat Reservation and Access Control System with Spring Boot and WeChat Mini-Programs

Backend Architecture with Spring Boot Spring Boot serves as the backbone for the study room management system, providing a robust environment for micro-services and RESTful API development. Its primary advantage lies in its opinionated configuration, which eliminates the need for manual boilerplate...

Mastering MyBatis: Dynamic SQL, One-to-One and Many-to-One Mappings, and Caching Strategies

Dynamic SQL with Conditional Logic Dynamic SQL in MyBatis enables flexible query construction based on runtime conditions. Unlike raw JDBC where manual string concatenation leads to errors like missing spaces or trailing commas, MyBatis provides built-in tags for clean, maintainable code. Key tags i...

MyBatis Configuration and Mapper XML Files Explained

Two Development Approaches in MyBatis When working with MyBatis in production environments, developers typically choose between two approaches: Traditional DAO Implementation This approach requires manually writing DAO interface implementations with explicit SQL session management. The main drawback...

Building a WeChat Mini Program Ordering System with Spring Boot and Vue.js

Spring Boot is a development framework built on top of the Spring Framework. It simplifies configuration by embedding servers like Tomcat and provides powerful auto-configuration based on project dependencies. This framework offers out-of-the-box features and plugins such as Spring Data and Spring S...

Annotation-Driven CRUD Operations with MyBatis and Lombok

Lombok streamlines Java development by generating boilerplate code at compile time through annotations. To integrate it, add the following dependency: <dependency> <groupId>org.projectlombok</groupId> <artifactId>lombok</artifactId> <scope>provided</scope> &...

SSM Framework Integration Without Errors

Creating a Maven Project Start by creating a standard Maven Java project. Update pom.xml with the following dependencies: <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-...

Why MyBatis Mapper Interfaces Can Be @Autowired Like Ordinary Beans?

Case 1: Using MyBatis Alone Create a new configuration file mybatis-solo.xml in the resources directory with the fololwing content: <?xml version="1.0" encoding="utf-8"?> <configuration> <settings> <setting name="logImpl" value="LOG4J2"/&g...

Employee Management in Spring Boot: Pagination, Status Toggle, Editing, and Automated Common Field Population

@GetMapping("/page") @ApiOperation("Employee Pagination Query") public Result<PageResult> listByPage(StaffQueryDTO queryParams) { log.info("Executing employee pagination query with params: {}", queryParams); PageResult paginationResult = staffService.getPagedList(...

MyBatis Framework: Core Concepts and Getting Started

Core ORM Concepts Object-Relational Mapping (ORM) is a porgramming technique that converts data between incompatible type systems—specifically between object-oriented programming languages and relational databases. Instead of working with raw SQL queries, developers interact with objects that repres...