@Resource(type注入失败

不断的去找资料,换方法,最后发现是因为注入的service写了get, set方法,删除掉就注入成功了。
关于通过注解注入这篇文章介绍的挺全面的。
http://blogs.sourceallies.com/2011/08/spring-injection-with-resource-and-autowired/

猜你喜欢

转载自lizhuang.iteye.com/blog/2216530