如何解决无法将注释转换为导入
我一直在尝试配置我的 pom 文件以使用 maven 启动一个 springboot 项目。我是这样配置的,但我无法在我的班级中将注释转换为导入。我的 pom 文件中的 spring starter 也显示为红色。我正在使用 Intellij。
<groupId>io.github.murillojndem</groupId>
<artifactId>vendas</artifactId>
<version>1.0-SNAPSHOT</version>
<properties>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
</properties>
<!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-parent -->
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.2.4.RELEASE</version>
</parent>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
编辑:更正了拼写和图像。还是一样的错误。
解决方法
你可以做一些事情来尝试修复它。 1- 点击注释顶部的灯,看看是否有修复指南。
如果第一点不奏效,那么你就按照下一步 2- 打开你的 bash 并输入“mvn clean install”
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。