本文整理汇总了Java中org.mybatis.spring.mapper.MapperFactoryBean.setMapperInterface方法的典型用法代码示例。如果您正苦于以下问题:Java MapperFactoryBean.setMapperInterface方法的具体用法?Java MapperFactoryBean.setMapperInterface怎么用?Java MapperFactoryBean.setMapperInterface使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.mybatis.spring.mapper.MapperFactoryBean
的用法示例。
在下文中一共展示了MapperFactoryBean.setMapperInterface方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: newMyBatisMapper
import org.mybatis.spring.mapper.MapperFactoryBean; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
private Object newMyBatisMapper(MapperBasicConfig config) {
MapperFactoryBean mapperFactoryBean = new MapperFactoryBean();
mapperFactoryBean.setMapperInterface(config.getMapperInterface());
mapperFactoryBean.setSqlSessionFactory(this.getSqlSessionFactory(config.getDataSourceName(),
config.getMapperInterface()));
mapperFactoryBean.afterPropertiesSet();
Object mapper = null;
try {
mapper = mapperFactoryBean.getObject();
} catch (Exception e) {
throw new MapperInitializeException(e);
}
return mapper;
}
示例2: userDaoWithFactory
import org.mybatis.spring.mapper.MapperFactoryBean; //导入方法依赖的package包/类
@Bean
public UserDao userDaoWithFactory() throws Exception {
MapperFactoryBean<UserDao> mapperFactoryBean = new MapperFactoryBean<UserDao>();
mapperFactoryBean.setMapperInterface(UserDao.class);
mapperFactoryBean.setSqlSessionFactory(sqlSessionFactory());
mapperFactoryBean.afterPropertiesSet();
return mapperFactoryBean.getObject();
}
示例3: deviceMapper
import org.mybatis.spring.mapper.MapperFactoryBean; //导入方法依赖的package包/类
/** The Device mapper to be used by the managers
*
* @return THe device mapper
* @throws Exception If fetching the sql session factory failed
*/
@Bean
public DeviceMapper deviceMapper() throws Exception {
MapperFactoryBean<DeviceMapper> mapperFactoryBean = new MapperFactoryBean<DeviceMapper>();
mapperFactoryBean.setMapperInterface(DeviceMapper.class);
mapperFactoryBean.setSqlSessionFactory(sqlSessionFactory());
return mapperFactoryBean.getObject();
}
示例4: deviceImageMapper
import org.mybatis.spring.mapper.MapperFactoryBean; //导入方法依赖的package包/类
/** The Device Image mapper to be used by the managers
*
* @return The device image mapper
* @throws Exception If fetching the sql session factory failed
*/
@Bean
public DeviceImageMapper deviceImageMapper() throws Exception {
MapperFactoryBean<DeviceImageMapper> mapperFactoryBean = new MapperFactoryBean<DeviceImageMapper>();
mapperFactoryBean.setMapperInterface(DeviceImageMapper.class);
mapperFactoryBean.setSqlSessionFactory(sqlSessionFactory());
return mapperFactoryBean.getObject();
}
示例5: fileMapper
import org.mybatis.spring.mapper.MapperFactoryBean; //导入方法依赖的package包/类
/** The File mapper to be used by the managers
*
* @return The file mapper
* @throws Exception If fetching the sql session factory failed
*/
@Bean
public FileMapper fileMapper() throws Exception {
MapperFactoryBean<FileMapper> mapperFactoryBean = new MapperFactoryBean<FileMapper>();
mapperFactoryBean.setMapperInterface(FileMapper.class);
mapperFactoryBean.setSqlSessionFactory(sqlSessionFactory());
return mapperFactoryBean.getObject();
}
示例6: userMapper
import org.mybatis.spring.mapper.MapperFactoryBean; //导入方法依赖的package包/类
/** The User mapper to be used by the managers
*
* @return The user mapper
* @throws Exception If fetching the sql session factory failed
*/
@Bean
public UserMapper userMapper() throws Exception {
MapperFactoryBean<UserMapper> mapperFactoryBean = new MapperFactoryBean<UserMapper>();
mapperFactoryBean.setMapperInterface(UserMapper.class);
mapperFactoryBean.setSqlSessionFactory(sqlSessionFactory());
return mapperFactoryBean.getObject();
}
示例7: registrationKeyMapper
import org.mybatis.spring.mapper.MapperFactoryBean; //导入方法依赖的package包/类
/** The RegistrationKey Mapper
*
* @return The user mapper
* @throws Exception If fetching the sql session factory failed
*/
@Bean
public RegistrationKeyMapper registrationKeyMapper() throws Exception {
MapperFactoryBean<RegistrationKeyMapper> mapperFactoryBean = new MapperFactoryBean<RegistrationKeyMapper>();
mapperFactoryBean.setMapperInterface(RegistrationKeyMapper.class);
mapperFactoryBean.setSqlSessionFactory(sqlSessionFactory());
return mapperFactoryBean.getObject();
}
示例8: userAuthenticationTokenMapper
import org.mybatis.spring.mapper.MapperFactoryBean; //导入方法依赖的package包/类
/** The UserAuthenticationToken mapper
*
* @return The user mapper
* @throws Exception If fetching the sql session factory failed
*/
@Bean
public UserAuthenticationTokenMapper userAuthenticationTokenMapper() throws Exception {
MapperFactoryBean<UserAuthenticationTokenMapper> mapperFactoryBean = new MapperFactoryBean<UserAuthenticationTokenMapper>();
mapperFactoryBean.setMapperInterface(UserAuthenticationTokenMapper.class);
mapperFactoryBean.setSqlSessionFactory(sqlSessionFactory());
return mapperFactoryBean.getObject();
}
示例9: requestMapper
import org.mybatis.spring.mapper.MapperFactoryBean; //导入方法依赖的package包/类
/** The Request Mapper to be used by the controllers
*
* @return The request mapper
* @throws Exception If fetching the sql session factory failed
*/
@Bean
public RequestMapper requestMapper() throws Exception {
MapperFactoryBean<RequestMapper> mapperFactoryBean = new MapperFactoryBean<RequestMapper>();
mapperFactoryBean.setMapperInterface(RequestMapper.class);
mapperFactoryBean.setSqlSessionFactory(sqlSessionFactory());
return mapperFactoryBean.getObject();
}