Spring MVC 注解开发学习过程中遇到500 – Servlet.init() for servlet springmvc threw exception错误,详细信息如下:

org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component class: file [/Users/Ethan/Documents/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/BtcWatcher/WEB-INF/classes/com/ziyouq/btcwatcher/controller/ItemsController3.class]; nested exception is java.lang.IllegalArgumentException
at org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.findCandidateComponents(ClassPathScanningCandidateComponentProvider.java:281)

参考博客:http://blog.csdn.net/yhl_jxy/article/details/52999571猜测可能是spring版本问题。

变更前环境:java1.8 Spring3.2

变更后环境:java1.8 Spring 4.3

升级Spring版本后,问题解决。


版权声明:本文为liuxue1992原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
原文链接:https://blog.csdn.net/liuxue1992/article/details/78176511