Не удается разрешить импорт org.springframework.web.
Eclipse не может импортировать библиотеки Spring.
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
import java.util.concurrent.atomic.AtomicLong;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.ui.Model;
import task1.exception.NotFoundException;
Мой файл build.gradle:
plugins {
id 'org.springframework.boot' version '1.5.3.RELEASE'
id 'java'
}
apply plugin: 'io.spring.dependency-management'
apply plugin: 'eclipse'
group = 'task1'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '1.8'
repositories {
mavenCentral()
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
compile("org.springframework.boot:spring-boot-starter-web")
}
![enter image description here](https://i.stack.imgur.com/cXqEW.png)
Но когда я собираю этот проект в терминале, он уже собирается и запускается.