Today We are Going To Solve java.lang.IllegalArgumentException: Could not resolve placeholder in java. Here we will Discuss All Possible Solutions and How this error Occurs So let’s get started with this Article.
Contents
How to Fix java.lang.IllegalArgumentException: Could not resolve placeholder Error?
- How to Fix java.lang.IllegalArgumentException: Could not resolve placeholder Error?
To Fix java.lang.IllegalArgumentException: Could not resolve placeholder Error just Change the annotation. First of all, pass the parameter as:
file:appclient.properties
orclasspath:appclient.properties
.
And after it change the annotation to:@PropertySource(value={"classpath:appclient.properties"})
It will help you. - java.lang.IllegalArgumentException: Could not resolve placeholder
To Fix java.lang.IllegalArgumentException: Could not resolve placeholder Error just Add the configuration file path as a system property. To solve this error just add the configuration file path as a system property:
java -Dapp.config.path=path_to_config_file -jar your.jar
Solution 1 : Change the annotation
First of all, pass the parameter as: file:appclient.properties
or classpath:appclient.properties
.
And after it change the annotation to:
@PropertySource(value={"classpath:appclient.properties"})
It will help you.
Solution 2 : Add the configuration file path as a system property
To solve this error just add the configuration file path as a system property:
java -Dapp.config.path=path_to_config_file -jar your.jar
Conclusion
So these were all possible solutions to this error. I hope your error has been solved by this article. In the comments, tell us which solution worked? If you liked our article, please share it on your social media and comment on your suggestions. Thank you.
Also Read These Solutions
- Excel file format cannot be determined, you must specify an engine manually
- General error during semantic analysis: Unsupported class file major version 60
- Command CompileSwiftSources failed with a nonzero exit code xcode 13
- Module not found: Error: Can’t resolve ‘crypto’
- zsh: command not found: PHP