Intellij Maven 无法解决我的依赖

Intellij Maven cannot resolve my dependency

我将我的 Maven 依赖项添加为编译、运行时或测试,但它仍未解决

这适用于 Intellij idea verison 2019,Java 8 和 Maven 3.6.0

错误 -> 找不到符号

您尝试依赖的依赖项是可运行的 Spring 启动存档。这些不打算用作依赖项。来自 Spring 引导文档(可能是旧版本):

Like a war file, a Spring Boot application is not intended to be used as a dependency. If your application contains classes that you want to share with other projects, the recommended approach is to move that code into a separate module. The separate module can then be depended upon by your application and other projects.