front-end(30)
-
14주차 실습
1. mybatis generator, mybatipse를 marketplace를 통해 설치합니다. 2. pom.xml에 mybatis, mybatis-spring, spring-test 라이브러리를 추가합니다. 4.0.0 com.myBatis batis crudMyBatis war 1.0.0-BUILD-SNAPSHOT 1.6 4.2.4.RELEASE 1.6.10 1.6.6 org.springframework spring-test ${org.springframework-version} test org.springframework spring-context ${org.springframework-version} commons-logging commons-logging org.springframework s..
2020.12.13 -
14주차 개념정리
MyBatis, Hibernate 조사 mybatis: sql, 저장 procedure, mapping을 제공하는 persistence framework로 JDBC로 처리하는 코드와 매개변수 설정 및 결과 매핑을 지원해줍니다. Hibernate: 자바 기반의 객체들 간의 관계를 묶어주는, 즉 ORM(Object Releationship Mapper)로 자바 객체를 RDBMS의 하나의 행으로 mapping 해줍니다. MyBatis configuration file 생성법 xml, dtd를 선언합니다. 개별 property들을 설정합니다. typealias를 설정합니다. db 환경정보를 설정합니다. transactionManager를 지정합니다. datasource를 추가합니다. mapper 파일들을 설정합..
2020.12.13 -
13주차 내용 정리
Annotation조사 @RequestMapping : 특정 페이지에서 url을 요청하면 알맞는 메서드를 mapping시켜줍니다. @GetMapping : RequestMapping과 같습니다. @PostMapping: RequestMapping과 같습니다. @RequestParam: request에서 매개변수(parameter)를 가져옵니다. @PathVariable: 메서드의 매개변수 앞에 있으며 URL에서 값을 변수로 받아옵니다. @RequestBody: request를 받은 데이터를 클래스나 모델로 mapping시켜줍니다. @ModelAttribute: jsp 파일들이 들어있는 view에서 넘어온 parameter를 클래스의 멤버변수로 묶어줍니다. Controller의 Parameter의 종류(6..
2020.12.11 -
13주차 과제
1.maven 프로젝트를 생성하고 web.xml을 바꿉니다. contextConfigLocation /WEB-INF/spring/root-context.xml org.springframework.web.context.ContextLoaderListener appServlet org.springframework.web.servlet.DispatcherServlet contextConfigLocation /WEB-INF/spring/appServlet/servlet-context.xml 1 appServlet / encodingFilter org.springframework.web.filter.CharacterEncodingFilter encoding UTF-8 forceEncoding true encodi..
2020.12.10 -
13주차 개념 정리
클라이언트의 특정 웹페이지에 대한 요청이 왔을 때 Spring framework 동작원리를 클라이언트에게 응답할 때까지 단계별로 정리하기(DispatcherServlet, HandlerMapping, Controller, Service, DAO, VO, ViewResolver, View 요소를 이용할 것) client가 서버에 request를 보냅니다. DispatcherServlet이 보낸 request를 중간에서 가로챕니다. DispatcherServlet이 HandlerMapping에 요청을 보낼 Controller를 결정하게 합니다. 매핑된 컨트롤러에 맞게 request를 처리할 메서드로 request를 보냅니다. controller에서 request를 처리할 수 있는 service를 받아서 해당..
2020.11.22 -
13주차 실습
1.mvn project를 하나 만듭니다. 2.pom.xml에 dependency를 추가합니다. 3.Emp.java를 생성합니다. package com.spring.bean; public class Emp { private int id; private String name; private float salary; private String designation; public int getId() { return id; } public void setId(int id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public float getSala..
2020.11.22