[Error] Could not find method compile()

C____JIN·2022년 10월 11일
0

Error Solution

목록 보기
3/3
post-thumbnail

작성한 코드

dependencies {
    compile('org.springframework.boot:spring-boot-starter-web')
    testcompile("org.springframework.security:spring-security-test")
}

발생한 오류

Could not find method compile() for arguments [org.springframework.boot:spring-boot-starter-web] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.

해결

Gradle 7.0 이후로는 compile, runtime, testCompile, testRuntime 명령이 각각 implementation, runtimeOnly, testImplementation, testRuntimeOnly로 대체되었다.

수정된 코드

dependencies {
    implementation('org.springframework.boot:spring-boot-starter-web')
    testImplementation("org.springframework.security:spring-security-test")
}

참고

profile
개발 블로그🌐 개발일지💻

0개의 댓글