Spring Unsatisfied dependency expressed through constructor argument with index 0 of type

后端 未结 4 2050
既然无缘
既然无缘 2021-02-07 22:24

The full message is

Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: 
    Error creating bean with name \'userRepositoryUserDetailsSe         


        
4条回答
  •  太阳男子
    2021-02-07 23:29

    It seems you are using @EnableJpaRepositories to configure the database repository. It has two option load beans, the following one method you can use.

    @EnableJpaRepositories(basePackages={"com.test.repo"})
    

    or

    @EnableJpaRepositories(basePackageClasses=TestRepo.class)
    

提交回复
热议问题