Tagged articles
738 articles
Page 8 of 8
Java Captain
Java Captain
Apr 6, 2019 · Backend Development

MyBatis Q&A: #{} vs ${}, Pagination Techniques, Caching, Lazy Loading, Executors, and Custom Plugin Development

This article explains MyBatis fundamentals including the difference between #{} and ${} placeholders, various pagination approaches, logical versus physical pagination, first‑ and second‑level caching, lazy‑loading mechanisms, executor types, pagination plugin principles, and how to create a custom MyBatis plugin with code examples.

MyBatisbackend-developmentcaching
0 likes · 8 min read
MyBatis Q&A: #{} vs ${}, Pagination Techniques, Caching, Lazy Loading, Executors, and Custom Plugin Development
Java Captain
Java Captain
Mar 9, 2019 · Fundamentals

Understanding Java Enums: Usage, Switch Cases, Singleton Implementation, and Database Integration

This article explores Java enums in depth, covering their basic definition, typical usage patterns such as iteration and switch statements, implementing singletons, integrating with databases via MyBatis type handlers, and addressing common misconceptions about memory consumption, illustrating each concept with clear code examples.

MyBatisSingletondatabase
0 likes · 7 min read
Understanding Java Enums: Usage, Switch Cases, Singleton Implementation, and Database Integration
Java Captain
Java Captain
Dec 30, 2018 · Backend Development

Using MyBatis3 Annotations to Replace XML Configuration: A Comprehensive Guide

This article provides a step‑by‑step tutorial on using MyBatis3 annotation‑based CRUD, mapping, and provider annotations to replace XML configuration in a Spring Boot project, covering basic annotations, result mapping, dynamic SQL, Maven dependencies, configuration files, entity classes, database scripts, controller code, and testing procedures.

CRUDMyBatisORM
0 likes · 11 min read
Using MyBatis3 Annotations to Replace XML Configuration: A Comprehensive Guide
Java Captain
Java Captain
Dec 26, 2018 · Backend Development

Understanding MyBatis Initialization: Configuration Creation and Design Patterns

This article explains the complete MyBatis initialization process, detailing how the XML configuration file is parsed into a Configuration object, how SqlSessionFactory and SqlSession are built, and highlights the Builder design pattern used throughout the setup, with code examples for manual configuration loading.

Builder PatternConfigurationInitialization
0 likes · 13 min read
Understanding MyBatis Initialization: Configuration Creation and Design Patterns
Java Captain
Java Captain
Nov 16, 2018 · Backend Development

Spring, Spring MVC, and MyBatis Interview Questions and Answers

This article compiles common interview questions and concise answers about Spring, Spring MVC, and MyBatis, covering core concepts such as IoC, AOP, transaction management, controller behavior, annotation usage, design patterns, MyBatis configuration, mapping techniques, pagination, and integration with Ajax.

MyBatisSpring MVCbackend-development
0 likes · 10 min read
Spring, Spring MVC, and MyBatis Interview Questions and Answers
Java Captain
Java Captain
Nov 5, 2018 · Backend Development

Implementing a High‑Concurrency Red Packet System with Java, MySQL, MyBatis, and Spring

This article demonstrates how to build a high‑concurrency red‑packet (抢红包) system using Java backend technologies—including MySQL table design, POJOs, MyBatis DAOs, Spring services with transaction management, and a web layer, and discusses performance testing, data consistency issues, and solutions such as pessimistic and optimistic locking.

MyBatisjavamysql
0 likes · 22 min read
Implementing a High‑Concurrency Red Packet System with Java, MySQL, MyBatis, and Spring
Java Captain
Java Captain
Oct 8, 2018 · Backend Development

Spring Boot Tutorial: Building a Rental Service with MyBatis Integration

This article provides a step‑by‑step guide to creating a Spring Boot application, generating a project template, adding a MyBatis‑based persistence layer, implementing service and controller layers, configuring the database, and running the application to expose REST endpoints.

MyBatisREST APISpring Boot
0 likes · 9 min read
Spring Boot Tutorial: Building a Rental Service with MyBatis Integration
Java Backend Technology
Java Backend Technology
Sep 7, 2018 · Backend Development

How MyBatis Instantiates Mapper Interfaces with JDK Dynamic Proxies

This article explains how MyBatis uses JDK dynamic proxies—specifically a custom “投鞭断流” approach—to automatically create mapper interface implementations, walks through code examples, analyzes core source files, and clarifies why method overloading is prohibited in mapper interfaces.

Dynamic ProxyMyBatisjava
0 likes · 5 min read
How MyBatis Instantiates Mapper Interfaces with JDK Dynamic Proxies
Java Captain
Java Captain
Aug 12, 2018 · Backend Development

Key Points for Building a Traditional Java Web Project: Environment Setup, DAO, Service, Controller, and Spring Integration

This article systematically outlines the essential steps and considerations for creating a classic Java web application, covering environment preparation, Maven scaffolding, logging and database dependencies, DAO design with MyBatis, Spring integration, service-layer best practices, and RESTful controller implementation.

