์ด์ง€๋ฏผ์˜ ๊ฐœ๋ฐœ ๋…ธํŠธ

๋ฐฑ์—”๋“œ ๊ฐœ๋ฐœ์„ ๊ณต๋ถ€ํ•˜๋ฉฐ Java์™€ Spring์„ ์ค‘์‹ฌ์œผ๋กœ ํ•™์Šต ๊ธฐ๋ก์„ ์ •๋ฆฌํ•˜๋Š” ๊ณต๊ฐ„์ž…๋‹ˆ๋‹ค.

๐Ÿ”ฅ ๋‚ด์ผ๋ฐฐ์›€์บ ํ”„/๐Ÿ“Œ ๊ณผ์ œ

[๋‚ด์ผ๋ฐฐ์›€์บ ํ”„ Spring_3๊ธฐ] CH3 ์ผ์ • ๊ด€๋ฆฌ ์•ฑ ๋งŒ๋“ค๊ธฐ - ํ•„์ˆ˜ ๊ธฐ๋Šฅ

jiiimni 2026. 2. 5. 10:39

Spring Boot ์ผ์ • ๊ด€๋ฆฌ API ๊ณผ์ œ ์ •๋ฆฌ (Step0 ~ Step4)

์ด๋ฒˆ ๊ณผ์ œ๋Š” Spring Boot + JPA + MySQL๋กœ ์ผ์ •(Schedule) CRUD API๋ฅผ ๋งŒ๋“œ๋Š” ๊ฒƒ์ด ๋ชฉํ‘œ์˜€๋‹ค.
์ฒ˜์Œ์—๋Š” ํ”„๋กœ์ ํŠธ ๊ตฌ์กฐ๋ถ€ํ„ฐ ํ—ท๊ฐˆ๋ ธ๊ณ , ์˜์กด์„ฑ/DB ์—ฐ๊ฒฐ/DTO/์˜ˆ์™ธ ์ฒ˜๋ฆฌ๊นŒ์ง€ ํ•œ ๋ฒˆ์— ํ•˜๋ ค๋‹ˆ๊นŒ ๊ณ„์† ๋ง‰ํ˜”๋‹ค.
๊ทธ๋ž˜์„œ Step์„ ๋‚˜๋ˆ ์„œ “ํ•˜๋‚˜์”ฉ ๊ตฌํ˜„ -> Postman์œผ๋กœ ํ™•์ธ -> ๋‹ค์Œ ๋‹จ๊ณ„” ๋ฐฉ์‹์œผ๋กœ ์ง„ํ–‰ํ–ˆ๋‹ค.


๊ฐœ๋ฐœ ํ™˜๊ฒฝ

  • Java 17
  • Spring Boot
  • Spring Data JPA
  • MySQL
  • Gradle
  • Postman

ํ”„๋กœ์ ํŠธ github ๋งํฌ


Step0. API ๋ช…์„ธ ๋ฐ ERD ์ž‘์„ฑ

๊ณผ์ œ ์‹œ์ž‘ ์ „์— ๋จผ์ € ๋ฌด์Šจ API๋ฅผ ๋งŒ๋“ค ๊ฑด์ง€๋ถ€ํ„ฐ ์ •๋ฆฌํ–ˆ๋‹ค.
์ฒ˜์Œ์—” ๊ตฌํ˜„๋ถ€ํ„ฐ ๋“ค์–ด๊ฐ€๊ณ  ์‹ถ์—ˆ๋Š”๋ฐ, API์™€ DB ๊ตฌ์กฐ๋ฅผ ๋จผ์ € ์žก์•„๋‘๋‹ˆ๊นŒ ์ค‘๊ฐ„์— ๋œ ํ”๋“ค๋ ธ๋‹ค.

ERD

Schedule ๋‹จ์ผ ์—”ํ‹ฐํ‹ฐ๋กœ ์ง„ํ–‰ํ–ˆ๋‹ค.

์ปฌ๋Ÿผ๋ช…ํƒ€์ž…์„ค๋ช…

id BIGINT PK, ์ž๋™ ์ฆ๊ฐ€
title VARCHAR ์ผ์ • ์ œ๋ชฉ
content VARCHAR ์ผ์ • ๋‚ด์šฉ
author VARCHAR ์ž‘์„ฑ์ž
password VARCHAR ์ˆ˜์ •/์‚ญ์ œ ๊ฒ€์ฆ์šฉ ๋น„๋ฐ€๋ฒˆํ˜ธ

