解决 java.io.FileNotFoundException: class path resource [xxx.xml] cannot be opened because it does not exist
解决 java.io.FileNotFoundException: class path resource [xxx.properties] cannot be opened because it does not exist
<build> <resources> <resource> <directory>src/main/recourse</directory> <includes> <include>**/*.xml</include> <include>**/*.properties</include> </includes> <filtering>true</filtering> </resource> </resources> </build>
Solve java.lang.ClassNotFoundException
Talk about my situation: A project dependencies 1.1.1 version of the B project jar package. But I packed B project with maven 2.2.2 version when playing a jar.
A project can not find it relies B 1.1.1 version, naturally, can not find the class class needed. So pack B modified version of the project pom.xml in 1.1.1 to
<groupId>com.xxx</groupId> <artifactId>B-war</artifactId> <packaging>war</packaging> <version>1.1.1</version>
You may not be the case, we need to look for another way.