有一个有趣的问题,我传递了一个int
类型的值,但是系统抱怨它不匹配类型:
org.springframework.dao.InvalidDataAccessApiUsageException: 参数值[0]与期望的类型[java.lang.Integer]不匹配
@Procedure(procedureName = "dbo.do_cool_stuff_to_client")
void coolClientStuff(int clientId);
它被称为这样:
public void someOtherMethod(int clientId){
clientRepository.coolClientStuff(clientId);
}
Integer
。是否有其他@Procedure
情况下,int会被用作Integer的替代?我对这个注释不熟悉。 - CubeJockey== Integer.class
,而没有考虑int.class
。 - Vivin Paliath