Configuration is the centralized management center of the entire MyBatis configuration system. Most of the components learned above, such as Executor, StatementHandler, Cache, MappedStatement, are created and managed directly or indirectly by it. Also affects the behavior of these components
SqlNode (dynamic SQL script) Dynamic SQL xml elements will eventually be resolved into an executable script. MyBatis generates dynamic SQL by passing parameters to this script and executing script calculations. The script is embodied in MyBatis as SqlNode. First Mybatis
Nested mapping is in Mybatis. The so-called nested mapping is that the bean returned in ResultMap has the List attribute of other beans, so it is set to save duplicate attributes, because the data returned by relational data is two-dimensional, that is, the List in the bean is
Delayed loading When a nested query occurs, the first level return value BeanA has the attribute BeanB, while the second level return value BeanB has the attribute BeanA, which may lead to an endless loop, that is, circular dependency. Mybatis solves the circular dependency of nested queries by
/*** Default {@ link ResultSetHandler} implementation class * * @ author Clinton Begin * @ author Eduardo Macarron * @ author Iwao AVE! *@ author Kazuki Shimizu */ public class DefaultResultSetHa...
ParameterHandler ParameterHandler is translated into a parameter processor, which is responsible for dynamically assigning values to the SQL statement parameters of PreparedStatement./* ** A parameter handler sets the parameters of the {@code PreparedStatemen...
StatementHandler JDBC processor, builds JDBC Statement based on JDBC, sets parameters, and then executes Sql. Each time SQl is called in a session, there will be a unique Statement instance corresponding to it. Use ParameterHandler to configure parameters
No more
Loading failed, please refresh the page
Load more