Java Web????????????????
???????????? ???????[ 2012/9/14 10:36:10 ] ????????
??????????j2ee????У???????????????Щ??????????????β??????????????????????????о?ī????????п??????Щ??????????????????
???????????????????????????????????????Щ?????????С???????????????????????????????????λ???????????????????顣
??????spring+struts2+hibernate??????????????????????????????????action???????νmvc??controller??????action????????????service??servce?????ó?ò?dao????????????н????????action????????action??????????????棬?????????????????
??????????????????п??????????????dao????????SQLException??service???????NullPointException??action???????IOException???????????????????δ???????????ò???????????У????????????????????????????dao??service??action??δ???????????????????????????????????????????????????棬???????????????
?????????????????????????????壬?????????????????????????????
???????java???????????????????????????????throws?????β??????дtry...catch????catch???в????κβ????????????printStackTrace()??????????????????????????????????????????????????????????治??????????????????????????????????????bug???????????????????
?????????????????????????????????????java???????????????????????????action???????????????????????log???????????????????????????????????????????????????
//??????????? Log log = LogFactory.getLog(this.getClass()); //action??????????????? public String save(){ try{ //????service??save???? service.save(obj); }catch(Exception e){ log.error(...); //???log??? return "error"; ?????error??? } return "success"; } |
????????????????????????????????????????????????????????????????????????????????????????????
???????????????????????????????????????Щ?????????????????????????????????????????????
?????????spring???????????????????????????????RuntimeException?????3????????????????????y???try...catch????
??????????????????дtry...catch??????catch????????????????????????????????????????????????????????????????????????????????????????????????????UT case??
????????????к????????????????????????????????????????д?????????????????η?????????“????????в?????????????”??????????????????????????????????????????Щ?????磺??????????????????????????????????????????????bug?????
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11