템플릿을 고칠때마다 서버를 restart하면 짜쯩이나는것을 해결하기위해 buildgradle에 의존성을추가한다
plugins {
id 'java'
id 'org.springframework.boot' version '3.0.6'
id 'io.spring.dependency-management' version '1.1.0'
}
group = 'jpabook'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '17'
configurations {
compileOnly {
extendsFrom annotationProcessor
}
}
repositories {
mavenCentral()
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-validation:3.0.4'
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-devtools:'
compileOnly 'org.projectlombok:lombok'
runtimeOnly 'com.h2database:h2'
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation("org.junit.vintage:junit-vintage-engine") {
exclude group: "org.hamcrest", module: "hamcrest-core"
}
}
tasks.named('test') {
useJUnitPlatform()
}
의존성의 implementation 'org.springframework.boot:spring-boot-devtools:' 추가한다.
이런씩으로 restartedMain을 서버를 실행시키면 뜨게 되면 적용이된것이다.
빌드에서 recopile 을 누르고 화면으로가서 새로고침하면 변경이 된다.
'개발 꿀팁' 카테고리의 다른 글
git 허브 꾸미기 뱃지 (0) | 2023.06.05 |
---|---|
알고리즘 문제에서 stream함수 사용에 관하여 (0) | 2023.05.15 |
개발 블로그 어떻게 작성해야는가 (0) | 2023.05.12 |
intellj TEST code tdd 생성 약어 만들기 (0) | 2023.05.08 |
테스트 코드 작성 (assertj, junit5) (0) | 2022.12.13 |