API ๋ช…์„ธ

์š”์ฒญ/์‘๋‹ต์€ JSON ํ˜•ํƒœ๋กœ ํ†ต์ผํ–ˆ๊ณ , ์‘๋‹ต์—๋Š” ๋น„๋ฐ€๋ฒˆํ˜ธ๋ฅผ ํฌํ•จํ•˜์ง€ ์•Š๋„๋ก DTO๋กœ ๋ถ„๋ฆฌํ–ˆ๋‹ค.

1) ์ผ์ • ์ƒ์„ฑ

  • Method: POST
  • URL: /api/schedules

Request

{
  "title": "์ฒซ ์ผ์ •",
  "content": "๊ณต๋ถ€ํ•˜๊ธฐ",
  "author": "์ง€๋ฏผ",
  "password": "1234"
}

Response

{
  "id": 1,
  "title": "์ฒซ ์ผ์ •",
  "content": "๊ณต๋ถ€ํ•˜๊ธฐ",
  "author": "์ง€๋ฏผ"
}

2) ์ „์ฒด ์ผ์ • ์กฐํšŒ

  • Method: GET
  • URL: /api/schedules

Response

[
  {
    "id": 1,
    "title": "์ฒซ ์ผ์ •",
    "content": "๊ณต๋ถ€ํ•˜๊ธฐ",
    "author": "์ง€๋ฏผ"
  }
]

3) ๋‹จ๊ฑด ์ผ์ • ์กฐํšŒ

  • Method: GET
  • URL: /api/schedules/{id}

์„ฑ๊ณต Response (200)

{
  "id": 1,
  "title": "์ฒซ ์ผ์ •",
  "content": "๊ณต๋ถ€ํ•˜๊ธฐ",
  "author": "์ง€๋ฏผ"
}

์‹คํŒจ Response (404)

ํ•ด๋‹น ์ผ์ •์ด ์—†์Šต๋‹ˆ๋‹ค.

4) ์ผ์ • ์ˆ˜์ •

  • Method: PUT
  • URL: /api/schedules/{id}

Request

{
  "title": "์ˆ˜์ •ํ•œ ์ œ๋ชฉ",
  "content": "์ˆ˜์ •ํ•œ ๋‚ด์šฉ",
  "password": "1234"
}

Response

{
  "id": 1,
  "title": "์ˆ˜์ •ํ•œ ์ œ๋ชฉ",
  "content": "์ˆ˜์ •ํ•œ ๋‚ด์šฉ",
  "author": "์ง€๋ฏผ"
}

5) ์ผ์ • ์‚ญ์ œ

  • Method: DELETE
  • URL: /api/schedules/{id}

Request

{
  "password": "1234"
}

Response

์‚ญ์ œ ์™„๋ฃŒ

Step1. ์ผ์ • ์ƒ์„ฑ (Create)

Step1 ๋ชฉํ‘œ๋Š” DB์— ์ €์žฅ๋˜๊ณ , Postman์—์„œ ์‘๋‹ต์ด ์˜ค๋Š” ๊ฒƒ์ด์—ˆ๋‹ค.
์—ฌ๊ธฐ์„œ ๊ฐ€์žฅ ๋จผ์ € ๋ง‰ํ˜”๋˜ ๊ฑด ์˜์กด์„ฑ ์„ค์ •๊ณผ MySQL ์—ฐ๊ฒฐ์ด์—ˆ๋‹ค.

1) ์˜์กด์„ฑ ์„ค์ • (Gradle)

์ฒ˜์Œ์—๋Š” spring-boot-starter๋งŒ ๋“ค์–ด์žˆ์–ด์„œ Web/JPA/MySQL์ด ์ „๋ถ€ ์•ˆ ๋๋‹ค.
๊ทธ๋ž˜์„œ ์•„๋ž˜์ฒ˜๋Ÿผ web + jpa + mysql connector + lombok์„ ์ถ”๊ฐ€ํ–ˆ๋‹ค.

dependencies {
    implementation 'org.springframework.boot:spring-boot-starter-web'
    implementation 'org.springframework.boot:spring-boot-starter-data-jpa'

    runtimeOnly 'com.mysql:mysql-connector-j'

    compileOnly 'org.projectlombok:lombok'
    annotationProcessor 'org.projectlombok:lombok'

    testImplementation 'org.springframework.boot:spring-boot-starter-test'
}

์ด ๋‹จ๊ณ„์—์„œ ์ค‘์š”ํ•œ ํฌ์ธํŠธ๋Š” Gradle Reload์˜€๋‹ค.
build.gradle์„ ์ˆ˜์ •ํ•ด๋„ ๋ฆฌ๋กœ๋“œ๋ฅผ ์•ˆ ํ•˜๋ฉด ๊ณ„์† ๋นจ๊ฐ„ ์ค„์ด ๋‚จ์•„ ์žˆ์—ˆ๋‹ค.


2) MySQL ์„ค์ • (application.yml)

spring:
  datasource:
    driver-class-name: com.mysql.cj.jdbc.Driver
    url: jdbc:mysql://localhost:3306/scheduleapp?serverTimezone=Asia/Seoul&characterEncoding=UTF-8
    username: root
    password: ๋น„๋ฐ€๋ฒˆํ˜ธ

  jpa:
    hibernate:
      ddl-auto: update
    show-sql: true

MySQL์—์„œ DB๊ฐ€ ์—†์œผ๋ฉด ์—ฐ๊ฒฐ์ด ์•ˆ ๋˜๊ธฐ ๋•Œ๋ฌธ์— ๋จผ์ € ์ƒ์„ฑํ–ˆ๋‹ค.

CREATE DATABASE scheduleapp;

์„œ๋ฒ„ ์‹คํ–‰ ์‹œ ์ฝ˜์†”์— create table schedules ...๊ฐ€ ์ฐํžˆ๋ฉด ์„ฑ๊ณต์ด๋‹ค.


3) Entity ์ž‘์„ฑ (Schedule)

Step1์—์„œ๋Š” createdAt/updatedAt์€ ์•„์ง ๋ถ™์ด์ง€ ์•Š๊ณ  ํ•„๋“œ๋งŒ ๋จผ์ € ๋งŒ๋“ค์—ˆ๋‹ค.

@Entity
@Table(name = "schedules")
@Getter
@NoArgsConstructor
public class Schedule {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    @Column(nullable = false)
    private String title;

    @Column(nullable = false)
    private String content;

    @Column(nullable = false)
    private String author;

    @Column(nullable = false)
    private String password;

    public Schedule(String title, String content, String author, String password) {
        this.title = title;
        this.content = content;
        this.author = author;
        this.password = password;
    }

    public void update(String title, String content) {
        this.title = title;
        this.content = content;
    }
}

์—ฌ๊ธฐ์„œ ์‹ค์ˆ˜ํ–ˆ๋˜ ๋ถ€๋ถ„:

  • ํด๋ž˜์Šค๋ช…/ํŒŒ์ผ๋ช…์„ ์†Œ๋ฌธ์ž๋กœ ๋งŒ๋“ค์–ด์„œ ์ธ์‹์ด ์ด์ƒํ•ด์กŒ๋˜ ์ ์ด ์žˆ์—ˆ๋‹ค.
  • lombok์ด ์„ค์น˜๋˜์–ด ์žˆ๋Š”๋ฐ๋„ ๋นจ๊ฐ„ ์ค„์ด ์‚ฌ๋ผ์ง€์ง€ ์•Š์•„ annotation processing์„ ์ผœ์•ผ ํ–ˆ๋‹ค.

4) Repository ์ž‘์„ฑ

public interface ScheduleRepository extends JpaRepository<Schedule, Long> {
}

5) ์ผ์ • ์ƒ์„ฑ API (POST)

์ดˆ๊ธฐ์—๋Š” ์—”ํ‹ฐํ‹ฐ๋ฅผ ๊ทธ๋Œ€๋กœ ์‘๋‹ต์œผ๋กœ ๋‚ด๋ณด๋‚ด์„œ password๊ฐ€ ๋…ธ์ถœ๋๋‹ค.
๊ณผ์ œ ์กฐ๊ฑด์ด ์‘๋‹ต์—์„œ ๋น„๋ฐ€๋ฒˆํ˜ธ ์ œ์™ธ๋ผ์„œ Response DTO๋ฅผ ๋งŒ๋“ค์—ˆ๋‹ค.

Response DTO

@Getter
public class ScheduleResponseDto {
    private Long id;
    private String title;
    private String content;
    private String author;

    public ScheduleResponseDto(Schedule schedule) {
        this.id = schedule.getId();
        this.title = schedule.getTitle();
        this.content = schedule.getContent();
        this.author = schedule.getAuthor();
    }
}

Controller (POST)

@PostMapping
public ResponseEntity<ScheduleResponseDto> create(@RequestBody Schedule request) {
    Schedule saved = scheduleRepository.save(
            new Schedule(
                    request.getTitle(),
                    request.getContent(),
                    request.getAuthor(),
                    request.getPassword()
            )
    );
    return ResponseEntity.ok(new ScheduleResponseDto(saved));
}


Step2. ์ผ์ • ์กฐํšŒ (Read)

Step2๋Š” ์ „์ฒด ์กฐํšŒ์™€ ๋‹จ๊ฑด ์กฐํšŒ๋ฅผ ๊ตฌํ˜„ํ–ˆ๋‹ค.

1) ์ „์ฒด ์ผ์ • ์กฐํšŒ (GET /api/schedules)

@GetMapping
public ResponseEntity<List<ScheduleResponseDto>> findAll() {
    List<Schedule> schedules = scheduleRepository.findAll();

    List<ScheduleResponseDto> response = schedules.stream()
            .map(ScheduleResponseDto::new)
            .toList();

    return ResponseEntity.ok(response);
}

์—ฌ๊ธฐ์„œ stream์„ ์“ด ์ด์œ :

  • entity ๋ฆฌ์ŠคํŠธ๋ฅผ DTO ๋ฆฌ์ŠคํŠธ๋กœ ๋ณ€ํ™˜ํ•˜๋Š” ๋กœ์ง์ด ๊น”๋”ํ•ด์ง„๋‹ค.
  • ๋ฐ˜๋ณต๋ฌธ์œผ๋กœ ํ•ด๋„ ๋˜์ง€๋งŒ, ๋ณ€ํ™˜ ๋ชฉ์ ์ด ๋ช…ํ™•ํ•˜๊ฒŒ ๋ณด์˜€๋‹ค.


2) ๋‹จ๊ฑด ์ผ์ • ์กฐํšŒ (GET /api/schedules/{id})

์ฒ˜์Œ์—๋Š” orElseThrow()๋กœ ์˜ˆ์™ธ๋ฅผ ๋˜์กŒ๋Š”๋ฐ, ์‚ญ์ œ๋œ id ์กฐํšŒ ์‹œ 500์ด ๋– ์„œ ๋ณ„๋กœ์˜€๋‹ค.
์—†๋Š” ์ž์›์€ ํด๋ผ์ด์–ธํŠธ ์š”์ฒญ์ด ํ‹€๋ฆฐ ๊ฒƒ์ด๋ฏ€๋กœ 404๊ฐ€ ์ž์—ฐ์Šค๋Ÿฝ๋‹ค๊ณ  ํŒ๋‹จํ•ด์„œ ์‘๋‹ต ์ฝ”๋“œ๋ฅผ ์ง์ ‘ ๋ถ„๊ธฐํ–ˆ๋‹ค.

@GetMapping("/{id}")
public ResponseEntity<?> findOne(@PathVariable Long id) {
    return scheduleRepository.findById(id)
            .<ResponseEntity<?>>map(schedule ->
                    ResponseEntity.ok(new ScheduleResponseDto(schedule))
            )
            .orElseGet(() ->
                    ResponseEntity.status(404).body("ํ•ด๋‹น ์ผ์ •์ด ์—†์Šต๋‹ˆ๋‹ค.")
            );
}

์ด๋•Œ ์ž๋ฐ” ์ œ๋„ค๋ฆญ ํƒ€์ž… ์ถ”๋ก  ๋•Œ๋ฌธ์— ์ปดํŒŒ์ผ ์—๋Ÿฌ๊ฐ€ ๋‚ฌ๋Š”๋ฐ,
.<ResponseEntity<?>>map(...) ํ˜•ํƒœ๋กœ ๋ฐ˜ํ™˜ ํƒ€์ž…์„ ๊ณ ์ •ํ•ด์„œ ํ•ด๊ฒฐํ–ˆ๋‹ค.


Step3. ์ผ์ • ์ˆ˜์ • (Update)

์ˆ˜์ •์€ ๋น„๋ฐ€๋ฒˆํ˜ธ๊ฐ€ ๋งž์„ ๋•Œ๋งŒ ์ˆ˜์ •์ด ํ•ต์‹ฌ์ด์—ˆ๋‹ค.

์ˆ˜์ • ์š”์ฒญ DTO

@Getter
@NoArgsConstructor
public class ScheduleUpdateRequestDto {
    private String title;
    private String content;
    private String password;
}

์ˆ˜์ • API (PUT /api/schedules/{id})

@PutMapping("/{id}")
public ResponseEntity<ScheduleResponseDto> update(
        @PathVariable Long id,
        @RequestBody ScheduleUpdateRequestDto request
) {
    Schedule schedule = scheduleRepository.findById(id)
            .orElseThrow(() -> new IllegalArgumentException("ํ•ด๋‹น ์ผ์ •์ด ์—†์Šต๋‹ˆ๋‹ค."));

    if (!schedule.getPassword().equals(request.getPassword())) {
        throw new IllegalArgumentException("๋น„๋ฐ€๋ฒˆํ˜ธ๊ฐ€ ์ผ์น˜ํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค.");
    }

    schedule.update(request.getTitle(), request.getContent());
    Schedule saved = scheduleRepository.save(schedule);

    return ResponseEntity.ok(new ScheduleResponseDto(saved));
}
  • ์ˆ˜์ • ์ „์— ๋ฐ˜๋“œ์‹œ ๊ธฐ์กด ๋ฐ์ดํ„ฐ๋ฅผ ์กฐํšŒํ•œ๋‹ค.
  • ๋น„๋ฐ€๋ฒˆํ˜ธ ๊ฒ€์ฆ์„ ํ†ต๊ณผํ•ด์•ผ update ๋ฉ”์„œ๋“œ๊ฐ€ ์‹คํ–‰๋œ๋‹ค.
  • ์‘๋‹ต์€ DTO๋กœ ๋ฐ˜ํ™˜ํ•ด์„œ password ๋…ธ์ถœ์„ ๋ง‰๋Š”๋‹ค.


Step4. ์ผ์ • ์‚ญ์ œ (Delete)

์‚ญ์ œ๋„ ์ˆ˜์ •๊ณผ ๋˜‘๊ฐ™์ด ๋น„๋ฐ€๋ฒˆํ˜ธ ๊ฒ€์ฆ์ด ํ•ต์‹ฌ์ด์—ˆ๋‹ค.

์‚ญ์ œ ์š”์ฒญ DTO

@Getter
@NoArgsConstructor
public class ScheduleDeleteRequestDto {
    private String password;
}

์‚ญ์ œ API (DELETE /api/schedules/{id})

@DeleteMapping("/{id}")
public ResponseEntity<String> delete(
        @PathVariable Long id,
        @RequestBody ScheduleDeleteRequestDto request
) {
    Schedule schedule = scheduleRepository.findById(id)
            .orElseThrow(() -> new IllegalArgumentException("ํ•ด๋‹น ์ผ์ •์ด ์—†์Šต๋‹ˆ๋‹ค."));

    if (!schedule.getPassword().equals(request.getPassword())) {
        throw new IllegalArgumentException("๋น„๋ฐ€๋ฒˆํ˜ธ๊ฐ€ ์ผ์น˜ํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค.");
    }

    scheduleRepository.delete(schedule);
    return ResponseEntity.ok("์‚ญ์ œ ์™„๋ฃŒ");
}

์‚ญ์ œ ํ›„ ๋‹จ๊ฑด ์กฐํšŒ ํ™•์ธ

์‚ญ์ œ ํ›„์— ๊ฐ™์€ id๋ฅผ ์กฐํšŒํ–ˆ์„ ๋•Œ 404๊ฐ€ ๋‚ด๋ ค์˜ค๋Š”์ง€ ํ™•์ธํ–ˆ๋‹ค.


ํŠธ๋Ÿฌ๋ธ”์ŠˆํŒ…

1) Lombok ๋นจ๊ฐ„ ์ค„์ด ์•ˆ ์—†์–ด์ง

  • build.gradle์— Lombok ์˜์กด์„ฑ์„ ์ถ”๊ฐ€ํ•ด๋„ ๋นจ๊ฐ„ ์ค„์ด ๊ณ„์† ๋‚จ์•˜๋‹ค.
  • IntelliJ์—์„œ annotation processing์„ ์ผœ๊ณ , Lombok ํ”Œ๋Ÿฌ๊ทธ์ธ์„ ํ™œ์„ฑํ™”ํ•˜๋‹ˆ ํ•ด๊ฒฐ๋๋‹ค.

