初学springboot添加spring-boot-starter-data-jpa配置项后,运行时报以上错误,检查后久后没有解决,然后改用IDEA创建maven project添加相同的配置项后却运行成功了,检查两个pom.xml配置文件,发现IDEA创建的pom.xml配置文件自动添加了
<parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.0.2.RELEASE</version> <relativePath/> <!-- lookup parent from repository --> </parent>
而通过eclipse创建的项目却没有自动添加,需要手动添加,而我手动添加时添加的是:
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId> <version>2.0.0.RELEASE</version> <relativePath/> <!-- lookup parent from repository --> </parent>
就因为继承的parent版本不一样造成。
初学者在Eclipse中运行SpringBoot项目,添加spring-boot-starter-data-jpa后遇到报错。错误信息提到无法内省Class org.springframework.data.web.config.SpringDataWeb。尝试对比IDEA创建的项目,发现IDEA的pom.xml有自动添加的配置,导致问题解决。这提示可能是Eclipse的配置或依赖问题。

5304

被折叠的 条评论
为什么被折叠?



