技巧
自己的模板------live template
有些代码在项目中通常会被用到或会被重复使用,可以自己写一个模板存起来,要用的时候用快捷键生成就可以了。

在这里选择生效范围

现在,就有我们自己的模板了,一回车就自动生成

idea的全局配置


这样一来,每次创建新项目完就不用每次改配置了
默认让树形文件夹展开
原本是这样的

点击三个点


这样,即使没有里面没有文件,它还是展开了

异常
报错:jdk版本不匹配 不支持发行版本5

保持下面这三个东西一致即可


pom文件这里也要检查一下


报错:Unsupported class file major version xxx

原因:
1.写的代码里面的某些方法和jdk的版本对不上,如List.of()这个方法只有从jdk9开始才能用
2.检查jdk的版本和springboot的版本能不能对的上 jdk21 不支持2版本的springboot
