springboot建简单项目时,报错,该怎么解决?

按照B站上面springboot(黑马程序员)学习,见图片

img


新建一个spring initializr项目时

img

img

img


这里3.0.5版本报错,改为2.7.6

img


运行日志截图

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::                (v2.7.6)

2023-03-25 11:34:01.096  INFO 11304 --- [           main] com.example.FirstApplicationTests        : Starting FirstApplicationTests using Java 1.8.0_201 on PC-202301090337 with PID 11304 (started by Administrator in E:\code\Java\idea\SpringBoot\First)
2023-03-25 11:34:01.097  INFO 11304 --- [           main] com.example.FirstApplicationTests        : No active profile set, falling back to 1 default profile: "default"
2023-03-25 11:34:02.585  INFO 11304 --- [           main] com.example.FirstApplicationTests        : Started FirstApplicationTests in 1.784 seconds (JVM running for 2.873)



推荐阅读https://blog.csdn.net/boss1235/article/details/120592545?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522167971744316800197091694%2522%252C%2522scm%2522%253A%252220140713.130102334.pc%255Fall.%2522%257D&request_id=167971744316800197091694&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~all~first_rank_ecpm_v1~pc_rank_34-1-120592545-null-null.142^v76^pc_new_rank,201^v4^add_ask,239^v2^insert_chatgpt&utm_term=springboot%E5%BB%BA%E7%AE%80%E5%8D%95%E9%A1%B9%E7%9B%AE&spm=1018.2226.3001.4449