带有弹簧JPA的具有多个输出参数的调用过程

时间:2019-05-21 14:05:00

标签: java spring stored-procedures spring-data-jpa

我正在尝试使用Spring JPA调用具有多个输出参数的过程 虽然我确实有一个单独的out参数的代码,如下所示

@NamedStoredProcedureQueries({
@NamedStoredProcedureQuery(name = "velocitycheck", procedureName = "velocitycheck", parameters = {
        @StoredProcedureParameter(mode = ParameterMode.IN, name = "vWalletid", type = String.class),
        @StoredProcedureParameter(mode = ParameterMode.IN, name = "itxncode", type = Integer.class),
        @StoredProcedureParameter(mode = ParameterMode.IN, name = "damount", type = Double.class),
        @StoredProcedureParameter(mode = ParameterMode.OUT, name = "errORcode", type = String.class) })
})

@Entity
@Table(name = "transaction")
public class Transaction {
    @Id
    @Column(name = "id")
    private String id;
}

----------------------------------------------------------------------------
@Transactional
@Repository("dbProcedureRepository")
public interface DBProcedureRepository
extends JpaRepository<Transaction, String>, JpaSpecificationExecutor<Transaction> {
    @Procedure(procedureName = "velocitycheck")
    public String velocityCheck(String walletId, Integer txnCode, Double txnAmount);
}

到目前为止,我已经找到了这个Spring Jira Issue链接,该链接指出这是春季时尚未解决的已知问题。

我想知道的是,有人对此情况有解决方法。

0 个答案:

没有答案