jetty问题记录

简介:

1、eclipse中使用jetty容器,使用jetty版本6.1.26运行良好;在命令行启动:mvn jetty:run,却报出异常:不能注入

 
  1. 2011-12-27 14:44:55,602 [ERROR] org.springframework.web.servlet.DispatcherServlet:290 - Context initialization failed 
  2. org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hummockAppController': Autowiring of fields failed; 
  3. nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: public com.alibaba.hummock.console.se 
  4. rvice.HummockAppService com.alibaba.hummock.console.controller.HummockAppController.hummockAppService; nested exception is org.springframewo 
  5. rk.beans.factory.BeanCreationException: Error creating bean with name 'hummockAppServiceImpl': Autowiring of fields failed; nested exception 
  6.  is ......

仔细检查了代码,@Autowired使用都正确。为什么???

仔细思考后,发现pom里面使用的jetty插件为:6.1.22版本,难道是这个原因?

解决方案:将pom中jetty的版本改为6.1.26后,在命令行正确启动了。

 

 

 本文转自 zhouhaipeng 51CTO博客,原文链接:http://blog.51cto.com/tianya23/752152,如需转载请自行联系原作者


相关文章
|
缓存 分布式计算 API
Spark Netty与Jetty (源码阅读十一)
  spark呢,对Netty API又做了一层封装,那么Netty是什么呢~是个鬼。它基于NIO的服务端客户端框架,具体不再说了,下面开始。   创建了一个线程工厂,生成的线程都给定一个前缀名。      像一般的netty框架一样,创建Netty的EventLoopGroup:      在常用...
1068 0