Skip to content
Advertisement

Spring @PropertySource cannot be opened because it does not exist

I have simple spring application. Spring version is 3.2.16.RELEASE.

Project structure is:

project structure .

Application class looks like:

JavaScript

When I try to run it I have:

JavaScript

I have trying:

JavaScript

and other…

Resources folder is marked as resource root… Intellij project structure is ok.

Any ideas what can be wrong? Did I missed something?

Thanks in advice!

Advertisement

Answer

Try to add absolute path file location @PropertySource(“file:/root/…/application.properties”)

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement