Попытка добавления всех пакетов в @componentScan и @component в репозитории, но проблема все еще та же. Ниже приведены пакеты com.javasampleapproach.mariadb, com.javasampleapproach.mariadb.repo, com.javasampleapproach.mariadb.model.
package com.javasampleapproach.mariadb;
@SpringBootApplication
@ComponentScan({"com","com.javasampleapproach","com.javasampleapproach.mariadb","com.javasampleapproach.mariadb.repo"})
@EntityScan("com.javasampleapproach.mariadb.model")
@EnableJpaRepositories("com.javasampleapproach.mariadb.repo")
public class SpringBootJpaMariaDbApplication {
}
@Repository
@Component
public interface ActiveDiscrepanciesRepository extends JpaRepository<ActiveDiscrepancies, Serializable>,ActiveDiscrepancyCustomRepositrory
{
}
@Component
public interface ActiveDiscrepancyCustomRepositrory
{
public ActiveDiscrepancies findByDiscrepancy();
}
@Repository
@Transactional(readOnly = true)
public class ActiveDiscrepancyRepositoryImpl implements ActiveDiscrepancyCustomRepositrory{
@Override
public ActiveDiscrepancies findByDiscrepancy() {
// TODO Auto-generated method stub
}
}
Description:
Field activeDiscrepancyRepo in com.javasampleapproach.mariadb.controller.ActiveDiscrepanciesResourceImpl required a bean of type 'com.javasampleapproach.mariadb.repo.ActiveDiscrepanciesRepository' that could not be found.
Action:
Consider defining a bean of type 'com.javasampleapproach.mariadb.repo.ActiveDiscrepanciesRepository' in your configuration.