移动文件会导致依赖关系问题



我将一些文件移到了新的包中,这样做会更有意义,但这导致了我的依赖关系变得一团糟。

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

这些线给出";无法解析符号"springframework";建议添加一个maven依赖项。如果我这样做,pom.xml文件中没有任何更改。此外,pom具有错误;弹簧引导启动器前端数据jpa";以及";org.springframework.frontData"表示未找到依赖项。

以前一切都很好,但现在一团糟。我尝试过无效&重新启动并不能解决任何问题,撤消更改似乎也不起作用。有人对此有想法吗?pom.xml文件可以在下面找到。我正在研究intellij可能也很重要。

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.3.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>be.uantwerpen.idlab.dust</groupId>
<artifactId>initializr</artifactId>
<version>0.1</version>
<name>dust-initializr</name>
<description></description>
<properties>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-frontData-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.frontData</groupId>
<artifactId>spring-frontData-rest-core</artifactId>
<version>3.1.5.RELEASE</version>
</dependency>
<dependency>
<groupId>com.googlecode.json-simple</groupId>
<artifactId>json-simple</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.8.5</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>RELEASE</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.ainslec</groupId>
<artifactId>picocog</artifactId>
<version>1.0.7</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<finalName>dust-initializr</finalName>
</configuration>
</plugin>
</plugins>
</build>
</project>

我通过git还原更改解决了这个问题。这次重新做动作并没有出现同样的错误。

不知道这个错误是从哪里来的,如果再次发生,我们欢迎您提出建议。

最新更新