Reputation: 27
I have 2 Maven
projects. One of them is using Spring
, other one is a class library that has an xml
file and a class file that uses this xml
file. In the Spring
project, I call the class then I got an error:
"I am not found the xml file"
This xml file is unimportant for the Spring project. Because it's in the class library project, I don't want to access the xml
file directly, I just want to call the classes and the classes access the xml
file.
Why did this happen? And what is the solution?
Tomcat: 9
IDE: Eclipse
Note: There is no problem when any classes in class library wants to access the xml file
Thanks for helping.
Upvotes: 0
Views: 65
Reputation: 27
I found a solution. I copy the xml file to spring project as same folder name in maven repository. It worked but I don't understand why am I must to do that :)
Upvotes: 0
Reputation: 243
for that, you have to configure as Java based project.otherwise, it will load the XML file first.
Upvotes: 1