inflearn logo
강의

Course

Instructor

Setting up a Spring framework development environment and refactoring Dao

Spring Boot Spring Data Jpa (1)

[해결 방법] Java8 버전 사용하고 싶으신 분들은 아래와 같이 설정하시면 됩니다.

238

kms920106

110 asked

0

build.gradle

plugins {
    id 'java'
    id 'org.springframework.boot' version '2.3.12.RELEASE'
    id 'io.spring.dependency-management' version '1.0.10.RELEASE'
}

group = 'com.spring.www'
version = '0.0.1-SNAPSHOT'

java {
    sourceCompatibility = JavaVersion.VERSION_1_8
    targetCompatibility = JavaVersion.VERSION_1_8
}

repositories {
    mavenCentral()
}

dependencies {
    implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
    runtimeOnly 'mysql:mysql-connector-java:8.0.32'
    testImplementation 'org.springframework.boot:spring-boot-starter-test'
    testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
}

tasks.named('test') {
    useJUnitPlatform()
}

gradle-wrapper.properties

distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

 

spring intellij-idea

Answer 1

0

communityai8509

안녕하세요, 인프런 AI 인턴입니다.

강프로그래머님이 언급하신 대로, Java 8을 사용하려면 build.gradle 파일에서 sourceCompatibilitytargetCompatibilityJavaVersion.VERSION_1_8로 설정하면 됩니다. 이것은 이미 잘 설정되어 있는 것 같습니다. 그리고 gradle-wrapper.properties 파일에서 Gradle 버전이 6.8.3으로 설정되어 있는 것을 볼 수 있습니다. 이는 Spring Boot 2.3.x 버전과 호환됩니다.

만약 더 나은 호환성을 원하시거나 최신 기능을 사용하시고 싶다면 Gradle과 Spring Boot 버전을 조금 더 최신 것으로 고려해보실 수도 있지만, 사용중인 dependency들과의 호환성을 항상 확인하시길 권장드립니다.

참고로, 아래 URL에서 Gradle 설치 및 사용 방법에 대한 내용을 확인할 수 있습니다:
- Gradle 공식 사이트: gradle.org
- Gradle 상세 사용자 가이드: Gradle User Guide

Spring Boot와 Gradle을 설정하는 방법에 대해서 더 많은 정보를 원하신다면 이 URL을 참조하십시오:
- Spring Boot Reference Documentation: Spring Boot with Gradle

패키지 구분에 대해 궁금한게 있습니다

0

8

1

코드 자료

0

25

2

인텔리제이 MCP 서버 설정 관련

0

26

1

조회속도 개선에서 더 개선하는 방법이 궁금합니다.

0

28

2

servlet과 container에 대한 질문입니다

0

24

1

RepositoryTest의 패키지 위치가 domain인 이유

0

30

2

도메인 모델에서 관계와 규칙을 구분하는 방법

0

37

2

UserService, CertificationService 책임 분리 기준 질문

0

26

1

spring initialiser 어떤걸 선택해야될지 모르겠어요

0

32

2

구현체가 동적으로 정해질 때, 팩토리 기법을 사용하나요?

0

50

2

Json 요청 처리

1

33

2

로그아웃-logout()-2 강에서 겟방식 로그아웃 호출 후 화면이동 질문입니다.

0

27

2

Build 관련 문제 (테스트 관련 문제)

0

43

2

job, step execution 관련 질문 드립니다.

0

32

2

이미지 업로드와 db 트랜잭션 묶는법

0

42

1

sdk 설정 오류

0

49

2

Orchestration SAGA 패턴 보상에 대한 질문입니다.

0

51

2

[건의][6장][작전1] deprecated 메소드

1

48

2

[예제][3장][작전2] windows 에서 마지막 예제

0

39

1

NaverBookRepository.class 의 위치에 따른 모듈간의 의존성에 대해 질문드립니다.

1

31

2

Could not resolve org.springframework.boot:spring-boot-starter-validation:2.4.4

0

52

2

[해결 방법] Autowired가 적용이 안되는 문제 + context에서 NullPointerException

0

301

1

[해결 방법] findOne 에러 / Inferred type 'S' for type parameter 'S' is not within its bound; should extend 'com. spring. www. domain. User'

0

95

1

강좌와관련된 교재는없나요?

1

204

0