Created
April 6, 2022 02:12
-
-
Save A-pZ/628ca667ad396a42deab13e1e58d97d4 to your computer and use it in GitHub Desktop.
ItemMapper
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.github.apz.sample.mapper; | |
import java.util.List; | |
import org.apache.ibatis.annotations.Mapper; | |
import org.apache.ibatis.annotations.Param; | |
import com.github.apz.sample.record.Item; | |
@Mapper | |
public interface ItemMapper { | |
public List<Item> findById(@Param("id") String id); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8" ?> | |
<!DOCTYPE mapper | |
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | |
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
<mapper namespace="com.github.apz.sample.mapper.ItemMapper"> | |
<select id="findById" resultType="com.github.apz.sample.record.Item"> | |
select id, name from item | |
<where> | |
id = #{id} | |
</where> | |
</select> | |
</mapper> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment