ERROR (.sql) Resource not found
Answered
I have recently switched to using Intellij from Eclipse and have found the transition to be quite good except for this one error....
I am running a Java application which does some stuff then runs a number of SQL scripts. While there was no problem in Eclipse, Intellij can't seem to find the SQL scripts to run.
The files are located in a folder which is marked as the Resource Root directory. When the project is built, the files appear in the target folder. What am I missing?
Please sign in to leave a comment.
What code do you use to load the files from the classpath? Where exactly do they appear under target? Is that a Maven project?
Yes, it is a Maven project. We call to the following method to load the files:
and the files appear in the same relative path within the target/classes folder
A sample project would help to find the problem: https://stackoverflow.com/help/mcve.