JavaSQL Mybatis 1 min read

MyBatis 3.6.0 Raises Minimum Runtime to Java 11 and Drops Java 8

MyBatis 3.6.0 sets Java 11 as its minimum runtime, adds immutable collection constructor support, nested cursors and a new @NamedResultMap annotation, and fixes a lazy-loading memory leak.

MyBatis 3.6.0 is out. Maintainer Jeremy Landis published this minor release on October 23, setting Java 11 as the minimum runtime version and dropping Java 8 support.

The codebase replaces isAccessible() with canAccess(), moves file handling to NIO, and updates collection and string-tokenizer usage. Constructor-based creation now supports immutable collections and automatically picks the best-matching constructor when javaType is missing or partly specified. Cursors gain nested support and improved closeable behavior. Annotations get a new @NamedResultMap and resultOrdered for selects and select providers. MapperMethodInvoker is now public. Type handler resolution works from java.lang.reflect.Type instead of Class and respects runtime JDBC types.

Fixes resolve <bind> inside <foreach>, unknown elements inside <choose>, java.sql.Date versus java.util.Date mixups, an Oracle implicit cursor workaround, and a memory leak involving ErrorContext thread-locals in lazy loading. Tomcat handling now deals with invalid path exceptions. Clearer exceptions replace null pointers in Reflector.getSetterType and unclosed index brackets in PropertyTokenizer.

Performance work reduces inline ResultMap memory use, optimizes TypeParameterResolver, and reuses SqlNode instances for empty text nodes. Automated updates bump dependencies to log4j2 2.26.1, PostgreSQL JDBC 42.7.14, MySQL Connector/J 26.10.0, JUnit 6, Mockito 5.24.0, and Maven 3.10.0. Twenty-one developers made their first contribution.