I am getting the following error:
APPLICATION FAILED TO START
***************************
Description:
Parameter 0 of constructor in mn.ailab.bankcg.cashout.service.bankservice.BankSelector required a bean of type 'mn.ailab.bankcg.cashout.service.bankservice.CgwBankRepository' that could not be found.
Action:
Consider defining a bean of type 'mn.ailab.bankcg.cashout.service.bankservice.CgwBankRepository' in your configuration.
My project structure: Project Structure
I have configured base packages:
@ComponentScan(basePackages = {"mn.ailab", "mn.invescore.ailab"})
@EnableJpaRepositories(basePackages = {"mn.ailab", "mn.invescore.ailab"})
@EntityScan(basePackages = {"mn.ailab", "mn.invescore.ailab"})
@SpringBootApplication
@EnableCaching
@EnableScheduling
public class AccountingApplication {
public static void main(String[] args) {
SpringApplication.run(AccountingApplication.class, args);
}
}
CgwBankRepository.java
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;
import java.util.List;
@Repository
interface CgwBankRepository extends CrudRepository<CgwBank, String> {
List<CgwBank> findAllBy();
}
I have changed base package different ways. But still get same error.