Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโ€™ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First seminar/#1 #2

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,9 @@ public ResponseEntity<Map<String, String>> healthCheckV4() {
public ResponseEntity<HealthCheckResponse> healthCheckV5() {
return ResponseEntity.ok(new HealthCheckResponse());
}

@GetMapping("/v6")
public AssignmentResponse healthCheckV6() {
Copy link

@sss4920 sss4920 Oct 19, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AssignmentResponse๋ผ๊ณ  response ์ด๋ฆ„์„ ๋งŒ๋“ค๋ฉด ๋‚˜์ค‘์— ๋‹ค๋ฅธ api์— ์ด api๋ฅผ ๋ณ€ํ˜•ํ•ด์„œ ์‚ฌ์šฉํ•  ๋•Œ ์˜๋ฏธ๊ฐ€ ๋ญ”๊ฐ€ ํ™• ์™€๋‹ฟ์ง€ ์•Š์„ ๊ฒƒ ๊ฐ™๋‹ค๋Š” ๋Š๋‚Œ์ด ์ข€ ์žˆ๊ธดํ•˜๋„ค์šคใ…Žใ…Ž ๋ฉ”์†Œ๋“œ ์ด๋ฆ„์ด๋‚˜ ๋ณ€์ˆ˜๋ช…๋“ฑ์„ ๊ณ ๋ฏผํ•ด๋ณด๋Š” ๊ฒƒ๋„ ์ข‹์€ ์Šต๊ด€์ด ๋  ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค!โ˜บ๏ธ

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์ด๋ฆ„์„ ๋ญ๋กœ ํ• ๊นŒ ๋˜๊ฒŒ ๊ณ ๋ฏผํ–ˆ๋Š”๋ฐ ์ผ๋‹จ ๋ฆฌ๋ทฐํ•ด์ฃผ์‹ค ๋ถ„๋“ค์ด ๋น ๋ฅด๊ฒŒ ํ™•์ธํ•  ์ˆ˜ ์žˆ๋„๋ก ํ•œ ๋ฒˆ์— ์•Œ์•„๋ณผ ์ˆ˜ ์žˆ๋Š” ์ด๋ฆ„์ด ์ข‹์ง€ ์•Š์„๊นŒ ํ•˜๊ณ  ์ด๋ ‡๊ฒŒ ์ ์—ˆ์Šต๋‹ˆ๋‹ค ใ…‹ใ…‹ ๋ฉ”์†Œ๋“œ, ๋ณ€์ˆ˜ ์ด๋ฆ„์„ ์ž˜ ์ ๋Š” ๊ฒƒ์ด ๊ฐœ์ธ์ ์œผ๋กœ ์ข€ ์–ด๋ ค์›Œ์„œ ใ… ใ…  ์•ž์œผ๋กœ ๋” ๊ณ ๋ฏผํ•ด๋ณด๋„๋ก ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค! ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค~!!

return new AssignmentResponse(200, "OK", true);
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์‘๋‹ต ๊ฐ์ฒด๋ฅผ ๊น”๋”ํ•˜๊ฒŒ ์ž˜ ์งœ์…จ๋„ค์š” ๐Ÿ‘

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค~!!

Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package com.server.dosopt.seminar.dto;

import lombok.Builder;
import lombok.Getter;

@Getter
public class AssignmentResponse {

private int code;
private String status;
private boolean success;

@Builder
public AssignmentResponse(int code, String status, boolean success) {
this.code = code;
this.status = status;
this.success = success;
}
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์˜ค builder ํŒจํ„ด์„ ์‚ฌ์šฉํ•˜์…จ๋„ค์šฉ!โ˜บ๏ธ ์—ฌ๊ธฐ ๋ถ€๋ถ„์—์„œ ๊ถ๊ธˆํ•œ ์ ์€

@AllArgsConstructor
@Getter
@Builder
public class AssignmentResponse {
    private int code;
    private String status;
    private boolean success;
}

์š”๋Ÿฐ ์ฝ”๋“œ๋ฅผ ํ˜น์‹œ ๊ณ ๋ คํ•ด๋ณด์…จ๋Š”์ง€ ๋งŒ์•ฝ ๊ทธ๋žฌ๋‹ค๋ฉด ์ง์ ‘ ์ƒ์„ฑ์ž๋ฅผ ๊ตฌํ˜„ํ•˜๊ณ  Builder ์–ด๋…ธํ…Œ์ด์…˜์„ ๋ถ™์ธ ์ด์œ ๊ฐ€ ์žˆ์„๊นŒ์šฉ?!(์•„ ๋ฌผ๋ก  ์ €๋„ ๋ชฐ๋ผ์„œ ใ…Žใ…Ž)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ํด๋ž˜์Šค์— @builder๋ฅผ ์ ์–ด์ฃผ๋Š” ๊ฒƒ์€ ํด๋ž˜์Šค ๋‚ด์— ๋ชจ๋“  ํ•„๋“œ์— ๋Œ€ํ•ด ๋นŒ๋” ํŒจํ„ด์ด ์ ์šฉ๋˜๋Š” ๊ฑฐ๋ผ ์ƒ์„ฑ์ž ์œ„์— ๋ถ™์ด๋Š” ๊ฒƒ์„ ๊ณ ๋ คํ•ด๋ณด๋ผ๋Š” ๋ฆฌ๋ทฐ๋ฅผ ๋‹ค๋ฅธ ๋ถ„ ์ฝ”๋“œ์—์„œ ๋ดค์Šต๋‹ˆ๋‹ค!

๊ทธ๋ž˜์„œ ์ €๋„ ๋‹น์žฅ ๋นŒ๋”๋ฅผ ์ ์šฉ์‹œํ‚ฌ ์ƒ์„ฑ์ž ์œ„์—๋งŒ ๋ถ™์ด๋Š”๊ฒŒ ๋” ์ข‹์„ ๊ฒƒ ๊ฐ™๋‹ค๋Š” ์ƒ๊ฐ์ด ๋“ค์–ด ์ด๋ ‡๊ฒŒ ์ฝ”๋“œ๋ฅผ ์ ์—ˆ์Šต๋‹ˆ๋‹ค~!!

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์˜๋ฏธ์žˆ๋Š” ์ฝ”๋“œ..! ํ›Œ๋ฅญํ•ฉ๋‹ˆ๋‹ค!๐Ÿ”ฅ

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@builder ,,! ๋ชฐ๋ž๋˜ ๋ถ€๋ถ„์ธ๋ฐ, ์ €๋„ ๋ฐฐ์›Œ๊ฐ‘๋‹ˆ๋‹ค!!๐Ÿ˜Š

Comment on lines +6 to +19
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

๊น”๋”ํ•˜๋„ค์š”~!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค~!!