Spring test with @DataJpaTest can't autowire class with @Repository (but with interface repository works!)

后端 未结 2 1380
野趣味
野趣味 2020-12-06 10:45

I\'m trying to understand why I can\'t autowire a class repository but I can autowire a interface repository in the same package for the same test

2条回答
  •  长情又很酷
    2020-12-06 11:13

    Just another alternative might be @Import as shown here https://stackoverflow.com/a/41084739/384674.

提交回复
热议问题