Kin*_*n2k 5 java spring stored-procedures jpa hql
有趣的问题,我正在传递int
in并且它抱怨它不匹配类型:
org.springframework.dao.InvalidDataAccessApiUsageException: Parameter value [0] did not match expected type [java.lang.Integer]
@Procedure(procedureName = "dbo.do_cool_stuff_to_client")
void coolClientStuff(int clientId);
Run Code Online (Sandbox Code Playgroud)
它被称为如此:
public void someOtherMethod(int clientId){
clientRepository.coolClientStuff(clientId);
}
Run Code Online (Sandbox Code Playgroud)
事实证明,它有些愚蠢/笨拙,它确实要我放入类类型而不是原始类型。
更改方法签名以使用Integer
而不是int
固定它。
@Procedure(procedureName = "dbo.do_cool_stuff_to_client")
void coolClientStuff(Integer clientId);
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
12075 次 |
最近记录: |