SQLSessionDaoSupport
此方法需要編寫(xiě)mapper
接口,mapper
接口的實(shí)現(xiàn)類(lèi),mapper.xml
文件。org.mybatis.spring.mapper.MapperFactoryBean
此方法需要在SqlMapConfig.xml
中配置mapper.xml
的位置,還需定義mapper
接口。mapper
掃描器
需要編寫(xiě)mapper.xml
文件,需要mapper
接口,配置mapper
掃描器,使用掃描器從spring
容器中獲取mapper
的實(shí)現(xiàn)對(duì)象。
更多建議: