cannot receive out parameter from oracle procedure executed by mybatis

前端 未结 1 1134
臣服心动
臣服心动 2020-12-10 19:06

I develop java application using Spring 3.0.5 and I work with database Oracle using mybatis-spring.

I\'ve an interface for mybatis:

public interface          


        
1条回答
  •  孤城傲影
    2020-12-10 19:17

    I found solution. Map must be user instead of two parameter in canCustomerSubscribe method.

     void canCustomerSubscribe(Map params);
    

    mybatis xml content:

    
    

    (I need to add the commas between arguments attributes)

    calling it from subscribe service method:

    public void subscribe(String msisdn) throws InvalidArgumentException {
        Map params = new HashMap();
        params.put("msisdn", msisdn);
        params.put("responseCode", null);
        subscriberMapper.canCustomerSubscribe(params);
        System.out.println(params.get("responseCode"));
    }
    

    0 讨论(0)
提交回复
热议问题