总算解决了,注意事项: mapper方法无返回值 必须用map接受procedure返回值, 不能用多变量的形式,比如如下声明是错误的 public void test(@Param("input")int input, @Param("output")Integer output); 代码演示, mapper: @Select(value = "{call ptest( #{input, mode=IN, jdbcType=INTEGER}, #{output, mode=OUT, jdbcType=VARCHAR} )}") @Options(statementType = StatementType.CALLABLE) public void test(Map map); 代码演示, mapper client: public void test( int xxx){ Map map = new Hashtable(); map.put("input", 1); map.put("output", "-"); procDao.test(map); logger.info("o2 , " + map.get("output")); //binggo!! }
总算解决了,注意事项:
mapper方法无返回值
必须用map接受procedure返回值, 不能用多变量的形式,比如如下声明是错误的
代码演示, mapper:
代码演示, mapper client: