java.util.Optional is introduced in MyBatis 3.5.0 and MyBatis Generator introduced it for
MyBatis3DynamicSQL in 1.4.0, which means for
MyBatis3DynamicSQL, all code generated with MyBatis 1.4.0+ is only compatible with MyBatis 3.5.0+, which makes the information on the introduction page (
https://mybatis.org/generator/) wrong.