Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

properties file can not loaded, if file begins (#) empty comment line #24228

Closed
neaplus opened this issue Nov 21, 2020 · 4 comments
Closed

properties file can not loaded, if file begins (#) empty comment line #24228

neaplus opened this issue Nov 21, 2020 · 4 comments
Labels
status: duplicate A duplicate of another issue

Comments

@neaplus
Copy link

neaplus commented Nov 21, 2020

Hello,

I get error bellow when properties file's first line is # (empty comment). If first line comment has more characters there is no error.

Error creating bean with name 'demoApplication': Injection of autowired dependencies failed; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'message' in value "${message}"

exception occurs while application.properties file look like:

#
message=Hello
#

spring-boot version 2.4.0

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Nov 21, 2020
@neaplus
Copy link
Author

neaplus commented Nov 21, 2020

additionally, i can confirm that it affects each property line next to single # line (empty comment line).

@knoobie
Copy link

knoobie commented Nov 21, 2020

Issue is already fixed. You can find more infos here #24158.

@snicoll
Copy link
Member

snicoll commented Nov 21, 2020

Thank you @knoobie.

@neaplus please give 2.4.1-SNAPSHOT a try if you can to confirm this fixes your use case as well.

@snicoll snicoll closed this as completed Nov 21, 2020
@snicoll snicoll added status: duplicate A duplicate of another issue and removed status: waiting-for-triage An issue we've not yet triaged labels Nov 21, 2020
@neaplus
Copy link
Author

neaplus commented Nov 21, 2020

@snicoll, I hereby confirm working perfectly at 2.4.1-SNAPSHOT. Thanks all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: duplicate A duplicate of another issue
Projects
None yet
Development

No branches or pull requests

4 participants