IntelliJ + 스프링 부트 에서 코드 변경시 자동 재시작

2022. 7. 10. 20:25·DevTools/IntelliJ IDEA

코드 변경 시 자동 재시작이 되도록 설정해봅시다

1. spring-boot-devtools 추가

2. build project automatically 체크

3. Allow auto-make to start even if developed application is currently running 체크


1. spring-boot-devtools 추가

maven, gradle 마다 조금씩 다르므로 그냥 해당 링크를 찾아가 추가하자

https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-devtools

 

Maven Repository: org.springframework.boot » spring-boot-devtools

Spring Boot Developer Tools VersionVulnerabilitiesRepositoryUsagesDate2.7.x2.7.1Central11Jun, 20222.7.0Central23May, 20222.6.x2.6.9Central5Jun, 20222.6.8Central14May, 20222.6.7Central26Apr, 20222.6.6Central19Mar, 20222.6.5Central10Mar, 20222.6.4Central13Fe

mvnrepository.com

--- Maven ---
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-devtools</artifactId>
</dependency>

--- Gradle ---
implementation 'org.springframework.boot:spring-boot-devtools'

추가로 application.properties(.yml) 설정을

spring.devtools.livereload.enabled 값을 true를 설정을 해줘도 되는데 default 값이 true이므로 건너뛰겠음


2. build project automatically 체크

Settings > Build, Execution, Deployment > Build Tools > Complier > Build project automatically 체크

 

저거 따라가기 귀찮으니 쉬프트 2번누르면 검색기능이 활성화되는데 그곳에 build project automatically 검색하면 바로뜸

 


3. Allow auto-make to start even if developed application is currently running 체크

Setting > Advanced Settings > Allow auto-make to start even if developed application is currently running 체크

 

이것도 그냥 검색창에 allow auto~ 검색하면 바로 찾기 수월하다


추가로 3번 내용 체크는 현재버전의 인텔리제이와 예전버전의 인텔리제이가 좀 다른걸로 알고있다

예전 버전에선 위에 작성한 부분이 아닌

Registry > compiler.automake.allow.when.app.running 를 체크하면 되었다

버전에 따라 다르니 3번 내용이 없으면 Registry를 확인해보자

'DevTools > IntelliJ IDEA' 카테고리의 다른 글

Intellij에서 함수가 한줄로 보이는 현상 수정하기  (0) 2022.08.04
Intellij의 .http 파일을 통해 요청 보내보기  (0) 2022.06.27
IntelliJ에서 주석 ( Ctrl + / ) 시 코드 바로 앞에 되도록 설정  (0) 2021.10.28
'DevTools/IntelliJ IDEA' 카테고리의 다른 글
  • Intellij에서 함수가 한줄로 보이는 현상 수정하기
  • Intellij의 .http 파일을 통해 요청 보내보기
  • IntelliJ에서 주석 ( Ctrl + / ) 시 코드 바로 앞에 되도록 설정
skw
skw
  • skw
    Time to lazy
    skw
  • 전체
    오늘
    어제
    • 분류 전체보기 (66)
      • Java (4)
      • Spring (7)
      • DB (1)
      • Devops (11)
        • AWS (4)
        • Docker (1)
        • etc (6)
      • DevTools (4)
        • IntelliJ IDEA (4)
      • 등등 (2)
      • 알고리즘 (34)
        • 문제 (32)
        • 이론 (2)
      • 일기장 (1)
      • 보물창고아님 비밀창고 (0)
  • 블로그 메뉴

    • 홈
    • 태그
    • 방명록
  • 링크

  • 공지사항

  • 인기 글

  • 태그

    프로그래머스
    백준
    AWS
    정렬
    Maven
    도커
    숫자 변환하기
    인텔리제이
    repository url
    docker
    NEXUS
    무인도 여행
    IntelliJ
    뒤에있는큰수찾기
    sort
    그리디
    springboot
    BOJ
    http파일
    EC2
  • 최근 댓글

  • 최근 글

  • hELLO· Designed By정상우.v4.10.5
skw
IntelliJ + 스프링 부트 에서 코드 변경시 자동 재시작
상단으로

티스토리툴바