Class 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
- All Implemented Interfaces:
- Serializable,- OriginProvider
ConfigDataNotFoundException thrown when a ConfigDataResource cannot be
 found.- Since:
- 2.4.0
- See Also:
- 
Constructor SummaryConstructorsConstructorDescriptionCreate a newConfigDataResourceNotFoundExceptioninstance.ConfigDataResourceNotFoundException(ConfigDataResource resource, Throwable cause) Create a newConfigDataResourceNotFoundExceptioninstance.
- 
Method SummaryModifier and TypeMethodDescriptionReturn 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, org.springframework.core.io.Resource resourceToCheck) Throw aConfigDataNotFoundExceptionif the specifiedResourcedoes not exist.Methods inherited from class java.lang.ThrowableaddSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
- 
Constructor Details- 
ConfigDataResourceNotFoundExceptionCreate a newConfigDataResourceNotFoundExceptioninstance.- Parameters:
- resource- the resource that could not be found
 
- 
ConfigDataResourceNotFoundExceptionCreate a newConfigDataResourceNotFoundExceptioninstance.- Parameters:
- resource- the resource that could not be found
- cause- the exception cause
 
 
- 
- 
Method Details- 
getResourceReturn the resource that could not be found.- Returns:
- the resource
 
- 
getLocationReturn the original location that was resolved to determine the resource.- Returns:
- the location or nullif no location is available
 
- 
getOriginDescription copied from interface:OriginProviderReturn the source origin ornullif the origin is not known.- Returns:
- the origin or null
 
- 
getReferenceDescriptionDescription copied from class:ConfigDataNotFoundExceptionReturn a description of actual referenced item that could not be found.- Specified by:
- getReferenceDescriptionin class- ConfigDataNotFoundException
- Returns:
- a description of the referenced items
 
- 
throwIfDoesNotExistThrow aConfigDataNotFoundExceptionif the specifiedPathdoes not exist.- Parameters:
- resource- the config data resource
- pathToCheck- the path to check
 
- 
throwIfDoesNotExistThrow aConfigDataNotFoundExceptionif the specifiedFiledoes not exist.- Parameters:
- resource- the config data resource
- fileToCheck- the file to check
 
- 
throwIfDoesNotExistpublic static void throwIfDoesNotExist(ConfigDataResource resource, org.springframework.core.io.Resource resourceToCheck) Throw aConfigDataNotFoundExceptionif the specifiedResourcedoes not exist.- Parameters:
- resource- the config data resource
- resourceToCheck- the resource to check
 
 
-