Olá pessoa, estou estudando a apostila fj28, e na parte de injeção de dependencia estou tendo o seguinte erro:
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'produtosController' defined in file [C:\Users\Fernando\workspace jee\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\lojaVirtual\WEB-INF\classes\controller\ProdutosController.class]: Unsatisfied dependency expressed through constructor argument with index 0 of type [dao.ProdutoDAO]: : Error creating bean with name 'produtoDAO' defined in file [C:\Users\Fernando\workspace jee\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\lojaVirtual\WEB-INF\classes\dao\ProdutoDAO.class]: Unsatisfied dependency expressed through constructor argument with index 0 of type [org.hibernate.Session]: : No matching bean of type [org.hibernate.Session] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No matching bean of type [org.hibernate.Session] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'produtoDAO' defined in file [C:\Users\Fernando\workspace jee\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\lojaVirtual\WEB-INF\classes\dao\ProdutoDAO.class]: Unsatisfied dependency expressed through constructor argument with index 0 of type [org.hibernate.Session]: : No matching bean of type [org.hibernate.Session] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No matching bean of type [org.hibernate.Session] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}
at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:698)
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:192)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:984)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:886)
Não consegui identificar o que está acontecendo, porém se eu rodar algum projeto que não utilize injeção de dependencia funciona normalmente.