※ 引述《k80097 ()》之铭言:
: 大家好
: 想请问在spring mvc里
: Form summit input text
: 如何跳脱","符号而不会转换成 array 呢?
: 谢谢
controller:
@RequestMapping(value = "/test")
public String test(@ModelAttribute TestObject o){
}
public class TestObject {
private Test[] tests;
//getter tests
//setter tests
}
public class Test {
private String[] stringArray;
//getter stringArray
//setter stringArray
}
JSP:
<input type="text" name="tests[0].stringArray" />
输入值为: a,b,c
controller 接到就直接转array了