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

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

2.解决问题:

// 设置@Value注解取值不到忽略(不报错)
  @Bean
 public static PropertySourcesPlaceholderConfigurer placeholderConfigurer() {
           PropertySourcesPlaceholderConfigurer c = new PropertySourcesPlaceholderConfigurer();
           c.setIgnoreUnresolvablePlaceholders(true);
           return c;
          }

相关文章:

  • 2022-12-23
  • 2021-11-04
  • 2022-12-23
  • 2022-12-23
  • 2021-06-29
  • 2021-08-25
  • 2021-10-25
  • 2021-06-27
猜你喜欢
  • 2021-12-30
  • 2022-12-23
  • 2022-12-23
  • 2021-07-17
  • 2021-06-23
  • 2022-12-23
  • 2021-06-04
相关资源
相似解决方案