Stupid.Fat.Cat
Stupid.Fat.Cat

Reputation: 11345

Spring Java, file not found when loading xml

So I followed a tutorial for Spring that I found online, namely a Hello World, and they have this structure at the end. I tried it and it worked fine, now I created a new Dynamic Web project, Eclipse doesn't seem to like this structure. I get:

Caused by: java.io.FileNotFoundException: class path resource [Spring-Module.xml] cannot be opened because it does not exist

How do I fix this? Or rather, what's causing Eclipse to not know where the file is?

Error here:

This one errors out

Works here:

Works here

Upvotes: 0

Views: 1022

Answers (1)

Ajinkya
Ajinkya

Reputation: 22730

Make sure resources folder is on classpath.
Project -> Properties -> Build Path -> Add folder

Upvotes: 3

Related Questions