Skip to content

[엄성현_BackEnd] 5주차 과제 제출합니다.#37

Open
castleeom0001-collab wants to merge 3 commits intoBCSDLab-Edu:mainfrom
castleeom0001-collab:main
Open

[엄성현_BackEnd] 5주차 과제 제출합니다.#37
castleeom0001-collab wants to merge 3 commits intoBCSDLab-Edu:mainfrom
castleeom0001-collab:main

Conversation

@castleeom0001-collab
Copy link

5주차 실습 과제를 수행했습니다.
실습1, 2의 자기소개 과제는 성공했으나, 3번째의 CRUD API 부분은 좀 더 공부하고 도전하겠습니다.

Copy link

@asa9874 asa9874 left a comment

Choose a reason for hiding this comment

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

고생하셨습니다!👍
CRUD의 데이터의 경우 다음처럼 선언하신뒤 리스트에 데이터를 추가/삭제/수정 하는 형식으로 진행해주시면 될거같아요

List<Person> datas = new ArrayList<>

Comment on lines +23 to +27
@GetMapping("/json")
@ResponseBody
public hello3 getJsonDate(){
return new hello3(23, "엄성현");
}
Copy link

Choose a reason for hiding this comment

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

이렇게 객체를 반환할때 json으로 바뀌는걸 직렬화라고 하는데 한번 알아보시면 좋을거같아요

Choose a reason for hiding this comment

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

알려주셔서 감사합니다. 관련된 내용에 대해 꼭 알아보겠습니다.

@@ -0,0 +1,4 @@
package com.example.bcsd;

public class ArticleController {
Copy link

Choose a reason for hiding this comment

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

상태코드 반환에 대해서는 ResponseEntity 참고해보시면 좋을거같아요

Choose a reason for hiding this comment

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

옙. @ResponseEntity에 대해 알아보겠습니다.

public hello3 getJsonDate(){
return new hello3(23, "엄성현");
}
public static class hello3{
Copy link

Choose a reason for hiding this comment

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

클래스명 첫글자는 대문자로 해주세요👍

Choose a reason for hiding this comment

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

앞으로 꼭 대문자로 하겠습니다.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants