Springmvc Receive Object Parameters __spring

Source: Internet
Author: User
<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}

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.