类 ConfigDataResourceNotFoundException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.springframework.boot.context.config.ConfigDataException
org.springframework.boot.context.config.ConfigDataNotFoundException
org.springframework.boot.context.config.ConfigDataResourceNotFoundException
- 所有已实现的接口:
Serializable,OriginProvider
ConfigDataNotFoundException thrown when a ConfigDataResource cannot be
found.- 从以下版本开始:
- 2.4.0
- 作者:
- Phillip Webb
- 另请参阅:
-
构造器概要
构造器构造器说明Create a newConfigDataResourceNotFoundExceptioninstance.ConfigDataResourceNotFoundException(ConfigDataResource resource, Throwable cause) Create a newConfigDataResourceNotFoundExceptioninstance. -
方法概要
修饰符和类型方法说明Return the original location that was resolved to determine the resource.Return the source origin ornullif the origin is not known.Return a description of actual referenced item that could not be found.Return the resource that could not be found.static voidthrowIfDoesNotExist(ConfigDataResource resource, File fileToCheck) Throw aConfigDataNotFoundExceptionif the specifiedFiledoes not exist.static voidthrowIfDoesNotExist(ConfigDataResource resource, Path pathToCheck) Throw aConfigDataNotFoundExceptionif the specifiedPathdoes not exist.static voidthrowIfDoesNotExist(ConfigDataResource resource, Resource resourceToCheck) Throw aConfigDataNotFoundExceptionif the specifiedResourcedoes not exist.
-
构造器详细资料
-
ConfigDataResourceNotFoundException
Create a newConfigDataResourceNotFoundExceptioninstance.- 参数:
resource- the resource that could not be found
-
ConfigDataResourceNotFoundException
Create a newConfigDataResourceNotFoundExceptioninstance.- 参数:
resource- the resource that could not be foundcause- the exception cause
-
-
方法详细资料
-
getResource
Return the resource that could not be found.- 返回:
- the resource
-
getLocation
Return the original location that was resolved to determine the resource.- 返回:
- the location or
nullif no location is available
-
getOrigin
从接口复制的说明:OriginProviderReturn the source origin ornullif the origin is not known.- 返回:
- the origin or
null
-
getReferenceDescription
从类复制的说明:ConfigDataNotFoundExceptionReturn a description of actual referenced item that could not be found.- 指定者:
getReferenceDescription在类中ConfigDataNotFoundException- 返回:
- a description of the referenced items
-
throwIfDoesNotExist
Throw aConfigDataNotFoundExceptionif the specifiedPathdoes not exist.- 参数:
resource- the config data resourcepathToCheck- the path to check
-
throwIfDoesNotExist
Throw aConfigDataNotFoundExceptionif the specifiedFiledoes not exist.- 参数:
resource- the config data resourcefileToCheck- the file to check
-
throwIfDoesNotExist
Throw aConfigDataNotFoundExceptionif the specifiedResourcedoes not exist.- 参数:
resource- the config data resourceresourceToCheck- the resource to check
-