inflearn logo
Khóa học

Khóa học

Chia sẻ kiến thức

Bài viết của ZZAMBA

ZZAMBA ZZAMBA

@rksidksrksi

Số lượng đánh giá đã viết
13
Xếp hạng trung bình
5.0

Bài viết 2

Hỏi & Đáp

PartialType과 OmitType 동시 적용

chatGPT에 물어보니 바로 알려주네요. 자답합니다. @InputType() export class UpdateUserInput extends PartialType( OmitType(CreateUserInput, ['loginId', 'email'], InputType)) { }

Lượt thích
0
Số bình luận
1
Lượt xem
602

Hỏi & Đáp

트랜잭션 템플릿 사용 로직

status는 TransactionTemplate에서 생성해서 넘겨줍니다. executeWithoutResult 함수는 execute 함수를 호출합니다. TransactionTemplate에는 execute 함수가 구현되어 있고 간략히는 아래와 같습니다. @Override @Nullable public T execute(TransactionCallback action) throws TransactionException { /* (중략) */ TransactionStatus status = this.transactionManager.getTransaction(this); T result; try { result = action.doInTransaction(status); } /* (중략) */ this.transactionManager.commit(status); return result; } } 즉, status는 TransactionTemplate에서 생성해서 doInTransaction의 매개인자로 넣어줍니다.

Lượt thích
4
Số bình luận
2
Lượt xem
834