Springboot error, unable to read configuration file: could not resolve placeholder ‘xxx’ in value “${XXX}

Just configure the following code on the startup class

@Bean
    public static PropertySourcesPlaceholderConfigurer placeholderConfigurer() {

        PropertySourcesPlaceholderConfigurer placeholderConfigurer = new PropertySourcesPlaceholderConfigurer();

        placeholderConfigurer.setIgnoreUnresolvablePlaceholders(true);

        return placeholderConfigurer;
    }

should be OK

Read More: