[Spring]회원 가입 & id중복체크 구현
2021. 12. 26. 22:36
Spring/Study
회원가입 Controller @Override @RequestMapping(value="/addMember.do" ,method = RequestMethod.POST) public ResponseEntity addMember(@ModelAttribute("memberVO") MemberVO _memberVO, HttpServletRequest request, HttpServletResponse response) throws Exception { response.setContentType("text/html; charset=UTF-8"); request.setCharacterEncoding("utf-8"); String message = null; ResponseEntity resEntity = null;..
[Spring]로그인 & 로그아웃 구현
2021. 12. 23. 22:25
Spring/Study
로그인 부분 controller @Override @RequestMapping(value="/login.do" ,method = RequestMethod.POST) public ModelAndView login(@RequestParam Map loginMap, HttpServletRequest request, HttpServletResponse response)throws Exception{ ModelAndView mav = new ModelAndView(); memberVO = memberService.login(loginMap); if(memberVO !=null && memberVO.getMember_id() != null) { HttpSession session = request.getSessio..