我在Spring中开发一个应用程序,使用Tomcat,Mysql5,Java8 ......问题是我无法部署它,因为"找不到所需的bean'entityManagerFactory'"问题.我和我的同事一起开发了这个项目,但即使我在Spring Tool Suite中复制粘贴相同的项目,他们也可以完美地部署它.怎么可能?错误:
2016-12-15 17:41:12.777 WARN 3676 --- [ main] ationConfigEmbeddedWebApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'controlador': Unsatisfied dependency expressed through field 'usuarioDao'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'usuarioRepository': Cannot create inner bean '(inner bean)#59e43e8c' of type [org.springframework.orm.jpa.SharedEntityManagerCreator] while setting bean property 'entityManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#59e43e8c': Cannot resolve reference to bean 'entityManagerFactory' while setting constructor argument; …Run Code Online (Sandbox Code Playgroud)