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

[8주차]Cow_mvc_practice(win9-tech) #5

Open
wants to merge 22 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
8c72b2f
[refactor] 패지키 구조 리팩토링
win9-tech May 14, 2024
6a408f6
[Feat] 게시글 생성 구현
win9-tech May 18, 2024
b05596f
[Feat] 전체 게시글조회 구현
win9-tech May 18, 2024
a7d5bb8
[Feat] 사용자 정보 수정 구현
win9-tech May 18, 2024
bdc83de
[Feat] 단일 게시글 조회 구현
win9-tech May 18, 2024
c6dac48
[Feat] 댓글 작성 구현
win9-tech May 18, 2024
dd1dfb9
[Feat] 게시글 삭제 구현
win9-tech May 18, 2024
42479cc
[refactor] dto패키지 위치 변경
win9-tech May 18, 2024
03bc387
[refactor] Member 생성 코드 개선
win9-tech May 18, 2024
9bbac6c
[refactor] Member update 기능 개선
win9-tech May 18, 2024
ea3ae0d
[refactor] Member find 기능 개선
win9-tech May 18, 2024
770abb8
[refactor] All Member find 기능 개선
win9-tech May 18, 2024
4357eb8
[refactor] CreateMemberRequest toEntity 메서드 Member entity 정적 팩토리메서드 사용
win9-tech May 18, 2024
fff4abf
[refactor] MemberController, MemberService 메서드명 수정
win9-tech May 18, 2024
27f80c3
[refactor] PostController, PostService 메서드명 수정
win9-tech May 19, 2024
c1f4049
[refactor] Post delete 반환타입 변경
win9-tech May 19, 2024
d8cc1c1
[refactor] Comment 생성 코드 개선
win9-tech May 19, 2024
5aac46f
[refactor] 코드 컨벤션 수정
win9-tech May 19, 2024
1e9956e
[refactor] baseEntity, TimestampedEntity 적용
win9-tech May 20, 2024
70f8834
[refactor] 연관관계 편의 메서드 추가, Dto 구조 변경
win9-tech May 20, 2024
c1ccef8
[refactor] CreatedCommentResponse 컨벤션 수정
win9-tech May 20, 2024
9efb6e3
database erd 추가
win9-tech May 21, 2024
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 @@ -2,13 +2,7 @@

import java.util.List;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;

import com.cow.cow_mvc_practice.member.controller.dto.request.MemberRequest;
import com.cow.cow_mvc_practice.member.controller.dto.response.MemberResponse;
Expand All @@ -23,26 +17,19 @@ public class MemberController {

private final MemberService memberService;

/* 기본 */
// @PostMapping("/new")
// public String create(@RequestBody final MemberRequest memberRequest) {
// memberService.join(memberRequest);
// return "회원저장 성공!";
// }
//
// @GetMapping("/{memberId}")
// public String findMember(@PathVariable final Long memberId) {
// Member member = memberService.findOne(memberId);
// return "member 아이디: " + member.getId() + ", member 이름: " + member.getName();
// }
//

/* MemberResponse dto 적용 */
@PostMapping("/new")
public MemberResponse create(@RequestBody final MemberRequest memberRequest) {
System.out.println("111");
Copy link
Owner

Choose a reason for hiding this comment

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

test 한 코드는 지워주세요!

return memberService.join(memberRequest.getName());
}

// @PatchMapping("/{memberId}")
// public MemberResponse update(@PathVariable("memberId") String memberId, @RequestBody final MemberRequest memberRequest) {
//
// return memberService.
// }

@GetMapping("/{memberId}")
public MemberResponse findMember(@PathVariable final Long memberId) {
return memberService.findOne(memberId);
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ spring:
jpa:
open-in-view: true
hibernate:
ddl-auto: validate
ddl-auto: create
show-sql: true
properties:
hibernate:
Expand Down