Open
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() 로 변경하여 오류 수정
seob7
commented
Feb 6, 2024
12 WEEK/studentManagement/src/main/java/fx/studentManagement/controller/form/SignUpForm.java
Outdated
Show resolved
Hide resolved
seob7
commented
Feb 6, 2024
| import jakarta.validation.ConstraintValidatorContext; | ||
|
|
||
| /* | ||
| * https://jsy1110.github.io/2022/enum-class-validation/ |
Contributor
There was a problem hiding this comment.
이렇게 복잡하게 안하셔도 Spring 은 @Valid , @Validate 라는 어노테이션을 제공합니다.
Member
Author
There was a problem hiding this comment.
Enum 유효성 검사 에노테이션이 따로 존재하나요?
seob7
commented
Feb 7, 2024
12 WEEK/studentManagement/src/main/java/fx/studentManagement/service/StudentService.java
Show resolved
Hide resolved
updateStudent -> editStudentInformation
shinywoon
reviewed
Feb 8, 2024
Contributor
shinywoon
left a comment
There was a problem hiding this comment.
중간중간 코드가 기술적으로 아쉬운부분들이 많습니다.
보완하신다면 좋은 개발자가 될 수 있을것 같습니다.
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/ |
Contributor
There was a problem hiding this comment.
이렇게 복잡하게 안하셔도 Spring 은 @Valid , @Validate 라는 어노테이션을 제공합니다.
Comment on lines
4
to
6
| 소프트웨어학과, | ||
| 컴퓨터공학과, | ||
| 산업디자인학과 |
Member
Author
There was a problem hiding this comment.
{
"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); |
Contributor
There was a problem hiding this comment.
responseForm 을 사용했던거 같은데 .... ResponseEntity<> 를 사용하는 이유가 있을까요?
- 폼데이터 추가 - 메서드명 변경
- saveStudent -> convertSignUpFormToStudent
- existsStudent 메서드로 대체하여 가독성과 일관성을 향상시킴
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.