在maven项目中调用了一个类,没有报异常。但是运行的时候报出来Instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError。 原因是这个类存在依赖。 将其引入pom解决问题。