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