Tag: mybatis
All the articles with the tag "mybatis".
Analyzing the ShardingJDBC Execution Flow
Uses the MyBatis call flow to analyze how ShardingJDBC 4.1.1 integrates with JDBC through custom DataSource, Connection, and PreparedStatement implementations. It traces parameter buffering, physical connection acquisition, and result-set handling, then simulates the proxy workflow with simplified code.
ShardingSphere (Part 4): Custom Encryption Strategies for Data Masking
Using ShardingSphere 4.1.1, this article implements and configures custom encryption strategies and traces SPI-based encryptor registration through the source code. It demonstrates Encryptor and QueryAssistedEncryptor separately, then verifies how an assisted-query column supports queries over differing ciphertext values.
Using ShardingSphere–ShardingJDBC (Part 3): Data Masking
Building on data sharding and read/write splitting, this article uses ShardingJDBC’s built-in algorithms to encrypt stored fields and decrypt query results. It verifies the configuration through inserts and queries and discusses full routing without a sharding key, including the number of tables queried and the maintainers’ explanation.
Relearning MyBatis (Part 5)
Analyzes how MyBatis getMapper uses JDK dynamic proxies to create proxy objects for Mapper interfaces. By tracing MapperProxy, MapperMethod, and SqlSession calls, it explains how Mapper methods become SQL operations without requiring handwritten interface implementation classes.