java.io.FileNotFoundException: class path resource [classpath*:xxx] cannot be opened 与xml配置文件不同,使用类配置有getResources和getResource之分,getResources获取的是多个资源文件,应使用classpath*, getResource获取单个资源文件,应该使用classpath:,这种情况把classpath*的星号去掉就解决了