(整理)MyBatis入門教程(一)
http://www.rzrgm.cn/kevin1990/p/6231122.html
http://www.rzrgm.cn/hellokitty1/p/5216025.html#3591383
視頻
https://edu.51cto.com/course/1354.html
mybaits入門
http://www.mybatis.org/mybatis-3/zh/getting-started.html
https://blog.csdn.net/isea533/article/details/73555400
https://www.baidu.com/link?url=HfPA9ZnTraLOT79irCSCJz_Aq_zebP9nJd1KqHBBEtX67yz_8PoxGXR8bomfg2gDVCTkhQ_IS-tkzwsgDXL-k_&wd=&eqid=e203282900688428000000055cfca243
1、此時mybatis中內置的參數_databaseId中保存了用戶所指定的對應的數據庫廠商標識。
<select id="selectUsrs" databaseId="mysql" resultType="com.heiketu.pojo.Users">
<if test="_databaseId == 'mysql'">
select * from usrs where id = 2
</if>
</select>
2、config。注冊映射文件
3、#{id}值對應
4、別名去掉""
5、嵌套結果
浙公網安備 33010602011771號