Chirag Dhaduk
Chirag Dhaduk

Reputation: 11

Import resource in spring bean

I want to import xml resource file in spring bean so how can i do it?i have already tried below code but its not working.

<beans profile="en_US">
<import resource="Test.xml" />
</beans>

Upvotes: 1

Views: 1473

Answers (1)

Moshe Arad
Moshe Arad

Reputation: 3733

Try to use classpath in your import tag, like this:

<beans profile="en_US">
    <import resource="classpath:Test.xml" />
</beans>

Assuming that Test.xml is located in your classpath.

Upvotes: 1

Related Questions