BackendMyBatisWeb Development
0 likes · 9 min read
Key Points for Building a Traditional Java Web Project: Environment Setup, DAO, Service, Controller, and Spring Integration
Architect's Tech Stack
Architect's Tech Stack
Aug 12, 2018 · Backend Development

Investigating MyBatis SqlSession.clearCache() Ineffectiveness and Transaction Isolation Level Solution

Through detailed debugging and source code analysis, the author discovers that MyBatis's SqlSession.clearCache() does clear the first‑level cache, but the observed stale query results are caused by MySQL's default REPEATABLE‑READ isolation level, which can be resolved by setting the transaction isolation to READ COMMITTED.

CacheMyBatisdebugging
0 likes · 8 min read
Investigating MyBatis SqlSession.clearCache() Ineffectiveness and Transaction Isolation Level Solution
Java Captain
Java Captain
Jul 25, 2018 · Backend Development

Integrating Alipay Payment into an SSM (Spring + Spring MVC + MyBatis) Framework

This tutorial provides a step‑by‑step guide for configuring the Alipay sandbox, generating keys, setting up the required database tables, and integrating Alipay payment APIs into a Java SSM project, complete with code snippets, configuration details, and troubleshooting tips.

AlipayMyBatisPayment Integration
0 likes · 15 min read
Integrating Alipay Payment into an SSM (Spring + Spring MVC + MyBatis) Framework
Java Captain
Java Captain
Jun 21, 2018 · Backend Development

Step-by-Step Guide to Building a Spring Boot MyBatis Demo Project

This article provides a detailed tutorial for creating a Spring Boot project with MyBatis, including environment setup, Maven dependencies, configuration files, database creation, MyBatis generator usage, and sample controller, service, and mapper code, enabling pagination with PageHelper and testing via HTTP requests.

MyBatisSpring Bootbackend-development
0 likes · 14 min read
Step-by-Step Guide to Building a Spring Boot MyBatis Demo Project
Java Captain
Java Captain
Jun 18, 2018 · Backend Development

Building a Spring Boot Web Application with MyBatis and Redis Caching

This tutorial demonstrates how to quickly build a modern Java web application using Spring Boot, integrate MyBatis as the ORM, configure Redis as a second‑level cache, and write unit tests with H2, providing step‑by‑step code and configuration details for backend developers.

MyBatisSpring Bootbackend-development
0 likes · 17 min read
Building a Spring Boot Web Application with MyBatis and Redis Caching
Java Captain
Java Captain
Jun 2, 2018 · Backend Development

Understanding the SSM Framework: Integration of Spring MVC, Spring, and MyBatis

This article explains the SSM framework, detailing how Spring MVC, Spring, and MyBatis are integrated into a standard MVC architecture, describing their roles, underlying principles, and step‑by‑step guidance for building a functional feature with entities, mappers, services, controllers, and JSP views.

BackendMVCMyBatis
0 likes · 4 min read
Understanding the SSM Framework: Integration of Spring MVC, Spring, and MyBatis
Qunar Tech Salon
Qunar Tech Salon
May 9, 2018 · Backend Development

Resolving Spring Startup StackOverflowError Caused by @Autowired and MyBatis MapperFactoryBean

The article analyzes a StackOverflowError that occurs during Spring application startup after upgrading to JDK 8, tracing the deep bean‑creation call chain caused by extensive use of @Autowired with MyBatis MapperFactoryBean, and recommends upgrading mybatis‑spring and switching to @Resource to prevent the overflow.

AutowiredDependencyInjectionMyBatis
0 likes · 9 min read
Resolving Spring Startup StackOverflowError Caused by @Autowired and MyBatis MapperFactoryBean
Java Captain
Java Captain
Apr 24, 2018 · Backend Development

Getting Started with MyBatis: Understanding the Framework, Configuration, and CRUD Example in Java

This article introduces MyBatis as a lightweight persistence framework for Java, explains its history and core concepts, compares it with Hibernate, and provides a step‑by‑step guide with configuration files, entity classes, mapper interfaces, XML mappings, utility classes, and a test service to perform basic CRUD operations.

BackendCRUDMyBatis
0 likes · 14 min read
Getting Started with MyBatis: Understanding the Framework, Configuration, and CRUD Example in Java
Java Captain
Java Captain
Apr 23, 2018 · Backend Development

Overview of Common Java Backend Technologies: Spring MVC, Spring, MyBatis, Dubbo, Maven, RabbitMQ, Log4j, Ehcache, Redis, Shiro, and Design Patterns

This article provides a comprehensive introduction to essential Java backend technologies—including Spring MVC, Spring IoC/AOP, MyBatis, Dubbo, Maven, RabbitMQ, Log4j, Ehcache, Redis, Shiro—and outlines basic design‑pattern concepts, helping developers understand their roles, core mechanisms, and practical usage.

Design PatternsDubboMyBatis
0 likes · 13 min read
Overview of Common Java Backend Technologies: Spring MVC, Spring, MyBatis, Dubbo, Maven, RabbitMQ, Log4j, Ehcache, Redis, Shiro, and Design Patterns
Java Captain
Java Captain
Apr 5, 2018 · Backend Development

