package com.example.sample.mapper; import com.example.sample.entity.BookEntity import org.apache.ibatis.annotations.Mapper import org.apache.ibatis.annotations.ResultMap import org.apache.ibatis.annotations.Select import org.springframework.stereotype.Repository @Repository @Mapper interface SampleMapper { @Select("SELECT * FROM book where id = #{id}") @ResultMap("mapper.com.example.sample.Book") fun findBy(id:Int): BookEntity }