springMVC的請求方法中處理多個mybatis方法,到某個方法中斷了:BindingException:has an unsupported return type


例如:
   
   
   
           
  1. @ResponseBody
  2. @RequestMapping(value = "toRequestDeleteDome", method = RequestMethod.POST)
  3. public ConverntReturnList deleteSomeHandler(@RequestParam("del_items[]") Integer[] array, @RequestParam("show_page") Integer curPageNum) {
  4. System.out.println(array.toString());
  5. productionDao.toDeleteYourSelction(array);
  6. PageHelper.startPage(curPageNum, 10);
  7. List<Production> list = productionDao.getAllProduction();
  8. int allResultPages = ((Page) list).getPages();
  9. int curResultPage = ((Page) list).getPageNum();
  10. return new ConverntReturnList(curResultPage, allResultPages, list);
  11. }
在運行 productionDao . toDeleteYourSelction ( array );之后,程序就死了,沒有運行下去,報錯如下:
mybatis的處理出錯:
  
  
  
          
  1. org.apache.ibatis.binding.BindingException:
  2. Mapper method 'com.dao.ProductionMapper.toDeleteSelection' has an unsupported return type: class [Ljava.lang.Integer;


實際情況:
sql刪除沒有返回值:
   
   
   
           
  1. <!--根據選擇刪除-->
  2. <delete id="toDeleteSelection" parameterType="arraylist">
  3. DELETE FROM ssh_info WHERE ssh_info.ID IN
  4. <foreach collection="array" item="item" open="(" separator="," close=")">#{item}</foreach>
  5. </delete>
但在mapper的dao中卻有返回值,這里出錯了
   
   
   
           
  1. Integer[] toDeleteSelection(Integer[] arr);
應該改為:
   
   
   
           
  1. void toDeleteSelection(Integer[] arr);






免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM