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版本后,问题解决。