[Spring Boot] IntelliJ에서 Live Reload 설정하기

[Spring Boot] IntelliJ에서 Live Reload 설정하기

Live Reload

  • Live Reload라는 기능은 Spring Boot로 개발하면서 자바 소스를 수정하고 저장하면 자동으로 재시작을 해주는 기능이다.

1. spring-boot-devtools 의존성 추가하기

1
developmentOnly 'org.springframework.boot:spring-boot-devtools'

2. application.yml에 추가하기

1
2
3
4
5
6
7
8
9
spring:
devtools:
livereload: # view단이 바뀌었을 때 자동으로 리로드 설정
enabled: true
restart: # 컨트롤러,모델단(classpath에 있는 파일)이 바뀌었을 때 프로젝트 재시작 설정
enabled: false

freemarker:
cache: false

3. Intelli J 설정 수정하기

자세히 보기
[Spring Boot] IntelliJ 학생인증, Ultimate 무료설치하기