Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
Tags
- 백트래킹
- 프로그래머스 이중우선순위큐 자바
- CJ DBASE&
- 그리디
- ansi sql 장점
- IT 면접 준비
- DBASE&
- 이중우선순위큐 java
- 위상정렬
- 프로그래머스
- DFS
- ansi sql 단점
- 면접 필수 질문
- 이중우선순위큐 자바
- JPA
- DP
- Gradle
- 디베이스앤 인턴 후기
- 개발자 면접 준비
- oracle ansi
- 프로그래머스 이중우선순위큐
- BFS
- 이분탐색
- 디베이스앤
- Java
- 백준
- SQL
- oracle ansi sql
- 프로그래머스 이중우선순위큐 java
- Spring Boot
Archives
- Today
- Total
쉬운 프로그래밍
[Spring Boot] 인텔리제이 Live Reload 설정 본문
템플릿엔진이나, js css등 수정이 잦은 것들을 매번 새로 빌드 하는 것은 매로 번거로운 일이다.
SpringBoot Devtools를 통해 새로고침 만으로 resources 밑의 파일들의 실시간 반영을 할 수 있다.
1. Gradle
compile "org.springframework.boot:spring-boot-devtools"
Maven은 귀찮아서..
2. application.properties
spring.devtools.livereload.enabled=true
3. 인텔리제이 설정
인텔리제이 같은 경우에는 설정을 따로 해줘야 devtools livereload가 적용된다.
먼저, ctrl + shift + a 를 누른 후 Registry를 검색한다.
다음으로 아래 옵션을 체크해준다.
마지막으로 setting - build - compiler에서 Build project automatically를 체크한다.
4. Live ReLoad 플러그인 설치
본인이 크롬, 사파리, 파폭 등 뭐를 쓰더라도 Live ReLoad 플러그인을 설치해야 한다.
크롬 Live Reload 플러그인 : chrome.google.com/webstore/detail/livereload/jnihajbhpnppcggbcgedagnkighmdlei
설치한 후 플러그인을 실행하면 정상적으로 LiveReload를 사용할 수 있을 것이다.
나는 이렇게 다했는데 안돼서 한시간 넘게 삽질하다가 always-develop.tistory.com/53 를 보고 해결했다.
applications.properties에 다음과 같은 코드를 추가한다..
css/js/img
spring.resources.static-locations=file:src/main/resources/static/
thymeleaf
spring.thymeleaf.cache=false
spring.thymeleaf.prefix=file:src/main/resources/templates/
그리고 라이브 로드 관련 설정들은 배포시 꼭 지워줘야한다~! 안그럼 서버 터짐..
'Programming > Spring Boot' 카테고리의 다른 글
[Spring Boot] ResponseEntity와 TestRestTemplate (0) | 2021.02.17 |
---|---|
[Spring Boot] Spring Security Security Config (0) | 2021.02.02 |
[Lombok] @RequiredArgsConstructor (0) | 2021.02.01 |
[Spring Boot] OAuth 2.0 기본 세팅 (2) | 2021.01.29 |
REST API (0) | 2021.01.26 |
Comments