Contents
  1. 1. Background
  2. 2. Error Info
  3. 3. Solutions
  4. 4. Reasons

Background

Running the Spring Boot project occurs an error.

Error Info

1
2
3
Caused by: java.lang.IllegalArgumentException: Could not resolve placeholder 'spring.datasource.druid.initialSize' in value "${spring.datasource.druid.initialSize}"
at org.springframework.util.PropertyPlaceholderHelper.parseStringValue(PropertyPlaceholderHelper.java:178)
... 97 common frames omitted

Solutions

Check whether the value of the property spring.profiles.active is correct in application.yml.

Check whether the property exists in application.yml or application-xxx.yml.

Reasons

The value of the property spring.profiles.active in application.yml is spring.profiles.active=pro. Should update pro to prod.

Contents
  1. 1. Background
  2. 2. Error Info
  3. 3. Solutions
  4. 4. Reasons