-
Notifications
You must be signed in to change notification settings - Fork 5
[BE] (build) 9 WEEK #12
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
base: main
Are you sure you want to change the base?
Conversation
- 요구 사항에 없던 password 제거 - Member 생성자를 사용한 setting
Map 동시성 문제를 해결하기 위해 ConcurrentHashMap 사용
private static final 로 외부에서의 접근 및 중복 생성 방지
- order 메소드에서 member 의 아이디를 사용해 member의 등급을 조사한 뒤 할인율을 계산하였습니다.
- ProductRepositroy 인터페이스 작성 - ProductRepository를 구현한 MemeoryProductRepository 에서 메모리에 저장하는 기능 구현
(1week code)순수자바에서 gradle 변경
- Rename MemoryMemberRepository to MemberRepository - 자잘한 코드 수정
MemberService 인터페이스를 작성하기 위해 기존 클래스명을 MemberServiceImpl로 변경
MemberService 인터페이스를 작성하고 MemberServiceImpl에 구현함
- Product -> Order - price 와 discountedPrice에 대한 자료형 수정
- 할인정책 interface 와 구현체 작성
[BE] (feat) orderService 구현 주문서비스 인터페이스 및 구현체 작성
[BE] (refactor) Main class 수정 오타 수정 및 코드 리팩토링
[BE] (feat) RateDiscountPolicy 생성 할인을 30(%) 로 지정함 VIP 외 등급은 0을 리턴시킴
[BE] (docs) Add ISSUE ISSUE 에 대한 내용 추가
[BE] (refactor) DiscountPolicy 클래스 리팩토링 - if문 수정 - discountRateAmount 정적변수로 변경 - discountFixAmount 정적변수로 변경
[BE] (refactor) 생성자를 통해 외부에서 주입받도록 변경 - 생성자를 사용해 FixDiscountPolicy 나 RateDiscoutPolicy를 주입할 수 있음.
[BE] (test) Main Test orderServiceImpl 생성자 주입 테스트 (return 값으로 지정한 30이 출력됨)
[BE] (docs) Add solution 1번 Issue에 대한 Solution 작성
[BE] (docs) DI 이론 요약
[BE] (docs) Solution 수정
[BE] (docs) 좋은 OOP 설계 5가지 원칙 정리 SOLID - SRP - OCP - LSP - ISP - DIP
ENUM 유효성 검증을 위해 아래 내용 참고하였습니다. https://jsy1110.github.io/2022/enum-class-validation/
- 7자리 이하의 값에 유효성 검증 오류가 나오지 않았음 - @range() 로 변경하여 오류 수정
12 WEEK/studentManagement/src/main/java/fx/studentManagement/controller/form/SignUpForm.java
Outdated
Show resolved
Hide resolved
| import jakarta.validation.ConstraintValidatorContext; | ||
|
|
||
| /* | ||
| * https://jsy1110.github.io/2022/enum-class-validation/ |
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.
이렇게 복잡하게 안하셔도 Spring 은 @Valid , @Validate 라는 어노테이션을 제공합니다.
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.
Enum 유효성 검사 에노테이션이 따로 존재하나요?
12 WEEK/studentManagement/src/main/java/fx/studentManagement/service/StudentService.java
Show resolved
Hide resolved
updateStudent -> editStudentInformation
shinywoon
left a comment
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.
중간중간 코드가 기술적으로 아쉬운부분들이 많습니다.
보완하신다면 좋은 개발자가 될 수 있을것 같습니다.
12 WEEK/studentManagement/src/main/java/fx/studentManagement/controller/StudentController.java
Outdated
Show resolved
Hide resolved
12 WEEK/studentManagement/src/main/java/fx/studentManagement/service/StudentService.java
Outdated
Show resolved
Hide resolved
12 WEEK/studentManagement/src/main/java/fx/studentManagement/service/StudentService.java
Outdated
Show resolved
Hide resolved
12 WEEK/studentManagement/src/main/java/fx/studentManagement/service/StudentService.java
Outdated
Show resolved
Hide resolved
12 WEEK/studentManagement/src/main/java/fx/studentManagement/controller/StudentController.java
Outdated
Show resolved
Hide resolved
12 WEEK/studentManagement/src/main/java/fx/studentManagement/service/StudentService.java
Outdated
Show resolved
Hide resolved
| import jakarta.validation.ConstraintValidatorContext; | ||
|
|
||
| /* | ||
| * https://jsy1110.github.io/2022/enum-class-validation/ |
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 은 @Valid , @Validate 라는 어노테이션을 제공합니다.
| 소프트웨어학과, | ||
| 컴퓨터공학과, | ||
| 산업디자인학과 |
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.
{
"studentNumber" : 2026055,
"studentName" : "이동섭",
"studentBirth" : "2001_09_07",
"studentMajor" : "소프트웨어학과",
"studentSemester" : 2,
"studentAddress" : "충주시",
"studentGrade" : 1
}
studentMajor에 한글로 "소프트웨어학과" 같은 요청이 오면 SoftwareDept 로 영문으로 매핑하는 코드를 따로 작성해야 하는건가요?...?
12 WEEK/studentManagement/src/main/java/fx/studentManagement/controller/form/SignUpForm.java
Outdated
Show resolved
Hide resolved
| public ResponseEntity signUp(@Valid @RequestBody SignUpForm signUpForm, BindingResult bindingResult) { | ||
|
|
||
| if(bindingResult.hasErrors()) | ||
| return new ResponseEntity<>(bindingResult.getAllErrors(), HttpStatus.BAD_REQUEST); |
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.
responseForm 을 사용했던거 같은데 .... ResponseEntity<> 를 사용하는 이유가 있을까요?
- 폼데이터 추가 - 메서드명 변경
- saveStudent -> convertSignUpFormToStudent
- existsStudent 메서드로 대체하여 가독성과 일관성을 향상시킴
No description provided.