반응형
/* 로그인 기능 구현 */
@RequestMapping(value = "/login", method = RequestMethod.POST)
public String login(@RequestParam Map<String, String> info, Model model) {
String id = info.get("id");
String password = info.get("password");
try {
memberService.login(id, password);
session.setAttribute("id", id);
model.addAttribute("cpage", "makeaccount");
} catch(Exception e) {
model.addAttribute("cpage", "err");
model.addAttribute("err", e.getMessage());
}
return "bankmain";
}
반응형
'개발자 관련 공부 > 멀티캠퍼스' 카테고리의 다른 글
[문제 DB 가져오기] 해결! (0) | 2022.02.16 |
---|---|
[로그인 DB 연동] (0) | 2022.02.15 |
[Spring boot] static 이랑 템플릿 먼저 불러옴. (0) | 2022.02.11 |
[Express] Node 명령어 (0) | 2022.02.09 |
[Node.js] 나에게 메일보내기(2단계인증 상태) (0) | 2022.02.09 |
댓글