Light Blue Pointer
본문 바로가기

Developing159

2024-01-16, Today I Learned 오늘 한 일 1. 리뷰 백엔드 개발 2. 글 상세페이지, 작성페이지 로그인값 받아서 연결! → 모종의 이유로 로그인 페이지에서 로그인 성공하고 헤더에 달아둔게 페이지 이동하면 달리지 않아 있어서 인증 실패하는 이슈로 그냥 페이지만 다듬고 말았다 ㅋㅋ 3. 리뷰 파트 테이블 구조 리팩토링 진행! ⛏️ 4. 모집마감시 주문최소금액 넘었는지 판별하는 로직 추가 1. 리뷰 백엔드 개발 리뷰 백엔드 개발 시작! 1-1. 리뷰 쓰려고 주문기록(Order) 조회하는 기능 먼저 만듦 예전에 팀 회의에서 같이 정한 리뷰 선택지 친절하고 매너가 좋아요 35 시간 약속을 잘 지켜요 32 소통과 응답이 빨라요 31 약속 시간에 나타나지 않았어요 17 아예 나타나지 않았어요 12 값을 지불하지 않았어요 1 소통과 응답이 느려요.. 2024. 1. 16.
2024-01-15, Today I Learned 오늘 한 일 1. 수령완료 기능 구현 2. 글 상세페이지 완료 1. 수령완료 기능 구현 망망대해에서 시작하는 하루~~ 일단 백엔드 남은 기능 수령완료 하고나서 프론트 다시 손봄 @Override public void receiveOrder(PostIdRequest postIdReq, User user) { Post post = getPostById(postIdReq.postId()); UserPost userPost = userPostRepository.findByPostAndUserAndRoleEquals(post, user, UserPostRole.PARTICIPANT).orElseThrow(()-> new GlobalException(PostErrorCode.FORBIDDEN_ACCESS_PARTI.. 2024. 1. 15.
2024-01-14, Today I Learned 오늘 한 일 1. 나가기 기능 개발 2. 글 작성페이지 프론트 다듬기 3. 글 상세페이지 만들기 시작 (2024-01-15에 완료함) 1. 나가기 기능 나가기 기능 개발 완료! Controller //나가기 기능 @DeleteMapping("/posts/exit") public ApiResponse exit( @AuthenticationPrincipal UserDetailsImpl userDetails, @Valid @RequestBody PostIdRequest postIdReq ) { postService.exit(postIdReq, userDetails.getUser()); return new ApiResponse(HttpStatus.OK.value(), "글에서 나가기 되었습니다."); } Ser.. 2024. 1. 15.
2024-01-13, Today I Learned 오늘 할 일 1. 지도 api에서 좌표값 가져오는거 해봄! 2. 주문완료기능 개발 1. 지도 api에서 좌표값 가져오기 지도 api를 해봄 https://apis.map.kakao.com/ 동 별로 조회하는것도 하기로 했는데 그건 네이버지도만 있는것 같기도 해서 더 찾아봄 https://www.ncloud.com/product/applicationService/maps 네이버 지도 기능) Places 지번, 도로명을 질의어로 주소의 좌표값과 세부 정보 제공, 네이버 지도에서 좌표를 주소 정보로 변환하는 서비스 가능 Geocoding 입력한 주소를 검색하여 좌표를 포함한 상세 정보 제공 Reverse Geocoding 좌표를 검색하여 법정동, 행정동, 지번 주소, 도로명 주소 등 주소 정보 제공 https.. 2024. 1. 14.
2024-01-12, Today I Learned 오늘 한 일 1. 글 검색기능 간략하게 해보기 : store에 대해서, 추후 필드 추가는 생각해봄 2. 글 작성페이지 만들기 3. 프론트랑 백 연결하기 4. 모집마감 기능 구현하기 1. 글 검색기능 글 검색기능 만들어봄 일단은 가게 이름만 검색하고 공백 상관없이 다 맞아야 검색되는걸로 public record PostSearchRequest( @NotNull(message = "검색어를 입력하세요.") String keyword ) { } //글 검색하기 @DeleteMapping("/posts/search") public ApiResponse searchPost( @AuthenticationPrincipal UserDetailsImpl userDetails, @RequestBody PostSearchR.. 2024. 1. 12.
JPA 순환참조/무한루프 문제 해결 (Could not write JSON: Infinite recursion (StackOverflowError)) ⛳문제 발생 : 재귀가 끝나지 않음 @Override public DetailedPostResponse getPost(Long postId, User user) { Post post = getPostById(postId); List userPosts = getUserPostsByPost(post); List allMenus = getMenus(userPosts,post); return DetailedPostResponse.builder() .author(getAuthor(userPosts)) .address(post.getAddress()) .store(post.getStore()) .minPrice(post.getMinPrice()) .deliveryCost(post.getDeliveryCost()) .. 2024. 1. 11.
2024-01-11, Today I Learned 오늘 한 일 1. Custom annotation 이어서 해봄 2. 글 삭제하기 기능 구현(⛏️안 해도 될 고생을... 함⛏️) 3. Thymeleaf 환경설정 1. Custom annotation 이어서 해봄! https://www.baeldung.com/spring-mvc-custom-validator baeldung을 읽어보겠음!! 1. The New Annotation @Documented @Constraint(validatedBy = ContactNumberValidator.class) @Target( { ElementType.METHOD, ElementType.FIELD }) @Retention(RetentionPolicy.RUNTIME) public @interface ContactNumbe.. 2024. 1. 11.
2023-01-10, Today I Learned 오늘 한 일 모아요이츠 1. 모든 에러를 GlobalHandler로 AOP처리해봄 2. Swqgger 연결 3. 글 단독조회(상세페이지 조회) 기능 구현 4. 글 카테고리별 전체조회 기능 구현 1. 모든 에러를 GlobalHandler로 AOP 처리해봄 모든 에러를 받는 ErrorHandler를 만들어보고 싶어짐! // @ExceptionHandler(MethodArgumentNotValidException.class) // public ApiResponse handleMethodArgumentNotValidException( // BindingResult bindingResult) { // List errors = bindingResult.getFieldErrors().stream() // .map((.. 2024. 1. 10.
2024-01-09, Today I Learned @IdClass Composite key in Spring 📖 How to make Composite Keys in Spring Entity 📖Entity에 복합키로 id구성하는 방법 @IdClass, @EmbeddedId 📖 How to make Composite Keys in Spring Entity 1. IdClass로 구현하는 방식 사용 방법은 간단하다! 1) Entity에 id를 설정해준다 @IdClass(UserPostId.class) 클래스에 이 어노테이션을 붙여서 id를 지정해주고 @Id 복합 greedydeveloper.tistory.com 🚩Issue : jakarta.validation.UnexpectedTypeException {"timestamp":"2024-01-09T03:05:08.657+00:00","status":500,"error.. 2024. 1. 9.