Venu Annaram
Venu Annaram

Reputation: 287

Configuration Failed to import bean definitions from relative location

My folder structure is:

src/main---java
           resources/META-INF/Spring-context/application.xml
           webapp/WEB-INF--web.xml
                           despatcher-servlet.xml

from webapp/WEB-INF/despatcher-servlet i am trying to import application.xml like

<import resource="classes/META-INF/spring-context/application.xml"/>

getting exception like Configuration problem: Failed to import bean definitions from relative location [classes/META-INF/springcontext/application.xml] Can any one help me.

Upvotes: 2

Views: 26119

Answers (1)

seenukarthi
seenukarthi

Reputation: 8624

Your configuration file is in classpath so you have to use classpath: prefix also remove classes from the path. Your settings will be:

classpath:META-INF/springcontext/application.xml

Upvotes: 5

Related Questions