Spring boot, Spring Data Jpa, Problem with JpaRepository

01. марта 2017 Spring 0

When Spring boot start I have a problem «…Cannot create inner bean…»

The problem depends with JpaRepository

I have configuration class JpaConfig

For resolve problem I did:

1 for bean entityManagerFactory in annotation I add name «emf»

@Bean(name = "emf")
public LocalContainerEntityManagerFactoryBean configureEntityManager()

2 in annotation «EnableJpaRepositories»  for JpaConfig I add property «entityManagerFactoryRef»

@EnableJpaRepositories(basePackages = "pro.bolshakov.stock.repository.datajpa", entityManagerFactoryRef = "emf")