적어도 스프링 페치 리포 지 토리 (spring crud repository) 또는 페이징 저장소 (paging repository)를 사용하여 스프링 저장 프로 시저를 사용할 수 있는지 여부를 설명 할 수 있습니까?spring 데이터 리포지토리와 함께 spring storedprocedure를 사용하는 방법
스프링 저장소와 스프링 저장 프로 시저를 사용하는 기존 코드를 통합하려고합니다. 하지만 JPA를 사용하고 싶지 않습니다. 먼저 아래와 같이 JPA reporsitory 인터페이스의 통화를 엔티티
@Entity
@Table(name = "MY_TABLE")
@NamedStoredProcedureQueries({
@NamedStoredProcedureQuery(name = "proc_with_input",
procedureName = "pkg.proc_with_input",
parameters = {
@StoredProcedureParameter(mode = ParameterMode.IN, name = "inputParam", type = String.class)
}),
@NamedStoredProcedureQuery(name = "proc_with_input_output",
procedureName = "pkg.proc_with_input_output",
parameters = {
@StoredProcedureParameter(mode = ParameterMode.IN, name = "inputParam", type = String.class),
@StoredProcedureParameter(mode = ParameterMode.OUT, name = "outputParam", type = String.class)
})
})
public class MyTable implements Serializable {
// Table properties
// Setters and Getters
}
의 발동을 저장 프로 시저를 선언
아래
OP는 JPA –