Hi, I want to use `@Autowired` in my tests. So I h...
# spring
m
Hi, I want to use
@Autowired
in my tests. So I have a class annotated with
@Repository
and test that looks like the following
Copy code
@RunWith(SpringJUnit4ClassRunner::class)
@ContextConfiguration
@ActiveProfiles("test")
class MyTest {
    @Autowired lateinit var repo: MyRepository
}
With all this I get the error
Could not autowire. No beans of 'MyRepository' type found
. Any ideas how to fix it without xml config files?🙂