놀코에 오신 것을 환영합니다.

놀아보자 코드랑

KOSTA 44

STS 설치 및 설정, Junit5, Logger(logback) 설정

STS설치하기 https://spring.io/tools Spring Tools 4 is the next generation of Spring tooling Largely rebuilt from scratch, Spring Tools 4 provides world-class support for developing Spring-based enterprise applications, whether you prefer Eclipse, Visual Studio Code, or Theia IDE. spring.io UTF-8 설정, JRE 1.8 버전 확인 Spring Boot 구조 Junit5 테스트 상위 com패키지에 Application.java파일을 옮긴후 어느 테스트 패키지에서나 Test가 가능하다 M..

KOSTA/SpringBoot 2021.08.02

답변형 게시판 만들기 (2)

소스 깃허브링크 주소 경로 boardrestfront (Front 프로젝트), boardrestspring (Back 프로젝트) https://github.com/sblee1031/Kosta/tree/main/ORACLE_DB_THEOTY/Oracle_DB_project/myspring GitHub - sblee1031/Kosta: KOSTA_219 KOSTA_219. Contribute to sblee1031/Kosta development by creating an account on GitHub. github.com [KOSTA/Project] - 답변형 게시판 만들기(1) 답변형 게시판 만들기(1) 2021.07.29 - [KOSTA/Project] - 답변형 게시판 만들기 (2) 소스 깃허브링크..

KOSTA/Project 2021.07.29

답변형 게시판 만들기(1)

2021.07.29 - [KOSTA/Project] - 답변형 게시판 만들기 (2) 소스 깃허브링크 주소 경로 boardrestfront (Front 프로젝트), boardrestspring (Back 프로젝트) https://github.com/sblee1031/Kosta/tree/main/ORACLE_DB_THEOTY/Oracle_DB_project/myspring GitHub - sblee1031/Kosta: KOSTA_219 KOSTA_219. Contribute to sblee1031/Kosta development by creating an account on GitHub. github.com 로그인 아이디와 비밀번호는 기존 customer테이블 계정 정보를 참고 하여 진행함. 메인 화면 로그..

KOSTA/Project 2021.07.29

FileUpload (commons-fileupload 라이브러리)

pom.xml commons-fileupload commons-fileupload 1.4 servlet-context.xml 파일 추가 태그의 multiple속성을 설정시 여러개의 파일을 업로드 가능 mutiple속성이 없을경우 1개의 파일만 업로드 $(function(){ $("div.ajax>form>input[type=button]").click(function(){ //form태그의 enctype="multipart/form-data"인 경우 //요청전달데이터와 업로드될 파일데이터들은 모두 FormData객체에 저장되어있다 var formData = new FormData($("div.ajax>form")[0]); console.log(formData); formData.forEach(functi..

KOSTA/WEB 2021.07.28

21.7.27 Rest_Api(2) , 답변형 게시판

답글형 게시판 만들기 설계 SQL 구문 drop table board; create table repboard( board_no number,--게시글번호 parent_no number,--부모글번호:원글인경우 0 , 답글인경우 부모글 번호값 board_id varchar2(10), board_title varchar2(100), board_content varchar2(1000), board_viewcount number(5), board_dt date ); alter table repboard add constraint board_no_pk primary key (board_no); alter table repboard add constraint board_id_fk foreign key(board_..

KOSTA/WEB 2021.07.27

21.7.26 - URI, Rest Api , ResponseEntity객체

참고 깃허브 https://github.com/sblee1031/Kosta/tree/52fdea7f48c8976a80db3c3742c6bd6d86eb6846/ORACLE_DB_THEOTY/Oracle_DB_project/myspring URI(Uniform Resource Identifier)의 의미 변화 하나의 URI는 하나의 고유한 Resource를 대표하도록 설계된다 ex) /board/123은 게시물중 123번이라는 고유한 의미를 가지도록 설계하고, 이예 대한 처리는 GET, POST방식과 같이 추가적인 정보를 통해서 결정한다. RESTful 면접질문 ResponseEntity객체 활용. @PathVariable을 통하여 변수를 통하여 URI를 이용할 수 있도록 설계가 가능

KOSTA/WEB 2021.07.26

21.7.23 - Spring (Json)

@Responsbody가 없을경우에는 View페이지 이름이 된다. (직접응답) @ResponseBody에 Map형식의 응답이 Json형태로 응답바디에 쓰기가 됨 응답내용 담기(OK응답) public ResponseEntity putCar(String prod_no, int quantity, HttpSession session) { Map cart = (Map)session.getAttribute("cart"); if(cart == null) { cart = new HashMap(); session.setAttribute("cart", cart); } Integer oldQuantity = (Integer)cart.get(prod_no); if(oldQuantity != null) { quantity +=..

KOSTA/WEB 2021.07.23

21.7.21 - 일반Controller용 매개변수 리턴타입 정리,

참조 깃허브 주소 https://github.com/sblee1031/Kosta/tree/main/ORACLE_DB_THEOTY/Oracle_DB_project/myspring @Controller용 메서드의 매개변수타입 HttpServletRequest HttpServletResponse HttpSession String - 요청전달데이터전용 (ex : String prod_no) int - 요청전달데이터전용 (ex : int prod_no) @RequestParam- 요청전달데이터이름과 매개변수이름을이 다른경우 (ex: @RequestParam(name = "prod_no", required = false, defaultValue = "") String no)) (ex : @RequestParam(r..

KOSTA/WEB 2021.07.21