자라는 개발자/시행착오들

Spring Boot Devtools Automatic Restart

자란다 2023. 2. 25. 18:34
728x90
반응형

Spring Boot Devtools : 애플리케이션 개발 시 유용한 기능들을 제공하는 모듈이다.

classpath에 있는 파일이 변경될때마다 애플리케이션을 자동으로 재시작 해준다

 

빌드관리도구 : maven

  1. pom.xml
         <dependency>
             <groupId>org.springframework.boot</groupId>
             <artifactId>spring-boot-devtools</artifactId>
             <optional>true</optional>
         </dependency>

2.application-properties

spring.devtools.restart.enabled=true 
  1. advanced settings 에서  Allow auto-make to start even if developed application is currently running 항목 체크하기

 4.  Build project automatically

 

여기까지 하면 바뀌는걸 볼수있다.

 

 

 

 

 

 

출처 : 스프링부트 쇼핑몰 프로젝트 with JPA - 버전이 달라서 내용이 살짝다르지만 흐름을 배웠다. 

 

 

728x90
반응형