JDK1.7改为1.8后引起的bug

异常信息:

org.springframework.beans.FatalBeanException: Failed to obtain BeanInfo for class [xxxx(某一实体类)]; nested exception is java.beans.IntrospectionException: type mismatch between read and write methods

原因:实体类中的get方法返回值和改get方法对应的字段类型不一致导致的,

比如字段createTime类型是Timestamp,然后get的返回值是Date,这样子在jdk1.7中不会报错,但是在1.8就会报如上异常

猜你喜欢

转载自my.oschina.net/u/3676955/blog/2353428