第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會(huì)有你想問的

請(qǐng)大神解答,我請(qǐng)求page 結(jié)尾的請(qǐng)求,他進(jìn)入了json里面處理?請(qǐng)大神看看什么原因造成的?跪謝。

請(qǐng)大神解答,我請(qǐng)求page 結(jié)尾的請(qǐng)求,他進(jìn)入了json里面處理?請(qǐng)大神看看什么原因造成的?跪謝。

qq_綠葉也有_0 2018-05-09 21:00:59
?控制層代碼如下: ?//取到的哪個(gè)頁面 ????@RequestMapping("/dept.page") ????public?ModelAndView?page(){ ????????return??new?ModelAndView("dept"); ????} //新增部門的方法 ????@RequestMapping("/save.json") ????@ResponseBody ????public?JsonData?saveDept(DeptParam?param){ ????????sysDeptService.save(param); ????????return?JsonData.success(); ????}??//1 ????@RequestMapping("/Tree.json") ????@ResponseBody ????public?JsonData?tree(){ ????????List<DeptLevelDto>?dtoList?=?sysTreeService.deptTree(); ????????return?JsonData.success(dtoList); ????} ???請(qǐng)求處理攔截:如下 public?class?SpringExceptionResolver?implements?HandlerExceptionResolver?{ ????public?ModelAndView?resolveException(HttpServletRequest?request,?HttpServletResponse?response,?Object?o,?Exception?ex)?{ ????????String?url?=?request.getRequestURI().toString(); ????????ModelAndView?mv?; ????????String?defaultMsg?=?"System?error"; ????????//這里我們要求項(xiàng)目中的所有請(qǐng)求json數(shù)據(jù),都使用json結(jié)尾 ????????if(url.endsWith(".json")){ ????????????if(ex?instanceof?SmallException?||?ex?instanceof?ParamException){ ????????????????JsonData?result?=?JsonData.fail(ex.getMessage()); ????????????????mv?=?new?ModelAndView("jsonView",result.toMap()); ????????????}else?{ ????????????????System.out.print(ex); ????????????????JsonData?result?=?JsonData.fail(defaultMsg); ????????????????mv?=?new?ModelAndView("jsonView",result.toMap()); ????????????} ????????????//我們要求項(xiàng)目中所有請(qǐng)求page頁面,都是用.page結(jié)尾 ????????}else?if(url.endsWith(".page")){ ????????????//log.error("unknow?page?exception,url"+?url,ex); ????????????JsonData?result?=?JsonData.fail(defaultMsg); ????????????mv?=?new?ModelAndView("exception",result.toMap()); ????????}else?{ ????????????//log.error("unknow?exception,url"+?url,ex); ????????????JsonData?result?=?JsonData.fail(defaultMsg); ????????????mv?=?new?ModelAndView("jsonView",result.toMap()); ????????} ????????return?mv; ????} } 業(yè)務(wù)層代碼:如下: @Resource private?SysDeptMapper?sysDeptMapper; //新增 public?void?save(DeptParam?param){ ????BeanValidator.check(param); ????if(checkExist(param.getParentId(),param.getName(),param.getId())){ ????????throw?new?ParamException("同一層級(jí)下存在相同的部門"); ????} ????SysDept?dept?=?SysDept.builder().name(param.getName()).parentId(param.getParentId()) ????????????.seq(param.getSeq()).remark(param.getRemark()).build(); ????dept.setLevel(LevelUtil.calculatelevel(getLevel(param.getParentId()),param.getParentId())); ????dept.setOperator("System");//TODO ????dept.setOperateIp("127.0.0.1");//TODO ????dept.setOperateTime(new?Date()); ????sysDeptMapper.insertSelective(dept); } 錯(cuò)誤提示:如下 url:{}?,?param:{}/sys/dept/dept.page{}五月?09,?2018?8:38:40? 下午?org.springframework.web.servlet.PageNotFound?noHandlerFound警告: ?No?mapping?found?for?HTTP?request?with?URI?[/sys/dept/tree.json] ??in?DispatcherServlet?with?name?'spring'五月?09,?2018?8:38:40?下午 ???org.springframework.web.servlet.PageNotFound?noHandlerFound警告: ????No?mapping?found?for?HTTP?request?with?URI?[/favicon.ico]? ????in?DispatcherServlet?with?name?'spring'url:{}?,? ????param:{}/sys/dept/save.json{"parentId":["0"],"id":[""],"name":["shiye"],"seq":["1"], ????"remark":["gds"]}org.springframework.web.util.NestedServletException:?Handler? ????dispatch?failed;?nested?exception?is?java.lang.StackOverflowError ???? ???? ???? ????以上是新增部門信息,報(bào)的錯(cuò)誤,數(shù)據(jù)庫測(cè)試鏈接成功
查看完整描述

1 回答

?
cxxyjsj

TA貢獻(xiàn)119條經(jīng)驗(yàn) 獲得超22個(gè)贊

異常日志里面寫的很清楚找不到tree.json,? 貼出來的代碼中RequestMapping是Tree.json, 大小寫不一致

查看完整回答
反對(duì) 回復(fù) 2018-05-10
  • 1 回答
  • 0 關(guān)注
  • 948 瀏覽

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)