Advantages and disadvantages of MyBatis
After using the MyBatis framework, compared to the previous Hibernate framework, the individual felt mybatis the advantages of a lot of, at least more simple than hibernate easy to use.
Separation of SQL statements from code
Benefits: Easy to manage and maintain
Disadvantage: Not easy to debug, need to use log tool to get information
jdbc--Using breakpoint Debugging
mybatis--Use log4j debugging
Using tags to control the concatenation of dynamic SQL
Advantages: Use labels instead of writing logical code
Disadvantage: When stitching complex SQL statements, there is no code flexibility, more complex
Automatic mapping of result sets and Java objects
Advantages: Ensure the same name can be automatically mapped
Disadvantage: SQL dependencies written by developers are strong
Writing native SQL
Advantages: Close to JDBC, very flexible
Disadvantages: High reliance on SQL statements, semi-automatic, database transplant inconvenient
I'm not sure you've used the MyBatis frame program. What does an ape think?