Https://mybatis.github.io/mybatis-3/zh/dynamic-sql.html ——————————————————————————————————————————————————————— One of the most powerful features of-mybatis is its dynamic statement functionality. If you have experienced using JDBC or similar frameworks before, you will understand how painful it is to connect SQL statement conditions together, make sure you can't forget the spaces or omit a comma after the columns column, and so on. Dynamic statements can completely solve the pain. Although working with dynamic SQL is not a party, MyBatis does improve these conditions by using powerful dynamic SQL in any mapped SQL statement. Dynamic SQL elements are very familiar to anyone who has used Jstl or a text processor like XML. In the previous release, it was necessary to understand and learn a very large number of elements, but there were many improvements in MyBatis 3, and now there are only about one-second elements left. MyBatis uses a powerful OGNL expression to eliminate most of the elements. ————————————————————————————————————————————————————————
MyBatis: Dynamic SQL