Reputation: 83
I have an application which when I try to run in intelliJ by runing the main method I get the following error:
Caused by: java.lang.IllegalArgumentException: Could not resolve placeholder 'jwt.header' in value "${jwt.header}"
at org.springframework.util.PropertyPlaceholderHelper.parseStringValue(PropertyPlaceholderHelper.java:174) ~[spring-core-4.3.19.RELEASE.jar:4.3.19.RELEASE]
at org.springframework.util.PropertyPlaceholderHelper.replacePlaceholders(PropertyPlaceholderHelper.java:126) ~[spring-core-4.3.19.RELEASE.jar:4.3.19.RELEASE]
at org.springframework.core.env.AbstractPropertyResolver.doResolvePlaceholders(AbstractPropertyResolver.java:236) ~[spring-core-4.3.19.RELEASE.jar:4.3.19.RELEASE]
When i build and run this project as a jar, it works fine, recognising the propertys file. I am new to intelliJ after making the switch from eclipse. I have tried several things such as this: Article1 and this Article2 and this Article3 but I have no luck.
Is there some settings I should know about to get intelliJ to recognise my property's file? I have marked my resource folder as a source root as this contains my property's file.
Any help would be greatly appreciated. My colleague is able to run the project perfectly in the enterprise edition?
Thanks
Upvotes: 0
Views: 584
Reputation: 83
This was resolved by having $MODULE_WORKING_DIR$
set as the Working Directory for the applications run configuration. For any future readers, my working directory was set to i.e /home/workspace/project
rather than the $MODULE_WORKING_DIR$
. Not quite sure how this worked, but it has! I believe this is an internal intelliJ feature
Upvotes: 1