중고헌터 - 로그인 페이지 만들기
2022. 9. 19. 12:50
프로젝트/중고헌터
로그인 페이지 loginForm.jsp Login ${URLDecoder.decode(param.msg)} 로그인 아이디 기억 | 비밀번호 찾기 | 회원가입 LoginController.java package com.jcy.usedhunter; import java.io.UnsupportedEncodingException; import java.net.URLEncoder; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springfr..

중고헌터 - 회원가입 페이지 만들기2
2022. 9. 18. 16:04
프로젝트/중고헌터
form 데이터 전송 방법 중 GET 방식 막기 //@RequestMapping(value="/register/save", method=RequestMethod.POST) @PostMapping("/register/save") // Spring 4.3 부터 추가 public String save() { return "registerInfo"; } } @GetMapping 추가 package com.jcy.usedhunter; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.Po..
중고헌터 - 회원가입 페이지 만들기
2022. 9. 18. 13:10
프로젝트/중고헌터
html 호출할 때 resources 없이 하기 servlet-context.xml mapping 에서 resources를 지우자 HTML HTML registerForm.html Register 아이디 비밀번호 이름 이메일 생일 페이스북 카카오톡 인스타그램 회원 가입 registerInfo.jsp 다수의 값은 paramValues 를 사용해 배열로 값을 받는다 id=${param.id} pwd=${param.pwd} name=${param.name} email=${param.email} birth=${param.birth} sns=${paramValues.sns} sns=${paramValues.sns[0]} sns=${paramValues.sns[1]} sns=${paramValues.sns[2]} ..

중고헌터 - mybatis 설정
2022. 9. 15. 15:06
프로젝트/중고헌터
maven repository 에서 mybatis 다운 https://mvnrepository.com/search?q=mybatis 1. MyBatis 3.5.9 버전 다운 2. MyBatis 2.0.7 버전 다운 pom.xml 태그에 주입 1. mybatis SqlSessionFactory - SqlSession 을 생성해서 제공 SqlSession - SQL 명령을 수행하는데 필요한 메서드 제공 2. mybatis spring SqlSessionFactoryBean - SqlSessionFactory를 Spring 에서 사용하기 위한 빈 SqlSessionTemplate - SQL 명령을 수행 하는데 필요한 메서드 제공. thread-safe root.xml SqlSessionTemplate 이 th..

중고헌터 - MySQL 연결
2022. 9. 15. 14:22
프로젝트/중고헌터
MySQL Workbench 를 이용해 usedhunter스키마를 만들자 테이블은 임시로 user_info로 만들었다. 이후에 추가하자 intellij 에서 데이터 베이스 연결 MySQL 포트, user와 비번, 데이터베이스 이름을 적어주자 창 하단에 Test Connection을 눌러 연결 유무를 확인하자 데이터 베이스가 잘 추가 되었다. board 테이블 만들자 create table board ( bno int auto_increment, title varchar(100) not null, content TEXT not null, writer varchar(30) not null, view_cnt int default 0 null, comment_cnt int default 0 null, reg_d..