Java开启tomcat是出现springmvc错误

org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component class: file [C:\Users\workspace\springMVC_02\WEB-INF\controller\GradeController.class]; nested exception is java.lang.IllegalArgumentException

  可能是配置文件路径不对

    在配置spring到tomcat里面的时候我们需要加一个listener,添加一个listener以后还要告诉tomcat去哪里找spring的applications。xml文件,所以还要添加一个context-param。就是说告诉tomcat去哪里加载spring配置文件

    在web.xml中没有引入applicationContext.xml,及其applicationContext-*.xml文件,或者是引入的路径错误

    GradeController.class有问题,class是编译后的文件。

温馨提示:答案为网友推荐,仅供参考
第1个回答  2016-07-03
重新rebuild项目
相似回答