本文整理汇总了Java中org.apache.ibatis.io.VFS类的典型用法代码示例。如果您正苦于以下问题:Java VFS类的具体用法?Java VFS怎么用?Java VFS使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
VFS类属于org.apache.ibatis.io包,在下文中一共展示了VFS类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: loadCustomVfs
import org.apache.ibatis.io.VFS; //导入依赖的package包/类
private void loadCustomVfs(Properties props) throws ClassNotFoundException {
String value = props.getProperty("vfsImpl");
if (value != null) {
String[] clazzes = value.split(",");
for (String clazz : clazzes) {
if (!clazz.isEmpty()) {
@SuppressWarnings("unchecked")
Class<? extends VFS> vfsImpl = (Class<? extends VFS>) Resources.classForName(clazz);
configuration.setVfsImpl(vfsImpl);
}
}
}
}
示例2: loadCustomVfs
import org.apache.ibatis.io.VFS; //导入依赖的package包/类
private void loadCustomVfs(Properties props) throws ClassNotFoundException {
String value = props.getProperty("vfsImpl");
if (value != null) {
String[] clazzes = value.split(",");
for (String clazz : clazzes) {
if (!clazz.isEmpty()) {
@SuppressWarnings("unchecked")
Class<? extends VFS> vfsImpl = (Class<? extends VFS>)Resources.classForName(clazz);
configuration.setVfsImpl(vfsImpl);
}
}
}
}
示例3: sqlSessionFactoryBean
import org.apache.ibatis.io.VFS; //导入依赖的package包/类
@Bean(name = "sqlSessionFactory")
public SqlSessionFactory sqlSessionFactoryBean(DataSource dataSource) throws Exception {
VFS.addImplClass(SpringBootVFS.class);
SqlSessionFactoryBean bean = new SqlSessionFactoryBean();
bean.setDataSource(dataSource);
bean.setTypeAliasesPackage("com.github.izhangzhihao.SSMSeedProject.Model");
//分页插件
PageInterceptor pageInterceptor = new PageInterceptor();
Properties properties = new Properties();
properties.setProperty("reasonable", "true");
properties.setProperty("supportMethodsArguments", "true");
properties.setProperty("returnPageInfo", "check");
properties.setProperty("params", "count=countSql");
pageInterceptor.setProperties(properties);
//添加插件
bean.setPlugins(new Interceptor[]{pageInterceptor});
//添加XML目录
ResourcePatternResolver resolver = new PathMatchingResourcePatternResolver();
try {
bean.setMapperLocations(resolver.getResources("classpath:mapper/*.xml"));
return bean.getObject();
} catch (Exception e) {
e.printStackTrace();
throw e;
}
}
示例4: setVfsImpl
import org.apache.ibatis.io.VFS; //导入依赖的package包/类
@SuppressWarnings("unchecked")
public void setVfsImpl(Class<?> vfsImpl) {
if (vfsImpl != null) {
this.vfsImpl = (Class<? extends VFS>) vfsImpl;
VFS.addImplClass(this.vfsImpl);
}
}
示例5: setVfsImpl
import org.apache.ibatis.io.VFS; //导入依赖的package包/类
@SuppressWarnings("unchecked")
public void setVfsImpl(Class<?> vfsImpl) {
if (vfsImpl != null) {
this.vfsImpl = (Class<? extends VFS>) vfsImpl;
VFS.addImplClass(this.vfsImpl);
}
}
示例6: testVFS
import org.apache.ibatis.io.VFS; //导入依赖的package包/类
@Test
public void testVFS() throws IOException {
System.out.println(VFS.getInstance().getClass());
List<String> children = VFS.getInstance().list("me");
for (String string : children)
System.out.println(string);
System.out.println(Byte[].class);
System.out.println(Byte.class);
}
示例7: getVfs
import org.apache.ibatis.io.VFS; //导入依赖的package包/类
public Class<? extends VFS> getVfs() {
return this.vfs;
}
示例8: setVfs
import org.apache.ibatis.io.VFS; //导入依赖的package包/类
public void setVfs(Class<? extends VFS> vfs) {
this.vfs = vfs;
}
示例9: getVfsImpl
import org.apache.ibatis.io.VFS; //导入依赖的package包/类
public Class<? extends VFS> getVfsImpl() {
return this.vfsImpl;
}
示例10: setVfsImpl
import org.apache.ibatis.io.VFS; //导入依赖的package包/类
public void setVfsImpl(Class<? extends VFS> vfsImpl) {
if (vfsImpl != null) {
this.vfsImpl = vfsImpl;
VFS.addImplClass(this.vfsImpl);
}
}
示例11: getVfs
import org.apache.ibatis.io.VFS; //导入依赖的package包/类
public Class<? extends VFS> getVfs() {
return this.vfs;
}
示例12: setVfs
import org.apache.ibatis.io.VFS; //导入依赖的package包/类
public void setVfs(Class<? extends VFS> vfs) {
this.vfs = vfs;
}
示例13: getVfsImpl
import org.apache.ibatis.io.VFS; //导入依赖的package包/类
public Class<? extends VFS> getVfsImpl() {
return this.vfsImpl;
}