Search in sources :

Example 1 with InvalidConfigurationMetadataException

use of org.springframework.boot.configurationprocessor.metadata.InvalidConfigurationMetadataException in project spring-boot by spring-projects.

the class ConfigurationMetadataAnnotationProcessor method mergeAdditionalMetadata.

private ConfigurationMetadata mergeAdditionalMetadata(ConfigurationMetadata metadata) {
    try {
        ConfigurationMetadata merged = new ConfigurationMetadata(metadata);
        merged.merge(this.metadataStore.readAdditionalMetadata());
        return merged;
    } catch (FileNotFoundException ex) {
    // No additional metadata
    } catch (InvalidConfigurationMetadataException ex) {
        log(ex.getKind(), ex.getMessage());
    } catch (Exception ex) {
        logWarning("Unable to merge additional metadata");
        logWarning(getStackTrace(ex));
    }
    return metadata;
}
Also used : FileNotFoundException(java.io.FileNotFoundException) ConfigurationMetadata(org.springframework.boot.configurationprocessor.metadata.ConfigurationMetadata) InvalidConfigurationMetadataException(org.springframework.boot.configurationprocessor.metadata.InvalidConfigurationMetadataException) FileNotFoundException(java.io.FileNotFoundException) InvalidConfigurationMetadataException(org.springframework.boot.configurationprocessor.metadata.InvalidConfigurationMetadataException)

Aggregations

FileNotFoundException (java.io.FileNotFoundException)1 ConfigurationMetadata (org.springframework.boot.configurationprocessor.metadata.ConfigurationMetadata)1 InvalidConfigurationMetadataException (org.springframework.boot.configurationprocessor.metadata.InvalidConfigurationMetadataException)1