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

為了賬號安全,請及時綁定郵箱和手機(jī)立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

SpringMVC報400錯誤怎么修改,幫幫我,急

SpringMVC報400錯誤怎么修改,幫幫我,急

坐著竹筏漂流 2018-01-26 21:55:07
做了一個添加信息的demo,用了SpringMVC的form表單 //有一部分?jǐn)?shù)據(jù)需要回顯 <a?href="emp">Add?New?Employee</a> //對應(yīng)回顯的控制器的方法 @RequestMapping(value="/emp",method?=?RequestMethod.GET) public?String?getDepts(Map<String,?Object>?map)?{ ????map.put("departments",?departmentDao.getDepartments()); ????map.put("employee",?new?Employee()); ????return?"add"; } //添加信息的表單 <center> ????<h4>添加員工</h4> ????<form:form?action="emp"?method="POST"?modelAttribute="employee"> ????????<!--?path屬性值對應(yīng)HTML表單標(biāo)簽的name屬性值?--> ????????Name:<form:input?path="name"/> ????????<br><br> ????????Email:<form:input?path="email"/> ????????<br><br> ????????<% ????????????Map<String,String>?genders?=?new?HashMap<String,String>(); ????????????genders.put("0",?"Male"); ????????????genders.put("1",?"Female"); ????????????request.setAttribute("genders",?genders); ????????%> ????????Gender:<form:radiobuttons?path="gender"?items="${genders}"/> ????????<br><br> ????????Department:<form:select?path="dept"?items="${departments}"?itemLabel="name"? ????????????????????????itemValue="id"></form:select> ????????<br><br> ????????<input?type="submit"?value="點(diǎn)擊提交"> ????</form:form> </center> //對應(yīng)添加信息控制器的方法 @RequestMapping(value="/emp",method?=?RequestMethod.POST) public?String?addEmp(Employee?employee)?{ ????employeeDao.save(employee); ????return?"redirect:/emps"; }
查看完整描述

1 回答

?
fullee

TA貢獻(xiàn)5條經(jīng)驗 獲得超39個贊

http協(xié)議中400是指參數(shù)錯誤,你檢查一下入?yún)⒂袥]有問題

查看完整回答
反對 回復(fù) 2018-01-26
  • 1 回答
  • 0 關(guān)注
  • 1494 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

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

幫助反饋 APP下載

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

公眾號

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