2) ์˜์กด์„ฑ์ด ๋ถ€์กฑํ•ด์„œ JPA/Web์ด ๋™์ž‘ํ•˜์ง€ ์•Š์Œ

  • ์ฒ˜์Œ์—” spring-boot-starter๋งŒ ์žˆ์–ด์„œ @Entity, JpaRepository, Controller๊ฐ€ ์ „๋ถ€ ์ œ๋Œ€๋กœ ๋™์ž‘ํ•˜์ง€ ์•Š์•˜๋‹ค.
  • starter-web, data-jpa, mysql-connector ์ถ”๊ฐ€ ํ›„ ํ•ด๊ฒฐ.

3) ์‚ญ์ œ๋œ id ์กฐํšŒ ์‹œ 500 ์‘๋‹ต

  • orElseThrow() ์˜ˆ์™ธ๊ฐ€ ๊ทธ๋Œ€๋กœ ์˜ฌ๋ผ๊ฐ€๋ฉด์„œ 500์ด ๋–ด๋‹ค.
  • ์—†๋Š” ์ž์›์€ 404๊ฐ€ ๋งž๊ธฐ ๋•Œ๋ฌธ์—, ResponseEntity๋กœ 404๋ฅผ ์ง์ ‘ ๋‚ด๋ ค์ฃผ๋„๋ก ์ˆ˜์ •ํ–ˆ๋‹ค.

ํšŒ๊ณ 

์ฒ˜์Œ์—” CRUD๋‹ˆ๊นŒ ๊ธˆ๋ฐฉ ๋๋‚˜๊ฒ ์ง€๋ผ๊ณ  ์ƒ๊ฐํ–ˆ๋Š”๋ฐ, ์‹ค์ œ๋กœ ํ•ด๋ณด๋‹ˆ ๊ตฌํ˜„ ์ž์ฒด๋ณด๋‹ค ํ™˜๊ฒฝ ์„ค์ •๊ณผ ํ๋ฆ„ ์ดํ•ด์—์„œ ์‹œ๊ฐ„์ด ๋งŽ์ด ๊ฑธ๋ ธ๋‹ค.
ํŠนํžˆ DTO๋ฅผ ์™œ ์จ์•ผ ํ•˜๋Š”์ง€, ์˜ˆ์™ธ๋ฅผ ๋˜์ง€๋ฉด ์™œ 500์ด ๋˜๋Š”์ง€ ๊ฐ™์€ ๋ถ€๋ถ„์€ ์ง์ ‘ ๋ถ€๋”ชํ˜€๋ด์•ผ ๊ฐ์ด ์™”๋‹ค.

๋˜, Postman์œผ๋กœ ๋งค ๋‹จ๊ณ„๋งˆ๋‹ค ๊ฒฐ๊ณผ๋ฅผ ํ™•์ธํ•œ ๊ฒƒ์ด ๋„์›€์ด ๋งŽ์ด ๋๋‹ค.
์ฝ”๋“œ๋งŒ ๋ณด๊ณ  ๋  ๊ฒƒ ๊ฐ™์€๋ฐ?๊ฐ€ ์•„๋‹ˆ๋ผ ์‹ค์ œ ์š”์ฒญ/์‘๋‹ต์„ ๋ณด๋ฉด์„œ ์–ด๋””๊ฐ€ ์ž˜๋ชป๋๋Š”์ง€ ๋ฐ”๋กœ ํŒ๋‹จํ•  ์ˆ˜ ์žˆ์—ˆ๋‹ค.

์ด๋ฒˆ ๊ณผ์ œ๋ฅผ ์ง„ํ–‰ํ•˜๋ฉด์„œ ๋…๊ฐ ์ด์Šˆ๋กœ ๋ชธ ์ƒํƒœ๊ฐ€ ์ข‹์ง€ ์•Š์•„ ๋„์ „๊ณผ์ œ๊นŒ์ง€ ์™„์„ฑํ•œ ํ›„ ์ œ์ถœํ•˜์ง€ ๋ชปํ•ด ์•„์‰ฌ์›€์ด ๋งŽ์ด ๋‚จ๋Š”๋‹ค.
์‹œ๊ฐ„ ๋‚ด์— ๋„์ „๊ณผ์ œ๊นŒ์ง€ ์ œ์ถœ์€ ๋ชปํ•˜์˜€์ง€๋งŒ ๋”ฐ๋กœ ๊ฐœ์ธ ํ•™์Šต์‹œ๊ฐ„์— ๊ณ„์† ํ•ด๋ณผ ์ƒ๊ฐ์ด๋‹ค.