One. MyBatis Default support aliases
Alias |
Types of mappings |
_byte |
Byte |
_long |
Long |
_short |
Short |
_int |
Int |
_integer |
Int |
_double |
Double |
_float |
Float |
_boolean |
Boolean |
String |
String |
Byte |
Byte |
Long |
Long |
Short |
Short |
Int |
Integer |
Integer |
Integer |
Double |
Double |
Float |
Float |
Boolean |
Boolean |
Date |
Date |
Decimal |
BigDecimal |
BigDecimal |
BigDecimal |
2. Custom aliases
<typeAliases>
<!--<typealias type= "Com.jjt.ssm.pojo.Tuser" alias= "Tuser"/>--
<package name= "Com.jjt.ssm.pojo"/>
</typeAliases>
3. Loading the mapping file via the Mapper interface
The general loading method is
Follow some specifications: You need to keep the Mapper interface class name and the Mapper.xml mapping file name consistent and below the same directory
The premise of the above specification is that the method of using the Mapper proxy
MyBatis Learning Path (c) alias (typealiases) mapper interface load Map file