Caused by: java.lang.IllegalArgumentException: Could not resolve placeholder 'api-host' in value "${

1问题Could not resolve placeholder 'api-host' in value :

2. solve the problem:

// set @Value not ignore the value of notes (no error)
  @Bean
 public static PropertySourcesPlaceholderConfigurer placeholderConfigurer() {
           PropertySourcesPlaceholderConfigurer c = new PropertySourcesPlaceholderConfigurer();
           c.setIgnoreUnresolvablePlaceholders(true);
           return c;
          }
Published 91 original articles · won praise 16 · views 10000 +

Guess you like

Origin blog.csdn.net/fujianmin19910915/article/details/103634596