-
Notifications
You must be signed in to change notification settings - Fork 0
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
[2주차] 심화 과제 #9
base: main
Are you sure you want to change the base?
[2주차] 심화 과제 #9
Conversation
@NoArgsConstructor | ||
public class Article { | ||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이거 디비랑 연결되어 있을때 디비에게 기본키 값 관리 위임해주는 어노테이션이라고 들었는데 (GenerationType.IDENTITY의 경우) 아닌가욤,,,? 지금 디비랑 연결이 안되어있는 상황에서 어떻게 돌아가나요??
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
연결되어있네용 야무지다
private LocalDateTime createdAt; | ||
|
||
@Builder | ||
public Article(String title, String content, LocalDateTime createdAt) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
빌더패턴까지 야무지네요
} | ||
|
||
@Override | ||
@Transactional(readOnly = true) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
야무지다
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver | ||
spring.datasource.username=root | ||
spring.datasource.password=qwer1234 | ||
spring.jpa.hibernate.ddl-auto=create-drop |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
디비까지 연결하셨나보네요 멋찌다,,,그런데이런정보는노출되면민감할수있기때문에 .gitIgnore를 활용해서 깃에 공개되지 않도록합쉬다,,,,^^,,,,,, 이건 테스트용인 것 같아서 ㄱㅊ아 보이긴하지만,,,,,,,
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
넵 참고하겠습니당 감사합니닷 (__)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
굿굿~~ 저 언제 제 찐계정 아이디랑 패스워드 깃에 그대로 올린적 있어서 자다말고 헐레벌떡 수정했었음요ㅋㅋ큐
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
고생 많으셨습니다!
실력차이가 나서 코드를 다 이해가 잘 안되네요 어서 스프링을 배워서 코리 1인분하겠습니다
public ResponseEntity<String> register( | ||
@RequestBody ArticleRequestDto requestDto | ||
) { | ||
articleService.register(requestDto); | ||
return ResponseEntity.ok("정상적으로 저장되었습니다."); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
오.. Formatter 어떤거 사용하시나요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
링크 이거 참고하시면 될거에요! 저는 여기에다가 google 말고 우테코 스타일 가이드 이거 적용해서 써요!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
굉장히 감사합니다~
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver | ||
spring.datasource.username=root | ||
spring.datasource.password=qwer1234 | ||
spring.jpa.hibernate.ddl-auto=create-drop |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
고생 많으셨습니다!
실력차이가 나서 코드를 다 이해가 잘 안되네요 어서 스프링을 배워서 코리 1인분하겠습니다
디비 연결까지 하시다니 진짜 대단👍 |
사실 확장성 고려라고 말하고 싶은데 (ㅎㅎ..) 그렇게 거창한 이유는 아니었고 그냥 객체지향 개념을 배운 김에 사용해야겠다! 생각한 정도였어요! 근데 구현체가 하나여서 분리를 할 필요가 없더라도 인터페이스를 생성하기는 하더라구요..! 저는 웬만하면 생성하는 것이 좋은 편으로 알고 있습니당..! |
📝 관련 이슈
closed #7
👩🏻💻 내용
API 명세서
😸 중점을 둔 부분
💡 배운 점