MemberController.java
페이지 정보
본문
package com.pkt.controller;
import javax.servlet.http.HttpSession;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
import com.pkt.mapper.MemberMapper;
import com.pkt.model.LoginDTO;
import com.pkt.model.MemberVO;
import com.pkt.service.MemberService;
import lombok.AllArgsConstructor;
import lombok.extern.log4j.Log4j;
@Controller
@Log4j
@RequestMapping("/member/")
@AllArgsConstructor
public class MemberController {
private MemberService service;
private MemberMapper mapper;
... 생략 ...
@GetMapping("/id_ok")
public @ResponseBody int idOk(String userid) {
log.info("id_ok get ...........");
int result;
if(userid.length() < 4) { //아이디 4자리 미만일 경우
result = 4;
}else { //아이디 존재:1 , 미존재:0
result = mapper.idOk(userid);
}
return result;
}
}
- 이전글MemberMapper.xml 24.08.05
- 다음글member/join.jsp 24.08.05
댓글목록
등록된 댓글이 없습니다.