Description
There is issue with Quick Start for building native image: the instructions for additional build and runtime args in "Appendix: How To use XML based Mapper" are not necessary. Instead of using these args, fix the error in example configuration file MyBatisNativeConfiguration.java, method "registerHints": remove the "dot" before asterisk from resources pattern. So it should be
Stream.of(
"org/apache/ibatis/builder/xml/*.dtd",
"org/apache/ibatis/builder/xml/*.xsd"
).forEach(hints.resources()::registerPattern);
After that change, mybatis with spring boot 3 native image is able to work offline and use classpath resource from library org/apache/ibatis/builder/xml/mybatis-3-mapper.dtd
instead of http://mybatis.org/dtd/mybatis-3-mapper.dtd
Not to mention, that the remote dtd file is anyway slightly outdated and missing some metadata from latest mybatis 3.5.11 release - for example "nullable" field from "foreach" element