Java Architect Handbook
Java Architect Handbook
Apr 25, 2026 · Backend Development

Why MyBatis Mapper Interfaces Don't Need Implementation Classes

MyBatis generates mapper implementations at runtime using JDK dynamic proxies; the proxy intercepts interface calls, builds a statementId from the interface’s fully‑qualified name and method name, looks up the corresponding MappedStatement via the namespace‑id convention, and delegates execution to SqlSession, eliminating the need for a concrete class.

JDK Dynamic ProxyJavaMapperMethod
0 likes · 13 min read
Why MyBatis Mapper Interfaces Don't Need Implementation Classes