I am using Spring dependency injection, but I am having difficulty loading the resource in the Spring configuration file.
A resource is an XML file and is located in a JAR file in my class path. I am trying to access it as follows:
<import resource="classpath:com/config/resources.xml" />
however, I continue to encounter the following error:
Failed to import bean definitions from url [classpath: com / config / resources.xml]
The JAR file is on the way to the classes of the Java project, which in turn is used by my web application. Do I really have to do my Spring configuration in a web project, as opposed to a Java project, or does it matter?
source
share