May 16, 2021 17:00 0 Comment MyBatis
Can ids in MyBatis' different mapping files be duplicated?, It can be repeated, but the, namespace, that needs to map files is different, Different Xml mapping, files,, id, can be duplicated if, namespace, is c
May 16, 2021 17:00 0 Comment MyBatis
Principle:, Principle:, Although mybatis, parses Xml mapping files, sequentially, referenced B tags can still be defined anywhere, and Mybatis can be correctly identified., P
May 16, 2021 17:00 0 Comment MyBatis
Usually a mapper. XML corresponds to a DAO interface, can DAO be overloaded?, A: Cannot be overloaded, the method name corresponds to the mapper.xml file of an id, this corresponds to the method name, the system will be based on
May 16, 2021 17:00 0 Comment MyBatis
MyBatis Like fuzzy queries come in several ways, Mode 1:$ this way, simple, but can not prevent SQL injection, so it is not recommended to use, LIKE '%${name}%', Mode 2:, #, LIKE "%"#{name}"%", Inter
May 16, 2021 17:00 0 Comment MyBatis
1、if, 1、if, 2、where, 3、choose(when、otherwise), 4、tirm, 5、set, 6、foreach, 1、if, <select id="select" resultType="Blog"> SELECT * FROM BLOG WHERE state = ‘ACTIVE’ <if test="title != null"> AND title like #{title} </if><if test
May 16, 2021 17:00 0 Comment MyBatis
The difference between the two in MyBatis, #{}, Is precompiled processing, like the data passed in will be added a "" (#将传入的数据都当成一个字符串, will automatically pass in the data with a double quote),
May 16, 2021 18:00 0 Comment MyBatis
Level 1 cache:, Level 1 cache:, Secondary cache:, The caching mechanism relieves database pressure and improves database performance, Mybatis's cache is divided into two levels: first-level cache and
May 16, 2021 18:00 0 Comment MyBatis
MyBatis Timestamp does conditions for queries, The first step is to convert the condition to a timestamp, long startTime = TimeUtil.parseTimestamp(start); long endTime = TimeUtil.parseTimestamp(end
Dec 03, 2021 22:00 0 Comment MyBatis
MyBatis MyBatis is a Java persistence framework that couples objects with stored procedures or SQL statements using an XML descriptor or annotations. Unlike ORM frameworks, MyBatis does not map Java objects to database tables but Java methods to SQL statements.Besides, how is MyBatis an open source