#4-1 / spring + I/O [file I/O 정리] commons-upload => pom.xmlwebpage.xml => defaultEncoding,maxUploadSize="-1",maxlnMemorySize(속도향상) : 단점- 메모리 과부하로 인하여 서버가 shutdown될 수 있음Front-end : 파일첨부1개, 파일첨부 여러개, 파일첨부 1개씩 여러개 담을 경우Java Controller에서 @RequestParam("name명") MultipartFile 객체명FileCopyUtils.copy() 를 이용해 웹 디렉토리 출력가능commons-upload 라이브러리 : localhost서버, CDN서버에서 사용 가능(상대방 서버) [ I/O 파일 업로드 라이브러리 사용 - setting ]mvnrepository 여.. 2024. 7. 11. #3-2 / coupon delete,update (spring + database) https://dev-eunse.tistory.com/198 여기 list에서 삭제,수정 👀 삭제 1. shop_main.java 에 추가 : @GetMapping("/coupon_del.do")/*-- 쿠폰 delete --*/@GetMapping("/coupon_del.do")public void coupon_del(int cidx, HttpServletResponse res) throws Exception{ res.setContentType("text/html;charset=utf-8"); String callback = new coupon_insert().del_result(dbInfo, cidx); this.pw= res.getWriter(); if(callback ==.. 2024. 7. 10. #3-1 / coupon insert,select (spring + database) 다시 maven project 로 돌아옴 👀 이거 순서대로coupon 만들어서 database에 insertdatabase select - coupon list 출력 👀 coupon_wirte.jsp -> (coupon_writeok.do) -> coupon_list.do 1. table 만듬create table coupon( cidx int(6) not null auto_increment, cpname varchar(200) not null, cprate int(2) not null, cpuse enum('Y','N') not null default 'N', cpdate date not null default '0001-01-01', indate datetime not null default cu.. 2024. 7. 10. #2-2 / spring + database 연결,회원가입 JSTL+spring+Datasource ⚡ database 연결에 따른 결과값 출력* 2가지 방식 => 맘에드는 방식으로 사용^_^1. XML형태의 DB연결 2. properties+JSTL => spring legacy 프로젝트일 때 사용 , 차후에 진행XML형태의 DB연결 시 필요한 라이브러리 (필수) - from) pom.xml1. mysql-connector-java2. spring-jdbc : @ 이용하여 resource 형태로 db연결하여 구성3. commons-dbcp ( dbcp란? Database Connection Pool ) : spring,spring-boot에서만 사용가능 => 다운법 : https://dev-eunse.tistory.com/193 의 22번,23번 (mybatis는 해당 예제에서 필요 없음) .. 2024. 7. 9. 이전 1 ··· 29 30 31 32 33 34 35 ··· 77 다음