捕獲異常類ExcptionHardle里的方法是被哪里調用的?
public?Result?handle?(Integer?code,?Exception?e)?{ ????return?ResultUtil.error(code,?e.getmessage()); }
請問我在這個方法里添加了一個參數code,他是怎么調用這個方法傳值呢?本人springboot新人,請詳解,thanks.
public?Result?handle?(Integer?code,?Exception?e)?{ ????return?ResultUtil.error(code,?e.getmessage()); }
請問我在這個方法里添加了一個參數code,他是怎么調用這個方法傳值呢?本人springboot新人,請詳解,thanks.
2017-08-24
舉報
2017-08-24
是當你你Contorller中throw的時候