Configuring Database Connections in Spring Boot with MyBatis
Method 1: Using @Value for Property Injection
Step 1: Define a properties file (e.g., jdbc.properties)
jdbc.driverClassName=com.mysql.cj.jdbc.Driver
jdbc.url=jdbc:mysql://127.0.0.1:3306/leyou
jdbc.username=root
jdbc.password=123456
Step 2: Create a configuration class using @Value
package com.caicia.config;
import com.alibaba.druid.pool.Druid ...
Posted on Sun, 28 Jun 2026 16:57:31 +0000 by shatteredroses
Order in a Sandbox: The Facade Pattern Explained
The human-array computer is undoubtedly one of the most stunning scenes in The Three-Body Problem. In the novel, "von Neumann" organized three soldiers into each gate component, ultimately mobilizing thirty million soldiers of "the First Emperor" to form a colossal computer of ten million gate parts, all in an attempt to sol ...
Posted on Sat, 27 Jun 2026 16:20:31 +0000 by PHPsites
Building a Library Management Module with SSM Framework
Prerequisites
Required developmant environment:
IntelliJ IDEA
MySQL 5.7.19
Tomcat 9
Maven 3.6
Required knowledge: Proficiency in MySQL, Spring, JavaWeb, and MyBatis, along with basic frontend skills.
Database Initialization
Create a schema for storing publication records:
CREATE DATABASE `library_db`;
USE `library_db`;
DROP TABLE IF EXISTS ` ...
Posted on Mon, 22 Jun 2026 17:17:01 +0000 by sBForum
Flight Management System with SpringBoot
This project is a flight entry and exit management system built using Java and SpringBoot framework. The system can be opened and run in both Eclipse and IDE. The recommended environment includes Eclipse/IDE, JDK 1.8, Maven, and MySQL.
Technical Stack
Frontend technologies include Vue.js, Ajax, and JSON for dynamic user interfaces. Backend impl ...
Posted on Sat, 20 Jun 2026 17:07:28 +0000 by gimzo
Implementing Soft Delete with MyBatis Interceptor
@Intercepts({
@Signature(type = StatementHandler.class, method = "prepare", args = {Connection.class, Integer.class})
})
@Component
public class SoftDeleteInterceptor implements Interceptor {
@Override
public Object intercept(Invocation invocation) throws Throwable {
StatementHandler handler = (StatementHandler) in ...
Posted on Fri, 19 Jun 2026 16:59:07 +0000 by vornn
Academic Achievement Management System Design and Implementation with Java, SSM, and JSP
This system is built using the SSM (Spring, Spring MVC, MyBatis) framework for the backend, JSP for the frontend, and MySQL as the database.
Core Technology Stack
Backend: Spring Framework
Spring provides comprehensive infrastructure support for Java development, handling dependency injection and aspect-oriented programming. Spring MVC serves a ...
Posted on Fri, 19 Jun 2026 16:57:04 +0000 by thefarhan
Developing a Food Snatching and Sharing Platform for WeChat Mini Program Users
Given the widespread adoption of WeChat, the client side of this platform is developed as a WeChat Mini Program to align with real-world usage scenarios.
1. Implementing WeChat Login (Controller Layer)
@PostMapping("/wechat-login")
@ApiOperation("WeChat user authentication")
public Result<AuthResponseVO> authenticate(@ ...
Posted on Mon, 15 Jun 2026 16:51:24 +0000 by skter4938
Understanding Transaction Commit Behaviors in MyBatis and MySQL Storage Engines
Impact of Storage Engines on Transaction Handling
In MyBatis development, developers often assume that every data modification requires an explicit sqlSession.commit() call to persist changes to the database. While this holds true for most production scenarios, the actual persistence behavior depends heavily on the underlying storage engine, sy ...
Posted on Sun, 14 Jun 2026 17:40:25 +0000 by intenseone345
Leveraging MyBatis Where and Trim Tags for Robust Dynamic Query Construction
When building dynamic conditional queries in MyBatis, manual WHERE clause construction can introduce syntax errors from leading AND/OR operators or a dagnling WHERE keyword when no filters apply. For example, this flawed query snippet demonstrates both issues:
<select id="fetchBlogEntry" resultType="BlogEntity">
SELE ...
Posted on Fri, 12 Jun 2026 16:51:00 +0000 by Mike521
Spring Framework: Annotation-Based Development, Third-Party Bean Management, and Integration with MyBatis and JUnit
Managing Third-Party Beans with IoC/DI Configuration
=======================================================
This section demonstrates how to manage third-party beans using Spring's Inversion of Control (IoC) container. We'll use DruidDataSource and ComboPooledDataSource as examples.
1.1 Managing a Data Source Object
1.1.1 Environment Setup
...
Posted on Wed, 10 Jun 2026 17:28:27 +0000 by trellie