接口 ResourceLocate
public interface ResourceLocate
-
方法概要
修饰符和类型方法说明boolean返回资源文件是否在JAR包中,如果是为TRUEvoidsetLocation(String location) 设置配置资源文件的路径voidsetResourceInJar(boolean boo) 设置资源文件是否在JAR包中
-
方法详细资料
-
setResourceInJar
void setResourceInJar(boolean boo) 设置资源文件是否在JAR包中- 参数:
boo-
-
resourceInJar
boolean resourceInJar()返回资源文件是否在JAR包中,如果是为TRUE- 返回:
-
setLocation
设置配置资源文件的路径 有两种方式设置值,此方法为第一种,直接设置配置文件路径,此路径支持绝对路径和classpath两种 1、例如:file:d:/conf/myconfig.xml; classpath:conf/myconfig.xml 2、另一种是通过构造方法,直接传递AttributeResourceReplacer对象,此对象的抽象类中也可以设置配置文件路径,如下:<bean id="xmlConfigAttributeResourceSolver" class="com.xdja.framework.core.attribute.XmlAttributeResourceSolver" p:location="classpath:sysConfig.xml"> </bean>- 参数:
location-
-