本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}