본문 바로가기

ICIA 수업일지90

2021.10.14 수업일지(Spring Framework, Fileupload) - 어제와 마찬가지로 게시글 등록, 파일 업로드 등을 해보도록 하겠다. - 테이블에서 DB와 user 생성을 확인한다. - go to mysql # 2021.10.14 create user 'product'@'localhost' identified by 'pass'; create database productdb; grant all privileges on productdb.* to 'product'@'localhost'; - productDB에 아래와 같은 테이블을 만들어준다. #2021.10.14 create table tbl_product( pcode char(4) primary key not null, pname nvarchar(200) not null, price int default 0, im.. 2021. 10. 14.
2021.10.13 수업일지(Spring Framework, fileupload) - 파일 업로드를 이용해서 상품등록하는 게시판을 만들겠다. - 우선 테이블을 만들겠다. - go to mysql - root에 들어가서 DB를 새로 만들겠다. # 2021.10.13 create user 'product'@'localhost' identified by 'pass'; create database productdb; grant all privileges on productdb.* to 'product'@'localhost'; - 테이블 생성 #2021.10.13 create table tbl_product( pcode char(4) primary key not null, pname nvarchar(200) not null, price int default 0, image nvarchar(20.. 2021. 10. 13.
2021.10.12 수업일지(Spring 연습, fileupload 방법 - Form과 Ajax를 이용한 파일 업로드 1. form을 이용한 파일 업로드 /ex06/pom.xml ..... commons-fileupload commons-fileupload 1.3.1 ..... - servlet-context.xml 파일에 아래 내용을 추가한다. ..... 2021. 10. 12.
2021.10.08 수업일지(Spring Framework 연습) - Transaction 만약 DB의 데이터를 수정하는 도중에 예외가 발생한다면 이전 상태로 롤백하기 위해 사용되는 것이 트랜잭션이다. 트랜잭션은 더 이상 쪼갤 수 없는 최소 작업 단위를 의미한다. 그래서 트랜잭션은 commit으로 성공 하거나 rollback으로 실패 이후 취소되어야 한다. - Spring에서 제공하는 Transaction을 이용해 코딩을 해보겠다. - 트랜잭션을 위해서 라이브러리를 추가하겠다. - setup 프로젝트에도 동일하게 적용시켜준다. - /ex04/pom.xml ..... org.springframework spring-tx ${org.springframework-version} ..... - /ex04/src/main/webapp/WEB-INF/spring/root-cont.. 2021. 10. 8.