MyBatis 随笔

发布时间 2023-03-30 18:20:28作者: OP_DoSOG

MyBatis传参parameterType
parameterType:接口中方法参数的类型, 类型的完全限定名或别名

如:parameterType = "java.lang.Integer" parameterType = "int"

这个属性是可选的,因为可以推断出具体传入语句的参数,默认值为未设置(unset)。接口中方法的参数从 java 代码传入到 mapper 文件的 sql 语句

注:

parameterType 不是强制的,MyBatis 通过反射机制 能够发现接口参数的数据类型 可以省略不写(一般省略不写)

 

 

 

 

 

 

别名
映射的类型
_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
mapMap/HashMap————————————————版权声明:本文为CSDN博主「MinggeQingchun」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。原文链接:https://blog.csdn.net/MinggeQingchun/article/details/122754507