We would like to announce the release of MyBatis Velocity Scripting 1.0
It is an extension that allows you to use the Apache Velocity scripting language to generate your dynamic SQL queries on the fly.
Treat your SQL scripts as templates, mybatis will apply your parameters, generates the actual sql, bind the jdbc parameters and execute all for you. All templates are precompiled at load time, so they are very fast to execute.
It is very easy, look at the docs:
It is available as usual in maven central repository as a jar or a bundle.
Special thanks to Zaher Hammoud for its contributions.
The MyBatis Team.