Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- 파이썬 웹크롤링
- 동구
- spring
- xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools)
- 자바스크립트
- git push
- 줄거리
- 책
- 오류
- git
- 에러
- 콜미동구
- 클라우드 서비스 특징
- 자바 파일업로드
- 깃
- Mac
- 독후감
- 클라우드 서비스
- Swift
- 데이메이커
- Xcode
- MySQL
- SpringBoot
- JavaScript
- 한줄평
- 기록하는 동구
- java
- missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
- 서평
- Mapper
Archives
- Today
- Total
인생은 속도가 아니라 방향이다
[Mybatis] 파라미터로 객체를 보낼때 본문
반응형
안녕하세요, 동구쨩입니다.
Mybatis에 항상 Map만 파라미터로전달해서 몰랐었다. DTO객체를 보내서 데이터를 넣어보자.
<insert id="insertExcelData" parameterType="com.springboot.test.service.dto.ExcelDTO"> INSERT INTO excel ( product_id, product_name, product_price, product_qty ) VALUES ( #{productId}, #{productName}, #{productPrice}, #{productQty} ) </insert>
이런식으로 패키지경로를 다써주고 인스턴스들을 넣어주면된다. 끄읏!
반응형
'백엔드(Back-end) > Mybatis' 카테고리의 다른 글
[Mybatis] Mybatis연동하는 xml파일에서 DOCTYPE 의미 (0) | 2020.02.04 |
---|
Comments