2016-04-27 20 views
0

は、私は次のように宣言してストアドプロシージャを持っています次のようになります。春データおよびストアドプロシージャ

public interface ProductAttributeReposirory extends JpaRepository<ProductAttribute, Long> { 

    @Procedure(name = "getAttributesForCategory") 
    List<ProductAttribute> getAttributesForCategory(@Param("catId") Long catId); 
} 

this example Oが、例外は、Springコンテキストのロード中に発生している:

org.springframework.beans.factory.BeanCreationException: 
Error creating bean with name 'productAttributeRepository': Invocation of init method failed; 
nested exception is org.springframework.data.mapping.PropertyReferenceException: 
No property getAttributesForCategory found for type ProductAttribute! 

私が間違って何が起こるのかを想像することはできません。誰でもできますか?

私はこれと同じ問題を抱えて、OUTの@StoredProcedureParameterを追加することによってそれを解決した

答えて

0

@StoredProcedureParameter(mode = ParameterMode.IN, name = "inVar", type = String.class), @StoredProcedureParameter(mode = ParameterMode.OUT, name = "outVar", type = ArrayList.class)

この時点で、私は2の異なるエラー」パラメータインデックスが出ているそうだけれども範囲の "

関連する問題