Guide to Integrating Spring Framework, Spring MVC, and MyBatis

This article provides a step‑by‑step tutorial on building a Spring container, configuring Spring MVC with DispatcherServlet, setting up essential beans such as multipartResolver, custom handler mapping, handler adapter, view resolver, component scanning, and finally integrating MyBatis with SqlSessionFactoryBean and SqlSessionTemplate for a complete Java backend solution.

MyBatisSpring MVCXML Configuration
0 likes · 10 min read
Guide to Integrating Spring Framework, Spring MVC, and MyBatis
Java Captain
Java Captain
Mar 20, 2018 · Backend Development

Implementing Pagination in a Java Web Application with Spring MVC and MyBatis

This article demonstrates how to implement page-based data retrieval in a Java web application using Spring MVC, MyBatis, and a custom Page utility class, covering the creation of the pagination class, mapper XML, DAO interfaces, service logic, controller handling, and JSP pagination controls.

BackendMyBatisSpring MVC
0 likes · 10 min read
Implementing Pagination in a Java Web Application with Spring MVC and MyBatis
Java Backend Technology
Java Backend Technology
Mar 4, 2018 · Backend Development

Why is DefaultSqlSession Not Thread‑Safe and How Does SqlSessionTemplate Ensure Safety?

This article examines the thread‑unsafe nature of MyBatis's DefaultSqlSession, explains how SqlSessionTemplate and SqlSessionManager use proxy and ThreadLocal mechanisms to provide safe database access in Spring‑integrated environments, and presents related interview questions for deeper understanding.

Java PersistenceMyBatisSpring Integration
0 likes · 7 min read
Why is DefaultSqlSession Not Thread‑Safe and How Does SqlSessionTemplate Ensure Safety?
Meituan Technology Team
Meituan Technology Team
Jan 18, 2018 · Backend Development

Analysis of MyBatis First‑Level and Second‑Level Cache Mechanisms

The article thoroughly examines MyBatis’s first‑level (session) and second‑level (namespace) caches, detailing their configurations, internal workflows, source‑code implementations, experimental behaviors, common pitfalls such as stale or dirty data, and advises disabling built‑in caching in favor of dedicated solutions for production.

CacheMyBatisORM
0 likes · 25 min read
Analysis of MyBatis First‑Level and Second‑Level Cache Mechanisms
Programmer DD
Programmer DD
Jan 14, 2018 · Backend Development

Integrating Spring Security with MyBatis for Database‑Based Login

This guide shows how to combine Spring Security and MyBatis to implement username‑password authentication backed by a MariaDB database, covering repository cloning, database setup, Maven execution, and a deep dive into the underlying authentication filter and provider classes with code examples.

AuthenticationMyBatisSpring Boot
0 likes · 9 min read
Integrating Spring Security with MyBatis for Database‑Based Login
ITPUB
ITPUB
Oct 14, 2017 · Databases

Cutting a Slow Oracle Search Query from Cost 13902 to Under 100

This article walks through diagnosing a sluggish Oracle search query with many optional filters, removing unnecessary joins and function calls, applying conditional MyBatis joins, and creating composite indexes to dramatically lower the execution plan cost from 13902 to under 100.

MyBatisOracleindexing
0 likes · 11 min read
Cutting a Slow Oracle Search Query from Cost 13902 to Under 100
ITPUB
ITPUB
Jul 21, 2017 · Databases

How to Fix MySQL Emoji Errors with utf8mb4: A Complete Guide

This article explains why MySQL throws "Incorrect string value" when storing emojis, how utf8mb4 solves the problem, and provides step‑by‑step instructions—including table conversion, my.cnf changes, connector upgrades, and runtime workarounds—for reliable emoji storage.

Character SetEmojiJDBC
0 likes · 7 min read
How to Fix MySQL Emoji Errors with utf8mb4: A Complete Guide
Java Backend Technology
Java Backend Technology
Dec 29, 2016 · Backend Development

Mastering Database Read/Write Splitting with Spring AOP: A Practical Demo

This article explains the concept of read/write splitting in distributed databases, outlines two implementation methods—static dual data sources and dynamic AOP-based switching—provides a complete Spring‑MyBatis demo with configuration files, code snippets, and guidance on setting up master and slave connections.

Database ReplicationMaster‑SlaveMyBatis
0 likes · 7 min read
Mastering Database Read/Write Splitting with Spring AOP: A Practical Demo
Java Backend Technology
Java Backend Technology
Sep 22, 2016 · Backend Development

How to Build a Flexible Business Log System with Koala and MyBatis

This article introduces the ufind-businesslog framework, explains its improvements over the original Koala project, and provides step‑by‑step guidance on configuring annotations, Groovy log templates, thread pools, and custom exporters to achieve non‑intrusive, asynchronous business logging in Java applications.

GroovyMyBatisbusiness log
0 likes · 14 min read
How to Build a Flexible Business Log System with Koala and MyBatis