2018. 5. 25. 06:40 개발

admin table

-- 보안상의 이유로 관리자 table 따로 생성

create table admin (

userid varchar2(50) not null,

paawd varchar2(50) not null,

name varchar2(50) not null,

email varchar2(100),

join_date date default sysdate,

primary key(userid)

);

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

spring 시큐리티  (0) 2018.05.31
코드로 spring  (0) 2018.05.27
여러값을 배열로 받아서 처리  (0) 2018.05.24
MemberDTO  (0) 2018.05.21
spring 파일 업로드  (0) 2018.05.21
Posted by 커다란꼬꼬마

@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 커다란꼬꼬마

2018. 5. 24. 13:06 카테고리 없음

spring@

@RequestParam : request.getParameter()

@ModelAttribute : 폼데이터 전체를 dto로 저장


@Controller : controller bean 으로 등록

@Service : Service bean 으로 등록

@Repository : dao bean 으로 등록


@PathVariable : restful api, url에 포함된 변수

@ResponseBody : Controller의 method의 리턴값을 json으로 변환


@Inject : 의존관계 주입

Posted by 커다란꼬꼬마

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

공지사항

Yesterday
Today
Total

달력

 « |  » 2025.4
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

최근에 올라온 글

최근에 달린 댓글

글 보관함