如何解决SpringBoot JpaRepository @Autowired 没法自动注入的问题

问题:
***************************
APPLICATION FAILED TO START
***************************

Description:

Parameter 0 of method setApplicantRepo in com.service.applicant.ApplicantImpl required a bean of type 'com.delivery.service.request.repository.TApplicantRepository' that could not be found.


Action:

Consider defining a bean of type 'com.delivery.request.request.repository.TApplicantRepository' in your configuration.

解决:

在启动类中加入,@EnableJpaRepositories("com.example.repository")




你可能感兴趣的:(springboot)