일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- 깊이우선탐색
- 그리디알고리즘
- 탐욕법
- 코테
- mariaDB
- Greedy
- java
- Database
- Spring
- Effective Java
- 너비우선탐색
- select
- 알고리즘
- join
- DP
- 피보나치
- DFS
- IntelliJ
- 우선순위큐
- 이펙티브자바
- BFS
- 다이나믹프로그래밍
- 백준
- db
- 데이터베이스
- SQL
- 정렬
- 프로그래머스
- mybatis
- springboot
Archives
- Today
- Total
땀두 블로그
[Spring] SpringBoot build.gradle 설정 오류 해결 본문
buildscript {
ext {
springBootVersion = '2.1.9.RELEASE'
}
repositories {
mavenCentral() //jcenter는 mavenCentral로 마이그레이션되었다.
// https://jfrog.com/blog/into-the-sunset-bintray-jcenter-gocenter-and-chartcenter/
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
}
}
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
group 'com.jojoldu.book'
version '1.0.4-SNAPSHOT-'+new Date().format("yyyyMMddHHmmss")
sourceCompatibility = 1.8
repositories {
mavenCentral()
}
dependencies {
compile('org.springframework.boot:spring-boot-starter-web')
compile('org.projectlombok:lombok')
compile('org.springframework.boot:spring-boot-starter-data-jpa')
compile('org.springframework.boot:spring-boot-starter-mustache')
compile('com.h2database:h2')
compile('org.springframework.boot:spring-boot-starter-oauth2-client')
compile('org.springframework.session:spring-session-jdbc')
compile("org.mariadb.jdbc:mariadb-java-client")
testCompile('org.springframework.boot:spring-boot-starter-test')
testCompile("org.springframework.security:spring-security-test")
}buildscript {
ext {
springBootVersion = '2.1.9.RELEASE'
}
repositories {
mavenCentral() //jcenter는 mavenCentral로 마이그레이션되었다.
// https://jfrog.com/blog/into-the-sunset-bintray-jcenter-gocenter-and-chartcenter/
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
}
}
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
group 'com.jojoldu.book'
version '1.0.4-SNAPSHOT-'+new Date().format("yyyyMMddHHmmss")
sourceCompatibility = 1.8
repositories {
mavenCentral()
}
dependencies {
compile('org.springframework.boot:spring-boot-starter-web')
compile('org.projectlombok:lombok')
compile('org.springframework.boot:spring-boot-starter-data-jpa')
compile('org.springframework.boot:spring-boot-starter-mustache')
compile('com.h2database:h2')
compile('org.springframework.boot:spring-boot-starter-oauth2-client')
compile('org.springframework.session:spring-session-jdbc')
compile("org.mariadb.jdbc:mariadb-java-client")
testCompile('org.springframework.boot:spring-boot-starter-test')
testCompile("org.springframework.security:spring-security-test")
}
스프링부트와 AWS로 혼자 구현하는 웹 서비스 책을 따라하다 보면 책 처음 프로젝트 생성 후 build.gradle 설정을 아래와 같이 입력 후 gradle을 로딩하게되면 아래와 같은 에러가 발생하게 된다.
문제를 확인해보면 compile이라는 메소드를 찾을 수 없다는 내용인데 이는 gradle 버전의 문제이다.
gradle 7 버전에서는 compile대신 implementation, testCompile 대신 testImplementation을 사용해야 한다.
이 부분을 수정 후 gradle을 리로드하게되면 정상적으로 설정을 끝마칠 수 있다.
'Web > Spring' 카테고리의 다른 글
[Spring] Test를 위한 @RunWith 어노테이션을 사용하지 않는 이유 (0) | 2022.04.09 |
---|---|
[GIT] .gitignore 설정하기 (0) | 2022.04.09 |
[Spring] Spring Bean 순환 참조 오류 (0) | 2022.04.06 |
[스프링부트] spring-boot-devtools 사용방법 (0) | 2022.03.21 |
[Spring] Cause: invalid source release: 11 오류 (0) | 2022.03.21 |
Comments