mysql 연동 뒤 머스태치 연동

이소연's avatar
Aug 05, 2024
mysql 연동 뒤 머스태치 연동
이렇게 하세요
notion image
그리고 인텔리 콘솔에 값 잘 들어오는 지 보기
 

오류타파

저장한 이름이랑 맞는 지 확인
notion image
 
대소문자 확인
notion image
 

commit 관련

github 이름
프로젝트 땡겨올 때 clone 할 때는 창문이 열린 상태에서 오는 것
그래서 init말고 add >> commit >> push
 
내가 프로젝트 다 만들 때 new project는
창문 열고 해야 하니까 init >> add >> commit >> push
add 는 사진 찍는 거 commit은 이름
그래서 기능 할 때마다 add도 계속 해줘야 함.
 

리스트 뿌리는 법

public class ProductService { private final ProductRepository productRepository; private final EntityManager em; //상품 목록보기 public List<ProductResponse.ListDTO> findAll() { List<Product> productList = productRepository.findAll(); return productList.stream().map(ProductResponse.ListDTO::new) .collect(Collectors.toList()); }
머스테시 문법은 {{ }}
notion image
 
컨트롤러 문법은 { }
notion image
 
 
복습해야 할 것(4.23 화)
  1. 테이블 필드명을 보고, 머스테치 변수 값을 넣어주는 것(위 사진 참고)
  1. 머스테치에 폼 테그에 액션만드는 것, url 확인하기. # 노노
    1. (컨트롤러의 url이랑 똑같은지 확인)
 
 
 
 
 
 
 
 
Share article

Coding's note