mybatis
报错:dao层调用存储过程导致报错
org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.executor.ExecutorException: No constructor found in void matching [java.lang.Short]
原因是存储过程是有返回值的,而我调用存储过程没有接收,这里只需将void改为Integer即可(这里根据存储过程返回值的类型)
@Select("exec FUCloseCase #{caseid},#{SiteID},#{User},#{ClosedReasonID},#{UserComment} ")
void FUCloseCase(@Param("caseid") Integer caseid, @Param("SiteID") Integer SiteID,
@Param("User") String User, @Param("ClosedReasonID") Integer ClosedReasonID,
@Param("UserComment") String UserComment);
正确写法
@Select("exec FUCloseCase #{caseid},#{SiteID},#{User},#{ClosedReasonID},#{UserComment} ")
Integer FUCloseCase(@Param("caseid") Integer caseid, @Param("SiteID") Integer SiteID,
@Param("User") String User, @Param("ClosedReasonID") Integer ClosedReasonID,
@Param("UserComment") String UserComment);