类的使用
org.springframework.boot.context.config.ConfigDataResource
使用ConfigDataResource的程序包
程序包
说明
External configuration support allowing 'application.properties' to be loaded and used
within a Spring Boot application.
-
org.springframework.boot.context.config中ConfigDataResource的使用
修饰符和类型接口说明interfaceConfigDataLoader<R extends ConfigDataResource>Strategy class that can be used to loadConfigDatafor a givenConfigDataResource.interfaceConfigDataLocationResolver<R extends ConfigDataResource>修饰符和类型类说明classConfigDataResourcebacked by a config tree directory.classConfigDataResourcebacked by aResource.修饰符和类型方法说明InactiveConfigDataAccessException.getLocation()Return theConfigDataResourceof the property source ornullif the source was not loaded fromConfigData.InvalidConfigDataPropertyException.getLocation()Return theConfigDataResourceof the invalid property ornullif the source was not loaded fromConfigData.ConfigDataLocationResolverContext.getParent()Provides access to the parentConfigDataResourcethat triggered the resolve ornullif there is no available parent.ConfigDataResourceNotFoundException.getResource()Return the resource that could not be found.修饰符和类型方法说明default voidConfigDataEnvironmentUpdateListener.onPropertySourceAdded(PropertySource<?> propertySource, ConfigDataLocation location, ConfigDataResource resource) Called when a newPropertySourceis added to theEnvironment.static voidConfigDataResourceNotFoundException.throwIfDoesNotExist(ConfigDataResource resource, File fileToCheck) Throw aConfigDataNotFoundExceptionif the specifiedFiledoes not exist.static voidConfigDataResourceNotFoundException.throwIfDoesNotExist(ConfigDataResource resource, Path pathToCheck) Throw aConfigDataNotFoundExceptionif the specifiedPathdoes not exist.static voidConfigDataResourceNotFoundException.throwIfDoesNotExist(ConfigDataResource resource, Resource resourceToCheck) Throw aConfigDataNotFoundExceptionif the specifiedResourcedoes not exist.限定符构造器说明Create a newConfigDataResourceNotFoundExceptioninstance.ConfigDataResourceNotFoundException(ConfigDataResource resource, Throwable cause) Create a newConfigDataResourceNotFoundExceptioninstance.