在上下文初始化期间遇到异常 - 取消刷新尝试:org.springframework.beans.factory [英] Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory
问题描述
HomeController:
UnsatisfiedDependencyException:创建名为'homeController'的bean时出错:通过字段'productDao'表示的不满意的依赖项
SessionFactory :
$ b
引起:org.springframework.beans.factory.BeanCreationException:创建名为'sessionFactory'的bean时出错:Failed来反省bean
错误的屏幕截图: http://prntscr.com/ejjtp5
您应该使用它的dao类注册您的bean对象在应用程序上下文文件中
这里'p'是HomeConttroller中ProductDAO的对象声明
I have following errors:
HomeController:
UnsatisfiedDependencyException: Error creating bean with name 'homeController': Unsatisfied dependency expressed through field 'productDao'
SessionFactory:
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory': Failed to introspect bean
Screenshot of error: http://prntscr.com/ejjtp5
you should register your bean object with its dao class inside application context file. here 'p' is declared object of ProductDAO in HomeConttroller
这篇关于在上下文初始化期间遇到异常 - 取消刷新尝试:org.springframework.beans.factory的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!