No bean named 'transactionManager' available

I had the same issue, but I was missing the transactionManagerRef = "dbTransactionManager" configuration in @EnableJpaRepositories


Finally I found the mistake:

 @Bean
        public PlatformTransactionManager dbTransactionManager() {
            JpaTransactionManager transactionManager
                    = new JpaTransactionManager();
            transactionManager.setEntityManagerFactory(
                    dbEntityManager().getObject());
            return transactionManager;
        }

This section has mistake that caused the above issue. change @Bean to @Bean(name="transactionManager") and this solved the issue.