강의

멘토링

커뮤니티

Inflearn Community Q&A

qkqhzz1203736's profile image
qkqhzz1203736

asked

Spring for Beginners - Learn Spring Boot, Web MVC, and DB Access Technology with Code

@Transactional 이 자동완성에도 안뜨는데 어떻게 해결해야할 지 모르겠어요

Written on

·

379

0

스크린샷 2023-10-01 오후 1.01.54.pngspring boot 3, java 17 버전사용하고 있습니다

javaspringmvcspring-boot

Answer 2

1

qkqhzz1203736님의 프로필 이미지
qkqhzz1203736
Questioner

implementation 'org.springframework.boot:spring-boot-starter-jdbc'

runtimeOnly 'com.h2database:h2'

build.gradle 에 추가하고 리프레쉬 하니까 해결됐습니다 ~

0

# 순수 Jdbc 강의에서 환경설정 하시던거 따라해서 
# build.gradle 파일 설정
dependencies {
    implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
    implementation 'org.springframework.boot:spring-boot-starter-web'
    implementation 'org.springframework.boot:spring-boot-starter-jdbc'
    runtimeOnly 'com.h2database:h2'

    testImplementation 'org.springframework.boot:spring-boot-starter-test'
}
# src.main.resources.application.properties 에 설정

spring.datasource.url=jdbc:h2:tcp://localhost/~/test
spring.datasource.driver-class-name=org.h2.Driver

강의에 있는 대로 설정해주면, install 이 되면서 라이브러리 가져와지더라구요

qkqhzz1203736's profile image
qkqhzz1203736

asked

Ask a question