스프링부트를 이용하여 웹 개발을 하다보면 매우 자주 view 파일을 수정하게 된다.
수정할 때마다 서버를 재시작해야 변경된 내용이 반영되기 때문에 매우매우매우 시간낭비이고 짜증난다.
하지만 spring-boot-devtools
이놈을 추가하면 서버 재시작 없이 View 파일 변경이 가능하다.
의존성 추가
저는 maven을 사용하기 때문에 pom.xml에 추가했습니다.
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
</dependency>
테스트
- 현재 화면
- html 파일 수정
<body>
헬로우~~~~~
<a href="/hello">hello</a>
- Build -> Recompile 'html파일명'
- 브라우저 새로고침
와우!