Skip to content

Instantly share code, notes, and snippets.

@jaimemin
Created August 21, 2024 10:32
Mono<MyDTO> result = r2dbcEntityTemplate
.select(User.class) // 조회할 엔티티 클래스 지정
.from("users") // 테이블 이름 지정
.as(MyDTO.class) // 결과를 매핑할 클래스 지정
.matching(query(where("name").is("jaimemin"))) // 쿼리 조건 지정
.one(); // 쿼리 실행 후 결과를 Mono로 반환
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment