简体   繁体   English

Intellij IDEA 社区版 2021.3.1 无法识别 spring 类

[英]Intellij IDEA Community Edition 2021.3.1 isn't recognising spring classes

I have started learning spring boot I am facing a problem with my IDE Intellij.我已经开始学习 spring 引导我的 IDE Intellij 遇到问题。 Problem: Intellij IDEA Community Edition 2021.3.1 isn't recognising spring annotations.问题:Intellij IDEA Community Edition 2021.3.1 无法识别 spring 注释。

What I have done: I have initialised a spring boot project using spring initializr opened it in Intellij.我做了什么:我已经使用 spring initializr 初始化了一个 spring 引导项目,在 Intellij 中打开了它。 Marked the src folder as sources root.将 src 文件夹标记为源根目录。 Intellij Not recognising Spring Classes Is there anyone who can help me out Intellij 无法识别 Spring 类有没有人可以帮助我

right click pom.xml and click on mavan->>Reload Project.右键单击 pom.xml 并单击 mavan->>重新加载项目。 Its should downloads all dependencies.它应该下载所有依赖项。

There are few things which went wrong in your intellij idea and the configuration of your project.您的 intellij 想法和项目配置中几乎没有出现问题。 You can try one by one any of the below steps to correct the issue.您可以逐一尝试以下任何步骤来解决问题。

  1. The build path is not set properly, Please check the links on setting the build path properly and the JDK used for the project.构建路径设置不正确,请检查正确设置构建路径和项目使用的JDK的链接。
  2. Invalidate cache and restart your IDE.使缓存无效并重新启动 IDE。

使缓存无效并重新启动您的 IDE

  1. Delete.idea folder and restart your IDE.删除.idea 文件夹并重新启动您的 IDE。 删除 .idea 文件夹

Hope it Works.希望它有效。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM