Spring Boot 시작 시 도움되는 라이브러리 모음

2025. 10. 25. 22:33·Spring/튜토리얼
반응형

👋 들어가기 전

 

오늘은 스프링 부트 초반에 시작할 때, 도움을 줄 수 있는 추천 라이브러리 몇가지를

학습해보려고한다.

 

학습하면서 계속 추가될 예정, 물론 기초로 사용할 수 있는 난이도를 가진 라이브러리 위주로

 

학습이 크게 필요하면 별도로 포스팅함


🏁 학습할 내용

  • Spring Boot Devltools

🔬Spring Boot Devtool

 

🤔없으면 어떤 불편한 점이 있을까?

 

우리는 코드테스트를 위해, 여러번 실행하고 멈추고 반복을 하는 과정을 거친다.

 

코드가 많이 없고, 가벼울 때는 시간도 많이 안걸려서 크게 상관없지만,

프로젝트가 무거워질수록, 재시작인 생각보다 부담되는 작업이다

 

Boot Devtool은 바로 이점을 해결해준다.

 

🧩 역할

 

공식문서를 살펴보자.

Automatic Restart

Applications that use spring-boot-devtools automatically restart whenever files on the classpath change.

This can be a useful feature when working in an IDE, as it gives a very fast feedback loop for code changes. By default, any entry on the classpath that points to a directory is monitored for changes. Note that certain resources, such as static assets and view templates, do not need to restart the application.

 

코드 변경을 감지하여, 애플리케이션을 다시 시작 시켜준다.

이때, 프로젝트 코드를 포함하는 클래스 로더만 다시 로드하고, 스플링 애플리케이션 컨텍스트를 다시 시작한다.

 

여기서 재시작에 제외되는 파일은, 정적 리소스, 템플릿, 테스트 코드등 애플리케이션 동작에 없는 파일들이다.

 

 

🎲 설치

 

이 때, 주의할 점은 이 동작은 애플리케이션 배포에는 영향이 없어야하므로, 개발 단계에서만

동작하도록 해야하므로, developmentOnly로 설치한다.

 

// build.gradle.kts

dependencies {
	...
	developmentOnly("org.springframework.boot:spring-boot-devtools")
}

 

⚙️ 설정

 

1️⃣컴파일러 설정

 

File > Settings 또는 Ctrl + , 를 눌러 세팅으로 이동

Build, Execution, Deployment > Compiler > Build project automatically 체크 ✅ 

 

2️⃣고급 설정

 

Advanced Settings > Allow auto-make to start even if developed application is currently runnig

 

🤖사용

package com.example.demo
import org.springframework.stereotype.Controller
import org.springframework.web.bind.annotation.GetMapping
import org.springframework.web.bind.annotation.ResponseBody


@Controller
class HelloController {

    @GetMapping("/hello")
    @ResponseBody
    public fun hello(): String {
        return  "Hello World" // 여기를 Hello Spring Boot으로 바꿀 예정
    }
}

 


출처

https://docs.spring.io/spring-boot/reference/using/devtools.html

 

Developer Tools :: Spring Boot

Applications that use spring-boot-devtools automatically restart whenever files on the classpath change. This can be a useful feature when working in an IDE, as it gives a very fast feedback loop for code changes. By default, any entry on the classpath tha

docs.spring.io

 

반응형

'Spring > 튜토리얼' 카테고리의 다른 글

H2 Database  (0) 2025.11.08
[DB] ORM과 JPA란  (0) 2025.11.01
프로젝트 기본 구조 이해하기  (1) 2025.10.25
IntelliJ에서 스프링 시작을 위한 초기 세팅  (0) 2025.10.19
스프링 부트란  (0) 2025.10.04
'Spring/튜토리얼' 카테고리의 다른 글
  • [DB] ORM과 JPA란
  • 프로젝트 기본 구조 이해하기
  • IntelliJ에서 스프링 시작을 위한 초기 세팅
  • 스프링 부트란
Hamp
Hamp
남들에게 보여주기 부끄러운 잡다한 글을 적어 나가는 자칭 기술 블로그입니다.
  • Hamp
    Hamp의 분리수거함
    Hamp
  • 전체
    오늘
    어제
    • 분류 전체보기 (325)
      • CS (30)
        • 객체지향 (2)
        • Network (7)
        • OS (6)
        • 자료구조 (1)
        • LiveStreaming (3)
        • 이미지 (1)
        • 잡다한 질문 정리 (0)
        • Hardware (2)
        • 이론 (6)
        • 컴퓨터 그래픽스 (0)
      • Firebase (3)
      • Programing Langauge (41)
        • swift (34)
        • python (6)
        • Kotlin (1)
      • iOS (133)
        • UIKit (37)
        • Combine (1)
        • SwiftUI (33)
        • Framework (7)
        • Swift Concurrency (22)
        • Tuist (6)
        • Setting (11)
        • Modularization (1)
        • Instruments (6)
      • PS (59)
        • 프로그래머스 (24)
        • 백준 (13)
        • LeetCode (19)
        • 알고리즘 (3)
      • Git (18)
        • 명령어 (4)
        • 이론 (2)
        • hooks (1)
        • config (2)
        • action (7)
      • Shell Script (2)
      • Linux (6)
        • 명령어 (5)
      • Spring (20)
        • 어노테이션 (6)
        • 튜토리얼 (13)
      • CI-CD (4)
      • Android (0)
        • Jetpack Compose (0)
      • AI (9)
        • 이론 (9)
        • MCP (0)
  • 블로그 메뉴

    • 홈
    • 태그
  • 링크

  • 공지사항

  • 인기 글

  • 태그

    Swift
    CS
    Spring
    AVFoundation
    protocol
    SwiftUI
    백준
    dp
    lifecycle
    dispatch
    투포인터
    boostcamp
    GIT
    Tuist
    concurrency
    IOS
    UIKit
    property
    프로그래머스
    dfs
  • 최근 댓글

  • 최근 글

  • 반응형
  • hELLO· Designed By정상우.v4.10.0
Hamp
Spring Boot 시작 시 도움되는 라이브러리 모음
상단으로

티스토리툴바