일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 |
- 네트워크
- backjoon
- CS지식
- 시큐리티
- 자료구조
- springboot
- 파이썬
- 데이터
- spring
- baekjoon
- Oracle
- postgresql
- JPA
- Flutter
- 데이터베이스
- DB
- 리눅스
- 백준
- python
- 플러터
- Spring Security
- CS
- 자바
- javascript
- 스프링
- 스프링 부트 쇼핑몰 프로젝트 with JPA
- 스프링부트
- 프로그래머스
- 자바스크립트
- Java
- Today
- Total
목록스프링 부트 쇼핑몰 프로젝트 with JPA (14)
Jin's Dev Story
이 내용은 스프링 부트 쇼핑몰 프로젝트 with JPA 책을 학습한 내용입니다. Repository BoardRepository import com.example.walkingmate_back.board.entity.Board; import org.springframework.data.domain.Pageable; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Query; import java.util.List; public interface BoardRepository extends JpaRepository { // 게시글 전체 조회 - 최신 값부터 @Qu..
이 내용은 스프링 부트 쇼핑몰 프로젝트 with JPA 책을 학습한 내용입니다. Service BoardService import com.example.walkingmate_back.board.dto.*; import com.example.walkingmate_back.board.entity.Board; import com.example.walkingmate_back.board.entity.BoardComment; import com.example.walkingmate_back.board.repository.BoardRepository; import com.example.walkingmate_back.user.entity.UserEntity; import com.example.walkingmate_bac..
이 내용은 스프링 부트 쇼핑몰 프로젝트 with JPA 책을 학습한 내용입니다. Controller BoardController import com.example.walkingmate_back.board.dto.BoardRequestDTO; import com.example.walkingmate_back.board.dto.BoardResponseDTO; import com.example.walkingmate_back.board.dto.BoardUpdateDTO; import com.example.walkingmate_back.board.entity.Board; import com.example.walkingmate_back.board.service.BoardService; import com.exampl..
이 내용은 스프링 부트 쇼핑몰 프로젝트 with JPA 책을 학습한 내용입니다. Entity Board @Entity @Getter @Setter @ToString @NoArgsConstructor @AllArgsConstructor @Table(name = "board") public class Board extends BaseTimeEntity { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column private Long id; // 게시판 번호 (자동 증가) @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "userId") // 외래키 설정 private UserEntity user; //..
이 내용은 스프링 부트 쇼핑몰 프로젝트 with JPA 책을 학습한 내용입니다. Section 1. 장바구니 상품 삭제 1. CartService 장바구니 상품 번호를 파라미터로 받아서 삭제하는 로직 추가 // 장바구니 상품 삭제 public void deleteCartItem(Long cartItemId) { CartItem cartItem = cartItemRepository.findById(cartItemId).orElseThrow(EntityNotFoundException::new); cartItemRepository.delete(cartItem); } 2. CartController 장바구니 상품 삭제 요청을 처리하는 Controller 삭제 요청이므로 DeleteMapping 어노테이션 지정 ..
이 내용은 스프링 부트 쇼핑몰 프로젝트 with JPA 책을 학습한 내용입니다. 1. CartDetailDto 장바구니 조회 페이지에 전달할 Dto 클래스 CartItem 객체와 비슷함. 따라서 List 에 담겨서 전달됨 @Getter @Setter public class CartDetailDto { private Long cartItemId; // 장바구니 상품 아이디 private String itemNm; // 상품명 private int price; // 상품 금액 private int count; // 수량 private String imgUrl; // 상품 이미지 경로 public CartDetailDto(Long cartItemId, String itemNm, int price, int co..