The difference between Mybatis and Hibbernate:
1: First of all, MYbatis is a semi-automatic framework;
Hibbernate is a fully automated framework;
2: MYbatis is a semi-automatic framework whose sql statements are written by ourselves, and the quality of sql statements can be controlled;
Hibbernate is a fully automated framework, its SQL statements are generated, and the quality of SQL statements cannot be controlled;
3: Differences in application scenarios:
Hibbernate is a fully automated framework, which is not conducive to use in some e-commerce projects. Because it will involve frequent modification of sql statements;
MYbatis is a semi-automatic framework, and its sql statements are written in the configuration file, which is convenient for modification; 5: Decoupling: MYbatis sql statements are written in the configuration file, which is easy to change The database has a high degree of decoupling; Hibbernate's sql statement has a low degree of decoupling, which is not conducive to changing the database;
1: First of all, MYbatis is a semi-automatic framework;
Hibbernate is a fully automated framework;
2: MYbatis is a semi-automatic framework whose sql statements are written by ourselves, and the quality of sql statements can be controlled;
Hibbernate is a fully automated framework, its SQL statements are generated, and the quality of SQL statements cannot be controlled;
3: Differences in application scenarios:
Hibbernate is a fully automated framework, which is not conducive to use in some e-commerce projects. Because it will involve frequent modification of sql statements;
MYbatis is a semi-automatic framework, and its sql statements are written in the configuration file, which is convenient for modification; 5: Decoupling: MYbatis sql statements are written in the configuration file, which is easy to change The database has a high degree of decoupling; Hibbernate's sql statement has a low degree of decoupling, which is not conducive to changing the database;