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


Java MapperScannerConfigurer.setProperties方法代码示例

本文整理汇总了Java中tk.mybatis.spring.mapper.MapperScannerConfigurer.setProperties方法的典型用法代码示例。如果您正苦于以下问题:Java MapperScannerConfigurer.setProperties方法的具体用法?Java MapperScannerConfigurer.setProperties怎么用?Java MapperScannerConfigurer.setProperties使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在tk.mybatis.spring.mapper.MapperScannerConfigurer的用法示例。


在下文中一共展示了MapperScannerConfigurer.setProperties方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: mapperScannerConfigurer

import tk.mybatis.spring.mapper.MapperScannerConfigurer; //导入方法依赖的package包/类
/**
 * 扫描跑mapper包下的所有接口,作为mybatis接口类,并注册为spring的bean
 */
/*@Bean
public MapperScannerConfigurer mapperScannerConfigurer() {
    MapperScannerConfigurer scannerConfigurer = new MapperScannerConfigurer();
    scannerConfigurer.setAddToConfig(true);
    scannerConfigurer.setBasePackage("com.fly.**.mapper");
    return scannerConfigurer;
}*/
@Bean
public MapperScannerConfigurer mapperScannerConfigurer() {
    MapperScannerConfigurer scannerConfigurer = new MapperScannerConfigurer();
    scannerConfigurer.setBasePackage("com.fly.**.mapper");
    Properties props = new Properties();
    props.setProperty("mappers", "tk.mybatis.mapper.common.Mapper");
    props.setProperty("IDENTITY", "MYSQL");
    props.setProperty("notEmpty", "true");
    scannerConfigurer.setProperties(props);
    return scannerConfigurer;
}
 
开发者ID:heikehuan,项目名称:fly4j,代码行数:22,代码来源:MybatisConfiguration.java

示例2: getMapperScannerConfigurer

import tk.mybatis.spring.mapper.MapperScannerConfigurer; //导入方法依赖的package包/类
@Bean
public MapperScannerConfigurer getMapperScannerConfigurer(){
    MapperScannerConfigurer configurer=new MapperScannerConfigurer();
    configurer.setBasePackage("com.egojit.easyweb.**.mapper");
    Properties properties=new Properties();
    properties.put("mappers","tk.mybatis.mapper.common.Mapper");
    configurer.setProperties(properties);
    return  configurer;
}
 
开发者ID:egojit8,项目名称:easyweb,代码行数:10,代码来源:MybatisConfig.java

示例3: mapperScannerConfigurer

import tk.mybatis.spring.mapper.MapperScannerConfigurer; //导入方法依赖的package包/类
@Bean
public MapperScannerConfigurer mapperScannerConfigurer() {
    MapperScannerConfigurer scannerConfigurer = new MapperScannerConfigurer();
    scannerConfigurer.setBasePackage("com.tangcheng.datasources.aop.mapper");
    Properties props = new Properties();
    props.setProperty("IDENTITY", "MYSQL");
    props.setProperty("notEmpty", "true");
    scannerConfigurer.setProperties(props);
    scannerConfigurer.setMarkerInterface(BaseMapper.class);
    return scannerConfigurer;
}
 
开发者ID:helloworldtang,项目名称:springboot-multi-datasource,代码行数:12,代码来源:MyBatisConfig.java

示例4: getMapperConfig

import tk.mybatis.spring.mapper.MapperScannerConfigurer; //导入方法依赖的package包/类
@Bean
public MapperScannerConfigurer getMapperConfig() {
	MapperScannerConfigurer config = new MapperScannerConfigurer();
	config.setSqlSessionFactoryBeanName("sqlSessionFactory");
	config.setBasePackage("seed.**.mapper");
	Properties props = new Properties();
	props.setProperty("mappers", BaseMapper.class.getName());
	props.setProperty("notEmpty", "false");
	//props.setProperty("IDENTITY", "MYSQL");
	config.setProperties(props);
	return config;
}
 
开发者ID:mazhaoyong,项目名称:api-server-seed,代码行数:13,代码来源:MybatisConfig.java

示例5: mapperScannerConfigurer

import tk.mybatis.spring.mapper.MapperScannerConfigurer; //导入方法依赖的package包/类
@Bean
public MapperScannerConfigurer mapperScannerConfigurer() {
    MapperScannerConfigurer scannerConfigurer = new MapperScannerConfigurer();
    scannerConfigurer.setBasePackage("com.huan.mapper");
    Properties props = new Properties();
    props.setProperty("mappers", "tk.mybatis.mapper.common.Mapper");
    props.setProperty("IDENTITY", "MYSQL");
    props.setProperty("notEmpty", "true");
    scannerConfigurer.setProperties(props);
    return scannerConfigurer;
}
 
开发者ID:heikehuan,项目名称:springboot-multiple-dataSources,代码行数:12,代码来源:MyBatisConfig.java


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