Tagged articles
MyBatis-Plus
20 articles · Page 1 of 1
This article explains how the @TableLogic annotation in MyBatis-Plus implements logical deletion by converting delete operations into updates, details its parameters, supported field types, global configuration, and provides complete Java and SQL code examples for practical usage.
BackendJavaMyBatis-Plus
0 likes · 8 min read

When migrating an old Java project from MyBatis 3.5.0 to MyBatis‑Plus 3.1.1, a test failed with “Conversion not supported for type java.time.LocalDateTime” because MyBatis 3.5.1 stopped handling Java 8 time types and the existing mysql‑connector‑java 5.1.26 driver lacked support, which was resolved by upgrading the connector to version 5.1.37 or later, highlighting the need for thorough compatibility testing during framework upgrades.
JavaLocalDateTimeMyBatis
0 likes · 7 min read

This article demonstrates how to implement dynamic data source switching in a Spring Boot application by leveraging ThreadLocal and AbstractRoutingDataSource, providing step‑by‑step code examples for context holders, custom routing, annotation‑driven switching, and runtime addition of new data sources.
AOPAbstractRoutingDataSourceDynamicDataSource
0 likes · 14 min read

This guide explains how to implement data permission control in MyBatis-Plus by creating a custom annotation, an interceptor that modifies SQL before execution, a handler that builds WHERE clauses based on user roles, and how to register the interceptor in the MyBatis-Plus plugin, covering both basic and advanced versions.
BackendData PermissionInterceptor
0 likes · 13 min read

This tutorial explains how to globally enforce data‑permission filtering in MyBatis‑Plus by creating a custom @UserDataPermission annotation, implementing an InnerInterceptor that modifies SQL WHERE clauses based on user roles, and configuring the interceptor within the MyBatis‑Plus plugin system.
Custom AnnotationData PermissionInterceptor
0 likes · 11 min read

This article walks through replacing MyBatis with MyBatis‑Plus in a legacy Java project, demonstrates the LocalDateTime conversion error caused by MySQL‑connector‑java version incompatibility, shows how upgrading the driver resolves the issue, and shares a cautionary tale about unintended bugs after component upgrades.
JavaLocalDateTimeMyBatis
0 likes · 15 min read

This article introduces mybatis-plus-generator-ui, a highly customizable web‑based code generator built on MyBatis‑Plus that supports multiple databases, offers interactive UI for generating Entity, Mapper, Service, Controller and other layers, and provides detailed usage, configuration, and extension instructions for Java backend developers.
Code GeneratorJavaMaven
0 likes · 14 min read

This article presents mybatis-plus-generator-ui, a web‑based code generation framework that wraps MyBatis‑Plus, explains its features, shows how to integrate it via Maven and a Spring Boot entry point, demonstrates customization through templates and NameConverter, and provides guidance for building the UI frontend.
JavaMyBatis-PlusSpring Boot
0 likes · 11 min read

This article introduces the MyBatis‑Plus Generator UI, a web‑based code generation framework that supports multiple databases, offers highly customizable templates, and integrates seamlessly with Spring Boot to accelerate backend development through automated creation of entities, mappers, services, controllers, and SQL‑based code.
JavaMyBatis-PlusSpring Boot
0 likes · 13 min read

This article evaluates MyBatis-Plus (MP) for Java backend development, highlighting its convenient CRUD shortcuts, code examples, maintenance challenges, magic value pitfalls, and recommended practices such as using LambdaQueryWrapper, pagination, and avoiding overly complex SQL within MP.
JavaLambdaQueryWrapperMyBatis-Plus
0 likes · 8 min read

This article examines MyBatis-Plus, highlighting its convenient CRUD shortcuts and pagination features while warning about maintenance challenges, magic strings, and limited support for complex SQL, and offers practical recommendations for using LambdaQueryWrapper and organizing queries in backend Java projects.
JavaMyBatis-PlusORM
0 likes · 6 min read

This article explains how to create a custom @UserDataPermission annotation and a MyBatis-Plus interceptor that automatically injects WHERE clauses based on the current user's role, enabling fine‑grained data access control without modifying each mapper method.
Data PermissionInterceptorJava
0 likes · 14 min read

The article explains why the error "Transaction rolled back because it has been marked as rollback‑only" occurs in a Java Spring service when using MyBatis‑Plus saveBatch, how hidden @Transactional annotations cause hidden nested transactions, and presents a practical workaround by replacing the batch operation with a custom mapper.
JavaMyBatis-PlusSpring
0 likes · 7 min read

This article documents practical experiments comparing four MySQL bulk‑insert techniques—single‑row loop, concatenated SQL, MyBatis‑Plus saveBatch, and loop with batch mode—in a SpringBoot environment, revealing the most efficient approach and key configuration tips.
MyBatis-PlusMySQLSpringBoot
0 likes · 12 min read

This article explains how MyBatis-Plus's saveOrUpdate method works, why a primary‑key annotation is required, and how to control insert or update operations using UpdateWrapper or QueryWrapper, including code examples, common pitfalls, and practical tips for handling auto‑increment IDs.
JavaMyBatis-PlusORM
0 likes · 8 min read

This article provides a step‑by‑step tutorial on adding MyBatis‑Plus to a Spring Boot project, covering dependency setup, configuration, entity annotations, CRUD operations, pagination, logical deletion, enum handling, automatic field filling, multi‑datasource support, and testing with full code examples.
CRUDEnumJava
0 likes · 17 min read

This article provides a detailed tutorial on integrating MyBatis-Plus into a Spring Boot project, covering dependency setup, configuration, entity annotations, CRUD operations, pagination, logical deletion, enum handling, automatic field filling, and multi‑datasource support, with complete code examples.
CRUDEnumJava
0 likes · 17 min read

This article explains multi‑tenant concepts, compares three data isolation strategies, and provides a step‑by‑step MyBatis‑Plus implementation—including pagination interceptor configuration, code examples, testing, and ways to exclude specific SQL from tenant filtering—helping developers build scalable SaaS back‑ends.
JavaMyBatis-PlusPagination
0 likes · 7 min read

This article demonstrates how to implement a student score statistics query—calculating count, minimum, maximum, and average scores per term and subject—using Fluent MyBatis, native MyBatis, and MyBatis‑Plus, comparing code complexity, configuration, and generated code across the three approaches.
Fluent-MyBatisJavaMyBatis
0 likes · 9 min read

This article introduces MyBatis-Plus, explains its non‑intrusive features, demonstrates how to add Maven dependencies, examines the built‑in batch insert API, and provides step‑by‑step code to extend BaseMapper with a custom EasyBaseMapper for efficient MySQL batch inserts.
JavaMyBatis-PlusMySQL
0 likes · 6 min read
