mybatis中的TypeAliasRegistry

TypeAliasRegistry是管理类型别名的,为别名到Class<?>的映射关系。其类结构为

resolveAlias:获取别名的对应class类型

registerAliases(packageName:String):注册包下的所有类(不包含内部类及接口)。如果类名有注解@Alias,别名为注解的,否则别名为type.getSimpleName()

registerAliases(package:String, superType:Class<?>):注册包下父类型为superType的所有类。

registerAliases(type:Class<?>):注册别名类type。别名为如果type有注解@Alias,则用注解的,否则使用type.getSimpleName()

registerAliases(alias:String, value:Class<?>):注册映射关系alias->value

默认的别名映射关系有

别名类型
stringString.class
byteByte.class
longLong.class
shortShort.class
intInteger.class
integerInteger.class
doubleDouble.class
floatFloat.class
booleanBoolean.class
byte[]Byte[].class
long[]Long[].class
short[]Short[].class
int[]Integer[].class
integer[]Integer[].class
dobule[]Double[].class
float[]Float[].class
boolean[]Boolean[].class
_byteByte.class
_longLong.class
_shortShort.class
_intInteger.class
_integerInteger.class
_doubleDouble.class
_floatFloat.class
_booleanBoolean.class
_byte[]Byte[].class
_long[]Long[].class
_short[]Short[].class
_int[]Integer[].class
_integer[]Integer[].class
_double[]Double[].class
_float[]Float[].class
_boolean[]Boolean[].class
dateDate.class
decimalBigDecimal.class
bigdecimalBigDecimal.class
bigintegerBigInteger.class
objectObject.class
date[]Date[].class
decimal[]BigDecimal[].class
bigdecimal[]BigDecimal[].class
biginteger[]BigInteger[].class
object[]Object[].class
mapMap.class
hashmapHashMap.class
listList.class
arraylistArrayList.class
collectionCollection.class
iteratorIterator.class
ResultSetResultSet.class
JDBCJdbcTransactionFactory.class
MANAGEDManagedTransactionFactory.class
JNDIJndiDataSourceFactory.class
POOLEDPooledDataSourceFactory.class
UNPOOLEDUnpooledDataSourceFactory.class
PERPETUALPerpetualCache.class
FIFOFifoCache.class
LRULruCache.class
SOFTSoftCache.class
WEAKWeakCache.class
DB_VENDORVendorDatabaseIdProvider.class
XMLXmlLanguageDriver.class
RAWRawLanguageDriver.class
SLF4JSlf4jImpl.class
COMMONS_LOGGINGJakaraCommonsLoggingImpl.class
LOG4JLog4jImpl.class
LOG4J2Log4j2Impl.class
JDK_LOGGINGJdk14LoggingImpl.class
STDOUT_LOGGINGStdOutImpl.class
NO_LOGGINGNoLogginImpl.class
CGLIBCglibProxyFactory.class
JAVASSISTJavassistProxyFactory.class

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

kgduu

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值