Java导入org.mockito错误包不存在

Java导入org.mockito错误包不存在,java,gradle,junit,mockito,Java,Gradle,Junit,Mockito,我有java中的单元测试文件,我想使用mockito,下载它,放入依赖项,但当我想导入库时仍然有错误包org.mockito不存在 build.gradle buildscript { repositories { maven { url "https://plugins.gradle.org/m2/" } mavenCentral() } dependencies { classpa

我有java中的单元测试文件,我想使用mockito,下载它,放入依赖项,但当我想导入库时仍然有错误包org.mockito不存在

build.gradle

buildscript {
    repositories {
        maven {
            url "https://plugins.gradle.org/m2/"
        }
        mavenCentral()
    }
    dependencies {
        classpath("org.springframework.boot:spring-boot-gradle-plugin:2.2.4.RELEASE")
        classpath('com.google.cloud.tools.jib:com.google.cloud.tools.jib.gradle.plugin:1.8.0')
    }
}

apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'com.google.cloud.tools.jib'


bootJar {
    baseName = 'gs-spring-boot-docker'
    version =  '0.1.0'
}

repositories {
    mavenCentral()
    jcenter()
}

sourceCompatibility = 1.8
targetCompatibility = 1.8

dependencies {
    compile("org.springframework.boot:spring-boot-starter-web")
    compile (group: 'org.json', name: 'json', version: '20190722')
    implementation('org.springframework.boot:spring-boot-starter-data-jpa')
    implementation('org.springframework.boot:spring-boot-starter-web')
    implementation ('com.googlecode.json-simple:json-simple:1.1.1')
    implementation('org.postgresql:postgresql')
    testCompile("org.springframework.boot:spring-boot-starter-test")
    testCompile("org.mockito:mockito-core:2.+")
}