스프링 웹 개발 하기/로그인 처리
-
02.세션을 이용한 로그인.스프링 웹 개발 하기/로그인 처리 2020. 2. 9. 17:21
보기전에 스프링 구조(2)를 참조. Session은 서버에 어떤 값의 정보를 저장해서 해당 정보를 사용하는 방법입니다.(로그인 같은 경우 사용자 정보.) 그렇기 때문에 브라우저를 닫으면 세션이 끊겨서 해당 정보가 지워지게 됩니다. 1.Mapper 만들기 1 2 3 4 5 6 7 8 9 10 11 select * from tbl_member where key = #{key} and pw = #{pw} and interlock_type = 'main' 2.TEST 쿼리 1 2 3 4 insert into tbl_member (key,pw,name,email,nickname,auth,interlock_type,regdate) values ('admin','1234','전승우','aa@naver.com','wo..
-
01. 로그인 만들기(DB 만들기)스프링 웹 개발 하기/로그인 처리 2020. 2. 9. 16:56
1.테이블 만들기 쿼리는 postgresql 입니다. 하지만 다른 쿼리도 크게 다르지 않으니 사용하시는 데에는 크게 문제가 없을 거 같아요. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 -- 테이블 생성 create table tbl_member( key varchar(80), nickname varchar(50) PRIMARY KEY, pw varchar(100), name varchar(80) not null, email varchar(200) not null, phoneNumber int, birthday int, gender varchar(3), auth int not null, sessionkey varchar(50)..