1、导入项目,运行,出现如下错误
org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'webSpringJaxRsApplication' defined in file
[/Users/vam/Desktop/backend/WebRoot/WEB-INF/classes/main/java/com/web/bean/WebSpringJaxRsApplication.class]:
Initialization of bean failed;
nested exception is org.springframework.beans.FatalBeanException:
Failed to obtain BeanInfo for class [main.java.com.web.bean.WebSpringJaxRsApplication];
nested exception is java.beans.IntrospectionException: type mismatch between read and write methods
总的来说,错误点如下
1、Error creating bean with name 'xxx' defined in file
2、Failed to obtain BeanInfo for class
3、type mismatch between read and write methods
2、可以看到出错的包是 springframework 的 beans 包,目前项目里用的该包的版本是 3.1.1 ,换成 3.2.16 就行了
3、也有的说把 jdk1.8 降到 jdk1.7 也行
经验证,相当管用