小编Mig*_*vía的帖子

Spring Data JPA - 考虑在配置中定义名为"entityManagerFactory"的bean

我在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)

java spring jpa spring-mvc maven

14
推荐指数
4
解决办法
5万
查看次数

标签 统计

java ×1

jpa ×1

maven ×1

spring ×1

spring-mvc ×1