MemberController
페이지 정보

본문
package web.controller;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import lombok.extern.log4j.Log4j2;
@Controller
@Log4j2
@RequestMapping("/member")
public class MemberController {
@GetMapping("/login")
public void loginGet(@RequestParam(value = "error", required = false) String error,
@RequestParam(value = "logout", required = false) String logout) {
//error, logout 이라는 이름의 파라미터를 지정하는데 이는
//나중에 로그인 과정에 문제가 생기거나 로그아웃 처리할 때 사용하기 위해서
//required = false 해당 매개변수가 필수가 아닌 선택 사항
//error, logout 매개변수가 없어도 오류가 발생하지 않는다.
log.info("login get .........");
log.info("logout : "+logout);
}
}
- 이전글CustomSecurityConfig ( /member/login 연동 ) 24.07.18
- 다음글/member/login.html 24.07.18
댓글목록
등록된 댓글이 없습니다.