注入bean失败问题去网上搜索了好几天,然后什么原因都有,没有一个能解决我的问题,配置文件也配置好久,一直修改配置文件改来该去一直没有改出来,最后发现我少了一个包spring-jdbc,添加之后修改成功。
[ERROR] Failed startup of context org.mortbay.jetty.plugin.Jetty6PluginWebAppContext@6107165{/,E:\JAVA文件图论\框架学习\Spring_MVC\src\main\webapp}
org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘controllerDemo’: Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.tulun.service.userService com.tulun.controller.controllerDemo.userService; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘userService’: Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefiniti