Concept Explanation:
Classpath: Web-inf below the classes directory in the project;
Application:
Files under the "01" SRC Path are compiled and placed under the web-inf/clases path. The default classpath is here. If you put it directly under the Web-inf, it is not under the classpath. With Classpathxmlapplicationcontext, of course, you can't get it. "02" If the unit tests, you can specify the path of the classpath in the startup or run options. When you build a project with MAVEN, the resource directory is the default classpath "03" classpath the compiled directory of the class file after the Java file is compiled is generally web-inf/classes, The XML under SRC is also copied to classpath at compile time.
New Classpathxmlapplicationcontext ("Xxxx.xml"); // Read the Spring.xml configuration file under Classpath New Filesystemxmlapplicationcontext ("Webroot/web-inf/xxxx.xml"); // read the Spring.xml file under Web-inf
difference:Classpath and classpath* differences:
Classpath: Only look for files in your class path;
Classpath*: Includes not only the class path, but also the jar file (the class path) to find.
Classpath Description of the Javaweb project