Skip to content

[3주차] 기본 과제 제출 (#7)#9

Open
meenyweeny wants to merge 1 commit intodevelopfrom
feat/#7
Open

[3주차] 기본 과제 제출 (#7)#9
meenyweeny wants to merge 1 commit intodevelopfrom
feat/#7

Conversation

@meenyweeny
Copy link
Copy Markdown
Member

@meenyweeny meenyweeny commented May 6, 2023

SERVER PR

closed #7

미 안 !!!! 피알나중에쓸게.. ㅜ.ㅜ

🐕 과제 구현 명세

✅ 기본 과제

✅ 심화 과제


🐥 이런 점이 새로웠어요 / 어려웠어요

@meenyweeny meenyweeny changed the title [3주차] 기본 과제 제출 [3주차] 기본 과제 제출 (#7) May 6, 2023
Comment on lines +16 to +17
*/
@ResponseStatus(HttpStatus.BAD_REQUEST)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

ErrorStatus에서 Bad Request를 보내주는 것으로 보입니다. 따라서 위에 어노테이션으로 두지 않아도 괜찮습니다:)

Comment on lines +12 to +13
@NoArgsConstructor(access = AccessLevel.PROTECTED)
public class User {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Protected를 하신 이유를 여쭈어봐도 될까요

Comment on lines +12 to +31
/*
BAD_REQUEST
*/
VALIDATION_EXCEPTION(HttpStatus.BAD_REQUEST, "잘못된 요청입니다."),
VALIDATION_REQUEST_MISSING_EXCEPTION(HttpStatus.BAD_REQUEST, "요청값이 입력되지 않았습니다."),


/*
CONFLICT
*/
CONFLICT_EMAIL_EXCEPTION(HttpStatus.CONFLICT, "이미 등록된 이메일입니다."),
CONFLICT_NICKNAME_EXCEPTION(HttpStatus.CONFLICT, "이미 등록된 닉네임입니다."),

/*
SERVER_ERROR
*/
INTERNAL_SERVER_ERROR(HttpStatus.INTERNAL_SERVER_ERROR, "예상치 못한 서버 에러가 발생했습니다."),
BAD_GATEWAY_EXCEPTION(HttpStatus.BAD_GATEWAY, "일시적인 에러가 발생하였습니다.\n잠시 후 다시 시도해주세요!"),
SERVICE_UNAVAILABLE_EXCEPTION(HttpStatus.SERVICE_UNAVAILABLE, "현재 점검 중입니다.\n잠시 후 다시 시도해주세요!"),
;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

문서화 지립니다.

Comment on lines +18 to +27
@Transactional
public UserResponseDto create(UserRequestDto request) {
User user = User.builder()
.email(request.getEmail())
.nickname(request.getNickname())
.password(request.getPassword())
.build();
userRepository.save(user);
return UserResponseDto.of(user.getId(), user.getNickname());
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

트랜잭션 처리해주신 이유를 여쭈어봐도 될까요?

Copy link
Copy Markdown

@ditoo-land ditoo-land left a comment

Choose a reason for hiding this comment

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

재미있겠다 허허허허ㅓ

private final String nickname;

@NotBlank
@Pattern(regexp="(?=.*[0-9])(?=.*[a-zA-Z])(?=.*\\W)(?=\\S+$).{8,20}",message = "비밀번호는 영문 대,소문자와 숫자, 특수기호가 적어도 1개 이상씩 포함된 8자 ~ 20자의 비밀번호여야 합니다.")
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

규식이다

import sopt.org.ThirdSeminar.exception.SuccessStatus;

@Getter
@RequiredArgsConstructor(access = AccessLevel.PRIVATE)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

오 엑세스 레벨도 정해줄수 있구나.. 싱기 ㅋ

Copy link
Copy Markdown

@hyesuuou hyesuuou left a comment

Choose a reason for hiding this comment

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

아요이경민

Copy link
Copy Markdown
Collaborator

@hansh0101 hansh0101 left a comment

Choose a reason for hiding this comment

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

아 슬슬 달 수 있는 게 없어진다 . . .

@@ -0,0 +1,37 @@
HELP.md
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

헤업 ~

testImplementation 'org.springframework.boot:spring-boot-starter-test'

implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
// mysql --version
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

줄맞춤 좀 해주지 ...

Comment on lines +6 to +7
@SpringBootApplication
public class ThirdSeminarApplication {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Application 클래스가 뭐에요 ?

Comment on lines +32 to +53
//
//@Getter
//@RequiredArgsConstructor(access = AccessLevel.PRIVATE)
//@AllArgsConstructor(access = AccessLevel.PRIVATE)
//public class ApiResponseDto<T> {
//
// private final int code;
// private final String message;
// private T data;
//
// public static ApiResponseDto success(SuccessStatus successStatus) {
// return new ApiResponseDto<>(successStatus.getHttpStatus().value(), successStatus.getMessage());
// }
//
// public static <T> ApiResponseDto<T> success(SuccessStatus successStatus, T data) {
// return new ApiResponseDto<T>(successStatus.getHttpStatus().value(), successStatus.getMessage(), data);
// }
//
// public static ApiResponseDto error(ErrorStatus errorStatus) {
// return new ApiResponseDto<>(errorStatus.getHttpStatus().value(), errorStatus.getMessage());
// }
//} No newline at end of file
Copy link
Copy Markdown
Collaborator

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.

3차 세미나

4 participants