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

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

原文地址:https://www.cnblogs.com/qianzf/p/8392236.html