类 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 newConfigDataResourceNotFoundException
instance.ConfigDataResourceNotFoundException
(ConfigDataResource resource, Throwable cause) Create a newConfigDataResourceNotFoundException
instance. -
方法概要
修饰符和类型方法说明Return the original location that was resolved to determine the resource.Return the source origin ornull
if 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 void
throwIfDoesNotExist
(ConfigDataResource resource, File fileToCheck) Throw aConfigDataNotFoundException
if the specifiedFile
does not exist.static void
throwIfDoesNotExist
(ConfigDataResource resource, Path pathToCheck) Throw aConfigDataNotFoundException
if the specifiedPath
does not exist.static void
throwIfDoesNotExist
(ConfigDataResource resource, Resource resourceToCheck) Throw aConfigDataNotFoundException
if the specifiedResource
does not exist.
-
构造器详细资料
-
ConfigDataResourceNotFoundException
Create a newConfigDataResourceNotFoundException
instance.- 参数:
resource
- the resource that could not be found
-
ConfigDataResourceNotFoundException
Create a newConfigDataResourceNotFoundException
instance.- 参数:
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
null
if no location is available
-
getOrigin
从接口复制的说明:OriginProvider
Return the source origin ornull
if the origin is not known.- 返回:
- the origin or
null
-
getReferenceDescription
从类复制的说明:ConfigDataNotFoundException
Return a description of actual referenced item that could not be found.- 指定者:
getReferenceDescription
在类中ConfigDataNotFoundException
- 返回:
- a description of the referenced items
-
throwIfDoesNotExist
Throw aConfigDataNotFoundException
if the specifiedPath
does not exist.- 参数:
resource
- the config data resourcepathToCheck
- the path to check
-
throwIfDoesNotExist
Throw aConfigDataNotFoundException
if the specifiedFile
does not exist.- 参数:
resource
- the config data resourcefileToCheck
- the file to check
-
throwIfDoesNotExist
Throw aConfigDataNotFoundException
if the specifiedResource
does not exist.- 参数:
resource
- the config data resourceresourceToCheck
- the resource to check
-