<form action= "" > <input id= "Dbserverlist[0].name" Value= "Server1" /> <input id= "dbserverlist[0].parent" Value= "Abstractserver" /> < Input id= "Dbserverlist[0].factoryconfig.propertylist[0].name" value= "valueipAddress"/> <input id= "Dbserverlist[0].factoryconfig.propertylist[0].value" Value= "192.168.202.129"/> <input id= "Dbserverlist[0].factoryconfig.propertylist[1].name" value= "user" /> <input id= "dbserverlist[0].factoryconfig.propertylist[1]. Value " value=" "root" /> <input id="Dbserverlist[0].factoryconfig.propertylist[2].name" value= "password" /> <input id= "Dbserverlist[0].factoryconfig.propertylist[2].value" value= "xxxxxx" /> < Input id= "Dbserverlist[0].factoryconfig.propertylist[3].name" value= "characterEncoding" /> <input id= "dbserverlist[0]. Factoryconfig.propertylist[3].value " value=" UTF8 " /> <input id= "Dbserverlist[0].factoryconfig.propertylist[4].name" Value= "Port" /> <input id= " Dbserverlist[0].factoryconfig.propertylist[4].value " value=" 3306 " /> < input id= "Dbserverlist[0].factoryconfig.propertylist[5].name" value= "BelongUsers" /> <input id= "Dbserverlist[0].factoryconfig.propertylist[5].value" value= "' Root ', ' root1 '" /> <input id= "dbserverlist[1]. Name " value=" Server2 " /> <input id=" dbserverlist[1]. Parent " value=" Abstractserver " /> <input id= "Dbserverlist[1].factoryconfig.propertylist[0].name" value= "valueipAddress" /> <input id= "dbserverlist[1].factoryconfig.propertylist[0]. Value " value=" 192.168.202.129 "/> <input id= "Dbserverlist[1].factoryconfig.propertylist[1].name" value= "user" /> <input id= "Dbserverlist[1].factoryconfig.propertylist[1].value" value= "root" /> <input id= "dbserverlist[1].factoryconfig.propertylist[2].name" value= "password" /> <input id= "dbserverlist[1].factoryconfig.propertylist[ 2].value " value=" xxxxxx " /> <input id= "Dbserverlist[1].factoryconfig.propertylist[3].name" value= "characterEncoding" /> <input id= "dbserverlist[1]. Factoryconfig.propertylist[3].value " value=" UTF8 " /> <input id= "Dbserverlist[1].factoryconfig.propertylist[4].name" Value= "Port" /> <input id= "dbserverlist[1]. Factoryconfig.propertylist[4].value " value=" 3306 " /> <input id= "Dbserverlist[1].factoryconfig.propertylist[5].name" Value= "Belongusers" /> <input id= "dbserverlist[1". Factoryconfig.propertylist[5].value " value=" ' root ', ' root1 ' /> </form>
Controller
[Java]View Plain copy @RequestMapping (value= "/dbservers", method=requestmethod.put) public Modelandview updatedbservers ( Dbservers dbservers) {Boolean bol = Dbserverservice.updatedbservers (Dbservers.getdbserverlist ()); return new Modelandview ("Test", "a", Bol); The receive parameter is a DBServer object
Dbservers Bean [Java] view plain copy public class Dbservers implements serializable{private String N Ame Private list<dbserver> dbserverlist; Set Get}
DBServer Bean[Java]View plain copy public class DBServer implements serializable{private String name; Private String abstractive; Private String parent; Private String virtual; Private Factoryconfig Factoryconfig; Private Poolconfig Poolconfig; Set Get}
Factoryconfig Bean
[Java]View plain copy public class Factoryconfig implements Serializable {private String clazz; Private list<property> propertylist; <span style= "White-space:pre" > </span>//set Get}
Property Beans [Java] view Plain copy public class Property implements serializable{private String name; private String value; Private Bean bean; Set Get}