Spring data jpa- No bean named 'entityManagerFactory' is defined; Injection of autowired dependencies failed

前端 未结 8 1331
鱼传尺愫
鱼传尺愫 2020-11-27 15:19

I\'m developing application using spring data jpa,hibernate,mysql,tomcat7,maven and it\'s create error.I\'m trying to figure it out but i failed.

error are Cannot

8条回答
  •  悲哀的现实
    2020-11-27 15:44

    I think this is related to the newer version of spring boot plus using spring data JPA just replace @Bean annotation above public LocalContainerEntityManagerFactoryBean entityManagerFactory() to @Bean(name="entityManagerFactory")

    Determining the name of bean should solve the issue

提交回复
热议问题