Ich habe eine gespeicherte Prozedur mit der folgenden Erklärung:Spring Data und gespeicherte Prozeduren
CREATE PROCEDURE GetAttributesForCategory(IN catId BIGINT(20))
In meinem Frühling Stiefel -backed App gibt es eine Einheit:
@Entity
@NamedStoredProcedureQueries({
@NamedStoredProcedureQuery(
name = "ProductAttribute.getAttributesForCategory",
procedureName = "GetAttributesForCategory",
parameters = {
@StoredProcedureParameter(name = "catId",
type = Long.class,
mode = ParameterMode.IN)
}
)
})
public class ProductAttribute {
...
}
Und der Korrespondent Repository sieht so aus:
public interface ProductAttributeReposirory extends JpaRepository<ProductAttribute, Long> {
@Procedure(name = "getAttributesForCategory")
List<ProductAttribute> getAttributesForCategory(@Param("catId") Long catId);
}
Alles ist nach t gemacht o this example, aber eine Ausnahme im Frühjahr Kontext Laden aufgetreten:
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!
Ich kann mich nicht vorstellen, was schief geht. Jeder kann?