解决方法,在repository加一个注解。如下图所示:
@Component

spring boot中注入jpa时报could not autowire.No beans of  'PersonRepository' type found

 

相关文章: