Ejemplo n.º 1
0
 /**
  * ModelAndView 를 반환할 경우, Object를 명시적으로 담아서 매핑.
  *
  * @param boardVO
  * @param request
  * @param response
  * @return
  */
 @RequestMapping("/getBoardInfo")
 public ModelAndView getBoardInfo(
     BoardVO boardVO, HttpServletRequest request, HttpServletResponse response) {
   log.debug("request객체에서 받아온 값:" + request.getParameter("id"));
   log.debug("BoardVO객체에서 받아온 값:" + boardVO.getId());
   BoardVO resultVO = boardService.getBoardInfo(boardVO);
   return new ModelAndView("/board/boardView").addObject("boardVO", resultVO);
 }
Ejemplo n.º 2
0
 /**
  * 파라미터 값으로 매핑.
  *
  * @param boardVO
  * @param request
  * @param response
  * @throws IOException
  */
 @RequestMapping(value = "/removeBoard", params = "type=customer")
 public void removeBoard_3(
     BoardVO boardVO, HttpServletRequest request, HttpServletResponse response)
     throws IOException {
   log.debug("삭제할 아이디: " + boardVO.getId());
   log.debug("관리자만 삭제할 수 있습니다.");
   // log.debug("resultCode: "+ boardService.removeBoardInfo(boardVO));
   response.sendRedirect(request.getContextPath() + "/board/getBoardList.do");
 }