728x90
[build.gradle]
plugins {
id 'java'
id 'org.springframework.boot' version '3.2.0'
id 'io.spring.dependency-management' version '1.1.0'
}
group = 'me.tomhoon'
version = '1.0-SNAPSHOT'
sourceCompatibility = '17'
repositories {
mavenCentral()
}
dependencies {
testImplementation platform('org.junit:junit-bom:5.10.0')
testImplementation 'org.junit.jupiter:junit-jupiter'
implementation 'org.springframework.boot:spring-boot-starter-web'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
runtimeOnly 'com.h2database:h2'
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
}
test {
useJUnitPlatform()
}
[application.yml]
spring:
jpa:
show-sql: true
properties:
hibernate:
format_sql: true
# 테이블 생성 후에 data.sql 실행
defer-datasource-initialization: true
yml파일은
들여쓰기가 중요함
properties랑 defer-... 랑 같은 레벨로 설정해야함
'서버' 카테고리의 다른 글
Spring - Application Context xml로 bean 설정해보기(옛날 버전) (0) | 2024.11.18 |
---|---|
Springboot - 실행시 콘솔에 나오는 "Spring Boot" 문구 커스텀하기 (0) | 2024.11.17 |
SpringBoot3 - build.gradle에서의 구성과 의존성 차이 (0) | 2024.11.13 |
iptime 공유기 초기화 후 설정(비밀번호 설정, 포트포워딩, WOL설정) (0) | 2024.11.03 |
JPA - 기본적인 어노테이션 간단히 살펴보기 (@ElementCollection, @FetchType.LAZY, EAGER, @EntityGraph, @GenereatedValue) (1) | 2024.10.28 |