@RequestMapping("update.do")

public String update(@RequestParam int[] amount,

  @RequestParam int[] product_id, HttpSession session) {

  String userid = (String)session.getAttribute("userid");

  if(userid != null) {

    for(int i=0; i < product_id.length; i++) {

      CartDTO dto = new CartDTO();

      dto.setUserid(userid);

      dto.setProduct_id(product_id[i]);

      dto.setAmount(amount[i]);

      cartService.modifyCart(dto);

    }

  }

  return "redirect:/shop/cart/list.do";

}



스프링 디버깅

1개의 프로젝트만 open

clean

- Project - clean : 소스 코드 강제 컴파일


Servers

- clean 서버 클리어

- clean Tomcat work di~ 톰캣 작업 디렉토리


maven - update project



'개발' 카테고리의 다른 글

코드로 spring  (0) 2018.05.27
admin table  (0) 2018.05.25
MemberDTO  (0) 2018.05.21
spring 파일 업로드  (0) 2018.05.21
Spring 흐름  (0) 2018.05.21
Posted by 커다란꼬꼬마

블로그 이미지
커다란꼬꼬마

공지사항

Yesterday
Today
Total

달력

 « |  » 2024.5
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 31

최근에 올라온 글

최근에 달린 댓글

글 보관함