有关于谷粒商城项目中遇到的问题

发布时间 2023-04-19 23:02:48作者: maxzhangxiaotao

问题一:

放博客里面了。

关于报错:Error adding module to project: setSdk: sdk '1.8' type 'JavaSDK' is not registered in ProjectJdkTable

问题二

我是提交的github,然后在最后是使用的:

ssh -T git@github.com

替换掉视频中的

ssh -T git@gitee.com

问题三

在P14中,点击compile之后编译报错:

解决Springboot启动报错:类文件具有错误的版本61.0,应为 52.0

问题解决:

参考链接:https://www.jb51.net/article/272985.htm

原因:

SpringBoot使用了3.0或者3.0以上,因为Spring官方发布从Spring6以及SprinBoot3.0开始最低支持JDK17,所以仅需将SpringBoot版本降低为3.0以下即可。

步骤:

gulimall-coupongulimall-membergulimall-ordergulimall-productgulimall-ware这五个module中的pom.xml文件中的springboot依赖版本改成3.0以下,然后刷新即可。

例如:

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.7.5</version>
    <relativePath/> <!-- lookup parent from repository -->
</parent>

ps:在此处需要特别注意一点:版本一定需要对应起来。