遇到以下問題:
1、springboot3.2.0與jdk1.8 提示這個包org.springframework.web.bind.annotation不存在,但是pom已經引入了spring-boot-starter-web
2、Error:Cannot determine path to 'tools.jar' library for 17 (D:/jdk17)
3、Error:(3, 28) java: 程序包com.alibaba.fastjson不存在,maven已經引入包
總的來說就是idea2023以下的版本使用jdk17版創建springboot項目時,maven已經引入了對應的jar,但是在啟動時提示找不到對應的包。提示jdk17不存在tools.jar。
解決方式:
1、使用jdk1.8,把jdk降級
2、升級idea到最新版本例如idea2025
通過以上兩種方式就能解決,已經通過實際項目試驗過,可以成功解決問題。