0
我有如下声明一个存储过程:春数据和存储过程
CREATE PROCEDURE GetAttributesForCategory(IN catId BIGINT(20))
在我春天引导 -backed应用程序有一个实体:
@Entity
@NamedStoredProcedureQueries({
@NamedStoredProcedureQuery(
name = "ProductAttribute.getAttributesForCategory",
procedureName = "GetAttributesForCategory",
parameters = {
@StoredProcedureParameter(name = "catId",
type = Long.class,
mode = ParameterMode.IN)
}
)
})
public class ProductAttribute {
...
}
和记者资料库看起来像:
public interface ProductAttributeReposirory extends JpaRepository<ProductAttribute, Long> {
@Procedure(name = "getAttributesForCategory")
List<ProductAttribute> getAttributesForCategory(@Param("catId") Long catId);
}
所有是根据t Øthis example,但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!
我不能想象什么不顺心。任何人都可以?