Is it possible to directly execute compile using the maven command in Maven Projects? If it succeeds, it is a problem with the IDEA environment, continue
Confirm whether there is the jar package you imported in External Libraris
If not, right-click on pom.xml, there is a reimport in maven, and reintroduce it. If not, check whether the jar is available in the warehouse you are using, or there may be network problems
If you have it, use ctrl-alt-shift-s to open the project panel. Under modules, see if there is a jar you need in the dependencies of your corresponding module? Theoretically, it should be automatically introduced by maven. If not, introduce it manually.
Troubleshooting method:
Is it possible to directly execute compile using the maven command in Maven Projects? If it succeeds, it is a problem with the IDEA environment, continue
Confirm whether there is the jar package you imported in External Libraris
If not, right-click on pom.xml, there is a reimport in maven, and reintroduce it. If not, check whether the jar is available in the warehouse you are using, or there may be network problems
If you have it, use ctrl-alt-shift-s to open the project panel. Under modules, see if there is a jar you need in the dependencies of your corresponding module? Theoretically, it should be automatically introduced by maven. If not, introduce it manually.