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


Java FileSystemResourceLoader.setClassLoader方法代码示例

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


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

示例1: testFileWithSpecialCharsInTheNameBeingResolved

import org.springframework.core.io.FileSystemResourceLoader; //导入方法依赖的package包/类
public void testFileWithSpecialCharsInTheNameBeingResolved() throws Exception {
       String name = Thread.currentThread().getContextClassLoader().getResource( "test-file" ).toString();
	FileSystemResourceLoader fileLoader = new FileSystemResourceLoader();
	fileLoader.setClassLoader(getClass().getClassLoader());

	Resource fileRes = fileLoader.getResource(name);
	resource = new OsgiBundleResource(bundle, name);

	testFileVsOsgiFileResolution(fileRes, resource);
}
 
开发者ID:eclipse,项目名称:gemini.blueprint,代码行数:11,代码来源:OsgiBundleResourceTest.java

示例2: testFileWithEmptyCharsInTheNameBeingResolved

import org.springframework.core.io.FileSystemResourceLoader; //导入方法依赖的package包/类
public void testFileWithEmptyCharsInTheNameBeingResolved() throws Exception {
	String name = Thread.currentThread().getContextClassLoader().getResource( "test file" ).toString();
	FileSystemResourceLoader fileLoader = new FileSystemResourceLoader();
	fileLoader.setClassLoader(getClass().getClassLoader());

	Resource fileRes = fileLoader.getResource(name);
	resource = new OsgiBundleResource(bundle, name);

	testFileVsOsgiFileResolution(fileRes, resource);
}
 
开发者ID:eclipse,项目名称:gemini.blueprint,代码行数:11,代码来源:OsgiBundleResourceTest.java

示例3: testFileWithNormalCharsInTheNameBeingResolved

import org.springframework.core.io.FileSystemResourceLoader; //导入方法依赖的package包/类
public void testFileWithNormalCharsInTheNameBeingResolved() throws Exception {
	String name = Thread.currentThread().getContextClassLoader().getResource( "normal" ).toString();
	FileSystemResourceLoader fileLoader = new FileSystemResourceLoader();
	fileLoader.setClassLoader(getClass().getClassLoader());

	Resource fileRes = fileLoader.getResource(name);

	resource = new OsgiBundleResource(bundle, name);
	testFileVsOsgiFileResolution(fileRes, resource);
}
 
开发者ID:eclipse,项目名称:gemini.blueprint,代码行数:11,代码来源:OsgiBundleResourceTest.java

示例4: testFileWithSpecialCharsInTheNameBeingResolved

import org.springframework.core.io.FileSystemResourceLoader; //导入方法依赖的package包/类
public void testFileWithSpecialCharsInTheNameBeingResolved() throws Exception {
	String name = "file:./target/test-classes/test-file";
	FileSystemResourceLoader fileLoader = new FileSystemResourceLoader();
	fileLoader.setClassLoader(getClass().getClassLoader());

	Resource fileRes = fileLoader.getResource(name);
	resource = new OsgiBundleResource(bundle, name);

	testFileVsOsgiFileResolution(fileRes, resource);
}
 
开发者ID:BeamFoundry,项目名称:spring-osgi,代码行数:11,代码来源:OsgiBundleResourceTest.java

示例5: testFileWithEmptyCharsInTheNameBeingResolved

import org.springframework.core.io.FileSystemResourceLoader; //导入方法依赖的package包/类
public void testFileWithEmptyCharsInTheNameBeingResolved() throws Exception {
	String name = "file:./target/test-classes/test file";
	FileSystemResourceLoader fileLoader = new FileSystemResourceLoader();
	fileLoader.setClassLoader(getClass().getClassLoader());

	Resource fileRes = fileLoader.getResource(name);
	resource = new OsgiBundleResource(bundle, name);

	testFileVsOsgiFileResolution(fileRes, resource);
}
 
开发者ID:BeamFoundry,项目名称:spring-osgi,代码行数:11,代码来源:OsgiBundleResourceTest.java

示例6: testFileWithNormalCharsInTheNameBeingResolved

import org.springframework.core.io.FileSystemResourceLoader; //导入方法依赖的package包/类
public void testFileWithNormalCharsInTheNameBeingResolved() throws Exception {
	String name = "file:pom.xml";
	FileSystemResourceLoader fileLoader = new FileSystemResourceLoader();
	fileLoader.setClassLoader(getClass().getClassLoader());

	Resource fileRes = fileLoader.getResource(name);

	resource = new OsgiBundleResource(bundle, name);
	testFileVsOsgiFileResolution(fileRes, resource);
}
 
开发者ID:BeamFoundry,项目名称:spring-osgi,代码行数:11,代码来源:OsgiBundleResourceTest.java


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