简springmvc前台传数组参数到controller |
前台页面样式
jsp写死的页面写法:
<table class="zf-hxcy" border="0" cellspacing="0" cellpadding="0">
<tr>
<th>姓名</th>
<th>毕业院校</th>
<th>所属专业</th>
<th>联系电话</th>
<th>备注</th>
</tr>
<tr id="lastrow">
<td><input id="addname" name="usrs[0].name" type="text" value=""></td>
<td><input id="addyuxiao" name="usrs[0].collegeName" type="text" value="">
</td>
<td><input id="addzhuanye" name="usrs[0].profession" type="text" value="">
</td>
<td><input id="addphone" name="usrs[0].phone" type="text" value=""></td>
<td><input id="addremark" name="usrs[0].remark" type="text" value=""></td>
</tr>
</table>
后台controller写法:
实体类定义写法: