IT 일기장

[intelliJ] Spring Boot 정적 파일 서버 재시작 없이 새로고침으로 바로 반영 본문

개발환경/IntelliJ

[intelliJ] Spring Boot 정적 파일 서버 재시작 없이 새로고침으로 바로 반영

뽕슈 2023. 2. 14. 13:52
반응형

이클립스에서는 HTML, CSS 같은 파일들은 홈페이지에서 새로고침해도 바로 반영돼서 신경 안썼던 부분인데

intelliJ로 넘어오면서 신경이 쓰이게됐다. 그렇게 됐다.. 이것저것 해본 방법을 정리

 

방법 - 1


pom.xml 파일에서 아래 소스 있는지 확인 후 application.properites 파일에 restart enabled 속성 추가 후 true로 설정

 

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-devtools</artifactId>
    <scope>runtime</scope>
    <optional>true</optional>
</dependency>
spring.devtools.remote.restart.enabled=true

 

방법 - 2


Settings (Ctrl + Alt + S) => Build, Execution, Deployment => Compiler => Build project automatically 체크박스 활성화

 

 

방법 - 3


Settings (Ctrl + Alt + S) => Advanced Settings => Allow auto-make to start even if developed application is currently running 체크박스 활성화

 

 

 

반응형
Comments