在jsp页面点击按钮将checkbox的值全部传到Controller里面,写个ajax做测试:
到Controller里面接收输出一下:
但是结果是输出了 最后去报了一个异常:
ERROR [500.jsp] - Failed to instantiate standard serializer (of type com.fasterxml.jackson.databind.ser.std.NullSerializer): Class com.fasterxml.jackson.databind.ser.BasicSerializerFactory can not access a member of class com.fasterxml.jackson.databind.ser.std.NullSerializer with modifiers "private"
java.lang.IllegalStateException: Failed to instantiate standard serializer (of type com.fasterxml.jackson.databind.ser.std.NullSerializer): Class com.fasterxml.jackson.databind.ser.BasicSerializerFactory can not access a member of class com.fasterxml.jackson.databind.ser.std.NullSerializer with modifiers "private"
解决方法:这个法getCheckBoxId要有返回值,由于我是要跳转页面,我就返回String了。