Home > Enterprise >  Spring cannot find xml file
Spring cannot find xml file

Time:11-09

Spring not able located the xml config file. spring.xml file is located in the java folder enter image description here

CodePudding user response:

In maven the non-java classpath resources like xml should be placed in src\main\resources.

From the screenshot I can see that you don't have resources folder in src\main. Create a folder named resources in src\main and move the spring.xml into it and try.

CodePudding user response:

u can right click the xml file in IDEA,and click the copy path selection,the u can choose the right path in your java file

  • Related