当前位置: 首页>>代码示例>>Java>>正文


Java MapperFactoryBean.setMapperInterface方法代码示例

本文整理汇总了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;
}
 
开发者ID:baihui212,项目名称:tsharding,代码行数:16,代码来源:TShardingRoutingInvokeFactory.java

示例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();
}
 
开发者ID:lindzh,项目名称:mybatis-spring-1.2.2,代码行数:9,代码来源:ConfigurationSampleTest.java

示例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();
}
 
开发者ID:mwcaisse,项目名称:AndroidFT,代码行数:14,代码来源:ApplicationConfig.java

示例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();
}
 
开发者ID:mwcaisse,项目名称:AndroidFT,代码行数:13,代码来源:ApplicationConfig.java

示例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();
}
 
开发者ID:mwcaisse,项目名称:AndroidFT,代码行数:14,代码来源:ApplicationConfig.java

示例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();
}
 
开发者ID:mwcaisse,项目名称:AndroidFT,代码行数:13,代码来源:ApplicationConfig.java

示例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();
}
 
开发者ID:mwcaisse,项目名称:AndroidFT,代码行数:13,代码来源:ApplicationConfig.java

示例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();
}
 
开发者ID:mwcaisse,项目名称:AndroidFT,代码行数:13,代码来源:ApplicationConfig.java

示例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();
}
 
开发者ID:mwcaisse,项目名称:AndroidFT,代码行数:14,代码来源:ApplicationConfig.java


注:本文中的org.mybatis.spring.mapper.MapperFactoryBean.setMapperInterface方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。