BUG——Could not resolve placeholder ‘xxx‘ in value ‘${xxx}‘

report errors

1、Error creating bean with name ‘xxx’: Injection of autowired dependencies failed
2、Could not resolve placeholder ‘xxx’ in value ‘${xxx}’
3、Failed to load applicationcontext

Guess

Guess 1: no configuration in YML
guess 2: duplicate or conflicting configuration names, such as my EML
guess 3: no @ component is added to the entity class
guess 4: redundant symbols appear in YML, such as spaces

oneself

User defined EML reports an error, but PNG does not report an error. It is speculated that PNG has affected the EML below. Change “\” to “\ \”, and the EML will run normally (when copying the path to YML, double slash will be automatically changed to single slash, which means single slash is OK, but not expected…).

Original——

custom:
  path:
    png: C:\Users\Administrator\Desktop\AutoMail\png\
    eml: C:\Users\Administrator\Desktop\AutoMail\eml\
    xls: C:\Users\Administrator\Desktop\AutoMail\xls\

Now——

custom:
  path:
    png: C:\\Users\\Administrator\\Desktop\\AutoMail\\png\\
    eml: C:\\Users\\Administrator\\Desktop\\AutoMail\\eml\\
    xls: C:\\Users\\Administrator\\Desktop\\AutoMail\\xls\\

Read More: