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

[10주차] API개발 미션(KoSeonJe) #3

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

KoSeonJe
Copy link

@KoSeonJe KoSeonJe commented Sep 13, 2023

스크린샷 2023-09-10 오후 11 39 08 스크린샷 2023-09-13 오후 12 54 27

@KoSeonJe KoSeonJe changed the title 10주차 API구현 미션 [10주차] API개발 미션(KoSeonJe) Sep 13, 2023
Copy link
Member

@wonjunYou wonjunYou left a comment

Choose a reason for hiding this comment

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

수정 부탁드립니다!

memberService.createUser(createMemberRequest);
}

@PutMapping(value = "/{memberId}")
Copy link
Member

Choose a reason for hiding this comment

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

value 없어도 됨!


private String name;

}
Copy link
Member

Choose a reason for hiding this comment

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

toEntity()

}

@GetMapping(value = "/{memberId}")
public MemberResponse getMemberInfo(@PathVariable Long memberId) {
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
Member

Choose a reason for hiding this comment

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

ResponseEntity

memberRepository.save(member);
}

public MemberResponse getMemberInfo(Long memberId) {
Copy link
Member

Choose a reason for hiding this comment

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

dto에 대한 변환 책임을 controller에서 변환하는 게 옳은가? service에서 변환이 옳은가? 한번 차이를 비교해보면 좋겠다.

memberRepository.save(member);
}

public MemberResponse getMemberInfo(Long memberId) {
Copy link
Member

Choose a reason for hiding this comment

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

readOnly 설정

public void updateUserInfo(Long memberId, UpdateMemberRequest updateMemberRequest) {
Member member = findOneUser(memberId);
member.update(updateMemberRequest.getAuthId(), updateMemberRequest.getName());
memberRepository.save(member);
Copy link
Member

Choose a reason for hiding this comment

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

???

Comment on lines +45 to +46


Copy link
Member

Choose a reason for hiding this comment

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

공백 제거


private final PostRepository postRepository;

private final MemberService memberService;
Copy link
Member

Choose a reason for hiding this comment

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

service vs repository

Comment on lines +1 to +18
spring:
datasource:
url: jdbc:mysql://localhost:3306/cow?createDatabaseIfNotExist=true
driver-class-name: com.mysql.cj.jdbc.Driver
username: root
password: 1234


jpa:
hibernate:
ddl-auto: create
properties:
hibernate:
show_sql: true
format_sql: true

server:
port: 9090
Copy link
Member

Choose a reason for hiding this comment

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

이런 yml파일에 컬럼들을 암호화를 한다던가? 혹은 직접 github에 노출시키지 않는 방법?
1.jasypt
2. github secrets

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