SpringMVC Boolean Binding - Getter命名为"是"而不是"得到"

时间:2016-11-03 19:26:41

标签: spring spring-mvc model-binding

我们无法在SpringMVC表单中绑定布尔值,因为我们调用了该字段的getter

isData()

VS

getData()

错误讯息:

org.springframework.beans.NotReadablePropertyException: Invalid property 'data' of bean class [Model]: Bean property 'data' is not readable or has an invalid getter method: Does the return type of the getter match the parameter type of the setter? 

这是否有快速解决方法?

0 个答案:

没有答案